Files
directus/app/src/interfaces/input-multiline/index.ts
Rijk van Zanten 92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00

75 lines
1.5 KiB
TypeScript

import { defineInterface } from '@directus/shared/utils';
import InterfaceInputMultiline from './input-multiline.vue';
export default defineInterface({
id: 'input-multiline',
name: '$t:interfaces.input-multiline.textarea',
description: '$t:interfaces.input-multiline.description',
icon: 'text_fields',
component: InterfaceInputMultiline,
types: ['text'],
options: [
{
field: 'placeholder',
name: '$t:placeholder',
type: 'string',
meta: {
width: 'full',
interface: 'input',
options: {
placeholder: '$t:enter_a_placeholder',
},
},
},
{
field: 'trim',
name: '$t:interfaces.input.trim',
type: 'boolean',
meta: {
width: 'half',
interface: 'boolean',
options: {
label: '$t:interfaces.input.trim_label',
},
},
schema: {
default_value: false,
},
},
{
field: 'font',
name: '$t:font',
type: 'string',
meta: {
width: 'half',
interface: 'select-dropdown',
options: {
choices: [
{ text: '$t:sans_serif', value: 'sans-serif' },
{ text: '$t:monospace', value: 'monospace' },
{ text: '$t:serif', value: 'serif' },
],
},
},
schema: {
default_value: 'sans-serif',
},
},
{
field: 'clear',
name: '$t:interfaces.input.clear',
type: 'boolean',
meta: {
width: 'half',
interface: 'boolean',
options: {
label: '$t:interfaces.input.clear_label',
},
},
schema: {
default_value: false,
},
},
],
});