mirror of
https://github.com/directus/directus.git
synced 2026-02-05 10:29:03 -05:00
* 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
106 lines
2.2 KiB
TypeScript
106 lines
2.2 KiB
TypeScript
import { defineInterface } from '@directus/shared/utils';
|
|
import InterfaceSelectMultipleDropdown from './select-multiple-dropdown.vue';
|
|
|
|
export default defineInterface({
|
|
id: 'select-multiple-dropdown',
|
|
name: '$t:interfaces.select-multiple-dropdown.select-multiple-dropdown',
|
|
description: '$t:interfaces.select-multiple-dropdown.description',
|
|
icon: 'arrow_drop_down_circle',
|
|
component: InterfaceSelectMultipleDropdown,
|
|
types: ['json', 'csv'],
|
|
options: [
|
|
{
|
|
field: 'choices',
|
|
type: 'json',
|
|
name: '$t:choices',
|
|
meta: {
|
|
width: 'full',
|
|
interface: 'list',
|
|
options: {
|
|
placeholder: '$t:interfaces.select-dropdown.choices_placeholder',
|
|
template: '{{ text }}',
|
|
fields: [
|
|
{
|
|
field: 'text',
|
|
type: 'string',
|
|
name: '$t:text',
|
|
meta: {
|
|
width: 'half',
|
|
interface: 'input',
|
|
options: {
|
|
placeholder: '$t:interfaces.select-dropdown.choices_name_placeholder',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
field: 'value',
|
|
type: 'string',
|
|
name: '$t:value',
|
|
meta: {
|
|
width: 'half',
|
|
interface: 'input',
|
|
options: {
|
|
font: 'monospace',
|
|
placeholder: '$t:interfaces.select-dropdown.choices_value_placeholder',
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
field: 'allowOther',
|
|
name: '$t:interfaces.select-dropdown.allow_other',
|
|
type: 'boolean',
|
|
meta: {
|
|
width: 'half',
|
|
interface: 'boolean',
|
|
options: {
|
|
label: '$t:interfaces.select-dropdown.allow_other_label',
|
|
},
|
|
},
|
|
schema: {
|
|
default_value: false,
|
|
},
|
|
},
|
|
{
|
|
field: 'allowNone',
|
|
name: '$t:interfaces.select-dropdown.allow_none',
|
|
type: 'boolean',
|
|
meta: {
|
|
width: 'half',
|
|
interface: 'boolean',
|
|
options: {
|
|
label: '$t:interfaces.select-dropdown.allow_none_label',
|
|
},
|
|
},
|
|
schema: {
|
|
default_value: false,
|
|
},
|
|
},
|
|
{
|
|
field: 'placeholder',
|
|
name: '$t:placeholder',
|
|
type: 'string',
|
|
meta: {
|
|
width: 'half',
|
|
interface: 'input',
|
|
options: {
|
|
placeholder: '$t:enter_a_placeholder',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
field: 'icon',
|
|
name: '$t:icon',
|
|
type: 'string',
|
|
meta: {
|
|
width: 'half',
|
|
interface: 'select-icon',
|
|
},
|
|
},
|
|
],
|
|
recommendedDisplays: ['labels'],
|
|
});
|