@nocobase/client 0.9.2-alpha.1 → 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 +8 -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 +8 -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
|
@@ -7,16 +7,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
8
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
9
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
-
import React, { useContext } from
|
|
11
|
-
import { FormDialog, FormLayout } from
|
|
10
|
+
import React, { useContext } from 'react';
|
|
11
|
+
import { FormDialog, FormLayout } from '@formily/antd';
|
|
12
12
|
import { FormOutlined } from '@ant-design/icons';
|
|
13
|
-
import { SchemaOptionsContext } from
|
|
14
|
-
import { useTranslation } from
|
|
15
|
-
import { useAPIClient } from
|
|
16
|
-
import { useCollectionManager } from
|
|
17
|
-
import { createKanbanBlockSchema } from
|
|
18
|
-
import { DataBlockInitializer } from
|
|
19
|
-
import { SchemaComponent, SchemaComponentOptions } from
|
|
13
|
+
import { SchemaOptionsContext } from '@formily/react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useAPIClient } from '../../api-client';
|
|
16
|
+
import { useCollectionManager } from '../../collection-manager';
|
|
17
|
+
import { createKanbanBlockSchema } from '../utils';
|
|
18
|
+
import { DataBlockInitializer } from './DataBlockInitializer';
|
|
19
|
+
import { SchemaComponent, SchemaComponentOptions } from '../../schema-component';
|
|
20
20
|
export var KanbanBlockInitializer = function KanbanBlockInitializer(props) {
|
|
21
21
|
var insert = props.insert;
|
|
22
22
|
var _useTranslation = useTranslation(),
|
|
@@ -4,10 +4,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { FormOutlined } from '@ant-design/icons';
|
|
9
|
-
import { useTranslation } from
|
|
10
|
-
import { SchemaInitializer } from
|
|
9
|
+
import { useTranslation } from 'react-i18next';
|
|
10
|
+
import { SchemaInitializer } from '../SchemaInitializer';
|
|
11
11
|
export var MarkdownBlockInitializer = function MarkdownBlockInitializer(props) {
|
|
12
12
|
var insert = props.insert;
|
|
13
13
|
var _useTranslation = useTranslation(),
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { ActionInitializer } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ActionInitializer } from './ActionInitializer';
|
|
9
9
|
export var PrintActionInitializer = function PrintActionInitializer(props) {
|
|
10
10
|
var schema = {
|
|
11
11
|
title: '{{ t("Print") }}',
|
|
@@ -10,12 +10,12 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
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; }
|
|
13
|
-
import React from
|
|
13
|
+
import React from 'react';
|
|
14
14
|
import { TableOutlined } from '@ant-design/icons';
|
|
15
|
-
import { useCollectionManager } from
|
|
16
|
-
import { useSchemaTemplateManager } from
|
|
17
|
-
import { SchemaInitializer } from
|
|
18
|
-
import { createTableBlockSchema, useRecordCollectionDataSourceItems } from
|
|
15
|
+
import { useCollectionManager } from '../../collection-manager';
|
|
16
|
+
import { useSchemaTemplateManager } from '../../schema-templates';
|
|
17
|
+
import { SchemaInitializer } from '../SchemaInitializer';
|
|
18
|
+
import { createTableBlockSchema, useRecordCollectionDataSourceItems } from '../utils';
|
|
19
19
|
export var RecordAssociationBlockInitializer = function RecordAssociationBlockInitializer(props) {
|
|
20
20
|
var item = props.item,
|
|
21
21
|
onCreateBlockSchema = props.onCreateBlockSchema,
|
|
@@ -10,16 +10,16 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
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; }
|
|
13
|
-
import React, { useContext } from
|
|
14
|
-
import { FormDialog, FormLayout } from
|
|
15
|
-
import { SchemaOptionsContext } from
|
|
16
|
-
import { useTranslation } from
|
|
13
|
+
import React, { useContext } from 'react';
|
|
14
|
+
import { FormDialog, FormLayout } from '@formily/antd';
|
|
15
|
+
import { SchemaOptionsContext } from '@formily/react';
|
|
16
|
+
import { useTranslation } from 'react-i18next';
|
|
17
17
|
import { TableOutlined } from '@ant-design/icons';
|
|
18
|
-
import { useCollectionManager } from
|
|
19
|
-
import { useSchemaTemplateManager } from
|
|
20
|
-
import { SchemaInitializer } from
|
|
21
|
-
import { createCalendarBlockSchema, useRecordCollectionDataSourceItems } from
|
|
22
|
-
import { SchemaComponent, SchemaComponentOptions } from
|
|
18
|
+
import { useCollectionManager } from '../../collection-manager';
|
|
19
|
+
import { useSchemaTemplateManager } from '../../schema-templates';
|
|
20
|
+
import { SchemaInitializer } from '../SchemaInitializer';
|
|
21
|
+
import { createCalendarBlockSchema, useRecordCollectionDataSourceItems } from '../utils';
|
|
22
|
+
import { SchemaComponent, SchemaComponentOptions } from '../../schema-component';
|
|
23
23
|
export var RecordAssociationCalendarBlockInitializer = function RecordAssociationCalendarBlockInitializer(props) {
|
|
24
24
|
var item = props.item,
|
|
25
25
|
onCreateBlockSchema = props.onCreateBlockSchema,
|
|
@@ -10,12 +10,12 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
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; }
|
|
13
|
-
import React from
|
|
13
|
+
import React from 'react';
|
|
14
14
|
import { FormOutlined } from '@ant-design/icons';
|
|
15
|
-
import { useCollectionManager } from
|
|
16
|
-
import { useSchemaTemplateManager } from
|
|
17
|
-
import { SchemaInitializer } from
|
|
18
|
-
import { createDetailsBlockSchema, useRecordCollectionDataSourceItems } from
|
|
15
|
+
import { useCollectionManager } from '../../collection-manager';
|
|
16
|
+
import { useSchemaTemplateManager } from '../../schema-templates';
|
|
17
|
+
import { SchemaInitializer } from '../SchemaInitializer';
|
|
18
|
+
import { createDetailsBlockSchema, useRecordCollectionDataSourceItems } from '../utils';
|
|
19
19
|
export var RecordAssociationDetailsBlockInitializer = function RecordAssociationDetailsBlockInitializer(props) {
|
|
20
20
|
var item = props.item,
|
|
21
21
|
onCreateBlockSchema = props.onCreateBlockSchema,
|
|
@@ -10,11 +10,11 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
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; }
|
|
13
|
-
import React from
|
|
13
|
+
import React from 'react';
|
|
14
14
|
import { FormOutlined } from '@ant-design/icons';
|
|
15
|
-
import { useSchemaTemplateManager } from
|
|
16
|
-
import { SchemaInitializer } from
|
|
17
|
-
import { createFormBlockSchema, useRecordCollectionDataSourceItems } from
|
|
15
|
+
import { useSchemaTemplateManager } from '../../schema-templates';
|
|
16
|
+
import { SchemaInitializer } from '../SchemaInitializer';
|
|
17
|
+
import { createFormBlockSchema, useRecordCollectionDataSourceItems } from '../utils';
|
|
18
18
|
export var RecordAssociationFormBlockInitializer = function RecordAssociationFormBlockInitializer(props) {
|
|
19
19
|
var item = props.item,
|
|
20
20
|
onCreateBlockSchema = props.onCreateBlockSchema,
|
|
@@ -10,12 +10,12 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
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; }
|
|
13
|
-
import React from
|
|
13
|
+
import React from 'react';
|
|
14
14
|
import { FormOutlined } from '@ant-design/icons';
|
|
15
|
-
import { useBlockRequestContext } from
|
|
16
|
-
import { useSchemaTemplateManager } from
|
|
17
|
-
import { SchemaInitializer } from
|
|
18
|
-
import { createReadPrettyFormBlockSchema, useRecordCollectionDataSourceItems } from
|
|
15
|
+
import { useBlockRequestContext } from '../../block-provider';
|
|
16
|
+
import { useSchemaTemplateManager } from '../../schema-templates';
|
|
17
|
+
import { SchemaInitializer } from '../SchemaInitializer';
|
|
18
|
+
import { createReadPrettyFormBlockSchema, useRecordCollectionDataSourceItems } from '../utils';
|
|
19
19
|
export var RecordReadPrettyAssociationFormBlockInitializer = function RecordReadPrettyAssociationFormBlockInitializer(props) {
|
|
20
20
|
var item = props.item,
|
|
21
21
|
onCreateBlockSchema = props.onCreateBlockSchema,
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { ActionInitializer } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ActionInitializer } from './ActionInitializer';
|
|
9
9
|
export var RefreshActionInitializer = function RefreshActionInitializer(props) {
|
|
10
10
|
var schema = {
|
|
11
11
|
title: '{{ t("Refresh") }}',
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { ActionInitializer } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ActionInitializer } from './ActionInitializer';
|
|
9
9
|
export var SubmitActionInitializer = function SubmitActionInitializer(props) {
|
|
10
10
|
var schema = {
|
|
11
11
|
title: '{{ t("Submit") }}',
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { InitializerWithSwitch } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { InitializerWithSwitch } from './InitializerWithSwitch';
|
|
9
9
|
export var TableActionColumnInitializer = function TableActionColumnInitializer(props) {
|
|
10
10
|
var schema = {
|
|
11
11
|
type: 'void',
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { InitializerWithSwitch } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { InitializerWithSwitch } from './InitializerWithSwitch';
|
|
9
9
|
export var TableCollectionFieldInitializer = function TableCollectionFieldInitializer(props) {
|
|
10
10
|
var schema = {};
|
|
11
11
|
return /*#__PURE__*/React.createElement(InitializerWithSwitch, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -10,12 +10,12 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
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; }
|
|
13
|
-
import React from
|
|
13
|
+
import React from 'react';
|
|
14
14
|
import { FormOutlined } from '@ant-design/icons';
|
|
15
|
-
import { useCollection } from
|
|
16
|
-
import { useSchemaTemplateManager } from
|
|
17
|
-
import { SchemaInitializer } from
|
|
18
|
-
import { createTableSelectorSchema } from
|
|
15
|
+
import { useCollection } from '../../collection-manager';
|
|
16
|
+
import { useSchemaTemplateManager } from '../../schema-templates';
|
|
17
|
+
import { SchemaInitializer } from '../SchemaInitializer';
|
|
18
|
+
import { createTableSelectorSchema } from '../utils';
|
|
19
19
|
export var TableSelectorInitializer = function TableSelectorInitializer(props) {
|
|
20
20
|
var onCreateBlockSchema = props.onCreateBlockSchema,
|
|
21
21
|
componentType = props.componentType,
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { ActionInitializer } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ActionInitializer } from './ActionInitializer';
|
|
9
9
|
export var UpdateActionInitializer = function UpdateActionInitializer(props) {
|
|
10
10
|
var schema = {
|
|
11
11
|
type: 'void',
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { ActionInitializer } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ActionInitializer } from './ActionInitializer';
|
|
9
9
|
export var UpdateSubmitActionInitializer = function UpdateSubmitActionInitializer(props) {
|
|
10
10
|
var schema = {
|
|
11
11
|
title: '{{ t("Submit") }}',
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from
|
|
8
|
-
import { ActionInitializer } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ActionInitializer } from './ActionInitializer';
|
|
9
9
|
export var ViewActionInitializer = function ViewActionInitializer(props) {
|
|
10
10
|
var schema = {
|
|
11
11
|
type: 'void',
|
|
@@ -342,10 +342,10 @@ export var useFilterFormItemInitializerFields = function useFilterFormItemInitia
|
|
|
342
342
|
var _field$uiSchema5;
|
|
343
343
|
schema = {
|
|
344
344
|
type: 'string',
|
|
345
|
-
name: field.name,
|
|
345
|
+
name: "".concat(field.name),
|
|
346
346
|
required: false,
|
|
347
|
-
'x-designer': '
|
|
348
|
-
'x-component': '
|
|
347
|
+
'x-designer': 'FormItem.FilterFormDesigner',
|
|
348
|
+
'x-component': 'CollectionField',
|
|
349
349
|
'x-decorator': 'FormItem',
|
|
350
350
|
'x-collection-field': "".concat(name, ".").concat(field.name),
|
|
351
351
|
'x-component-props': (_field$uiSchema5 = field.uiSchema) === null || _field$uiSchema5 === void 0 ? void 0 : _field$uiSchema5['x-component-props']
|
|
@@ -444,7 +444,12 @@ var getItem = function getItem(field, schemaName, collectionName, getCollectionF
|
|
|
444
444
|
type: 'subMenu',
|
|
445
445
|
title: (_field$uiSchema8 = field.uiSchema) === null || _field$uiSchema8 === void 0 ? void 0 : _field$uiSchema8.title,
|
|
446
446
|
children: subFields.map(function (subField) {
|
|
447
|
-
return
|
|
447
|
+
return (
|
|
448
|
+
// 使用 | 分隔,是为了防止 form.values 中出现 { a: { b: 1 } } 的情况
|
|
449
|
+
// 使用 | 分隔后,form.values 中会出现 { 'a|b': 1 } 的情况,这种情况下
|
|
450
|
+
// 就可以知道该字段是一个关系字段中的输入框,进而特殊处理
|
|
451
|
+
getItem(subField, "".concat(schemaName, ".").concat(subField.name), collectionName, getCollectionFields, [].concat(_toConsumableArray(processedCollections), [field.target]))
|
|
452
|
+
);
|
|
448
453
|
}).filter(Boolean)
|
|
449
454
|
};
|
|
450
455
|
}
|
|
@@ -488,8 +493,7 @@ export var useFilterAssociatedFormItemInitializerFields = function useFilterAsso
|
|
|
488
493
|
};
|
|
489
494
|
export var useInheritsFormItemInitializerFields = function useInheritsFormItemInitializerFields(options) {
|
|
490
495
|
var _useCollection8 = useCollection(),
|
|
491
|
-
name = _useCollection8.name
|
|
492
|
-
template = _useCollection8.template;
|
|
496
|
+
name = _useCollection8.name;
|
|
493
497
|
var _useCollectionManager8 = useCollectionManager(),
|
|
494
498
|
getInterface = _useCollectionManager8.getInterface,
|
|
495
499
|
getInheritCollections = _useCollectionManager8.getInheritCollections,
|
|
@@ -498,17 +502,17 @@ export var useInheritsFormItemInitializerFields = function useInheritsFormItemIn
|
|
|
498
502
|
var inherits = getInheritCollections(name);
|
|
499
503
|
var _useActionContext3 = useActionContext(),
|
|
500
504
|
snapshot = _useActionContext3.snapshot;
|
|
505
|
+
var form = useForm();
|
|
501
506
|
return inherits === null || inherits === void 0 ? void 0 : inherits.map(function (v) {
|
|
502
507
|
var _fields$filter4;
|
|
503
508
|
var fields = getParentCollectionFields(v, name);
|
|
504
|
-
var form = useForm();
|
|
505
509
|
var _ref5 = options || {},
|
|
506
510
|
_ref5$readPretty = _ref5.readPretty,
|
|
507
511
|
readPretty = _ref5$readPretty === void 0 ? form.readPretty : _ref5$readPretty,
|
|
508
512
|
_ref5$block = _ref5.block,
|
|
509
513
|
block = _ref5$block === void 0 ? 'Form' : _ref5$block;
|
|
510
514
|
var targetCollection = getCollection(v);
|
|
511
|
-
return _defineProperty({}, targetCollection.title, fields === null || fields === void 0 ? void 0 : (_fields$filter4 = fields.filter(function (field) {
|
|
515
|
+
return _defineProperty({}, targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.title, fields === null || fields === void 0 ? void 0 : (_fields$filter4 = fields.filter(function (field) {
|
|
512
516
|
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : field.isForeignKey);
|
|
513
517
|
})) === null || _fields$filter4 === void 0 ? void 0 : _fields$filter4.map(function (field) {
|
|
514
518
|
var _field$uiSchema10, _field$uiSchema11, _field$uiSchema12;
|
|
@@ -816,7 +820,8 @@ export var useCollectionDataSourceItems = function useCollectionDataSourceItems(
|
|
|
816
820
|
var _useTranslation2 = useTranslation(),
|
|
817
821
|
t = _useTranslation2.t;
|
|
818
822
|
var _useCollectionManager12 = useCollectionManager(),
|
|
819
|
-
collections = _useCollectionManager12.collections
|
|
823
|
+
collections = _useCollectionManager12.collections,
|
|
824
|
+
getCollectionFields = _useCollectionManager12.getCollectionFields;
|
|
820
825
|
var _useSchemaTemplateMan2 = useSchemaTemplateManager(),
|
|
821
826
|
getTemplatesByCollection = _useSchemaTemplateMan2.getTemplatesByCollection;
|
|
822
827
|
var _useState = useState([]),
|
|
@@ -843,7 +848,9 @@ export var useCollectionDataSourceItems = function useCollectionDataSourceItems(
|
|
|
843
848
|
var b = !value || selected.includes(item.name);
|
|
844
849
|
if (item.inherit) {
|
|
845
850
|
return false;
|
|
846
|
-
}
|
|
851
|
+
}
|
|
852
|
+
var fields = getCollectionFields(item.name);
|
|
853
|
+
if (item.autoGenId === false && !fields.find(function (v) {
|
|
847
854
|
return v.primaryKey;
|
|
848
855
|
})) {
|
|
849
856
|
return false;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { connect, mapProps, observer } from '@formily/react';
|
|
2
2
|
import { Tree as AntdTree } from 'antd';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { useCollectionManager } from '../../collection-manager';
|
|
4
6
|
import { AssociationSelect, SchemaComponent } from '../../schema-component';
|
|
5
7
|
import { AsDefaultTemplate } from './components/AsDefaultTemplate';
|
|
6
8
|
import { ArrayCollapse } from './components/DataTemplateTitle';
|
|
@@ -18,6 +20,13 @@ export var FormDataTemplates = observer(function (props) {
|
|
|
18
20
|
var _useCollectionState = useCollectionState(collectionName),
|
|
19
21
|
collectionList = _useCollectionState.collectionList,
|
|
20
22
|
getEnableFieldTree = _useCollectionState.getEnableFieldTree;
|
|
23
|
+
var _useCollectionManager = useCollectionManager(),
|
|
24
|
+
getCollection = _useCollectionManager.getCollection,
|
|
25
|
+
getCollectionField = _useCollectionManager.getCollectionField;
|
|
26
|
+
var collection = getCollection(collectionName);
|
|
27
|
+
var _useTranslation = useTranslation(),
|
|
28
|
+
t = _useTranslation.t;
|
|
29
|
+
var field = getCollectionField("".concat(collectionName, ".").concat((collection === null || collection === void 0 ? void 0 : collection.titleField) || 'id'));
|
|
21
30
|
return /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
22
31
|
components: {
|
|
23
32
|
ArrayCollapse: ArrayCollapse
|
|
@@ -55,7 +64,7 @@ export var FormDataTemplates = observer(function (props) {
|
|
|
55
64
|
type: 'string',
|
|
56
65
|
title: '{{ t("Collection") }}',
|
|
57
66
|
required: true,
|
|
58
|
-
description: '
|
|
67
|
+
description: t('If collection inherits, choose inherited collections as templates'),
|
|
59
68
|
default: collectionName,
|
|
60
69
|
'x-display': collectionList.length > 1 ? 'visible' : 'hidden',
|
|
61
70
|
'x-decorator': 'FormItem',
|
|
@@ -68,7 +77,7 @@ export var FormDataTemplates = observer(function (props) {
|
|
|
68
77
|
type: 'number',
|
|
69
78
|
title: '{{ t("Template Data") }}',
|
|
70
79
|
required: true,
|
|
71
|
-
description: '
|
|
80
|
+
description: t('Select an existing piece of data as the initialization data for the form'),
|
|
72
81
|
'x-decorator': 'FormItem',
|
|
73
82
|
'x-component': AssociationSelect,
|
|
74
83
|
'x-component-props': {
|
|
@@ -79,16 +88,20 @@ export var FormDataTemplates = observer(function (props) {
|
|
|
79
88
|
multiple: false,
|
|
80
89
|
objectValue: false,
|
|
81
90
|
manual: false,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
label
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
targetField: field,
|
|
92
|
+
mapOptions: function mapOptions(option) {
|
|
93
|
+
try {
|
|
94
|
+
var label = getLabel(collection);
|
|
95
|
+
option[label] = /*#__PURE__*/React.createElement(React.Fragment, null, "#", option.id, " ", option[label]);
|
|
96
|
+
return option;
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.error(error);
|
|
99
|
+
return option;
|
|
100
|
+
}
|
|
88
101
|
},
|
|
89
102
|
fieldNames: {
|
|
90
|
-
label:
|
|
91
|
-
value: '
|
|
103
|
+
label: getLabel(collection),
|
|
104
|
+
value: 'id'
|
|
92
105
|
}
|
|
93
106
|
},
|
|
94
107
|
'x-reactions': [{
|
|
@@ -109,7 +122,7 @@ export var FormDataTemplates = observer(function (props) {
|
|
|
109
122
|
type: 'array',
|
|
110
123
|
title: '{{ t("Data fields") }}',
|
|
111
124
|
required: true,
|
|
112
|
-
description: '
|
|
125
|
+
description: t('Only the selected fields will be used as the initialization data for the form'),
|
|
113
126
|
'x-decorator': 'FormItem',
|
|
114
127
|
'x-component': Tree,
|
|
115
128
|
'x-component-props': {
|
|
@@ -171,4 +184,7 @@ export var FormDataTemplates = observer(function (props) {
|
|
|
171
184
|
}
|
|
172
185
|
}
|
|
173
186
|
});
|
|
174
|
-
});
|
|
187
|
+
});
|
|
188
|
+
function getLabel(collection) {
|
|
189
|
+
return !(collection === null || collection === void 0 ? void 0 : collection.titleField) || collection.titleField === 'id' ? 'label' : collection === null || collection === void 0 ? void 0 : collection.titleField;
|
|
190
|
+
}
|
|
@@ -27,8 +27,9 @@ export var useCollectionState = function useCollectionState(currentCollectionNam
|
|
|
27
27
|
function getCollectionList() {
|
|
28
28
|
var collections = getAllCollectionsInheritChain(currentCollectionName);
|
|
29
29
|
return collections.map(function (name) {
|
|
30
|
+
var _getCollection;
|
|
30
31
|
return {
|
|
31
|
-
label: getCollection(name).title,
|
|
32
|
+
label: (_getCollection = getCollection(name)) === null || _getCollection === void 0 ? void 0 : _getCollection.title,
|
|
32
33
|
value: name
|
|
33
34
|
};
|
|
34
35
|
});
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
value: any;
|
|
4
|
+
onChange: (value: any) => void;
|
|
5
|
+
renderSchemaComponent: () => React.ReactNode;
|
|
6
|
+
collectionName: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function FilterDynamicComponent(props: Props): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -85,6 +85,7 @@ export var ValueDynamicComponent = function ValueDynamicComponent(props) {
|
|
|
85
85
|
className: 'ant-formily-item-extra'
|
|
86
86
|
}, t('Syntax references'), ":"), /*#__PURE__*/React.createElement("a", {
|
|
87
87
|
href: "https://formulajs.info/functions/",
|
|
88
|
-
target: "_blank"
|
|
88
|
+
target: "_blank",
|
|
89
|
+
rel: "noreferrer"
|
|
89
90
|
}, "Formula.js"))) : null);
|
|
90
91
|
};
|
|
@@ -2,7 +2,7 @@ import { GeneralField } from '@formily/core';
|
|
|
2
2
|
import { ISchema, Schema } from '@formily/react';
|
|
3
3
|
import { CascaderProps, MenuItemProps } from 'antd';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { Designable } from '..';
|
|
5
|
+
import { CollectionFieldOptions, Designable } from '..';
|
|
6
6
|
interface SchemaSettingsProps {
|
|
7
7
|
title?: any;
|
|
8
8
|
dn?: Designable;
|
|
@@ -56,4 +56,7 @@ interface SwitchItemProps extends Omit<MenuItemProps, 'onChange'> {
|
|
|
56
56
|
export declare const useDataTemplates: () => {
|
|
57
57
|
templateData: any;
|
|
58
58
|
};
|
|
59
|
+
export declare const isShowDefaultValue: (collectionField: CollectionFieldOptions, getInterface: any) => boolean;
|
|
60
|
+
export declare const isSystemField: (collectionField: CollectionFieldOptions, getInterface: any) => boolean;
|
|
61
|
+
export declare const isPatternDisabled: (fieldSchema: Schema) => boolean;
|
|
59
62
|
export {};
|