@nocobase/client 0.9.2-alpha.2 → 0.9.2-alpha.4
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/acl/Configuration/schemas/useRoleResourceValues.d.ts +1 -14
- package/es/api-client/hooks/useRequest.d.ts +1 -14
- package/es/api-client/hooks/useRequest.js +48 -53
- 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.d.ts +1 -1
- package/es/block-provider/hooks/index.js +49 -35
- 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.d.ts +1 -14
- package/es/collection-manager/Configuration/EditCollectionAction.js +4 -4
- package/es/collection-manager/Configuration/EditFieldAction.js +2 -1
- package/es/collection-manager/Configuration/OverridingCollectionField.js +2 -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 +5 -43
- 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 +8 -1
- package/es/collection-manager/interfaces/m2m.js +8 -1
- package/es/collection-manager/interfaces/m2o.js +8 -1
- package/es/collection-manager/interfaces/multipleSelect.js +10 -0
- package/es/collection-manager/interfaces/o2m.js +10 -2
- package/es/collection-manager/interfaces/o2o.js +12 -3
- package/es/collection-manager/interfaces/percent.js +10 -0
- package/es/collection-manager/interfaces/select.js +10 -0
- package/es/collection-manager/interfaces/types.d.ts +2 -0
- package/es/collection-manager/interfaces/updatedBy.js +5 -1
- package/es/collection-manager/sub-table.d.ts +1 -14
- 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 +8 -1
- package/es/locale/en_US.js +9 -2
- package/es/locale/ja_JP.d.ts +16 -1
- package/es/locale/ja_JP.js +18 -3
- package/es/locale/pt_BR.d.ts +17 -1
- package/es/locale/pt_BR.js +19 -3
- 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 +17 -1
- package/es/locale/zh_CN.js +18 -2
- 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-filter/AssociationFilter.FilterBlockInitializer.js +2 -2
- package/es/schema-component/antd/association-select/AssociationSelect.js +67 -37
- 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 +101 -19
- 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/form-v2/utils.js +3 -3
- 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/gantt.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 +11 -9
- 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 +12 -7
- 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.d.ts +2 -0
- package/es/schema-component/antd/variable/Variable.js +7 -4
- 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 +54 -45
- 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 +14 -0
- package/es/schema-settings/VariableInput/VariableInput.js +39 -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/acl/Configuration/schemas/useRoleResourceValues.d.ts +1 -14
- package/lib/api-client/hooks/useRequest.d.ts +1 -14
- package/lib/api-client/hooks/useRequest.js +48 -53
- 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.d.ts +1 -1
- package/lib/block-provider/hooks/index.js +47 -33
- 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.d.ts +1 -14
- package/lib/collection-manager/Configuration/EditCollectionAction.js +4 -4
- package/lib/collection-manager/Configuration/EditFieldAction.js +2 -1
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +2 -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 +5 -43
- 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 +8 -1
- package/lib/collection-manager/interfaces/m2m.js +8 -1
- package/lib/collection-manager/interfaces/m2o.js +8 -1
- package/lib/collection-manager/interfaces/multipleSelect.js +10 -0
- package/lib/collection-manager/interfaces/o2m.js +10 -2
- package/lib/collection-manager/interfaces/o2o.js +12 -3
- package/lib/collection-manager/interfaces/percent.js +10 -0
- package/lib/collection-manager/interfaces/select.js +10 -0
- package/lib/collection-manager/interfaces/types.d.ts +2 -0
- package/lib/collection-manager/interfaces/updatedBy.js +5 -1
- package/lib/collection-manager/sub-table.d.ts +1 -14
- 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 +8 -1
- package/lib/locale/en_US.js +9 -2
- package/lib/locale/ja_JP.d.ts +16 -1
- package/lib/locale/ja_JP.js +18 -3
- package/lib/locale/pt_BR.d.ts +17 -1
- package/lib/locale/pt_BR.js +19 -3
- 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 +17 -1
- package/lib/locale/zh_CN.js +18 -2
- 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-filter/AssociationFilter.FilterBlockInitializer.js +2 -2
- package/lib/schema-component/antd/association-select/AssociationSelect.js +65 -35
- 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 +102 -19
- 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/form-v2/utils.js +3 -4
- 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/gantt.js +3 -3
- 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 +11 -9
- 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 +11 -6
- 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/Variable.d.ts +2 -0
- package/lib/schema-component/antd/variable/Variable.js +6 -2
- 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 +53 -44
- 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 +14 -0
- package/lib/schema-settings/VariableInput/VariableInput.js +49 -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
|
@@ -475,7 +475,7 @@ export var Gantt = function Gantt(props) {
|
|
|
475
475
|
_context.next = 2;
|
|
476
476
|
return resource.update({
|
|
477
477
|
filterByTk: task.id,
|
|
478
|
-
values:
|
|
478
|
+
values: _defineProperty({}, fieldNames.progress, task.progress / 100)
|
|
479
479
|
});
|
|
480
480
|
case 2:
|
|
481
481
|
message.success(t('Saved successfully'));
|
|
@@ -493,14 +493,14 @@ export var Gantt = function Gantt(props) {
|
|
|
493
493
|
}();
|
|
494
494
|
var handleTaskChange = /*#__PURE__*/function () {
|
|
495
495
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(task) {
|
|
496
|
-
var
|
|
496
|
+
var _values2;
|
|
497
497
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
498
498
|
while (1) switch (_context2.prev = _context2.next) {
|
|
499
499
|
case 0:
|
|
500
500
|
_context2.next = 2;
|
|
501
501
|
return resource.update({
|
|
502
502
|
filterByTk: task.id,
|
|
503
|
-
values:
|
|
503
|
+
values: (_values2 = {}, _defineProperty(_values2, fieldNames.start, task.start), _defineProperty(_values2, fieldNames.end, task.end), _values2)
|
|
504
504
|
});
|
|
505
505
|
case 2:
|
|
506
506
|
message.success(t('Saved successfully'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
|
-
export var ganttVerticalContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n font-size: 0;\n margin: 0;\n padding: 0;\n width:100%;\n border-left: 2px solid #f4f2f2;\n"])));
|
|
4
|
+
export var ganttVerticalContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n font-size: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n border-left: 2px solid #f4f2f2;\n"])));
|
|
5
5
|
export var horizontalContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n overflow: hidden;\n"])));
|
|
6
6
|
export var wrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n padding: 0;\n margin: 0;\n list-style: none;\n outline: none;\n position: relative;\n .gantt-horizontal-scoll {\n display: none;\n }\n &:hover {\n .gantt-horizontal-scoll {\n display: block;\n }\n }\n"])));
|
|
@@ -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 { GridBody } from
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { GridBody } from './grid-body';
|
|
9
9
|
export var Grid = function Grid(props) {
|
|
10
10
|
return /*#__PURE__*/React.createElement("g", {
|
|
11
11
|
className: "grid"
|
|
@@ -3,5 +3,5 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
4
|
export var gridRow = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: #fff;\n"])));
|
|
5
5
|
export var gridHeightRow = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n fill: #e6f7ff;\n border-color: rgba(0, 0, 0, 0.03);\n"])));
|
|
6
|
-
export var gridRowLine = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n stroke: #f0f0f0;\n stroke-width:0;\n border-bottom: 1px solid #f0f0f0;\n"])));
|
|
6
|
+
export var gridRowLine = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n stroke: #f0f0f0;\n stroke-width: 0;\n border-bottom: 1px solid #f0f0f0;\n"])));
|
|
7
7
|
export var gridTick = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n stroke: #f0f0f0;\n"])));
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React from
|
|
7
|
+
import React from 'react';
|
|
8
8
|
export var Arrow = function Arrow(_ref) {
|
|
9
9
|
var taskFrom = _ref.taskFrom,
|
|
10
10
|
taskTo = _ref.taskTo,
|
|
@@ -39,7 +39,7 @@ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHe
|
|
|
39
39
|
var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
|
|
40
40
|
var taskToEndPosition = taskTo.y + taskHeight / 2;
|
|
41
41
|
var taskFromEndPosition = taskFrom.x2 + arrowIndent * 2;
|
|
42
|
-
var taskFromHorizontalOffsetValue = taskFromEndPosition < taskTo.x1 ?
|
|
42
|
+
var taskFromHorizontalOffsetValue = taskFromEndPosition < taskTo.x1 ? '' : "H ".concat(taskTo.x1 - arrowIndent);
|
|
43
43
|
var taskToHorizontalOffsetValue = taskFromEndPosition > taskTo.x1 ? arrowIndent : taskTo.x1 - taskFrom.x2 - arrowIndent;
|
|
44
44
|
var path = "M ".concat(taskFrom.x2, " ").concat(taskFrom.y + taskHeight / 2, " \n h ").concat(arrowIndent, " \n v ").concat(indexCompare * rowHeight / 2, " \n ").concat(taskFromHorizontalOffsetValue, "\n V ").concat(taskToEndPosition, " \n h ").concat(taskToHorizontalOffsetValue);
|
|
45
45
|
var trianglePoints = "".concat(taskTo.x1, ",").concat(taskToEndPosition, " \n ").concat(taskTo.x1 - 5, ",").concat(taskToEndPosition - 5, " \n ").concat(taskTo.x1 - 5, ",").concat(taskToEndPosition + 5);
|
|
@@ -49,7 +49,7 @@ var drownPathAndTriangleRTL = function drownPathAndTriangleRTL(taskFrom, taskTo,
|
|
|
49
49
|
var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
|
|
50
50
|
var taskToEndPosition = taskTo.y + taskHeight / 2;
|
|
51
51
|
var taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
|
|
52
|
-
var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ?
|
|
52
|
+
var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? '' : "H ".concat(taskTo.x2 + arrowIndent);
|
|
53
53
|
var taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
|
|
54
54
|
var path = "M ".concat(taskFrom.x1, " ").concat(taskFrom.y + taskHeight / 2, " \n h ").concat(-arrowIndent, " \n v ").concat(indexCompare * rowHeight / 2, " \n ").concat(taskFromHorizontalOffsetValue, "\n V ").concat(taskToEndPosition, " \n h ").concat(taskToHorizontalOffsetValue);
|
|
55
55
|
var trianglePoints = "".concat(taskTo.x2, ",").concat(taskToEndPosition, " \n ").concat(taskTo.x2 + 5, ",").concat(taskToEndPosition + 5, " \n ").concat(taskTo.x2 + 5, ",").concat(taskToEndPosition - 5);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
|
-
export var scrollWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: auto;\n position: absolute;\n bottom: -4px;\n max-width: 100%;\n /*firefox*/\n scrollbar-width: thin;\n /*iPad*/\n height: 1.2rem;\n &::-webkit-scrollbar {\n width: 1.1rem;\n height: 1.1rem;\n }\n &::-webkit-scrollbar-corner {\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n border: 5px solid transparent;\n background:
|
|
4
|
+
export var scrollWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: auto;\n position: absolute;\n bottom: -4px;\n max-width: 100%;\n /*firefox*/\n scrollbar-width: thin;\n /*iPad*/\n height: 1.2rem;\n &::-webkit-scrollbar {\n width: 1.1rem;\n height: 1.1rem;\n }\n &::-webkit-scrollbar-corner {\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n border: 5px solid transparent;\n background: #5c5858cc;\n border-radius: 10px;\n background-clip: padding-box;\n }\n &::-webkit-scrollbar-thumb:hover {\n border: 4px solid transparent;\n background: #5c5858bd;\n background-clip: padding-box;\n }\n"])));
|
|
5
5
|
export var horizontalScroll = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 1px;\n"])));
|
|
6
6
|
export var tooltipDefaultContainer = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 12px;\n background-color: #fff;\n background-clip: padding-box;\n border-radius: 2px;\n box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);\n b {\n display: block;\n margin-bottom: 8px;\n }\n"])));
|
|
7
7
|
export var tooltipDefaultContainerParagraph = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 12px;\n margin-bottom: 6px;\n color: #666;\n"])));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TaskItemProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TaskItemProps } from '../task-item';
|
|
3
3
|
export declare const BarSmall: React.FC<TaskItemProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { cx } from '@emotion/css';
|
|
3
|
-
import { getProgressPoint } from
|
|
4
|
-
import { BarDisplay } from
|
|
5
|
-
import { BarProgressHandle } from
|
|
3
|
+
import { getProgressPoint } from '../../../helpers/bar-helper';
|
|
4
|
+
import { BarDisplay } from './bar-display';
|
|
5
|
+
import { BarProgressHandle } from './bar-progress-handle';
|
|
6
6
|
import { barWrapper } from './style';
|
|
7
7
|
export var BarSmall = function BarSmall(_ref) {
|
|
8
8
|
var task = _ref.task,
|
|
@@ -25,14 +25,14 @@ export var BarSmall = function BarSmall(_ref) {
|
|
|
25
25
|
styles: task.styles,
|
|
26
26
|
isSelected: isSelected,
|
|
27
27
|
onMouseDown: function onMouseDown(e) {
|
|
28
|
-
isDateChangeable && onEventStart(
|
|
28
|
+
isDateChangeable && onEventStart('move', task, e);
|
|
29
29
|
}
|
|
30
30
|
}), /*#__PURE__*/React.createElement("g", {
|
|
31
31
|
className: "handleGroup"
|
|
32
32
|
}, isProgressChangeable && /*#__PURE__*/React.createElement(BarProgressHandle, {
|
|
33
33
|
progressPoint: progressPoint,
|
|
34
34
|
onMouseDown: function onMouseDown(e) {
|
|
35
|
-
onEventStart(
|
|
35
|
+
onEventStart('progress', task, e);
|
|
36
36
|
}
|
|
37
37
|
})));
|
|
38
38
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TaskItemProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TaskItemProps } from '../task-item';
|
|
3
3
|
export declare const Bar: React.FC<TaskItemProps>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cx } from '@emotion/css';
|
|
2
|
-
import React from
|
|
3
|
-
import { getProgressPoint } from
|
|
4
|
-
import { BarDateHandle } from
|
|
5
|
-
import { BarDisplay } from
|
|
6
|
-
import { BarProgressHandle } from
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { getProgressPoint } from '../../../helpers/bar-helper';
|
|
4
|
+
import { BarDateHandle } from './bar-date-handle';
|
|
5
|
+
import { BarDisplay } from './bar-display';
|
|
6
|
+
import { BarProgressHandle } from './bar-progress-handle';
|
|
7
7
|
import { barWrapper } from './style';
|
|
8
8
|
export var Bar = function Bar(_ref) {
|
|
9
9
|
var task = _ref.task,
|
|
@@ -29,7 +29,7 @@ export var Bar = function Bar(_ref) {
|
|
|
29
29
|
styles: task.styles,
|
|
30
30
|
isSelected: isSelected,
|
|
31
31
|
onMouseDown: function onMouseDown(e) {
|
|
32
|
-
isDateChangeable && onEventStart(
|
|
32
|
+
isDateChangeable && onEventStart('move', task, e);
|
|
33
33
|
}
|
|
34
34
|
}), /*#__PURE__*/React.createElement("g", {
|
|
35
35
|
className: "handleGroup"
|
|
@@ -40,7 +40,7 @@ export var Bar = function Bar(_ref) {
|
|
|
40
40
|
height: handleHeight,
|
|
41
41
|
barCornerRadius: task.barCornerRadius,
|
|
42
42
|
onMouseDown: function onMouseDown(e) {
|
|
43
|
-
onEventStart(
|
|
43
|
+
onEventStart('start', task, e);
|
|
44
44
|
}
|
|
45
45
|
}), /*#__PURE__*/React.createElement(BarDateHandle, {
|
|
46
46
|
x: task.x2 - task.handleWidth - 1,
|
|
@@ -49,12 +49,12 @@ export var Bar = function Bar(_ref) {
|
|
|
49
49
|
height: handleHeight,
|
|
50
50
|
barCornerRadius: task.barCornerRadius,
|
|
51
51
|
onMouseDown: function onMouseDown(e) {
|
|
52
|
-
onEventStart(
|
|
52
|
+
onEventStart('end', task, e);
|
|
53
53
|
}
|
|
54
54
|
})), isProgressChangeable && /*#__PURE__*/React.createElement(BarProgressHandle, {
|
|
55
55
|
progressPoint: progressPoint,
|
|
56
56
|
onMouseDown: function onMouseDown(e) {
|
|
57
|
-
onEventStart(
|
|
57
|
+
onEventStart('progress', task, e);
|
|
58
58
|
}
|
|
59
59
|
})));
|
|
60
60
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _templateObject, _templateObject2;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
|
-
export var barWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n outline: none;\n .barHandle{\n fill: #ddd;\n cursor: ew-resize;\n opacity: 0;\n visibility: hidden;\n }\n &:hover .barHandle {\n visibility: visible;\n opacity: 1;\n }\n"])));
|
|
5
|
-
export var barBackground = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n stroke-width: 0;\n opacity: .6;\n"])));
|
|
4
|
+
export var barWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n outline: none;\n .barHandle {\n fill: #ddd;\n cursor: ew-resize;\n opacity: 0;\n visibility: hidden;\n }\n &:hover .barHandle {\n visibility: visible;\n opacity: 1;\n }\n"])));
|
|
5
|
+
export var barBackground = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n stroke-width: 0;\n opacity: 0.6;\n"])));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TaskItemProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TaskItemProps } from '../task-item';
|
|
3
3
|
export declare const Milestone: React.FC<TaskItemProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { cx } from '@emotion/css';
|
|
3
3
|
import { milestoneWrapper, milestoneBackground } from './style';
|
|
4
4
|
export var Milestone = function Milestone(_ref) {
|
|
@@ -24,7 +24,7 @@ export var Milestone = function Milestone(_ref) {
|
|
|
24
24
|
transform: transform,
|
|
25
25
|
className: cx(milestoneBackground),
|
|
26
26
|
onMouseDown: function onMouseDown(e) {
|
|
27
|
-
isDateChangeable && onEventStart(
|
|
27
|
+
isDateChangeable && onEventStart('move', task, e);
|
|
28
28
|
}
|
|
29
29
|
}));
|
|
30
30
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Task, TaskType } from
|
|
1
|
+
import { Task, TaskType } from './public-types';
|
|
2
2
|
export interface BarTask extends Task {
|
|
3
3
|
index: number;
|
|
4
4
|
typeInternal: TaskTypeInternal;
|
|
@@ -19,4 +19,4 @@ export interface BarTask extends Task {
|
|
|
19
19
|
progressSelectedColor: string;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
export declare type TaskTypeInternal = TaskType |
|
|
22
|
+
export declare type TaskTypeInternal = TaskType | 'smalltask';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BarTask } from
|
|
2
|
-
export declare type BarMoveAction =
|
|
3
|
-
export declare type GanttContentMoveAction =
|
|
1
|
+
import { BarTask } from './bar-task';
|
|
2
|
+
export declare type BarMoveAction = 'progress' | 'end' | 'start' | 'move';
|
|
3
|
+
export declare type GanttContentMoveAction = 'mouseenter' | 'mouseleave' | 'delete' | 'dblclick' | 'click' | 'select' | '' | BarMoveAction;
|
|
4
4
|
export declare type GanttEvent = {
|
|
5
5
|
changedTask?: BarTask;
|
|
6
6
|
originalSelectedTask?: BarTask;
|
|
@@ -10,7 +10,7 @@ export declare enum ViewMode {
|
|
|
10
10
|
QuarterYear = "quarterYear",
|
|
11
11
|
Year = "year"
|
|
12
12
|
}
|
|
13
|
-
export declare type TaskType =
|
|
13
|
+
export declare type TaskType = 'task' | 'milestone' | 'project';
|
|
14
14
|
export interface Task {
|
|
15
15
|
id: string;
|
|
16
16
|
type: TaskType;
|
|
@@ -31,6 +31,7 @@ var breakRemoveOnRow = function breakRemoveOnRow(s) {
|
|
|
31
31
|
};
|
|
32
32
|
var ColDivider = function ColDivider(props) {
|
|
33
33
|
var _dndContext$active, _dndContext$active$da, _dndContext$active$da2;
|
|
34
|
+
var dragIdRef = useRef(null);
|
|
34
35
|
var _useDroppable = useDroppable({
|
|
35
36
|
id: props.id,
|
|
36
37
|
data: props.data
|
|
@@ -81,6 +82,7 @@ var ColDivider = function ColDivider(props) {
|
|
|
81
82
|
if (!isDragging) {
|
|
82
83
|
return;
|
|
83
84
|
}
|
|
85
|
+
dragIdRef.current = event.active.id;
|
|
84
86
|
var el = dividerRef.current;
|
|
85
87
|
var prev = el.previousElementSibling;
|
|
86
88
|
var next = el.nextElementSibling;
|
|
@@ -90,14 +92,23 @@ var ColDivider = function ColDivider(props) {
|
|
|
90
92
|
if (!isDragging) {
|
|
91
93
|
return;
|
|
92
94
|
}
|
|
95
|
+
if (dragIdRef.current === event.active.id) {
|
|
96
|
+
dragIdRef.current = dragIdRef.current + '_move';
|
|
97
|
+
}
|
|
93
98
|
var el = dividerRef.current;
|
|
94
99
|
var prev = el.previousElementSibling;
|
|
95
100
|
var next = el.nextElementSibling;
|
|
96
|
-
prev.style.width = "
|
|
97
|
-
next.style.width = "
|
|
101
|
+
prev.style.width = "".concat(clientWidths[0] + event.delta.x, "px");
|
|
102
|
+
next.style.width = "".concat(clientWidths[1] - event.delta.x, "px");
|
|
98
103
|
},
|
|
99
104
|
onDragEnd: function onDragEnd(event) {
|
|
100
|
-
var _ref, _ref2;
|
|
105
|
+
var _dragIdRef$current, _ref, _ref2;
|
|
106
|
+
if (!dragIdRef.current) return;
|
|
107
|
+
if ((_dragIdRef$current = dragIdRef.current) === null || _dragIdRef$current === void 0 ? void 0 : _dragIdRef$current.startsWith(event.active.id)) {
|
|
108
|
+
if (!dragIdRef.current.endsWith('_move')) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
101
112
|
if (clientWidths[0] <= 0 || clientWidths[1] <= 0) {
|
|
102
113
|
return;
|
|
103
114
|
}
|
|
@@ -110,8 +121,11 @@ var ColDivider = function ColDivider(props) {
|
|
|
110
121
|
var next = el.nextElementSibling;
|
|
111
122
|
prevSchema['x-component-props'] = prevSchema['x-component-props'] || {};
|
|
112
123
|
nextSchema['x-component-props'] = nextSchema['x-component-props'] || {};
|
|
113
|
-
|
|
114
|
-
|
|
124
|
+
var dividerWidth = el.clientWidth * (props.cols.length + 1) / props.cols.length;
|
|
125
|
+
var preWidth = (100 * (prev.getBoundingClientRect().width + dividerWidth) / el.parentElement.clientWidth).toFixed(2);
|
|
126
|
+
var nextWidth = (100 * (next.getBoundingClientRect().width + dividerWidth) / el.parentElement.clientWidth).toFixed(2);
|
|
127
|
+
prevSchema['x-component-props']['width'] = preWidth;
|
|
128
|
+
nextSchema['x-component-props']['width'] = nextWidth;
|
|
115
129
|
dn.emit('batchPatch', {
|
|
116
130
|
schemas: [(_ref = {}, _defineProperty(_ref, 'x-uid', prevSchema['x-uid']), _defineProperty(_ref, 'x-component-props', _objectSpread({}, prevSchema['x-component-props'])), _ref), (_ref2 = {}, _defineProperty(_ref2, 'x-uid', nextSchema['x-uid']), _defineProperty(_ref2, 'x-component-props', _objectSpread({}, nextSchema['x-component-props'])), _ref2)]
|
|
117
131
|
});
|
|
@@ -124,12 +138,12 @@ var ColDivider = function ColDivider(props) {
|
|
|
124
138
|
dividerRef.current = el;
|
|
125
139
|
}
|
|
126
140
|
},
|
|
127
|
-
className: cls('nb-col-divider', css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: var(--nb-spacing);\n "])))),
|
|
141
|
+
className: cls('nb-col-divider', css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex-shrink: 0;\n width: var(--nb-spacing);\n "])))),
|
|
128
142
|
style: _objectSpread({}, droppableStyle)
|
|
129
143
|
}, /*#__PURE__*/React.createElement("div", _objectSpread(_objectSpread(_objectSpread({
|
|
130
144
|
ref: setDraggableNodeRef
|
|
131
145
|
}, listeners), attributes), {}, {
|
|
132
|
-
className: props.first || props.last || !designable ? null : css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &::before {\n content: ' ';\n width:
|
|
146
|
+
className: props.first || props.last || !designable ? null : css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &::before {\n content: ' ';\n width: 100%;\n height: 100%;\n position: absolute;\n cursor: col-resize;\n }\n &:hover {\n &::before {\n background: rgba(241, 139, 98, 0.06) !important;\n }\n }\n width: var(--nb-spacing);\n height: 100%;\n position: absolute;\n cursor: col-resize;\n "])))
|
|
133
147
|
})));
|
|
134
148
|
};
|
|
135
149
|
var RowDivider = function RowDivider(props) {
|
|
@@ -314,7 +328,7 @@ Grid.Row = observer(function () {
|
|
|
314
328
|
cols: cols
|
|
315
329
|
}
|
|
316
330
|
}, /*#__PURE__*/React.createElement("div", {
|
|
317
|
-
className: cls('nb-grid-row', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: 0 calc(-1 * var(--nb-spacing));\n display: flex;\n position: relative;\n /* z-index: 0; */\n "]))))
|
|
331
|
+
className: cls('nb-grid-row', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n margin: 0 calc(-1 * var(--nb-spacing));\n display: flex;\n position: relative;\n /* z-index: 0; */\n "]))))
|
|
318
332
|
}, /*#__PURE__*/React.createElement(ColDivider, {
|
|
319
333
|
cols: cols,
|
|
320
334
|
first: true,
|
|
@@ -355,7 +369,7 @@ Grid.Col = observer(function (props) {
|
|
|
355
369
|
if (cols === null || cols === void 0 ? void 0 : cols.length) {
|
|
356
370
|
var _schema$xComponentP;
|
|
357
371
|
var w = (schema === null || schema === void 0 ? void 0 : (_schema$xComponentP = schema['x-component-props']) === null || _schema$xComponentP === void 0 ? void 0 : _schema$xComponentP['width']) || 100 / cols.length;
|
|
358
|
-
width = "calc(".concat(w, "% - var(--nb-spacing) *
|
|
372
|
+
width = "calc(".concat(w, "% - var(--nb-spacing) * ").concat((cols.length + 1) / cols.length, ")");
|
|
359
373
|
}
|
|
360
374
|
var _useDroppable3 = useDroppable({
|
|
361
375
|
id: field.address.toString(),
|
|
@@ -21,7 +21,7 @@ import { isValid } from '@formily/shared';
|
|
|
21
21
|
import { Button, Input, Popover } from 'antd';
|
|
22
22
|
import React, { useState } from 'react';
|
|
23
23
|
import { useTranslation } from 'react-i18next';
|
|
24
|
-
import {
|
|
24
|
+
import { Icon, hasIcon, icons } from '../../../icon';
|
|
25
25
|
function IconField(props) {
|
|
26
26
|
var layout = useFormLayout();
|
|
27
27
|
var value = props.value,
|
|
@@ -11,7 +11,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { Popover } from 'antd';
|
|
14
|
-
import React, { forwardRef, useImperativeHandle, useState } from 'react';
|
|
14
|
+
import React, { forwardRef, useImperativeHandle, useState, useRef } from 'react';
|
|
15
|
+
var getContentWidth = function getContentWidth(element) {
|
|
16
|
+
if (element) {
|
|
17
|
+
var range = document.createRange();
|
|
18
|
+
range.selectNodeContents(element);
|
|
19
|
+
var contentWidth = range.getBoundingClientRect().width;
|
|
20
|
+
return contentWidth;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
15
23
|
var ellipsisDefaultStyle = {
|
|
16
24
|
overflow: 'hidden',
|
|
17
25
|
overflowWrap: 'break-word',
|
|
@@ -28,6 +36,7 @@ export var EllipsisWithTooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
28
36
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
37
|
visible = _useState4[0],
|
|
30
38
|
setVisible = _useState4[1];
|
|
39
|
+
var elRef = useRef();
|
|
31
40
|
useImperativeHandle(ref, function () {
|
|
32
41
|
return {
|
|
33
42
|
setPopoverVisible: setVisible
|
|
@@ -37,6 +46,12 @@ export var EllipsisWithTooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
37
46
|
return /*#__PURE__*/React.createElement(React.Fragment, null, props.children);
|
|
38
47
|
}
|
|
39
48
|
var popoverContent = props.popoverContent;
|
|
49
|
+
var isOverflowTooltip = function isOverflowTooltip() {
|
|
50
|
+
var _elRef$current;
|
|
51
|
+
var contentWidth = getContentWidth(elRef.current);
|
|
52
|
+
var offsetWidth = (_elRef$current = elRef.current) === null || _elRef$current === void 0 ? void 0 : _elRef$current.offsetWidth;
|
|
53
|
+
return contentWidth > offsetWidth;
|
|
54
|
+
};
|
|
40
55
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
41
56
|
visible: ellipsis && visible,
|
|
42
57
|
onVisibleChange: function onVisibleChange(visible) {
|
|
@@ -49,10 +64,14 @@ export var EllipsisWithTooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
49
64
|
}
|
|
50
65
|
}, popoverContent || props.children)
|
|
51
66
|
}, /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
ref: elRef,
|
|
52
68
|
style: _objectSpread({}, ellipsisDefaultStyle),
|
|
53
69
|
onMouseEnter: function onMouseEnter(e) {
|
|
54
70
|
var el = e.target;
|
|
55
|
-
|
|
71
|
+
var isShowTooltips = isOverflowTooltip();
|
|
72
|
+
if (isShowTooltips) {
|
|
73
|
+
setEllipsis(el.scrollWidth >= el.clientWidth);
|
|
74
|
+
}
|
|
56
75
|
}
|
|
57
76
|
}, props.children));
|
|
58
77
|
});
|
|
@@ -22,9 +22,10 @@ import { PlusOutlined } from '@ant-design/icons';
|
|
|
22
22
|
import { css } from '@emotion/css';
|
|
23
23
|
import { FormDialog, FormLayout } from '@formily/antd';
|
|
24
24
|
import { Schema, SchemaOptionsContext, useFieldSchema } from '@formily/react';
|
|
25
|
-
import {
|
|
25
|
+
import { PageHeader as AntdPageHeader, Button, Spin, Tabs } from 'antd';
|
|
26
26
|
import classNames from 'classnames';
|
|
27
27
|
import React, { useContext, useEffect, useState } from 'react';
|
|
28
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
28
29
|
import { useTranslation } from 'react-i18next';
|
|
29
30
|
import { useLocation } from 'react-router-dom';
|
|
30
31
|
import { useDocumentTitle } from '../../../document-title';
|
|
@@ -34,6 +35,7 @@ import { DndContext } from '../../common';
|
|
|
34
35
|
import { SortableItem } from '../../common/sortable-item';
|
|
35
36
|
import { SchemaComponent, SchemaComponentOptions } from '../../core';
|
|
36
37
|
import { useCompile, useDesignable } from '../../hooks';
|
|
38
|
+
import { ErrorFallback } from '../error-fallback';
|
|
37
39
|
import FixedBlock from './FixedBlock';
|
|
38
40
|
import { PageDesigner, PageTabDesigner } from './PageTabDesigner';
|
|
39
41
|
var designerCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n &.nb-action-link {\n > .general-schema-designer {\n top: var(--nb-designer-offset);\n bottom: var(--nb-designer-offset);\n right: var(--nb-designer-offset);\n left: var(--nb-designer-offset);\n }\n }\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: rgba(241, 139, 98, 0.06);\n border: 0;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: #f18b62;\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n"])));
|
|
@@ -77,6 +79,9 @@ export var Page = function Page(props) {
|
|
|
77
79
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
80
|
height = _useState6[0],
|
|
79
81
|
setHeight = _useState6[1];
|
|
82
|
+
var handleErrors = function handleErrors(error) {
|
|
83
|
+
console.error(error);
|
|
84
|
+
};
|
|
80
85
|
return /*#__PURE__*/React.createElement(FilterBlockProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
81
86
|
className: pageDesignerCss
|
|
82
87
|
}, /*#__PURE__*/React.createElement(PageDesigner, {
|
|
@@ -184,6 +189,9 @@ export var Page = function Page(props) {
|
|
|
184
189
|
margin: 'var(--nb-spacing)',
|
|
185
190
|
flex: 1
|
|
186
191
|
}
|
|
192
|
+
}, /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
193
|
+
FallbackComponent: ErrorFallback,
|
|
194
|
+
onError: handleErrors
|
|
187
195
|
}, loading ? /*#__PURE__*/React.createElement(Spin, null) : !disablePageHeader && enablePageTabs ? fieldSchema.mapProperties(function (schema) {
|
|
188
196
|
if (schema.name !== activeKey) return null;
|
|
189
197
|
return /*#__PURE__*/React.createElement(FixedBlock, {
|
|
@@ -200,5 +208,5 @@ export var Page = function Page(props) {
|
|
|
200
208
|
"calc(".concat(height, "px + 46px + var(--nb-spacing) * 2)")
|
|
201
209
|
}, /*#__PURE__*/React.createElement("div", {
|
|
202
210
|
className: pageWithFixedBlockCss
|
|
203
|
-
}, props.children)))));
|
|
211
|
+
}, props.children))))));
|
|
204
212
|
};
|
|
@@ -25,5 +25,5 @@ export var Pagination = observer(function (props) {
|
|
|
25
25
|
};
|
|
26
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
27
|
onKeyPress: onKeypress
|
|
28
|
-
}, /*#__PURE__*/React.createElement(AntdPagination, _objectSpread({}, others))
|
|
28
|
+
}, /*#__PURE__*/React.createElement(AntdPagination, _objectSpread({}, others)));
|
|
29
29
|
});
|
|
@@ -180,7 +180,7 @@ export var InputRecordPicker = function InputRecordPicker(props) {
|
|
|
180
180
|
multiple: multiple,
|
|
181
181
|
quickUpload: quickUpload,
|
|
182
182
|
selectFile: selectFile,
|
|
183
|
-
action: "".concat(collectionField.target, ":create"),
|
|
183
|
+
action: "".concat(collectionField === null || collectionField === void 0 ? void 0 : collectionField.target, ":create"),
|
|
184
184
|
onSelect: handleSelect,
|
|
185
185
|
onRemove: handleRemove,
|
|
186
186
|
onChange: function onChange(changed) {
|
|
@@ -208,12 +208,15 @@ export var InputRecordPicker = function InputRecordPicker(props) {
|
|
|
208
208
|
allowClear: true,
|
|
209
209
|
onChange: function onChange(changed) {
|
|
210
210
|
if (!changed) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
_onChange([]);
|
|
215
|
-
setSelectedRows([]);
|
|
211
|
+
var _value = multiple ? [] : null;
|
|
212
|
+
_onChange(_value);
|
|
213
|
+
setSelectedRows(_value);
|
|
216
214
|
} else if (Array.isArray(changed)) {
|
|
215
|
+
if (!changed.length) {
|
|
216
|
+
_onChange([]);
|
|
217
|
+
setSelectedRows([]);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
217
220
|
var values = options === null || options === void 0 ? void 0 : options.filter(function (option) {
|
|
218
221
|
return changed.includes(option[fieldNames.value]);
|
|
219
222
|
});
|
|
@@ -246,12 +249,11 @@ var Drawer = function Drawer(_ref) {
|
|
|
246
249
|
setVisible = _ref.setVisible,
|
|
247
250
|
fieldSchema = _ref.fieldSchema,
|
|
248
251
|
options = _ref.options;
|
|
249
|
-
console.log('collectionField', options);
|
|
250
252
|
var getFilter = function getFilter() {
|
|
251
|
-
var targetKey = collectionField.targetKey || 'id';
|
|
253
|
+
var targetKey = (collectionField === null || collectionField === void 0 ? void 0 : collectionField.targetKey) || 'id';
|
|
252
254
|
var list = options.map(function (option) {
|
|
253
255
|
return option[targetKey];
|
|
254
|
-
});
|
|
256
|
+
}).filter(Boolean);
|
|
255
257
|
var filter = list.length ? {
|
|
256
258
|
$and: [_defineProperty({}, "".concat(targetKey, ".$ne"), list)]
|
|
257
259
|
} : {};
|
|
@@ -4,7 +4,7 @@ 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 { useFieldSchema } from
|
|
7
|
+
import { useFieldSchema } from '@formily/react';
|
|
8
8
|
export var useFieldNames = function useFieldNames(props) {
|
|
9
9
|
var _fieldSchema$xCompon, _fieldSchema$xCompon$, _fieldSchema$xCompon$2, _fieldSchema$xCompon$3, _fieldSchema$xCompon2;
|
|
10
10
|
var fieldSchema = useFieldSchema();
|
|
@@ -9,6 +9,7 @@ export declare type RemoteSelectProps<P = any> = SelectProps<P, any> & {
|
|
|
9
9
|
wait?: number;
|
|
10
10
|
manual?: boolean;
|
|
11
11
|
mapOptions?: (data: any) => RemoteSelectProps['fieldNames'];
|
|
12
|
+
targetField?: any;
|
|
12
13
|
service: ResourceActionOptions<P>;
|
|
13
14
|
};
|
|
14
15
|
export declare const RemoteSelect: React.ForwardRefExoticComponent<Partial<SelectProps<any, any> & {
|
|
@@ -18,6 +19,7 @@ export declare const RemoteSelect: React.ForwardRefExoticComponent<Partial<Selec
|
|
|
18
19
|
wait?: number;
|
|
19
20
|
manual?: boolean;
|
|
20
21
|
mapOptions?: (data: any) => RemoteSelectProps['fieldNames'];
|
|
22
|
+
targetField?: any;
|
|
21
23
|
service: ResourceActionOptions<any>;
|
|
22
24
|
}> & React.RefAttributes<unknown>> & {
|
|
23
25
|
ReadPretty: typeof ReadPretty;
|