@wordpress/dataviews 9.0.1-next.6870dfe5b.0 → 9.0.1-next.a730c9c8c.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -1
- package/README.md +107 -12
- package/build/components/dataviews-filters/input-widget.js +48 -4
- package/build/components/dataviews-filters/input-widget.js.map +1 -1
- package/build/components/dataviews-layout/index.js +3 -1
- package/build/components/dataviews-layout/index.js.map +1 -1
- package/build/dataform-controls/array.js +9 -7
- package/build/dataform-controls/array.js.map +1 -1
- package/build/dataform-controls/checkbox.js +31 -20
- package/build/dataform-controls/checkbox.js.map +1 -1
- package/build/dataform-controls/color.js +29 -24
- package/build/dataform-controls/color.js.map +1 -1
- package/build/dataform-controls/date.js +32 -24
- package/build/dataform-controls/date.js.map +1 -1
- package/build/dataform-controls/datetime.js +133 -19
- package/build/dataform-controls/datetime.js.map +1 -1
- package/build/dataform-controls/email.js +9 -3
- package/build/dataform-controls/email.js.map +1 -1
- package/build/dataform-controls/index.js +27 -0
- package/build/dataform-controls/index.js.map +1 -1
- package/build/dataform-controls/integer.js +47 -34
- package/build/dataform-controls/integer.js.map +1 -1
- package/build/dataform-controls/password.js +47 -0
- package/build/dataform-controls/password.js.map +1 -0
- package/build/dataform-controls/radio.js +42 -9
- package/build/dataform-controls/radio.js.map +1 -1
- package/build/dataform-controls/relative-date-control.js +6 -10
- package/build/dataform-controls/relative-date-control.js.map +1 -1
- package/build/dataform-controls/select.js +41 -10
- package/build/dataform-controls/select.js.map +1 -1
- package/build/dataform-controls/telephone.js +9 -3
- package/build/dataform-controls/telephone.js.map +1 -1
- package/build/dataform-controls/text.js +16 -4
- package/build/dataform-controls/text.js.map +1 -1
- package/build/dataform-controls/textarea.js +81 -0
- package/build/dataform-controls/textarea.js.map +1 -0
- package/build/dataform-controls/toggle-group.js +36 -6
- package/build/dataform-controls/toggle-group.js.map +1 -1
- package/build/dataform-controls/toggle.js +33 -22
- package/build/dataform-controls/toggle.js.map +1 -1
- package/build/dataform-controls/url.js +9 -3
- package/build/dataform-controls/url.js.map +1 -1
- package/build/dataform-controls/utils/{validated-text.js → validated-input.js} +36 -29
- package/build/dataform-controls/utils/validated-input.js.map +1 -0
- package/build/dataforms-layouts/panel/dropdown.js +10 -14
- package/build/dataforms-layouts/panel/dropdown.js.map +1 -1
- package/build/dataforms-layouts/panel/index.js +24 -11
- package/build/dataforms-layouts/panel/index.js.map +1 -1
- package/build/dataforms-layouts/panel/modal.js +22 -27
- package/build/dataforms-layouts/panel/modal.js.map +1 -1
- package/build/dataforms-layouts/panel/summary-button.js +67 -0
- package/build/dataforms-layouts/panel/summary-button.js.map +1 -0
- package/build/dataforms-layouts/regular/index.js +7 -9
- package/build/dataforms-layouts/regular/index.js.map +1 -1
- package/build/dataviews-layouts/grid/index.js +5 -15
- package/build/dataviews-layouts/grid/index.js.map +1 -1
- package/build/dataviews-layouts/list/index.js +47 -2
- package/build/dataviews-layouts/list/index.js.map +1 -1
- package/build/dataviews-layouts/picker-grid/index.js +5 -15
- package/build/dataviews-layouts/picker-grid/index.js.map +1 -1
- package/build/dataviews-layouts/table/index.js +5 -17
- package/build/dataviews-layouts/table/index.js.map +1 -1
- package/build/dataviews-layouts/utils/get-data-by-group.js +23 -0
- package/build/dataviews-layouts/utils/get-data-by-group.js.map +1 -0
- package/build/field-types/index.js +4 -0
- package/build/field-types/index.js.map +1 -1
- package/build/field-types/password.js +51 -0
- package/build/field-types/password.js.map +1 -0
- package/build/normalize-fields.js +17 -0
- package/build/normalize-fields.js.map +1 -1
- package/build/types.js.map +1 -1
- package/build/validation.js +1 -1
- package/build/validation.js.map +1 -1
- package/build-module/components/dataviews-filters/input-widget.js +48 -4
- package/build-module/components/dataviews-filters/input-widget.js.map +1 -1
- package/build-module/components/dataviews-layout/index.js +3 -1
- package/build-module/components/dataviews-layout/index.js.map +1 -1
- package/build-module/dataform-controls/array.js +9 -7
- package/build-module/dataform-controls/array.js.map +1 -1
- package/build-module/dataform-controls/checkbox.js +31 -21
- package/build-module/dataform-controls/checkbox.js.map +1 -1
- package/build-module/dataform-controls/color.js +28 -24
- package/build-module/dataform-controls/color.js.map +1 -1
- package/build-module/dataform-controls/date.js +32 -24
- package/build-module/dataform-controls/date.js.map +1 -1
- package/build-module/dataform-controls/datetime.js +135 -21
- package/build-module/dataform-controls/datetime.js.map +1 -1
- package/build-module/dataform-controls/email.js +8 -2
- package/build-module/dataform-controls/email.js.map +1 -1
- package/build-module/dataform-controls/index.js +27 -0
- package/build-module/dataform-controls/index.js.map +1 -1
- package/build-module/dataform-controls/integer.js +46 -34
- package/build-module/dataform-controls/integer.js.map +1 -1
- package/build-module/dataform-controls/password.js +38 -0
- package/build-module/dataform-controls/password.js.map +1 -0
- package/build-module/dataform-controls/radio.js +44 -11
- package/build-module/dataform-controls/radio.js.map +1 -1
- package/build-module/dataform-controls/relative-date-control.js +6 -10
- package/build-module/dataform-controls/relative-date-control.js.map +1 -1
- package/build-module/dataform-controls/select.js +43 -12
- package/build-module/dataform-controls/select.js.map +1 -1
- package/build-module/dataform-controls/telephone.js +8 -2
- package/build-module/dataform-controls/telephone.js.map +1 -1
- package/build-module/dataform-controls/text.js +15 -3
- package/build-module/dataform-controls/text.js.map +1 -1
- package/build-module/dataform-controls/textarea.js +74 -0
- package/build-module/dataform-controls/textarea.js.map +1 -0
- package/build-module/dataform-controls/toggle-group.js +38 -8
- package/build-module/dataform-controls/toggle-group.js.map +1 -1
- package/build-module/dataform-controls/toggle.js +33 -23
- package/build-module/dataform-controls/toggle.js.map +1 -1
- package/build-module/dataform-controls/url.js +8 -2
- package/build-module/dataform-controls/url.js.map +1 -1
- package/build-module/dataform-controls/utils/validated-input.js +76 -0
- package/build-module/dataform-controls/utils/validated-input.js.map +1 -0
- package/build-module/dataforms-layouts/panel/dropdown.js +10 -15
- package/build-module/dataforms-layouts/panel/dropdown.js.map +1 -1
- package/build-module/dataforms-layouts/panel/index.js +24 -11
- package/build-module/dataforms-layouts/panel/index.js.map +1 -1
- package/build-module/dataforms-layouts/panel/modal.js +22 -28
- package/build-module/dataforms-layouts/panel/modal.js.map +1 -1
- package/build-module/dataforms-layouts/panel/summary-button.js +60 -0
- package/build-module/dataforms-layouts/panel/summary-button.js.map +1 -0
- package/build-module/dataforms-layouts/regular/index.js +8 -10
- package/build-module/dataforms-layouts/regular/index.js.map +1 -1
- package/build-module/dataviews-layouts/grid/index.js +6 -16
- package/build-module/dataviews-layouts/grid/index.js.map +1 -1
- package/build-module/dataviews-layouts/list/index.js +48 -3
- package/build-module/dataviews-layouts/list/index.js.map +1 -1
- package/build-module/dataviews-layouts/picker-grid/index.js +6 -16
- package/build-module/dataviews-layouts/picker-grid/index.js.map +1 -1
- package/build-module/dataviews-layouts/table/index.js +5 -17
- package/build-module/dataviews-layouts/table/index.js.map +1 -1
- package/build-module/dataviews-layouts/utils/get-data-by-group.js +17 -0
- package/build-module/dataviews-layouts/utils/get-data-by-group.js.map +1 -0
- package/build-module/field-types/index.js +4 -0
- package/build-module/field-types/index.js.map +1 -1
- package/build-module/field-types/password.js +46 -0
- package/build-module/field-types/password.js.map +1 -0
- package/build-module/normalize-fields.js +15 -0
- package/build-module/normalize-fields.js.map +1 -1
- package/build-module/types.js.map +1 -1
- package/build-module/validation.js +1 -1
- package/build-module/validation.js.map +1 -1
- package/build-style/style-rtl.css +9 -6
- package/build-style/style.css +9 -6
- package/build-types/components/dataform/stories/index.story.d.ts +3 -14
- package/build-types/components/dataform/stories/index.story.d.ts.map +1 -1
- package/build-types/components/dataviews/stories/fixtures.d.ts +4 -2
- package/build-types/components/dataviews/stories/fixtures.d.ts.map +1 -1
- package/build-types/components/dataviews-filters/input-widget.d.ts.map +1 -1
- package/build-types/dataform-controls/array.d.ts.map +1 -1
- package/build-types/dataform-controls/checkbox.d.ts.map +1 -1
- package/build-types/dataform-controls/color.d.ts.map +1 -1
- package/build-types/dataform-controls/date.d.ts.map +1 -1
- package/build-types/dataform-controls/datetime.d.ts.map +1 -1
- package/build-types/dataform-controls/email.d.ts.map +1 -1
- package/build-types/dataform-controls/index.d.ts +1 -1
- package/build-types/dataform-controls/index.d.ts.map +1 -1
- package/build-types/dataform-controls/integer.d.ts.map +1 -1
- package/build-types/dataform-controls/password.d.ts +3 -0
- package/build-types/dataform-controls/password.d.ts.map +1 -0
- package/build-types/dataform-controls/radio.d.ts.map +1 -1
- package/build-types/dataform-controls/relative-date-control.d.ts +6 -5
- package/build-types/dataform-controls/relative-date-control.d.ts.map +1 -1
- package/build-types/dataform-controls/select.d.ts.map +1 -1
- package/build-types/dataform-controls/telephone.d.ts.map +1 -1
- package/build-types/dataform-controls/text.d.ts +1 -1
- package/build-types/dataform-controls/text.d.ts.map +1 -1
- package/build-types/dataform-controls/textarea.d.ts +6 -0
- package/build-types/dataform-controls/textarea.d.ts.map +1 -0
- package/build-types/dataform-controls/toggle-group.d.ts.map +1 -1
- package/build-types/dataform-controls/toggle.d.ts.map +1 -1
- package/build-types/dataform-controls/url.d.ts.map +1 -1
- package/build-types/dataform-controls/utils/validated-input.d.ts +20 -0
- package/build-types/dataform-controls/utils/validated-input.d.ts.map +1 -0
- package/build-types/dataforms-layouts/panel/dropdown.d.ts +2 -1
- package/build-types/dataforms-layouts/panel/dropdown.d.ts.map +1 -1
- package/build-types/dataforms-layouts/panel/index.d.ts.map +1 -1
- package/build-types/dataforms-layouts/panel/modal.d.ts +2 -1
- package/build-types/dataforms-layouts/panel/modal.d.ts.map +1 -1
- package/build-types/dataforms-layouts/panel/summary-button.d.ts +15 -0
- package/build-types/dataforms-layouts/panel/summary-button.d.ts.map +1 -0
- package/build-types/dataforms-layouts/regular/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/grid/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/list/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/picker-grid/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/table/index.d.ts.map +1 -1
- package/build-types/dataviews-layouts/utils/get-data-by-group.d.ts +6 -0
- package/build-types/dataviews-layouts/utils/get-data-by-group.d.ts.map +1 -0
- package/build-types/field-types/index.d.ts.map +1 -1
- package/build-types/field-types/password.d.ts +17 -0
- package/build-types/field-types/password.d.ts.map +1 -0
- package/build-types/field-types/stories/index.story.d.ts +5 -1
- package/build-types/field-types/stories/index.story.d.ts.map +1 -1
- package/build-types/normalize-fields.d.ts +3 -0
- package/build-types/normalize-fields.d.ts.map +1 -1
- package/build-types/types.d.ts +67 -4
- package/build-types/types.d.ts.map +1 -1
- package/build-types/validation.d.ts.map +1 -1
- package/build-wp/index.js +1670 -1350
- package/package.json +16 -15
- package/src/components/dataform/stories/index.story.tsx +489 -17
- package/src/components/dataviews/stories/fixtures.tsx +99 -41
- package/src/components/dataviews/stories/index.story.tsx +2 -2
- package/src/components/dataviews-filters/input-widget.tsx +44 -5
- package/src/components/dataviews-layout/index.tsx +1 -1
- package/src/components/dataviews-picker/stories/index.story.tsx +1 -1
- package/src/dataform-controls/array.tsx +4 -6
- package/src/dataform-controls/checkbox.tsx +41 -24
- package/src/dataform-controls/color.tsx +33 -24
- package/src/dataform-controls/date.tsx +47 -21
- package/src/dataform-controls/datetime.tsx +171 -23
- package/src/dataform-controls/email.tsx +10 -2
- package/src/dataform-controls/index.tsx +30 -0
- package/src/dataform-controls/integer.tsx +82 -49
- package/src/dataform-controls/password.tsx +50 -0
- package/src/dataform-controls/radio.tsx +53 -11
- package/src/dataform-controls/relative-date-control.tsx +11 -10
- package/src/dataform-controls/select.tsx +53 -10
- package/src/dataform-controls/telephone.tsx +10 -2
- package/src/dataform-controls/text.tsx +19 -2
- package/src/dataform-controls/textarea.tsx +85 -0
- package/src/dataform-controls/toggle-group.tsx +50 -10
- package/src/dataform-controls/toggle.tsx +41 -24
- package/src/dataform-controls/url.tsx +10 -2
- package/src/dataform-controls/utils/validated-input.tsx +109 -0
- package/src/dataforms-layouts/panel/dropdown.tsx +12 -23
- package/src/dataforms-layouts/panel/index.tsx +39 -16
- package/src/dataforms-layouts/panel/modal.tsx +24 -30
- package/src/dataforms-layouts/panel/summary-button.tsx +92 -0
- package/src/dataforms-layouts/regular/index.tsx +9 -7
- package/src/dataforms-layouts/regular/style.scss +0 -6
- package/src/dataviews-layouts/grid/index.tsx +9 -14
- package/src/dataviews-layouts/grid/style.scss +1 -0
- package/src/dataviews-layouts/list/index.tsx +74 -2
- package/src/dataviews-layouts/list/style.scss +8 -0
- package/src/dataviews-layouts/picker-grid/index.tsx +9 -13
- package/src/dataviews-layouts/table/index.tsx +10 -14
- package/src/dataviews-layouts/utils/get-data-by-group.ts +18 -0
- package/src/field-types/index.tsx +5 -0
- package/src/field-types/password.tsx +46 -0
- package/src/field-types/stories/index.story.tsx +138 -1
- package/src/normalize-fields.ts +18 -0
- package/src/test/filter-and-sort-data-view.js +148 -138
- package/src/test/normalize-fields.ts +114 -0
- package/src/types.ts +74 -3
- package/src/validation.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/dataform-controls/utils/validated-text.js.map +0 -1
- package/build-module/dataform-controls/utils/validated-text.js +0 -70
- package/build-module/dataform-controls/utils/validated-text.js.map +0 -1
- package/build-types/dataform-controls/utils/validated-text.d.ts +0 -16
- package/build-types/dataform-controls/utils/validated-text.d.ts.map +0 -1
- package/src/dataform-controls/utils/validated-text.tsx +0 -96
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/dataviews/src/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tReactElement,\n\tReactNode,\n\tComponentType,\n\tComponentProps,\n} from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { SetSelection } from './private-types';\n\n/**\n * WordPress dependencies\n */\nimport type { useFocusOnMount } from '@wordpress/compose';\n\nexport type SortDirection = 'asc' | 'desc';\n\n/**\n * Generic option type.\n */\nexport interface Option< Value extends any = any > {\n\tvalue: Value;\n\tlabel: string;\n\tdescription?: string;\n}\n\nexport interface FilterByConfig {\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators?: Operator[];\n\n\t/**\n\t * Whether it is a primary filter.\n\t *\n\t * A primary filter is always visible and is not listed in the \"Add filter\" component,\n\t * except for the list layout where it behaves like a secondary filter.\n\t */\n\tisPrimary?: boolean;\n}\n\nexport interface NormalizedFilterByConfig {\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators: Operator[];\n\n\t/**\n\t * Whether it is a primary filter.\n\t *\n\t * A primary filter is always visible and is not listed in the \"Add filter\" component,\n\t * except for the list layout where it behaves like a secondary filter.\n\t */\n\tisPrimary?: boolean;\n}\n\ninterface FilterConfigForType {\n\t/**\n\t * What operators are used by default.\n\t */\n\tdefaultOperators: Operator[];\n\n\t/**\n\t * What operators are supported by the field.\n\t */\n\tvalidOperators: Operator[];\n}\n\nexport type Operator =\n\t| 'is'\n\t| 'isNot'\n\t| 'isAny'\n\t| 'isNone'\n\t| 'isAll'\n\t| 'isNotAll'\n\t| 'lessThan'\n\t| 'greaterThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThanOrEqual'\n\t| 'before'\n\t| 'after'\n\t| 'beforeInc'\n\t| 'afterInc'\n\t| 'contains'\n\t| 'notContains'\n\t| 'startsWith'\n\t| 'between'\n\t| 'on'\n\t| 'notOn'\n\t| 'inThePast'\n\t| 'over';\n\nexport type FieldType =\n\t| 'text'\n\t| 'integer'\n\t| 'datetime'\n\t| 'date'\n\t| 'media'\n\t| 'boolean'\n\t| 'email'\n\t| 'telephone'\n\t| 'color'\n\t| 'url'\n\t| 'array';\n\n/**\n * An abstract interface for Field based on the field type.\n */\nexport type FieldTypeDefinition< Item > = {\n\t/**\n\t * Callback used to sort the field.\n\t */\n\tsort: ( a: Item, b: Item, direction: SortDirection ) => number;\n\n\t/**\n\t * Callback used to validate the field.\n\t */\n\tisValid: Rules< Item >;\n\n\t/**\n\t * Callback used to render an edit control for the field or control name.\n\t */\n\tEdit: ComponentType< DataFormControlProps< Item > > | string | null;\n\n\t/**\n\t * Callback used to render the field.\n\t */\n\trender: ComponentType< DataViewRenderFieldProps< Item > >;\n\n\t/**\n\t * The filter config for the field.\n\t */\n\tfilterBy: FilterConfigForType | false;\n\n\t/**\n\t * Whether the field is readOnly.\n\t * If `true`, the value will be rendered using the `render` callback.\n\t */\n\treadOnly?: boolean;\n\n\t/**\n\t * Whether the field is sortable.\n\t */\n\tenableSorting: boolean;\n};\n\nexport type Rules< Item > = {\n\trequired?: boolean;\n\tcustom?: ( item: Item, field: NormalizedField< Item > ) => null | string;\n};\n\n/**\n * A dataview field for a specific property of a data type.\n */\nexport type Field< Item > = {\n\t/**\n\t * Type of the fields.\n\t */\n\ttype?: FieldType;\n\n\t/**\n\t * The unique identifier of the field.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the field. Defaults to the id.\n\t */\n\tlabel?: string;\n\n\t/**\n\t * The header of the field. Defaults to the label.\n\t * It allows the usage of a React Element to render the field labels.\n\t */\n\theader?: string | ReactElement;\n\n\t/**\n\t * A description of the field.\n\t */\n\tdescription?: string;\n\n\t/**\n\t * Placeholder for the field.\n\t */\n\tplaceholder?: string;\n\n\t/**\n\t * Callback used to render the field. Defaults to `field.getValue`.\n\t */\n\trender?: ComponentType< DataViewRenderFieldProps< Item > >;\n\n\t/**\n\t * Callback used to render an edit control for the field.\n\t */\n\tEdit?: ComponentType< DataFormControlProps< Item > > | string;\n\n\t/**\n\t * Callback used to sort the field.\n\t */\n\tsort?: ( a: Item, b: Item, direction: SortDirection ) => number;\n\n\t/**\n\t * Callback used to validate the field.\n\t */\n\tisValid?: Rules< Item >;\n\n\t/**\n\t * Callback used to decide if a field should be displayed.\n\t */\n\tisVisible?: ( item: Item ) => boolean;\n\n\t/**\n\t * Whether the field is sortable.\n\t */\n\tenableSorting?: boolean;\n\n\t/**\n\t * Whether the field is searchable.\n\t */\n\tenableGlobalSearch?: boolean;\n\n\t/**\n\t * Whether the field is filterable.\n\t */\n\tenableHiding?: boolean;\n\n\t/**\n\t * The list of options to pick from when using the field as a filter.\n\t */\n\telements?: Option[];\n\n\t/**\n\t * Filter config for the field.\n\t */\n\tfilterBy?: FilterByConfig | false;\n\n\t/**\n\t * Whether the field is readOnly.\n\t * If `true`, the value will be rendered using the `render` callback.\n\t */\n\treadOnly?: boolean;\n\n\t/**\n\t * Callback used to retrieve the value of the field from the item.\n\t * Defaults to `item[ field.id ]`.\n\t */\n\tgetValue?: ( args: { item: Item } ) => any;\n};\n\nexport type NormalizedField< Item > = Omit< Field< Item >, 'Edit' > & {\n\tlabel: string;\n\theader: string | ReactElement;\n\tgetValue: ( args: { item: Item } ) => any;\n\trender: ComponentType< DataViewRenderFieldProps< Item > >;\n\tEdit: ComponentType< DataFormControlProps< Item > > | null;\n\tsort: ( a: Item, b: Item, direction: SortDirection ) => number;\n\tisValid: Rules< Item >;\n\tenableHiding: boolean;\n\tenableSorting: boolean;\n\tfilterBy: NormalizedFilterByConfig | false;\n\treadOnly: boolean;\n};\n\n/**\n * A collection of dataview fields for a data type.\n */\nexport type Fields< Item > = Field< Item >[];\n\nexport type Data< Item > = Item[];\n\nexport type DataFormControlProps< Item > = {\n\tdata: Item;\n\tfield: NormalizedField< Item >;\n\tonChange: ( value: Record< string, any > ) => void;\n\thideLabelFromVision?: boolean;\n\t/**\n\t * The currently selected filter operator for this field.\n\t *\n\t * Used by DataViews filters to determine which control to render based on the operator type.\n\t */\n\toperator?: Operator;\n};\n\nexport type DataViewRenderFieldProps< Item > = {\n\titem: Item;\n\tfield: NormalizedField< Item >;\n\tconfig?: {\n\t\tsizes: string;\n\t};\n};\n\n/**\n * The filters applied to the dataset.\n */\nexport interface Filter {\n\t/**\n\t * The field to filter by.\n\t */\n\tfield: string;\n\n\t/**\n\t * The operator to use.\n\t */\n\toperator: Operator;\n\n\t/**\n\t * The value to filter by.\n\t */\n\tvalue: any;\n\n\t/**\n\t * Whether the filter can be edited by the user.\n\t */\n\tisLocked?: boolean;\n}\n\nexport interface NormalizedFilter {\n\t/**\n\t * The field to filter by.\n\t */\n\tfield: string;\n\n\t/**\n\t * The field name.\n\t */\n\tname: string;\n\n\t/**\n\t * The list of options to pick from when using the field as a filter.\n\t */\n\telements: Option[];\n\n\t/**\n\t * Is a single selection filter.\n\t */\n\tsingleSelection: boolean;\n\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators: Operator[];\n\n\t/**\n\t * Whether the filter is visible.\n\t */\n\tisVisible: boolean;\n\n\t/**\n\t * Whether it is a primary filter.\n\t */\n\tisPrimary: boolean;\n\n\t/**\n\t * Whether the filter can be edited by the user.\n\t */\n\tisLocked: boolean;\n}\n\ninterface ViewBase {\n\t/**\n\t * The layout of the view.\n\t */\n\ttype: string;\n\n\t/**\n\t * The global search term.\n\t */\n\tsearch?: string;\n\n\t/**\n\t * The filters to apply.\n\t */\n\tfilters?: Filter[];\n\n\t/**\n\t * The sorting configuration.\n\t */\n\tsort?: {\n\t\t/**\n\t\t * The field to sort by.\n\t\t */\n\t\tfield: string;\n\n\t\t/**\n\t\t * The direction to sort by.\n\t\t */\n\t\tdirection: SortDirection;\n\t};\n\n\t/**\n\t * The active page\n\t */\n\tpage?: number;\n\n\t/**\n\t * The number of items per page\n\t */\n\tperPage?: number;\n\n\t/**\n\t * The fields to render\n\t */\n\tfields?: string[];\n\n\t/**\n\t * Title field\n\t */\n\ttitleField?: string;\n\n\t/**\n\t * Media field\n\t */\n\tmediaField?: string;\n\n\t/**\n\t * Description field\n\t */\n\tdescriptionField?: string;\n\n\t/**\n\t * Whether to show the title\n\t */\n\tshowTitle?: boolean;\n\n\t/**\n\t * Whether to show the media\n\t */\n\tshowMedia?: boolean;\n\n\t/**\n\t * Whether to show the description\n\t */\n\tshowDescription?: boolean;\n\n\t/**\n\t * Whether to show the hierarchical levels.\n\t */\n\tshowLevels?: boolean;\n\n\t/**\n\t * The field to group by.\n\t */\n\tgroupByField?: string;\n\n\t/**\n\t * Whether infinite scroll is enabled.\n\t */\n\tinfiniteScrollEnabled?: boolean;\n}\n\nexport interface ColumnStyle {\n\t/**\n\t * The width of the field column.\n\t */\n\twidth?: string | number;\n\n\t/**\n\t * The minimum width of the field column.\n\t */\n\tmaxWidth?: string | number;\n\n\t/**\n\t * The maximum width of the field column.\n\t */\n\tminWidth?: string | number;\n\n\t/**\n\t * The alignment of the field column, defaults to left.\n\t */\n\talign?: 'start' | 'center' | 'end';\n}\n\nexport type Density = 'compact' | 'balanced' | 'comfortable';\n\nexport interface ViewTable extends ViewBase {\n\ttype: 'table';\n\n\tlayout?: {\n\t\t/**\n\t\t * The styles for the columns.\n\t\t */\n\t\tstyles?: Record< string, ColumnStyle >;\n\n\t\t/**\n\t\t * The density of the view.\n\t\t */\n\t\tdensity?: Density;\n\n\t\t/**\n\t\t * Whether the view allows column moving.\n\t\t */\n\t\tenableMoving?: boolean;\n\t};\n}\n\nexport interface ViewList extends ViewBase {\n\ttype: 'list';\n}\n\nexport interface ViewGrid extends ViewBase {\n\ttype: 'grid';\n\n\tlayout?: {\n\t\t/**\n\t\t * The fields to use as badge fields.\n\t\t */\n\t\tbadgeFields?: string[];\n\n\t\t/**\n\t\t * The preview size of the grid.\n\t\t */\n\t\tpreviewSize?: number;\n\t};\n}\n\nexport interface ViewPickerGrid extends ViewBase {\n\ttype: 'pickerGrid';\n\n\tlayout?: {\n\t\t/**\n\t\t * The fields to use as badge fields.\n\t\t */\n\t\tbadgeFields?: string[];\n\n\t\t/**\n\t\t * The preview size of the grid.\n\t\t */\n\t\tpreviewSize?: number;\n\t};\n}\n\nexport type View = ViewList | ViewGrid | ViewTable | ViewPickerGrid;\n\ninterface ActionBase< Item > {\n\t/**\n\t * The unique identifier of the action.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the action.\n\t * In case we want to adjust the label based on the selected items,\n\t * a function can be provided.\n\t */\n\tlabel: string | ( ( items: Item[] ) => string );\n\n\t/**\n\t * The icon of the action. (Either a string or an SVG element)\n\t * This should be IconType from the components package\n\t * but that import is breaking typescript build for the moment.\n\t */\n\ticon?: any;\n\n\t/**\n\t * Whether the action is disabled.\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Whether the action is destructive.\n\t */\n\tisDestructive?: boolean;\n\n\t/**\n\t * Whether the action is a primary action.\n\t */\n\tisPrimary?: boolean;\n\n\t/**\n\t * Whether the item passed as an argument supports the current action.\n\t */\n\tisEligible?: ( item: Item ) => boolean;\n\n\t/**\n\t * Whether the action can be used as a bulk action.\n\t */\n\tsupportsBulk?: boolean;\n\n\t/**\n\t * The context in which the action is visible.\n\t * This is only a \"meta\" information for now.\n\t */\n\tcontext?: 'list' | 'single';\n}\n\nexport interface RenderModalProps< Item > {\n\titems: Item[];\n\tcloseModal?: () => void;\n\tonActionPerformed?: ( items: Item[] ) => void;\n}\n\nexport interface ActionModal< Item > extends ActionBase< Item > {\n\t/**\n\t * Modal to render when the action is triggered.\n\t */\n\tRenderModal: ( {\n\t\titems,\n\t\tcloseModal,\n\t\tonActionPerformed,\n\t}: RenderModalProps< Item > ) => ReactElement;\n\n\t/**\n\t * Whether to hide the modal header.\n\t */\n\thideModalHeader?: boolean;\n\n\t/**\n\t * The header of the modal.\n\t */\n\tmodalHeader?: string;\n\n\t/**\n\t * The size of the modal.\n\t *\n\t * @default 'medium'\n\t */\n\tmodalSize?: 'small' | 'medium' | 'large' | 'fill';\n\n\t/**\n\t * The focus on mount property of the modal.\n\t */\n\tmodalFocusOnMount?:\n\t\t| Parameters< typeof useFocusOnMount >[ 0 ]\n\t\t| 'firstContentElement';\n}\n\nexport interface ActionButton< Item > extends ActionBase< Item > {\n\t/**\n\t * The callback to execute when the action is triggered.\n\t */\n\tcallback: (\n\t\titems: Item[],\n\t\tcontext: {\n\t\t\tregistry: any;\n\t\t\tonActionPerformed?: ( items: Item[] ) => void;\n\t\t}\n\t) => void;\n}\n\nexport type Action< Item > = ActionModal< Item > | ActionButton< Item >;\n\nexport interface ViewBaseProps< Item > {\n\tclassName?: string;\n\tactions: Action< Item >[];\n\tdata: Item[];\n\tfields: NormalizedField< Item >[];\n\tgetItemId: ( item: Item ) => string;\n\tgetItemLevel?: ( item: Item ) => number;\n\tisLoading?: boolean;\n\tonChangeView: ( view: View ) => void;\n\tonChangeSelection: SetSelection;\n\tselection: string[];\n\tsetOpenedFilter: ( fieldId: string ) => void;\n\tonClickItem?: ( item: Item ) => void;\n\trenderItemLink?: (\n\t\tprops: {\n\t\t\titem: Item;\n\t\t} & ComponentProps< 'a' >\n\t) => ReactElement;\n\tisItemClickable: ( item: Item ) => boolean;\n\tview: View;\n\tempty: ReactNode;\n}\n\nexport type ViewPickerBaseProps< Item > = Omit<\n\tViewBaseProps< Item >,\n\t| 'view'\n\t| 'onChangeView'\n\t// The following props are not supported for pickers.\n\t| 'isItemClickable'\n\t| 'onClickItem'\n\t| 'renderItemLink'\n\t| 'getItemLevel'\n> & {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n};\n\nexport interface ViewTableProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewTable;\n}\n\nexport interface ViewListProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewList;\n}\n\nexport interface ViewGridProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewGrid;\n}\n\nexport interface ViewPickerGridProps< Item >\n\textends Omit< ViewPickerBaseProps< Item >, 'view' > {\n\tview: ViewPickerGrid;\n}\n\nexport type ViewProps< Item > =\n\t| ViewTableProps< Item >\n\t| ViewGridProps< Item >\n\t| ViewListProps< Item >;\n\nexport type ViewPickerProps< Item > = ViewPickerGridProps< Item >;\n\nexport interface SupportedLayouts {\n\tlist?: Omit< ViewList, 'type' >;\n\tgrid?: Omit< ViewGrid, 'type' >;\n\ttable?: Omit< ViewTable, 'type' >;\n\tpickerGrid?: Omit< ViewPickerGrid, 'type' >;\n}\n\n/**\n * DataForm layouts.\n */\nexport type LayoutType = 'regular' | 'panel' | 'card' | 'row';\nexport type LabelPosition = 'top' | 'side' | 'none';\n\nexport type RegularLayout = {\n\ttype: 'regular';\n\tlabelPosition?: LabelPosition;\n};\nexport type NormalizedRegularLayout = {\n\ttype: 'regular';\n\tlabelPosition: LabelPosition;\n};\n\nexport type PanelLayout = {\n\ttype: 'panel';\n\tlabelPosition?: LabelPosition;\n\topenAs?: 'dropdown' | 'modal';\n};\nexport type NormalizedPanelLayout = {\n\ttype: 'panel';\n\tlabelPosition: LabelPosition;\n\topenAs: 'dropdown' | 'modal';\n};\n\nexport type CardLayout =\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: false;\n\t\t\t// isOpened cannot be false if withHeader is false as well.\n\t\t\t// Otherwise, the card would not be visible.\n\t\t\tisOpened?: true;\n\t }\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader?: true | undefined;\n\t\t\tisOpened?: boolean;\n\t };\nexport type NormalizedCardLayout =\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: false;\n\t\t\t// isOpened cannot be false if withHeader is false as well.\n\t\t\t// Otherwise, the card would not be visible.\n\t\t\tisOpened: true;\n\t }\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: true;\n\t\t\tisOpened: boolean;\n\t };\n\nexport type RowLayout = {\n\ttype: 'row';\n\talignment?: 'start' | 'center' | 'end';\n};\nexport type NormalizedRowLayout = {\n\ttype: 'row';\n\talignment: 'start' | 'center' | 'end';\n};\n\nexport type Layout = RegularLayout | PanelLayout | CardLayout | RowLayout;\nexport type NormalizedLayout =\n\t| NormalizedRegularLayout\n\t| NormalizedPanelLayout\n\t| NormalizedCardLayout\n\t| NormalizedRowLayout;\n\nexport type SimpleFormField = {\n\tid: string;\n\tlayout?: Layout;\n};\n\nexport type CombinedFormField = {\n\tid: string;\n\tlabel?: string;\n\tdescription?: string;\n\tlayout?: Layout;\n\tchildren: Array< FormField | string >;\n};\n\nexport type FormField = SimpleFormField | CombinedFormField;\n\n/**\n * The form configuration.\n */\nexport type Form = {\n\tlayout?: Layout;\n\tfields?: Array< FormField | string >;\n};\n\nexport interface DataFormProps< Item > {\n\tdata: Item;\n\tfields: Field< Item >[];\n\tform: Form;\n\tonChange: ( value: Record< string, any > ) => void;\n}\n\nexport interface FieldLayoutProps< Item > {\n\tdata: Item;\n\tfield: FormField;\n\tonChange: ( value: any ) => void;\n\thideLabelFromVision?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/dataviews/src/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tReactElement,\n\tReactNode,\n\tComponentType,\n\tComponentProps,\n} from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { SetSelection } from './private-types';\n\n/**\n * WordPress dependencies\n */\nimport type { useFocusOnMount } from '@wordpress/compose';\n\n/**\n * Utility type that makes all properties of T optional recursively.\n * Used by field setValue functions to allow partial item updates.\n */\nexport type DeepPartial< T > = {\n\t[ P in keyof T ]?: T[ P ] extends object ? DeepPartial< T[ P ] > : T[ P ];\n};\n\nexport type SortDirection = 'asc' | 'desc';\n\n/**\n * Generic option type.\n */\nexport interface Option< Value extends any = any > {\n\tvalue: Value;\n\tlabel: string;\n\tdescription?: string;\n}\n\nexport interface FilterByConfig {\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators?: Operator[];\n\n\t/**\n\t * Whether it is a primary filter.\n\t *\n\t * A primary filter is always visible and is not listed in the \"Add filter\" component,\n\t * except for the list layout where it behaves like a secondary filter.\n\t */\n\tisPrimary?: boolean;\n}\n\nexport interface NormalizedFilterByConfig {\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators: Operator[];\n\n\t/**\n\t * Whether it is a primary filter.\n\t *\n\t * A primary filter is always visible and is not listed in the \"Add filter\" component,\n\t * except for the list layout where it behaves like a secondary filter.\n\t */\n\tisPrimary?: boolean;\n}\n\ninterface FilterConfigForType {\n\t/**\n\t * What operators are used by default.\n\t */\n\tdefaultOperators: Operator[];\n\n\t/**\n\t * What operators are supported by the field.\n\t */\n\tvalidOperators: Operator[];\n}\n\nexport type Operator =\n\t| 'is'\n\t| 'isNot'\n\t| 'isAny'\n\t| 'isNone'\n\t| 'isAll'\n\t| 'isNotAll'\n\t| 'lessThan'\n\t| 'greaterThan'\n\t| 'lessThanOrEqual'\n\t| 'greaterThanOrEqual'\n\t| 'before'\n\t| 'after'\n\t| 'beforeInc'\n\t| 'afterInc'\n\t| 'contains'\n\t| 'notContains'\n\t| 'startsWith'\n\t| 'between'\n\t| 'on'\n\t| 'notOn'\n\t| 'inThePast'\n\t| 'over';\n\nexport type FieldType =\n\t| 'text'\n\t| 'integer'\n\t| 'datetime'\n\t| 'date'\n\t| 'media'\n\t| 'boolean'\n\t| 'email'\n\t| 'password'\n\t| 'telephone'\n\t| 'color'\n\t| 'url'\n\t| 'array';\n\n/**\n * An abstract interface for Field based on the field type.\n */\nexport type FieldTypeDefinition< Item > = {\n\t/**\n\t * Callback used to sort the field.\n\t */\n\tsort: ( a: Item, b: Item, direction: SortDirection ) => number;\n\n\t/**\n\t * Callback used to validate the field.\n\t */\n\tisValid: Rules< Item >;\n\n\t/**\n\t * Callback used to render an edit control for the field or control name.\n\t */\n\tEdit:\n\t\t| ComponentType< DataFormControlProps< Item > >\n\t\t| string\n\t\t| EditConfig\n\t\t| null;\n\n\t/**\n\t * Callback used to render the field.\n\t */\n\trender: ComponentType< DataViewRenderFieldProps< Item > >;\n\n\t/**\n\t * The filter config for the field.\n\t */\n\tfilterBy: FilterConfigForType | false;\n\n\t/**\n\t * Whether the field is readOnly.\n\t * If `true`, the value will be rendered using the `render` callback.\n\t */\n\treadOnly?: boolean;\n\n\t/**\n\t * Whether the field is sortable.\n\t */\n\tenableSorting: boolean;\n};\n\nexport type Rules< Item > = {\n\trequired?: boolean;\n\tcustom?: ( item: Item, field: NormalizedField< Item > ) => null | string;\n};\n\n/**\n * Edit configuration for textarea controls.\n */\nexport type EditConfigTextarea = {\n\tcontrol: 'textarea';\n\t/**\n\t * Number of rows for the textarea.\n\t */\n\trows?: number;\n};\n\n/**\n * Edit configuration for text controls.\n */\nexport type EditConfigText = {\n\tcontrol: 'text';\n\t/**\n\t * Prefix component to display before the input.\n\t */\n\tprefix?: React.ComponentType;\n\t/**\n\t * Suffix component to display after the input.\n\t */\n\tsuffix?: React.ComponentType;\n};\n\n/**\n * Edit configuration for other control types (excluding 'text' and 'textarea').\n */\nexport type EditConfigGeneric = {\n\tcontrol: Exclude< FieldType, 'text' | 'textarea' >;\n};\n\n/**\n * Edit configuration object with type-safe control options.\n * Each control type has its own specific configuration properties.\n */\nexport type EditConfig =\n\t| EditConfigTextarea\n\t| EditConfigText\n\t| EditConfigGeneric;\n\n/**\n * A dataview field for a specific property of a data type.\n */\nexport type Field< Item > = {\n\t/**\n\t * Type of the fields.\n\t */\n\ttype?: FieldType;\n\n\t/**\n\t * The unique identifier of the field.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the field. Defaults to the id.\n\t */\n\tlabel?: string;\n\n\t/**\n\t * The header of the field. Defaults to the label.\n\t * It allows the usage of a React Element to render the field labels.\n\t */\n\theader?: string | ReactElement;\n\n\t/**\n\t * A description of the field.\n\t */\n\tdescription?: string;\n\n\t/**\n\t * Placeholder for the field.\n\t */\n\tplaceholder?: string;\n\n\t/**\n\t * Callback used to render the field. Defaults to `field.getValue`.\n\t */\n\trender?: ComponentType< DataViewRenderFieldProps< Item > >;\n\n\t/**\n\t * Callback used to render an edit control for the field.\n\t */\n\tEdit?: ComponentType< DataFormControlProps< Item > > | string | EditConfig;\n\n\t/**\n\t * Callback used to sort the field.\n\t */\n\tsort?: ( a: Item, b: Item, direction: SortDirection ) => number;\n\n\t/**\n\t * Callback used to validate the field.\n\t */\n\tisValid?: Rules< Item >;\n\n\t/**\n\t * Callback used to decide if a field should be displayed.\n\t */\n\tisVisible?: ( item: Item ) => boolean;\n\n\t/**\n\t * Whether the field is sortable.\n\t */\n\tenableSorting?: boolean;\n\n\t/**\n\t * Whether the field is searchable.\n\t */\n\tenableGlobalSearch?: boolean;\n\n\t/**\n\t * Whether the field is filterable.\n\t */\n\tenableHiding?: boolean;\n\n\t/**\n\t * The list of options to pick from when using the field as a filter.\n\t */\n\telements?: Option[];\n\n\t/**\n\t * Filter config for the field.\n\t */\n\tfilterBy?: FilterByConfig | false;\n\n\t/**\n\t * Whether the field is readOnly.\n\t * If `true`, the value will be rendered using the `render` callback.\n\t */\n\treadOnly?: boolean;\n\n\t/**\n\t * Callback used to retrieve the value of the field from the item.\n\t * Defaults to `item[ field.id ]`.\n\t */\n\tgetValue?: ( args: { item: Item } ) => any;\n\n\t/**\n\t * Callback used to set the value of the field on the item.\n\t * Used for editing operations to update field values.\n\t */\n\tsetValue?: ( args: { item: Item; value: any } ) => DeepPartial< Item >;\n};\n\nexport type NormalizedField< Item > = Omit< Field< Item >, 'Edit' > & {\n\tlabel: string;\n\theader: string | ReactElement;\n\tgetValue: ( args: { item: Item } ) => any;\n\tsetValue: ( args: { item: Item; value: any } ) => DeepPartial< Item >;\n\trender: ComponentType< DataViewRenderFieldProps< Item > >;\n\tEdit: ComponentType< DataFormControlProps< Item > > | null;\n\tsort: ( a: Item, b: Item, direction: SortDirection ) => number;\n\tisValid: Rules< Item >;\n\tenableHiding: boolean;\n\tenableSorting: boolean;\n\tfilterBy: NormalizedFilterByConfig | false;\n\treadOnly: boolean;\n};\n\n/**\n * A collection of dataview fields for a data type.\n */\nexport type Fields< Item > = Field< Item >[];\n\nexport type Data< Item > = Item[];\n\nexport type DataFormControlProps< Item > = {\n\tdata: Item;\n\tfield: NormalizedField< Item >;\n\tonChange: ( value: DeepPartial< Item > ) => void;\n\thideLabelFromVision?: boolean;\n\t/**\n\t * The currently selected filter operator for this field.\n\t *\n\t * Used by DataViews filters to determine which control to render based on the operator type.\n\t */\n\toperator?: Operator;\n\t/**\n\t * Configuration object for the control.\n\t */\n\tconfig?: {\n\t\tprefix?: React.ComponentType;\n\t\tsuffix?: React.ComponentType;\n\t\trows?: number;\n\t};\n};\n\nexport type DataViewRenderFieldProps< Item > = {\n\titem: Item;\n\tfield: NormalizedField< Item >;\n\tconfig?: {\n\t\tsizes: string;\n\t};\n};\n\n/**\n * The filters applied to the dataset.\n */\nexport interface Filter {\n\t/**\n\t * The field to filter by.\n\t */\n\tfield: string;\n\n\t/**\n\t * The operator to use.\n\t */\n\toperator: Operator;\n\n\t/**\n\t * The value to filter by.\n\t */\n\tvalue: any;\n\n\t/**\n\t * Whether the filter can be edited by the user.\n\t */\n\tisLocked?: boolean;\n}\n\nexport interface NormalizedFilter {\n\t/**\n\t * The field to filter by.\n\t */\n\tfield: string;\n\n\t/**\n\t * The field name.\n\t */\n\tname: string;\n\n\t/**\n\t * The list of options to pick from when using the field as a filter.\n\t */\n\telements: Option[];\n\n\t/**\n\t * Is a single selection filter.\n\t */\n\tsingleSelection: boolean;\n\n\t/**\n\t * The list of operators supported by the field.\n\t */\n\toperators: Operator[];\n\n\t/**\n\t * Whether the filter is visible.\n\t */\n\tisVisible: boolean;\n\n\t/**\n\t * Whether it is a primary filter.\n\t */\n\tisPrimary: boolean;\n\n\t/**\n\t * Whether the filter can be edited by the user.\n\t */\n\tisLocked: boolean;\n}\n\ninterface ViewBase {\n\t/**\n\t * The layout of the view.\n\t */\n\ttype: string;\n\n\t/**\n\t * The global search term.\n\t */\n\tsearch?: string;\n\n\t/**\n\t * The filters to apply.\n\t */\n\tfilters?: Filter[];\n\n\t/**\n\t * The sorting configuration.\n\t */\n\tsort?: {\n\t\t/**\n\t\t * The field to sort by.\n\t\t */\n\t\tfield: string;\n\n\t\t/**\n\t\t * The direction to sort by.\n\t\t */\n\t\tdirection: SortDirection;\n\t};\n\n\t/**\n\t * The active page\n\t */\n\tpage?: number;\n\n\t/**\n\t * The number of items per page\n\t */\n\tperPage?: number;\n\n\t/**\n\t * The fields to render\n\t */\n\tfields?: string[];\n\n\t/**\n\t * Title field\n\t */\n\ttitleField?: string;\n\n\t/**\n\t * Media field\n\t */\n\tmediaField?: string;\n\n\t/**\n\t * Description field\n\t */\n\tdescriptionField?: string;\n\n\t/**\n\t * Whether to show the title\n\t */\n\tshowTitle?: boolean;\n\n\t/**\n\t * Whether to show the media\n\t */\n\tshowMedia?: boolean;\n\n\t/**\n\t * Whether to show the description\n\t */\n\tshowDescription?: boolean;\n\n\t/**\n\t * Whether to show the hierarchical levels.\n\t */\n\tshowLevels?: boolean;\n\n\t/**\n\t * The field to group by.\n\t */\n\tgroupByField?: string;\n\n\t/**\n\t * Whether infinite scroll is enabled.\n\t */\n\tinfiniteScrollEnabled?: boolean;\n}\n\nexport interface ColumnStyle {\n\t/**\n\t * The width of the field column.\n\t */\n\twidth?: string | number;\n\n\t/**\n\t * The minimum width of the field column.\n\t */\n\tmaxWidth?: string | number;\n\n\t/**\n\t * The maximum width of the field column.\n\t */\n\tminWidth?: string | number;\n\n\t/**\n\t * The alignment of the field column, defaults to left.\n\t */\n\talign?: 'start' | 'center' | 'end';\n}\n\nexport type Density = 'compact' | 'balanced' | 'comfortable';\n\nexport interface ViewTable extends ViewBase {\n\ttype: 'table';\n\n\tlayout?: {\n\t\t/**\n\t\t * The styles for the columns.\n\t\t */\n\t\tstyles?: Record< string, ColumnStyle >;\n\n\t\t/**\n\t\t * The density of the view.\n\t\t */\n\t\tdensity?: Density;\n\n\t\t/**\n\t\t * Whether the view allows column moving.\n\t\t */\n\t\tenableMoving?: boolean;\n\t};\n}\n\nexport interface ViewList extends ViewBase {\n\ttype: 'list';\n}\n\nexport interface ViewGrid extends ViewBase {\n\ttype: 'grid';\n\n\tlayout?: {\n\t\t/**\n\t\t * The fields to use as badge fields.\n\t\t */\n\t\tbadgeFields?: string[];\n\n\t\t/**\n\t\t * The preview size of the grid.\n\t\t */\n\t\tpreviewSize?: number;\n\t};\n}\n\nexport interface ViewPickerGrid extends ViewBase {\n\ttype: 'pickerGrid';\n\n\tlayout?: {\n\t\t/**\n\t\t * The fields to use as badge fields.\n\t\t */\n\t\tbadgeFields?: string[];\n\n\t\t/**\n\t\t * The preview size of the grid.\n\t\t */\n\t\tpreviewSize?: number;\n\t};\n}\n\nexport type View = ViewList | ViewGrid | ViewTable | ViewPickerGrid;\n\ninterface ActionBase< Item > {\n\t/**\n\t * The unique identifier of the action.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the action.\n\t * In case we want to adjust the label based on the selected items,\n\t * a function can be provided.\n\t */\n\tlabel: string | ( ( items: Item[] ) => string );\n\n\t/**\n\t * The icon of the action. (Either a string or an SVG element)\n\t * This should be IconType from the components package\n\t * but that import is breaking typescript build for the moment.\n\t */\n\ticon?: any;\n\n\t/**\n\t * Whether the action is disabled.\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Whether the action is destructive.\n\t */\n\tisDestructive?: boolean;\n\n\t/**\n\t * Whether the action is a primary action.\n\t */\n\tisPrimary?: boolean;\n\n\t/**\n\t * Whether the item passed as an argument supports the current action.\n\t */\n\tisEligible?: ( item: Item ) => boolean;\n\n\t/**\n\t * Whether the action can be used as a bulk action.\n\t */\n\tsupportsBulk?: boolean;\n\n\t/**\n\t * The context in which the action is visible.\n\t * This is only a \"meta\" information for now.\n\t */\n\tcontext?: 'list' | 'single';\n}\n\nexport interface RenderModalProps< Item > {\n\titems: Item[];\n\tcloseModal?: () => void;\n\tonActionPerformed?: ( items: Item[] ) => void;\n}\n\nexport interface ActionModal< Item > extends ActionBase< Item > {\n\t/**\n\t * Modal to render when the action is triggered.\n\t */\n\tRenderModal: ( {\n\t\titems,\n\t\tcloseModal,\n\t\tonActionPerformed,\n\t}: RenderModalProps< Item > ) => ReactElement;\n\n\t/**\n\t * Whether to hide the modal header.\n\t */\n\thideModalHeader?: boolean;\n\n\t/**\n\t * The header of the modal.\n\t */\n\tmodalHeader?: string;\n\n\t/**\n\t * The size of the modal.\n\t *\n\t * @default 'medium'\n\t */\n\tmodalSize?: 'small' | 'medium' | 'large' | 'fill';\n\n\t/**\n\t * The focus on mount property of the modal.\n\t */\n\tmodalFocusOnMount?:\n\t\t| Parameters< typeof useFocusOnMount >[ 0 ]\n\t\t| 'firstContentElement';\n}\n\nexport interface ActionButton< Item > extends ActionBase< Item > {\n\t/**\n\t * The callback to execute when the action is triggered.\n\t */\n\tcallback: (\n\t\titems: Item[],\n\t\tcontext: {\n\t\t\tregistry: any;\n\t\t\tonActionPerformed?: ( items: Item[] ) => void;\n\t\t}\n\t) => void;\n}\n\nexport type Action< Item > = ActionModal< Item > | ActionButton< Item >;\n\nexport interface ViewBaseProps< Item > {\n\tclassName?: string;\n\tactions: Action< Item >[];\n\tdata: Item[];\n\tfields: NormalizedField< Item >[];\n\tgetItemId: ( item: Item ) => string;\n\tgetItemLevel?: ( item: Item ) => number;\n\tisLoading?: boolean;\n\tonChangeView: ( view: View ) => void;\n\tonChangeSelection: SetSelection;\n\tselection: string[];\n\tsetOpenedFilter: ( fieldId: string ) => void;\n\tonClickItem?: ( item: Item ) => void;\n\trenderItemLink?: (\n\t\tprops: {\n\t\t\titem: Item;\n\t\t} & ComponentProps< 'a' >\n\t) => ReactElement;\n\tisItemClickable: ( item: Item ) => boolean;\n\tview: View;\n\tempty: ReactNode;\n}\n\nexport type ViewPickerBaseProps< Item > = Omit<\n\tViewBaseProps< Item >,\n\t| 'view'\n\t| 'onChangeView'\n\t// The following props are not supported for pickers.\n\t| 'isItemClickable'\n\t| 'onClickItem'\n\t| 'renderItemLink'\n\t| 'getItemLevel'\n> & {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n};\n\nexport interface ViewTableProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewTable;\n}\n\nexport interface ViewListProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewList;\n}\n\nexport interface ViewGridProps< Item > extends ViewBaseProps< Item > {\n\tview: ViewGrid;\n}\n\nexport interface ViewPickerGridProps< Item >\n\textends Omit< ViewPickerBaseProps< Item >, 'view' > {\n\tview: ViewPickerGrid;\n}\n\nexport type ViewProps< Item > =\n\t| ViewTableProps< Item >\n\t| ViewGridProps< Item >\n\t| ViewListProps< Item >;\n\nexport type ViewPickerProps< Item > = ViewPickerGridProps< Item >;\n\nexport interface SupportedLayouts {\n\tlist?: Omit< ViewList, 'type' >;\n\tgrid?: Omit< ViewGrid, 'type' >;\n\ttable?: Omit< ViewTable, 'type' >;\n\tpickerGrid?: Omit< ViewPickerGrid, 'type' >;\n}\n\n/**\n * DataForm layouts.\n */\nexport type LayoutType = 'regular' | 'panel' | 'card' | 'row';\nexport type LabelPosition = 'top' | 'side' | 'none';\n\nexport type RegularLayout = {\n\ttype: 'regular';\n\tlabelPosition?: LabelPosition;\n};\nexport type NormalizedRegularLayout = {\n\ttype: 'regular';\n\tlabelPosition: LabelPosition;\n};\n\nexport type PanelLayout = {\n\ttype: 'panel';\n\tlabelPosition?: LabelPosition;\n\topenAs?: 'dropdown' | 'modal';\n};\nexport type NormalizedPanelLayout = {\n\ttype: 'panel';\n\tlabelPosition: LabelPosition;\n\topenAs: 'dropdown' | 'modal';\n};\n\nexport type CardLayout =\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: false;\n\t\t\t// isOpened cannot be false if withHeader is false as well.\n\t\t\t// Otherwise, the card would not be visible.\n\t\t\tisOpened?: true;\n\t }\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader?: true | undefined;\n\t\t\tisOpened?: boolean;\n\t };\nexport type NormalizedCardLayout =\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: false;\n\t\t\t// isOpened cannot be false if withHeader is false as well.\n\t\t\t// Otherwise, the card would not be visible.\n\t\t\tisOpened: true;\n\t }\n\t| {\n\t\t\ttype: 'card';\n\t\t\twithHeader: true;\n\t\t\tisOpened: boolean;\n\t };\n\nexport type RowLayout = {\n\ttype: 'row';\n\talignment?: 'start' | 'center' | 'end';\n};\nexport type NormalizedRowLayout = {\n\ttype: 'row';\n\talignment: 'start' | 'center' | 'end';\n};\n\nexport type Layout = RegularLayout | PanelLayout | CardLayout | RowLayout;\nexport type NormalizedLayout =\n\t| NormalizedRegularLayout\n\t| NormalizedPanelLayout\n\t| NormalizedCardLayout\n\t| NormalizedRowLayout;\n\nexport type SimpleFormField = {\n\tid: string;\n\tlayout?: Layout;\n};\n\nexport type CombinedFormField = {\n\tid: string;\n\tlabel?: string;\n\tdescription?: string;\n\tlayout?: Layout;\n\tchildren: Array< FormField | string >;\n\tsummary?: string | string[];\n};\n\nexport type FormField = SimpleFormField | CombinedFormField;\n\n/**\n * The form configuration.\n */\nexport type Form = {\n\tlayout?: Layout;\n\tfields?: Array< FormField | string >;\n};\n\nexport interface DataFormProps< Item > {\n\tdata: Item;\n\tfields: Field< Item >[];\n\tform: Form;\n\tonChange: ( value: Record< string, any > ) => void;\n}\n\nexport interface FieldLayoutProps< Item > {\n\tdata: Item;\n\tfield: FormField;\n\tonChange: ( value: any ) => void;\n\thideLabelFromVision?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -21,7 +21,7 @@ export function isItemValid(item, fields, form) {
|
|
|
21
21
|
item
|
|
22
22
|
});
|
|
23
23
|
if (field.isValid.required) {
|
|
24
|
-
if (field.type === 'text' && isEmptyNullOrUndefined(value) || field.type === 'email' && isEmptyNullOrUndefined(value) || field.type === 'url' && isEmptyNullOrUndefined(value) || field.type === 'telephone' && isEmptyNullOrUndefined(value) || field.type === 'integer' && isEmptyNullOrUndefined(value) || field.type === undefined && isEmptyNullOrUndefined(value)) {
|
|
24
|
+
if (field.type === 'text' && isEmptyNullOrUndefined(value) || field.type === 'email' && isEmptyNullOrUndefined(value) || field.type === 'url' && isEmptyNullOrUndefined(value) || field.type === 'telephone' && isEmptyNullOrUndefined(value) || field.type === 'password' && isEmptyNullOrUndefined(value) || field.type === 'integer' && isEmptyNullOrUndefined(value) || field.type === undefined && isEmptyNullOrUndefined(value)) {
|
|
25
25
|
return false;
|
|
26
26
|
}
|
|
27
27
|
if (field.type === 'boolean' && value !== true) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["normalizeFields","isItemValid","item","fields","form","_fields","filter","id","includes","isEmptyNullOrUndefined","value","undefined","every","field","getValue","isValid","required","type","custom"],"sources":["@wordpress/dataviews/src/validation.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { normalizeFields } from './normalize-fields';\nimport type { Field, Form } from './types';\n\n/**\n * Whether or not the given item's value is valid according to the fields and form config.\n *\n * @param item The item to validate.\n * @param fields Fields config.\n * @param form Form config.\n *\n * @return A boolean indicating if the item is valid (true) or not (false).\n */\nexport function isItemValid< Item >(\n\titem: Item,\n\tfields: Field< Item >[],\n\tform: Form\n): boolean {\n\tconst _fields = normalizeFields(\n\t\tfields.filter( ( { id } ) => !! form.fields?.includes( id ) )\n\t);\n\n\tconst isEmptyNullOrUndefined = ( value: any ) =>\n\t\t[ undefined, '', null ].includes( value );\n\n\treturn _fields.every( ( field ) => {\n\t\tconst value = field.getValue( { item } );\n\n\t\tif ( field.isValid.required ) {\n\t\t\tif (\n\t\t\t\t( field.type === 'text' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'email' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'url' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'telephone' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'integer' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === undefined && isEmptyNullOrUndefined( value ) )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( field.type === 'boolean' && value !== true ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\ttypeof field.isValid.custom === 'function' &&\n\t\t\tfield.isValid.custom( item, field ) !== null\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,oBAAoB;AAGpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAC1BC,IAAU,EACVC,MAAuB,EACvBC,IAAU,EACA;EACV,MAAMC,OAAO,GAAGL,eAAe,CAC9BG,MAAM,CAACG,MAAM,CAAE,CAAE;IAAEC;EAAG,CAAC,KAAM,CAAC,CAAEH,IAAI,CAACD,MAAM,EAAEK,QAAQ,CAAED,EAAG,CAAE,CAC7D,CAAC;EAED,MAAME,sBAAsB,GAAKC,KAAU,IAC1C,CAAEC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAE,CAACH,QAAQ,CAAEE,KAAM,CAAC;EAE1C,OAAOL,OAAO,CAACO,KAAK,CAAIC,KAAK,IAAM;IAClC,MAAMH,KAAK,GAAGG,KAAK,CAACC,QAAQ,CAAE;MAAEZ;IAAK,CAAE,CAAC;IAExC,IAAKW,KAAK,CAACE,OAAO,CAACC,QAAQ,EAAG;MAC7B,IACGH,KAAK,CAACI,IAAI,KAAK,MAAM,IAAIR,sBAAsB,CAAEC,KAAM,CAAC,IACxDG,KAAK,CAACI,IAAI,KAAK,OAAO,IAAIR,sBAAsB,CAAEC,KAAM,CAAG,IAC3DG,KAAK,CAACI,IAAI,KAAK,KAAK,IAAIR,sBAAsB,CAAEC,KAAM,CAAG,IACzDG,KAAK,CAACI,IAAI,KAAK,WAAW,IAC3BR,sBAAsB,CAAEC,KAAM,CAAG,IAChCG,KAAK,CAACI,IAAI,KAAK,SAAS,IACzBR,sBAAsB,CAAEC,KAAM,CAAG,IAChCG,KAAK,CAACI,IAAI,KAAKN,SAAS,IAAIF,sBAAsB,CAAEC,KAAM,CAAG,EAC9D;QACD,OAAO,KAAK;MACb;MAEA,IAAKG,KAAK,CAACI,IAAI,KAAK,SAAS,IAAIP,KAAK,KAAK,IAAI,EAAG;QACjD,OAAO,KAAK;MACb;IACD;IAEA,IACC,OAAOG,KAAK,CAACE,OAAO,CAACG,MAAM,KAAK,UAAU,IAC1CL,KAAK,CAACE,OAAO,CAACG,MAAM,CAAEhB,IAAI,EAAEW,KAAM,CAAC,KAAK,IAAI,EAC3C;MACD,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAE,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["normalizeFields","isItemValid","item","fields","form","_fields","filter","id","includes","isEmptyNullOrUndefined","value","undefined","every","field","getValue","isValid","required","type","custom"],"sources":["@wordpress/dataviews/src/validation.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { normalizeFields } from './normalize-fields';\nimport type { Field, Form } from './types';\n\n/**\n * Whether or not the given item's value is valid according to the fields and form config.\n *\n * @param item The item to validate.\n * @param fields Fields config.\n * @param form Form config.\n *\n * @return A boolean indicating if the item is valid (true) or not (false).\n */\nexport function isItemValid< Item >(\n\titem: Item,\n\tfields: Field< Item >[],\n\tform: Form\n): boolean {\n\tconst _fields = normalizeFields(\n\t\tfields.filter( ( { id } ) => !! form.fields?.includes( id ) )\n\t);\n\n\tconst isEmptyNullOrUndefined = ( value: any ) =>\n\t\t[ undefined, '', null ].includes( value );\n\n\treturn _fields.every( ( field ) => {\n\t\tconst value = field.getValue( { item } );\n\n\t\tif ( field.isValid.required ) {\n\t\t\tif (\n\t\t\t\t( field.type === 'text' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'email' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'url' && isEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'telephone' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'password' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === 'integer' &&\n\t\t\t\t\tisEmptyNullOrUndefined( value ) ) ||\n\t\t\t\t( field.type === undefined && isEmptyNullOrUndefined( value ) )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( field.type === 'boolean' && value !== true ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\ttypeof field.isValid.custom === 'function' &&\n\t\t\tfield.isValid.custom( item, field ) !== null\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,oBAAoB;AAGpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAC1BC,IAAU,EACVC,MAAuB,EACvBC,IAAU,EACA;EACV,MAAMC,OAAO,GAAGL,eAAe,CAC9BG,MAAM,CAACG,MAAM,CAAE,CAAE;IAAEC;EAAG,CAAC,KAAM,CAAC,CAAEH,IAAI,CAACD,MAAM,EAAEK,QAAQ,CAAED,EAAG,CAAE,CAC7D,CAAC;EAED,MAAME,sBAAsB,GAAKC,KAAU,IAC1C,CAAEC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAE,CAACH,QAAQ,CAAEE,KAAM,CAAC;EAE1C,OAAOL,OAAO,CAACO,KAAK,CAAIC,KAAK,IAAM;IAClC,MAAMH,KAAK,GAAGG,KAAK,CAACC,QAAQ,CAAE;MAAEZ;IAAK,CAAE,CAAC;IAExC,IAAKW,KAAK,CAACE,OAAO,CAACC,QAAQ,EAAG;MAC7B,IACGH,KAAK,CAACI,IAAI,KAAK,MAAM,IAAIR,sBAAsB,CAAEC,KAAM,CAAC,IACxDG,KAAK,CAACI,IAAI,KAAK,OAAO,IAAIR,sBAAsB,CAAEC,KAAM,CAAG,IAC3DG,KAAK,CAACI,IAAI,KAAK,KAAK,IAAIR,sBAAsB,CAAEC,KAAM,CAAG,IACzDG,KAAK,CAACI,IAAI,KAAK,WAAW,IAC3BR,sBAAsB,CAAEC,KAAM,CAAG,IAChCG,KAAK,CAACI,IAAI,KAAK,UAAU,IAC1BR,sBAAsB,CAAEC,KAAM,CAAG,IAChCG,KAAK,CAACI,IAAI,KAAK,SAAS,IACzBR,sBAAsB,CAAEC,KAAM,CAAG,IAChCG,KAAK,CAACI,IAAI,KAAKN,SAAS,IAAIF,sBAAsB,CAAEC,KAAM,CAAG,EAC9D;QACD,OAAO,KAAK;MACb;MAEA,IAAKG,KAAK,CAACI,IAAI,KAAK,SAAS,IAAIP,KAAK,KAAK,IAAI,EAAG;QACjD,OAAO,KAAK;MACb;IACD;IAEA,IACC,OAAOG,KAAK,CAACE,OAAO,CAACG,MAAM,KAAK,UAAU,IAC1CL,KAAK,CAACE,OAAO,CAACG,MAAM,CAAEhB,IAAI,EAAEW,KAAM,CAAC,KAAK,IAAI,EAC3C;MACD,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAE,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1131,6 +1131,7 @@
|
|
|
1131
1131
|
aspect-ratio: 1/1;
|
|
1132
1132
|
background-color: #fff;
|
|
1133
1133
|
border-radius: 4px;
|
|
1134
|
+
overflow: hidden;
|
|
1134
1135
|
position: relative;
|
|
1135
1136
|
}
|
|
1136
1137
|
.dataviews-view-grid .dataviews-view-grid__media img {
|
|
@@ -1449,6 +1450,14 @@ div.dataviews-view-list {
|
|
|
1449
1450
|
justify-content: space-between;
|
|
1450
1451
|
}
|
|
1451
1452
|
|
|
1453
|
+
.dataviews-view-list__group-header {
|
|
1454
|
+
font-size: 15px;
|
|
1455
|
+
font-weight: 500;
|
|
1456
|
+
color: #1e1e1e;
|
|
1457
|
+
margin: 0 0 8px 0;
|
|
1458
|
+
padding: 0 24px;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1452
1461
|
.dataviews-view-table {
|
|
1453
1462
|
width: 100%;
|
|
1454
1463
|
text-indent: 0;
|
|
@@ -1944,12 +1953,6 @@ div.dataviews-view-list {
|
|
|
1944
1953
|
align-items: flex-start !important;
|
|
1945
1954
|
}
|
|
1946
1955
|
|
|
1947
|
-
.dataforms-layouts-regular__field .components-base-control__label {
|
|
1948
|
-
font-size: inherit;
|
|
1949
|
-
font-weight: normal;
|
|
1950
|
-
text-transform: none;
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
1956
|
.dataforms-layouts-regular__field-label {
|
|
1954
1957
|
width: 38%;
|
|
1955
1958
|
flex-shrink: 0;
|
package/build-style/style.css
CHANGED
|
@@ -1131,6 +1131,7 @@
|
|
|
1131
1131
|
aspect-ratio: 1/1;
|
|
1132
1132
|
background-color: #fff;
|
|
1133
1133
|
border-radius: 4px;
|
|
1134
|
+
overflow: hidden;
|
|
1134
1135
|
position: relative;
|
|
1135
1136
|
}
|
|
1136
1137
|
.dataviews-view-grid .dataviews-view-grid__media img {
|
|
@@ -1449,6 +1450,14 @@ div.dataviews-view-list {
|
|
|
1449
1450
|
justify-content: space-between;
|
|
1450
1451
|
}
|
|
1451
1452
|
|
|
1453
|
+
.dataviews-view-list__group-header {
|
|
1454
|
+
font-size: 15px;
|
|
1455
|
+
font-weight: 500;
|
|
1456
|
+
color: #1e1e1e;
|
|
1457
|
+
margin: 0 0 8px 0;
|
|
1458
|
+
padding: 0 24px;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1452
1461
|
.dataviews-view-table {
|
|
1453
1462
|
width: 100%;
|
|
1454
1463
|
text-indent: 0;
|
|
@@ -1944,12 +1953,6 @@ div.dataviews-view-list {
|
|
|
1944
1953
|
align-items: flex-start !important;
|
|
1945
1954
|
}
|
|
1946
1955
|
|
|
1947
|
-
.dataforms-layouts-regular__field .components-base-control__label {
|
|
1948
|
-
font-size: inherit;
|
|
1949
|
-
font-weight: normal;
|
|
1950
|
-
text-transform: none;
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
1956
|
.dataforms-layouts-regular__field-label {
|
|
1954
1957
|
width: 38%;
|
|
1955
1958
|
flex-shrink: 0;
|
|
@@ -7,20 +7,6 @@ declare const meta: {
|
|
|
7
7
|
component: typeof DataForm;
|
|
8
8
|
};
|
|
9
9
|
export default meta;
|
|
10
|
-
export declare const Default: {
|
|
11
|
-
render: ({ labelPosition, }: {
|
|
12
|
-
labelPosition: "default" | "top" | "side" | "none";
|
|
13
|
-
}) => import("react").JSX.Element;
|
|
14
|
-
argTypes: {
|
|
15
|
-
type: {
|
|
16
|
-
control: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
description: string;
|
|
20
|
-
options: string[];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
10
|
export declare const LayoutCard: {
|
|
25
11
|
render: ({ withHeader }: {
|
|
26
12
|
withHeader: boolean;
|
|
@@ -130,4 +116,7 @@ export declare const Validation: {
|
|
|
130
116
|
export declare const Visibility: {
|
|
131
117
|
render: () => import("react").JSX.Element;
|
|
132
118
|
};
|
|
119
|
+
export declare const DataAdapter: {
|
|
120
|
+
render: () => import("react").JSX.Element;
|
|
121
|
+
};
|
|
133
122
|
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataform/stories/index.story.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataform/stories/index.story.tsx"],"names":[],"mappings":"AAeA;;GAEG;AACH,OAAO,QAAQ,MAAM,UAAU,CAAC;AA+1ChC,QAAA,MAAM,IAAI;;;CAGT,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,UAAU;6BAxfuB;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE;;;;;;;;;;;;CAmgBpE,CAAC;AAEF,eAAO,MAAM,WAAW;yCAtgCrB;QACF,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;QAC/C,aAAa,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QACnD,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;KACzC;;;;;;;;;;;;;;;;;CAghCA,CAAC;AAEF,eAAO,MAAM,aAAa;iCAtoCvB;QACF,aAAa,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;KACnD;;;;;;;;;;CA6oCA,CAAC;AAEF,eAAO,MAAM,SAAS;6BA1VnB;QACF,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;KACtC;;;;;;;;;;;;;CAoWA,CAAC;AAEF,eAAO,MAAM,WAAW;;CAEvB,CAAC;AAEF,eAAO,MAAM,UAAU;0CAn7BpB;QACF,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;KAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;CAq8BA,CAAC;AAEF,eAAO,MAAM,UAAU;;CAEtB,CAAC;AA8MF,eAAO,MAAM,WAAW;;CAEvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/fixtures.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/fixtures.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,WAAW,EAgR7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAK,EA2Y5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAE,KAAK,CAAE,EAoBvC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAaxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAE,WAAW,CAAE,EAwC1C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAE,WAAW,CAAE,EA0HxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-widget.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/input-widget.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG3E,UAAU,oBAAoB;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,MAAM,GACN,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"input-widget.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/input-widget.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG3E,UAAU,oBAAoB;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,eAAe,CAAE,GAAG,CAAE,EAAE,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EACpC,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,MAAM,GACN,EAAE,oBAAoB,sCAyGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/array.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,IAAI,EAAI,EAC7C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/array.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,IAAI,EAAI,EAC7C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAkE9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/checkbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/checkbox.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAqD9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/color.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/color.tsx"],"names":[],"mappings":"AAgBA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAqDrD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,IAAI,EAAI,EACtC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAsE9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/date.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/date.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAiZrD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,IAAI,EAAI,EAC5C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,QAAQ,GACR,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BA4E9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/datetime.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/datetime.tsx"],"names":[],"mappings":"AAkBA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA6IrD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,QAAQ,GACR,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAwC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/email.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/email.tsx"],"names":[],"mappings":"AASA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,IAAI,EAAI,EACtC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAiB9B"}
|
|
@@ -6,6 +6,6 @@ import type { ComponentType } from 'react';
|
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
8
|
import type { DataFormControlProps, Field, FieldTypeDefinition } from '../types';
|
|
9
|
-
export declare function getControl<Item>(field: Field<Item>, fieldTypeDefinition: FieldTypeDefinition<Item>): ComponentType<DataFormControlProps<any>> | ComponentType<DataFormControlProps<Item>> | null;
|
|
9
|
+
export declare function getControl<Item>(field: Field<Item>, fieldTypeDefinition: FieldTypeDefinition<Item>): ComponentType<DataFormControlProps<any>> | (<Item_1>(props: DataFormControlProps<Item_1>) => import("react").JSX.Element) | ComponentType<DataFormControlProps<Item>> | null;
|
|
10
10
|
export declare function getControlByType(type: string): ComponentType<DataFormControlProps<any>>;
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,OAAO,KAAK,EACX,oBAAoB,EACpB,KAAK,EACL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,OAAO,KAAK,EACX,oBAAoB,EACpB,KAAK,EACL,mBAAmB,EAEnB,MAAM,UAAU,CAAC;AA0DlB,wBAAgB,UAAU,CAAE,IAAI,EAC/B,KAAK,EAAE,KAAK,CAAE,IAAI,CAAE,EACpB,mBAAmB,EAAE,mBAAmB,CAAE,IAAI,CAAE,+DARxC,oBAAoB,CAAE,MAAI,CAAE,qFAmCpC;AAED,wBAAgB,gBAAgB,CAAE,IAAI,EAAE,MAAM,4CAM7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/integer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/integer.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAyDrD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAE,IAAI,EAAI,EACxC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,QAAQ,GACR,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAoG9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/password.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BA+B9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/radio.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/radio.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,IAAI,EAAI,EACtC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,sCA2D9B"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
export type DateRelative = {
|
|
2
|
+
value?: string | number;
|
|
3
|
+
unit?: string;
|
|
4
|
+
};
|
|
1
5
|
interface RelativeDateControlProps {
|
|
2
6
|
id: string;
|
|
3
|
-
value:
|
|
4
|
-
|
|
5
|
-
unit?: string;
|
|
6
|
-
};
|
|
7
|
-
onChange: (value: any) => void;
|
|
7
|
+
value: DateRelative;
|
|
8
|
+
onChange: (args: DateRelative) => void;
|
|
8
9
|
label: string;
|
|
9
10
|
hideLabelFromVision?: boolean;
|
|
10
11
|
options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relative-date-control.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/relative-date-control.tsx"],"names":[],"mappings":"AAsBA,
|
|
1
|
+
{"version":3,"file":"relative-date-control.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/relative-date-control.tsx"],"names":[],"mappings":"AAsBA,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,UAAU,wBAAwB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,CAAE,IAAI,EAAE,YAAY,KAAM,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAE,EAC5C,EAAE,EACF,KAAK,EACL,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,OAAO,EACP,SAAS,GACT,EAAE,wBAAwB,+BA8C1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/select.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,IAAI,EAAI,EACvC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAgF9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telephone.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/telephone.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"telephone.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/telephone.tsx"],"names":[],"mappings":"AASA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,IAAI,EAAI,EAC1C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAiB9B"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { DataFormControlProps } from '../types';
|
|
5
|
-
export default function Text<Item>({ data, field, onChange, hideLabelFromVision, }: DataFormControlProps<Item>): import("react").JSX.Element;
|
|
5
|
+
export default function Text<Item>({ data, field, onChange, hideLabelFromVision, config, }: DataFormControlProps<Item>): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/text.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/text.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAE,IAAI,EAAI,EACrC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,MAAM,GACN,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAe9B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { DataFormControlProps } from '../types';
|
|
5
|
+
export default function Textarea<Item>({ data, field, onChange, hideLabelFromVision, config, }: DataFormControlProps<Item>): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/textarea.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,EACzC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,MAAM,GACN,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BA2D9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/toggle-group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/toggle-group.tsx"],"names":[],"mappings":"AAcA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,IAAI,EAAI,EAC5C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,sCAuE9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/toggle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/toggle.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,IAAI,EAAI,EACvC,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAsD9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/url.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/dataform-controls/url.tsx"],"names":[],"mappings":"AASA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD,MAAM,CAAC,OAAO,UAAU,GAAG,CAAE,IAAI,EAAI,EACpC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAiB9B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { DataFormControlProps } from '../../types';
|
|
5
|
+
export type DataFormValidatedTextControlProps<Item> = DataFormControlProps<Item> & {
|
|
6
|
+
/**
|
|
7
|
+
* The input type of the control.
|
|
8
|
+
*/
|
|
9
|
+
type?: 'text' | 'email' | 'tel' | 'url' | 'password';
|
|
10
|
+
/**
|
|
11
|
+
* Optional prefix element to display before the input.
|
|
12
|
+
*/
|
|
13
|
+
prefix?: React.ReactElement;
|
|
14
|
+
/**
|
|
15
|
+
* Optional suffix element to display after the input.
|
|
16
|
+
*/
|
|
17
|
+
suffix?: React.ReactElement;
|
|
18
|
+
};
|
|
19
|
+
export default function ValidatedText<Item>({ data, field, onChange, hideLabelFromVision, type, prefix, suffix, }: DataFormValidatedTextControlProps<Item>): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=validated-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validated-input.d.ts","sourceRoot":"","sources":["../../../src/dataform-controls/utils/validated-input.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKxD,MAAM,MAAM,iCAAiC,CAAE,IAAI,IAClD,oBAAoB,CAAE,IAAI,CAAE,GAAG;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC5B,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,IAAI,EAAI,EAC9C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,IAAI,EACJ,MAAM,EACN,MAAM,GACN,EAAE,iCAAiC,CAAE,IAAI,CAAE,+BAiE3C"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { FormField, NormalizedField } from '../../types';
|
|
5
|
-
declare function PanelDropdown<Item>({ fieldDefinition, popoverAnchor, labelPosition, data, onChange, field, }: {
|
|
5
|
+
declare function PanelDropdown<Item>({ fieldDefinition, summaryFields, popoverAnchor, labelPosition, data, onChange, field, }: {
|
|
6
6
|
fieldDefinition: NormalizedField<Item>;
|
|
7
|
+
summaryFields: NormalizedField<Item>[];
|
|
7
8
|
popoverAnchor: HTMLElement | null;
|
|
8
9
|
labelPosition: 'side' | 'top' | 'none';
|
|
9
10
|
data: Item;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/dropdown.tsx"],"names":[],"mappings":"AAeA;;GAEG;AACH,OAAO,KAAK,EAAQ,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/dropdown.tsx"],"names":[],"mappings":"AAeA;;GAEG;AACH,OAAO,KAAK,EAAQ,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAsCpE,iBAAS,aAAa,CAAE,IAAI,EAAI,EAC/B,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAsB,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,GACL,EAAE;IACF,eAAe,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;IACzC,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAE,KAAK,EAAE,GAAG,KAAM,IAAI,CAAC;IACjC,KAAK,EAAE,SAAS,CAAC;CACjB,+BA0EA;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/index.tsx"],"names":[],"mappings":"AAcA;;GAEG;AACH,OAAO,KAAK,EACX,gBAAgB,EAGhB,MAAM,aAAa,CAAC;AAOrB,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,IAAI,EAAI,EAC/C,IAAI,EACJ,KAAK,EACL,QAAQ,GACR,EAAE,gBAAgB,CAAE,IAAI,CAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/index.tsx"],"names":[],"mappings":"AAcA;;GAEG;AACH,OAAO,KAAK,EACX,gBAAgB,EAGhB,MAAM,aAAa,CAAC;AAOrB,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,IAAI,EAAI,EAC/C,IAAI,EACJ,KAAK,EACL,QAAQ,GACR,EAAE,gBAAgB,CAAE,IAAI,CAAE,sCAgI1B"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { FormField, NormalizedField } from '../../types';
|
|
5
|
-
declare function PanelModal<Item>({ fieldDefinition, labelPosition, data, onChange, field, }: {
|
|
5
|
+
declare function PanelModal<Item>({ fieldDefinition, summaryFields, labelPosition, data, onChange, field, }: {
|
|
6
6
|
fieldDefinition: NormalizedField<Item>;
|
|
7
|
+
summaryFields: NormalizedField<Item>[];
|
|
7
8
|
labelPosition: 'side' | 'top' | 'none';
|
|
8
9
|
data: Item;
|
|
9
10
|
onChange: (value: any) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/modal.tsx"],"names":[],"mappings":"AAiBA;;GAEG;AACH,OAAO,KAAK,EAAQ,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAkFpE,iBAAS,UAAU,CAAE,IAAI,EAAI,EAC5B,eAAe,EACf,aAAa,EACb,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,KAAK,GACL,EAAE;IACF,eAAe,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;IACzC,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAE,KAAK,EAAE,GAAG,KAAM,IAAI,CAAC;IACjC,KAAK,EAAE,SAAS,CAAC;CACjB,+BAwCA;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { NormalizedField } from '../../types';
|
|
5
|
+
declare function SummaryButton<Item>({ summaryFields, data, labelPosition, fieldLabel, disabled, onClick, 'aria-expanded': ariaExpanded, }: {
|
|
6
|
+
summaryFields: NormalizedField<Item>[];
|
|
7
|
+
data: Item;
|
|
8
|
+
labelPosition: 'side' | 'top' | 'none';
|
|
9
|
+
fieldLabel?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
'aria-expanded'?: boolean;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export default SummaryButton;
|
|
15
|
+
//# sourceMappingURL=summary-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-button.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/summary-button.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,iBAAS,aAAa,CAAE,IAAI,EAAI,EAC/B,aAAa,EACb,IAAI,EACJ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,OAAO,EACP,eAAe,EAAE,YAAY,GAC7B,EAAE;IACF,aAAa,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IACzC,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B,+BA8DA;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/regular/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/regular/index.tsx"],"names":[],"mappings":"AAiBA;;GAEG;AACH,OAAO,KAAK,EAEX,gBAAgB,EAEhB,MAAM,aAAa,CAAC;AAmBrB,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,IAAI,EAAI,EACjD,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,GACnB,EAAE,gBAAgB,CAAE,IAAI,CAAE,sCAmG1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/grid/index.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAIX,aAAa,EACb,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/grid/index.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAIX,aAAa,EACb,MAAM,aAAa,CAAC;AAmPrB,iBAAS,QAAQ,CAAE,IAAI,EAAI,EAC1B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAK,GACL,EAAE,aAAa,CAAE,IAAI,CAAE,+BA0LvB;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/list/index.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAIX,aAAa,EAEb,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/list/index.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAIX,aAAa,EAEb,MAAM,aAAa,CAAC;AAqUrB,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,KAAK,EAAE,aAAa,CAAE,IAAI,CAAE,+BAyQrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/picker-grid/index.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAGX,mBAAmB,EACnB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/picker-grid/index.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAGX,mBAAmB,EACnB,MAAM,aAAa,CAAC;AAqNrB,iBAAS,cAAc,CAAE,IAAI,EAAI,EAChC,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAK,GACL,EAAE,mBAAmB,CAAE,IAAI,CAAE,+BAkO7B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAIX,cAAc,EACd,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAIX,cAAc,EACd,MAAM,aAAa,CAAC;AA2OrB,iBAAS,SAAS,CAAE,IAAI,EAAI,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,YAAY,EACZ,SAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,WAAW,EACX,eAAe,EACf,cAAc,EACd,IAAI,EACJ,SAAS,EACT,KAAK,GACL,EAAE,cAAc,CAAE,IAAI,CAAE,2CAwSxB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-data-by-group.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/utils/get-data-by-group.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,IAAI,EAC3C,IAAI,EAAE,GAAG,EAAE,EACX,YAAY,EAAE,eAAe,CAAE,IAAI,CAAE,GACnC,GAAG,CAAE,MAAM,EAAE,GAAG,EAAE,CAAE,CAStB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field-types/index.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAGX,SAAS,EACT,mBAAmB,EAEnB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field-types/index.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAGX,SAAS,EACT,mBAAmB,EAEnB,MAAM,UAAU,CAAC;AAgBlB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAE,IAAI,EACnD,IAAI,CAAC,EAAE,SAAS,GACd,mBAAmB,CAAE,IAAI,CAAE,CAwF7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { DataViewRenderFieldProps, SortDirection, NormalizedField } from '../types';
|
|
5
|
+
declare function sort(valueA: any, valueB: any, direction: SortDirection): number;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
sort: typeof sort;
|
|
8
|
+
isValid: {
|
|
9
|
+
custom: (item: any, field: NormalizedField<any>) => import("@wordpress/i18n").TranslatableText<"Value must be one of the elements."> | null;
|
|
10
|
+
};
|
|
11
|
+
Edit: string;
|
|
12
|
+
render: ({ item, field }: DataViewRenderFieldProps<any>) => any;
|
|
13
|
+
enableSorting: false;
|
|
14
|
+
filterBy: false;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/field-types/password.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,wBAAwB,EACxB,aAAa,EACb,eAAe,EAEf,MAAM,UAAU,CAAC;AAIlB,iBAAS,IAAI,CAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,UAGhE;;;;uBAKiB,GAAG,SAAS,eAAe,CAAE,GAAG,CAAE;;;8BAaxB,wBAAwB,CAAE,GAAG,CAAE;;;;AAhB3D,wBAuBuC"}
|