@nocobase/client 0.9.2-alpha.2 → 0.9.2-alpha.3
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/Configuration/FilterDynamicComponent.d.ts +2 -0
- package/es/{schema-component/antd/table-v2/hooks/useUserVariable.js → acl/Configuration/FilterDynamicComponent.js} +32 -4
- package/es/acl/Configuration/schemas/scopes.js +3 -0
- package/es/application/Application.d.ts +1 -0
- package/es/application/Application.js +12 -2
- package/es/block-provider/FormFieldProvider.js +9 -1
- package/es/block-provider/TableSelectorProvider.js +3 -2
- package/es/block-provider/hooks/index.js +18 -13
- package/es/board/CardAdder.js +1 -1
- package/es/board/ColumnForm.js +4 -4
- package/es/board/DefaultColumnHeader.d.ts +1 -1
- package/es/board/DefaultColumnHeader.js +6 -6
- package/es/collection-manager/CollectionField.js +16 -13
- package/es/collection-manager/CollectionManagerProvider.js +10 -2
- package/es/collection-manager/Configuration/AddCollectionAction.js +1 -1
- package/es/collection-manager/Configuration/CollectionFields.d.ts +2 -0
- package/es/collection-manager/Configuration/CollectionFields.js +458 -0
- package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +3 -3
- package/es/collection-manager/Configuration/ConfigurationTable.js +4 -2
- package/es/collection-manager/Configuration/ConfigurationTabs.js +6 -2
- package/es/collection-manager/Configuration/EditCollectionAction.js +4 -4
- package/es/collection-manager/Configuration/EditFieldAction.js +1 -1
- package/es/collection-manager/Configuration/OverridingCollectionField.js +1 -1
- package/es/collection-manager/Configuration/schemas/collectionFields.d.ts +2 -0
- package/es/collection-manager/Configuration/schemas/collectionFields.js +1 -1
- package/es/collection-manager/Configuration/schemas/collections.js +8 -5
- package/es/collection-manager/action-hooks.d.ts +2 -1
- package/es/collection-manager/action-hooks.js +10 -7
- package/es/collection-manager/hooks/useCollectionDataSource.js +2 -2
- package/es/collection-manager/hooks/useCollectionManager.d.ts +1 -0
- package/es/collection-manager/hooks/useCollectionManager.js +2 -0
- package/es/collection-manager/interfaces/checkbox.js +7 -0
- package/es/collection-manager/interfaces/checkboxGroup.js +7 -0
- package/es/collection-manager/interfaces/components/index.js +1 -1
- package/es/collection-manager/interfaces/createdBy.js +5 -1
- package/es/collection-manager/interfaces/email.js +7 -0
- package/es/collection-manager/interfaces/linkTo.js +6 -0
- package/es/collection-manager/interfaces/m2m.js +6 -0
- package/es/collection-manager/interfaces/m2o.js +6 -0
- package/es/collection-manager/interfaces/multipleSelect.js +10 -0
- package/es/collection-manager/interfaces/o2m.js +8 -1
- package/es/collection-manager/interfaces/o2o.js +6 -0
- package/es/collection-manager/interfaces/percent.js +10 -0
- package/es/collection-manager/interfaces/select.js +10 -0
- package/es/collection-manager/interfaces/updatedBy.js +5 -1
- package/es/collection-manager/types.d.ts +1 -0
- package/es/filter-provider/utils.d.ts +8 -3
- package/es/filter-provider/utils.js +42 -27
- package/es/locale/en_US.d.ts +7 -0
- package/es/locale/en_US.js +8 -1
- package/es/locale/ja_JP.d.ts +15 -0
- package/es/locale/ja_JP.js +17 -2
- package/es/locale/pt_BR.d.ts +16 -0
- package/es/locale/pt_BR.js +18 -2
- package/es/locale/ru_RU.d.ts +15 -0
- package/es/locale/ru_RU.js +17 -2
- package/es/locale/tr_TR.d.ts +16 -1
- package/es/locale/tr_TR.js +18 -3
- package/es/locale/zh_CN.d.ts +16 -0
- package/es/locale/zh_CN.js +17 -1
- package/es/pm/PluginManagerLink.js +5 -3
- package/es/pm/index.js +1 -1
- package/es/schema-component/antd/action/Action.js +1 -1
- package/es/schema-component/antd/association-select/AssociationSelect.js +56 -35
- package/es/schema-component/antd/association-select/useServiceOptions.js +3 -2
- package/es/schema-component/antd/checkbox/Checkbox.js +4 -3
- package/es/schema-component/antd/collection-select/CollectionSelect.d.ts +2 -2
- package/es/schema-component/antd/collection-select/CollectionSelect.js +6 -6
- package/es/schema-component/antd/error-fallback/ErrorFallback.d.ts +3 -0
- package/es/schema-component/antd/error-fallback/ErrorFallback.js +47 -0
- package/es/schema-component/antd/error-fallback/index.d.ts +1 -0
- package/es/schema-component/antd/error-fallback/index.js +1 -0
- package/es/schema-component/antd/filter/useFilterActionProps.d.ts +2 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +127 -7
- package/es/schema-component/antd/filter/useValues.js +7 -8
- package/es/schema-component/antd/form-item/FormItem.d.ts +3 -0
- package/es/schema-component/antd/form-item/FormItem.js +81 -16
- package/es/schema-component/antd/form-item/SchemaSettingOptions.js +2 -3
- package/es/schema-component/antd/form-v2/Templates.js +24 -18
- package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +3 -3
- package/es/schema-component/antd/gantt/components/gantt/style.js +1 -1
- package/es/schema-component/antd/gantt/components/grid/grid.d.ts +2 -2
- package/es/schema-component/antd/gantt/components/grid/grid.js +2 -2
- package/es/schema-component/antd/gantt/components/grid/style.js +1 -1
- package/es/schema-component/antd/gantt/components/other/arrow.d.ts +2 -2
- package/es/schema-component/antd/gantt/components/other/arrow.js +3 -3
- package/es/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/other/horizontal-scroll.js +1 -1
- package/es/schema-component/antd/gantt/components/other/style.js +1 -1
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.js +1 -1
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +2 -2
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.js +6 -6
- package/es/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +2 -2
- package/es/schema-component/antd/gantt/components/task-item/bar/bar.js +9 -9
- package/es/schema-component/antd/gantt/components/task-item/bar/style.js +2 -2
- package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +2 -2
- package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.js +2 -2
- package/es/schema-component/antd/gantt/types/bar-task.d.ts +2 -2
- package/es/schema-component/antd/gantt/types/date-setup.d.ts +1 -1
- package/es/schema-component/antd/gantt/types/gantt-task-actions.d.ts +3 -3
- package/es/schema-component/antd/gantt/types/public-types.d.ts +1 -1
- package/es/schema-component/antd/grid/Grid.js +23 -9
- package/es/schema-component/antd/icon-picker/IconPicker.js +1 -1
- package/es/schema-component/antd/input/EllipsisWithTooltip.js +21 -2
- package/es/schema-component/antd/menu/util.js +0 -1
- package/es/schema-component/antd/page/Page.js +10 -2
- package/es/schema-component/antd/pagination/index.js +1 -1
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +3 -4
- package/es/schema-component/antd/record-picker/useFieldNames.js +1 -1
- package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
- package/es/schema-component/antd/remote-select/RemoteSelect.js +75 -13
- package/es/schema-component/antd/select/ReadPretty.js +5 -2
- package/es/schema-component/antd/select/Select.js +3 -9
- package/es/schema-component/antd/table/Table.Array.js +2 -2
- package/es/schema-component/antd/table-v2/FilterDynamicComponent.js +2 -138
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +6 -5
- package/es/schema-component/antd/table-v2/Table.js +2 -2
- package/es/schema-component/antd/upload/ReadPretty.js +2 -1
- package/es/schema-component/antd/variable/Input.js +11 -5
- package/es/schema-component/antd/variable/JSONInput.js +4 -4
- package/es/schema-component/antd/variable/TextArea.js +1 -1
- package/es/schema-component/antd/variable/Variable.js +3 -3
- package/es/schema-component/antd/variable/VariableSelect.js +8 -8
- package/es/schema-component/antd/variable/XButton.d.ts +1 -1
- package/es/schema-component/antd/variable/XButton.js +4 -4
- package/es/schema-component/common/utils/uitls.d.ts +9 -0
- package/es/schema-component/common/utils/uitls.js +37 -3
- package/es/schema-component/core/DesignableSwitch.js +5 -3
- package/es/schema-component/hooks/useComponent.js +2 -2
- package/es/schema-component/hooks/useDesignable.js +2 -2
- package/es/schema-component/hooks/useFieldTitle.js +4 -4
- package/es/schema-initializer/SchemaInitializer.js +2 -2
- package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +14 -7
- package/es/schema-initializer/items/DestroyActionInitializer.js +2 -2
- package/es/schema-initializer/items/FilterActionInitializer.js +2 -2
- package/es/schema-initializer/items/FormBlockInitializer.js +3 -3
- package/es/schema-initializer/items/G2PlotInitializer.js +1 -1
- package/es/schema-initializer/items/KanbanBlockInitializer.js +9 -9
- package/es/schema-initializer/items/MarkdownBlockInitializer.js +3 -3
- package/es/schema-initializer/items/PrintActionInitializer.js +2 -2
- package/es/schema-initializer/items/RecordAssociationBlockInitializer.js +5 -5
- package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +9 -9
- package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +5 -5
- package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.js +4 -4
- package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +5 -5
- package/es/schema-initializer/items/RefreshActionInitializer.js +2 -2
- package/es/schema-initializer/items/SubmitActionInitializer.js +2 -2
- package/es/schema-initializer/items/TableActionColumnInitializer.js +2 -2
- package/es/schema-initializer/items/TableCollectionFieldInitializer.js +2 -2
- package/es/schema-initializer/items/TableSelectorInitializer.js +5 -5
- package/es/schema-initializer/items/UpdateActionInitializer.js +2 -2
- package/es/schema-initializer/items/UpdateSubmitActionInitializer.js +2 -2
- package/es/schema-initializer/items/ViewActionInitializer.js +2 -2
- package/es/schema-initializer/utils.js +17 -10
- package/es/schema-settings/DataTemplates/FormDataTemplates.js +28 -12
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.js +2 -1
- package/es/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +9 -2
- package/es/schema-settings/LinkageRules/ValueDynamicComponent.js +2 -1
- package/es/schema-settings/SchemaSettings.d.ts +4 -1
- package/es/schema-settings/SchemaSettings.js +32 -19
- package/es/schema-settings/VariableInput/VariableInput.d.ts +13 -0
- package/es/schema-settings/VariableInput/VariableInput.js +37 -0
- package/es/schema-settings/VariableInput/hooks/useDateVariable.d.ts +4 -0
- package/es/schema-settings/VariableInput/hooks/useDateVariable.js +129 -0
- package/es/schema-settings/VariableInput/hooks/useUserVariable.d.ts +5 -0
- package/es/schema-settings/VariableInput/hooks/useUserVariable.js +68 -0
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +1 -0
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.js +18 -0
- package/es/user/VerificationCode.js +7 -8
- package/lib/acl/Configuration/FilterDynamicComponent.d.ts +2 -0
- package/lib/{schema-component/antd/table-v2/hooks/useUserVariable.js → acl/Configuration/FilterDynamicComponent.js} +32 -4
- package/lib/acl/Configuration/schemas/scopes.js +3 -0
- package/lib/application/Application.d.ts +1 -0
- package/lib/application/Application.js +12 -2
- package/lib/block-provider/FormFieldProvider.js +9 -1
- package/lib/block-provider/TableSelectorProvider.js +3 -2
- package/lib/block-provider/hooks/index.js +17 -12
- package/lib/board/CardAdder.js +1 -1
- package/lib/board/ColumnForm.js +4 -4
- package/lib/board/DefaultColumnHeader.d.ts +1 -1
- package/lib/board/DefaultColumnHeader.js +6 -6
- package/lib/collection-manager/CollectionField.js +16 -13
- package/lib/collection-manager/CollectionManagerProvider.js +10 -2
- package/lib/collection-manager/Configuration/AddCollectionAction.js +1 -1
- package/lib/collection-manager/Configuration/CollectionFields.d.ts +2 -0
- package/lib/collection-manager/Configuration/CollectionFields.js +468 -0
- package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +3 -3
- package/lib/collection-manager/Configuration/ConfigurationTable.js +4 -2
- package/lib/collection-manager/Configuration/ConfigurationTabs.js +5 -1
- package/lib/collection-manager/Configuration/EditCollectionAction.js +4 -4
- package/lib/collection-manager/Configuration/EditFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +1 -1
- package/lib/collection-manager/Configuration/schemas/collectionFields.d.ts +2 -0
- package/lib/collection-manager/Configuration/schemas/collectionFields.js +2 -1
- package/lib/collection-manager/Configuration/schemas/collections.js +8 -5
- package/lib/collection-manager/action-hooks.d.ts +2 -1
- package/lib/collection-manager/action-hooks.js +13 -9
- package/lib/collection-manager/hooks/useCollectionManager.d.ts +1 -0
- package/lib/collection-manager/hooks/useCollectionManager.js +2 -0
- package/lib/collection-manager/interfaces/checkbox.js +7 -0
- package/lib/collection-manager/interfaces/checkboxGroup.js +7 -0
- package/lib/collection-manager/interfaces/components/index.js +1 -1
- package/lib/collection-manager/interfaces/createdBy.js +5 -1
- package/lib/collection-manager/interfaces/email.js +7 -0
- package/lib/collection-manager/interfaces/linkTo.js +6 -0
- package/lib/collection-manager/interfaces/m2m.js +6 -0
- package/lib/collection-manager/interfaces/m2o.js +6 -0
- package/lib/collection-manager/interfaces/multipleSelect.js +10 -0
- package/lib/collection-manager/interfaces/o2m.js +8 -1
- package/lib/collection-manager/interfaces/o2o.js +6 -0
- package/lib/collection-manager/interfaces/percent.js +10 -0
- package/lib/collection-manager/interfaces/select.js +10 -0
- package/lib/collection-manager/interfaces/updatedBy.js +5 -1
- package/lib/collection-manager/types.d.ts +1 -0
- package/lib/filter-provider/utils.d.ts +8 -3
- package/lib/filter-provider/utils.js +44 -28
- package/lib/locale/en_US.d.ts +7 -0
- package/lib/locale/en_US.js +8 -1
- package/lib/locale/ja_JP.d.ts +15 -0
- package/lib/locale/ja_JP.js +17 -2
- package/lib/locale/pt_BR.d.ts +16 -0
- package/lib/locale/pt_BR.js +18 -2
- package/lib/locale/ru_RU.d.ts +15 -0
- package/lib/locale/ru_RU.js +17 -2
- package/lib/locale/tr_TR.d.ts +16 -1
- package/lib/locale/tr_TR.js +18 -3
- package/lib/locale/zh_CN.d.ts +16 -0
- package/lib/locale/zh_CN.js +17 -1
- package/lib/pm/PluginManagerLink.js +4 -2
- package/lib/pm/index.js +1 -1
- package/lib/schema-component/antd/action/Action.js +1 -1
- package/lib/schema-component/antd/association-select/AssociationSelect.js +55 -34
- package/lib/schema-component/antd/association-select/useServiceOptions.js +3 -2
- package/lib/schema-component/antd/checkbox/Checkbox.js +4 -3
- package/lib/schema-component/antd/collection-select/CollectionSelect.d.ts +2 -2
- package/lib/schema-component/antd/error-fallback/ErrorFallback.d.ts +3 -0
- package/lib/schema-component/antd/error-fallback/ErrorFallback.js +55 -0
- package/lib/schema-component/antd/error-fallback/index.d.ts +1 -0
- package/lib/schema-component/antd/error-fallback/index.js +16 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.d.ts +2 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +130 -8
- package/lib/schema-component/antd/filter/useValues.js +6 -7
- package/lib/schema-component/antd/form-item/FormItem.d.ts +3 -0
- package/lib/schema-component/antd/form-item/FormItem.js +81 -15
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +1 -2
- package/lib/schema-component/antd/form-v2/Templates.js +24 -18
- package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +2 -2
- package/lib/schema-component/antd/gantt/components/gantt/style.js +1 -1
- package/lib/schema-component/antd/gantt/components/grid/grid.d.ts +2 -2
- package/lib/schema-component/antd/gantt/components/grid/style.js +1 -1
- package/lib/schema-component/antd/gantt/components/other/arrow.d.ts +2 -2
- package/lib/schema-component/antd/gantt/components/other/arrow.js +2 -2
- package/lib/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/other/style.js +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +2 -2
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.js +2 -2
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +2 -2
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar.js +4 -4
- package/lib/schema-component/antd/gantt/components/task-item/bar/style.js +2 -2
- package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +2 -2
- package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.js +1 -1
- package/lib/schema-component/antd/gantt/types/bar-task.d.ts +2 -2
- package/lib/schema-component/antd/gantt/types/date-setup.d.ts +1 -1
- package/lib/schema-component/antd/gantt/types/gantt-task-actions.d.ts +3 -3
- package/lib/schema-component/antd/gantt/types/public-types.d.ts +1 -1
- package/lib/schema-component/antd/grid/Grid.js +23 -9
- package/lib/schema-component/antd/input/EllipsisWithTooltip.js +20 -1
- package/lib/schema-component/antd/menu/util.js +0 -1
- package/lib/schema-component/antd/page/Page.js +9 -1
- package/lib/schema-component/antd/pagination/index.js +1 -1
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +3 -4
- package/lib/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +75 -12
- package/lib/schema-component/antd/select/ReadPretty.js +5 -2
- package/lib/schema-component/antd/select/Select.js +3 -9
- package/lib/schema-component/antd/table-v2/FilterDynamicComponent.js +3 -139
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +6 -5
- package/lib/schema-component/antd/table-v2/Table.js +2 -2
- package/lib/schema-component/antd/upload/ReadPretty.js +2 -1
- package/lib/schema-component/antd/variable/Input.js +10 -4
- package/lib/schema-component/antd/variable/JSONInput.js +2 -2
- package/lib/schema-component/antd/variable/TextArea.js +1 -1
- package/lib/schema-component/antd/variable/VariableSelect.js +4 -4
- package/lib/schema-component/antd/variable/XButton.d.ts +1 -1
- package/lib/schema-component/antd/variable/XButton.js +1 -1
- package/lib/schema-component/common/utils/uitls.d.ts +9 -0
- package/lib/schema-component/common/utils/uitls.js +43 -4
- package/lib/schema-component/core/DesignableSwitch.js +4 -2
- package/lib/schema-component/hooks/useComponent.js +2 -2
- package/lib/schema-component/hooks/useDesignable.js +2 -2
- package/lib/schema-initializer/SchemaInitializer.js +2 -2
- package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +14 -7
- package/lib/schema-initializer/utils.js +17 -10
- package/lib/schema-settings/DataTemplates/FormDataTemplates.js +28 -12
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +2 -1
- package/lib/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +9 -2
- package/lib/schema-settings/LinkageRules/ValueDynamicComponent.js +2 -1
- package/lib/schema-settings/SchemaSettings.d.ts +4 -1
- package/lib/schema-settings/SchemaSettings.js +37 -21
- package/lib/schema-settings/VariableInput/VariableInput.d.ts +13 -0
- package/lib/schema-settings/VariableInput/VariableInput.js +47 -0
- package/lib/schema-settings/VariableInput/hooks/useDateVariable.d.ts +4 -0
- package/lib/schema-settings/VariableInput/hooks/useDateVariable.js +136 -0
- package/lib/schema-settings/VariableInput/hooks/useUserVariable.d.ts +5 -0
- package/lib/schema-settings/VariableInput/hooks/useUserVariable.js +75 -0
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +1 -0
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +25 -0
- package/lib/user/VerificationCode.js +1 -2
- package/package.json +6 -5
- package/es/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +0 -10
- package/lib/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +0 -10
|
@@ -8,6 +8,7 @@ var _react = require("@formily/react");
|
|
|
8
8
|
var _uniq = _interopRequireDefault(require("lodash/uniq"));
|
|
9
9
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _collectionManager = require("../collection-manager");
|
|
11
|
+
var _filterProvider = require("../filter-provider");
|
|
11
12
|
var _recordProvider = require("../record-provider");
|
|
12
13
|
var _schemaComponent = require("../schema-component");
|
|
13
14
|
var _BlockProvider = require("./BlockProvider");
|
|
@@ -200,7 +201,7 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
|
|
|
200
201
|
}
|
|
201
202
|
var extraFilter;
|
|
202
203
|
if (collectionField) {
|
|
203
|
-
if (['oho', 'o2m'].includes(collectionField.interface)) {
|
|
204
|
+
if (['oho', 'o2m'].includes(collectionField.interface) && !(0, _filterProvider.isInFilterFormBlock)(fieldSchema)) {
|
|
204
205
|
if (record === null || record === void 0 ? void 0 : record[collectionField.sourceKey]) {
|
|
205
206
|
extraFilter = {
|
|
206
207
|
$or: [_defineProperty({}, collectionField.foreignKey, {
|
|
@@ -215,7 +216,7 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
|
|
|
215
216
|
});
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
|
-
if (['obo'].includes(collectionField.interface)) {
|
|
219
|
+
if (['obo'].includes(collectionField.interface) && !(0, _filterProvider.isInFilterFormBlock)(fieldSchema)) {
|
|
219
220
|
var fields = getCollectionFields(collectionField.target);
|
|
220
221
|
var targetField = fields.find(function (f) {
|
|
221
222
|
return f.foreignKey && f.foreignKey === collectionField.foreignKey;
|
|
@@ -303,6 +303,10 @@ var useFilterBlockActionProps = function useFilterBlockActionProps() {
|
|
|
303
303
|
var fieldSchema = (0, _react.useFieldSchema)();
|
|
304
304
|
var _useFilterBlock = (0, _FilterProvider.useFilterBlock)(),
|
|
305
305
|
getDataBlocks = _useFilterBlock.getDataBlocks;
|
|
306
|
+
var _useCollection2 = (0, _collectionManager.useCollection)(),
|
|
307
|
+
name = _useCollection2.name;
|
|
308
|
+
var _useCollectionManager = (0, _collectionManager.useCollectionManager)(),
|
|
309
|
+
getCollectionJoinField = _useCollectionManager.getCollectionJoinField;
|
|
306
310
|
actionField.data = actionField.data || {};
|
|
307
311
|
return {
|
|
308
312
|
onClick: function onClick() {
|
|
@@ -333,7 +337,7 @@ var useFilterBlockActionProps = function useFilterBlockActionProps() {
|
|
|
333
337
|
case 3:
|
|
334
338
|
param = ((_block$service$params = block.service.params) === null || _block$service$params === void 0 ? void 0 : _block$service$params[0]) || {}; // 保留原有的 filter
|
|
335
339
|
storedFilter = ((_block$service$params2 = block.service.params) === null || _block$service$params2 === void 0 ? void 0 : (_block$service$params3 = _block$service$params2[1]) === null || _block$service$params3 === void 0 ? void 0 : _block$service$params3.filters) || {};
|
|
336
|
-
storedFilter[uid] = (0, _schemaComponent.removeNullCondition)((0, _utils.transformToFilter)(form.values, fieldSchema));
|
|
340
|
+
storedFilter[uid] = (0, _schemaComponent.removeNullCondition)((0, _utils.transformToFilter)(form.values, fieldSchema, getCollectionJoinField, name));
|
|
337
341
|
mergedFilter = (0, _SharedFilterProvider.mergeFilter)([].concat(_toConsumableArray(Object.values(storedFilter).map(function (filter) {
|
|
338
342
|
return (0, _schemaComponent.removeNullCondition)(filter);
|
|
339
343
|
})), [block.defaultFilter]));
|
|
@@ -355,13 +359,14 @@ var useFilterBlockActionProps = function useFilterBlockActionProps() {
|
|
|
355
359
|
}()));
|
|
356
360
|
case 5:
|
|
357
361
|
actionField.data.loading = false;
|
|
358
|
-
_context4.next =
|
|
362
|
+
_context4.next = 12;
|
|
359
363
|
break;
|
|
360
364
|
case 8:
|
|
361
365
|
_context4.prev = 8;
|
|
362
366
|
_context4.t0 = _context4["catch"](2);
|
|
367
|
+
console.error(_context4.t0);
|
|
363
368
|
actionField.data.loading = false;
|
|
364
|
-
case
|
|
369
|
+
case 12:
|
|
365
370
|
case "end":
|
|
366
371
|
return _context4.stop();
|
|
367
372
|
}
|
|
@@ -838,9 +843,9 @@ var useCustomizeRequestActionProps = function useCustomizeRequestActionProps() {
|
|
|
838
843
|
var actionSchema = (0, _react.useFieldSchema)();
|
|
839
844
|
var compile = (0, _schemaComponent.useCompile)();
|
|
840
845
|
var form = (0, _react.useForm)();
|
|
841
|
-
var
|
|
842
|
-
fields =
|
|
843
|
-
getField =
|
|
846
|
+
var _useCollection3 = (0, _collectionManager.useCollection)(),
|
|
847
|
+
fields = _useCollection3.fields,
|
|
848
|
+
getField = _useCollection3.getField;
|
|
844
849
|
var _useBlockRequestConte5 = (0, _BlockProvider.useBlockRequestContext)(),
|
|
845
850
|
field = _useBlockRequestConte5.field,
|
|
846
851
|
resource = _useBlockRequestConte5.resource,
|
|
@@ -981,9 +986,9 @@ var useUpdateActionProps = function useUpdateActionProps() {
|
|
|
981
986
|
setVisible = _useActionContext3.setVisible;
|
|
982
987
|
var actionSchema = (0, _react.useFieldSchema)();
|
|
983
988
|
var history = (0, _reactRouterDom.useHistory)();
|
|
984
|
-
var
|
|
985
|
-
fields =
|
|
986
|
-
getField =
|
|
989
|
+
var _useCollection4 = (0, _collectionManager.useCollection)(),
|
|
990
|
+
fields = _useCollection4.fields,
|
|
991
|
+
getField = _useCollection4.getField;
|
|
987
992
|
var compile = (0, _schemaComponent.useCompile)();
|
|
988
993
|
var actionField = (0, _react.useField)();
|
|
989
994
|
var _useFormBlockContext = (0, _2.useFormBlockContext)(),
|
|
@@ -1308,9 +1313,9 @@ var useAssociationFilterProps = function useAssociationFilterProps() {
|
|
|
1308
1313
|
};
|
|
1309
1314
|
exports.useAssociationFilterProps = useAssociationFilterProps;
|
|
1310
1315
|
var useOptionalFieldList = function useOptionalFieldList() {
|
|
1311
|
-
var
|
|
1312
|
-
|
|
1313
|
-
currentFields =
|
|
1316
|
+
var _useCollection5 = (0, _collectionManager.useCollection)(),
|
|
1317
|
+
_useCollection5$curre = _useCollection5.currentFields,
|
|
1318
|
+
currentFields = _useCollection5$curre === void 0 ? [] : _useCollection5$curre;
|
|
1314
1319
|
return currentFields.filter(function (field) {
|
|
1315
1320
|
return isOptionalField(field) && field.uiSchema.enum;
|
|
1316
1321
|
});
|
package/lib/board/CardAdder.js
CHANGED
|
@@ -33,7 +33,7 @@ function CardAdder(_ref) {
|
|
|
33
33
|
return setAddingCard(false);
|
|
34
34
|
}
|
|
35
35
|
}) : /*#__PURE__*/_react.default.createElement("button", {
|
|
36
|
-
className:
|
|
36
|
+
className: "react-kanban-card-adder-button",
|
|
37
37
|
onClick: function onClick() {
|
|
38
38
|
return setAddingCard(!addingCard);
|
|
39
39
|
}
|
package/lib/board/ColumnForm.js
CHANGED
|
@@ -19,7 +19,7 @@ function ColumnForm(_ref) {
|
|
|
19
19
|
(0, _utils.when)(inputColumnTitle.current.value)(onConfirm);
|
|
20
20
|
}
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
-
className:
|
|
22
|
+
className: "react-kanban-column",
|
|
23
23
|
style: {
|
|
24
24
|
minWidth: '230px'
|
|
25
25
|
}
|
|
@@ -30,13 +30,13 @@ function ColumnForm(_ref) {
|
|
|
30
30
|
},
|
|
31
31
|
onSubmit: addColumn
|
|
32
32
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
33
|
-
type:
|
|
33
|
+
type: "text",
|
|
34
34
|
ref: inputColumnTitle,
|
|
35
35
|
autoFocus: true
|
|
36
36
|
}), /*#__PURE__*/_react.default.createElement("button", {
|
|
37
|
-
type:
|
|
37
|
+
type: "submit"
|
|
38
38
|
}, "Add"), /*#__PURE__*/_react.default.createElement("button", {
|
|
39
|
-
type:
|
|
39
|
+
type: "button",
|
|
40
40
|
onClick: onCancel
|
|
41
41
|
}, "Cancel")));
|
|
42
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare function DefaultColumnHeader({ children: column, allowRemoveColumn, onColumnRemove, allowRenameColumn, onColumnRename }: {
|
|
2
|
+
declare function DefaultColumnHeader({ children: column, allowRemoveColumn, onColumnRemove, allowRenameColumn, onColumnRename, }: {
|
|
3
3
|
children: any;
|
|
4
4
|
allowRemoveColumn: any;
|
|
5
5
|
onColumnRemove: any;
|
|
@@ -59,11 +59,11 @@ function DefaultColumnHeader(_ref2) {
|
|
|
59
59
|
toggleRenameMode();
|
|
60
60
|
}
|
|
61
61
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
-
className:
|
|
62
|
+
className: "react-kanban-column-header"
|
|
63
63
|
}, renameMode ? /*#__PURE__*/_react.default.createElement("form", {
|
|
64
64
|
onSubmit: handleRenameColumn
|
|
65
65
|
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("input", {
|
|
66
|
-
type:
|
|
66
|
+
type: "text",
|
|
67
67
|
value: titleInput,
|
|
68
68
|
onChange: function onChange(_ref3) {
|
|
69
69
|
var value = _ref3.target.value;
|
|
@@ -71,11 +71,11 @@ function DefaultColumnHeader(_ref2) {
|
|
|
71
71
|
},
|
|
72
72
|
autoFocus: true
|
|
73
73
|
})), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("button", {
|
|
74
|
-
className:
|
|
75
|
-
type:
|
|
74
|
+
className: "react-kanban-column-header__button",
|
|
75
|
+
type: "submit"
|
|
76
76
|
}, "Rename"), /*#__PURE__*/_react.default.createElement("button", {
|
|
77
|
-
className:
|
|
78
|
-
type:
|
|
77
|
+
className: "react-kanban-column-header__button",
|
|
78
|
+
type: "button",
|
|
79
79
|
onClick: handleRenameMode
|
|
80
80
|
}, "Cancel"))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ColumnTitle, {
|
|
81
81
|
allowRenameColumn: allowRenameColumn,
|
|
@@ -8,6 +8,7 @@ var _react = require("@formily/react");
|
|
|
8
8
|
var _shared = require("@formily/shared");
|
|
9
9
|
var _lodash = require("lodash");
|
|
10
10
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _reactI18next = require("react-i18next");
|
|
11
12
|
var _ = require("..");
|
|
12
13
|
var _CollectionFieldProvider = require("./CollectionFieldProvider");
|
|
13
14
|
var _hooks = require("./hooks");
|
|
@@ -21,12 +22,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
21
22
|
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); }
|
|
22
23
|
// TODO: 初步适配
|
|
23
24
|
var InternalField = function InternalField(props) {
|
|
25
|
+
var component = props.component;
|
|
24
26
|
var field = (0, _react.useField)();
|
|
25
27
|
var fieldSchema = (0, _react.useFieldSchema)();
|
|
26
28
|
var _useCollectionField = (0, _hooks.useCollectionField)(),
|
|
27
29
|
uiSchema = _useCollectionField.uiSchema,
|
|
28
30
|
defaultValue = _useCollectionField.defaultValue;
|
|
29
|
-
var
|
|
31
|
+
var Component = (0, _.useComponent)(component || (uiSchema === null || uiSchema === void 0 ? void 0 : uiSchema['x-component']) || 'Input');
|
|
30
32
|
var compile = (0, _.useCompile)();
|
|
31
33
|
var setFieldProps = function setFieldProps(key, value) {
|
|
32
34
|
field[key] = typeof field[key] === 'undefined' ? value : field[key];
|
|
@@ -69,21 +71,12 @@ var InternalField = function InternalField(props) {
|
|
|
69
71
|
field.dataSource = uiSchema.enum;
|
|
70
72
|
var originalProps = compile(uiSchema['x-component-props']) || {};
|
|
71
73
|
var componentProps = (0, _shared.merge)(originalProps, field.componentProps || {});
|
|
72
|
-
field.component = [
|
|
73
|
-
// if (interfaceType === 'input') {
|
|
74
|
-
// field.componentProps.ellipsis = true;
|
|
75
|
-
// } else if (interfaceType === 'textarea') {
|
|
76
|
-
// field.componentProps.ellipsis = true;
|
|
77
|
-
// } else if (interfaceType === 'markdown') {
|
|
78
|
-
// field.componentProps.ellipsis = true;
|
|
79
|
-
// } else if (interfaceType === 'attachment') {
|
|
80
|
-
// field.componentProps.size = 'small';
|
|
81
|
-
// }
|
|
74
|
+
field.component = [Component, componentProps];
|
|
82
75
|
}, [JSON.stringify(uiSchema)]);
|
|
83
76
|
if (!uiSchema) {
|
|
84
77
|
return null;
|
|
85
78
|
}
|
|
86
|
-
return /*#__PURE__*/_react2.default.createElement(
|
|
79
|
+
return /*#__PURE__*/_react2.default.createElement(Component, props, props.children);
|
|
87
80
|
};
|
|
88
81
|
var InternalFallbackField = function InternalFallbackField() {
|
|
89
82
|
var _fieldSchema$xCompon, _fieldSchema$xCompon2, _fieldSchema$xCompon3;
|
|
@@ -106,7 +99,17 @@ var InternalFallbackField = function InternalFallbackField() {
|
|
|
106
99
|
}
|
|
107
100
|
return /*#__PURE__*/_react2.default.createElement("div", null, displayText);
|
|
108
101
|
};
|
|
102
|
+
// 当字段被删除时,显示一个提示占位符
|
|
109
103
|
exports.InternalFallbackField = InternalFallbackField;
|
|
104
|
+
var DeletedField = function DeletedField() {
|
|
105
|
+
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
106
|
+
t = _useTranslation.t;
|
|
107
|
+
return /*#__PURE__*/_react2.default.createElement("div", {
|
|
108
|
+
style: {
|
|
109
|
+
color: '#ccc'
|
|
110
|
+
}
|
|
111
|
+
}, t('The field has bee deleted'));
|
|
112
|
+
};
|
|
110
113
|
var CollectionField = (0, _react.connect)(function (props) {
|
|
111
114
|
var _fieldSchema$xCompon4;
|
|
112
115
|
var fieldSchema = (0, _react.useFieldSchema)();
|
|
@@ -116,7 +119,7 @@ var CollectionField = (0, _react.connect)(function (props) {
|
|
|
116
119
|
return /*#__PURE__*/_react2.default.createElement(_CollectionFieldProvider.CollectionFieldProvider, {
|
|
117
120
|
name: fieldSchema.name,
|
|
118
121
|
field: field,
|
|
119
|
-
fallback: snapshot ? /*#__PURE__*/_react2.default.createElement(InternalFallbackField, null) : null
|
|
122
|
+
fallback: snapshot ? /*#__PURE__*/_react2.default.createElement(InternalFallbackField, null) : /*#__PURE__*/_react2.default.createElement(DeletedField, null)
|
|
120
123
|
}, /*#__PURE__*/_react2.default.createElement(InternalField, _objectSpread({}, props)));
|
|
121
124
|
});
|
|
122
125
|
exports.CollectionField = CollectionField;
|
|
@@ -40,6 +40,7 @@ var CollectionManagerProvider = function CollectionManagerProvider(props) {
|
|
|
40
40
|
_props$collections = props.collections,
|
|
41
41
|
collections = _props$collections === void 0 ? [] : _props$collections,
|
|
42
42
|
refreshCM = props.refreshCM,
|
|
43
|
+
updateCollection = props.updateCollection,
|
|
43
44
|
templates = props.templates;
|
|
44
45
|
var defaultTemplates = (0, _lodash.keyBy)((0, _templates.templateOptions)(), function (item) {
|
|
45
46
|
return item.name;
|
|
@@ -51,7 +52,8 @@ var CollectionManagerProvider = function CollectionManagerProvider(props) {
|
|
|
51
52
|
interfaces: _objectSpread(_objectSpread(_objectSpread({}, defaultInterfaces), ctx.interfaces), interfaces),
|
|
52
53
|
templates: _objectSpread(_objectSpread({}, defaultTemplates), templates),
|
|
53
54
|
collections: [].concat(_toConsumableArray(ctx.collections), _toConsumableArray(collections)),
|
|
54
|
-
refreshCM: refreshCM
|
|
55
|
+
refreshCM: refreshCM,
|
|
56
|
+
updateCollection: updateCollection
|
|
55
57
|
})
|
|
56
58
|
}, /*#__PURE__*/_react.default.createElement(_CollectionManagerSchemaComponentProvider.CollectionManagerSchemaComponentProvider, null, props.children));
|
|
57
59
|
};
|
|
@@ -144,6 +146,11 @@ var RemoteCollectionManagerProvider = function RemoteCollectionManagerProvider(p
|
|
|
144
146
|
return _ref2.apply(this, arguments);
|
|
145
147
|
};
|
|
146
148
|
}();
|
|
149
|
+
var updateCollection = function updateCollection(collection) {
|
|
150
|
+
service.mutate({
|
|
151
|
+
data: collection
|
|
152
|
+
});
|
|
153
|
+
};
|
|
147
154
|
return /*#__PURE__*/_react.default.createElement(CollectionCategroriesProvider, {
|
|
148
155
|
service: _objectSpread({}, result),
|
|
149
156
|
refreshCategory: refreshCategory
|
|
@@ -153,7 +160,8 @@ var RemoteCollectionManagerProvider = function RemoteCollectionManagerProvider(p
|
|
|
153
160
|
setContentLoading: setContentLoading
|
|
154
161
|
}),
|
|
155
162
|
collections: service === null || service === void 0 ? void 0 : (_service$data = service.data) === null || _service$data === void 0 ? void 0 : _service$data.data,
|
|
156
|
-
refreshCM: refreshCM
|
|
163
|
+
refreshCM: refreshCM,
|
|
164
|
+
updateCollection: updateCollection
|
|
157
165
|
}, props)));
|
|
158
166
|
};
|
|
159
167
|
exports.RemoteCollectionManagerProvider = RemoteCollectionManagerProvider;
|
|
@@ -19,8 +19,8 @@ var _ResourceActionProvider = require("../ResourceActionProvider");
|
|
|
19
19
|
var _actionHooks = require("../action-hooks");
|
|
20
20
|
var _hooks = require("../hooks");
|
|
21
21
|
var components = _interopRequireWildcard(require("./components"));
|
|
22
|
-
var _templates = require("./templates");
|
|
23
22
|
var _TemplateSummay = require("./components/TemplateSummay");
|
|
23
|
+
var _templates = require("./templates");
|
|
24
24
|
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); }
|
|
25
25
|
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; }
|
|
26
26
|
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); }
|