@nocobase/client 0.9.2-alpha.4 → 0.9.4-alpha.1
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/es/acl/ACLProvider.js +2 -2
- package/es/acl/Configuration/RoleConfigure.js +15 -8
- package/es/api-client/APIClient.d.ts +2 -0
- package/es/api-client/APIClient.js +11 -0
- package/es/block-provider/BlockProvider.js +58 -17
- package/es/block-provider/DetailsBlockProvider.js +13 -1
- package/es/block-provider/FormBlockProvider.js +30 -13
- package/es/block-provider/hooks/index.d.ts +10 -0
- package/es/block-provider/hooks/index.js +521 -283
- package/es/collection-manager/CollectionField.js +3 -3
- package/es/collection-manager/CollectionFieldProvider.js +2 -1
- package/es/collection-manager/Configuration/AddFieldAction.js +3 -3
- package/es/collection-manager/Configuration/CollectionFields.d.ts +1 -1
- package/es/collection-manager/Configuration/CollectionFields.js +2 -5
- package/es/collection-manager/Configuration/ConfigurationTabs.js +7 -6
- package/es/collection-manager/Configuration/EditFieldAction.js +0 -1
- package/es/collection-manager/Configuration/OverridingCollectionField.js +0 -1
- package/es/collection-manager/action-hooks.d.ts +1 -1
- package/es/collection-manager/action-hooks.js +18 -7
- package/es/collection-manager/hooks/useCollection.d.ts +1 -1
- package/es/collection-manager/hooks/useCollectionDataSource.js +4 -4
- package/es/collection-manager/interfaces/createdBy.js +1 -1
- package/es/collection-manager/interfaces/linkTo.js +3 -39
- package/es/collection-manager/interfaces/m2m.js +4 -38
- package/es/collection-manager/interfaces/m2o.js +4 -38
- package/es/collection-manager/interfaces/o2m.js +4 -68
- package/es/collection-manager/interfaces/o2o.js +25 -119
- package/es/collection-manager/interfaces/updatedBy.js +1 -1
- package/es/collection-manager/templates/expression.js +1 -1
- package/es/collection-manager/templates/tree.js +2 -2
- package/es/filter-provider/FilterProvider.js +3 -1
- package/es/filter-provider/utils.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/locale/en_US.d.ts +19 -1
- package/es/locale/en_US.js +22 -4
- package/es/locale/es_ES.d.ts +692 -0
- package/es/locale/es_ES.js +691 -0
- package/es/locale/ja_JP.d.ts +8 -1
- package/es/locale/ja_JP.js +9 -2
- package/es/locale/pt_BR.d.ts +5 -1
- package/es/locale/pt_BR.js +6 -2
- package/es/locale/ru_RU.d.ts +5 -1
- package/es/locale/ru_RU.js +6 -2
- package/es/locale/tr_TR.d.ts +5 -1
- package/es/locale/tr_TR.js +6 -2
- package/es/locale/zh_CN.d.ts +27 -1
- package/es/locale/zh_CN.js +28 -2
- package/es/record-provider/index.d.ts +4 -0
- package/es/record-provider/index.js +3 -0
- package/es/schema-component/antd/action/Action.Designer.js +10 -8
- package/es/schema-component/antd/action/Action.Drawer.js +4 -1
- package/es/schema-component/antd/action/ActionBar.js +25 -18
- package/es/schema-component/antd/association-field/AssociationFieldProvider.d.ts +2 -0
- package/es/schema-component/antd/association-field/AssociationFieldProvider.js +30 -0
- package/es/schema-component/antd/association-field/AssociationSelect.d.ts +14 -0
- package/es/schema-component/antd/association-field/AssociationSelect.js +63 -0
- package/es/schema-component/antd/association-field/Editable.d.ts +2 -0
- package/es/schema-component/antd/association-field/Editable.js +112 -0
- package/es/schema-component/antd/association-field/FileManager.d.ts +4 -0
- package/es/schema-component/antd/association-field/FileManager.js +243 -0
- package/es/schema-component/antd/association-field/InternalNester.d.ts +1 -0
- package/es/schema-component/antd/association-field/InternalNester.js +29 -0
- package/es/schema-component/antd/association-field/InternalPicker.d.ts +2 -0
- package/es/schema-component/antd/association-field/InternalPicker.js +236 -0
- package/es/schema-component/antd/association-field/InternalSubTable.d.ts +1 -0
- package/es/schema-component/antd/association-field/InternalSubTable.js +28 -0
- package/es/schema-component/antd/association-field/InternalViewer.d.ts +2 -0
- package/es/schema-component/antd/association-field/InternalViewer.js +112 -0
- package/es/schema-component/antd/association-field/Nester.d.ts +1 -0
- package/es/schema-component/antd/association-field/Nester.js +71 -0
- package/es/schema-component/antd/association-field/ReadPretty.d.ts +2 -0
- package/es/schema-component/antd/association-field/ReadPretty.js +22 -0
- package/es/schema-component/antd/association-field/SubTable.d.ts +1 -0
- package/es/schema-component/antd/association-field/SubTable.js +25 -0
- package/es/schema-component/antd/association-field/components/CreateRecordAction.d.ts +2 -0
- package/es/schema-component/antd/association-field/components/CreateRecordAction.js +61 -0
- package/es/schema-component/antd/association-field/context.d.ts +8 -0
- package/es/schema-component/antd/association-field/context.js +2 -0
- package/es/schema-component/antd/association-field/hooks.d.ts +9 -0
- package/es/schema-component/antd/association-field/hooks.js +96 -0
- package/es/schema-component/antd/association-field/index.d.ts +1 -0
- package/es/schema-component/antd/association-field/index.js +14 -0
- package/es/schema-component/antd/association-field/schema.d.ts +142 -0
- package/es/schema-component/antd/association-field/schema.js +141 -0
- package/es/schema-component/antd/association-field/util.d.ts +8 -0
- package/es/schema-component/antd/association-field/util.js +84 -0
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +3 -3
- package/es/schema-component/antd/association-select/AssociationSelect.js +49 -231
- package/es/schema-component/antd/association-select/useServiceOptions.js +2 -2
- package/es/schema-component/antd/collection-select/CollectionSelect.js +5 -0
- package/es/schema-component/antd/expand-action/Expand.Action.Design.d.ts +1 -0
- package/es/schema-component/antd/expand-action/Expand.Action.Design.js +112 -0
- package/es/schema-component/antd/expand-action/Expand.Action.d.ts +1 -0
- package/es/schema-component/antd/expand-action/Expand.Action.js +40 -0
- package/es/schema-component/antd/expand-action/index.d.ts +1 -0
- package/es/schema-component/antd/expand-action/index.js +5 -0
- package/es/schema-component/antd/filter/Filter.Action.Designer.js +10 -12
- package/es/schema-component/antd/filter/FilterItem.js +1 -1
- package/es/schema-component/antd/filter/useOperators.d.ts +1 -1
- package/es/schema-component/antd/form/Form.js +4 -4
- package/es/schema-component/antd/form-item/FormItem.d.ts +2 -1
- package/es/schema-component/antd/form-item/FormItem.js +263 -168
- package/es/schema-component/antd/form-item/SchemaSettingOptions.js +39 -61
- package/es/schema-component/antd/form-v2/Form.Designer.js +1 -0
- package/es/schema-component/antd/form-v2/Templates.d.ts +20 -0
- package/es/schema-component/antd/form-v2/Templates.js +40 -12
- package/es/schema-component/antd/form-v2/utils.js +3 -1
- package/es/schema-component/antd/gantt/components/other/tooltip.js +1 -1
- package/es/schema-component/antd/grid/Grid.js +34 -24
- package/es/schema-component/antd/grid-card/GridCard.Decorator.d.ts +5 -0
- package/es/schema-component/antd/grid-card/GridCard.Decorator.js +65 -0
- package/es/schema-component/antd/grid-card/GridCard.Designer.d.ts +1 -0
- package/es/schema-component/antd/grid-card/GridCard.Designer.js +243 -0
- package/es/schema-component/antd/grid-card/GridCard.Item.d.ts +1 -0
- package/es/schema-component/antd/grid-card/GridCard.Item.js +18 -0
- package/es/schema-component/antd/grid-card/GridCard.d.ts +8 -0
- package/es/schema-component/antd/grid-card/GridCard.js +103 -0
- package/es/schema-component/antd/grid-card/hooks.d.ts +4 -0
- package/es/schema-component/antd/grid-card/hooks.js +9 -0
- package/es/schema-component/antd/grid-card/index.d.ts +1 -0
- package/es/schema-component/antd/grid-card/index.js +1 -0
- package/es/schema-component/antd/grid-card/options.d.ts +20 -0
- package/es/schema-component/antd/grid-card/options.js +20 -0
- package/es/schema-component/antd/index.d.ts +5 -1
- package/es/schema-component/antd/index.js +5 -1
- package/es/schema-component/antd/list/List.Decorator.d.ts +5 -0
- package/es/schema-component/antd/list/List.Decorator.js +59 -0
- package/es/schema-component/antd/list/List.Designer.d.ts +1 -0
- package/es/schema-component/antd/list/List.Designer.js +205 -0
- package/es/schema-component/antd/list/List.Item.d.ts +1 -0
- package/es/schema-component/antd/list/List.Item.js +15 -0
- package/es/schema-component/antd/list/List.d.ts +8 -0
- package/es/schema-component/antd/list/List.js +83 -0
- package/es/schema-component/antd/list/hooks.d.ts +4 -0
- package/es/schema-component/antd/list/hooks.js +9 -0
- package/es/schema-component/antd/list/index.d.ts +1 -0
- package/es/schema-component/antd/list/index.js +1 -0
- package/es/schema-component/antd/menu/Menu.js +6 -3
- package/es/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -0
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +32 -12
- package/es/schema-component/antd/remote-select/RemoteSelect.js +23 -23
- package/es/schema-component/antd/select/Select.js +2 -0
- package/es/schema-component/antd/table/Table.Void.Designer.js +1 -0
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +18 -9
- package/es/schema-component/antd/table-v2/Table.Index.d.ts +1 -0
- package/es/schema-component/antd/table-v2/Table.Index.js +6 -0
- package/es/schema-component/antd/table-v2/Table.js +9 -5
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +2 -1
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +1 -0
- package/es/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +22 -0
- package/es/schema-component/antd/table-v2/hooks/useUserVariable.js +65 -0
- package/es/schema-component/antd/table-v2/index.js +3 -1
- package/es/schema-component/antd/table-v2/utils.js +1 -1
- package/es/schema-component/antd/variable/Input.js +11 -8
- package/es/schema-component/antd/variable/TextArea.js +2 -5
- package/es/schema-component/common/dnd-context/index.js +3 -2
- package/es/schema-component/common/sortable-item/SortableItem.js +4 -1
- package/es/schema-component/common/utils/uitls.js +1 -1
- package/es/schema-component/core/SchemaComponentProvider.js +2 -2
- package/es/schema-component/hooks/index.d.ts +1 -0
- package/es/schema-component/hooks/index.js +2 -1
- package/es/schema-component/hooks/useFieldModeOptions.d.ts +4 -0
- package/es/schema-component/hooks/useFieldModeOptions.js +105 -0
- package/es/schema-initializer/SchemaInitializerProvider.d.ts +1 -0
- package/es/schema-initializer/SchemaInitializerProvider.js +23 -10
- package/es/schema-initializer/buttons/BlockInitializers.js +10 -0
- package/es/schema-initializer/buttons/CustomFormItemInitializers.js +4 -2
- package/es/schema-initializer/buttons/FormActionInitializers.d.ts +0 -116
- package/es/schema-initializer/buttons/FormActionInitializers.js +106 -100
- package/es/schema-initializer/buttons/GanttActionInitializers.d.ts +0 -19
- package/es/schema-initializer/buttons/GridCardActionInitializers.d.ts +195 -0
- package/es/schema-initializer/buttons/GridCardActionInitializers.js +278 -0
- package/es/schema-initializer/buttons/ListActionInitializers.d.ts +195 -0
- package/es/schema-initializer/buttons/ListActionInitializers.js +278 -0
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
- package/es/schema-initializer/buttons/TableActionInitializers.d.ts +0 -20
- package/es/schema-initializer/buttons/TableActionInitializers.js +29 -35
- package/es/schema-initializer/buttons/TableColumnInitializers.js +4 -1
- package/es/schema-initializer/buttons/index.d.ts +3 -0
- package/es/schema-initializer/buttons/index.js +3 -0
- package/es/schema-initializer/components/BulkEditField.js +7 -5
- package/es/schema-initializer/components/CreateRecordAction.d.ts +2 -1
- package/es/schema-initializer/components/CreateRecordAction.js +55 -33
- package/es/schema-initializer/components/DeletedField.d.ts +1 -0
- package/es/schema-initializer/components/DeletedField.js +11 -0
- package/es/schema-initializer/components/assigned-field/AssignedField.js +35 -23
- package/es/schema-initializer/items/ExpandActionInitializer.d.ts +0 -1
- package/es/schema-initializer/items/ExpandActionInitializer.js +9 -34
- package/es/schema-initializer/items/GridCardBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/GridCardBlockInitializer.js +47 -0
- package/es/schema-initializer/items/ListBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/ListBlockInitializer.js +47 -0
- package/es/schema-initializer/items/SelectActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/SelectActionInitializer.js +65 -0
- package/es/schema-initializer/items/index.d.ts +3 -0
- package/es/schema-initializer/items/index.js +3 -0
- package/es/schema-initializer/utils.d.ts +112 -0
- package/es/schema-initializer/utils.js +224 -38
- package/es/schema-items/GeneralSchemaItems.d.ts +4 -0
- package/es/schema-items/GeneralSchemaItems.js +148 -0
- package/es/schema-items/index.d.ts +1 -0
- package/es/schema-items/index.js +2 -1
- package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -0
- package/es/schema-settings/DataTemplates/FormDataTemplates.js +117 -42
- package/es/schema-settings/DataTemplates/components/Designer.d.ts +7 -0
- package/es/schema-settings/DataTemplates/components/Designer.js +179 -0
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +6 -1
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.js +204 -96
- package/es/schema-settings/GeneralSchemaDesigner.js +19 -15
- package/es/schema-settings/LinkageRules/FilterDynamicComponent.js +1 -1
- package/es/schema-settings/LinkageRules/Variables.d.ts +1 -1
- package/es/schema-settings/LinkageRules/Variables.js +7 -4
- package/es/schema-settings/SchemaSettings.d.ts +1 -1
- package/es/schema-settings/SchemaSettings.js +53 -29
- package/es/schema-settings/VariableInput/hooks/useUserVariable.js +1 -1
- package/es/schema-settings/hooks/useIsShowMultipleSwitch.d.ts +4 -0
- package/es/schema-settings/hooks/useIsShowMultipleSwitch.js +18 -0
- package/es/schema-templates/BlockTemplateDetails.js +1 -1
- package/es/user/CurrentUser.js +118 -10
- package/lib/acl/ACLProvider.js +2 -2
- package/lib/acl/Configuration/RoleConfigure.js +15 -8
- package/lib/api-client/APIClient.d.ts +2 -0
- package/lib/api-client/APIClient.js +11 -0
- package/lib/block-provider/BlockProvider.js +57 -16
- package/lib/block-provider/DetailsBlockProvider.js +13 -1
- package/lib/block-provider/FormBlockProvider.js +31 -15
- package/lib/block-provider/hooks/index.d.ts +10 -0
- package/lib/block-provider/hooks/index.js +531 -290
- package/lib/collection-manager/CollectionField.js +3 -3
- package/lib/collection-manager/CollectionFieldProvider.js +2 -1
- package/lib/collection-manager/Configuration/AddFieldAction.js +2 -2
- package/lib/collection-manager/Configuration/CollectionFields.d.ts +1 -1
- package/lib/collection-manager/Configuration/CollectionFields.js +2 -5
- package/lib/collection-manager/Configuration/ConfigurationTabs.js +7 -6
- package/lib/collection-manager/Configuration/EditFieldAction.js +0 -1
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +0 -1
- package/lib/collection-manager/action-hooks.d.ts +1 -1
- package/lib/collection-manager/action-hooks.js +18 -7
- package/lib/collection-manager/hooks/useCollection.d.ts +1 -1
- package/lib/collection-manager/hooks/useCollectionDataSource.js +4 -4
- package/lib/collection-manager/interfaces/createdBy.js +1 -1
- package/lib/collection-manager/interfaces/linkTo.js +2 -38
- package/lib/collection-manager/interfaces/m2m.js +3 -37
- package/lib/collection-manager/interfaces/m2o.js +3 -37
- package/lib/collection-manager/interfaces/o2m.js +6 -70
- package/lib/collection-manager/interfaces/o2o.js +30 -124
- package/lib/collection-manager/interfaces/updatedBy.js +1 -1
- package/lib/collection-manager/templates/expression.js +1 -1
- package/lib/collection-manager/templates/tree.js +2 -2
- package/lib/filter-provider/FilterProvider.js +3 -1
- package/lib/filter-provider/utils.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +11 -0
- package/lib/locale/en_US.d.ts +19 -1
- package/lib/locale/en_US.js +22 -4
- package/lib/locale/es_ES.d.ts +692 -0
- package/lib/locale/es_ES.js +698 -0
- package/lib/locale/ja_JP.d.ts +8 -1
- package/lib/locale/ja_JP.js +9 -2
- package/lib/locale/pt_BR.d.ts +5 -1
- package/lib/locale/pt_BR.js +6 -2
- package/lib/locale/ru_RU.d.ts +5 -1
- package/lib/locale/ru_RU.js +6 -2
- package/lib/locale/tr_TR.d.ts +5 -1
- package/lib/locale/tr_TR.js +6 -2
- package/lib/locale/zh_CN.d.ts +27 -1
- package/lib/locale/zh_CN.js +28 -2
- package/lib/record-provider/index.d.ts +4 -0
- package/lib/record-provider/index.js +5 -1
- package/lib/schema-component/antd/action/Action.Designer.js +10 -8
- package/lib/schema-component/antd/action/Action.Drawer.js +4 -1
- package/lib/schema-component/antd/action/ActionBar.js +23 -16
- package/lib/schema-component/antd/association-field/AssociationFieldProvider.d.ts +2 -0
- package/lib/schema-component/antd/association-field/AssociationFieldProvider.js +40 -0
- package/lib/schema-component/antd/association-field/AssociationSelect.d.ts +14 -0
- package/lib/schema-component/antd/association-field/AssociationSelect.js +72 -0
- package/lib/schema-component/antd/association-field/Editable.d.ts +2 -0
- package/lib/schema-component/antd/association-field/Editable.js +121 -0
- package/lib/schema-component/antd/association-field/FileManager.d.ts +4 -0
- package/lib/schema-component/antd/association-field/FileManager.js +253 -0
- package/lib/schema-component/antd/association-field/InternalNester.d.ts +1 -0
- package/lib/schema-component/antd/association-field/InternalNester.js +39 -0
- package/lib/schema-component/antd/association-field/InternalPicker.d.ts +2 -0
- package/lib/schema-component/antd/association-field/InternalPicker.js +246 -0
- package/lib/schema-component/antd/association-field/InternalSubTable.d.ts +1 -0
- package/lib/schema-component/antd/association-field/InternalSubTable.js +39 -0
- package/lib/schema-component/antd/association-field/InternalViewer.d.ts +2 -0
- package/lib/schema-component/antd/association-field/InternalViewer.js +123 -0
- package/lib/schema-component/antd/association-field/Nester.d.ts +1 -0
- package/lib/schema-component/antd/association-field/Nester.js +80 -0
- package/lib/schema-component/antd/association-field/ReadPretty.d.ts +2 -0
- package/lib/schema-component/antd/association-field/ReadPretty.js +30 -0
- package/lib/schema-component/antd/association-field/SubTable.d.ts +1 -0
- package/lib/schema-component/antd/association-field/SubTable.js +33 -0
- package/lib/schema-component/antd/association-field/components/CreateRecordAction.d.ts +2 -0
- package/lib/schema-component/antd/association-field/components/CreateRecordAction.js +71 -0
- package/lib/schema-component/antd/association-field/context.d.ts +8 -0
- package/lib/schema-component/antd/association-field/context.js +9 -0
- package/lib/schema-component/antd/association-field/hooks.d.ts +9 -0
- package/lib/schema-component/antd/association-field/hooks.js +107 -0
- package/lib/schema-component/antd/association-field/index.d.ts +1 -0
- package/lib/schema-component/antd/association-field/index.js +21 -0
- package/lib/schema-component/antd/association-field/schema.d.ts +142 -0
- package/lib/schema-component/antd/association-field/schema.js +148 -0
- package/lib/schema-component/antd/association-field/util.d.ts +8 -0
- package/lib/schema-component/antd/association-field/util.js +98 -0
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +3 -3
- package/lib/schema-component/antd/association-select/AssociationSelect.js +49 -231
- package/lib/schema-component/antd/association-select/useServiceOptions.js +2 -2
- package/lib/schema-component/antd/collection-select/CollectionSelect.js +5 -0
- package/lib/schema-component/antd/expand-action/Expand.Action.Design.d.ts +1 -0
- package/lib/schema-component/antd/expand-action/Expand.Action.Design.js +120 -0
- package/lib/schema-component/antd/expand-action/Expand.Action.d.ts +1 -0
- package/lib/schema-component/antd/expand-action/Expand.Action.js +48 -0
- package/lib/schema-component/antd/expand-action/index.d.ts +1 -0
- package/lib/schema-component/antd/expand-action/index.js +12 -0
- package/lib/schema-component/antd/filter/Filter.Action.Designer.js +10 -12
- package/lib/schema-component/antd/filter/FilterItem.js +1 -1
- package/lib/schema-component/antd/filter/useOperators.d.ts +1 -1
- package/lib/schema-component/antd/form/Form.js +4 -4
- package/lib/schema-component/antd/form-item/FormItem.d.ts +2 -1
- package/lib/schema-component/antd/form-item/FormItem.js +258 -162
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +37 -59
- package/lib/schema-component/antd/form-v2/Form.Designer.js +1 -0
- package/lib/schema-component/antd/form-v2/Templates.d.ts +20 -0
- package/lib/schema-component/antd/form-v2/Templates.js +39 -11
- package/lib/schema-component/antd/form-v2/utils.js +3 -1
- package/lib/schema-component/antd/gantt/components/other/tooltip.js +1 -1
- package/lib/schema-component/antd/grid/Grid.js +33 -23
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.d.ts +5 -0
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.js +77 -0
- package/lib/schema-component/antd/grid-card/GridCard.Designer.d.ts +1 -0
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +253 -0
- package/lib/schema-component/antd/grid-card/GridCard.Item.d.ts +1 -0
- package/lib/schema-component/antd/grid-card/GridCard.Item.js +26 -0
- package/lib/schema-component/antd/grid-card/GridCard.d.ts +8 -0
- package/lib/schema-component/antd/grid-card/GridCard.js +112 -0
- package/lib/schema-component/antd/grid-card/hooks.d.ts +4 -0
- package/lib/schema-component/antd/grid-card/hooks.js +16 -0
- package/lib/schema-component/antd/grid-card/index.d.ts +1 -0
- package/lib/schema-component/antd/grid-card/index.js +16 -0
- package/lib/schema-component/antd/grid-card/options.d.ts +20 -0
- package/lib/schema-component/antd/grid-card/options.js +31 -0
- package/lib/schema-component/antd/index.d.ts +5 -1
- package/lib/schema-component/antd/index.js +55 -11
- package/lib/schema-component/antd/list/List.Decorator.d.ts +5 -0
- package/lib/schema-component/antd/list/List.Decorator.js +71 -0
- package/lib/schema-component/antd/list/List.Designer.d.ts +1 -0
- package/lib/schema-component/antd/list/List.Designer.js +213 -0
- package/lib/schema-component/antd/list/List.Item.d.ts +1 -0
- package/lib/schema-component/antd/list/List.Item.js +23 -0
- package/lib/schema-component/antd/list/List.d.ts +8 -0
- package/lib/schema-component/antd/list/List.js +92 -0
- package/lib/schema-component/antd/list/hooks.d.ts +4 -0
- package/lib/schema-component/antd/list/hooks.js +16 -0
- package/lib/schema-component/antd/list/index.d.ts +1 -0
- package/lib/schema-component/antd/list/index.js +16 -0
- package/lib/schema-component/antd/menu/Menu.js +6 -3
- package/lib/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -0
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +34 -13
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +22 -22
- package/lib/schema-component/antd/select/Select.js +2 -0
- package/lib/schema-component/antd/table/Table.Void.Designer.js +1 -0
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +18 -9
- package/lib/schema-component/antd/table-v2/Table.Index.d.ts +1 -0
- package/lib/schema-component/antd/table-v2/Table.Index.js +14 -0
- package/lib/schema-component/antd/table-v2/Table.js +9 -5
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +2 -1
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +1 -0
- package/lib/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +22 -0
- package/lib/schema-component/antd/table-v2/hooks/useUserVariable.js +73 -0
- package/lib/schema-component/antd/table-v2/index.js +3 -1
- package/lib/schema-component/antd/table-v2/utils.js +1 -1
- package/lib/schema-component/antd/variable/Input.js +11 -8
- package/lib/schema-component/antd/variable/TextArea.js +2 -5
- package/lib/schema-component/common/dnd-context/index.js +3 -2
- package/lib/schema-component/common/sortable-item/SortableItem.js +4 -1
- package/lib/schema-component/common/utils/uitls.js +1 -1
- package/lib/schema-component/core/SchemaComponentProvider.js +2 -2
- package/lib/schema-component/hooks/index.d.ts +1 -0
- package/lib/schema-component/hooks/index.js +11 -0
- package/lib/schema-component/hooks/useFieldModeOptions.d.ts +4 -0
- package/lib/schema-component/hooks/useFieldModeOptions.js +112 -0
- package/lib/schema-initializer/SchemaInitializerProvider.d.ts +1 -0
- package/lib/schema-initializer/SchemaInitializerProvider.js +22 -9
- package/lib/schema-initializer/buttons/BlockInitializers.js +10 -0
- package/lib/schema-initializer/buttons/CustomFormItemInitializers.js +4 -2
- package/lib/schema-initializer/buttons/FormActionInitializers.d.ts +0 -116
- package/lib/schema-initializer/buttons/FormActionInitializers.js +106 -100
- package/lib/schema-initializer/buttons/GanttActionInitializers.d.ts +0 -19
- package/lib/schema-initializer/buttons/GridCardActionInitializers.d.ts +195 -0
- package/lib/schema-initializer/buttons/GridCardActionInitializers.js +285 -0
- package/lib/schema-initializer/buttons/ListActionInitializers.d.ts +195 -0
- package/lib/schema-initializer/buttons/ListActionInitializers.js +285 -0
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
- package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +0 -20
- package/lib/schema-initializer/buttons/TableActionInitializers.js +29 -35
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +4 -1
- package/lib/schema-initializer/buttons/index.d.ts +3 -0
- package/lib/schema-initializer/buttons/index.js +22 -0
- package/lib/schema-initializer/components/BulkEditField.js +7 -5
- package/lib/schema-initializer/components/CreateRecordAction.d.ts +2 -1
- package/lib/schema-initializer/components/CreateRecordAction.js +58 -35
- package/lib/schema-initializer/components/DeletedField.d.ts +1 -0
- package/lib/schema-initializer/components/DeletedField.js +19 -0
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +34 -22
- package/lib/schema-initializer/items/ExpandActionInitializer.d.ts +0 -1
- package/lib/schema-initializer/items/ExpandActionInitializer.js +11 -37
- package/lib/schema-initializer/items/GridCardBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/GridCardBlockInitializer.js +55 -0
- package/lib/schema-initializer/items/ListBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/ListBlockInitializer.js +55 -0
- package/lib/schema-initializer/items/SelectActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/SelectActionInitializer.js +73 -0
- package/lib/schema-initializer/items/index.d.ts +3 -0
- package/lib/schema-initializer/items/index.js +33 -0
- package/lib/schema-initializer/utils.d.ts +112 -0
- package/lib/schema-initializer/utils.js +227 -39
- package/lib/schema-items/GeneralSchemaItems.d.ts +4 -0
- package/lib/schema-items/GeneralSchemaItems.js +156 -0
- package/lib/schema-items/index.d.ts +1 -0
- package/lib/schema-items/index.js +11 -0
- package/lib/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -0
- package/lib/schema-settings/DataTemplates/FormDataTemplates.js +119 -41
- package/lib/schema-settings/DataTemplates/components/Designer.d.ts +7 -0
- package/lib/schema-settings/DataTemplates/components/Designer.js +188 -0
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +6 -1
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +204 -95
- package/lib/schema-settings/GeneralSchemaDesigner.js +21 -15
- package/lib/schema-settings/LinkageRules/FilterDynamicComponent.js +1 -1
- package/lib/schema-settings/LinkageRules/Variables.d.ts +1 -1
- package/lib/schema-settings/LinkageRules/Variables.js +7 -4
- package/lib/schema-settings/SchemaSettings.d.ts +1 -1
- package/lib/schema-settings/SchemaSettings.js +53 -29
- package/lib/schema-settings/VariableInput/hooks/useUserVariable.js +1 -1
- package/lib/schema-settings/hooks/useIsShowMultipleSwitch.d.ts +4 -0
- package/lib/schema-settings/hooks/useIsShowMultipleSwitch.js +24 -0
- package/lib/user/CurrentUser.js +116 -8
- package/package.json +5 -6
- package/tsconfig.json +8 -0
package/lib/locale/ja_JP.d.ts
CHANGED
|
@@ -421,7 +421,7 @@ declare const _default: {
|
|
|
421
421
|
"Skip required validation": string;
|
|
422
422
|
"Form values": string;
|
|
423
423
|
"Fields values": string;
|
|
424
|
-
'The field has
|
|
424
|
+
'The field has been deleted': string;
|
|
425
425
|
"When submitting the following fields, the saved values are": string;
|
|
426
426
|
"After successful submission": string;
|
|
427
427
|
Then: string;
|
|
@@ -554,8 +554,14 @@ declare const _default: {
|
|
|
554
554
|
"Edit block title": string;
|
|
555
555
|
"Province/city/area name": string;
|
|
556
556
|
"Field component": string;
|
|
557
|
+
"Allow multiple": string;
|
|
558
|
+
"Quick upload": string;
|
|
559
|
+
"Select file": string;
|
|
557
560
|
Subtable: string;
|
|
558
561
|
Subform: string;
|
|
562
|
+
"Sub-details": string;
|
|
563
|
+
"Field mode": string;
|
|
564
|
+
"Allow add new data": string;
|
|
559
565
|
"Regular expression": string;
|
|
560
566
|
"Enabled languages": string;
|
|
561
567
|
"View all plugins": string;
|
|
@@ -608,5 +614,6 @@ declare const _default: {
|
|
|
608
614
|
'Add template': string;
|
|
609
615
|
'Display data template selector': string;
|
|
610
616
|
'Form data templates': string;
|
|
617
|
+
"Data template": string;
|
|
611
618
|
};
|
|
612
619
|
export default _default;
|
package/lib/locale/ja_JP.js
CHANGED
|
@@ -427,7 +427,7 @@ var _default = {
|
|
|
427
427
|
"Skip required validation": "必須のバリデーションをスキップ",
|
|
428
428
|
"Form values": "フォームの値",
|
|
429
429
|
"Fields values": "フィールドの値",
|
|
430
|
-
'The field has
|
|
430
|
+
'The field has been deleted': 'フィールドが削除されました',
|
|
431
431
|
"When submitting the following fields, the saved values are": "次のフィールドを送信すると、保存された値は",
|
|
432
432
|
"After successful submission": "送信が成功した後",
|
|
433
433
|
"Then": "その後",
|
|
@@ -560,8 +560,14 @@ var _default = {
|
|
|
560
560
|
"Edit block title": "ブロックタイトルを編集",
|
|
561
561
|
"Province/city/area name": "Province/city/area name",
|
|
562
562
|
"Field component": "フィールドコンポーネント",
|
|
563
|
+
"Allow multiple": "複数選択を許可する",
|
|
564
|
+
"Quick upload": "クイックアップロード",
|
|
565
|
+
"Select file": "ファイルを選択",
|
|
563
566
|
"Subtable": "サブテーブル",
|
|
564
567
|
"Subform": "サブフォーム",
|
|
568
|
+
"Sub-details": "サブリスト",
|
|
569
|
+
"Field mode": "フィールドコンポーネント",
|
|
570
|
+
"Allow add new data": "データの追加を許可",
|
|
565
571
|
"Regular expression": "正規表現",
|
|
566
572
|
"Enabled languages": "利用可能な言語",
|
|
567
573
|
"View all plugins": "すべてのプラグラインを見る",
|
|
@@ -614,6 +620,7 @@ var _default = {
|
|
|
614
620
|
'Data fields': 'データフィールド',
|
|
615
621
|
'Add template': 'テンプレートを追加',
|
|
616
622
|
'Display data template selector': 'データテンプレートセレクターを表示',
|
|
617
|
-
'Form data templates': 'フォームデータテンプレート'
|
|
623
|
+
'Form data templates': 'フォームデータテンプレート',
|
|
624
|
+
"Data template": "データテンプレート"
|
|
618
625
|
};
|
|
619
626
|
exports.default = _default;
|
package/lib/locale/pt_BR.d.ts
CHANGED
|
@@ -240,6 +240,9 @@ declare const _default: {
|
|
|
240
240
|
"Display association fields": string;
|
|
241
241
|
"Display field title": string;
|
|
242
242
|
"Field component": string;
|
|
243
|
+
"Quick upload": string;
|
|
244
|
+
"Select file": string;
|
|
245
|
+
"Allow multiple": string;
|
|
243
246
|
Subtable: string;
|
|
244
247
|
Subform: string;
|
|
245
248
|
"Record picker": string;
|
|
@@ -458,7 +461,7 @@ declare const _default: {
|
|
|
458
461
|
"Skip required validation": string;
|
|
459
462
|
"Form values": string;
|
|
460
463
|
"Fields values": string;
|
|
461
|
-
'The field has
|
|
464
|
+
'The field has been deleted': string;
|
|
462
465
|
"When submitting the following fields, the saved values are": string;
|
|
463
466
|
"After successful submission": string;
|
|
464
467
|
Then: string;
|
|
@@ -662,5 +665,6 @@ declare const _default: {
|
|
|
662
665
|
'Add template': string;
|
|
663
666
|
'Display data template selector': string;
|
|
664
667
|
'Form data templates': string;
|
|
668
|
+
"Data template": string;
|
|
665
669
|
};
|
|
666
670
|
export default _default;
|
package/lib/locale/pt_BR.js
CHANGED
|
@@ -246,6 +246,9 @@ var _default = {
|
|
|
246
246
|
"Display association fields": "Exibir campos de associação",
|
|
247
247
|
"Display field title": "Exibir título do campo",
|
|
248
248
|
"Field component": "Componente de campo",
|
|
249
|
+
"Quick upload": "Upload rápido",
|
|
250
|
+
"Select file": "Selecionar arquivo",
|
|
251
|
+
"Allow multiple": "Permitir múltiplos",
|
|
249
252
|
"Subtable": "Subtabela",
|
|
250
253
|
"Subform": "Subformulário",
|
|
251
254
|
"Record picker": "Selecionador de registros",
|
|
@@ -464,7 +467,7 @@ var _default = {
|
|
|
464
467
|
"Skip required validation": "Ignorar validação obrigatória",
|
|
465
468
|
"Form values": "Valores do formulário",
|
|
466
469
|
"Fields values": "campo removido",
|
|
467
|
-
'The field has
|
|
470
|
+
'The field has been deleted': 'O campo foi excluído',
|
|
468
471
|
"When submitting the following fields, the saved values are": "Ao enviar os seguintes campos, os valores salvos são",
|
|
469
472
|
"After successful submission": "Depois do envio bem-sucedido",
|
|
470
473
|
"Then": "Então",
|
|
@@ -667,6 +670,7 @@ var _default = {
|
|
|
667
670
|
'Data fields': 'Campos de dados',
|
|
668
671
|
'Add template': 'Adicionar modelo',
|
|
669
672
|
'Display data template selector': 'Exibir seletor de modelo de dados',
|
|
670
|
-
'Form data templates': 'Modelos de dados do formulário'
|
|
673
|
+
'Form data templates': 'Modelos de dados do formulário',
|
|
674
|
+
"Data template": "Modelo de dados"
|
|
671
675
|
};
|
|
672
676
|
exports.default = _default;
|
package/lib/locale/ru_RU.d.ts
CHANGED
|
@@ -363,7 +363,7 @@ declare const _default: {
|
|
|
363
363
|
"Skip required validation": string;
|
|
364
364
|
"Form values": string;
|
|
365
365
|
"Fields values": string;
|
|
366
|
-
'The field has
|
|
366
|
+
'The field has been deleted': string;
|
|
367
367
|
"When submitting the following fields, the saved values are": string;
|
|
368
368
|
"After successful submission": string;
|
|
369
369
|
Then: string;
|
|
@@ -492,6 +492,9 @@ declare const _default: {
|
|
|
492
492
|
"Edit block title": string;
|
|
493
493
|
"Province/city/area name": string;
|
|
494
494
|
"Field component": string;
|
|
495
|
+
"Allow multiple": string;
|
|
496
|
+
"Quick upload": string;
|
|
497
|
+
"Select file": string;
|
|
495
498
|
Subtable: string;
|
|
496
499
|
Subform: string;
|
|
497
500
|
"Regular expression": string;
|
|
@@ -516,5 +519,6 @@ declare const _default: {
|
|
|
516
519
|
'Add template': string;
|
|
517
520
|
'Display data template selector': string;
|
|
518
521
|
'Form data templates': string;
|
|
522
|
+
"Data template": string;
|
|
519
523
|
};
|
|
520
524
|
export default _default;
|
package/lib/locale/ru_RU.js
CHANGED
|
@@ -369,7 +369,7 @@ var _default = {
|
|
|
369
369
|
"Skip required validation": "Пропустить обязатеьную проверку",
|
|
370
370
|
"Form values": "Значения формы",
|
|
371
371
|
"Fields values": "Значения полей",
|
|
372
|
-
'The field has
|
|
372
|
+
'The field has been deleted': 'Поле было удалено',
|
|
373
373
|
"When submitting the following fields, the saved values are": "При отправке следующих полей, сохраненные значения такие",
|
|
374
374
|
"After successful submission": "После удачной отправки",
|
|
375
375
|
"Then": "Затем",
|
|
@@ -498,6 +498,9 @@ var _default = {
|
|
|
498
498
|
"Edit block title": "Изменить заголовок блока",
|
|
499
499
|
"Province/city/area name": "Имя области/города/района",
|
|
500
500
|
"Field component": "Компонент поля",
|
|
501
|
+
"Allow multiple": "Разрешить множественный выбор",
|
|
502
|
+
"Quick upload": "Быстрая загрузка",
|
|
503
|
+
"Select file": "Выбрать файл",
|
|
501
504
|
"Subtable": "Подтаблица",
|
|
502
505
|
"Subform": "Подформа",
|
|
503
506
|
"Regular expression": "Образец",
|
|
@@ -521,6 +524,7 @@ var _default = {
|
|
|
521
524
|
'Data fields': "Поля данных",
|
|
522
525
|
'Add template': "Добавить шаблон",
|
|
523
526
|
'Display data template selector': "Отображать селектор шаблона данных",
|
|
524
|
-
'Form data templates': "Шаблоны данных формы"
|
|
527
|
+
'Form data templates': "Шаблоны данных формы",
|
|
528
|
+
"Data template": "Шаблон данных"
|
|
525
529
|
};
|
|
526
530
|
exports.default = _default;
|
package/lib/locale/tr_TR.d.ts
CHANGED
|
@@ -362,7 +362,7 @@ declare const _default: {
|
|
|
362
362
|
"Skip required validation": string;
|
|
363
363
|
"Form values": string;
|
|
364
364
|
"Fields values": string;
|
|
365
|
-
'The field has
|
|
365
|
+
'The field has been deleted': string;
|
|
366
366
|
"When submitting the following fields, the saved values are": string;
|
|
367
367
|
"After successful submission": string;
|
|
368
368
|
Then: string;
|
|
@@ -491,6 +491,9 @@ declare const _default: {
|
|
|
491
491
|
operater: string;
|
|
492
492
|
"Province/city/area name": string;
|
|
493
493
|
"Field component": string;
|
|
494
|
+
"Allow multiple": string;
|
|
495
|
+
"Quick upload": string;
|
|
496
|
+
"Select file": string;
|
|
494
497
|
Subtable: string;
|
|
495
498
|
Subform: string;
|
|
496
499
|
"Regular expression": string;
|
|
@@ -515,5 +518,6 @@ declare const _default: {
|
|
|
515
518
|
'Add template': string;
|
|
516
519
|
'Display data template selector': string;
|
|
517
520
|
'Form data templates': string;
|
|
521
|
+
"Data template": string;
|
|
518
522
|
};
|
|
519
523
|
export default _default;
|
package/lib/locale/tr_TR.js
CHANGED
|
@@ -368,7 +368,7 @@ var _default = {
|
|
|
368
368
|
"Skip required validation": "Zorunlu alan kontrollerini atla",
|
|
369
369
|
"Form values": "Form değerleri",
|
|
370
370
|
"Fields values": "Alanların değerleri",
|
|
371
|
-
'The field has
|
|
371
|
+
'The field has been deleted': 'Alan silindi',
|
|
372
372
|
"When submitting the following fields, the saved values are": "Aşağıdaki alanlar gönderilirken kaydedilen değerler",
|
|
373
373
|
"After successful submission": "Başarılı gönderimden sonra",
|
|
374
374
|
"Then": "Then",
|
|
@@ -497,6 +497,9 @@ var _default = {
|
|
|
497
497
|
"operater": "operatör",
|
|
498
498
|
"Province/city/area name": "Semt/şehir/bölge adı",
|
|
499
499
|
"Field component": "Alan bileşeni",
|
|
500
|
+
"Allow multiple": "Birden çok izin ver",
|
|
501
|
+
"Quick upload": "Hızlı yükleme",
|
|
502
|
+
"Select file": "Dosya seç",
|
|
500
503
|
"Subtable": "Alttablo",
|
|
501
504
|
"Subform": "Altform",
|
|
502
505
|
"Regular expression": "Model(Pattern)",
|
|
@@ -520,6 +523,7 @@ var _default = {
|
|
|
520
523
|
'Data fields': 'Veri alanları',
|
|
521
524
|
'Add template': 'Şablon ekle',
|
|
522
525
|
'Display data template selector': 'Veri şablonu seçicisini görüntüle',
|
|
523
|
-
'Form data templates': 'Form veri şablonları'
|
|
526
|
+
'Form data templates': 'Form veri şablonları',
|
|
527
|
+
"Data template": "Veri şablonu"
|
|
524
528
|
};
|
|
525
529
|
exports.default = _default;
|
package/lib/locale/zh_CN.d.ts
CHANGED
|
@@ -120,6 +120,17 @@ declare const _default: {
|
|
|
120
120
|
"Filter blocks": string;
|
|
121
121
|
Table: string;
|
|
122
122
|
Form: string;
|
|
123
|
+
List: string;
|
|
124
|
+
"Grid Card": string;
|
|
125
|
+
"Screen size": string;
|
|
126
|
+
pixels: string;
|
|
127
|
+
"Display title": string;
|
|
128
|
+
'Set the count of columns displayed in a row': string;
|
|
129
|
+
Column: string;
|
|
130
|
+
'Phone device': string;
|
|
131
|
+
'Tablet device': string;
|
|
132
|
+
'Desktop device': string;
|
|
133
|
+
'Large screen device': string;
|
|
123
134
|
"Table OID(Inheritance)": string;
|
|
124
135
|
Collapse: string;
|
|
125
136
|
"Select data source": string;
|
|
@@ -298,13 +309,19 @@ declare const _default: {
|
|
|
298
309
|
"Display association fields": string;
|
|
299
310
|
"Display field title": string;
|
|
300
311
|
"Field component": string;
|
|
312
|
+
"Allow multiple": string;
|
|
313
|
+
"Quick upload": string;
|
|
314
|
+
"Select file": string;
|
|
301
315
|
Subtable: string;
|
|
302
316
|
Subform: string;
|
|
317
|
+
"Sub-details": string;
|
|
303
318
|
"Record picker": string;
|
|
304
319
|
"Toggles the subfield mode": string;
|
|
305
320
|
"Selector mode": string;
|
|
306
321
|
"Subtable mode": string;
|
|
307
322
|
"Subform mode": string;
|
|
323
|
+
"Field mode": string;
|
|
324
|
+
"Allow add new data": string;
|
|
308
325
|
"Edit block title": string;
|
|
309
326
|
"Block title": string;
|
|
310
327
|
Pattern: string;
|
|
@@ -516,7 +533,7 @@ declare const _default: {
|
|
|
516
533
|
'Skip required validation': string;
|
|
517
534
|
'Form values': string;
|
|
518
535
|
'Fields values': string;
|
|
519
|
-
'The field has
|
|
536
|
+
'The field has been deleted': string;
|
|
520
537
|
'When submitting the following fields, the saved values are': string;
|
|
521
538
|
'After successful submission': string;
|
|
522
539
|
Then: string;
|
|
@@ -726,5 +743,14 @@ declare const _default: {
|
|
|
726
743
|
'Add template': string;
|
|
727
744
|
'Display data template selector': string;
|
|
728
745
|
'Form data templates': string;
|
|
746
|
+
'Data template': string;
|
|
747
|
+
'Reload application': string;
|
|
748
|
+
'The application is reloading, please do not close the page.': string;
|
|
749
|
+
'Application reloading': string;
|
|
750
|
+
'Reboot application': string;
|
|
751
|
+
"Allows to clear cache, reboot application": string;
|
|
752
|
+
'The will interrupt service, it may take a few seconds to restart. Are you sure to continue?': string;
|
|
753
|
+
Reboot: string;
|
|
754
|
+
'Clear cache': string;
|
|
729
755
|
};
|
|
730
756
|
export default _default;
|
package/lib/locale/zh_CN.js
CHANGED
|
@@ -126,6 +126,17 @@ var _default = {
|
|
|
126
126
|
"Filter blocks": "筛选区块",
|
|
127
127
|
"Table": "表格",
|
|
128
128
|
"Form": "表单",
|
|
129
|
+
"List": "列表",
|
|
130
|
+
"Grid Card": "网格卡片",
|
|
131
|
+
"Screen size": "屏幕尺寸",
|
|
132
|
+
"pixels": "像素",
|
|
133
|
+
"Display title": "显示标题",
|
|
134
|
+
'Set the count of columns displayed in a row': "设置一行展示的列数",
|
|
135
|
+
'Column': '列',
|
|
136
|
+
'Phone device': '手机设备',
|
|
137
|
+
'Tablet device': '平板设备',
|
|
138
|
+
'Desktop device': '电脑设备',
|
|
139
|
+
'Large screen device': '大屏幕设备',
|
|
129
140
|
"Table OID(Inheritance)": "数据表 OID(继承)",
|
|
130
141
|
"Collapse": "折叠面板",
|
|
131
142
|
"Select data source": "选择数据源",
|
|
@@ -304,13 +315,19 @@ var _default = {
|
|
|
304
315
|
"Display association fields": "显示关联表的字段",
|
|
305
316
|
"Display field title": "显示字段标题",
|
|
306
317
|
"Field component": "字段组件",
|
|
318
|
+
"Allow multiple": "允许多选",
|
|
319
|
+
"Quick upload": "快速上传",
|
|
320
|
+
"Select file": "选择文件",
|
|
307
321
|
"Subtable": "子表格",
|
|
308
322
|
"Subform": "子表单",
|
|
323
|
+
"Sub-details": "子详情",
|
|
309
324
|
"Record picker": "数据选择器",
|
|
310
325
|
"Toggles the subfield mode": "切换子字段模式",
|
|
311
326
|
"Selector mode": "选择器模式",
|
|
312
327
|
"Subtable mode": "子表格模式",
|
|
313
328
|
"Subform mode": "子表单模式",
|
|
329
|
+
"Field mode": "字段组件",
|
|
330
|
+
"Allow add new data": "允许添加数据",
|
|
314
331
|
"Edit block title": "编辑区块标题",
|
|
315
332
|
"Block title": "区块标题",
|
|
316
333
|
"Pattern": "模式",
|
|
@@ -522,7 +539,7 @@ var _default = {
|
|
|
522
539
|
'Skip required validation': '跳过必填校验',
|
|
523
540
|
'Form values': '表单值',
|
|
524
541
|
'Fields values': '字段值',
|
|
525
|
-
'The field has
|
|
542
|
+
'The field has been deleted': '字段已删除',
|
|
526
543
|
'When submitting the following fields, the saved values are': '提交以下字段时,保存的值为',
|
|
527
544
|
'After successful submission': '提交成功后',
|
|
528
545
|
'Then': '然后',
|
|
@@ -732,6 +749,15 @@ var _default = {
|
|
|
732
749
|
'Data fields': '数据字段',
|
|
733
750
|
'Add template': '添加模板',
|
|
734
751
|
'Display data template selector': '显示数据模板选择框',
|
|
735
|
-
'Form data templates': '表单数据模板'
|
|
752
|
+
'Form data templates': '表单数据模板',
|
|
753
|
+
'Data template': '数据模板',
|
|
754
|
+
'Reload application': '重载应用',
|
|
755
|
+
'The application is reloading, please do not close the page.': '应用正在重新加载,请勿关闭页面。',
|
|
756
|
+
'Application reloading': '应用重新加载中',
|
|
757
|
+
'Reboot application': '重启应用',
|
|
758
|
+
"Allows to clear cache, reboot application": "允许清除缓存,重启应用",
|
|
759
|
+
'The will interrupt service, it may take a few seconds to restart. Are you sure to continue?': '重启将会中断当前服务,这个过程可能需要一点时间,确定要继续吗?',
|
|
760
|
+
'Reboot': '重启',
|
|
761
|
+
'Clear cache': '清除缓存'
|
|
736
762
|
};
|
|
737
763
|
exports.default = _default;
|
|
@@ -5,6 +5,10 @@ export declare const RecordProvider: React.FC<{
|
|
|
5
5
|
record: any;
|
|
6
6
|
parent?: any;
|
|
7
7
|
}>;
|
|
8
|
+
export declare const RecordSimpleProvider: React.FC<{
|
|
9
|
+
value: Record<string, any>;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}>;
|
|
8
12
|
export declare const RecordIndexProvider: React.FC<{
|
|
9
13
|
index: any;
|
|
10
14
|
}>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.RecordProvider = exports.RecordIndexProvider = exports.RecordIndexContext = exports.RecordContext = void 0;
|
|
6
|
+
exports.RecordSimpleProvider = exports.RecordProvider = exports.RecordIndexProvider = exports.RecordIndexContext = exports.RecordContext = void 0;
|
|
7
7
|
exports.useRecord = useRecord;
|
|
8
8
|
exports.useRecordIndex = useRecordIndex;
|
|
9
9
|
exports.useRecordIsOwn = void 0;
|
|
@@ -34,6 +34,10 @@ var RecordProvider = function RecordProvider(props) {
|
|
|
34
34
|
}, children);
|
|
35
35
|
};
|
|
36
36
|
exports.RecordProvider = RecordProvider;
|
|
37
|
+
var RecordSimpleProvider = function RecordSimpleProvider(props) {
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(RecordContext.Provider, _objectSpread({}, props));
|
|
39
|
+
};
|
|
40
|
+
exports.RecordSimpleProvider = RecordSimpleProvider;
|
|
37
41
|
var RecordIndexProvider = function RecordIndexProvider(props) {
|
|
38
42
|
var index = props.index,
|
|
39
43
|
children = props.children;
|
|
@@ -66,6 +66,7 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
66
66
|
dn = _useDesignable.dn;
|
|
67
67
|
var _useTranslation2 = (0, _reactI18next.useTranslation)(),
|
|
68
68
|
t = _useTranslation2.t;
|
|
69
|
+
var isAction = (0, _hooks.useLinkageAction)();
|
|
69
70
|
var isPopupAction = ['create', 'update', 'view', 'customize:popup'].includes(fieldSchema['x-action'] || '');
|
|
70
71
|
var isUpdateModePopupAction = ['customize:bulkUpdate', 'customize:bulkEdit'].includes(fieldSchema['x-action']);
|
|
71
72
|
var _useState = (0, _react2.useState)(),
|
|
@@ -73,10 +74,11 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
73
74
|
initialSchema = _useState2[0],
|
|
74
75
|
setInitialSchema = _useState2[1];
|
|
75
76
|
var actionType = (_fieldSchema$xAction = fieldSchema['x-action']) !== null && _fieldSchema$xAction !== void 0 ? _fieldSchema$xAction : '';
|
|
76
|
-
var isLinkageAction = linkageAction ||
|
|
77
|
+
var isLinkageAction = linkageAction || isAction;
|
|
77
78
|
var isChildCollectionAction = getChildrenCollections(name).length > 0 && fieldSchema['x-action'] === 'create';
|
|
78
|
-
var isSupportEditButton = fieldSchema['x-action'] !== 'expandAll';
|
|
79
79
|
var isLink = fieldSchema['x-component'] === 'Action.Link';
|
|
80
|
+
var isDelete = (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.parent['x-component']) === 'CollectionField';
|
|
81
|
+
var isDraggable = (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.parent['x-component']) !== 'CollectionField';
|
|
80
82
|
(0, _react2.useEffect)(function () {
|
|
81
83
|
var schemaUid = (0, _shared.uid)();
|
|
82
84
|
var schema = {
|
|
@@ -92,7 +94,8 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
92
94
|
'customize:save': t('After clicking the custom button, the following fields of the current record will be saved according to the following form.')
|
|
93
95
|
};
|
|
94
96
|
return /*#__PURE__*/_react2.default.createElement(_schemaSettings.GeneralSchemaDesigner, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
95
|
-
disableInitializer: true
|
|
97
|
+
disableInitializer: true,
|
|
98
|
+
draggable: isDraggable
|
|
96
99
|
}), /*#__PURE__*/_react2.default.createElement(MenuGroup, null, /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ModalItem, {
|
|
97
100
|
title: t('Edit button'),
|
|
98
101
|
schema: {
|
|
@@ -104,8 +107,7 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
104
107
|
'x-component': 'Input',
|
|
105
108
|
title: t('Button title'),
|
|
106
109
|
default: fieldSchema.title,
|
|
107
|
-
'x-component-props': {}
|
|
108
|
-
'x-visible': isSupportEditButton
|
|
110
|
+
'x-component-props': {}
|
|
109
111
|
// description: `原字段标题:${collectionField?.uiSchema?.title}`,
|
|
110
112
|
},
|
|
111
113
|
|
|
@@ -115,7 +117,7 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
115
117
|
title: t('Button icon'),
|
|
116
118
|
default: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xCompon = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon === void 0 ? void 0 : _fieldSchema$xCompon.icon,
|
|
117
119
|
'x-component-props': {},
|
|
118
|
-
'x-visible':
|
|
120
|
+
'x-visible': !isLink
|
|
119
121
|
// description: `原字段标题:${collectionField?.uiSchema?.title}`,
|
|
120
122
|
},
|
|
121
123
|
|
|
@@ -296,7 +298,7 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
296
298
|
}
|
|
297
299
|
}), isChildCollectionAction && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.EnableChildCollections, {
|
|
298
300
|
collectionName: name
|
|
299
|
-
}), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.Divider, null), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.Remove, {
|
|
301
|
+
}), !isDelete && [/*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.Divider, null), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.Remove, {
|
|
300
302
|
removeParentsIfNoChildren: true,
|
|
301
303
|
breakRemoveOn: function breakRemoveOn(s) {
|
|
302
304
|
return s['x-component'] === 'Space' || s['x-component'].endsWith('ActionBar');
|
|
@@ -304,6 +306,6 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
304
306
|
confirm: {
|
|
305
307
|
title: t('Delete action')
|
|
306
308
|
}
|
|
307
|
-
})));
|
|
309
|
+
})]));
|
|
308
310
|
};
|
|
309
311
|
exports.ActionDesigner = ActionDesigner;
|
|
@@ -26,6 +26,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
26
26
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
27
|
var openSizeWidthMap = new Map([['small', '30%'], ['middle', '50%'], ['large', '70%']]);
|
|
28
28
|
var ActionDrawer = (0, _react.observer)(function (props) {
|
|
29
|
+
var _schema$parent, _schema$parent$xComp;
|
|
29
30
|
var _props$footerNodeName = props.footerNodeName,
|
|
30
31
|
footerNodeName = _props$footerNodeName === void 0 ? 'Action.Drawer.Footer' : _props$footerNodeName,
|
|
31
32
|
others = _objectWithoutProperties(props, _excluded);
|
|
@@ -38,6 +39,8 @@ var ActionDrawer = (0, _react.observer)(function (props) {
|
|
|
38
39
|
openSize = _useActionContext$ope === void 0 ? 'middle' : _useActionContext$ope;
|
|
39
40
|
var schema = (0, _react.useFieldSchema)();
|
|
40
41
|
var field = (0, _react.useField)();
|
|
42
|
+
var openSizeFromParent = (_schema$parent = schema.parent) === null || _schema$parent === void 0 ? void 0 : (_schema$parent$xComp = _schema$parent['x-component-props']) === null || _schema$parent$xComp === void 0 ? void 0 : _schema$parent$xComp['openSize'];
|
|
43
|
+
var finalOpenSize = openSizeFromParent || openSize;
|
|
41
44
|
var footerSchema = schema.reduceProperties(function (buf, s) {
|
|
42
45
|
if (s['x-component'] === footerNodeName) {
|
|
43
46
|
return s;
|
|
@@ -49,7 +52,7 @@ var ActionDrawer = (0, _react.observer)(function (props) {
|
|
|
49
52
|
e.stopPropagation();
|
|
50
53
|
}
|
|
51
54
|
}, /*#__PURE__*/_react2.default.createElement(_antd.Drawer, _objectSpread(_objectSpread({
|
|
52
|
-
width: openSizeWidthMap.get(
|
|
55
|
+
width: openSizeWidthMap.get(finalOpenSize),
|
|
53
56
|
title: field.title
|
|
54
57
|
}, others), {}, {
|
|
55
58
|
destroyOnClose: true,
|
|
@@ -13,7 +13,7 @@ var _schemaInitializer = require("../../../schema-initializer");
|
|
|
13
13
|
var _common = require("../../common");
|
|
14
14
|
var _hooks = require("../../hooks");
|
|
15
15
|
var _templateObject;
|
|
16
|
-
var _excluded = ["layout", "style"];
|
|
16
|
+
var _excluded = ["layout", "style", "spaceProps"];
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
19
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -25,34 +25,39 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
25
25
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
26
26
|
var ActionBar = (0, _react.observer)(function (props) {
|
|
27
27
|
var _fieldSchema$properti;
|
|
28
|
-
var
|
|
29
|
-
layout =
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
var _useProps = (0, _hooks.useProps)(props),
|
|
29
|
+
_useProps$layout = _useProps.layout,
|
|
30
|
+
layout = _useProps$layout === void 0 ? 'tow-columns' : _useProps$layout,
|
|
31
|
+
style = _useProps.style,
|
|
32
|
+
spaceProps = _useProps.spaceProps,
|
|
33
|
+
others = _objectWithoutProperties(_useProps, _excluded);
|
|
32
34
|
var fieldSchema = (0, _react.useFieldSchema)();
|
|
33
35
|
var _useSchemaInitializer = (0, _schemaInitializer.useSchemaInitializer)(fieldSchema['x-initializer']),
|
|
34
|
-
|
|
36
|
+
InitializerComponent = _useSchemaInitializer.InitializerComponent;
|
|
35
37
|
var _useDesignable = (0, _hooks.useDesignable)(),
|
|
36
38
|
designable = _useDesignable.designable;
|
|
37
39
|
if (layout === 'one-column') {
|
|
38
|
-
return /*#__PURE__*/_react2.default.createElement(_common.DndContext, null, /*#__PURE__*/_react2.default.createElement("div", _objectSpread({
|
|
40
|
+
return /*#__PURE__*/_react2.default.createElement(_common.DndContext, null, /*#__PURE__*/_react2.default.createElement("div", _objectSpread(_objectSpread({
|
|
39
41
|
style: _objectSpread({
|
|
40
|
-
display: 'flex'
|
|
42
|
+
display: 'flex',
|
|
43
|
+
alignItems: 'center'
|
|
41
44
|
}, style)
|
|
42
|
-
}, others),
|
|
45
|
+
}, others), {}, {
|
|
46
|
+
className: (0, _css.cx)(others.className, 'nb-action-bar')
|
|
47
|
+
}), props.children && /*#__PURE__*/_react2.default.createElement("div", {
|
|
43
48
|
style: {
|
|
44
49
|
marginRight: 8
|
|
45
50
|
}
|
|
46
|
-
}, /*#__PURE__*/_react2.default.createElement(_antd.Space,
|
|
51
|
+
}, /*#__PURE__*/_react2.default.createElement(_antd.Space, _objectSpread({}, spaceProps), fieldSchema.mapProperties(function (schema, key) {
|
|
47
52
|
return /*#__PURE__*/_react2.default.createElement(_react.RecursionField, {
|
|
48
53
|
key: key,
|
|
49
54
|
name: key,
|
|
50
55
|
schema: schema
|
|
51
56
|
});
|
|
52
|
-
}))),
|
|
57
|
+
}))), /*#__PURE__*/_react2.default.createElement(InitializerComponent, null)));
|
|
53
58
|
}
|
|
54
59
|
var hasActions = Object.keys((_fieldSchema$properti = fieldSchema.properties) !== null && _fieldSchema$properti !== void 0 ? _fieldSchema$properti : {}).length > 0;
|
|
55
|
-
return /*#__PURE__*/_react2.default.createElement("div", _objectSpread({
|
|
60
|
+
return /*#__PURE__*/_react2.default.createElement("div", _objectSpread(_objectSpread({
|
|
56
61
|
style: !designable && !hasActions ? undefined : _objectSpread({
|
|
57
62
|
display: 'flex',
|
|
58
63
|
justifyContent: 'space-between',
|
|
@@ -60,7 +65,9 @@ var ActionBar = (0, _react.observer)(function (props) {
|
|
|
60
65
|
overflowX: 'auto',
|
|
61
66
|
flexShrink: 0
|
|
62
67
|
}, style)
|
|
63
|
-
}, others),
|
|
68
|
+
}, others), {}, {
|
|
69
|
+
className: (0, _css.cx)(others.className, 'nb-action-bar')
|
|
70
|
+
}), /*#__PURE__*/_react2.default.createElement("div", {
|
|
64
71
|
className: (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-space:last-child {\n margin-left: 8px;\n }\n "]))),
|
|
65
72
|
style: {
|
|
66
73
|
display: 'flex',
|
|
@@ -68,7 +75,7 @@ var ActionBar = (0, _react.observer)(function (props) {
|
|
|
68
75
|
alignItems: 'center',
|
|
69
76
|
width: '100%'
|
|
70
77
|
}
|
|
71
|
-
}, /*#__PURE__*/_react2.default.createElement(_common.DndContext, null, /*#__PURE__*/_react2.default.createElement(_antd.Space,
|
|
78
|
+
}, /*#__PURE__*/_react2.default.createElement(_common.DndContext, null, /*#__PURE__*/_react2.default.createElement(_antd.Space, _objectSpread({}, spaceProps), fieldSchema.mapProperties(function (schema, key) {
|
|
72
79
|
if (schema['x-align'] !== 'left') {
|
|
73
80
|
return null;
|
|
74
81
|
}
|
|
@@ -77,7 +84,7 @@ var ActionBar = (0, _react.observer)(function (props) {
|
|
|
77
84
|
name: key,
|
|
78
85
|
schema: schema
|
|
79
86
|
});
|
|
80
|
-
})), /*#__PURE__*/_react2.default.createElement(_antd.Space,
|
|
87
|
+
})), /*#__PURE__*/_react2.default.createElement(_antd.Space, _objectSpread({}, spaceProps), fieldSchema.mapProperties(function (schema, key) {
|
|
81
88
|
if (schema['x-align'] === 'left') {
|
|
82
89
|
return null;
|
|
83
90
|
}
|
|
@@ -86,6 +93,6 @@ var ActionBar = (0, _react.observer)(function (props) {
|
|
|
86
93
|
name: key,
|
|
87
94
|
schema: schema
|
|
88
95
|
});
|
|
89
|
-
})))),
|
|
96
|
+
})))), /*#__PURE__*/_react2.default.createElement(InitializerComponent, null));
|
|
90
97
|
});
|
|
91
98
|
exports.ActionBar = ActionBar;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AssociationFieldProvider = void 0;
|
|
8
|
+
var _react = require("@formily/react");
|
|
9
|
+
var _react2 = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _collectionManager = require("../../../collection-manager");
|
|
11
|
+
var _context = require("./context");
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
var AssociationFieldProvider = (0, _react.observer)(function (props) {
|
|
15
|
+
var _fieldSchema$xCompon2;
|
|
16
|
+
var field = (0, _react.useField)();
|
|
17
|
+
var _useCollectionManager = (0, _collectionManager.useCollectionManager)(),
|
|
18
|
+
getCollectionJoinField = _useCollectionManager.getCollectionJoinField,
|
|
19
|
+
getCollection = _useCollectionManager.getCollection;
|
|
20
|
+
var fieldSchema = (0, _react.useFieldSchema)();
|
|
21
|
+
var collectionField = (0, _react2.useMemo)(function () {
|
|
22
|
+
return getCollectionJoinField(fieldSchema['x-collection-field']);
|
|
23
|
+
}, [fieldSchema['x-collection-field'], fieldSchema.name]);
|
|
24
|
+
var isFileCollection = (0, _react2.useMemo)(function () {
|
|
25
|
+
var _getCollection;
|
|
26
|
+
return ((_getCollection = getCollection(collectionField === null || collectionField === void 0 ? void 0 : collectionField.target)) === null || _getCollection === void 0 ? void 0 : _getCollection.template) === 'file';
|
|
27
|
+
}, [fieldSchema['x-collection-field']]);
|
|
28
|
+
var currentMode = (0, _react2.useMemo)(function () {
|
|
29
|
+
var _fieldSchema$xCompon;
|
|
30
|
+
return ((_fieldSchema$xCompon = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon === void 0 ? void 0 : _fieldSchema$xCompon.mode) || (isFileCollection ? 'FileManager' : 'Select');
|
|
31
|
+
}, [(_fieldSchema$xCompon2 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon2 === void 0 ? void 0 : _fieldSchema$xCompon2.mode]);
|
|
32
|
+
return collectionField ? /*#__PURE__*/_react2.default.createElement(_context.AssociationFieldContext.Provider, {
|
|
33
|
+
value: {
|
|
34
|
+
options: collectionField,
|
|
35
|
+
field: field,
|
|
36
|
+
currentMode: currentMode
|
|
37
|
+
}
|
|
38
|
+
}, props.children) : null;
|
|
39
|
+
});
|
|
40
|
+
exports.AssociationFieldProvider = AssociationFieldProvider;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RemoteSelectProps } from '../remote-select';
|
|
3
|
+
export declare type AssociationSelectProps<P = any> = RemoteSelectProps<P> & {
|
|
4
|
+
action?: string;
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
};
|
|
7
|
+
interface AssociationSelectInterface {
|
|
8
|
+
(props: any): React.ReactElement;
|
|
9
|
+
Designer: React.FC;
|
|
10
|
+
FilterDesigner: React.FC;
|
|
11
|
+
}
|
|
12
|
+
export declare const AssociationSelect: AssociationSelectInterface;
|
|
13
|
+
export declare const AssociationSelectReadPretty: React.ForwardRefExoticComponent<Pick<Partial<any>, string | number | symbol> & React.RefAttributes<unknown>>;
|
|
14
|
+
export {};
|