@nocobase/client 0.7.0-alpha.82 → 0.7.1-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/.umirc.ts +24 -0
- package/es/antd-config-provider/index.js +5 -4
- package/es/api-client/APIClient.d.ts +2 -0
- package/es/api-client/APIClient.js +42 -2
- package/es/application/Application.d.ts +23 -0
- package/es/application/Application.js +176 -0
- package/es/application/index.d.ts +1 -0
- package/es/application/index.js +1 -0
- package/es/block-provider/BlockProvider.js +27 -11
- package/es/block-provider/TableBlockProvider.d.ts +2 -1
- package/es/block-provider/TableBlockProvider.js +90 -23
- package/es/block-provider/TableFieldProvider.d.ts +1 -0
- package/es/block-provider/TableFieldProvider.js +5 -2
- package/es/block-provider/hooks/index.d.ts +3 -0
- package/es/block-provider/hooks/index.js +307 -166
- package/es/collection-manager/CollectionField.js +8 -1
- package/es/collection-manager/Configuration/AddFieldAction.js +53 -24
- package/es/collection-manager/Configuration/AddSubFieldAction.js +3 -2
- package/es/collection-manager/Configuration/ConfigurationTable.js +32 -6
- package/es/collection-manager/Configuration/EditFieldAction.js +44 -15
- package/es/collection-manager/Configuration/EditSubFieldAction.js +3 -2
- package/es/collection-manager/Configuration/components/FieldSummary.d.ts +2 -0
- package/es/collection-manager/Configuration/components/FieldSummary.js +32 -0
- package/es/collection-manager/Configuration/components/index.d.ts +7 -0
- package/es/collection-manager/Configuration/components/index.js +121 -0
- package/es/collection-manager/Configuration/interfaces.js +1 -0
- package/es/collection-manager/Configuration/schemas/collectionFields.js +4 -0
- package/es/collection-manager/Configuration/schemas/collections.js +17 -1
- package/es/collection-manager/hooks/useCollectionManager.d.ts +2 -1
- package/es/collection-manager/hooks/useCollectionManager.js +42 -19
- package/es/collection-manager/index.d.ts +1 -0
- package/es/collection-manager/index.js +1 -0
- package/es/collection-manager/interfaces/attachment.js +1 -1
- package/es/collection-manager/interfaces/chinaRegion.js +2 -2
- package/es/collection-manager/interfaces/components/index.d.ts +6 -0
- package/es/collection-manager/interfaces/components/index.js +30 -0
- package/es/collection-manager/interfaces/datetime.js +10 -1
- package/es/collection-manager/interfaces/formula.d.ts +2 -0
- package/es/collection-manager/interfaces/formula.js +74 -0
- package/es/collection-manager/interfaces/index.d.ts +5 -0
- package/es/collection-manager/interfaces/index.js +6 -1
- package/es/collection-manager/interfaces/linkTo.js +12 -11
- package/es/collection-manager/interfaces/m2m.d.ts +2 -0
- package/es/collection-manager/interfaces/m2m.js +251 -0
- package/es/collection-manager/interfaces/m2o.d.ts +2 -0
- package/es/collection-manager/interfaces/m2o.js +174 -0
- package/es/collection-manager/interfaces/o2m.d.ts +2 -0
- package/es/collection-manager/interfaces/o2m.js +238 -0
- package/es/collection-manager/interfaces/o2o.d.ts +4 -0
- package/es/collection-manager/interfaces/o2o.js +518 -0
- package/es/collection-manager/interfaces/percent.js +7 -7
- package/es/collection-manager/interfaces/phone.js +4 -1
- package/es/collection-manager/interfaces/properties/index.d.ts +1 -0
- package/es/collection-manager/interfaces/properties/index.js +31 -2
- package/es/i18n/i18n.js +6 -6
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -2
- package/es/locale/en_US.d.ts +293 -29
- package/es/locale/en_US.js +297 -34
- package/es/locale/index.d.ts +7 -751
- package/es/locale/index.js +20 -3
- package/es/locale/zh_CN.d.ts +107 -5
- package/es/locale/zh_CN.js +110 -7
- package/es/schema-component/antd/action/Action.Designer.js +34 -15
- package/es/schema-component/antd/action/Action.Drawer.js +1 -1
- package/es/schema-component/antd/action/utils.d.ts +2 -0
- package/es/schema-component/antd/action/utils.js +60 -0
- package/es/schema-component/antd/calendar/Calendar.Designer.js +5 -3
- package/es/schema-component/antd/cascader/Cascader.js +1 -1
- package/es/schema-component/antd/date-picker/ReadPretty.js +15 -5
- package/es/schema-component/antd/date-picker/util.d.ts +13 -1
- package/es/schema-component/antd/date-picker/util.js +110 -3
- package/es/schema-component/antd/filter/FilterItem.js +7 -7
- package/es/schema-component/antd/form-item/FormItem.js +80 -1
- package/es/schema-component/antd/form-v2/Form.Designer.js +20 -9
- package/es/schema-component/antd/form-v2/Form.js +2 -2
- package/es/schema-component/antd/formula-input/Compute.d.ts +3 -0
- package/es/schema-component/antd/formula-input/Compute.js +55 -0
- package/es/schema-component/antd/formula-input/FormulaInput.d.ts +3 -0
- package/es/schema-component/antd/formula-input/FormulaInput.js +173 -0
- package/es/schema-component/antd/formula-input/index.d.ts +1 -0
- package/es/schema-component/antd/formula-input/index.js +7 -0
- package/es/schema-component/antd/g2plot/G2Plot.d.ts +8 -0
- package/es/schema-component/antd/g2plot/G2Plot.js +123 -0
- package/es/schema-component/antd/g2plot/G2PlotDesigner.d.ts +1 -0
- package/es/schema-component/antd/g2plot/G2PlotDesigner.js +127 -0
- package/es/schema-component/antd/g2plot/index.d.ts +1 -0
- package/es/schema-component/antd/g2plot/index.js +1 -0
- package/es/schema-component/antd/grid/Grid.js +3 -3
- package/es/schema-component/antd/index.d.ts +3 -1
- package/es/schema-component/antd/index.js +3 -1
- package/es/schema-component/antd/input/EllipsisWithTooltip.d.ts +8 -1
- package/es/schema-component/antd/input/EllipsisWithTooltip.js +9 -3
- package/es/schema-component/antd/input/ReadPretty.js +5 -3
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.js +1 -1
- package/es/schema-component/antd/kanban/Kanban.Designer.js +5 -3
- package/es/schema-component/antd/markdown/Markdown.d.ts +1 -0
- package/es/schema-component/antd/markdown/Markdown.js +3 -1
- package/es/schema-component/antd/markdown/style.less +4 -0
- package/es/schema-component/antd/percent/Percent.d.ts +2 -0
- package/es/{action-logs/ActionLogBlockInitializer.js → schema-component/antd/percent/Percent.js} +20 -25
- package/es/schema-component/antd/percent/index.d.ts +1 -0
- package/es/schema-component/antd/percent/index.js +1 -0
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +7 -5
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +43 -26
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +18 -4
- package/es/schema-component/antd/table-v2/Table.js +16 -2
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +7 -4
- package/es/schema-initializer/SchemaInitializer.js +22 -16
- package/es/schema-initializer/SchemaInitializerProvider.d.ts +1 -0
- package/es/schema-initializer/SchemaInitializerProvider.js +1 -0
- package/es/schema-initializer/buttons/BlockInitializers.d.ts +184 -2
- package/es/schema-initializer/buttons/BlockInitializers.js +108 -2
- package/es/schema-initializer/buttons/CreateFormBlockInitializers.js +1 -1
- package/es/schema-initializer/buttons/FormActionInitializers.d.ts +84 -0
- package/es/schema-initializer/buttons/FormActionInitializers.js +66 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +28 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +22 -0
- package/es/schema-initializer/buttons/RecordBlockInitializers.js +70 -5
- package/es/schema-initializer/buttons/RecordFormBlockInitializers.js +1 -1
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +21 -0
- package/es/schema-initializer/buttons/TableSelectorInitializers.js +1 -1
- package/es/schema-initializer/buttons/chart-config/area.d.ts +11 -0
- package/es/schema-initializer/buttons/chart-config/area.js +179 -0
- package/es/schema-initializer/buttons/chart-config/bar.d.ts +12 -0
- package/es/schema-initializer/buttons/chart-config/bar.js +24 -0
- package/es/schema-initializer/buttons/chart-config/column.d.ts +29 -0
- package/es/schema-initializer/buttons/chart-config/column.js +52 -0
- package/es/schema-initializer/buttons/chart-config/index.d.ts +5 -0
- package/es/schema-initializer/buttons/chart-config/index.js +5 -0
- package/es/schema-initializer/buttons/chart-config/line.d.ts +12 -0
- package/es/schema-initializer/buttons/chart-config/line.js +37 -0
- package/es/schema-initializer/buttons/chart-config/pie.d.ts +22 -0
- package/es/schema-initializer/buttons/chart-config/pie.js +37 -0
- package/es/schema-initializer/items/index.d.ts +5 -0
- package/es/schema-initializer/items/index.js +472 -46
- package/es/schema-initializer/utils.d.ts +6 -3
- package/es/schema-initializer/utils.js +23 -12
- package/es/schema-settings/SchemaSettings.js +114 -29
- package/es/schema-templates/SchemaTemplateManagerProvider.d.ts +1 -1
- package/es/schema-templates/SchemaTemplateManagerProvider.js +1 -0
- package/es/system-settings/SystemSettingsShortcut.js +19 -8
- package/es/user/ChangePassword.js +1 -0
- package/es/user/CurrentUser.js +25 -5
- package/es/user/EditProfile.js +1 -0
- package/es/user/LanguageSettings.js +24 -8
- package/es/user/SigninPage.d.ts +3 -0
- package/es/user/SigninPage.js +2 -4
- package/es/user/SignupPage.d.ts +3 -0
- package/es/user/SignupPage.js +2 -4
- package/es/user/SwitchRole.js +1 -0
- package/es/workflow/ExecutionResourceProvider.js +1 -1
- package/es/workflow/WorkflowCanvas.js +16 -15
- package/es/workflow/calculators.js +12 -6
- package/es/workflow/components/Duration.d.ts +5 -0
- package/es/workflow/components/Duration.js +61 -0
- package/es/workflow/nodes/condition.js +1 -1
- package/es/workflow/nodes/create.d.ts +3 -0
- package/es/workflow/nodes/delay.d.ts +35 -0
- package/es/workflow/nodes/delay.js +37 -0
- package/es/workflow/nodes/destroy.d.ts +3 -0
- package/es/workflow/nodes/index.d.ts +1 -1
- package/es/workflow/nodes/index.js +11 -8
- package/es/workflow/nodes/query.d.ts +3 -0
- package/es/workflow/nodes/update.d.ts +3 -0
- package/es/workflow/schemas/collection.d.ts +3 -0
- package/es/workflow/schemas/collection.js +4 -1
- package/es/workflow/schemas/executions.d.ts +15 -0
- package/es/workflow/schemas/executions.js +26 -1
- package/es/workflow/schemas/workflows.js +2 -2
- package/es/workflow/triggers/collection.d.ts +5 -0
- package/es/workflow/triggers/collection.js +13 -3
- package/es/workflow/triggers/index.d.ts +2 -2
- package/es/workflow/triggers/index.js +23 -11
- package/es/workflow/triggers/schedule/DateFieldsSelect.d.ts +2 -0
- package/es/workflow/triggers/schedule/DateFieldsSelect.js +39 -0
- package/es/workflow/triggers/schedule/EndsByField.d.ts +5 -0
- package/es/workflow/triggers/schedule/EndsByField.js +57 -0
- package/es/workflow/triggers/schedule/OnField.d.ts +5 -0
- package/es/workflow/triggers/schedule/OnField.js +87 -0
- package/es/workflow/triggers/schedule/RepeatField.d.ts +5 -0
- package/es/workflow/triggers/schedule/RepeatField.js +131 -0
- package/es/workflow/triggers/schedule/ScheduleConfig.d.ts +1 -0
- package/es/workflow/triggers/schedule/ScheduleConfig.js +225 -0
- package/es/workflow/triggers/schedule/index.d.ts +25 -0
- package/es/workflow/triggers/schedule/index.js +77 -0
- package/es/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +34 -0
- package/es/workflow/triggers/schedule/locale/Cron.zh-CN.js +37 -0
- package/lib/antd-config-provider/index.js +6 -6
- package/lib/api-client/APIClient.d.ts +2 -0
- package/lib/api-client/APIClient.js +46 -2
- package/lib/application/Application.d.ts +23 -0
- package/lib/application/Application.js +207 -0
- package/lib/application/index.d.ts +1 -0
- package/lib/application/index.js +13 -0
- package/lib/block-provider/BlockProvider.js +26 -10
- package/lib/block-provider/TableBlockProvider.d.ts +2 -1
- package/lib/block-provider/TableBlockProvider.js +94 -20
- package/lib/block-provider/TableFieldProvider.d.ts +1 -0
- package/lib/block-provider/TableFieldProvider.js +7 -3
- package/lib/block-provider/hooks/index.d.ts +3 -0
- package/lib/block-provider/hooks/index.js +316 -167
- package/lib/collection-manager/CollectionField.js +8 -1
- package/lib/collection-manager/Configuration/AddFieldAction.js +54 -24
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +4 -2
- package/lib/collection-manager/Configuration/ConfigurationTable.js +34 -6
- package/lib/collection-manager/Configuration/EditFieldAction.js +44 -14
- package/lib/collection-manager/Configuration/EditSubFieldAction.js +4 -2
- package/lib/collection-manager/Configuration/components/FieldSummary.d.ts +2 -0
- package/lib/collection-manager/Configuration/components/FieldSummary.js +49 -0
- package/lib/collection-manager/Configuration/components/index.d.ts +7 -0
- package/lib/collection-manager/Configuration/components/index.js +142 -0
- package/lib/collection-manager/Configuration/interfaces.js +1 -0
- package/lib/collection-manager/Configuration/schemas/collectionFields.js +4 -0
- package/lib/collection-manager/Configuration/schemas/collections.js +18 -1
- package/lib/collection-manager/hooks/useCollectionManager.d.ts +2 -1
- package/lib/collection-manager/hooks/useCollectionManager.js +43 -20
- package/lib/collection-manager/index.d.ts +1 -0
- package/lib/collection-manager/index.js +28 -0
- package/lib/collection-manager/interfaces/attachment.js +1 -1
- package/lib/collection-manager/interfaces/chinaRegion.js +2 -2
- package/lib/collection-manager/interfaces/components/index.d.ts +6 -0
- package/lib/collection-manager/interfaces/components/index.js +58 -0
- package/lib/collection-manager/interfaces/datetime.js +10 -1
- package/lib/collection-manager/interfaces/formula.d.ts +2 -0
- package/lib/collection-manager/interfaces/formula.js +83 -0
- package/lib/collection-manager/interfaces/index.d.ts +5 -0
- package/lib/collection-manager/interfaces/index.js +65 -0
- package/lib/collection-manager/interfaces/linkTo.js +12 -11
- package/lib/collection-manager/interfaces/m2m.d.ts +2 -0
- package/lib/collection-manager/interfaces/m2m.js +262 -0
- package/lib/collection-manager/interfaces/m2o.d.ts +2 -0
- package/lib/collection-manager/interfaces/m2o.js +184 -0
- package/lib/collection-manager/interfaces/o2m.d.ts +2 -0
- package/lib/collection-manager/interfaces/o2m.js +247 -0
- package/lib/collection-manager/interfaces/o2o.d.ts +4 -0
- package/lib/collection-manager/interfaces/o2o.js +530 -0
- package/lib/collection-manager/interfaces/percent.js +7 -7
- package/lib/collection-manager/interfaces/phone.js +4 -1
- package/lib/collection-manager/interfaces/properties/index.d.ts +1 -0
- package/lib/collection-manager/interfaces/properties/index.js +34 -3
- package/lib/i18n/i18n.js +7 -7
- package/lib/index.d.ts +1 -2
- package/lib/index.js +2 -26
- package/lib/locale/en_US.d.ts +293 -29
- package/lib/locale/en_US.js +297 -34
- package/lib/locale/index.d.ts +7 -751
- package/lib/locale/index.js +26 -7
- package/lib/locale/zh_CN.d.ts +107 -5
- package/lib/locale/zh_CN.js +110 -7
- package/lib/schema-component/antd/action/Action.Designer.js +35 -16
- package/lib/schema-component/antd/action/Action.Drawer.js +1 -1
- package/lib/schema-component/antd/action/utils.d.ts +2 -0
- package/lib/schema-component/antd/action/utils.js +67 -0
- package/lib/schema-component/antd/calendar/Calendar.Designer.js +5 -3
- package/lib/schema-component/antd/cascader/Cascader.js +1 -1
- package/lib/schema-component/antd/date-picker/ReadPretty.js +13 -3
- package/lib/schema-component/antd/date-picker/util.d.ts +13 -1
- package/lib/schema-component/antd/date-picker/util.js +118 -4
- package/lib/schema-component/antd/filter/FilterItem.js +8 -7
- package/lib/schema-component/antd/form-item/FormItem.js +81 -1
- package/lib/schema-component/antd/form-v2/Form.Designer.js +20 -9
- package/lib/schema-component/antd/form-v2/Form.js +3 -3
- package/lib/schema-component/antd/formula-input/Compute.d.ts +3 -0
- package/lib/schema-component/antd/formula-input/Compute.js +79 -0
- package/lib/schema-component/antd/formula-input/FormulaInput.d.ts +3 -0
- package/lib/schema-component/antd/formula-input/FormulaInput.js +197 -0
- package/lib/schema-component/antd/formula-input/index.d.ts +1 -0
- package/lib/schema-component/antd/formula-input/index.js +18 -0
- package/lib/schema-component/antd/g2plot/G2Plot.d.ts +8 -0
- package/lib/schema-component/antd/g2plot/G2Plot.js +148 -0
- package/lib/schema-component/antd/g2plot/G2PlotDesigner.d.ts +1 -0
- package/lib/schema-component/antd/g2plot/G2PlotDesigner.js +145 -0
- package/lib/schema-component/antd/g2plot/index.d.ts +1 -0
- package/lib/schema-component/antd/{chart → g2plot}/index.js +4 -4
- package/lib/schema-component/antd/grid/Grid.js +3 -3
- package/lib/schema-component/antd/index.d.ts +3 -1
- package/lib/schema-component/antd/index.js +39 -13
- package/lib/schema-component/antd/input/EllipsisWithTooltip.d.ts +8 -1
- package/lib/schema-component/antd/input/EllipsisWithTooltip.js +8 -4
- package/lib/schema-component/antd/input/ReadPretty.js +5 -5
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.js +1 -1
- package/lib/schema-component/antd/kanban/Kanban.Designer.js +5 -3
- package/lib/schema-component/antd/markdown/Markdown.d.ts +1 -0
- package/lib/schema-component/antd/markdown/Markdown.js +4 -1
- package/lib/schema-component/antd/markdown/style.less +4 -0
- package/lib/schema-component/antd/percent/Percent.d.ts +2 -0
- package/lib/{action-logs/ActionLogProvider.js → schema-component/antd/percent/Percent.js} +29 -22
- package/lib/schema-component/antd/percent/index.d.ts +1 -0
- package/lib/{slate → schema-component/antd/percent}/index.js +4 -4
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +7 -5
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +42 -25
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +18 -4
- package/lib/schema-component/antd/table-v2/Table.js +16 -2
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +7 -4
- package/lib/schema-initializer/SchemaInitializer.js +22 -16
- package/lib/schema-initializer/SchemaInitializerProvider.d.ts +1 -0
- package/lib/schema-initializer/SchemaInitializerProvider.js +3 -1
- package/lib/schema-initializer/buttons/BlockInitializers.d.ts +184 -2
- package/lib/schema-initializer/buttons/BlockInitializers.js +114 -1
- package/lib/schema-initializer/buttons/CreateFormBlockInitializers.js +1 -1
- package/lib/schema-initializer/buttons/FormActionInitializers.d.ts +84 -0
- package/lib/schema-initializer/buttons/FormActionInitializers.js +66 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +28 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +22 -0
- package/lib/schema-initializer/buttons/RecordBlockInitializers.js +70 -5
- package/lib/schema-initializer/buttons/RecordFormBlockInitializers.js +1 -1
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +21 -0
- package/lib/schema-initializer/buttons/TableSelectorInitializers.js +1 -1
- package/lib/schema-initializer/buttons/chart-config/area.d.ts +11 -0
- package/lib/schema-initializer/buttons/chart-config/area.js +186 -0
- package/lib/schema-initializer/buttons/chart-config/bar.d.ts +12 -0
- package/lib/schema-initializer/buttons/chart-config/bar.js +31 -0
- package/lib/schema-initializer/buttons/chart-config/column.d.ts +29 -0
- package/lib/schema-initializer/buttons/chart-config/column.js +59 -0
- package/lib/schema-initializer/buttons/chart-config/index.d.ts +5 -0
- package/lib/schema-initializer/buttons/chart-config/index.js +70 -0
- package/lib/schema-initializer/buttons/chart-config/line.d.ts +12 -0
- package/lib/schema-initializer/buttons/chart-config/line.js +44 -0
- package/lib/schema-initializer/buttons/chart-config/pie.d.ts +22 -0
- package/lib/schema-initializer/buttons/chart-config/pie.js +44 -0
- package/lib/schema-initializer/items/index.d.ts +5 -0
- package/lib/schema-initializer/items/index.js +488 -47
- package/lib/schema-initializer/utils.d.ts +6 -3
- package/lib/schema-initializer/utils.js +23 -12
- package/lib/schema-settings/SchemaSettings.js +113 -27
- package/lib/schema-templates/SchemaTemplateManagerProvider.d.ts +1 -1
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +1 -0
- package/lib/system-settings/SystemSettingsShortcut.js +23 -8
- package/lib/user/ChangePassword.js +1 -0
- package/lib/user/CurrentUser.js +25 -5
- package/lib/user/EditProfile.js +1 -0
- package/lib/user/LanguageSettings.js +26 -7
- package/lib/user/SigninPage.d.ts +3 -0
- package/lib/user/SigninPage.js +4 -2
- package/lib/user/SignupPage.d.ts +3 -0
- package/lib/user/SignupPage.js +4 -2
- package/lib/user/SwitchRole.js +1 -0
- package/lib/workflow/ExecutionResourceProvider.js +1 -1
- package/lib/workflow/WorkflowCanvas.js +17 -14
- package/lib/workflow/calculators.js +12 -6
- package/lib/workflow/components/Duration.d.ts +5 -0
- package/lib/workflow/components/Duration.js +74 -0
- package/lib/workflow/nodes/condition.js +1 -1
- package/lib/workflow/nodes/create.d.ts +3 -0
- package/lib/workflow/nodes/delay.d.ts +35 -0
- package/lib/workflow/nodes/delay.js +48 -0
- package/lib/workflow/nodes/destroy.d.ts +3 -0
- package/lib/workflow/nodes/index.d.ts +1 -1
- package/lib/workflow/nodes/index.js +15 -11
- package/lib/workflow/nodes/query.d.ts +3 -0
- package/lib/workflow/nodes/update.d.ts +3 -0
- package/lib/workflow/schemas/collection.d.ts +3 -0
- package/lib/workflow/schemas/collection.js +4 -1
- package/lib/workflow/schemas/executions.d.ts +15 -0
- package/lib/workflow/schemas/executions.js +26 -1
- package/lib/workflow/schemas/workflows.js +2 -2
- package/lib/workflow/triggers/collection.d.ts +5 -0
- package/lib/workflow/triggers/collection.js +14 -3
- package/lib/workflow/triggers/index.d.ts +2 -2
- package/lib/workflow/triggers/index.js +32 -18
- package/lib/workflow/triggers/schedule/DateFieldsSelect.d.ts +2 -0
- package/lib/{action-logs/ActionLogBlockInitializer.js → workflow/triggers/schedule/DateFieldsSelect.js} +31 -25
- package/lib/workflow/triggers/schedule/EndsByField.d.ts +5 -0
- package/lib/workflow/triggers/schedule/EndsByField.js +73 -0
- package/lib/workflow/triggers/schedule/OnField.d.ts +5 -0
- package/lib/workflow/triggers/schedule/OnField.js +105 -0
- package/lib/workflow/triggers/schedule/RepeatField.d.ts +5 -0
- package/lib/workflow/triggers/schedule/RepeatField.js +146 -0
- package/lib/workflow/triggers/schedule/ScheduleConfig.d.ts +1 -0
- package/lib/workflow/triggers/schedule/ScheduleConfig.js +250 -0
- package/lib/workflow/triggers/schedule/index.d.ts +25 -0
- package/lib/workflow/triggers/schedule/index.js +94 -0
- package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +34 -0
- package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.js +44 -0
- package/package.json +8 -7
- package/es/action-logs/ActionLog.Designer.d.ts +0 -1
- package/es/action-logs/ActionLog.Designer.js +0 -104
- package/es/action-logs/ActionLog.d.ts +0 -7
- package/es/action-logs/ActionLog.js +0 -63
- package/es/action-logs/ActionLogBlockInitializer.d.ts +0 -1
- package/es/action-logs/ActionLogProvider.d.ts +0 -1
- package/es/action-logs/ActionLogProvider.js +0 -24
- package/es/action-logs/index.d.ts +0 -3
- package/es/action-logs/index.js +0 -3
- package/es/action-logs/utils.d.ts +0 -363
- package/es/action-logs/utils.js +0 -313
- package/es/schema-component/antd/chart/Chart.d.ts +0 -1
- package/es/schema-component/antd/chart/Chart.js +0 -4
- package/es/schema-component/antd/chart/index.d.ts +0 -1
- package/es/schema-component/antd/chart/index.js +0 -1
- package/es/slate/RichText.d.ts +0 -1
- package/es/slate/RichText.js +0 -305
- package/es/slate/Slate.d.ts +0 -6
- package/es/slate/Slate.js +0 -40
- package/es/slate/components.d.ts +0 -20
- package/es/slate/components.js +0 -95
- package/es/slate/index.d.ts +0 -1
- package/es/slate/index.js +0 -1
- package/es/slate/index.less +0 -51
- package/es/slate/materialicons.woff2 +0 -0
- package/lib/action-logs/ActionLog.Designer.d.ts +0 -1
- package/lib/action-logs/ActionLog.Designer.js +0 -122
- package/lib/action-logs/ActionLog.d.ts +0 -7
- package/lib/action-logs/ActionLog.js +0 -80
- package/lib/action-logs/ActionLogBlockInitializer.d.ts +0 -1
- package/lib/action-logs/ActionLogProvider.d.ts +0 -1
- package/lib/action-logs/index.d.ts +0 -3
- package/lib/action-logs/index.js +0 -44
- package/lib/action-logs/utils.d.ts +0 -363
- package/lib/action-logs/utils.js +0 -323
- package/lib/schema-component/antd/chart/Chart.d.ts +0 -1
- package/lib/schema-component/antd/chart/Chart.js +0 -16
- package/lib/schema-component/antd/chart/index.d.ts +0 -1
- package/lib/slate/RichText.d.ts +0 -1
- package/lib/slate/RichText.js +0 -340
- package/lib/slate/Slate.d.ts +0 -6
- package/lib/slate/Slate.js +0 -56
- package/lib/slate/components.d.ts +0 -20
- package/lib/slate/components.js +0 -127
- package/lib/slate/index.d.ts +0 -1
- package/lib/slate/index.less +0 -51
- package/lib/slate/materialicons.woff2 +0 -0
- package/src/acl/ACLProvider.tsx +0 -167
- package/src/acl/ACLShortcut.tsx +0 -42
- package/src/acl/Configuration/MenuConfigure.tsx +0 -110
- package/src/acl/Configuration/RoleConfigure.tsx +0 -68
- package/src/acl/Configuration/RoleTable.tsx +0 -70
- package/src/acl/Configuration/RolesResourcesActions.tsx +0 -214
- package/src/acl/Configuration/ScopeSelect.tsx +0 -44
- package/src/acl/Configuration/StrategyActions.tsx +0 -117
- package/src/acl/Configuration/index.tsx +0 -6
- package/src/acl/Configuration/schemas/roleCollections.ts +0 -211
- package/src/acl/Configuration/schemas/roles.ts +0 -357
- package/src/acl/Configuration/schemas/scopes.ts +0 -358
- package/src/acl/Configuration/schemas/useRoleResourceValues.ts +0 -31
- package/src/acl/Configuration/schemas/useSaveRoleResourceAction.ts +0 -23
- package/src/acl/index.md +0 -12
- package/src/acl/index.tsx +0 -3
- package/src/action-logs/ActionLog.Designer.tsx +0 -86
- package/src/action-logs/ActionLog.tsx +0 -58
- package/src/action-logs/ActionLogBlockInitializer.tsx +0 -25
- package/src/action-logs/ActionLogProvider.tsx +0 -20
- package/src/action-logs/demos/demo1.tsx +0 -88
- package/src/action-logs/demos/mockData.ts +0 -285
- package/src/action-logs/index.md +0 -12
- package/src/action-logs/index.ts +0 -3
- package/src/action-logs/utils.ts +0 -303
- package/src/antd-config-provider/demos/demo1.tsx +0 -25
- package/src/antd-config-provider/index.md +0 -12
- package/src/antd-config-provider/index.tsx +0 -35
- package/src/api-client/APIClient.ts +0 -6
- package/src/api-client/APIClientProvider.tsx +0 -12
- package/src/api-client/__tests__/APIClient.test.tsx +0 -26
- package/src/api-client/context.ts +0 -4
- package/src/api-client/demos/demo1.tsx +0 -24
- package/src/api-client/demos/demo2.tsx +0 -23
- package/src/api-client/demos/demo3.tsx +0 -67
- package/src/api-client/hooks/assign.ts +0 -118
- package/src/api-client/hooks/index.ts +0 -4
- package/src/api-client/hooks/useAPIClient.ts +0 -6
- package/src/api-client/hooks/useRequest.ts +0 -63
- package/src/api-client/hooks/useResource.ts +0 -7
- package/src/api-client/index.md +0 -174
- package/src/api-client/index.tsx +0 -3
- package/src/application/__tests__/__snapshots__/compose.test.tsx.snap +0 -77
- package/src/application/__tests__/compose.test.tsx +0 -95
- package/src/application/compose.tsx +0 -18
- package/src/application/demos/demo1/Hello.tsx +0 -20
- package/src/application/demos/demo1/RouteSchemaComponent.tsx +0 -7
- package/src/application/demos/demo1/index.tsx +0 -23
- package/src/application/demos/demo1/routes.ts +0 -29
- package/src/application/demos/demo2/apiClient.ts +0 -10
- package/src/application/demos/demo2/index.tsx +0 -65
- package/src/application/demos/demo2/mock.ts +0 -198
- package/src/application/index.md +0 -14
- package/src/application/index.tsx +0 -1
- package/src/async-data-provider/demos/demo1.tsx +0 -22
- package/src/async-data-provider/demos/demo2.tsx +0 -50
- package/src/async-data-provider/demos/demo3.tsx +0 -85
- package/src/async-data-provider/index.md +0 -155
- package/src/async-data-provider/index.tsx +0 -25
- package/src/block-provider/BlockProvider.tsx +0 -193
- package/src/block-provider/BlockSchemaComponentProvider.tsx +0 -43
- package/src/block-provider/CalendarBlockProvider.tsx +0 -53
- package/src/block-provider/DetailsBlockProvider.tsx +0 -62
- package/src/block-provider/FormBlockProvider.tsx +0 -58
- package/src/block-provider/KanbanBlockProvider.tsx +0 -104
- package/src/block-provider/TableBlockProvider.tsx +0 -123
- package/src/block-provider/TableFieldProvider.tsx +0 -150
- package/src/block-provider/TableSelectorProvider.tsx +0 -100
- package/src/block-provider/hooks/index.ts +0 -333
- package/src/block-provider/index.tsx +0 -10
- package/src/board/Board.tsx +0 -294
- package/src/board/Card.tsx +0 -24
- package/src/board/CardAdder.tsx +0 -24
- package/src/board/CardForm.tsx +0 -44
- package/src/board/Column.tsx +0 -75
- package/src/board/ColumnAdder.tsx +0 -26
- package/src/board/ColumnForm.tsx +0 -27
- package/src/board/DefaultCard.tsx +0 -21
- package/src/board/DefaultColumnHeader.tsx +0 -72
- package/src/board/Kanban.tsx +0 -128
- package/src/board/demos/demo2.tsx +0 -122
- package/src/board/helpers.ts +0 -91
- package/src/board/index.md +0 -14
- package/src/board/index.ts +0 -2
- package/src/board/services.ts +0 -41
- package/src/board/style.less +0 -153
- package/src/board/utils.ts +0 -56
- package/src/board/withDroppable.tsx +0 -19
- package/src/china-region/index.tsx +0 -78
- package/src/collection-manager/CollectionField.tsx +0 -77
- package/src/collection-manager/CollectionFieldProvider.tsx +0 -19
- package/src/collection-manager/CollectionManagerProvider.tsx +0 -61
- package/src/collection-manager/CollectionManagerSchemaComponentProvider.tsx +0 -29
- package/src/collection-manager/CollectionManagerShortcut.tsx +0 -41
- package/src/collection-manager/CollectionProvider.tsx +0 -14
- package/src/collection-manager/Configuration/AddFieldAction.tsx +0 -148
- package/src/collection-manager/Configuration/AddSubFieldAction.tsx +0 -140
- package/src/collection-manager/Configuration/ConfigurationTable.tsx +0 -180
- package/src/collection-manager/Configuration/EditFieldAction.tsx +0 -120
- package/src/collection-manager/Configuration/EditSubFieldAction.tsx +0 -120
- package/src/collection-manager/Configuration/index.tsx +0 -4
- package/src/collection-manager/Configuration/interfaces.tsx +0 -48
- package/src/collection-manager/Configuration/schemas/collectionFields.ts +0 -204
- package/src/collection-manager/Configuration/schemas/collections.ts +0 -279
- package/src/collection-manager/ResourceActionProvider.tsx +0 -127
- package/src/collection-manager/action-hooks.ts +0 -325
- package/src/collection-manager/context.ts +0 -11
- package/src/collection-manager/demos/demo2.tsx +0 -124
- package/src/collection-manager/demos/demo3.tsx +0 -67
- package/src/collection-manager/demos/demo4.tsx +0 -164
- package/src/collection-manager/hooks/index.ts +0 -4
- package/src/collection-manager/hooks/useCollection.ts +0 -18
- package/src/collection-manager/hooks/useCollectionDataSource.ts +0 -17
- package/src/collection-manager/hooks/useCollectionField.ts +0 -24
- package/src/collection-manager/hooks/useCollectionManager.ts +0 -40
- package/src/collection-manager/index.md +0 -145
- package/src/collection-manager/index.tsx +0 -11
- package/src/collection-manager/interfaces/attachment.ts +0 -92
- package/src/collection-manager/interfaces/checkbox.ts +0 -24
- package/src/collection-manager/interfaces/checkboxGroup.ts +0 -27
- package/src/collection-manager/interfaces/chinaRegion.ts +0 -91
- package/src/collection-manager/interfaces/createdAt.ts +0 -30
- package/src/collection-manager/interfaces/createdBy.ts +0 -63
- package/src/collection-manager/interfaces/datetime.ts +0 -30
- package/src/collection-manager/interfaces/email.ts +0 -27
- package/src/collection-manager/interfaces/icon.ts +0 -22
- package/src/collection-manager/interfaces/id.ts +0 -47
- package/src/collection-manager/interfaces/index.ts +0 -27
- package/src/collection-manager/interfaces/input.ts +0 -32
- package/src/collection-manager/interfaces/linkTo.ts +0 -139
- package/src/collection-manager/interfaces/markdown.ts +0 -28
- package/src/collection-manager/interfaces/multipleSelect.ts +0 -31
- package/src/collection-manager/interfaces/number.ts +0 -45
- package/src/collection-manager/interfaces/password.ts +0 -22
- package/src/collection-manager/interfaces/percent.ts +0 -46
- package/src/collection-manager/interfaces/phone.ts +0 -27
- package/src/collection-manager/interfaces/properties/index.ts +0 -277
- package/src/collection-manager/interfaces/properties/operators.ts +0 -127
- package/src/collection-manager/interfaces/radioGroup.ts +0 -27
- package/src/collection-manager/interfaces/richText.ts +0 -29
- package/src/collection-manager/interfaces/select.ts +0 -28
- package/src/collection-manager/interfaces/subTable.ts +0 -209
- package/src/collection-manager/interfaces/textarea.ts +0 -29
- package/src/collection-manager/interfaces/time.ts +0 -42
- package/src/collection-manager/interfaces/types.ts +0 -14
- package/src/collection-manager/interfaces/updatedAt.ts +0 -30
- package/src/collection-manager/interfaces/updatedBy.ts +0 -62
- package/src/collection-manager/sub-table.tsx +0 -273
- package/src/collection-manager/types.ts +0 -38
- package/src/document-title/index.md +0 -21
- package/src/document-title/index.tsx +0 -54
- package/src/file-manager/FileStorageShortcut.tsx +0 -40
- package/src/file-manager/StorageOptions.tsx +0 -106
- package/src/file-manager/index.ts +0 -1
- package/src/file-manager/schemas/storage.ts +0 -348
- package/src/global.less +0 -27
- package/src/i18n/i18n.ts +0 -37
- package/src/i18n/index.md +0 -10
- package/src/i18n/index.ts +0 -1
- package/src/icon/Icon.tsx +0 -61
- package/src/icon/index.md +0 -76
- package/src/icon/index.ts +0 -1
- package/src/index.tsx +0 -30
- package/src/locale/en_US.ts +0 -305
- package/src/locale/index.ts +0 -15
- package/src/locale/zh_CN.ts +0 -512
- package/src/plugin-manager/PluginManager.tsx +0 -122
- package/src/plugin-manager/PluginManagerProvider.tsx +0 -7
- package/src/plugin-manager/context.ts +0 -3
- package/src/plugin-manager/demos/demo1.tsx +0 -34
- package/src/plugin-manager/demos/plugins/index.tsx +0 -5
- package/src/plugin-manager/demos/plugins/plugin1.tsx +0 -16
- package/src/plugin-manager/demos/plugins/plugin2.tsx +0 -65
- package/src/plugin-manager/demos/plugins/plugin3.tsx +0 -17
- package/src/plugin-manager/demos/plugins/plugin4.tsx +0 -65
- package/src/plugin-manager/demos/plugins/plugin5.tsx +0 -17
- package/src/plugin-manager/index.md +0 -59
- package/src/plugin-manager/index.ts +0 -3
- package/src/powered-by/index.tsx +0 -27
- package/src/record-provider/index.md +0 -30
- package/src/record-provider/index.tsx +0 -33
- package/src/route-switch/RouteSwitch.tsx +0 -59
- package/src/route-switch/RouteSwitchProvider.tsx +0 -20
- package/src/route-switch/__tests__/RouteSwitch.test.tsx +0 -33
- package/src/route-switch/__tests__/__snapshots__/RouteSwitch.test.tsx.snap +0 -9
- package/src/route-switch/antd/admin-layout/index.md +0 -27
- package/src/route-switch/antd/admin-layout/index.tsx +0 -206
- package/src/route-switch/antd/auth-layout/index.md +0 -9
- package/src/route-switch/antd/auth-layout/index.tsx +0 -31
- package/src/route-switch/antd/index.ts +0 -4
- package/src/route-switch/antd/route-schema-component/index.tsx +0 -8
- package/src/route-switch/context.ts +0 -9
- package/src/route-switch/demos/demo1.tsx +0 -31
- package/src/route-switch/hooks.ts +0 -23
- package/src/route-switch/index.md +0 -10
- package/src/route-switch/index.tsx +0 -7
- package/src/route-switch/types.ts +0 -34
- package/src/schema-component/antd/AntdSchemaComponentProvider.tsx +0 -10
- package/src/schema-component/antd/action/Action.Container.tsx +0 -26
- package/src/schema-component/antd/action/Action.Designer.tsx +0 -301
- package/src/schema-component/antd/action/Action.Drawer.tsx +0 -105
- package/src/schema-component/antd/action/Action.Link.tsx +0 -8
- package/src/schema-component/antd/action/Action.Modal.tsx +0 -94
- package/src/schema-component/antd/action/Action.Page.tsx +0 -74
- package/src/schema-component/antd/action/Action.Popover.tsx +0 -0
- package/src/schema-component/antd/action/Action.tsx +0 -178
- package/src/schema-component/antd/action/ActionBar.tsx +0 -52
- package/src/schema-component/antd/action/context.tsx +0 -13
- package/src/schema-component/antd/action/demos/demo1.tsx +0 -65
- package/src/schema-component/antd/action/demos/demo2.tsx +0 -66
- package/src/schema-component/antd/action/demos/demo3.tsx +0 -107
- package/src/schema-component/antd/action/demos/demo4.tsx +0 -53
- package/src/schema-component/antd/action/hooks.ts +0 -53
- package/src/schema-component/antd/action/index.md +0 -42
- package/src/schema-component/antd/action/index.tsx +0 -5
- package/src/schema-component/antd/action/types.ts +0 -17
- package/src/schema-component/antd/block-item/BlockItem.tsx +0 -63
- package/src/schema-component/antd/block-item/TestDesigner.tsx +0 -19
- package/src/schema-component/antd/block-item/demos/demo1.tsx +0 -46
- package/src/schema-component/antd/block-item/index.md +0 -12
- package/src/schema-component/antd/block-item/index.tsx +0 -3
- package/src/schema-component/antd/calendar/Calendar.Designer.tsx +0 -142
- package/src/schema-component/antd/calendar/Calendar.tsx +0 -156
- package/src/schema-component/antd/calendar/Event.tsx +0 -6
- package/src/schema-component/antd/calendar/Nav.tsx +0 -19
- package/src/schema-component/antd/calendar/Title.tsx +0 -15
- package/src/schema-component/antd/calendar/Today.tsx +0 -23
- package/src/schema-component/antd/calendar/ViewSelect.tsx +0 -25
- package/src/schema-component/antd/calendar/context.ts +0 -5
- package/src/schema-component/antd/calendar/demos/collections.ts +0 -1321
- package/src/schema-component/antd/calendar/demos/data.ts +0 -131
- package/src/schema-component/antd/calendar/demos/defaultValues.ts +0 -180
- package/src/schema-component/antd/calendar/demos/demo1.tsx +0 -67
- package/src/schema-component/antd/calendar/demos/demo2.tsx +0 -117
- package/src/schema-component/antd/calendar/index.md +0 -18
- package/src/schema-component/antd/calendar/index.ts +0 -21
- package/src/schema-component/antd/calendar/style.less +0 -767
- package/src/schema-component/antd/calendar/types.d.ts +0 -8
- package/src/schema-component/antd/calendar/utils.ts +0 -13
- package/src/schema-component/antd/card-item/CardItem.tsx +0 -13
- package/src/schema-component/antd/card-item/index.md +0 -10
- package/src/schema-component/antd/card-item/index.ts +0 -1
- package/src/schema-component/antd/cascader/Cascader.tsx +0 -99
- package/src/schema-component/antd/cascader/ReadPretty.tsx +0 -35
- package/src/schema-component/antd/cascader/defaultFieldNames.ts +0 -5
- package/src/schema-component/antd/cascader/demos/demo1.tsx +0 -83
- package/src/schema-component/antd/cascader/demos/demo2.tsx +0 -130
- package/src/schema-component/antd/cascader/index.md +0 -37
- package/src/schema-component/antd/cascader/index.ts +0 -1
- package/src/schema-component/antd/chart/Chart.tsx +0 -5
- package/src/schema-component/antd/chart/index.md +0 -8
- package/src/schema-component/antd/chart/index.ts +0 -1
- package/src/schema-component/antd/checkbox/Checkbox.tsx +0 -65
- package/src/schema-component/antd/checkbox/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/checkbox/demos/demo2.tsx +0 -56
- package/src/schema-component/antd/checkbox/index.md +0 -18
- package/src/schema-component/antd/checkbox/index.ts +0 -1
- package/src/schema-component/antd/color-select/ColorSelect.tsx +0 -51
- package/src/schema-component/antd/color-select/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/color-select/index.md +0 -14
- package/src/schema-component/antd/color-select/index.ts +0 -1
- package/src/schema-component/antd/date-picker/DatePicker.tsx +0 -27
- package/src/schema-component/antd/date-picker/ReadPretty.tsx +0 -43
- package/src/schema-component/antd/date-picker/demos/demo1.tsx +0 -49
- package/src/schema-component/antd/date-picker/demos/demo2.tsx +0 -41
- package/src/schema-component/antd/date-picker/index.md +0 -25
- package/src/schema-component/antd/date-picker/index.ts +0 -1
- package/src/schema-component/antd/date-picker/util.ts +0 -42
- package/src/schema-component/antd/filter/DynamicComponent.tsx +0 -56
- package/src/schema-component/antd/filter/Filter.Action.Designer.tsx +0 -120
- package/src/schema-component/antd/filter/Filter.tsx +0 -42
- package/src/schema-component/antd/filter/FilterAction.tsx +0 -121
- package/src/schema-component/antd/filter/FilterGroup.tsx +0 -103
- package/src/schema-component/antd/filter/FilterItem.tsx +0 -57
- package/src/schema-component/antd/filter/FilterItems.tsx +0 -21
- package/src/schema-component/antd/filter/SaveDefaultValue.tsx +0 -43
- package/src/schema-component/antd/filter/context.ts +0 -14
- package/src/schema-component/antd/filter/demos/demo2.tsx +0 -101
- package/src/schema-component/antd/filter/demos/demo3.tsx +0 -180
- package/src/schema-component/antd/filter/demos/demo4.tsx +0 -170
- package/src/schema-component/antd/filter/demos/demo5.tsx +0 -104
- package/src/schema-component/antd/filter/demos/demo6.tsx +0 -105
- package/src/schema-component/antd/filter/index.md +0 -30
- package/src/schema-component/antd/filter/index.ts +0 -3
- package/src/schema-component/antd/filter/style.less +0 -18
- package/src/schema-component/antd/filter/useFilterActionProps.ts +0 -120
- package/src/schema-component/antd/filter/useValues.ts +0 -83
- package/src/schema-component/antd/form/Form.Designer.tsx +0 -19
- package/src/schema-component/antd/form/Form.tsx +0 -125
- package/src/schema-component/antd/form/demos/apiClient.ts +0 -21
- package/src/schema-component/antd/form/demos/demo1.tsx +0 -62
- package/src/schema-component/antd/form/demos/demo2.tsx +0 -61
- package/src/schema-component/antd/form/demos/demo3.tsx +0 -60
- package/src/schema-component/antd/form/demos/demo4.tsx +0 -67
- package/src/schema-component/antd/form/demos/demo5.tsx +0 -106
- package/src/schema-component/antd/form/demos/demo6.tsx +0 -61
- package/src/schema-component/antd/form/demos/demo7.tsx +0 -68
- package/src/schema-component/antd/form/demos/demo8.tsx +0 -85
- package/src/schema-component/antd/form/index.md +0 -54
- package/src/schema-component/antd/form/index.tsx +0 -1
- package/src/schema-component/antd/form-item/FormItem.tsx +0 -213
- package/src/schema-component/antd/form-item/index.md +0 -10
- package/src/schema-component/antd/form-item/index.tsx +0 -1
- package/src/schema-component/antd/form-v2/Form.Designer.tsx +0 -217
- package/src/schema-component/antd/form-v2/Form.tsx +0 -106
- package/src/schema-component/antd/form-v2/demos/collections.ts +0 -1321
- package/src/schema-component/antd/form-v2/demos/demo1.tsx +0 -83
- package/src/schema-component/antd/form-v2/demos/demo2.tsx +0 -103
- package/src/schema-component/antd/form-v2/demos/demo3.tsx +0 -103
- package/src/schema-component/antd/form-v2/index.md +0 -30
- package/src/schema-component/antd/form-v2/index.ts +0 -7
- package/src/schema-component/antd/grid/Block.tsx +0 -13
- package/src/schema-component/antd/grid/Grid.tsx +0 -247
- package/src/schema-component/antd/grid/demos/demo1.tsx +0 -162
- package/src/schema-component/antd/grid/demos/demo2.tsx +0 -73
- package/src/schema-component/antd/grid/demos/demo3.tsx +0 -47
- package/src/schema-component/antd/grid/index.md +0 -14
- package/src/schema-component/antd/grid/index.tsx +0 -3
- package/src/schema-component/antd/icon-picker/IconPicker.tsx +0 -79
- package/src/schema-component/antd/icon-picker/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/icon-picker/index.md +0 -14
- package/src/schema-component/antd/icon-picker/index.ts +0 -1
- package/src/schema-component/antd/index.less +0 -4
- package/src/schema-component/antd/index.ts +0 -35
- package/src/schema-component/antd/input/EllipsisWithTooltip.tsx +0 -47
- package/src/schema-component/antd/input/Input.tsx +0 -39
- package/src/schema-component/antd/input/ReadPretty.tsx +0 -116
- package/src/schema-component/antd/input/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/input/demos/demo2.tsx +0 -66
- package/src/schema-component/antd/input/demos/demo3.tsx +0 -43
- package/src/schema-component/antd/input/index.md +0 -28
- package/src/schema-component/antd/input/index.ts +0 -2
- package/src/schema-component/antd/input/shared.ts +0 -7
- package/src/schema-component/antd/input-number/InputNumber.tsx +0 -8
- package/src/schema-component/antd/input-number/ReadPretty.tsx +0 -21
- package/src/schema-component/antd/input-number/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/input-number/demos/demo2.tsx +0 -49
- package/src/schema-component/antd/input-number/demos/demo3.tsx +0 -51
- package/src/schema-component/antd/input-number/index.md +0 -22
- package/src/schema-component/antd/input-number/index.ts +0 -1
- package/src/schema-component/antd/kanban/Kanban.Card.Designer.tsx +0 -103
- package/src/schema-component/antd/kanban/Kanban.Card.tsx +0 -98
- package/src/schema-component/antd/kanban/Kanban.CardViewer.tsx +0 -5
- package/src/schema-component/antd/kanban/Kanban.Designer.tsx +0 -64
- package/src/schema-component/antd/kanban/Kanban.tsx +0 -146
- package/src/schema-component/antd/kanban/context.ts +0 -4
- package/src/schema-component/antd/kanban/demos/collections.ts +0 -1321
- package/src/schema-component/antd/kanban/demos/data.ts +0 -2145
- package/src/schema-component/antd/kanban/demos/demo1.tsx +0 -92
- package/src/schema-component/antd/kanban/index.less +0 -16
- package/src/schema-component/antd/kanban/index.md +0 -12
- package/src/schema-component/antd/kanban/index.ts +0 -16
- package/src/schema-component/antd/markdown/Markdown.Void.Designer.tsx +0 -26
- package/src/schema-component/antd/markdown/Markdown.Void.tsx +0 -78
- package/src/schema-component/antd/markdown/Markdown.tsx +0 -30
- package/src/schema-component/antd/markdown/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/markdown/demos/demo2.tsx +0 -51
- package/src/schema-component/antd/markdown/index.md +0 -18
- package/src/schema-component/antd/markdown/index.ts +0 -1
- package/src/schema-component/antd/markdown/style.less +0 -12
- package/src/schema-component/antd/markdown/util.ts +0 -16
- package/src/schema-component/antd/menu/Menu.Designer.tsx +0 -342
- package/src/schema-component/antd/menu/Menu.tsx +0 -433
- package/src/schema-component/antd/menu/MenuItemInitializers/index.tsx +0 -229
- package/src/schema-component/antd/menu/demos/demo1.tsx +0 -93
- package/src/schema-component/antd/menu/demos/demo2.tsx +0 -93
- package/src/schema-component/antd/menu/demos/demo3.tsx +0 -118
- package/src/schema-component/antd/menu/index.md +0 -27
- package/src/schema-component/antd/menu/index.ts +0 -4
- package/src/schema-component/antd/menu/util.ts +0 -53
- package/src/schema-component/antd/page/Page.tsx +0 -21
- package/src/schema-component/antd/page/demos/demo1.tsx +0 -31
- package/src/schema-component/antd/page/index.md +0 -12
- package/src/schema-component/antd/page/index.ts +0 -1
- package/src/schema-component/antd/pagination/index.tsx +0 -12
- package/src/schema-component/antd/password/Password.tsx +0 -69
- package/src/schema-component/antd/password/PasswordStrength.tsx +0 -162
- package/src/schema-component/antd/password/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/password/demos/demo2.tsx +0 -45
- package/src/schema-component/antd/password/index.md +0 -24
- package/src/schema-component/antd/password/index.ts +0 -1
- package/src/schema-component/antd/radio/Radio.tsx +0 -47
- package/src/schema-component/antd/radio/demos/demo1.tsx +0 -42
- package/src/schema-component/antd/radio/demos/demo2.tsx +0 -55
- package/src/schema-component/antd/radio/demos/demo3.tsx +0 -56
- package/src/schema-component/antd/radio/index.md +0 -22
- package/src/schema-component/antd/radio/index.ts +0 -1
- package/src/schema-component/antd/record-picker/InputRecordPicker.tsx +0 -112
- package/src/schema-component/antd/record-picker/ReadPrettyRecordPicker.tsx +0 -56
- package/src/schema-component/antd/record-picker/RecordPicker.tsx +0 -9
- package/src/schema-component/antd/record-picker/demos/demo1.tsx +0 -125
- package/src/schema-component/antd/record-picker/index.md +0 -82
- package/src/schema-component/antd/record-picker/index.tsx +0 -8
- package/src/schema-component/antd/record-picker/useFieldNames.ts +0 -7
- package/src/schema-component/antd/rich-text/RichText.tsx +0 -42
- package/src/schema-component/antd/rich-text/demos/demo1.tsx +0 -39
- package/src/schema-component/antd/rich-text/index.md +0 -12
- package/src/schema-component/antd/rich-text/index.ts +0 -1
- package/src/schema-component/antd/rich-text/style.less +0 -950
- package/src/schema-component/antd/select/ReadPretty.tsx +0 -33
- package/src/schema-component/antd/select/Select.tsx +0 -83
- package/src/schema-component/antd/select/demos/demo1.tsx +0 -60
- package/src/schema-component/antd/select/demos/demo2.tsx +0 -64
- package/src/schema-component/antd/select/demos/demo3.tsx +0 -77
- package/src/schema-component/antd/select/index.md +0 -38
- package/src/schema-component/antd/select/index.ts +0 -1
- package/src/schema-component/antd/select/shared.ts +0 -26
- package/src/schema-component/antd/space/index.tsx +0 -18
- package/src/schema-component/antd/table/Table.Array.Designer.tsx +0 -15
- package/src/schema-component/antd/table/Table.Array.tsx +0 -277
- package/src/schema-component/antd/table/Table.Column.ActionBar.tsx +0 -53
- package/src/schema-component/antd/table/Table.Column.Decorator.tsx +0 -59
- package/src/schema-component/antd/table/Table.Column.Designer.tsx +0 -147
- package/src/schema-component/antd/table/Table.Column.tsx +0 -7
- package/src/schema-component/antd/table/Table.Designer.tsx +0 -17
- package/src/schema-component/antd/table/Table.RowActionDesigner.tsx +0 -23
- package/src/schema-component/antd/table/Table.RowSelection.tsx +0 -28
- package/src/schema-component/antd/table/Table.Void.Designer.tsx +0 -208
- package/src/schema-component/antd/table/Table.Void.tsx +0 -118
- package/src/schema-component/antd/table/demos/demo1.tsx +0 -47
- package/src/schema-component/antd/table/demos/demo2.tsx +0 -47
- package/src/schema-component/antd/table/demos/demo3.tsx +0 -47
- package/src/schema-component/antd/table/demos/demo4.tsx +0 -228
- package/src/schema-component/antd/table/index.md +0 -29
- package/src/schema-component/antd/table/index.tsx +0 -27
- package/src/schema-component/antd/table-v2/Table.ActionColumnDesigner.tsx +0 -23
- package/src/schema-component/antd/table-v2/Table.Column.ActionBar.tsx +0 -53
- package/src/schema-component/antd/table-v2/Table.Column.Decorator.tsx +0 -59
- package/src/schema-component/antd/table-v2/Table.Column.Designer.tsx +0 -106
- package/src/schema-component/antd/table-v2/Table.Column.tsx +0 -7
- package/src/schema-component/antd/table-v2/Table.Designer.tsx +0 -17
- package/src/schema-component/antd/table-v2/Table.tsx +0 -283
- package/src/schema-component/antd/table-v2/TableBlockDesigner.tsx +0 -213
- package/src/schema-component/antd/table-v2/TableField.tsx +0 -27
- package/src/schema-component/antd/table-v2/TableSelector.tsx +0 -3
- package/src/schema-component/antd/table-v2/TableSelectorDesigner.tsx +0 -196
- package/src/schema-component/antd/table-v2/demos/collections.ts +0 -1321
- package/src/schema-component/antd/table-v2/demos/data.ts +0 -0
- package/src/schema-component/antd/table-v2/demos/demo1.tsx +0 -220
- package/src/schema-component/antd/table-v2/demos/demo2.tsx +0 -192
- package/src/schema-component/antd/table-v2/index.md +0 -16
- package/src/schema-component/antd/table-v2/index.ts +0 -20
- package/src/schema-component/antd/tabs/Tabs.Designer.tsx +0 -49
- package/src/schema-component/antd/tabs/Tabs.tsx +0 -91
- package/src/schema-component/antd/tabs/demos/demo1.tsx +0 -56
- package/src/schema-component/antd/tabs/index.md +0 -15
- package/src/schema-component/antd/tabs/index.ts +0 -1
- package/src/schema-component/antd/time-picker/ReadPretty.tsx +0 -19
- package/src/schema-component/antd/time-picker/TimePicker.tsx +0 -37
- package/src/schema-component/antd/time-picker/demos/demo1.tsx +0 -41
- package/src/schema-component/antd/time-picker/demos/demo2.tsx +0 -42
- package/src/schema-component/antd/time-picker/index.md +0 -18
- package/src/schema-component/antd/time-picker/index.ts +0 -1
- package/src/schema-component/antd/tree-select/ReadPretty.tsx +0 -56
- package/src/schema-component/antd/tree-select/TreeSelect.tsx +0 -23
- package/src/schema-component/antd/tree-select/demos/demo1.tsx +0 -85
- package/src/schema-component/antd/tree-select/index.md +0 -14
- package/src/schema-component/antd/tree-select/index.ts +0 -1
- package/src/schema-component/antd/upload/ReadPretty.tsx +0 -146
- package/src/schema-component/antd/upload/Upload.tsx +0 -209
- package/src/schema-component/antd/upload/demos/apiClient.ts +0 -43
- package/src/schema-component/antd/upload/demos/demo1.tsx +0 -51
- package/src/schema-component/antd/upload/demos/demo2.tsx +0 -115
- package/src/schema-component/antd/upload/index.md +0 -18
- package/src/schema-component/antd/upload/index.ts +0 -1
- package/src/schema-component/antd/upload/placeholder.ts +0 -62
- package/src/schema-component/antd/upload/shared.ts +0 -227
- package/src/schema-component/antd/upload/style.less +0 -61
- package/src/schema-component/antd/upload/type.d.ts +0 -26
- package/src/schema-component/common/dnd-context/index.md +0 -8
- package/src/schema-component/common/dnd-context/index.tsx +0 -74
- package/src/schema-component/common/index.ts +0 -3
- package/src/schema-component/common/sortable-item/SortableItem.tsx +0 -91
- package/src/schema-component/common/sortable-item/index.md +0 -9
- package/src/schema-component/common/sortable-item/index.ts +0 -1
- package/src/schema-component/context.ts +0 -4
- package/src/schema-component/core/DesignableSwitch.tsx +0 -25
- package/src/schema-component/core/FormProvider.tsx +0 -24
- package/src/schema-component/core/RemoteSchemaComponent.tsx +0 -64
- package/src/schema-component/core/SchemaComponent.tsx +0 -45
- package/src/schema-component/core/SchemaComponentOptions.tsx +0 -16
- package/src/schema-component/core/SchemaComponentProvider.tsx +0 -64
- package/src/schema-component/core/index.tsx +0 -7
- package/src/schema-component/demos/demo1.tsx +0 -83
- package/src/schema-component/demos/demo3.tsx +0 -65
- package/src/schema-component/hooks/__tests__/designable.test.ts +0 -491
- package/src/schema-component/hooks/__tests__/splitWrapSchema.test.ts +0 -87
- package/src/schema-component/hooks/index.ts +0 -8
- package/src/schema-component/hooks/useAttach.ts +0 -21
- package/src/schema-component/hooks/useCompile.ts +0 -13
- package/src/schema-component/hooks/useComponent.ts +0 -14
- package/src/schema-component/hooks/useDesignable.tsx +0 -589
- package/src/schema-component/hooks/useDesigner.ts +0 -11
- package/src/schema-component/hooks/useFieldProps.ts +0 -18
- package/src/schema-component/hooks/useProps.ts +0 -16
- package/src/schema-component/hooks/useSchemaComponentContext.ts +0 -6
- package/src/schema-component/index.md +0 -133
- package/src/schema-component/index.tsx +0 -7
- package/src/schema-component/types.ts +0 -34
- package/src/schema-initializer/SchemaInitializer.tsx +0 -224
- package/src/schema-initializer/SchemaInitializerProvider.tsx +0 -58
- package/src/schema-initializer/buttons/BlockInitializers.tsx +0 -60
- package/src/schema-initializer/buttons/CalendarActionInitializers.tsx +0 -79
- package/src/schema-initializer/buttons/CreateFormBlockInitializers.tsx +0 -42
- package/src/schema-initializer/buttons/CustomFormItemInitializers.tsx +0 -26
- package/src/schema-initializer/buttons/DetailsActionInitializers.tsx +0 -37
- package/src/schema-initializer/buttons/FormActionInitializers.tsx +0 -321
- package/src/schema-initializer/buttons/FormItemInitializers.tsx +0 -44
- package/src/schema-initializer/buttons/KanbanActionInitializers.tsx +0 -35
- package/src/schema-initializer/buttons/KanbanCardFormItemInitializers.tsx +0 -0
- package/src/schema-initializer/buttons/ReadPrettyFormActionInitializers.tsx +0 -119
- package/src/schema-initializer/buttons/ReadPrettyFormItemInitializers.tsx +0 -43
- package/src/schema-initializer/buttons/RecordBlockInitializers.tsx +0 -70
- package/src/schema-initializer/buttons/RecordFormBlockInitializers.tsx +0 -39
- package/src/schema-initializer/buttons/SubTableActionInitializers.tsx +0 -39
- package/src/schema-initializer/buttons/TabPaneInitializers.tsx +0 -106
- package/src/schema-initializer/buttons/TableActionColumnInitializers.tsx +0 -158
- package/src/schema-initializer/buttons/TableActionInitializers.tsx +0 -48
- package/src/schema-initializer/buttons/TableColumnInitializers.tsx +0 -52
- package/src/schema-initializer/buttons/TableSelectorInitializers.tsx +0 -50
- package/src/schema-initializer/buttons/index.ts +0 -18
- package/src/schema-initializer/components/assigned-field/AssignedField.tsx +0 -70
- package/src/schema-initializer/components/assigned-field/index.ts +0 -1
- package/src/schema-initializer/components/index.ts +0 -1
- package/src/schema-initializer/demos/demo1.tsx +0 -123
- package/src/schema-initializer/demos/demo2.tsx +0 -77
- package/src/schema-initializer/demos/demo3.tsx +0 -125
- package/src/schema-initializer/demos/demo4.tsx +0 -130
- package/src/schema-initializer/index.md +0 -121
- package/src/schema-initializer/index.ts +0 -4
- package/src/schema-initializer/items/index.tsx +0 -774
- package/src/schema-initializer/types.ts +0 -73
- package/src/schema-initializer/utils.ts +0 -835
- package/src/schema-settings/GeneralSchemaDesigner.tsx +0 -88
- package/src/schema-settings/SchemaSettings.tsx +0 -572
- package/src/schema-settings/index.ts +0 -3
- package/src/schema-templates/BlockTemplate.tsx +0 -26
- package/src/schema-templates/BlockTemplateDetails.tsx +0 -91
- package/src/schema-templates/BlockTemplatePage.tsx +0 -21
- package/src/schema-templates/SchemaTemplateManagerProvider.tsx +0 -154
- package/src/schema-templates/SchemaTemplateShortcut.tsx +0 -19
- package/src/schema-templates/collections/uiSchemaTemplates.ts +0 -20
- package/src/schema-templates/index.ts +0 -5
- package/src/schema-templates/schemas/uiSchemaTemplates.ts +0 -223
- package/src/settings-form/SettingsForm.tsx +0 -269
- package/src/settings-form/demos/demo1.tsx +0 -133
- package/src/settings-form/index.md +0 -10
- package/src/settings-form/index.ts +0 -1
- package/src/slate/RichText.tsx +0 -258
- package/src/slate/Slate.tsx +0 -32
- package/src/slate/components.tsx +0 -172
- package/src/slate/demos/demo1.tsx +0 -27
- package/src/slate/demos/demo2.tsx +0 -79
- package/src/slate/demos/demo3.tsx +0 -44
- package/src/slate/index.less +0 -51
- package/src/slate/index.md +0 -22
- package/src/slate/index.ts +0 -1
- package/src/slate/materialicons.woff2 +0 -0
- package/src/system-settings/SystemSettingsProvider.tsx +0 -20
- package/src/system-settings/SystemSettingsShortcut.tsx +0 -145
- package/src/system-settings/demos/demo1.tsx +0 -55
- package/src/system-settings/index.md +0 -22
- package/src/system-settings/index.tsx +0 -3
- package/src/user/ChangePassword.tsx +0 -134
- package/src/user/CurrentUser.tsx +0 -55
- package/src/user/CurrentUserProvider.tsx +0 -26
- package/src/user/EditProfile.tsx +0 -119
- package/src/user/LanguageSettings.tsx +0 -44
- package/src/user/SigninPage.tsx +0 -86
- package/src/user/SignupPage.tsx +0 -114
- package/src/user/SwitchRole.tsx +0 -55
- package/src/user/index.md +0 -23
- package/src/user/index.ts +0 -5
- package/src/workflow/ExecutionResourceProvider.tsx +0 -24
- package/src/workflow/WorkflowCanvas.tsx +0 -250
- package/src/workflow/WorkflowLink.tsx +0 -14
- package/src/workflow/WorkflowPage.tsx +0 -47
- package/src/workflow/WorkflowRouteProvider.tsx +0 -12
- package/src/workflow/WorkflowShortcut.tsx +0 -50
- package/src/workflow/calculators.tsx +0 -481
- package/src/workflow/index.tsx +0 -5
- package/src/workflow/nodes/calculation.tsx +0 -34
- package/src/workflow/nodes/condition.tsx +0 -226
- package/src/workflow/nodes/create.tsx +0 -60
- package/src/workflow/nodes/destroy.tsx +0 -31
- package/src/workflow/nodes/index.tsx +0 -269
- package/src/workflow/nodes/parallel.tsx +0 -134
- package/src/workflow/nodes/query.tsx +0 -66
- package/src/workflow/nodes/update.tsx +0 -27
- package/src/workflow/schemas/collection.ts +0 -56
- package/src/workflow/schemas/executions.ts +0 -132
- package/src/workflow/schemas/workflows.ts +0 -323
- package/src/workflow/style.tsx +0 -200
- package/src/workflow/triggers/collection.tsx +0 -102
- package/src/workflow/triggers/index.tsx +0 -135
|
@@ -81,17 +81,19 @@ export declare const useCurrentSchema: (action: string, key: string, find?: (sch
|
|
|
81
81
|
exists: boolean;
|
|
82
82
|
remove(): void;
|
|
83
83
|
};
|
|
84
|
-
export declare const useRecordCollectionDataSourceItems: (componentName: any) => ({
|
|
84
|
+
export declare const useRecordCollectionDataSourceItems: (componentName: any, item?: any, collectionName?: any, resourceName?: any) => ({
|
|
85
|
+
key: string;
|
|
85
86
|
type: string;
|
|
86
87
|
name: string;
|
|
87
88
|
title: string;
|
|
88
|
-
|
|
89
|
+
item: any;
|
|
89
90
|
children?: undefined;
|
|
90
91
|
} | {
|
|
91
92
|
type: string;
|
|
93
|
+
key?: undefined;
|
|
92
94
|
name?: undefined;
|
|
93
95
|
title?: undefined;
|
|
94
|
-
|
|
96
|
+
item?: undefined;
|
|
95
97
|
children?: undefined;
|
|
96
98
|
} | {
|
|
97
99
|
key: string;
|
|
@@ -99,6 +101,7 @@ export declare const useRecordCollectionDataSourceItems: (componentName: any) =>
|
|
|
99
101
|
name: string;
|
|
100
102
|
title: string;
|
|
101
103
|
children: any;
|
|
104
|
+
item?: undefined;
|
|
102
105
|
})[];
|
|
103
106
|
export declare const useCollectionDataSourceItems: (componentName: any) => {
|
|
104
107
|
key: string;
|
|
@@ -313,6 +313,10 @@ var useCurrentSchema = function useCurrentSchema(action, key) {
|
|
|
313
313
|
exports.useCurrentSchema = useCurrentSchema;
|
|
314
314
|
|
|
315
315
|
var useRecordCollectionDataSourceItems = function useRecordCollectionDataSourceItems(componentName) {
|
|
316
|
+
var item = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
317
|
+
var collectionName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
318
|
+
var resourceName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
319
|
+
|
|
316
320
|
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
317
321
|
t = _useTranslation.t;
|
|
318
322
|
|
|
@@ -321,8 +325,10 @@ var useRecordCollectionDataSourceItems = function useRecordCollectionDataSourceI
|
|
|
321
325
|
var _useSchemaTemplateMan = (0, _schemaTemplates.useSchemaTemplateManager)(),
|
|
322
326
|
getTemplatesByCollection = _useSchemaTemplateMan.getTemplatesByCollection;
|
|
323
327
|
|
|
324
|
-
var templates = getTemplatesByCollection(collection.name).filter(function (template) {
|
|
328
|
+
var templates = getTemplatesByCollection(collectionName || collection.name).filter(function (template) {
|
|
325
329
|
return componentName && template.componentName === componentName;
|
|
330
|
+
}).filter(function (template) {
|
|
331
|
+
return ['FormItem', 'ReadPrettyFormItem'].includes(componentName) || template.resourceName === resourceName;
|
|
326
332
|
});
|
|
327
333
|
|
|
328
334
|
if (!templates.length) {
|
|
@@ -331,38 +337,42 @@ var useRecordCollectionDataSourceItems = function useRecordCollectionDataSourceI
|
|
|
331
337
|
|
|
332
338
|
var index = 0;
|
|
333
339
|
return [{
|
|
340
|
+
key: "".concat(collectionName || componentName, "_table_blank"),
|
|
334
341
|
type: 'item',
|
|
335
342
|
name: collection.name,
|
|
336
|
-
title: t('Blank block')
|
|
343
|
+
title: t('Blank block'),
|
|
344
|
+
item: item
|
|
337
345
|
}, {
|
|
338
346
|
type: 'divider'
|
|
339
347
|
}, {
|
|
340
|
-
key: "".concat(componentName, "_table_subMenu_").concat(index, "_copy"),
|
|
348
|
+
key: "".concat(collectionName || componentName, "_table_subMenu_").concat(index, "_copy"),
|
|
341
349
|
type: 'subMenu',
|
|
342
350
|
name: 'copy',
|
|
343
351
|
title: t('Duplicate template'),
|
|
344
352
|
children: templates.map(function (template) {
|
|
345
|
-
var templateName = (template === null || template === void 0 ? void 0 : template.componentName)
|
|
353
|
+
var templateName = ['FormItem', 'ReadPrettyFormItem'].includes(template === null || template === void 0 ? void 0 : template.componentName) ? "".concat(template === null || template === void 0 ? void 0 : template.name, " ").concat(t('(Fields only)')) : template === null || template === void 0 ? void 0 : template.name;
|
|
346
354
|
return {
|
|
347
355
|
type: 'item',
|
|
348
356
|
mode: 'copy',
|
|
349
357
|
name: collection.name,
|
|
350
358
|
template: template,
|
|
359
|
+
item: item,
|
|
351
360
|
title: templateName || t('Untitled')
|
|
352
361
|
};
|
|
353
362
|
})
|
|
354
363
|
}, {
|
|
355
|
-
key: "".concat(componentName, "_table_subMenu_").concat(index, "_ref"),
|
|
364
|
+
key: "".concat(collectionName || componentName, "_table_subMenu_").concat(index, "_ref"),
|
|
356
365
|
type: 'subMenu',
|
|
357
366
|
name: 'ref',
|
|
358
367
|
title: t('Reference template'),
|
|
359
368
|
children: templates.map(function (template) {
|
|
360
|
-
var templateName = (template === null || template === void 0 ? void 0 : template.componentName)
|
|
369
|
+
var templateName = ['FormItem', 'ReadPrettyFormItem'].includes(template === null || template === void 0 ? void 0 : template.componentName) ? "".concat(template === null || template === void 0 ? void 0 : template.name, " ").concat(t('(Fields only)')) : template === null || template === void 0 ? void 0 : template.name;
|
|
361
370
|
return {
|
|
362
371
|
type: 'item',
|
|
363
372
|
mode: 'reference',
|
|
364
373
|
name: collection.name,
|
|
365
374
|
template: template,
|
|
375
|
+
item: item,
|
|
366
376
|
title: templateName || t('Untitled')
|
|
367
377
|
};
|
|
368
378
|
})
|
|
@@ -391,7 +401,7 @@ var useCollectionDataSourceItems = function useCollectionDataSourceItems(compone
|
|
|
391
401
|
return !item.inherit;
|
|
392
402
|
})) === null || _collections$filter === void 0 ? void 0 : _collections$filter.map(function (item, index) {
|
|
393
403
|
var templates = getTemplatesByCollection(item.name).filter(function (template) {
|
|
394
|
-
return componentName && template.componentName === componentName;
|
|
404
|
+
return componentName && template.componentName === componentName && (!template.resourceName || template.resourceName === item.name);
|
|
395
405
|
});
|
|
396
406
|
|
|
397
407
|
if (!templates.length) {
|
|
@@ -532,6 +542,7 @@ var createFormBlockSchema = function createFormBlockSchema(options) {
|
|
|
532
542
|
template = options.template,
|
|
533
543
|
others = _objectWithoutProperties(options, _excluded2);
|
|
534
544
|
|
|
545
|
+
console.log('createFormBlockSchema', options);
|
|
535
546
|
var resourceName = resource || association || collection;
|
|
536
547
|
var schema = {
|
|
537
548
|
type: 'void',
|
|
@@ -881,7 +892,7 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
|
881
892
|
paginate: false
|
|
882
893
|
}
|
|
883
894
|
}, others),
|
|
884
|
-
'x-designer': '
|
|
895
|
+
'x-designer': 'Kanban.Designer',
|
|
885
896
|
'x-component': 'CardItem',
|
|
886
897
|
properties: _defineProperty({
|
|
887
898
|
actions: {
|
|
@@ -897,7 +908,7 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
|
897
908
|
}
|
|
898
909
|
}, (0, _shared.uid)(), {
|
|
899
910
|
type: 'array',
|
|
900
|
-
'x-component': '
|
|
911
|
+
'x-component': 'Kanban',
|
|
901
912
|
'x-component-props': {
|
|
902
913
|
useProps: '{{ useKanbanBlockProps }}'
|
|
903
914
|
},
|
|
@@ -906,8 +917,8 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
|
906
917
|
type: 'void',
|
|
907
918
|
'x-read-pretty': true,
|
|
908
919
|
'x-decorator': 'BlockItem',
|
|
909
|
-
'x-component': '
|
|
910
|
-
'x-designer': '
|
|
920
|
+
'x-component': 'Kanban.Card',
|
|
921
|
+
'x-designer': 'Kanban.Card.Designer',
|
|
911
922
|
properties: {
|
|
912
923
|
grid: {
|
|
913
924
|
type: 'void',
|
|
@@ -922,7 +933,7 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
|
922
933
|
type: 'void',
|
|
923
934
|
title: '{{ t("View") }}',
|
|
924
935
|
'x-designer': 'Action.Designer',
|
|
925
|
-
'x-component': '
|
|
936
|
+
'x-component': 'Kanban.CardViewer',
|
|
926
937
|
'x-component-props': {
|
|
927
938
|
openMode: 'drawer'
|
|
928
939
|
},
|
|
@@ -25,6 +25,8 @@ var _lodash = require("lodash");
|
|
|
25
25
|
|
|
26
26
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
27
27
|
|
|
28
|
+
var _reactDom = require("react-dom");
|
|
29
|
+
|
|
28
30
|
var _reactI18next = require("react-i18next");
|
|
29
31
|
|
|
30
32
|
var _ = require("..");
|
|
@@ -40,7 +42,7 @@ var _excluded = ["children", "fieldSchema"],
|
|
|
40
42
|
_excluded3 = ["title", "options", "value", "onChange"],
|
|
41
43
|
_excluded4 = ["title", "onChange"],
|
|
42
44
|
_excluded5 = ["schema"],
|
|
43
|
-
_excluded6 = ["title", "onSubmit", "initialValues", "initialSchema", "modalTip"],
|
|
45
|
+
_excluded6 = ["title", "onSubmit", "initialValues", "initialSchema", "schema", "modalTip", "components"],
|
|
44
46
|
_excluded7 = ["hidden", "title", "components", "scope", "effects", "schema", "onSubmit", "initialValues"];
|
|
45
47
|
|
|
46
48
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -142,7 +144,8 @@ exports.SchemaSettings = SchemaSettings;
|
|
|
142
144
|
|
|
143
145
|
SchemaSettings.Template = function (props) {
|
|
144
146
|
var componentName = props.componentName,
|
|
145
|
-
collectionName = props.collectionName
|
|
147
|
+
collectionName = props.collectionName,
|
|
148
|
+
resourceName = props.resourceName;
|
|
146
149
|
|
|
147
150
|
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
148
151
|
t = _useTranslation.t;
|
|
@@ -265,6 +268,7 @@ SchemaSettings.Template = function (props) {
|
|
|
265
268
|
_context3.next = 8;
|
|
266
269
|
return saveAsTemplate({
|
|
267
270
|
collectionName: collectionName,
|
|
271
|
+
resourceName: resourceName,
|
|
268
272
|
componentName: componentName,
|
|
269
273
|
name: values.name,
|
|
270
274
|
uid: fieldSchema['x-uid']
|
|
@@ -343,7 +347,8 @@ SchemaSettings.FormItemTemplate = function (props) {
|
|
|
343
347
|
var _props$insertAdjacent = props.insertAdjacentPosition,
|
|
344
348
|
insertAdjacentPosition = _props$insertAdjacent === void 0 ? 'afterBegin' : _props$insertAdjacent,
|
|
345
349
|
componentName = props.componentName,
|
|
346
|
-
collectionName = props.collectionName
|
|
350
|
+
collectionName = props.collectionName,
|
|
351
|
+
resourceName = props.resourceName;
|
|
347
352
|
|
|
348
353
|
var _useTranslation2 = (0, _reactI18next.useTranslation)(),
|
|
349
354
|
t = _useTranslation2.t;
|
|
@@ -450,8 +455,7 @@ SchemaSettings.FormItemTemplate = function (props) {
|
|
|
450
455
|
case 0:
|
|
451
456
|
setVisible(false);
|
|
452
457
|
gridSchema = findGridSchema(fieldSchema);
|
|
453
|
-
|
|
454
|
-
_context6.next = 5;
|
|
458
|
+
_context6.next = 4;
|
|
455
459
|
return (0, _antd.FormDialog)(t('Save as template'), function () {
|
|
456
460
|
return /*#__PURE__*/_react2.default.createElement(_antd.FormLayout, {
|
|
457
461
|
layout: 'vertical'
|
|
@@ -474,7 +478,7 @@ SchemaSettings.FormItemTemplate = function (props) {
|
|
|
474
478
|
}));
|
|
475
479
|
}).open({});
|
|
476
480
|
|
|
477
|
-
case
|
|
481
|
+
case 4:
|
|
478
482
|
values = _context6.sent;
|
|
479
483
|
sdn = (0, _.createDesignable)({
|
|
480
484
|
t: t,
|
|
@@ -483,15 +487,16 @@ SchemaSettings.FormItemTemplate = function (props) {
|
|
|
483
487
|
current: gridSchema.parent
|
|
484
488
|
});
|
|
485
489
|
sdn.loadAPIClientEvents();
|
|
486
|
-
_context6.next =
|
|
490
|
+
_context6.next = 9;
|
|
487
491
|
return saveAsTemplate({
|
|
488
492
|
collectionName: collectionName,
|
|
493
|
+
resourceName: resourceName,
|
|
489
494
|
componentName: componentName,
|
|
490
495
|
name: values.name,
|
|
491
496
|
uid: gridSchema['x-uid']
|
|
492
497
|
});
|
|
493
498
|
|
|
494
|
-
case
|
|
499
|
+
case 9:
|
|
495
500
|
_yield$saveAsTemplate2 = _context6.sent;
|
|
496
501
|
key = _yield$saveAsTemplate2.key;
|
|
497
502
|
sdn.removeWithoutEmit(gridSchema);
|
|
@@ -503,7 +508,7 @@ SchemaSettings.FormItemTemplate = function (props) {
|
|
|
503
508
|
}
|
|
504
509
|
});
|
|
505
510
|
fieldSchema['x-template-key'] = key;
|
|
506
|
-
_context6.next =
|
|
511
|
+
_context6.next = 16;
|
|
507
512
|
return api.request({
|
|
508
513
|
url: "uiSchemas:patch",
|
|
509
514
|
method: 'post',
|
|
@@ -513,7 +518,7 @@ SchemaSettings.FormItemTemplate = function (props) {
|
|
|
513
518
|
}
|
|
514
519
|
});
|
|
515
520
|
|
|
516
|
-
case
|
|
521
|
+
case 16:
|
|
517
522
|
case "end":
|
|
518
523
|
return _context6.stop();
|
|
519
524
|
}
|
|
@@ -686,7 +691,9 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/_react2.default.memo(function (pro
|
|
|
686
691
|
onSubmit = props.onSubmit,
|
|
687
692
|
initialValues = props.initialValues,
|
|
688
693
|
initialSchema = props.initialSchema,
|
|
694
|
+
schema = props.schema,
|
|
689
695
|
modalTip = props.modalTip,
|
|
696
|
+
components = props.components,
|
|
690
697
|
others = _objectWithoutProperties(props, _excluded6);
|
|
691
698
|
|
|
692
699
|
var _useState7 = (0, _react2.useState)(false),
|
|
@@ -712,7 +719,8 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/_react2.default.memo(function (pro
|
|
|
712
719
|
var api = (0, _.useAPIClient)();
|
|
713
720
|
var form = (0, _react2.useMemo)(function () {
|
|
714
721
|
return (0, _core.createForm)({
|
|
715
|
-
initialValues: (0, _lodash.cloneDeep)(initialValues)
|
|
722
|
+
initialValues: (0, _lodash.cloneDeep)(initialValues),
|
|
723
|
+
values: (0, _lodash.cloneDeep)(initialValues)
|
|
716
724
|
});
|
|
717
725
|
}, []);
|
|
718
726
|
|
|
@@ -720,19 +728,40 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/_react2.default.memo(function (pro
|
|
|
720
728
|
setVisible(false);
|
|
721
729
|
};
|
|
722
730
|
|
|
723
|
-
var submitHandler = function
|
|
724
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit((0, _lodash.cloneDeep)(form.values));
|
|
725
|
-
setVisible(false);
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
var openAssignedFieldValueHandler = /*#__PURE__*/function () {
|
|
731
|
+
var submitHandler = /*#__PURE__*/function () {
|
|
729
732
|
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
|
730
733
|
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
731
734
|
while (1) {
|
|
732
735
|
switch (_context7.prev = _context7.next) {
|
|
733
736
|
case 0:
|
|
734
|
-
|
|
735
|
-
|
|
737
|
+
_context7.next = 2;
|
|
738
|
+
return form.submit();
|
|
739
|
+
|
|
740
|
+
case 2:
|
|
741
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit((0, _lodash.cloneDeep)(form.values));
|
|
742
|
+
setVisible(false);
|
|
743
|
+
|
|
744
|
+
case 4:
|
|
745
|
+
case "end":
|
|
746
|
+
return _context7.stop();
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}, _callee7);
|
|
750
|
+
}));
|
|
751
|
+
|
|
752
|
+
return function submitHandler() {
|
|
753
|
+
return _ref.apply(this, arguments);
|
|
754
|
+
};
|
|
755
|
+
}();
|
|
756
|
+
|
|
757
|
+
var openAssignedFieldValueHandler = /*#__PURE__*/function () {
|
|
758
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
759
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
760
|
+
while (1) {
|
|
761
|
+
switch (_context8.prev = _context8.next) {
|
|
762
|
+
case 0:
|
|
763
|
+
if (!(!schemaUid && (initialSchema === null || initialSchema === void 0 ? void 0 : initialSchema['x-uid']))) {
|
|
764
|
+
_context8.next = 6;
|
|
736
765
|
break;
|
|
737
766
|
}
|
|
738
767
|
|
|
@@ -740,7 +769,7 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/_react2.default.memo(function (pro
|
|
|
740
769
|
dn.emit('patch', {
|
|
741
770
|
schema: fieldSchema
|
|
742
771
|
});
|
|
743
|
-
|
|
772
|
+
_context8.next = 5;
|
|
744
773
|
return api.resource('uiSchemas').insert({
|
|
745
774
|
values: initialSchema
|
|
746
775
|
});
|
|
@@ -754,20 +783,30 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/_react2.default.memo(function (pro
|
|
|
754
783
|
|
|
755
784
|
case 8:
|
|
756
785
|
case "end":
|
|
757
|
-
return
|
|
786
|
+
return _context8.stop();
|
|
758
787
|
}
|
|
759
788
|
}
|
|
760
|
-
},
|
|
789
|
+
}, _callee8);
|
|
761
790
|
}));
|
|
762
791
|
|
|
763
792
|
return function openAssignedFieldValueHandler() {
|
|
764
|
-
return
|
|
793
|
+
return _ref2.apply(this, arguments);
|
|
765
794
|
};
|
|
766
795
|
}();
|
|
767
796
|
|
|
768
797
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, /*#__PURE__*/_react2.default.createElement(SchemaSettings.Item, _objectSpread(_objectSpread({}, others), {}, {
|
|
769
|
-
onClick: openAssignedFieldValueHandler
|
|
770
|
-
|
|
798
|
+
onClick: openAssignedFieldValueHandler,
|
|
799
|
+
onKeyDown: function onKeyDown(e) {
|
|
800
|
+
return e.stopPropagation();
|
|
801
|
+
}
|
|
802
|
+
}), props.children || props.title), /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react2.default.createElement("div", {
|
|
803
|
+
onClick: function onClick(e) {
|
|
804
|
+
e.stopPropagation();
|
|
805
|
+
},
|
|
806
|
+
onKeyDown: function onKeyDown(e) {
|
|
807
|
+
e.stopPropagation();
|
|
808
|
+
}
|
|
809
|
+
}, /*#__PURE__*/_react2.default.createElement(_antd2.Modal, _objectSpread(_objectSpread({
|
|
771
810
|
width: '50%',
|
|
772
811
|
title: compile(title)
|
|
773
812
|
}, others), {}, {
|
|
@@ -786,10 +825,14 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/_react2.default.memo(function (pro
|
|
|
786
825
|
layout: 'vertical'
|
|
787
826
|
}, modalTip && /*#__PURE__*/_react2.default.createElement(_antd2.Alert, {
|
|
788
827
|
message: modalTip
|
|
789
|
-
}), modalTip && /*#__PURE__*/_react2.default.createElement("br", null), visible && /*#__PURE__*/_react2.default.createElement(_.RemoteSchemaComponent, {
|
|
828
|
+
}), modalTip && /*#__PURE__*/_react2.default.createElement("br", null), visible && schemaUid && /*#__PURE__*/_react2.default.createElement(_.RemoteSchemaComponent, {
|
|
790
829
|
noForm: true,
|
|
830
|
+
components: components,
|
|
791
831
|
uid: schemaUid
|
|
792
|
-
})
|
|
832
|
+
}), visible && schema && /*#__PURE__*/_react2.default.createElement(_.SchemaComponent, {
|
|
833
|
+
components: components,
|
|
834
|
+
schema: schema
|
|
835
|
+
}))))), document.body));
|
|
793
836
|
});
|
|
794
837
|
|
|
795
838
|
SchemaSettings.ModalItem = function (props) {
|
|
@@ -830,4 +873,47 @@ SchemaSettings.ModalItem = function (props) {
|
|
|
830
873
|
});
|
|
831
874
|
}
|
|
832
875
|
}), props.children || props.title);
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
SchemaSettings.BlockTitleItem = function () {
|
|
879
|
+
var _fieldSchema$xCompon;
|
|
880
|
+
|
|
881
|
+
var field = (0, _react.useField)();
|
|
882
|
+
var fieldSchema = (0, _react.useFieldSchema)();
|
|
883
|
+
|
|
884
|
+
var _useDesignable = (0, _.useDesignable)(),
|
|
885
|
+
dn = _useDesignable.dn;
|
|
886
|
+
|
|
887
|
+
var _useTranslation5 = (0, _reactI18next.useTranslation)(),
|
|
888
|
+
t = _useTranslation5.t;
|
|
889
|
+
|
|
890
|
+
return /*#__PURE__*/_react2.default.createElement(SchemaSettings.ModalItem, {
|
|
891
|
+
title: t('Edit block title'),
|
|
892
|
+
schema: {
|
|
893
|
+
type: 'object',
|
|
894
|
+
title: t('Edit block title'),
|
|
895
|
+
properties: {
|
|
896
|
+
title: {
|
|
897
|
+
title: t('Block title'),
|
|
898
|
+
type: 'string',
|
|
899
|
+
default: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xCompon = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon === void 0 ? void 0 : _fieldSchema$xCompon['title'],
|
|
900
|
+
'x-decorator': 'FormItem',
|
|
901
|
+
'x-component': 'Input'
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
onSubmit: function onSubmit(_ref3) {
|
|
906
|
+
var _schema;
|
|
907
|
+
|
|
908
|
+
var title = _ref3.title;
|
|
909
|
+
var componentProps = fieldSchema['x-component-props'] || {};
|
|
910
|
+
componentProps.title = title;
|
|
911
|
+
fieldSchema['x-component-props'] = componentProps;
|
|
912
|
+
field.componentProps.title = title;
|
|
913
|
+
dn.emit('patch', {
|
|
914
|
+
schema: (_schema = {}, _defineProperty(_schema, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema, 'x-component-props', fieldSchema['x-component-props']), _schema)
|
|
915
|
+
});
|
|
916
|
+
dn.refresh();
|
|
917
|
+
}
|
|
918
|
+
});
|
|
833
919
|
};
|
|
@@ -13,6 +13,6 @@ export declare const useSchemaTemplateManager: () => {
|
|
|
13
13
|
getTemplateBySchema(schema: any): any;
|
|
14
14
|
getTemplateBySchemaId(schemaId: any): any;
|
|
15
15
|
getTemplateById(key: any): any;
|
|
16
|
-
getTemplatesByCollection(collectionName: string): any;
|
|
16
|
+
getTemplatesByCollection(collectionName: string, resourceName?: string): any;
|
|
17
17
|
};
|
|
18
18
|
export declare const RemoteSchemaTemplateManagerProvider: React.FC;
|
|
@@ -267,6 +267,7 @@ var useSchemaTemplateManager = function useSchemaTemplateManager() {
|
|
|
267
267
|
getTemplatesByCollection: function getTemplatesByCollection(collectionName) {
|
|
268
268
|
var _templates$filter;
|
|
269
269
|
|
|
270
|
+
var resourceName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
270
271
|
var items = templates === null || templates === void 0 ? void 0 : (_templates$filter = templates.filter) === null || _templates$filter === void 0 ? void 0 : _templates$filter.call(templates, function (template) {
|
|
271
272
|
return template.collectionName === collectionName;
|
|
272
273
|
});
|
|
@@ -21,8 +21,12 @@ var _ = require(".");
|
|
|
21
21
|
|
|
22
22
|
var _2 = require("..");
|
|
23
23
|
|
|
24
|
+
var _locale = _interopRequireDefault(require("../locale"));
|
|
25
|
+
|
|
24
26
|
var _schemaComponent = require("../schema-component");
|
|
25
27
|
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
26
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
31
|
|
|
28
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -49,6 +53,13 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
49
53
|
|
|
50
54
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
51
55
|
|
|
56
|
+
var langs = Object.keys(_locale.default).map(function (lang) {
|
|
57
|
+
return {
|
|
58
|
+
label: _locale.default[lang].label,
|
|
59
|
+
value: lang
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
|
|
52
63
|
var useCloseAction = function useCloseAction() {
|
|
53
64
|
var _useActionContext = (0, _schemaComponent.useActionContext)(),
|
|
54
65
|
setVisible = _useActionContext.setVisible;
|
|
@@ -158,18 +169,22 @@ var schema = {
|
|
|
158
169
|
|
|
159
170
|
}
|
|
160
171
|
},
|
|
172
|
+
enabledLanguages: {
|
|
173
|
+
type: 'array',
|
|
174
|
+
title: '{{t("Enabled languages")}}',
|
|
175
|
+
'x-component': 'Select',
|
|
176
|
+
'x-component-props': {
|
|
177
|
+
mode: 'multiple'
|
|
178
|
+
},
|
|
179
|
+
'x-decorator': 'FormItem',
|
|
180
|
+
enum: langs
|
|
181
|
+
},
|
|
161
182
|
appLang: {
|
|
162
183
|
type: 'string',
|
|
163
|
-
title: '{{t("
|
|
184
|
+
title: '{{t("Default language")}}',
|
|
164
185
|
'x-component': 'Select',
|
|
165
186
|
'x-decorator': 'FormItem',
|
|
166
|
-
enum:
|
|
167
|
-
label: 'English',
|
|
168
|
-
value: 'en-US'
|
|
169
|
-
}, {
|
|
170
|
-
label: '简体中文',
|
|
171
|
-
value: 'zh-CN'
|
|
172
|
-
}]
|
|
187
|
+
enum: langs
|
|
173
188
|
},
|
|
174
189
|
allowSignUp: {
|
|
175
190
|
type: 'boolean',
|
|
@@ -203,6 +203,7 @@ var ChangePassword = function ChangePassword() {
|
|
|
203
203
|
setVisible: setVisible
|
|
204
204
|
}
|
|
205
205
|
}, /*#__PURE__*/_react2.default.createElement(_antd.Menu.Item, {
|
|
206
|
+
key: "password",
|
|
206
207
|
eventKey: 'ChangePassword',
|
|
207
208
|
onClick: function onClick() {
|
|
208
209
|
var _ctx$setVisible;
|
package/lib/user/CurrentUser.js
CHANGED
|
@@ -17,6 +17,8 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
17
17
|
|
|
18
18
|
var _ = require("..");
|
|
19
19
|
|
|
20
|
+
var _apiClient = require("../api-client");
|
|
21
|
+
|
|
20
22
|
var _ChangePassword = require("./ChangePassword");
|
|
21
23
|
|
|
22
24
|
var _EditProfile = require("./EditProfile");
|
|
@@ -45,11 +47,30 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
45
47
|
|
|
46
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
49
|
|
|
50
|
+
var ApplicationVersion = function ApplicationVersion() {
|
|
51
|
+
var _data$data;
|
|
52
|
+
|
|
53
|
+
var _useRequest = (0, _apiClient.useRequest)({
|
|
54
|
+
url: 'app:getInfo'
|
|
55
|
+
}),
|
|
56
|
+
data = _useRequest.data,
|
|
57
|
+
loading = _useRequest.loading;
|
|
58
|
+
|
|
59
|
+
if (loading) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
64
|
+
key: "version",
|
|
65
|
+
disabled: true
|
|
66
|
+
}, "Version ", data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.version);
|
|
67
|
+
};
|
|
68
|
+
|
|
48
69
|
var DropdownVisibleContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
49
70
|
exports.DropdownVisibleContext = DropdownVisibleContext;
|
|
50
71
|
|
|
51
72
|
var CurrentUser = function CurrentUser() {
|
|
52
|
-
var _data$
|
|
73
|
+
var _data$data2, _data$data3;
|
|
53
74
|
|
|
54
75
|
var history = (0, _reactRouterDom.useHistory)();
|
|
55
76
|
var api = (0, _.useAPIClient)();
|
|
@@ -80,9 +101,8 @@ var CurrentUser = function CurrentUser() {
|
|
|
80
101
|
onVisibleChange: function onVisibleChange(visible) {
|
|
81
102
|
setVisible(visible);
|
|
82
103
|
},
|
|
83
|
-
overlay: /*#__PURE__*/_react.default.createElement(_antd.Menu, null, /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
84
|
-
|
|
85
|
-
}, "Version ", process.env.VERSION), /*#__PURE__*/_react.default.createElement(_antd.Menu.Divider, null), /*#__PURE__*/_react.default.createElement(_EditProfile.EditProfile, null), /*#__PURE__*/_react.default.createElement(_ChangePassword.ChangePassword, null), /*#__PURE__*/_react.default.createElement(_SwitchRole.SwitchRole, null), /*#__PURE__*/_react.default.createElement(_LanguageSettings.LanguageSettings, null), /*#__PURE__*/_react.default.createElement(_antd.Menu.Divider, null), /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
104
|
+
overlay: /*#__PURE__*/_react.default.createElement(_antd.Menu, null, /*#__PURE__*/_react.default.createElement(ApplicationVersion, null), /*#__PURE__*/_react.default.createElement(_antd.Menu.Divider, null), /*#__PURE__*/_react.default.createElement(_EditProfile.EditProfile, null), /*#__PURE__*/_react.default.createElement(_ChangePassword.ChangePassword, null), /*#__PURE__*/_react.default.createElement(_SwitchRole.SwitchRole, null), /*#__PURE__*/_react.default.createElement(_LanguageSettings.LanguageSettings, null), /*#__PURE__*/_react.default.createElement(_antd.Menu.Divider, null), /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
105
|
+
key: "signout",
|
|
86
106
|
onClick: function () {
|
|
87
107
|
var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
88
108
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -118,7 +138,7 @@ var CurrentUser = function CurrentUser() {
|
|
|
118
138
|
padding: '16px',
|
|
119
139
|
color: 'rgba(255, 255, 255, 0.65)'
|
|
120
140
|
}
|
|
121
|
-
}, (data === null || data === void 0 ? void 0 : (_data$
|
|
141
|
+
}, (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.nickname) || (data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.email)))));
|
|
122
142
|
};
|
|
123
143
|
|
|
124
144
|
exports.CurrentUser = CurrentUser;
|
package/lib/user/EditProfile.js
CHANGED
|
@@ -15,6 +15,10 @@ var _reactI18next = require("react-i18next");
|
|
|
15
15
|
|
|
16
16
|
var _ = require("..");
|
|
17
17
|
|
|
18
|
+
var _locale = _interopRequireDefault(require("../locale"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
18
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
23
|
|
|
20
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -36,6 +40,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
36
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
41
|
|
|
38
42
|
var LanguageSettings = function LanguageSettings() {
|
|
43
|
+
var _data$data;
|
|
44
|
+
|
|
39
45
|
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
40
46
|
t = _useTranslation.t,
|
|
41
47
|
i18n = _useTranslation.i18n;
|
|
@@ -47,7 +53,19 @@ var LanguageSettings = function LanguageSettings() {
|
|
|
47
53
|
|
|
48
54
|
var api = (0, _.useAPIClient)();
|
|
49
55
|
var ctx = (0, _.useCurrentUserContext)();
|
|
56
|
+
|
|
57
|
+
var _useSystemSettings = (0, _.useSystemSettings)(),
|
|
58
|
+
data = _useSystemSettings.data;
|
|
59
|
+
|
|
60
|
+
var enabledLanguages = (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.enabledLanguages) || [];
|
|
61
|
+
|
|
62
|
+
if (enabledLanguages.length < 2) {
|
|
63
|
+
return null;
|
|
64
|
+
} // console.log('data', data?.data?.enabledLanguages);
|
|
65
|
+
|
|
66
|
+
|
|
50
67
|
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
68
|
+
key: "language",
|
|
51
69
|
eventKey: 'LanguageSettings',
|
|
52
70
|
onClick: function onClick() {
|
|
53
71
|
setOpen(true);
|
|
@@ -61,13 +79,14 @@ var LanguageSettings = function LanguageSettings() {
|
|
|
61
79
|
onDropdownVisibleChange: function onDropdownVisibleChange(open) {
|
|
62
80
|
setOpen(open);
|
|
63
81
|
},
|
|
64
|
-
options:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
options: Object.keys(_locale.default).filter(function (lang) {
|
|
83
|
+
return enabledLanguages.includes(lang);
|
|
84
|
+
}).map(function (lang) {
|
|
85
|
+
return {
|
|
86
|
+
label: _locale.default[lang].label,
|
|
87
|
+
value: lang
|
|
88
|
+
};
|
|
89
|
+
}),
|
|
71
90
|
value: i18n.language,
|
|
72
91
|
onChange: function () {
|
|
73
92
|
var _onChange = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(lang) {
|
package/lib/user/SigninPage.d.ts
CHANGED