@nocobase/client 0.9.1-alpha.2 → 0.9.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.umirc.ts +2 -2
- package/es/acl/ACLProvider.js +35 -125
- package/es/acl/ACLShortcut.js +11 -18
- package/es/acl/Configuration/ConfigureCenter.js +57 -101
- package/es/acl/Configuration/MenuConfigure.js +92 -147
- package/es/acl/Configuration/MenuItemsProvider.js +0 -7
- package/es/acl/Configuration/PermisionProvider.js +54 -84
- package/es/acl/Configuration/RoleConfigure.js +22 -43
- package/es/acl/Configuration/RoleTable.js +5 -9
- package/es/acl/Configuration/RolesResourcesActions.js +10 -54
- package/es/acl/Configuration/ScopeSelect.js +5 -15
- package/es/acl/Configuration/StrategyActions.js +10 -31
- package/es/acl/Configuration/schemas/roles.js +4 -4
- package/es/acl/Configuration/schemas/scopes.js +4 -8
- package/es/acl/Configuration/schemas/useRoleResourceValues.js +5 -8
- package/es/acl/Configuration/schemas/useSaveRoleResourceAction.js +23 -30
- package/es/acl/style.less +1 -1
- package/es/antd-config-provider/index.js +30 -41
- package/es/antd-config-provider/loadConstrueLocale.js +4 -9
- package/es/api-client/APIClient.js +10 -42
- package/es/api-client/APIClientProvider.js +1 -1
- package/es/api-client/hooks/assign.js +0 -18
- package/es/api-client/hooks/useRequest.js +35 -59
- package/es/appInfo/CurrentAppInfoProvider.js +16 -3
- package/es/application/Application.js +87 -121
- package/es/application/compose.js +12 -23
- package/es/async-data-provider/index.js +7 -12
- package/es/block-provider/BlockProvider.d.ts +1 -0
- package/es/block-provider/BlockProvider.js +56 -96
- package/es/block-provider/BlockSchemaComponentProvider.js +10 -5
- package/es/block-provider/CalendarBlockProvider.d.ts +1 -0
- package/es/block-provider/CalendarBlockProvider.js +16 -19
- package/es/block-provider/DetailsBlockProvider.js +11 -16
- package/es/block-provider/FilterFormBlockProvider.d.ts +1 -0
- package/es/block-provider/FilterFormBlockProvider.js +16 -0
- package/es/block-provider/FormBlockProvider.d.ts +3 -0
- package/es/block-provider/FormBlockProvider.js +71 -29
- package/es/block-provider/FormFieldProvider.js +17 -21
- package/es/block-provider/GanttBlockProvider.d.ts +11 -0
- package/es/block-provider/GanttBlockProvider.js +150 -0
- package/es/block-provider/KanbanBlockProvider.js +54 -110
- package/es/block-provider/SharedFilterProvider.js +10 -25
- package/es/block-provider/TableBlockProvider.d.ts +3 -0
- package/es/block-provider/TableBlockProvider.js +164 -96
- package/es/block-provider/TableFieldProvider.js +107 -160
- package/es/block-provider/TableSelectorProvider.d.ts +18 -1
- package/es/block-provider/TableSelectorProvider.js +106 -105
- package/es/block-provider/hooks/index.d.ts +37 -0
- package/es/block-provider/hooks/index.js +1093 -972
- package/es/block-provider/index.d.ts +4 -0
- package/es/block-provider/index.js +5 -1
- package/es/board/Board.js +110 -153
- package/es/board/Card.js +7 -9
- package/es/board/CardAdder.js +6 -17
- package/es/board/CardForm.js +1 -5
- package/es/board/Column.js +27 -39
- package/es/board/ColumnAdder.js +5 -16
- package/es/board/ColumnForm.js +1 -5
- package/es/board/DefaultCard.js +3 -5
- package/es/board/DefaultColumnHeader.js +17 -34
- package/es/board/Kanban.js +5 -16
- package/es/board/helpers.js +7 -24
- package/es/board/services.js +4 -12
- package/es/board/utils.js +5 -24
- package/es/board/withDroppable.js +5 -11
- package/es/china-region/index.js +5 -21
- package/es/collection-manager/CollectionField.js +16 -42
- package/es/collection-manager/CollectionFieldProvider.js +5 -10
- package/es/collection-manager/CollectionHistoryProvider.js +24 -33
- package/es/collection-manager/CollectionManagerProvider.js +86 -121
- package/es/collection-manager/CollectionManagerSchemaComponentProvider.js +4 -4
- package/es/collection-manager/CollectionManagerShortcut.js +19 -23
- package/es/collection-manager/CollectionProvider.js +4 -8
- package/es/collection-manager/Configuration/AddCategoryAction.js +36 -56
- package/es/collection-manager/Configuration/AddCollectionAction.js +106 -129
- package/es/collection-manager/Configuration/AddFieldAction.js +87 -108
- package/es/collection-manager/Configuration/AddSubFieldAction.js +36 -56
- package/es/collection-manager/Configuration/CollectionFieldsTable.js +10 -16
- package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +37 -86
- package/es/collection-manager/Configuration/ConfigurationTable.js +158 -113
- package/es/collection-manager/Configuration/ConfigurationTabs.js +94 -146
- package/es/collection-manager/Configuration/EditCategoryAction.js +44 -68
- package/es/collection-manager/Configuration/EditCollectionAction.js +59 -94
- package/es/collection-manager/Configuration/EditFieldAction.js +102 -133
- package/es/collection-manager/Configuration/EditSubFieldAction.js +54 -85
- package/es/collection-manager/Configuration/OverridingCollectionField.js +88 -134
- package/es/collection-manager/Configuration/SyncFieldsAction.d.ts +2 -0
- package/es/collection-manager/Configuration/SyncFieldsAction.js +236 -0
- package/es/collection-manager/Configuration/ViewInheritedField.js +51 -81
- package/es/collection-manager/Configuration/components/CollectionFieldInterface.js +1 -3
- package/es/collection-manager/Configuration/components/CollectionTemplate.js +1 -3
- package/es/collection-manager/Configuration/components/FieldSummary.js +2 -8
- package/es/collection-manager/Configuration/components/TemplateSummay.d.ts +2 -0
- package/es/collection-manager/Configuration/components/TemplateSummay.js +26 -0
- package/es/collection-manager/Configuration/components/index.js +5 -18
- package/es/collection-manager/Configuration/index.d.ts +1 -0
- package/es/collection-manager/Configuration/index.js +1 -0
- package/es/collection-manager/Configuration/interfaces.js +4 -7
- package/es/collection-manager/Configuration/schemas/collectionFields.js +17 -3
- package/es/collection-manager/Configuration/schemas/collections.js +22 -30
- package/es/collection-manager/Configuration/templates.js +6 -6
- package/es/collection-manager/ResourceActionProvider.js +18 -38
- package/es/collection-manager/action-hooks.d.ts +2 -0
- package/es/collection-manager/action-hooks.js +422 -432
- package/es/collection-manager/hooks/useCollection.d.ts +4 -0
- package/es/collection-manager/hooks/useCollection.js +12 -9
- package/es/collection-manager/hooks/useCollectionDataSource.d.ts +1 -1
- package/es/collection-manager/hooks/useCollectionDataSource.js +5 -6
- package/es/collection-manager/hooks/useCollectionField.js +4 -6
- package/es/collection-manager/hooks/useCollectionManager.d.ts +23 -3
- package/es/collection-manager/hooks/useCollectionManager.js +125 -90
- package/es/collection-manager/hooks/useOptions.js +5 -8
- package/es/collection-manager/index.d.ts +1 -1
- package/es/collection-manager/index.js +1 -1
- package/es/collection-manager/interfaces/attachment.js +5 -9
- package/es/collection-manager/interfaces/checkbox.js +5 -4
- package/es/collection-manager/interfaces/checkboxGroup.js +5 -4
- package/es/collection-manager/interfaces/chinaRegion.js +5 -8
- package/es/collection-manager/interfaces/createdAt.js +5 -4
- package/es/collection-manager/interfaces/createdBy.js +5 -4
- package/es/collection-manager/interfaces/datetime.js +5 -4
- package/es/collection-manager/interfaces/email.js +5 -4
- package/es/collection-manager/interfaces/icon.js +6 -5
- package/es/collection-manager/interfaces/id.js +1 -0
- package/es/collection-manager/interfaces/index.d.ts +1 -0
- package/es/collection-manager/interfaces/index.js +2 -1
- package/es/collection-manager/interfaces/input.js +5 -5
- package/es/collection-manager/interfaces/integer.js +6 -5
- package/es/collection-manager/interfaces/json.js +8 -6
- package/es/collection-manager/interfaces/linkTo.js +25 -12
- package/es/collection-manager/interfaces/m2m.js +21 -14
- package/es/collection-manager/interfaces/m2o.js +21 -10
- package/es/collection-manager/interfaces/markdown.js +5 -5
- package/es/collection-manager/interfaces/multipleSelect.js +5 -4
- package/es/collection-manager/interfaces/number.js +6 -5
- package/es/collection-manager/interfaces/o2m.js +12 -12
- package/es/collection-manager/interfaces/o2o.js +42 -30
- package/es/collection-manager/interfaces/password.js +6 -5
- package/es/collection-manager/interfaces/percent.js +11 -15
- package/es/collection-manager/interfaces/phone.js +8 -6
- package/es/collection-manager/interfaces/properties/index.js +7 -6
- package/es/collection-manager/interfaces/properties/operators.d.ts +11 -19
- package/es/collection-manager/interfaces/properties/operators.js +6 -21
- package/es/collection-manager/interfaces/radioGroup.js +5 -4
- package/es/collection-manager/interfaces/richText.js +5 -5
- package/es/collection-manager/interfaces/select.js +5 -4
- package/es/collection-manager/interfaces/subTable.js +15 -12
- package/es/collection-manager/interfaces/textarea.js +5 -5
- package/es/collection-manager/interfaces/time.js +5 -4
- package/es/collection-manager/interfaces/updatedAt.js +5 -4
- package/es/collection-manager/interfaces/updatedBy.js +5 -4
- package/es/collection-manager/interfaces/url.d.ts +2 -0
- package/es/collection-manager/interfaces/url.js +30 -0
- package/es/collection-manager/sub-table.js +79 -126
- package/es/collection-manager/templates/calendar.js +11 -10
- package/es/collection-manager/templates/components/PreviewFields.d.ts +2 -0
- package/es/collection-manager/templates/components/PreviewFields.js +256 -0
- package/es/collection-manager/templates/components/PreviewTable.d.ts +1 -0
- package/es/collection-manager/templates/components/PreviewTable.js +133 -0
- package/es/collection-manager/templates/expression.d.ts +2 -0
- package/es/collection-manager/templates/expression.js +52 -0
- package/es/collection-manager/templates/index.d.ts +3 -0
- package/es/collection-manager/templates/index.js +4 -1
- package/es/collection-manager/templates/properties/index.d.ts +1 -1
- package/es/collection-manager/templates/properties/index.js +5 -11
- package/es/collection-manager/templates/tree.d.ts +2 -0
- package/es/collection-manager/templates/tree.js +70 -0
- package/es/collection-manager/templates/types.d.ts +6 -0
- package/es/collection-manager/templates/view.d.ts +2 -0
- package/es/collection-manager/templates/view.js +135 -0
- package/es/collection-manager/types.d.ts +2 -0
- package/es/document-title/index.js +7 -17
- package/es/filter-provider/FilterProvider.d.ts +45 -0
- package/es/filter-provider/FilterProvider.js +143 -0
- package/es/filter-provider/index.d.ts +2 -0
- package/es/filter-provider/index.js +2 -0
- package/es/filter-provider/utils.d.ts +27 -0
- package/es/filter-provider/utils.js +170 -0
- package/es/formula/Expression.js +48 -112
- package/es/formula/Result.js +14 -33
- package/es/i18n/i18n.js +2 -3
- package/es/icon/Icon.js +7 -18
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/en_US.d.ts +67 -4
- package/es/locale/en_US.js +68 -5
- package/es/locale/ja_JP.d.ts +54 -2
- package/es/locale/ja_JP.js +55 -4
- package/es/locale/pt_BR.d.ts +650 -0
- package/es/locale/pt_BR.js +649 -0
- package/es/locale/ru_RU.d.ts +29 -2
- package/es/locale/ru_RU.js +30 -3
- package/es/locale/tr_TR.d.ts +30 -2
- package/es/locale/tr_TR.js +31 -3
- package/es/locale/zh_CN.d.ts +84 -6
- package/es/locale/zh_CN.js +85 -7
- package/es/plugin-manager/PinnedPluginListProvider.d.ts +5 -0
- package/es/plugin-manager/PinnedPluginListProvider.js +50 -0
- package/es/plugin-manager/PluginManager.js +23 -52
- package/es/plugin-manager/PluginManagerProvider.js +1 -1
- package/es/plugin-manager/context.d.ts +3 -0
- package/es/plugin-manager/context.js +4 -1
- package/es/plugin-manager/index.d.ts +1 -0
- package/es/plugin-manager/index.js +1 -0
- package/es/pm/PluginManagerLink.js +24 -49
- package/es/pm/index.js +250 -209
- package/es/powered-by/index.js +1 -4
- package/es/record-provider/index.js +8 -14
- package/es/route-switch/RouteSwitch.js +5 -11
- package/es/route-switch/RouteSwitchProvider.js +10 -12
- package/es/route-switch/antd/admin-layout/index.js +45 -82
- package/es/route-switch/antd/auth-layout/index.js +1 -5
- package/es/route-switch/hooks.js +2 -6
- package/es/schema-component/antd/AntdSchemaComponentProvider.js +4 -4
- package/es/schema-component/antd/action/Action.Container.js +5 -8
- package/es/schema-component/antd/action/Action.Designer.js +54 -132
- package/es/schema-component/antd/action/Action.Drawer.js +11 -20
- package/es/schema-component/antd/action/Action.Link.js +4 -4
- package/es/schema-component/antd/action/Action.Modal.d.ts +2 -1
- package/es/schema-component/antd/action/Action.Modal.js +11 -19
- package/es/schema-component/antd/action/Action.Page.js +5 -15
- package/es/schema-component/antd/action/Action.js +44 -65
- package/es/schema-component/antd/action/ActionBar.js +11 -24
- package/es/schema-component/antd/action/hooks.d.ts +1 -0
- package/es/schema-component/antd/action/hooks.js +41 -50
- package/es/schema-component/antd/action/types.d.ts +1 -1
- package/es/schema-component/antd/action/utils.d.ts +1 -1
- package/es/schema-component/antd/action/utils.js +26 -19
- package/es/schema-component/antd/association-filter/ActionBarAssociationFilterAction.js +19 -13
- package/es/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.d.ts +1 -0
- package/es/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.js +34 -0
- package/es/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.d.ts +1 -0
- package/es/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.js +87 -0
- package/es/schema-component/antd/association-filter/AssociationFilter.Initializer.js +13 -17
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.Designer.js +91 -29
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +51 -110
- package/es/schema-component/antd/association-filter/AssociationFilter.d.ts +3 -0
- package/es/schema-component/antd/association-filter/AssociationFilter.js +9 -11
- package/es/schema-component/antd/association-filter/AssociationFilterDesignerDelete.js +2 -7
- package/es/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.js +4 -8
- package/es/schema-component/antd/association-filter/AssociationFilterProvider.d.ts +1 -0
- package/es/schema-component/antd/association-filter/AssociationFilterProvider.js +2 -0
- package/es/schema-component/antd/association-filter/utilts.d.ts +2 -0
- package/es/schema-component/antd/association-filter/utilts.js +3 -0
- package/es/schema-component/antd/association-select/AssociationSelect.d.ts +1 -0
- package/es/schema-component/antd/association-select/AssociationSelect.js +495 -88
- package/es/schema-component/antd/association-select/ReadPretty.js +4 -4
- package/es/schema-component/antd/association-select/useServiceOptions.js +8 -15
- package/es/schema-component/antd/block-item/BlockItem.js +0 -2
- package/es/schema-component/antd/block-item/TestDesigner.js +1 -2
- package/es/schema-component/antd/calendar/Calendar.Designer.js +23 -29
- package/es/schema-component/antd/calendar/Calendar.js +30 -63
- package/es/schema-component/antd/calendar/DeleteEvent.js +53 -81
- package/es/schema-component/antd/calendar/Nav.js +2 -4
- package/es/schema-component/antd/calendar/Title.js +5 -8
- package/es/schema-component/antd/calendar/Today.js +3 -6
- package/es/schema-component/antd/calendar/ViewSelect.js +5 -7
- package/es/schema-component/antd/calendar/components/Header.js +7 -10
- package/es/schema-component/antd/calendar/style.less +1 -1
- package/es/schema-component/antd/card-item/CardItem.js +5 -9
- package/es/schema-component/antd/cascader/Cascader.js +19 -36
- package/es/schema-component/antd/cascader/ReadPretty.js +3 -13
- package/es/schema-component/antd/checkbox/Checkbox.js +5 -8
- package/es/schema-component/antd/collection-select/CollectionSelect.d.ts +8 -0
- package/es/schema-component/antd/collection-select/CollectionSelect.js +61 -0
- package/es/schema-component/antd/collection-select/index.d.ts +1 -0
- package/es/schema-component/antd/collection-select/index.js +1 -0
- package/es/schema-component/antd/color-select/ColorSelect.js +4 -6
- package/es/schema-component/antd/cron/Cron.d.ts +6 -3
- package/es/schema-component/antd/cron/Cron.js +20 -19
- package/es/schema-component/antd/cron/CronSet.d.ts +7 -0
- package/es/schema-component/antd/cron/CronSet.js +106 -0
- package/es/schema-component/antd/cron/index.d.ts +1 -0
- package/es/schema-component/antd/cron/index.js +2 -1
- package/es/schema-component/antd/cron/locale/index.d.ts +0 -1
- package/es/schema-component/antd/cron/locale/index.js +1 -3
- package/es/schema-component/antd/cron/locale/zh-CN.js +8 -4
- package/es/schema-component/antd/date-picker/DatePicker.d.ts +8 -4
- package/es/schema-component/antd/date-picker/DatePicker.js +42 -3
- package/es/schema-component/antd/date-picker/ReadPretty.js +0 -9
- package/es/schema-component/antd/date-picker/util.d.ts +25 -2
- package/es/schema-component/antd/date-picker/util.js +129 -32
- package/es/schema-component/antd/details/Details.d.ts +7 -0
- package/es/schema-component/antd/details/Details.js +2 -0
- package/es/schema-component/antd/details/index.d.ts +1 -0
- package/es/schema-component/antd/details/index.js +1 -0
- package/es/schema-component/antd/filter/DynamicComponent.js +13 -61
- package/es/schema-component/antd/filter/Filter.Action.Designer.js +10 -27
- package/es/schema-component/antd/filter/Filter.js +14 -13
- package/es/schema-component/antd/filter/FilterAction.js +35 -65
- package/es/schema-component/antd/filter/FilterGroup.js +8 -16
- package/es/schema-component/antd/filter/FilterItem.js +10 -15
- package/es/schema-component/antd/filter/FilterItems.js +0 -1
- package/es/schema-component/antd/filter/SaveDefaultValue.js +4 -13
- package/es/schema-component/antd/filter/useFilterActionProps.js +69 -60
- package/es/schema-component/antd/filter/useOperators.d.ts +5 -0
- package/es/schema-component/antd/filter/useOperators.js +25 -0
- package/es/schema-component/antd/filter/useValues.js +17 -39
- package/es/schema-component/antd/form/Form.Designer.js +2 -3
- package/es/schema-component/antd/form/Form.js +35 -56
- package/es/schema-component/antd/form-item/FormItem.FilterFormDesigner.d.ts +1 -0
- package/es/schema-component/antd/form-item/FormItem.FilterFormDesigner.js +26 -0
- package/es/schema-component/antd/form-item/FormItem.js +89 -77
- package/es/schema-component/antd/form-item/SchemaSettingOptions.d.ts +23 -0
- package/es/schema-component/antd/form-item/SchemaSettingOptions.js +615 -0
- package/es/schema-component/antd/form-v2/Form.Designer.js +30 -45
- package/es/schema-component/antd/form-v2/Form.FilterDesigner.d.ts +5 -0
- package/es/schema-component/antd/form-v2/Form.FilterDesigner.js +40 -0
- package/es/schema-component/antd/form-v2/Form.d.ts +2 -0
- package/es/schema-component/antd/form-v2/Form.js +31 -50
- package/es/schema-component/antd/form-v2/FormField.js +1 -5
- package/es/schema-component/antd/form-v2/Templates.d.ts +4 -0
- package/es/schema-component/antd/form-v2/Templates.js +168 -0
- package/es/schema-component/antd/form-v2/index.d.ts +1 -1
- package/es/schema-component/antd/form-v2/index.js +4 -2
- package/es/schema-component/antd/form-v2/utils.d.ts +0 -1
- package/es/schema-component/antd/form-v2/utils.js +22 -95
- package/es/schema-component/antd/g2plot/G2Plot.js +8 -23
- package/es/schema-component/antd/g2plot/G2PlotDesigner.js +40 -51
- package/es/schema-component/antd/g2plot/requestChartData.js +19 -25
- package/es/schema-component/antd/gantt/Gantt.Designer.d.ts +1 -0
- package/es/schema-component/antd/gantt/Gantt.Designer.js +214 -0
- package/es/schema-component/antd/gantt/components/calendar/calendar.d.ts +14 -0
- package/es/schema-component/antd/gantt/components/calendar/calendar.js +324 -0
- package/es/schema-component/antd/gantt/components/calendar/style.d.ts +4 -0
- package/es/schema-component/antd/gantt/components/calendar/style.js +7 -0
- package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +11 -0
- package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +26 -0
- package/es/schema-component/antd/gantt/components/gantt/Event.d.ts +2 -0
- package/es/schema-component/antd/gantt/components/gantt/Event.js +5 -0
- package/es/schema-component/antd/gantt/components/gantt/gantt.d.ts +5 -0
- package/es/schema-component/antd/gantt/components/gantt/gantt.js +638 -0
- package/es/schema-component/antd/gantt/components/gantt/style.d.ts +3 -0
- package/es/schema-component/antd/gantt/components/gantt/style.js +6 -0
- package/es/schema-component/antd/gantt/components/gantt/task-gantt-content.d.ts +25 -0
- package/es/schema-component/antd/gantt/components/gantt/task-gantt-content.js +366 -0
- package/es/schema-component/antd/gantt/components/gantt/task-gantt.d.ts +14 -0
- package/es/schema-component/antd/gantt/components/gantt/task-gantt.js +67 -0
- package/es/schema-component/antd/gantt/components/grid/grid-body.d.ts +13 -0
- package/es/schema-component/antd/gantt/components/grid/grid-body.js +112 -0
- package/es/schema-component/antd/gantt/components/grid/grid.d.ts +4 -0
- package/es/schema-component/antd/gantt/components/grid/grid.js +13 -0
- package/es/schema-component/antd/gantt/components/grid/style.d.ts +4 -0
- package/es/schema-component/antd/gantt/components/grid/style.js +7 -0
- package/es/schema-component/antd/gantt/components/other/arrow.d.ts +12 -0
- package/es/schema-component/antd/gantt/components/other/arrow.js +57 -0
- package/es/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +8 -0
- package/es/schema-component/antd/gantt/components/other/horizontal-scroll.js +30 -0
- package/es/schema-component/antd/gantt/components/other/style.d.ts +7 -0
- package/es/schema-component/antd/gantt/components/other/style.js +10 -0
- package/es/schema-component/antd/gantt/components/other/tooltip.d.ts +29 -0
- package/es/schema-component/antd/gantt/components/other/tooltip.js +103 -0
- package/es/schema-component/antd/gantt/components/other/vertical-scroll.d.ts +9 -0
- package/es/schema-component/antd/gantt/components/other/vertical-scroll.js +32 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.d.ts +11 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.js +19 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +21 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.js +48 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.d.ts +7 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.js +10 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +3 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.js +38 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +3 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/bar.js +60 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/style.d.ts +2 -0
- package/es/schema-component/antd/gantt/components/task-item/bar/style.js +5 -0
- package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +3 -0
- package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.js +30 -0
- package/es/schema-component/antd/gantt/components/task-item/milestone/style.d.ts +2 -0
- package/es/schema-component/antd/gantt/components/task-item/milestone/style.js +5 -0
- package/es/schema-component/antd/gantt/components/task-item/project/project.d.ts +3 -0
- package/es/schema-component/antd/gantt/components/task-item/project/project.js +31 -0
- package/es/schema-component/antd/gantt/components/task-item/project/style.d.ts +3 -0
- package/es/schema-component/antd/gantt/components/task-item/project/style.js +6 -0
- package/es/schema-component/antd/gantt/components/task-item/style.d.ts +3 -0
- package/es/schema-component/antd/gantt/components/task-item/style.js +6 -0
- package/es/schema-component/antd/gantt/components/task-item/task-item.d.ts +15 -0
- package/es/schema-component/antd/gantt/components/task-item/task-item.js +105 -0
- package/es/schema-component/antd/gantt/context.d.ts +3 -0
- package/es/schema-component/antd/gantt/context.js +4 -0
- package/es/schema-component/antd/gantt/helpers/bar-helper.d.ts +14 -0
- package/es/schema-component/antd/gantt/helpers/bar-helper.js +329 -0
- package/es/schema-component/antd/gantt/helpers/date-helper.d.ts +18 -0
- package/es/schema-component/antd/gantt/helpers/date-helper.js +182 -0
- package/es/schema-component/antd/gantt/helpers/other-helper.d.ts +9 -0
- package/es/schema-component/antd/gantt/helpers/other-helper.js +65 -0
- package/es/schema-component/antd/gantt/index.d.ts +2 -0
- package/es/schema-component/antd/gantt/index.js +11 -0
- package/es/schema-component/antd/gantt/types/bar-task.d.ts +22 -0
- package/es/schema-component/antd/gantt/types/bar-task.js +1 -0
- package/es/schema-component/antd/gantt/types/date-setup.d.ts +5 -0
- package/es/schema-component/antd/gantt/types/date-setup.js +1 -0
- package/es/schema-component/antd/gantt/types/gantt-task-actions.d.ts +8 -0
- package/es/schema-component/antd/gantt/types/gantt-task-actions.js +1 -0
- package/es/schema-component/antd/gantt/types/public-types.d.ts +136 -0
- package/es/schema-component/antd/gantt/types/public-types.js +12 -0
- package/es/schema-component/antd/grid/Grid.js +62 -116
- package/es/schema-component/antd/icon-picker/IconPicker.js +12 -29
- package/es/schema-component/antd/index.d.ts +6 -2
- package/es/schema-component/antd/index.js +6 -2
- package/es/schema-component/antd/index.less +28 -0
- package/es/schema-component/antd/input/EllipsisWithTooltip.js +12 -22
- package/es/schema-component/antd/input/Input.d.ts +3 -3
- package/es/schema-component/antd/input/Input.js +17 -16
- package/es/schema-component/antd/input/Json.d.ts +7 -5
- package/es/schema-component/antd/input/Json.js +9 -14
- package/es/schema-component/antd/input/ReadPretty.d.ts +2 -2
- package/es/schema-component/antd/input/ReadPretty.js +21 -21
- package/es/schema-component/antd/input-number/InputNumber.js +5 -11
- package/es/schema-component/antd/input-number/ReadPretty.js +3 -5
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.d.ts +1 -0
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.js +26 -0
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.js +22 -22
- package/es/schema-component/antd/kanban/Kanban.Card.js +25 -38
- package/es/schema-component/antd/kanban/Kanban.Designer.js +19 -20
- package/es/schema-component/antd/kanban/Kanban.js +32 -59
- package/es/schema-component/antd/kanban/index.js +2 -0
- package/es/schema-component/antd/kanban/index.less +8 -5
- package/es/schema-component/antd/markdown/Markdown.Void.Designer.js +1 -3
- package/es/schema-component/antd/markdown/Markdown.Void.js +43 -58
- package/es/schema-component/antd/markdown/Markdown.js +14 -8
- package/es/schema-component/antd/markdown/highlight-theme/default.less +98 -0
- package/es/schema-component/antd/markdown/highlight-theme/table.less +36 -0
- package/es/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.d.ts +5 -0
- package/es/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.js +63 -0
- package/es/schema-component/antd/markdown/md.d.ts +5 -0
- package/es/schema-component/antd/markdown/md.js +14 -0
- package/es/schema-component/antd/markdown/util.d.ts +5 -1
- package/es/schema-component/antd/markdown/util.js +60 -8
- package/es/schema-component/antd/menu/Menu.Designer.js +27 -62
- package/es/schema-component/antd/menu/Menu.js +62 -114
- package/es/schema-component/antd/menu/MenuItemInitializers/index.js +170 -196
- package/es/schema-component/antd/menu/util.js +2 -21
- package/es/schema-component/antd/page/FixedBlock.d.ts +8 -7
- package/es/schema-component/antd/page/FixedBlock.js +100 -131
- package/es/schema-component/antd/page/Page.js +86 -113
- package/es/schema-component/antd/page/PageTabDesigner.js +11 -26
- package/es/schema-component/antd/pagination/index.js +6 -11
- package/es/schema-component/antd/password/Password.js +7 -12
- package/es/schema-component/antd/password/PasswordStrength.js +0 -32
- package/es/schema-component/antd/percent/Percent.js +5 -5
- package/es/schema-component/antd/preview/Preview.d.ts +15 -0
- package/es/schema-component/antd/preview/Preview.js +234 -0
- package/es/schema-component/antd/preview/index.d.ts +1 -0
- package/es/schema-component/antd/preview/index.js +1 -0
- package/es/schema-component/antd/radio/Radio.js +1 -4
- package/es/schema-component/antd/record-picker/InputRecordPicker.d.ts +2 -0
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +166 -91
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +30 -46
- package/es/schema-component/antd/record-picker/useFieldNames.js +4 -5
- package/es/schema-component/antd/record-picker/util.d.ts +1 -1
- package/es/schema-component/antd/record-picker/util.js +14 -9
- package/es/schema-component/antd/remote-select/ReadPretty.js +22 -30
- package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
- package/es/schema-component/antd/remote-select/RemoteSelect.js +48 -70
- package/es/schema-component/antd/remote-select/shared.js +0 -1
- package/es/schema-component/antd/rich-text/RichText.js +6 -6
- package/es/schema-component/antd/select/ReadPretty.js +4 -9
- package/es/schema-component/antd/select/Select.js +15 -37
- package/es/schema-component/antd/select/shared.js +5 -25
- package/es/schema-component/antd/space/index.js +4 -7
- package/es/schema-component/antd/table/Table.Array.js +48 -97
- package/es/schema-component/antd/table/Table.Column.ActionBar.js +0 -2
- package/es/schema-component/antd/table/Table.Column.Decorator.js +5 -14
- package/es/schema-component/antd/table/Table.Column.Designer.js +37 -57
- package/es/schema-component/antd/table/Table.Designer.js +2 -3
- package/es/schema-component/antd/table/Table.RowActionDesigner.js +1 -3
- package/es/schema-component/antd/table/Table.RowSelection.js +6 -18
- package/es/schema-component/antd/table/Table.Void.Designer.js +8 -17
- package/es/schema-component/antd/table/Table.Void.js +17 -43
- package/es/schema-component/antd/table-v2/FilterDynamicComponent.d.ts +2 -0
- package/es/schema-component/antd/table-v2/FilterDynamicComponent.js +150 -0
- package/es/schema-component/antd/table-v2/Table.ActionColumnDesigner.js +1 -3
- package/es/schema-component/antd/table-v2/Table.Column.ActionBar.js +0 -2
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.js +6 -17
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +28 -34
- package/es/schema-component/antd/table-v2/Table.Designer.js +2 -3
- package/es/schema-component/antd/table-v2/Table.js +145 -156
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +62 -46
- package/es/schema-component/antd/table-v2/TableField.js +5 -11
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +42 -27
- package/es/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +10 -0
- package/es/schema-component/antd/table-v2/hooks/useUserVariable.js +56 -0
- package/es/schema-component/antd/table-v2/utils.d.ts +2 -0
- package/es/schema-component/antd/table-v2/utils.js +38 -2
- package/es/schema-component/antd/tabs/Tabs.Designer.js +7 -9
- package/es/schema-component/antd/tabs/Tabs.js +1 -5
- package/es/schema-component/antd/time-picker/ReadPretty.js +2 -4
- package/es/schema-component/antd/time-picker/TimePicker.js +4 -6
- package/es/schema-component/antd/tree-select/ReadPretty.js +1 -8
- package/es/schema-component/antd/tree-select/TreeSelect.js +4 -4
- package/es/schema-component/antd/upload/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/upload/ReadPretty.js +18 -26
- package/es/schema-component/antd/upload/Upload.js +73 -58
- package/es/schema-component/antd/upload/shared.js +14 -53
- package/es/schema-component/antd/upload/type.d.ts +11 -0
- package/es/schema-component/antd/variable/Input.js +57 -67
- package/es/schema-component/antd/variable/JSONInput.js +19 -31
- package/es/schema-component/antd/variable/TextArea.d.ts +3 -0
- package/es/schema-component/antd/variable/TextArea.js +256 -161
- package/es/schema-component/antd/variable/Variable.js +2 -2
- package/es/schema-component/antd/variable/VariableSelect.d.ts +2 -0
- package/es/schema-component/antd/variable/VariableSelect.js +65 -0
- package/es/schema-component/antd/variable/XButton.d.ts +9 -0
- package/es/schema-component/antd/variable/XButton.js +17 -0
- package/es/schema-component/common/dnd-context/index.js +13 -39
- package/es/schema-component/common/sortable-item/SortableItem.js +21 -37
- package/es/schema-component/common/utils/logic.js +74 -93
- package/es/schema-component/common/utils/uitls.js +47 -43
- package/es/schema-component/core/DesignableSwitch.js +12 -14
- package/es/schema-component/core/FormProvider.js +5 -12
- package/es/schema-component/core/RemoteSchemaComponent.js +21 -30
- package/es/schema-component/core/SchemaComponent.js +12 -26
- package/es/schema-component/core/SchemaComponentOptions.js +4 -7
- package/es/schema-component/core/SchemaComponentProvider.js +19 -35
- package/es/schema-component/hooks/index.d.ts +2 -0
- package/es/schema-component/hooks/index.js +3 -1
- package/es/schema-component/hooks/useAttach.js +0 -1
- package/es/schema-component/hooks/useCompile.js +4 -5
- package/es/schema-component/hooks/useComponent.js +1 -4
- package/es/schema-component/hooks/useDesignable.js +205 -385
- package/es/schema-component/hooks/useDesigner.js +1 -4
- package/es/schema-component/hooks/useFieldComponentOptions.js +18 -13
- package/es/schema-component/hooks/useFieldProps.js +4 -5
- package/es/schema-component/hooks/useFieldTitle.js +2 -7
- package/es/schema-component/hooks/useProps.js +1 -5
- package/es/schema-component/hooks/useTableSize.d.ts +5 -0
- package/es/schema-component/hooks/useTableSize.js +42 -0
- package/es/schema-initializer/SchemaInitializer.js +47 -82
- package/es/schema-initializer/SchemaInitializerProvider.js +10 -16
- package/es/schema-initializer/SelectCollection.js +4 -9
- package/es/schema-initializer/buttons/BlockInitializers.js +22 -2
- package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +2 -3
- package/es/schema-initializer/buttons/CalendarActionInitializers.d.ts +4 -0
- package/es/schema-initializer/buttons/CalendarActionInitializers.js +5 -0
- package/es/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +6 -0
- package/es/schema-initializer/buttons/CalendarFormActionInitializers.js +21 -0
- package/es/schema-initializer/buttons/CreateFormBlockInitializers.js +2 -3
- package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +2 -3
- package/es/schema-initializer/buttons/CustomFormItemInitializers.js +4 -7
- package/es/schema-initializer/buttons/FilterFormActionInitializers.d.ts +16 -0
- package/es/schema-initializer/buttons/FilterFormActionInitializers.js +24 -0
- package/es/schema-initializer/buttons/FormItemInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/FormItemInitializers.js +62 -8
- package/es/schema-initializer/buttons/GanttActionInitializers.d.ts +133 -0
- package/es/schema-initializer/buttons/GanttActionInitializers.js +9 -0
- package/es/schema-initializer/buttons/KanbanActionInitializers.d.ts +2 -0
- package/es/schema-initializer/buttons/KanbanActionInitializers.js +5 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +6 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +17 -0
- package/es/schema-initializer/buttons/ReadPrettyFormItemInitializers.js +2 -6
- package/es/schema-initializer/buttons/RecordBlockInitializers.js +31 -47
- package/es/schema-initializer/buttons/RecordFormBlockInitializers.js +1 -2
- package/es/schema-initializer/buttons/SubTableActionInitializers.js +4 -4
- package/es/schema-initializer/buttons/TabPaneInitializers.js +53 -66
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +38 -18
- package/es/schema-initializer/buttons/TableActionInitializers.d.ts +17 -0
- package/es/schema-initializer/buttons/TableActionInitializers.js +51 -16
- package/es/schema-initializer/buttons/TableColumnInitializers.js +9 -15
- package/es/schema-initializer/buttons/TableSelectorInitializers.js +2 -3
- package/es/schema-initializer/buttons/index.d.ts +2 -0
- package/es/schema-initializer/buttons/index.js +4 -2
- package/es/schema-initializer/components/BulkEditField.js +31 -56
- package/es/schema-initializer/components/CreateRecordAction.js +74 -69
- package/es/schema-initializer/components/assigned-field/AssignedField.js +33 -77
- package/es/schema-initializer/index.d.ts +1 -1
- package/es/schema-initializer/index.js +1 -1
- package/es/schema-initializer/items/ActionInitializer.js +4 -4
- package/es/schema-initializer/items/BlockInitializer.js +4 -5
- package/es/schema-initializer/items/BulkDestroyActionInitializer.js +4 -6
- package/es/schema-initializer/items/BulkEditSubmitActionInitializer.js +4 -4
- package/es/schema-initializer/items/CalendarBlockInitializer.js +61 -71
- package/es/schema-initializer/items/CollectionFieldInitializer.js +6 -6
- package/es/schema-initializer/items/CreateActionInitializer.js +5 -4
- package/es/schema-initializer/items/CreateChildInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateChildInitializer.js +62 -0
- package/es/schema-initializer/items/CreateFilterActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateFilterActionInitializer.js +23 -0
- package/es/schema-initializer/items/CreateFormBlockInitializer.js +51 -70
- package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +47 -66
- package/es/schema-initializer/items/CreateResetActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateResetActionInitializer.js +21 -0
- package/es/schema-initializer/items/CreateSubmitActionInitializer.js +6 -6
- package/es/schema-initializer/items/CustomizeActionInitializer.js +4 -6
- package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.js +4 -4
- package/es/schema-initializer/items/DataBlockInitializer.js +44 -61
- package/es/schema-initializer/items/DeleteEventActionInitializer.js +4 -4
- package/es/schema-initializer/items/DestroyActionInitializer.js +4 -4
- package/es/schema-initializer/items/DetailsBlockInitializer.js +25 -32
- package/es/schema-initializer/items/ExpandActionInitializer.d.ts +2 -0
- package/es/schema-initializer/items/ExpandActionInitializer.js +58 -0
- package/es/schema-initializer/items/FilterActionInitializer.js +4 -4
- package/es/schema-initializer/items/FilterBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/FilterBlockInitializer.js +77 -0
- package/es/schema-initializer/items/FilterCollapseBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/FilterCollapseBlockInitializer.js +44 -0
- package/es/schema-initializer/items/FilterFormBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/FilterFormBlockInitializer.js +28 -0
- package/es/schema-initializer/items/FormBlockInitializer.js +4 -6
- package/es/schema-initializer/items/G2PlotInitializer.js +6 -10
- package/es/schema-initializer/items/GanttBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/GanttBlockInitializer.js +166 -0
- package/es/schema-initializer/items/InitializerWithSwitch.js +8 -12
- package/es/schema-initializer/items/KanbanBlockInitializer.js +85 -100
- package/es/schema-initializer/items/MarkdownBlockInitializer.js +5 -7
- package/es/schema-initializer/items/PrintActionInitializer.js +4 -4
- package/es/schema-initializer/items/RecordAssociationBlockInitializer.js +37 -53
- package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +93 -115
- package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +37 -53
- package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.js +52 -71
- package/es/schema-initializer/items/RecordFormBlockInitializer.js +49 -68
- package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +51 -72
- package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +52 -73
- package/es/schema-initializer/items/RefreshActionInitializer.js +4 -4
- package/es/schema-initializer/items/SubmitActionInitializer.js +7 -6
- package/es/schema-initializer/items/TableActionColumnInitializer.js +4 -4
- package/es/schema-initializer/items/TableBlockInitializer.js +24 -32
- package/es/schema-initializer/items/TableCollectionFieldInitializer.js +4 -4
- package/es/schema-initializer/items/TableSelectorInitializer.js +24 -35
- package/es/schema-initializer/items/UpdateActionInitializer.js +4 -4
- package/es/schema-initializer/items/UpdateSubmitActionInitializer.js +4 -4
- package/es/schema-initializer/items/ViewActionInitializer.js +4 -4
- package/es/schema-initializer/items/index.d.ts +7 -0
- package/es/schema-initializer/items/index.js +9 -2
- package/es/schema-initializer/utils.d.ts +174 -1
- package/es/schema-initializer/utils.js +665 -336
- package/es/schema-items/OpenModeSchemaItems.d.ts +7 -0
- package/es/schema-items/OpenModeSchemaItems.js +78 -0
- package/es/schema-items/index.d.ts +1 -0
- package/es/schema-items/index.js +1 -0
- package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +2 -0
- package/es/schema-settings/DataTemplates/FormDataTemplates.js +174 -0
- package/es/schema-settings/DataTemplates/TreeLabel.d.ts +1 -0
- package/es/schema-settings/DataTemplates/TreeLabel.js +19 -0
- package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.d.ts +2 -0
- package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.js +47 -0
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.d.ts +11 -0
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.js +261 -0
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +13 -0
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.js +146 -0
- package/es/schema-settings/DataTemplates/index.d.ts +1 -0
- package/es/schema-settings/DataTemplates/index.js +1 -0
- package/es/schema-settings/EnableChildCollections/index.js +28 -38
- package/es/schema-settings/GeneralSchemaDesigner.js +11 -20
- package/es/schema-settings/LinkageRules/DynamicComponent.js +9 -61
- package/es/schema-settings/LinkageRules/FilterDynamicComponent.js +3 -3
- package/es/schema-settings/LinkageRules/LinkageRuleAction.js +34 -49
- package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.js +9 -13
- package/es/schema-settings/LinkageRules/ValueDynamicComponent.js +37 -29
- package/es/schema-settings/LinkageRules/Variables.js +11 -34
- package/es/schema-settings/LinkageRules/action-hooks.js +5 -20
- package/es/schema-settings/LinkageRules/components/EnableLinkage.d.ts +2 -0
- package/es/schema-settings/LinkageRules/components/EnableLinkage.js +40 -0
- package/es/schema-settings/LinkageRules/components/LinkageHeader.d.ts +11 -0
- package/es/schema-settings/LinkageRules/components/LinkageHeader.js +252 -0
- package/es/schema-settings/LinkageRules/context.d.ts +1 -1
- package/es/schema-settings/LinkageRules/context.js +1 -1
- package/es/schema-settings/LinkageRules/index.js +20 -18
- package/es/schema-settings/LinkageRules/type.js +0 -1
- package/es/schema-settings/LinkageRules/useValues.js +10 -21
- package/es/schema-settings/SchemaSettings.d.ts +3 -0
- package/es/schema-settings/SchemaSettings.js +733 -586
- package/es/schema-templates/BlockTemplate.js +3 -11
- package/es/schema-templates/BlockTemplateDetails.js +35 -52
- package/es/schema-templates/BlockTemplatePage.js +2 -3
- package/es/schema-templates/SchemaTemplateManagerProvider.js +100 -145
- package/es/schema-templates/SchemaTemplateShortcut.js +1 -2
- package/es/schema-templates/schemas/uiSchemaTemplates.js +41 -63
- package/es/settings-form/SettingsForm.js +87 -125
- package/es/system-settings/SystemSettingsProvider.js +14 -2
- package/es/system-settings/SystemSettingsShortcut.js +80 -98
- package/es/user/ChangePassword.js +43 -65
- package/es/user/CurrentUser.js +29 -44
- package/es/user/CurrentUserProvider.js +1 -6
- package/es/user/EditProfile.js +44 -69
- package/es/user/LanguageSettings.js +38 -53
- package/es/user/SigninPage.js +38 -56
- package/es/user/SigninPageExtension.js +3 -11
- package/es/user/SignupPage.js +29 -42
- package/es/user/SwitchRole.js +30 -38
- package/es/user/ThemeSettings.d.ts +1 -0
- package/es/user/ThemeSettings.js +70 -0
- package/es/user/VerificationCode.js +51 -76
- package/lib/acl/ACLProvider.js +34 -162
- package/lib/acl/ACLShortcut.js +11 -38
- package/lib/acl/Configuration/ConfigureCenter.js +56 -112
- package/lib/acl/Configuration/MenuConfigure.js +91 -159
- package/lib/acl/Configuration/MenuItemsProvider.js +0 -21
- package/lib/acl/Configuration/PermisionProvider.js +53 -96
- package/lib/acl/Configuration/RoleConfigure.js +21 -59
- package/lib/acl/Configuration/RoleTable.js +5 -23
- package/lib/acl/Configuration/RolesResourcesActions.js +10 -67
- package/lib/acl/Configuration/ScopeSelect.js +5 -26
- package/lib/acl/Configuration/StrategyActions.js +10 -38
- package/lib/acl/Configuration/index.js +0 -6
- package/lib/acl/Configuration/schemas/roleCollections.js +0 -3
- package/lib/acl/Configuration/schemas/roles.js +4 -13
- package/lib/acl/Configuration/schemas/scopes.js +4 -13
- package/lib/acl/Configuration/schemas/useRoleResourceValues.js +5 -12
- package/lib/acl/Configuration/schemas/useSaveRoleResourceAction.js +23 -34
- package/lib/acl/index.js +0 -5
- package/lib/acl/style.less +1 -1
- package/lib/antd-config-provider/index.js +29 -57
- package/lib/antd-config-provider/loadConstrueLocale.js +4 -12
- package/lib/api-client/APIClient.js +10 -47
- package/lib/api-client/APIClientProvider.js +1 -6
- package/lib/api-client/context.js +0 -3
- package/lib/api-client/hooks/assign.js +0 -23
- package/lib/api-client/hooks/index.js +0 -6
- package/lib/api-client/hooks/useAPIClient.js +0 -3
- package/lib/api-client/hooks/useRequest.js +35 -68
- package/lib/api-client/hooks/useResource.js +0 -3
- package/lib/api-client/index.js +0 -8
- package/lib/appInfo/CurrentAppInfoProvider.js +16 -14
- package/lib/appInfo/index.js +0 -2
- package/lib/application/Application.js +82 -147
- package/lib/application/compose.js +12 -26
- package/lib/application/index.js +0 -4
- package/lib/async-data-provider/index.js +6 -22
- package/lib/block-provider/BlockProvider.d.ts +1 -0
- package/lib/block-provider/BlockProvider.js +56 -136
- package/lib/block-provider/BlockSchemaComponentProvider.js +10 -24
- package/lib/block-provider/CalendarBlockProvider.d.ts +1 -0
- package/lib/block-provider/CalendarBlockProvider.js +16 -32
- package/lib/block-provider/DetailsBlockProvider.js +11 -32
- package/lib/block-provider/FilterFormBlockProvider.d.ts +1 -0
- package/lib/block-provider/FilterFormBlockProvider.js +24 -0
- package/lib/block-provider/FormBlockProvider.d.ts +3 -0
- package/lib/block-provider/FormBlockProvider.js +73 -49
- package/lib/block-provider/FormFieldProvider.js +17 -39
- package/lib/block-provider/GanttBlockProvider.d.ts +11 -0
- package/lib/block-provider/GanttBlockProvider.js +162 -0
- package/lib/block-provider/KanbanBlockProvider.js +52 -127
- package/lib/block-provider/SharedFilterProvider.js +10 -36
- package/lib/block-provider/TableBlockProvider.d.ts +3 -0
- package/lib/block-provider/TableBlockProvider.js +162 -114
- package/lib/block-provider/TableFieldProvider.js +107 -177
- package/lib/block-provider/TableSelectorProvider.d.ts +18 -1
- package/lib/block-provider/TableSelectorProvider.js +107 -123
- package/lib/block-provider/hooks/index.d.ts +37 -0
- package/lib/block-provider/hooks/index.js +1097 -1015
- package/lib/block-provider/index.d.ts +4 -0
- package/lib/block-provider/index.js +33 -18
- package/lib/board/Board.js +110 -169
- package/lib/board/Card.js +7 -12
- package/lib/board/CardAdder.js +6 -23
- package/lib/board/CardForm.js +1 -10
- package/lib/board/Column.js +27 -52
- package/lib/board/ColumnAdder.js +5 -22
- package/lib/board/ColumnForm.js +1 -10
- package/lib/board/DefaultCard.js +3 -7
- package/lib/board/DefaultColumnHeader.js +17 -38
- package/lib/board/Kanban.js +5 -26
- package/lib/board/helpers.js +7 -24
- package/lib/board/index.js +0 -2
- package/lib/board/services.js +4 -12
- package/lib/board/utils.js +5 -24
- package/lib/board/withDroppable.js +5 -14
- package/lib/china-region/index.js +5 -27
- package/lib/collection-manager/CollectionField.js +14 -51
- package/lib/collection-manager/CollectionFieldProvider.js +5 -17
- package/lib/collection-manager/CollectionHistoryProvider.js +23 -47
- package/lib/collection-manager/CollectionManagerProvider.js +86 -140
- package/lib/collection-manager/CollectionManagerSchemaComponentProvider.js +4 -16
- package/lib/collection-manager/CollectionManagerShortcut.js +17 -42
- package/lib/collection-manager/CollectionProvider.js +4 -14
- package/lib/collection-manager/Configuration/AddCategoryAction.js +35 -73
- package/lib/collection-manager/Configuration/AddCollectionAction.js +105 -151
- package/lib/collection-manager/Configuration/AddFieldAction.js +86 -132
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +36 -74
- package/lib/collection-manager/Configuration/CollectionFieldsTable.js +10 -26
- package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +35 -98
- package/lib/collection-manager/Configuration/ConfigurationTable.js +159 -135
- package/lib/collection-manager/Configuration/ConfigurationTabs.js +94 -163
- package/lib/collection-manager/Configuration/EditCategoryAction.js +43 -85
- package/lib/collection-manager/Configuration/EditCollectionAction.js +59 -120
- package/lib/collection-manager/Configuration/EditFieldAction.js +101 -154
- package/lib/collection-manager/Configuration/EditSubFieldAction.js +54 -103
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +88 -155
- package/lib/collection-manager/Configuration/SyncFieldsAction.d.ts +2 -0
- package/lib/collection-manager/Configuration/SyncFieldsAction.js +245 -0
- package/lib/collection-manager/Configuration/ViewInheritedField.js +50 -99
- package/lib/collection-manager/Configuration/components/CollectionCategory.js +0 -6
- package/lib/collection-manager/Configuration/components/CollectionFieldInterface.js +1 -10
- package/lib/collection-manager/Configuration/components/CollectionTemplate.js +1 -10
- package/lib/collection-manager/Configuration/components/FieldSummary.js +2 -17
- package/lib/collection-manager/Configuration/components/TemplateSummay.d.ts +2 -0
- package/lib/collection-manager/Configuration/components/TemplateSummay.js +34 -0
- package/lib/collection-manager/Configuration/components/index.js +5 -26
- package/lib/collection-manager/Configuration/index.d.ts +1 -0
- package/lib/collection-manager/Configuration/index.js +11 -29
- package/lib/collection-manager/Configuration/interfaces.js +4 -20
- package/lib/collection-manager/Configuration/schemas/collectionFields.js +17 -5
- package/lib/collection-manager/Configuration/schemas/collections.js +22 -39
- package/lib/collection-manager/Configuration/templates.js +6 -16
- package/lib/collection-manager/ResourceActionProvider.js +18 -55
- package/lib/collection-manager/action-hooks.d.ts +2 -0
- package/lib/collection-manager/action-hooks.js +425 -485
- package/lib/collection-manager/context.js +0 -2
- package/lib/collection-manager/hooks/index.js +0 -8
- package/lib/collection-manager/hooks/useCollection.d.ts +4 -0
- package/lib/collection-manager/hooks/useCollection.js +12 -16
- package/lib/collection-manager/hooks/useCollectionDataSource.d.ts +1 -1
- package/lib/collection-manager/hooks/useCollectionDataSource.js +5 -10
- package/lib/collection-manager/hooks/useCollectionField.js +4 -14
- package/lib/collection-manager/hooks/useCollectionManager.d.ts +23 -3
- package/lib/collection-manager/hooks/useCollectionManager.js +127 -97
- package/lib/collection-manager/hooks/useOptions.js +5 -13
- package/lib/collection-manager/index.d.ts +1 -1
- package/lib/collection-manager/index.js +7 -36
- package/lib/collection-manager/interfaces/attachment.js +5 -12
- package/lib/collection-manager/interfaces/checkbox.js +5 -6
- package/lib/collection-manager/interfaces/checkboxGroup.js +5 -6
- package/lib/collection-manager/interfaces/chinaRegion.js +5 -11
- package/lib/collection-manager/interfaces/components/index.js +0 -15
- package/lib/collection-manager/interfaces/createdAt.js +5 -6
- package/lib/collection-manager/interfaces/createdBy.js +5 -7
- package/lib/collection-manager/interfaces/datetime.js +5 -6
- package/lib/collection-manager/interfaces/email.js +5 -6
- package/lib/collection-manager/interfaces/icon.js +6 -7
- package/lib/collection-manager/interfaces/id.js +1 -2
- package/lib/collection-manager/interfaces/index.d.ts +1 -0
- package/lib/collection-manager/interfaces/index.js +11 -64
- package/lib/collection-manager/interfaces/input.js +5 -8
- package/lib/collection-manager/interfaces/integer.js +6 -9
- package/lib/collection-manager/interfaces/json.js +8 -9
- package/lib/collection-manager/interfaces/linkTo.js +25 -16
- package/lib/collection-manager/interfaces/m2m.js +21 -18
- package/lib/collection-manager/interfaces/m2o.js +21 -13
- package/lib/collection-manager/interfaces/markdown.js +5 -8
- package/lib/collection-manager/interfaces/multipleSelect.js +5 -6
- package/lib/collection-manager/interfaces/number.js +6 -8
- package/lib/collection-manager/interfaces/o2m.js +12 -15
- package/lib/collection-manager/interfaces/o2o.js +42 -32
- package/lib/collection-manager/interfaces/password.js +6 -8
- package/lib/collection-manager/interfaces/percent.js +11 -19
- package/lib/collection-manager/interfaces/phone.js +8 -8
- package/lib/collection-manager/interfaces/properties/index.js +7 -14
- package/lib/collection-manager/interfaces/properties/operators.d.ts +11 -19
- package/lib/collection-manager/interfaces/properties/operators.js +6 -21
- package/lib/collection-manager/interfaces/radioGroup.js +5 -6
- package/lib/collection-manager/interfaces/richText.js +5 -8
- package/lib/collection-manager/interfaces/select.js +5 -6
- package/lib/collection-manager/interfaces/subTable.js +15 -15
- package/lib/collection-manager/interfaces/textarea.js +5 -8
- package/lib/collection-manager/interfaces/time.js +5 -6
- package/lib/collection-manager/interfaces/updatedAt.js +5 -6
- package/lib/collection-manager/interfaces/updatedBy.js +5 -7
- package/lib/collection-manager/interfaces/url.d.ts +2 -0
- package/lib/collection-manager/interfaces/url.js +37 -0
- package/lib/collection-manager/sub-table.js +79 -136
- package/lib/collection-manager/templates/calendar.js +11 -12
- package/lib/collection-manager/templates/components/PreviewFields.d.ts +2 -0
- package/lib/collection-manager/templates/components/PreviewFields.js +265 -0
- package/lib/collection-manager/templates/components/PreviewTable.d.ts +1 -0
- package/lib/collection-manager/templates/components/PreviewTable.js +142 -0
- package/lib/collection-manager/templates/expression.d.ts +2 -0
- package/lib/collection-manager/templates/expression.js +59 -0
- package/lib/collection-manager/templates/general.js +0 -2
- package/lib/collection-manager/templates/index.d.ts +3 -0
- package/lib/collection-manager/templates/index.js +33 -4
- package/lib/collection-manager/templates/properties/index.d.ts +1 -1
- package/lib/collection-manager/templates/properties/index.js +5 -17
- package/lib/collection-manager/templates/tree.d.ts +2 -0
- package/lib/collection-manager/templates/tree.js +77 -0
- package/lib/collection-manager/templates/types.d.ts +6 -0
- package/lib/collection-manager/templates/view.d.ts +2 -0
- package/lib/collection-manager/templates/view.js +142 -0
- package/lib/collection-manager/types.d.ts +2 -0
- package/lib/document-title/index.js +7 -32
- package/lib/filter-provider/FilterProvider.d.ts +45 -0
- package/lib/filter-provider/FilterProvider.js +154 -0
- package/lib/filter-provider/index.d.ts +2 -0
- package/lib/filter-provider/index.js +27 -0
- package/lib/filter-provider/utils.d.ts +27 -0
- package/lib/filter-provider/utils.js +184 -0
- package/lib/formula/Expression.js +47 -124
- package/lib/formula/Result.js +13 -45
- package/lib/formula/index.js +0 -5
- package/lib/i18n/i18n.js +2 -8
- package/lib/i18n/index.js +0 -2
- package/lib/icon/Icon.js +6 -31
- package/lib/icon/index.js +0 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +11 -55
- package/lib/locale/en_US.d.ts +67 -4
- package/lib/locale/en_US.js +68 -5
- package/lib/locale/index.js +0 -3
- package/lib/locale/ja_JP.d.ts +54 -2
- package/lib/locale/ja_JP.js +55 -4
- package/lib/locale/pt_BR.d.ts +650 -0
- package/lib/locale/pt_BR.js +656 -0
- package/lib/locale/ru_RU.d.ts +29 -2
- package/lib/locale/ru_RU.js +30 -3
- package/lib/locale/tr_TR.d.ts +30 -2
- package/lib/locale/tr_TR.js +31 -3
- package/lib/locale/zh_CN.d.ts +84 -6
- package/lib/locale/zh_CN.js +85 -7
- package/lib/plugin-manager/PinnedPluginListProvider.d.ts +5 -0
- package/lib/plugin-manager/PinnedPluginListProvider.js +60 -0
- package/lib/plugin-manager/PluginManager.js +22 -73
- package/lib/plugin-manager/PluginManagerProvider.js +1 -6
- package/lib/plugin-manager/context.d.ts +3 -0
- package/lib/plugin-manager/context.js +6 -4
- package/lib/plugin-manager/index.d.ts +1 -0
- package/lib/plugin-manager/index.js +11 -6
- package/lib/pm/PluginManagerLink.js +22 -63
- package/lib/pm/index.js +246 -235
- package/lib/powered-by/index.js +1 -10
- package/lib/record-provider/index.js +8 -29
- package/lib/route-switch/RouteSwitch.js +5 -17
- package/lib/route-switch/RouteSwitchProvider.js +10 -19
- package/lib/route-switch/antd/admin-layout/index.js +43 -94
- package/lib/route-switch/antd/auth-layout/index.js +1 -11
- package/lib/route-switch/antd/index.js +0 -6
- package/lib/route-switch/antd/route-schema-component/index.js +0 -5
- package/lib/route-switch/context.js +0 -2
- package/lib/route-switch/hooks.js +2 -13
- package/lib/route-switch/index.js +0 -12
- package/lib/schema-component/antd/AntdSchemaComponentProvider.js +4 -17
- package/lib/schema-component/antd/action/Action.Container.js +5 -16
- package/lib/schema-component/antd/action/Action.Designer.js +52 -146
- package/lib/schema-component/antd/action/Action.Drawer.js +11 -30
- package/lib/schema-component/antd/action/Action.Link.js +4 -9
- package/lib/schema-component/antd/action/Action.Modal.d.ts +2 -1
- package/lib/schema-component/antd/action/Action.Modal.js +11 -28
- package/lib/schema-component/antd/action/Action.Page.js +5 -23
- package/lib/schema-component/antd/action/Action.js +42 -90
- package/lib/schema-component/antd/action/ActionBar.js +11 -33
- package/lib/schema-component/antd/action/context.js +0 -2
- package/lib/schema-component/antd/action/hooks.d.ts +1 -0
- package/lib/schema-component/antd/action/hooks.js +43 -62
- package/lib/schema-component/antd/action/index.js +0 -8
- package/lib/schema-component/antd/action/types.d.ts +1 -1
- package/lib/schema-component/antd/action/utils.d.ts +1 -1
- package/lib/schema-component/antd/action/utils.js +26 -25
- package/lib/schema-component/antd/association-filter/ActionBarAssociationFilterAction.js +19 -25
- package/lib/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.d.ts +1 -0
- package/lib/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.js +42 -0
- package/lib/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.d.ts +1 -0
- package/lib/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.js +95 -0
- package/lib/schema-component/antd/association-filter/AssociationFilter.Initializer.js +13 -25
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.Designer.js +89 -37
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +48 -127
- package/lib/schema-component/antd/association-filter/AssociationFilter.d.ts +3 -0
- package/lib/schema-component/antd/association-filter/AssociationFilter.js +13 -29
- package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDelete.js +2 -18
- package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.js +4 -15
- package/lib/schema-component/antd/association-filter/AssociationFilterProvider.d.ts +1 -0
- package/lib/schema-component/antd/association-filter/AssociationFilterProvider.js +12 -0
- package/lib/schema-component/antd/association-filter/utilts.d.ts +2 -0
- package/lib/schema-component/antd/association-filter/utilts.js +10 -0
- package/lib/schema-component/antd/association-select/AssociationSelect.d.ts +1 -0
- package/lib/schema-component/antd/association-select/AssociationSelect.js +492 -103
- package/lib/schema-component/antd/association-select/ReadPretty.js +4 -11
- package/lib/schema-component/antd/association-select/index.js +0 -2
- package/lib/schema-component/antd/association-select/useServiceOptions.js +8 -21
- package/lib/schema-component/antd/block-item/BlockItem.js +0 -10
- package/lib/schema-component/antd/block-item/TestDesigner.js +1 -8
- package/lib/schema-component/antd/block-item/index.js +0 -4
- package/lib/schema-component/antd/calendar/Calendar.Designer.js +22 -40
- package/lib/schema-component/antd/calendar/Calendar.js +29 -88
- package/lib/schema-component/antd/calendar/DeleteEvent.js +52 -97
- package/lib/schema-component/antd/calendar/Event.js +0 -4
- package/lib/schema-component/antd/calendar/Nav.js +2 -15
- package/lib/schema-component/antd/calendar/Title.js +5 -17
- package/lib/schema-component/antd/calendar/Today.js +3 -17
- package/lib/schema-component/antd/calendar/ViewSelect.js +5 -16
- package/lib/schema-component/antd/calendar/components/Header.js +7 -15
- package/lib/schema-component/antd/calendar/context.js +0 -4
- package/lib/schema-component/antd/calendar/index.js +0 -12
- package/lib/schema-component/antd/calendar/style.less +1 -1
- package/lib/schema-component/antd/calendar/utils.js +0 -13
- package/lib/schema-component/antd/card-item/CardItem.js +5 -17
- package/lib/schema-component/antd/card-item/index.js +0 -2
- package/lib/schema-component/antd/cascader/Cascader.js +19 -46
- package/lib/schema-component/antd/cascader/ReadPretty.js +3 -20
- package/lib/schema-component/antd/cascader/index.js +0 -2
- package/lib/schema-component/antd/checkbox/Checkbox.js +5 -16
- package/lib/schema-component/antd/checkbox/index.js +0 -2
- package/lib/schema-component/antd/collection-select/CollectionSelect.d.ts +8 -0
- package/lib/schema-component/antd/collection-select/CollectionSelect.js +69 -0
- package/lib/schema-component/antd/collection-select/index.d.ts +1 -0
- package/lib/schema-component/antd/collection-select/index.js +16 -0
- package/lib/schema-component/antd/color-select/ColorSelect.js +4 -13
- package/lib/schema-component/antd/color-select/index.js +0 -2
- package/lib/schema-component/antd/cron/Cron.d.ts +6 -3
- package/lib/schema-component/antd/cron/Cron.js +22 -26
- package/lib/schema-component/antd/cron/CronSet.d.ts +7 -0
- package/lib/schema-component/antd/cron/CronSet.js +116 -0
- package/lib/schema-component/antd/cron/index.d.ts +1 -0
- package/lib/schema-component/antd/cron/index.js +11 -2
- package/lib/schema-component/antd/cron/locale/index.d.ts +0 -1
- package/lib/schema-component/antd/cron/locale/index.js +1 -7
- package/lib/schema-component/antd/cron/locale/zh-CN.js +8 -4
- package/lib/schema-component/antd/date-picker/DatePicker.d.ts +8 -4
- package/lib/schema-component/antd/date-picker/DatePicker.js +45 -8
- package/lib/schema-component/antd/date-picker/ReadPretty.js +0 -18
- package/lib/schema-component/antd/date-picker/index.js +0 -2
- package/lib/schema-component/antd/date-picker/util.d.ts +25 -2
- package/lib/schema-component/antd/date-picker/util.js +133 -40
- package/lib/schema-component/antd/details/Details.d.ts +7 -0
- package/lib/schema-component/antd/details/Details.js +9 -0
- package/lib/schema-component/antd/details/index.d.ts +1 -0
- package/lib/schema-component/antd/details/index.js +16 -0
- package/lib/schema-component/antd/filter/DynamicComponent.js +11 -76
- package/lib/schema-component/antd/filter/Filter.Action.Designer.js +10 -39
- package/lib/schema-component/antd/filter/Filter.js +14 -23
- package/lib/schema-component/antd/filter/FilterAction.js +34 -79
- package/lib/schema-component/antd/filter/FilterGroup.js +7 -27
- package/lib/schema-component/antd/filter/FilterItem.js +10 -29
- package/lib/schema-component/antd/filter/FilterItems.js +0 -8
- package/lib/schema-component/antd/filter/SaveDefaultValue.js +4 -22
- package/lib/schema-component/antd/filter/context.js +0 -2
- package/lib/schema-component/antd/filter/index.js +0 -4
- package/lib/schema-component/antd/filter/useFilterActionProps.js +69 -76
- package/lib/schema-component/antd/filter/useOperators.d.ts +5 -0
- package/lib/schema-component/antd/filter/useOperators.js +32 -0
- package/lib/schema-component/antd/filter/useValues.js +15 -47
- package/lib/schema-component/antd/form/Form.Designer.js +2 -9
- package/lib/schema-component/antd/form/Form.js +34 -69
- package/lib/schema-component/antd/form/index.js +0 -2
- package/lib/schema-component/antd/form-item/FormItem.FilterFormDesigner.d.ts +1 -0
- package/lib/schema-component/antd/form-item/FormItem.FilterFormDesigner.js +34 -0
- package/lib/schema-component/antd/form-item/FormItem.js +88 -95
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.d.ts +23 -0
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +634 -0
- package/lib/schema-component/antd/form-item/index.js +0 -2
- package/lib/schema-component/antd/form-v2/Form.Designer.js +30 -64
- package/lib/schema-component/antd/form-v2/Form.FilterDesigner.d.ts +5 -0
- package/lib/schema-component/antd/form-v2/Form.FilterDesigner.js +48 -0
- package/lib/schema-component/antd/form-v2/Form.d.ts +2 -0
- package/lib/schema-component/antd/form-v2/Form.js +28 -61
- package/lib/schema-component/antd/form-v2/FormField.js +1 -14
- package/lib/schema-component/antd/form-v2/Templates.d.ts +4 -0
- package/lib/schema-component/antd/form-v2/Templates.js +178 -0
- package/lib/schema-component/antd/form-v2/index.d.ts +1 -1
- package/lib/schema-component/antd/form-v2/index.js +2 -4
- package/lib/schema-component/antd/form-v2/utils.d.ts +0 -1
- package/lib/schema-component/antd/form-v2/utils.js +22 -107
- package/lib/schema-component/antd/g2plot/G2Plot.js +8 -37
- package/lib/schema-component/antd/g2plot/G2PlotDesigner.js +40 -61
- package/lib/schema-component/antd/g2plot/index.js +0 -2
- package/lib/schema-component/antd/g2plot/requestChartData.js +19 -27
- package/lib/schema-component/antd/gantt/Gantt.Designer.d.ts +1 -0
- package/lib/schema-component/antd/gantt/Gantt.Designer.js +222 -0
- package/lib/schema-component/antd/gantt/components/calendar/calendar.d.ts +14 -0
- package/lib/schema-component/antd/gantt/components/calendar/calendar.js +332 -0
- package/lib/schema-component/antd/gantt/components/calendar/style.d.ts +4 -0
- package/lib/schema-component/antd/gantt/components/calendar/style.js +17 -0
- package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +11 -0
- package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +34 -0
- package/lib/schema-component/antd/gantt/components/gantt/Event.d.ts +2 -0
- package/lib/schema-component/antd/gantt/components/gantt/Event.js +13 -0
- package/lib/schema-component/antd/gantt/components/gantt/gantt.d.ts +5 -0
- package/lib/schema-component/antd/gantt/components/gantt/gantt.js +648 -0
- package/lib/schema-component/antd/gantt/components/gantt/style.d.ts +3 -0
- package/lib/schema-component/antd/gantt/components/gantt/style.js +15 -0
- package/lib/schema-component/antd/gantt/components/gantt/task-gantt-content.d.ts +25 -0
- package/lib/schema-component/antd/gantt/components/gantt/task-gantt-content.js +375 -0
- package/lib/schema-component/antd/gantt/components/gantt/task-gantt.d.ts +14 -0
- package/lib/schema-component/antd/gantt/components/gantt/task-gantt.js +76 -0
- package/lib/schema-component/antd/gantt/components/grid/grid-body.d.ts +13 -0
- package/lib/schema-component/antd/gantt/components/grid/grid-body.js +120 -0
- package/lib/schema-component/antd/gantt/components/grid/grid.d.ts +4 -0
- package/lib/schema-component/antd/gantt/components/grid/grid.js +21 -0
- package/lib/schema-component/antd/gantt/components/grid/style.d.ts +4 -0
- package/lib/schema-component/antd/gantt/components/grid/style.js +17 -0
- package/lib/schema-component/antd/gantt/components/other/arrow.d.ts +12 -0
- package/lib/schema-component/antd/gantt/components/other/arrow.js +65 -0
- package/lib/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +8 -0
- package/lib/schema-component/antd/gantt/components/other/horizontal-scroll.js +40 -0
- package/lib/schema-component/antd/gantt/components/other/style.d.ts +7 -0
- package/lib/schema-component/antd/gantt/components/other/style.js +23 -0
- package/lib/schema-component/antd/gantt/components/other/tooltip.d.ts +29 -0
- package/lib/schema-component/antd/gantt/components/other/tooltip.js +114 -0
- package/lib/schema-component/antd/gantt/components/other/vertical-scroll.d.ts +9 -0
- package/lib/schema-component/antd/gantt/components/other/vertical-scroll.js +42 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.d.ts +11 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.js +27 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +21 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-display.js +56 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.d.ts +7 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.js +18 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +3 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.js +46 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +3 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar.js +68 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/style.d.ts +2 -0
- package/lib/schema-component/antd/gantt/components/task-item/bar/style.js +13 -0
- package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +3 -0
- package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.js +38 -0
- package/lib/schema-component/antd/gantt/components/task-item/milestone/style.d.ts +2 -0
- package/lib/schema-component/antd/gantt/components/task-item/milestone/style.js +13 -0
- package/lib/schema-component/antd/gantt/components/task-item/project/project.d.ts +3 -0
- package/lib/schema-component/antd/gantt/components/task-item/project/project.js +39 -0
- package/lib/schema-component/antd/gantt/components/task-item/project/style.d.ts +3 -0
- package/lib/schema-component/antd/gantt/components/task-item/project/style.js +15 -0
- package/lib/schema-component/antd/gantt/components/task-item/style.d.ts +3 -0
- package/lib/schema-component/antd/gantt/components/task-item/style.js +15 -0
- package/lib/schema-component/antd/gantt/components/task-item/task-item.d.ts +15 -0
- package/lib/schema-component/antd/gantt/components/task-item/task-item.js +114 -0
- package/lib/schema-component/antd/gantt/context.d.ts +3 -0
- package/lib/schema-component/antd/gantt/context.js +12 -0
- package/lib/schema-component/antd/gantt/helpers/bar-helper.d.ts +14 -0
- package/lib/schema-component/antd/gantt/helpers/bar-helper.js +340 -0
- package/lib/schema-component/antd/gantt/helpers/date-helper.d.ts +18 -0
- package/lib/schema-component/antd/gantt/helpers/date-helper.js +197 -0
- package/lib/schema-component/antd/gantt/helpers/other-helper.d.ts +9 -0
- package/lib/schema-component/antd/gantt/helpers/other-helper.js +78 -0
- package/lib/schema-component/antd/gantt/index.d.ts +2 -0
- package/lib/schema-component/antd/gantt/index.js +21 -0
- package/lib/schema-component/antd/gantt/types/bar-task.d.ts +22 -0
- package/lib/schema-component/antd/gantt/types/bar-task.js +5 -0
- package/lib/schema-component/antd/gantt/types/date-setup.d.ts +5 -0
- package/lib/schema-component/antd/gantt/types/date-setup.js +5 -0
- package/lib/schema-component/antd/gantt/types/gantt-task-actions.d.ts +8 -0
- package/lib/schema-component/antd/gantt/types/gantt-task-actions.js +5 -0
- package/lib/schema-component/antd/gantt/types/public-types.d.ts +136 -0
- package/lib/schema-component/antd/gantt/types/public-types.js +19 -0
- package/lib/schema-component/antd/grid/Block.js +0 -5
- package/lib/schema-component/antd/grid/Grid.js +61 -132
- package/lib/schema-component/antd/grid/index.js +0 -4
- package/lib/schema-component/antd/icon-picker/IconPicker.js +11 -40
- package/lib/schema-component/antd/icon-picker/index.js +0 -2
- package/lib/schema-component/antd/index.d.ts +6 -2
- package/lib/schema-component/antd/index.js +66 -101
- package/lib/schema-component/antd/index.less +28 -0
- package/lib/schema-component/antd/input/EllipsisWithTooltip.js +11 -28
- package/lib/schema-component/antd/input/Input.d.ts +3 -3
- package/lib/schema-component/antd/input/Input.js +17 -24
- package/lib/schema-component/antd/input/Json.d.ts +7 -5
- package/lib/schema-component/antd/input/Json.js +9 -20
- package/lib/schema-component/antd/input/ReadPretty.d.ts +2 -2
- package/lib/schema-component/antd/input/ReadPretty.js +21 -39
- package/lib/schema-component/antd/input/index.js +0 -8
- package/lib/schema-component/antd/input/shared.js +0 -1
- package/lib/schema-component/antd/input-number/InputNumber.js +5 -17
- package/lib/schema-component/antd/input-number/ReadPretty.js +3 -11
- package/lib/schema-component/antd/input-number/index.js +0 -2
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.d.ts +1 -0
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.js +34 -0
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.js +22 -36
- package/lib/schema-component/antd/kanban/Kanban.Card.js +25 -51
- package/lib/schema-component/antd/kanban/Kanban.CardViewer.js +0 -2
- package/lib/schema-component/antd/kanban/Kanban.Designer.js +18 -32
- package/lib/schema-component/antd/kanban/Kanban.js +31 -77
- package/lib/schema-component/antd/kanban/context.js +0 -2
- package/lib/schema-component/antd/kanban/index.js +2 -7
- package/lib/schema-component/antd/kanban/index.less +8 -5
- package/lib/schema-component/antd/markdown/Markdown.Void.Designer.js +1 -10
- package/lib/schema-component/antd/markdown/Markdown.Void.js +40 -68
- package/lib/schema-component/antd/markdown/Markdown.js +12 -18
- package/lib/schema-component/antd/markdown/highlight-theme/default.less +98 -0
- package/lib/schema-component/antd/markdown/highlight-theme/table.less +36 -0
- package/lib/schema-component/antd/markdown/index.js +0 -2
- package/lib/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.d.ts +5 -0
- package/lib/schema-component/antd/markdown/markdown-it-plugins/mermaidPlugin.js +69 -0
- package/lib/schema-component/antd/markdown/md.d.ts +5 -0
- package/lib/schema-component/antd/markdown/md.js +22 -0
- package/lib/schema-component/antd/markdown/util.d.ts +5 -1
- package/lib/schema-component/antd/markdown/util.js +66 -12
- package/lib/schema-component/antd/menu/Menu.Designer.js +27 -72
- package/lib/schema-component/antd/menu/Menu.js +61 -129
- package/lib/schema-component/antd/menu/MenuItemInitializers/index.js +170 -209
- package/lib/schema-component/antd/menu/index.js +0 -6
- package/lib/schema-component/antd/menu/util.js +2 -24
- package/lib/schema-component/antd/page/FixedBlock.d.ts +8 -7
- package/lib/schema-component/antd/page/FixedBlock.js +100 -149
- package/lib/schema-component/antd/page/Page.js +83 -135
- package/lib/schema-component/antd/page/PageTabDesigner.js +11 -38
- package/lib/schema-component/antd/page/index.js +0 -4
- package/lib/schema-component/antd/pagination/index.js +6 -17
- package/lib/schema-component/antd/password/Password.js +7 -18
- package/lib/schema-component/antd/password/PasswordStrength.js +0 -38
- package/lib/schema-component/antd/password/index.js +0 -2
- package/lib/schema-component/antd/percent/Percent.js +5 -16
- package/lib/schema-component/antd/percent/index.js +0 -2
- package/lib/schema-component/antd/preview/Preview.d.ts +15 -0
- package/lib/schema-component/antd/preview/Preview.js +246 -0
- package/lib/schema-component/antd/preview/index.d.ts +1 -0
- package/lib/schema-component/antd/preview/index.js +16 -0
- package/lib/schema-component/antd/radio/Radio.js +1 -10
- package/lib/schema-component/antd/radio/index.js +0 -2
- package/lib/schema-component/antd/record-picker/InputRecordPicker.d.ts +2 -0
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +166 -106
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +29 -61
- package/lib/schema-component/antd/record-picker/RecordPicker.js +0 -4
- package/lib/schema-component/antd/record-picker/index.js +0 -10
- package/lib/schema-component/antd/record-picker/useFieldNames.js +4 -8
- package/lib/schema-component/antd/record-picker/util.d.ts +1 -1
- package/lib/schema-component/antd/record-picker/util.js +15 -18
- package/lib/schema-component/antd/remote-select/ReadPretty.js +22 -39
- package/lib/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +47 -80
- package/lib/schema-component/antd/remote-select/index.js +0 -2
- package/lib/schema-component/antd/remote-select/shared.js +0 -4
- package/lib/schema-component/antd/rich-text/RichText.js +6 -13
- package/lib/schema-component/antd/rich-text/index.js +0 -2
- package/lib/schema-component/antd/select/ReadPretty.js +4 -18
- package/lib/schema-component/antd/select/Select.js +15 -45
- package/lib/schema-component/antd/select/index.js +0 -4
- package/lib/schema-component/antd/select/shared.js +5 -29
- package/lib/schema-component/antd/space/index.js +4 -13
- package/lib/schema-component/antd/table/Table.Array.Designer.js +0 -5
- package/lib/schema-component/antd/table/Table.Array.js +48 -111
- package/lib/schema-component/antd/table/Table.Column.ActionBar.js +0 -8
- package/lib/schema-component/antd/table/Table.Column.Decorator.js +5 -25
- package/lib/schema-component/antd/table/Table.Column.Designer.js +37 -65
- package/lib/schema-component/antd/table/Table.Column.js +0 -5
- package/lib/schema-component/antd/table/Table.Designer.js +2 -9
- package/lib/schema-component/antd/table/Table.RowActionDesigner.js +1 -12
- package/lib/schema-component/antd/table/Table.RowSelection.js +6 -23
- package/lib/schema-component/antd/table/Table.Void.Designer.js +8 -29
- package/lib/schema-component/antd/table/Table.Void.js +17 -54
- package/lib/schema-component/antd/table/index.js +0 -13
- package/lib/schema-component/antd/table-v2/FilterDynamicComponent.d.ts +2 -0
- package/lib/schema-component/antd/table-v2/FilterDynamicComponent.js +157 -0
- package/lib/schema-component/antd/table-v2/Table.ActionColumnDesigner.js +1 -12
- package/lib/schema-component/antd/table-v2/Table.Column.ActionBar.js +0 -8
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.js +6 -29
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +28 -42
- package/lib/schema-component/antd/table-v2/Table.Column.js +0 -5
- package/lib/schema-component/antd/table-v2/Table.Designer.js +2 -9
- package/lib/schema-component/antd/table-v2/Table.js +139 -169
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +60 -59
- package/lib/schema-component/antd/table-v2/TableField.js +5 -22
- package/lib/schema-component/antd/table-v2/TableSelector.js +0 -2
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +42 -41
- package/lib/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +10 -0
- package/lib/schema-component/antd/table-v2/hooks/useUserVariable.js +63 -0
- package/lib/schema-component/antd/table-v2/index.js +0 -13
- package/lib/schema-component/antd/table-v2/utils.d.ts +2 -0
- package/lib/schema-component/antd/table-v2/utils.js +40 -6
- package/lib/schema-component/antd/tabs/Tabs.Designer.js +7 -17
- package/lib/schema-component/antd/tabs/Tabs.js +1 -17
- package/lib/schema-component/antd/tabs/index.js +0 -2
- package/lib/schema-component/antd/time-picker/ReadPretty.js +2 -12
- package/lib/schema-component/antd/time-picker/TimePicker.js +4 -10
- package/lib/schema-component/antd/time-picker/index.js +0 -2
- package/lib/schema-component/antd/tree-select/ReadPretty.js +1 -16
- package/lib/schema-component/antd/tree-select/TreeSelect.js +4 -11
- package/lib/schema-component/antd/tree-select/index.js +0 -2
- package/lib/schema-component/antd/upload/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/upload/ReadPretty.js +18 -40
- package/lib/schema-component/antd/upload/Upload.js +75 -80
- package/lib/schema-component/antd/upload/index.js +0 -2
- package/lib/schema-component/antd/upload/shared.js +14 -92
- package/lib/schema-component/antd/upload/type.d.ts +11 -0
- package/lib/schema-component/antd/variable/Input.js +68 -89
- package/lib/schema-component/antd/variable/JSONInput.js +15 -37
- package/lib/schema-component/antd/variable/TextArea.d.ts +3 -0
- package/lib/schema-component/antd/variable/TextArea.js +254 -169
- package/lib/schema-component/antd/variable/Variable.js +1 -7
- package/lib/schema-component/antd/variable/VariableSelect.d.ts +2 -0
- package/lib/schema-component/antd/variable/VariableSelect.js +74 -0
- package/lib/schema-component/antd/variable/XButton.d.ts +9 -0
- package/lib/schema-component/antd/variable/XButton.js +26 -0
- package/lib/schema-component/antd/variable/index.js +0 -2
- package/lib/schema-component/common/dnd-context/index.js +12 -48
- package/lib/schema-component/common/index.js +0 -4
- package/lib/schema-component/common/sortable-item/SortableItem.js +20 -50
- package/lib/schema-component/common/sortable-item/index.js +0 -2
- package/lib/schema-component/common/utils/logic.js +74 -93
- package/lib/schema-component/common/utils/uitls.js +46 -48
- package/lib/schema-component/context.js +0 -2
- package/lib/schema-component/core/DesignableSwitch.js +12 -23
- package/lib/schema-component/core/FormProvider.js +4 -21
- package/lib/schema-component/core/RemoteSchemaComponent.js +21 -42
- package/lib/schema-component/core/SchemaComponent.js +12 -34
- package/lib/schema-component/core/SchemaComponentOptions.js +4 -15
- package/lib/schema-component/core/SchemaComponentProvider.js +18 -50
- package/lib/schema-component/core/index.js +0 -12
- package/lib/schema-component/hooks/index.d.ts +2 -0
- package/lib/schema-component/hooks/index.js +22 -18
- package/lib/schema-component/hooks/useAttach.js +0 -4
- package/lib/schema-component/hooks/useCompile.js +4 -9
- package/lib/schema-component/hooks/useComponent.js +1 -9
- package/lib/schema-component/hooks/useDesignable.js +203 -404
- package/lib/schema-component/hooks/useDesigner.js +1 -7
- package/lib/schema-component/hooks/useFieldComponentOptions.js +18 -19
- package/lib/schema-component/hooks/useFieldProps.js +4 -9
- package/lib/schema-component/hooks/useFieldTitle.js +2 -13
- package/lib/schema-component/hooks/useProps.js +1 -8
- package/lib/schema-component/hooks/useSchemaComponentContext.js +0 -3
- package/lib/schema-component/hooks/useTableSize.d.ts +5 -0
- package/lib/schema-component/hooks/useTableSize.js +49 -0
- package/lib/schema-component/index.js +0 -14
- package/lib/schema-initializer/SchemaInitializer.js +46 -96
- package/lib/schema-initializer/SchemaInitializerProvider.js +11 -36
- package/lib/schema-initializer/SelectCollection.js +4 -16
- package/lib/schema-initializer/buttons/BlockInitializers.js +20 -2
- package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +2 -11
- package/lib/schema-initializer/buttons/CalendarActionInitializers.d.ts +4 -0
- package/lib/schema-initializer/buttons/CalendarActionInitializers.js +5 -0
- package/lib/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +6 -0
- package/lib/schema-initializer/buttons/CalendarFormActionInitializers.js +21 -0
- package/lib/schema-initializer/buttons/CreateFormBlockInitializers.js +2 -10
- package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +2 -10
- package/lib/schema-initializer/buttons/CustomFormItemInitializers.js +2 -13
- package/lib/schema-initializer/buttons/FilterFormActionInitializers.d.ts +16 -0
- package/lib/schema-initializer/buttons/FilterFormActionInitializers.js +31 -0
- package/lib/schema-initializer/buttons/FormItemInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/FormItemInitializers.js +63 -16
- package/lib/schema-initializer/buttons/GanttActionInitializers.d.ts +133 -0
- package/lib/schema-initializer/buttons/GanttActionInitializers.js +16 -0
- package/lib/schema-initializer/buttons/KanbanActionInitializers.d.ts +2 -0
- package/lib/schema-initializer/buttons/KanbanActionInitializers.js +5 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +6 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +17 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormItemInitializers.js +2 -14
- package/lib/schema-initializer/buttons/RecordBlockInitializers.js +31 -54
- package/lib/schema-initializer/buttons/RecordFormBlockInitializers.js +1 -9
- package/lib/schema-initializer/buttons/SubTableActionInitializers.js +4 -4
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +55 -77
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +41 -33
- package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +17 -0
- package/lib/schema-initializer/buttons/TableActionInitializers.js +51 -17
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +7 -21
- package/lib/schema-initializer/buttons/TableSelectorInitializers.js +2 -10
- package/lib/schema-initializer/buttons/chart-config/index.js +0 -10
- package/lib/schema-initializer/buttons/index.d.ts +2 -0
- package/lib/schema-initializer/buttons/index.js +22 -44
- package/lib/schema-initializer/components/BulkEditField.js +31 -69
- package/lib/schema-initializer/components/CreateRecordAction.js +85 -95
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +33 -91
- package/lib/schema-initializer/components/assigned-field/index.js +0 -2
- package/lib/schema-initializer/components/index.js +0 -6
- package/lib/schema-initializer/index.d.ts +1 -1
- package/lib/schema-initializer/index.js +7 -11
- package/lib/schema-initializer/items/ActionInitializer.js +4 -9
- package/lib/schema-initializer/items/BlockInitializer.js +2 -9
- package/lib/schema-initializer/items/BulkDestroyActionInitializer.js +4 -12
- package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.js +4 -9
- package/lib/schema-initializer/items/CalendarBlockInitializer.js +61 -86
- package/lib/schema-initializer/items/CollectionFieldInitializer.js +4 -9
- package/lib/schema-initializer/items/CreateActionInitializer.js +5 -9
- package/lib/schema-initializer/items/CreateChildInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateChildInitializer.js +70 -0
- package/lib/schema-initializer/items/CreateFilterActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateFilterActionInitializer.js +31 -0
- package/lib/schema-initializer/items/CreateFormBlockInitializer.js +45 -74
- package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +47 -76
- package/lib/schema-initializer/items/CreateResetActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateResetActionInitializer.js +29 -0
- package/lib/schema-initializer/items/CreateSubmitActionInitializer.js +4 -9
- package/lib/schema-initializer/items/CustomizeActionInitializer.js +4 -12
- package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.js +4 -9
- package/lib/schema-initializer/items/DataBlockInitializer.js +43 -71
- package/lib/schema-initializer/items/DeleteEventActionInitializer.js +4 -9
- package/lib/schema-initializer/items/DestroyActionInitializer.js +4 -9
- package/lib/schema-initializer/items/DetailsBlockInitializer.js +21 -36
- package/lib/schema-initializer/items/ExpandActionInitializer.d.ts +2 -0
- package/lib/schema-initializer/items/ExpandActionInitializer.js +67 -0
- package/lib/schema-initializer/items/FilterActionInitializer.js +4 -9
- package/lib/schema-initializer/items/FilterBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/FilterBlockInitializer.js +86 -0
- package/lib/schema-initializer/items/FilterCollapseBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/FilterCollapseBlockInitializer.js +52 -0
- package/lib/schema-initializer/items/FilterFormBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/FilterFormBlockInitializer.js +36 -0
- package/lib/schema-initializer/items/FormBlockInitializer.js +4 -13
- package/lib/schema-initializer/items/G2PlotInitializer.js +6 -15
- package/lib/schema-initializer/items/GanttBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/GanttBlockInitializer.js +175 -0
- package/lib/schema-initializer/items/InitializerWithSwitch.js +8 -19
- package/lib/schema-initializer/items/KanbanBlockInitializer.js +85 -116
- package/lib/schema-initializer/items/MarkdownBlockInitializer.js +5 -14
- package/lib/schema-initializer/items/PrintActionInitializer.js +4 -9
- package/lib/schema-initializer/items/RecordAssociationBlockInitializer.js +37 -62
- package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +92 -130
- package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +37 -62
- package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.js +52 -79
- package/lib/schema-initializer/items/RecordFormBlockInitializer.js +49 -78
- package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +51 -81
- package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +52 -83
- package/lib/schema-initializer/items/RefreshActionInitializer.js +4 -9
- package/lib/schema-initializer/items/SubmitActionInitializer.js +7 -11
- package/lib/schema-initializer/items/TableActionColumnInitializer.js +4 -9
- package/lib/schema-initializer/items/TableBlockInitializer.js +20 -36
- package/lib/schema-initializer/items/TableCollectionFieldInitializer.js +4 -9
- package/lib/schema-initializer/items/TableSelectorInitializer.js +24 -44
- package/lib/schema-initializer/items/UpdateActionInitializer.js +4 -9
- package/lib/schema-initializer/items/UpdateSubmitActionInitializer.js +4 -9
- package/lib/schema-initializer/items/ViewActionInitializer.js +4 -9
- package/lib/schema-initializer/items/index.d.ts +7 -0
- package/lib/schema-initializer/items/index.js +77 -86
- package/lib/schema-initializer/utils.d.ts +174 -1
- package/lib/schema-initializer/utils.js +672 -397
- package/lib/schema-items/OpenModeSchemaItems.d.ts +7 -0
- package/lib/schema-items/OpenModeSchemaItems.js +86 -0
- package/lib/schema-items/index.d.ts +1 -0
- package/lib/schema-items/index.js +16 -0
- package/lib/schema-settings/DataTemplates/FormDataTemplates.d.ts +2 -0
- package/lib/schema-settings/DataTemplates/FormDataTemplates.js +182 -0
- package/lib/schema-settings/DataTemplates/TreeLabel.d.ts +1 -0
- package/lib/schema-settings/DataTemplates/TreeLabel.js +27 -0
- package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.d.ts +2 -0
- package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.js +55 -0
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.d.ts +11 -0
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.js +271 -0
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +13 -0
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +155 -0
- package/lib/schema-settings/DataTemplates/index.d.ts +1 -0
- package/lib/schema-settings/DataTemplates/index.js +16 -0
- package/lib/schema-settings/EnableChildCollections/index.js +28 -45
- package/lib/schema-settings/GeneralSchemaDesigner.js +11 -34
- package/lib/schema-settings/LinkageRules/DynamicComponent.js +7 -76
- package/lib/schema-settings/LinkageRules/FilterDynamicComponent.js +3 -8
- package/lib/schema-settings/LinkageRules/LinkageRuleAction.js +33 -65
- package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.js +9 -23
- package/lib/schema-settings/LinkageRules/ValueDynamicComponent.js +36 -40
- package/lib/schema-settings/LinkageRules/Variables.js +11 -37
- package/lib/schema-settings/LinkageRules/action-hooks.js +5 -25
- package/lib/schema-settings/LinkageRules/components/EnableLinkage.d.ts +2 -0
- package/lib/schema-settings/LinkageRules/components/EnableLinkage.js +48 -0
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.d.ts +11 -0
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.js +262 -0
- package/lib/schema-settings/LinkageRules/context.d.ts +1 -1
- package/lib/schema-settings/LinkageRules/context.js +3 -5
- package/lib/schema-settings/LinkageRules/index.js +20 -27
- package/lib/schema-settings/LinkageRules/type.js +0 -1
- package/lib/schema-settings/LinkageRules/useValues.js +8 -23
- package/lib/schema-settings/SchemaSettings.d.ts +3 -0
- package/lib/schema-settings/SchemaSettings.js +731 -611
- package/lib/schema-settings/index.js +0 -4
- package/lib/schema-templates/BlockTemplate.js +3 -22
- package/lib/schema-templates/BlockTemplateDetails.js +34 -61
- package/lib/schema-templates/BlockTemplatePage.js +2 -15
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +99 -164
- package/lib/schema-templates/SchemaTemplateShortcut.js +1 -10
- package/lib/schema-templates/index.js +0 -8
- package/lib/schema-templates/schemas/uiSchemaTemplates.js +41 -66
- package/lib/settings-form/SettingsForm.js +86 -138
- package/lib/settings-form/index.js +0 -2
- package/lib/system-settings/SystemSettingsProvider.js +14 -13
- package/lib/system-settings/SystemSettingsShortcut.js +78 -121
- package/lib/system-settings/index.js +0 -4
- package/lib/user/ChangePassword.js +42 -78
- package/lib/user/CurrentUser.js +28 -59
- package/lib/user/CurrentUserProvider.js +1 -18
- package/lib/user/EditProfile.js +43 -81
- package/lib/user/LanguageSettings.js +37 -64
- package/lib/user/SigninPage.js +37 -76
- package/lib/user/SigninPageExtension.js +3 -20
- package/lib/user/SignupPage.js +29 -57
- package/lib/user/SwitchRole.js +30 -47
- package/lib/user/ThemeSettings.d.ts +1 -0
- package/lib/user/ThemeSettings.js +78 -0
- package/lib/user/VerificationCode.js +50 -87
- package/lib/user/index.js +0 -10
- package/package.json +13 -9
- package/es/collection-manager/templates/treeCollection.d.ts +0 -1
- package/es/collection-manager/templates/treeCollection.js +0 -0
- package/lib/collection-manager/templates/treeCollection.d.ts +0 -1
- package/lib/collection-manager/templates/treeCollection.js +0 -1
|
@@ -1,77 +1,68 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
var _templateObject;
|
|
2
|
-
|
|
3
3
|
var _excluded = ["children", "fieldSchema"],
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
_excluded2 = ["title", "dn"],
|
|
5
|
+
_excluded3 = ["title", "options", "value", "onChange", "openOnHover", "onClick"],
|
|
6
|
+
_excluded4 = ["title", "options", "value", "onChange"],
|
|
7
|
+
_excluded5 = ["title", "onChange"],
|
|
8
|
+
_excluded6 = ["schema"],
|
|
9
|
+
_excluded7 = ["title", "onSubmit", "initialValues", "initialSchema", "schema", "modalTip", "components"],
|
|
10
|
+
_excluded8 = ["hidden", "title", "components", "scope", "effects", "schema", "onSubmit", "asyncGetInitialValues", "initialValues", "width"];
|
|
12
11
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
13
|
-
|
|
12
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
14
17
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
|
-
|
|
16
18
|
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); }); }; }
|
|
17
|
-
|
|
18
19
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
-
|
|
20
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
-
|
|
22
21
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
-
|
|
24
22
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
29
|
-
|
|
23
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
30
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
-
|
|
32
26
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
-
|
|
34
27
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
28
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
30
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
38
31
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
39
|
-
|
|
40
32
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
41
|
-
|
|
42
33
|
import { css } from '@emotion/css';
|
|
43
|
-
import { FormDialog, FormItem, FormLayout, Input
|
|
34
|
+
import { ArrayCollapse, ArrayItems, FormDialog, FormItem, FormLayout, Input } from '@formily/antd';
|
|
44
35
|
import { createForm } from '@formily/core';
|
|
45
36
|
import { SchemaOptionsContext, useField, useFieldSchema, useForm } from '@formily/react';
|
|
46
|
-
import _ from 'lodash';
|
|
47
37
|
import { uid } from '@formily/shared';
|
|
48
|
-
import { Alert, Button, Cascader, Dropdown, Menu, Modal, Select, Space, Switch } from 'antd';
|
|
38
|
+
import { Alert, Button, Cascader, Dropdown, Empty, Menu, Modal, Select, Space, Switch } from 'antd';
|
|
49
39
|
import classNames from 'classnames';
|
|
50
|
-
import { cloneDeep } from 'lodash';
|
|
51
|
-
import React, { createContext, useContext, useMemo, useState } from 'react';
|
|
40
|
+
import _, { cloneDeep } from 'lodash';
|
|
41
|
+
import React, { createContext, useCallback, useContext, useMemo, useState } from 'react';
|
|
52
42
|
import { createPortal } from 'react-dom';
|
|
53
43
|
import { useTranslation } from 'react-i18next';
|
|
54
|
-
import { ActionContext, CollectionManagerContext,
|
|
44
|
+
import { APIClientProvider, ActionContext, CollectionManagerContext, FormProvider, RemoteSchemaComponent, SchemaComponent, SchemaComponentOptions, createDesignable, findFormBlock, useAPIClient, useCollection, useLinkageCollectionFilterOptions, useCollectionManager, useCompile, useDesignable } from '..';
|
|
45
|
+
import { findFilterTargets, updateFilterTargets } from '../block-provider/hooks';
|
|
46
|
+
import { isSameCollection, useSupportedBlocks } from '../filter-provider/utils';
|
|
47
|
+
import { getTargetKey } from '../schema-component/antd/association-filter/utilts';
|
|
55
48
|
import { useSchemaTemplateManager } from '../schema-templates';
|
|
56
49
|
import { useBlockTemplateContext } from '../schema-templates/BlockTemplate';
|
|
50
|
+
import { FormDataTemplates } from './DataTemplates';
|
|
51
|
+
import { EnableChildCollections } from './EnableChildCollections';
|
|
57
52
|
import { FormLinkageRules } from './LinkageRules';
|
|
58
53
|
import { useLinkageCollectionFieldOptions } from './LinkageRules/action-hooks';
|
|
59
|
-
import { EnableChildCollections } from './EnableChildCollections';
|
|
60
54
|
var SchemaSettingsContext = /*#__PURE__*/createContext(null);
|
|
61
55
|
export var useSchemaSettings = function useSchemaSettings() {
|
|
62
56
|
return useContext(SchemaSettingsContext);
|
|
63
57
|
};
|
|
64
58
|
export var SchemaSettingsProvider = function SchemaSettingsProvider(props) {
|
|
65
59
|
var children = props.children,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
fieldSchema = props.fieldSchema,
|
|
61
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
69
62
|
var _useSchemaTemplateMan = useSchemaTemplateManager(),
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
getTemplateBySchema = _useSchemaTemplateMan.getTemplateBySchema;
|
|
72
64
|
var _useCollection = useCollection(),
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
name = _useCollection.name;
|
|
75
66
|
var template = getTemplateBySchema(fieldSchema);
|
|
76
67
|
return /*#__PURE__*/React.createElement(SchemaSettingsContext.Provider, {
|
|
77
68
|
value: _objectSpread({
|
|
@@ -83,14 +74,12 @@ export var SchemaSettingsProvider = function SchemaSettingsProvider(props) {
|
|
|
83
74
|
};
|
|
84
75
|
export var SchemaSettings = function SchemaSettings(props) {
|
|
85
76
|
var title = props.title,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
dn = props.dn,
|
|
78
|
+
others = _objectWithoutProperties(props, _excluded2);
|
|
89
79
|
var _useState = useState(false),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
81
|
+
visible = _useState2[0],
|
|
82
|
+
setVisible = _useState2[1];
|
|
94
83
|
var DropdownMenu = /*#__PURE__*/React.createElement(Dropdown, {
|
|
95
84
|
visible: visible,
|
|
96
85
|
onVisibleChange: function onVisibleChange(visible) {
|
|
@@ -99,7 +88,6 @@ export var SchemaSettings = function SchemaSettings(props) {
|
|
|
99
88
|
overlay: /*#__PURE__*/React.createElement(Menu, null, props.children),
|
|
100
89
|
overlayClassName: classNames('nb-schema-initializer-button-overlay', css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-dropdown-menu-item-group-list {\n max-height: 40vh;\n overflow: auto;\n }\n "]))))
|
|
101
90
|
}, typeof title === 'string' ? /*#__PURE__*/React.createElement("span", null, title) : title);
|
|
102
|
-
|
|
103
91
|
if (dn) {
|
|
104
92
|
return /*#__PURE__*/React.createElement(SchemaSettingsProvider, _objectSpread({
|
|
105
93
|
visible: visible,
|
|
@@ -107,177 +95,148 @@ export var SchemaSettings = function SchemaSettings(props) {
|
|
|
107
95
|
dn: dn
|
|
108
96
|
}, others), DropdownMenu);
|
|
109
97
|
}
|
|
110
|
-
|
|
111
98
|
return DropdownMenu;
|
|
112
99
|
};
|
|
113
|
-
|
|
114
100
|
SchemaSettings.Template = function (props) {
|
|
115
101
|
var componentName = props.componentName,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
102
|
+
collectionName = props.collectionName,
|
|
103
|
+
resourceName = props.resourceName;
|
|
119
104
|
var _useTranslation = useTranslation(),
|
|
120
|
-
|
|
121
|
-
|
|
105
|
+
t = _useTranslation.t;
|
|
122
106
|
var _useCollectionManager = useCollectionManager(),
|
|
123
|
-
|
|
124
|
-
|
|
107
|
+
getCollection = _useCollectionManager.getCollection;
|
|
125
108
|
var _useSchemaSettings = useSchemaSettings(),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
109
|
+
dn = _useSchemaSettings.dn,
|
|
110
|
+
setVisible = _useSchemaSettings.setVisible,
|
|
111
|
+
template = _useSchemaSettings.template,
|
|
112
|
+
fieldSchema = _useSchemaSettings.fieldSchema;
|
|
131
113
|
var compile = useCompile();
|
|
132
114
|
var api = useAPIClient();
|
|
133
|
-
|
|
134
115
|
var _useBlockTemplateCont = useBlockTemplateContext(),
|
|
135
|
-
|
|
136
|
-
|
|
116
|
+
tdn = _useBlockTemplateCont.dn;
|
|
137
117
|
var _useSchemaTemplateMan2 = useSchemaTemplateManager(),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
118
|
+
saveAsTemplate = _useSchemaTemplateMan2.saveAsTemplate,
|
|
119
|
+
copyTemplateSchema = _useSchemaTemplateMan2.copyTemplateSchema;
|
|
141
120
|
if (!collectionName) {
|
|
142
121
|
return null;
|
|
143
122
|
}
|
|
144
|
-
|
|
145
123
|
if (template) {
|
|
146
124
|
return /*#__PURE__*/React.createElement(SchemaSettings.Item, {
|
|
147
125
|
onClick: function () {
|
|
148
|
-
var
|
|
126
|
+
var _onClick2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
149
127
|
var schema, removed;
|
|
150
|
-
return
|
|
151
|
-
while (1) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
case 5:
|
|
183
|
-
case "end":
|
|
184
|
-
return _context2.stop();
|
|
185
|
-
}
|
|
128
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
129
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
130
|
+
case 0:
|
|
131
|
+
_context2.next = 2;
|
|
132
|
+
return copyTemplateSchema(template);
|
|
133
|
+
case 2:
|
|
134
|
+
schema = _context2.sent;
|
|
135
|
+
removed = tdn.removeWithoutEmit();
|
|
136
|
+
tdn.insertAfterEnd(schema, {
|
|
137
|
+
onSuccess: function onSuccess() {
|
|
138
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
139
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
140
|
+
while (1) switch (_context.prev = _context.next) {
|
|
141
|
+
case 0:
|
|
142
|
+
_context.next = 2;
|
|
143
|
+
return api.request({
|
|
144
|
+
url: "/uiSchemas:remove/".concat(removed['x-uid'])
|
|
145
|
+
});
|
|
146
|
+
case 2:
|
|
147
|
+
case "end":
|
|
148
|
+
return _context.stop();
|
|
149
|
+
}
|
|
150
|
+
}, _callee);
|
|
151
|
+
}))();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
case 5:
|
|
155
|
+
case "end":
|
|
156
|
+
return _context2.stop();
|
|
186
157
|
}
|
|
187
158
|
}, _callee2);
|
|
188
159
|
}));
|
|
189
|
-
|
|
190
160
|
function onClick() {
|
|
191
|
-
return
|
|
161
|
+
return _onClick2.apply(this, arguments);
|
|
192
162
|
}
|
|
193
|
-
|
|
194
163
|
return onClick;
|
|
195
164
|
}()
|
|
196
165
|
}, t('Convert reference to duplicate'));
|
|
197
166
|
}
|
|
198
|
-
|
|
199
167
|
return /*#__PURE__*/React.createElement(SchemaSettings.Item, {
|
|
200
168
|
onClick: function () {
|
|
201
|
-
var
|
|
169
|
+
var _onClick3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
202
170
|
var _getCollection, title, values, sdn, _yield$saveAsTemplate, key;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
'x-decorator': 'FormItem',
|
|
227
|
-
'x-component': 'Input'
|
|
228
|
-
}
|
|
171
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
172
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
173
|
+
case 0:
|
|
174
|
+
setVisible(false);
|
|
175
|
+
_getCollection = getCollection(collectionName), title = _getCollection.title;
|
|
176
|
+
_context3.next = 4;
|
|
177
|
+
return FormDialog(t('Save as template'), function () {
|
|
178
|
+
return /*#__PURE__*/React.createElement(FormLayout, {
|
|
179
|
+
layout: 'vertical'
|
|
180
|
+
}, /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
181
|
+
components: {
|
|
182
|
+
Input: Input,
|
|
183
|
+
FormItem: FormItem
|
|
184
|
+
},
|
|
185
|
+
schema: {
|
|
186
|
+
type: 'object',
|
|
187
|
+
properties: {
|
|
188
|
+
name: {
|
|
189
|
+
title: t('Template name'),
|
|
190
|
+
required: true,
|
|
191
|
+
default: "".concat(compile(title), "_").concat(t(componentName)),
|
|
192
|
+
'x-decorator': 'FormItem',
|
|
193
|
+
'x-component': 'Input'
|
|
229
194
|
}
|
|
230
195
|
}
|
|
231
|
-
}));
|
|
232
|
-
}).open({});
|
|
233
|
-
|
|
234
|
-
case 4:
|
|
235
|
-
values = _context3.sent;
|
|
236
|
-
sdn = createDesignable({
|
|
237
|
-
t: t,
|
|
238
|
-
api: api,
|
|
239
|
-
refresh: dn.refresh.bind(dn),
|
|
240
|
-
current: fieldSchema.parent
|
|
241
|
-
});
|
|
242
|
-
sdn.loadAPIClientEvents();
|
|
243
|
-
_context3.next = 9;
|
|
244
|
-
return saveAsTemplate({
|
|
245
|
-
collectionName: collectionName,
|
|
246
|
-
resourceName: resourceName,
|
|
247
|
-
componentName: componentName,
|
|
248
|
-
name: values.name,
|
|
249
|
-
uid: fieldSchema['x-uid']
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
case 9:
|
|
253
|
-
_yield$saveAsTemplate = _context3.sent;
|
|
254
|
-
key = _yield$saveAsTemplate.key;
|
|
255
|
-
sdn.removeWithoutEmit(fieldSchema);
|
|
256
|
-
sdn.insertBeforeEnd({
|
|
257
|
-
type: 'void',
|
|
258
|
-
'x-component': 'BlockTemplate',
|
|
259
|
-
'x-component-props': {
|
|
260
|
-
templateId: key
|
|
261
196
|
}
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
197
|
+
}));
|
|
198
|
+
}).open({});
|
|
199
|
+
case 4:
|
|
200
|
+
values = _context3.sent;
|
|
201
|
+
sdn = createDesignable({
|
|
202
|
+
t: t,
|
|
203
|
+
api: api,
|
|
204
|
+
refresh: dn.refresh.bind(dn),
|
|
205
|
+
current: fieldSchema.parent
|
|
206
|
+
});
|
|
207
|
+
sdn.loadAPIClientEvents();
|
|
208
|
+
_context3.next = 9;
|
|
209
|
+
return saveAsTemplate({
|
|
210
|
+
collectionName: collectionName,
|
|
211
|
+
resourceName: resourceName,
|
|
212
|
+
componentName: componentName,
|
|
213
|
+
name: values.name,
|
|
214
|
+
uid: fieldSchema['x-uid']
|
|
215
|
+
});
|
|
216
|
+
case 9:
|
|
217
|
+
_yield$saveAsTemplate = _context3.sent;
|
|
218
|
+
key = _yield$saveAsTemplate.key;
|
|
219
|
+
sdn.removeWithoutEmit(fieldSchema);
|
|
220
|
+
sdn.insertBeforeEnd({
|
|
221
|
+
type: 'void',
|
|
222
|
+
'x-component': 'BlockTemplate',
|
|
223
|
+
'x-component-props': {
|
|
224
|
+
templateId: key
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
case 13:
|
|
228
|
+
case "end":
|
|
229
|
+
return _context3.stop();
|
|
268
230
|
}
|
|
269
231
|
}, _callee3);
|
|
270
232
|
}));
|
|
271
|
-
|
|
272
233
|
function onClick() {
|
|
273
|
-
return
|
|
234
|
+
return _onClick3.apply(this, arguments);
|
|
274
235
|
}
|
|
275
|
-
|
|
276
236
|
return onClick;
|
|
277
237
|
}()
|
|
278
238
|
}, t('Save as template'));
|
|
279
239
|
};
|
|
280
|
-
|
|
281
240
|
var findGridSchema = function findGridSchema(fieldSchema) {
|
|
282
241
|
return fieldSchema.reduceProperties(function (buf, s) {
|
|
283
242
|
if (s['x-component'] === 'FormV2') {
|
|
@@ -285,19 +244,15 @@ var findGridSchema = function findGridSchema(fieldSchema) {
|
|
|
285
244
|
if (s['x-component'] === 'Grid' || s['x-component'] === 'BlockTemplate') {
|
|
286
245
|
return s;
|
|
287
246
|
}
|
|
288
|
-
|
|
289
247
|
return buf;
|
|
290
248
|
}, null);
|
|
291
|
-
|
|
292
249
|
if (f) {
|
|
293
250
|
return f;
|
|
294
251
|
}
|
|
295
252
|
}
|
|
296
|
-
|
|
297
253
|
return buf;
|
|
298
254
|
}, null);
|
|
299
255
|
};
|
|
300
|
-
|
|
301
256
|
var findBlockTemplateSchema = function findBlockTemplateSchema(fieldSchema) {
|
|
302
257
|
return fieldSchema.reduceProperties(function (buf, s) {
|
|
303
258
|
if (s['x-component'] === 'FormV2') {
|
|
@@ -305,222 +260,190 @@ var findBlockTemplateSchema = function findBlockTemplateSchema(fieldSchema) {
|
|
|
305
260
|
if (s['x-component'] === 'BlockTemplate') {
|
|
306
261
|
return s;
|
|
307
262
|
}
|
|
308
|
-
|
|
309
263
|
return buf;
|
|
310
264
|
}, null);
|
|
311
|
-
|
|
312
265
|
if (f) {
|
|
313
266
|
return f;
|
|
314
267
|
}
|
|
315
268
|
}
|
|
316
|
-
|
|
317
269
|
return buf;
|
|
318
270
|
}, null);
|
|
319
271
|
};
|
|
320
|
-
|
|
321
272
|
SchemaSettings.FormItemTemplate = function (props) {
|
|
322
273
|
var _props$insertAdjacent = props.insertAdjacentPosition,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
274
|
+
insertAdjacentPosition = _props$insertAdjacent === void 0 ? 'afterBegin' : _props$insertAdjacent,
|
|
275
|
+
componentName = props.componentName,
|
|
276
|
+
collectionName = props.collectionName,
|
|
277
|
+
resourceName = props.resourceName;
|
|
328
278
|
var _useTranslation2 = useTranslation(),
|
|
329
|
-
|
|
330
|
-
|
|
279
|
+
t = _useTranslation2.t;
|
|
331
280
|
var compile = useCompile();
|
|
332
|
-
|
|
333
281
|
var _useCollectionManager2 = useCollectionManager(),
|
|
334
|
-
|
|
335
|
-
|
|
282
|
+
getCollection = _useCollectionManager2.getCollection;
|
|
336
283
|
var _useSchemaSettings2 = useSchemaSettings(),
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
284
|
+
dn = _useSchemaSettings2.dn,
|
|
285
|
+
setVisible = _useSchemaSettings2.setVisible,
|
|
286
|
+
template = _useSchemaSettings2.template,
|
|
287
|
+
fieldSchema = _useSchemaSettings2.fieldSchema;
|
|
342
288
|
var api = useAPIClient();
|
|
343
|
-
|
|
344
289
|
var _useSchemaTemplateMan3 = useSchemaTemplateManager(),
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
290
|
+
saveAsTemplate = _useSchemaTemplateMan3.saveAsTemplate,
|
|
291
|
+
copyTemplateSchema = _useSchemaTemplateMan3.copyTemplateSchema;
|
|
348
292
|
if (!collectionName) {
|
|
349
293
|
return null;
|
|
350
294
|
}
|
|
351
|
-
|
|
352
295
|
if (template) {
|
|
353
296
|
return /*#__PURE__*/React.createElement(SchemaSettings.Item, {
|
|
354
297
|
onClick: function () {
|
|
355
|
-
var
|
|
298
|
+
var _onClick4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
356
299
|
var schema, templateSchema, sdn;
|
|
357
|
-
return
|
|
358
|
-
while (1) {
|
|
359
|
-
switch (_context5.prev = _context5.next) {
|
|
360
|
-
case 0:
|
|
361
|
-
_context5.next = 2;
|
|
362
|
-
return copyTemplateSchema(template);
|
|
363
|
-
|
|
364
|
-
case 2:
|
|
365
|
-
schema = _context5.sent;
|
|
366
|
-
templateSchema = findBlockTemplateSchema(fieldSchema);
|
|
367
|
-
sdn = createDesignable({
|
|
368
|
-
t: t,
|
|
369
|
-
api: api,
|
|
370
|
-
refresh: dn.refresh.bind(dn),
|
|
371
|
-
current: templateSchema.parent
|
|
372
|
-
});
|
|
373
|
-
sdn.loadAPIClientEvents();
|
|
374
|
-
sdn.removeWithoutEmit(templateSchema);
|
|
375
|
-
sdn.insertAdjacent(insertAdjacentPosition, schema, {
|
|
376
|
-
onSuccess: function onSuccess() {
|
|
377
|
-
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
378
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
379
|
-
while (1) {
|
|
380
|
-
switch (_context4.prev = _context4.next) {
|
|
381
|
-
case 0:
|
|
382
|
-
_context4.next = 2;
|
|
383
|
-
return api.request({
|
|
384
|
-
url: "/uiSchemas:remove/".concat(templateSchema['x-uid'])
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
case 2:
|
|
388
|
-
case "end":
|
|
389
|
-
return _context4.stop();
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}, _callee4);
|
|
393
|
-
}))();
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
fieldSchema['x-template-key'] = null;
|
|
397
|
-
_context5.next = 11;
|
|
398
|
-
return api.request({
|
|
399
|
-
url: "uiSchemas:patch",
|
|
400
|
-
method: 'post',
|
|
401
|
-
data: {
|
|
402
|
-
'x-uid': fieldSchema['x-uid'],
|
|
403
|
-
'x-template-key': null
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
|
|
407
|
-
case 11:
|
|
408
|
-
dn.refresh();
|
|
409
|
-
|
|
410
|
-
case 12:
|
|
411
|
-
case "end":
|
|
412
|
-
return _context5.stop();
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}, _callee5);
|
|
416
|
-
}));
|
|
417
|
-
|
|
418
|
-
function onClick() {
|
|
419
|
-
return _onClick3.apply(this, arguments);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
return onClick;
|
|
423
|
-
}()
|
|
424
|
-
}, t('Convert reference to duplicate'));
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
return /*#__PURE__*/React.createElement(SchemaSettings.Item, {
|
|
428
|
-
onClick: function () {
|
|
429
|
-
var _onClick4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
430
|
-
var _getCollection2, title, gridSchema, values, sdn, _yield$saveAsTemplate2, key;
|
|
431
|
-
|
|
432
|
-
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
433
|
-
while (1) {
|
|
434
|
-
switch (_context6.prev = _context6.next) {
|
|
300
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
301
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
435
302
|
case 0:
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
var componentTitle = {
|
|
442
|
-
FormItem: t('Form'),
|
|
443
|
-
ReadPrettyFormItem: t('Details')
|
|
444
|
-
};
|
|
445
|
-
return /*#__PURE__*/React.createElement(FormLayout, {
|
|
446
|
-
layout: 'vertical'
|
|
447
|
-
}, /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
448
|
-
components: {
|
|
449
|
-
Input: Input,
|
|
450
|
-
FormItem: FormItem
|
|
451
|
-
},
|
|
452
|
-
schema: {
|
|
453
|
-
type: 'object',
|
|
454
|
-
properties: {
|
|
455
|
-
name: {
|
|
456
|
-
title: t('Template name'),
|
|
457
|
-
required: true,
|
|
458
|
-
default: "".concat(compile(title), "_").concat(componentTitle[componentName] || componentName),
|
|
459
|
-
'x-decorator': 'FormItem',
|
|
460
|
-
'x-component': 'Input'
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}));
|
|
465
|
-
}).open({});
|
|
466
|
-
|
|
467
|
-
case 5:
|
|
468
|
-
values = _context6.sent;
|
|
303
|
+
_context5.next = 2;
|
|
304
|
+
return copyTemplateSchema(template);
|
|
305
|
+
case 2:
|
|
306
|
+
schema = _context5.sent;
|
|
307
|
+
templateSchema = findBlockTemplateSchema(fieldSchema);
|
|
469
308
|
sdn = createDesignable({
|
|
470
309
|
t: t,
|
|
471
310
|
api: api,
|
|
472
311
|
refresh: dn.refresh.bind(dn),
|
|
473
|
-
current:
|
|
312
|
+
current: templateSchema.parent
|
|
474
313
|
});
|
|
475
314
|
sdn.loadAPIClientEvents();
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
templateId: key
|
|
315
|
+
sdn.removeWithoutEmit(templateSchema);
|
|
316
|
+
sdn.insertAdjacent(insertAdjacentPosition, schema, {
|
|
317
|
+
onSuccess: function onSuccess() {
|
|
318
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
319
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
320
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
321
|
+
case 0:
|
|
322
|
+
_context4.next = 2;
|
|
323
|
+
return api.request({
|
|
324
|
+
url: "/uiSchemas:remove/".concat(templateSchema['x-uid'])
|
|
325
|
+
});
|
|
326
|
+
case 2:
|
|
327
|
+
case "end":
|
|
328
|
+
return _context4.stop();
|
|
329
|
+
}
|
|
330
|
+
}, _callee4);
|
|
331
|
+
}))();
|
|
494
332
|
}
|
|
495
333
|
});
|
|
496
|
-
fieldSchema['x-template-key'] =
|
|
497
|
-
|
|
334
|
+
fieldSchema['x-template-key'] = null;
|
|
335
|
+
_context5.next = 11;
|
|
498
336
|
return api.request({
|
|
499
337
|
url: "uiSchemas:patch",
|
|
500
338
|
method: 'post',
|
|
501
339
|
data: {
|
|
502
340
|
'x-uid': fieldSchema['x-uid'],
|
|
503
|
-
'x-template-key':
|
|
341
|
+
'x-template-key': null
|
|
504
342
|
}
|
|
505
343
|
});
|
|
506
|
-
|
|
507
|
-
|
|
344
|
+
case 11:
|
|
345
|
+
dn.refresh();
|
|
346
|
+
case 12:
|
|
508
347
|
case "end":
|
|
509
|
-
return
|
|
348
|
+
return _context5.stop();
|
|
510
349
|
}
|
|
350
|
+
}, _callee5);
|
|
351
|
+
}));
|
|
352
|
+
function onClick() {
|
|
353
|
+
return _onClick4.apply(this, arguments);
|
|
354
|
+
}
|
|
355
|
+
return onClick;
|
|
356
|
+
}()
|
|
357
|
+
}, t('Convert reference to duplicate'));
|
|
358
|
+
}
|
|
359
|
+
return /*#__PURE__*/React.createElement(SchemaSettings.Item, {
|
|
360
|
+
onClick: function () {
|
|
361
|
+
var _onClick5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
362
|
+
var _getCollection2, title, gridSchema, values, sdn, _yield$saveAsTemplate2, key;
|
|
363
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
364
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
365
|
+
case 0:
|
|
366
|
+
setVisible(false);
|
|
367
|
+
_getCollection2 = getCollection(collectionName), title = _getCollection2.title;
|
|
368
|
+
gridSchema = findGridSchema(fieldSchema);
|
|
369
|
+
_context6.next = 5;
|
|
370
|
+
return FormDialog(t('Save as template'), function () {
|
|
371
|
+
var componentTitle = {
|
|
372
|
+
FormItem: t('Form'),
|
|
373
|
+
ReadPrettyFormItem: t('Details')
|
|
374
|
+
};
|
|
375
|
+
return /*#__PURE__*/React.createElement(FormLayout, {
|
|
376
|
+
layout: 'vertical'
|
|
377
|
+
}, /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
378
|
+
components: {
|
|
379
|
+
Input: Input,
|
|
380
|
+
FormItem: FormItem
|
|
381
|
+
},
|
|
382
|
+
schema: {
|
|
383
|
+
type: 'object',
|
|
384
|
+
properties: {
|
|
385
|
+
name: {
|
|
386
|
+
title: t('Template name'),
|
|
387
|
+
required: true,
|
|
388
|
+
default: "".concat(compile(title), "_").concat(componentTitle[componentName] || componentName),
|
|
389
|
+
'x-decorator': 'FormItem',
|
|
390
|
+
'x-component': 'Input'
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}));
|
|
395
|
+
}).open({});
|
|
396
|
+
case 5:
|
|
397
|
+
values = _context6.sent;
|
|
398
|
+
sdn = createDesignable({
|
|
399
|
+
t: t,
|
|
400
|
+
api: api,
|
|
401
|
+
refresh: dn.refresh.bind(dn),
|
|
402
|
+
current: gridSchema.parent
|
|
403
|
+
});
|
|
404
|
+
sdn.loadAPIClientEvents();
|
|
405
|
+
_context6.next = 10;
|
|
406
|
+
return saveAsTemplate({
|
|
407
|
+
collectionName: collectionName,
|
|
408
|
+
resourceName: resourceName,
|
|
409
|
+
componentName: componentName,
|
|
410
|
+
name: values.name,
|
|
411
|
+
uid: gridSchema['x-uid']
|
|
412
|
+
});
|
|
413
|
+
case 10:
|
|
414
|
+
_yield$saveAsTemplate2 = _context6.sent;
|
|
415
|
+
key = _yield$saveAsTemplate2.key;
|
|
416
|
+
sdn.removeWithoutEmit(gridSchema);
|
|
417
|
+
sdn.insertAdjacent(insertAdjacentPosition, {
|
|
418
|
+
type: 'void',
|
|
419
|
+
'x-component': 'BlockTemplate',
|
|
420
|
+
'x-component-props': {
|
|
421
|
+
templateId: key
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
fieldSchema['x-template-key'] = key;
|
|
425
|
+
_context6.next = 17;
|
|
426
|
+
return api.request({
|
|
427
|
+
url: "uiSchemas:patch",
|
|
428
|
+
method: 'post',
|
|
429
|
+
data: {
|
|
430
|
+
'x-uid': fieldSchema['x-uid'],
|
|
431
|
+
'x-template-key': key
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
case 17:
|
|
435
|
+
case "end":
|
|
436
|
+
return _context6.stop();
|
|
511
437
|
}
|
|
512
438
|
}, _callee6);
|
|
513
439
|
}));
|
|
514
|
-
|
|
515
440
|
function onClick() {
|
|
516
|
-
return
|
|
441
|
+
return _onClick5.apply(this, arguments);
|
|
517
442
|
}
|
|
518
|
-
|
|
519
443
|
return onClick;
|
|
520
444
|
}()
|
|
521
|
-
}, t('Save as template'));
|
|
445
|
+
}, t('Save as block template'));
|
|
522
446
|
};
|
|
523
|
-
|
|
524
447
|
SchemaSettings.Item = function (props) {
|
|
525
448
|
var eventKey = props.eventKey;
|
|
526
449
|
var key = useMemo(function () {
|
|
@@ -532,7 +455,6 @@ SchemaSettings.Item = function (props) {
|
|
|
532
455
|
}, props), {}, {
|
|
533
456
|
onClick: function onClick(info) {
|
|
534
457
|
var _props$onClick;
|
|
535
|
-
|
|
536
458
|
info.domEvent.preventDefault();
|
|
537
459
|
info.domEvent.stopPropagation();
|
|
538
460
|
props === null || props === void 0 ? void 0 : (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, info);
|
|
@@ -542,31 +464,24 @@ SchemaSettings.Item = function (props) {
|
|
|
542
464
|
}
|
|
543
465
|
}), props.children || props.title);
|
|
544
466
|
};
|
|
545
|
-
|
|
546
467
|
SchemaSettings.ItemGroup = function (props) {
|
|
547
468
|
return /*#__PURE__*/React.createElement(Menu.ItemGroup, _objectSpread({}, props));
|
|
548
469
|
};
|
|
549
|
-
|
|
550
470
|
SchemaSettings.SubMenu = function (props) {
|
|
551
471
|
return /*#__PURE__*/React.createElement(Menu.SubMenu, _objectSpread({}, props));
|
|
552
472
|
};
|
|
553
|
-
|
|
554
473
|
SchemaSettings.Divider = function (props) {
|
|
555
474
|
return /*#__PURE__*/React.createElement(Menu.Divider, _objectSpread({}, props));
|
|
556
475
|
};
|
|
557
|
-
|
|
558
476
|
SchemaSettings.Remove = function (props) {
|
|
559
477
|
var confirm = props.confirm,
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
478
|
+
removeParentsIfNoChildren = props.removeParentsIfNoChildren,
|
|
479
|
+
breakRemoveOn = props.breakRemoveOn;
|
|
563
480
|
var _useSchemaSettings3 = useSchemaSettings(),
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
481
|
+
dn = _useSchemaSettings3.dn,
|
|
482
|
+
template = _useSchemaSettings3.template;
|
|
567
483
|
var _useTranslation3 = useTranslation(),
|
|
568
|
-
|
|
569
|
-
|
|
484
|
+
t = _useTranslation3.t;
|
|
570
485
|
var field = useField();
|
|
571
486
|
var fieldSchema = useFieldSchema();
|
|
572
487
|
var ctx = useBlockTemplateContext();
|
|
@@ -583,57 +498,198 @@ SchemaSettings.Remove = function (props) {
|
|
|
583
498
|
removeParentsIfNoChildren: removeParentsIfNoChildren,
|
|
584
499
|
breakRemoveOn: breakRemoveOn
|
|
585
500
|
};
|
|
586
|
-
|
|
587
501
|
if (field && field.required) {
|
|
588
502
|
field.required = false;
|
|
589
503
|
fieldSchema['required'] = false;
|
|
590
504
|
}
|
|
591
|
-
|
|
592
505
|
if (template && (ctx === null || ctx === void 0 ? void 0 : ctx.dn)) {
|
|
593
506
|
ctx === null || ctx === void 0 ? void 0 : ctx.dn.remove(null, options);
|
|
594
507
|
} else {
|
|
595
508
|
dn.remove(null, options);
|
|
596
509
|
}
|
|
597
|
-
|
|
598
510
|
delete form.values[fieldSchema.name];
|
|
599
511
|
}
|
|
600
512
|
}));
|
|
601
513
|
}
|
|
602
514
|
}, t('Delete'));
|
|
603
515
|
};
|
|
604
|
-
|
|
516
|
+
SchemaSettings.ConnectDataBlocks = function (props) {
|
|
517
|
+
var type = props.type,
|
|
518
|
+
emptyDescription = props.emptyDescription;
|
|
519
|
+
var fieldSchema = useFieldSchema();
|
|
520
|
+
var _useDesignable = useDesignable(),
|
|
521
|
+
dn = _useDesignable.dn;
|
|
522
|
+
var _useTranslation4 = useTranslation(),
|
|
523
|
+
t = _useTranslation4.t;
|
|
524
|
+
var collection = useCollection();
|
|
525
|
+
var dataBlocks = useSupportedBlocks(type);
|
|
526
|
+
var _findFilterTargets = findFilterTargets(fieldSchema),
|
|
527
|
+
_findFilterTargets$ta = _findFilterTargets.targets,
|
|
528
|
+
targets = _findFilterTargets$ta === void 0 ? [] : _findFilterTargets$ta,
|
|
529
|
+
uid = _findFilterTargets.uid;
|
|
530
|
+
var compile = useCompile();
|
|
531
|
+
var Content = dataBlocks.map(function (block) {
|
|
532
|
+
var title = "".concat(compile(block.collection.title), " #").concat(block.uid.slice(0, 4));
|
|
533
|
+
var onHover = function onHover() {
|
|
534
|
+
var dom = block.dom;
|
|
535
|
+
var designer = dom.querySelector('.general-schema-designer');
|
|
536
|
+
if (designer) {
|
|
537
|
+
designer.style.display = 'block';
|
|
538
|
+
}
|
|
539
|
+
dom.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.2)';
|
|
540
|
+
dom.scrollIntoView({
|
|
541
|
+
behavior: 'smooth',
|
|
542
|
+
block: 'center'
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
var onLeave = function onLeave() {
|
|
546
|
+
var dom = block.dom;
|
|
547
|
+
var designer = dom.querySelector('.general-schema-designer');
|
|
548
|
+
if (designer) {
|
|
549
|
+
designer.style.display = null;
|
|
550
|
+
}
|
|
551
|
+
dom.style.boxShadow = 'none';
|
|
552
|
+
};
|
|
553
|
+
if (isSameCollection(block.collection, collection)) {
|
|
554
|
+
return /*#__PURE__*/React.createElement(SchemaSettings.SwitchItem, {
|
|
555
|
+
key: block.uid,
|
|
556
|
+
title: title,
|
|
557
|
+
checked: targets.some(function (target) {
|
|
558
|
+
return target.uid === block.uid;
|
|
559
|
+
}),
|
|
560
|
+
onChange: function onChange(checked) {
|
|
561
|
+
var _schema;
|
|
562
|
+
if (checked) {
|
|
563
|
+
targets.push({
|
|
564
|
+
uid: block.uid
|
|
565
|
+
});
|
|
566
|
+
} else {
|
|
567
|
+
targets = targets.filter(function (target) {
|
|
568
|
+
return target.uid !== block.uid;
|
|
569
|
+
});
|
|
570
|
+
block.clearFilter(uid);
|
|
571
|
+
}
|
|
572
|
+
updateFilterTargets(fieldSchema, targets);
|
|
573
|
+
dn.emit('patch', {
|
|
574
|
+
schema: (_schema = {}, _defineProperty(_schema, 'x-uid', uid), _defineProperty(_schema, 'x-filter-targets', targets), _schema)
|
|
575
|
+
});
|
|
576
|
+
dn.refresh();
|
|
577
|
+
},
|
|
578
|
+
onMouseEnter: onHover,
|
|
579
|
+
onMouseLeave: onLeave
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
var target = targets.find(function (target) {
|
|
583
|
+
return target.uid === block.uid;
|
|
584
|
+
});
|
|
585
|
+
// 与筛选区块的数据表具有关系的表
|
|
586
|
+
return /*#__PURE__*/React.createElement(SchemaSettings.SelectItem, {
|
|
587
|
+
key: block.uid,
|
|
588
|
+
title: title,
|
|
589
|
+
value: (target === null || target === void 0 ? void 0 : target.field) || '',
|
|
590
|
+
options: [].concat(_toConsumableArray(block.associatedFields.filter(function (field) {
|
|
591
|
+
return field.target === collection.name;
|
|
592
|
+
}).map(function (field) {
|
|
593
|
+
return {
|
|
594
|
+
label: compile(field.uiSchema.title) || field.name,
|
|
595
|
+
value: "".concat(field.name, ".").concat(getTargetKey(field))
|
|
596
|
+
};
|
|
597
|
+
})), [{
|
|
598
|
+
label: t('Unconnected'),
|
|
599
|
+
value: ''
|
|
600
|
+
}]),
|
|
601
|
+
onChange: function onChange(value) {
|
|
602
|
+
var _schema2;
|
|
603
|
+
if (value === '') {
|
|
604
|
+
targets = targets.filter(function (target) {
|
|
605
|
+
return target.uid !== block.uid;
|
|
606
|
+
});
|
|
607
|
+
block.clearFilter(uid);
|
|
608
|
+
} else {
|
|
609
|
+
targets = targets.filter(function (target) {
|
|
610
|
+
return target.uid !== block.uid;
|
|
611
|
+
});
|
|
612
|
+
targets.push({
|
|
613
|
+
uid: block.uid,
|
|
614
|
+
field: value
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
updateFilterTargets(fieldSchema, targets);
|
|
618
|
+
dn.emit('patch', {
|
|
619
|
+
schema: (_schema2 = {}, _defineProperty(_schema2, 'x-uid', uid), _defineProperty(_schema2, 'x-filter-targets', targets), _schema2)
|
|
620
|
+
});
|
|
621
|
+
dn.refresh();
|
|
622
|
+
},
|
|
623
|
+
onClick: function onClick(e) {
|
|
624
|
+
return e.stopPropagation();
|
|
625
|
+
},
|
|
626
|
+
onMouseEnter: onHover,
|
|
627
|
+
onMouseLeave: onLeave
|
|
628
|
+
});
|
|
629
|
+
});
|
|
630
|
+
return /*#__PURE__*/React.createElement(SchemaSettings.SubMenu, {
|
|
631
|
+
title: t('Connect data blocks')
|
|
632
|
+
}, Content.length ? Content : /*#__PURE__*/React.createElement(Empty, {
|
|
633
|
+
style: {
|
|
634
|
+
width: 160,
|
|
635
|
+
padding: '0 1em'
|
|
636
|
+
},
|
|
637
|
+
description: emptyDescription,
|
|
638
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
639
|
+
}));
|
|
640
|
+
};
|
|
605
641
|
SchemaSettings.SelectItem = function (props) {
|
|
606
642
|
var title = props.title,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
643
|
+
options = props.options,
|
|
644
|
+
value = props.value,
|
|
645
|
+
_onChange = props.onChange,
|
|
646
|
+
openOnHover = props.openOnHover,
|
|
647
|
+
_onClick = props.onClick,
|
|
648
|
+
others = _objectWithoutProperties(props, _excluded3);
|
|
649
|
+
var _useState3 = useState(false),
|
|
650
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
651
|
+
open = _useState4[0],
|
|
652
|
+
setOpen = _useState4[1];
|
|
653
|
+
var onClick = function onClick() {
|
|
654
|
+
setOpen(false);
|
|
655
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
656
|
+
args[_key] = arguments[_key];
|
|
657
|
+
}
|
|
658
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick.apply(void 0, args);
|
|
659
|
+
};
|
|
660
|
+
// 鼠标 hover 时,打开下拉框
|
|
661
|
+
var moreProps = openOnHover ? {
|
|
662
|
+
onMouseEnter: useCallback(function () {
|
|
663
|
+
return setOpen(true);
|
|
664
|
+
}, []),
|
|
665
|
+
open: open
|
|
666
|
+
} : {};
|
|
612
667
|
return /*#__PURE__*/React.createElement(SchemaSettings.Item, _objectSpread({}, others), /*#__PURE__*/React.createElement("div", {
|
|
613
668
|
style: {
|
|
614
669
|
alignItems: 'center',
|
|
615
670
|
display: 'flex',
|
|
616
671
|
justifyContent: 'space-between'
|
|
617
672
|
}
|
|
618
|
-
}, title, /*#__PURE__*/React.createElement(Select, {
|
|
673
|
+
}, title, /*#__PURE__*/React.createElement(Select, _objectSpread({
|
|
619
674
|
bordered: false,
|
|
620
675
|
defaultValue: value,
|
|
621
|
-
onChange: onChange
|
|
676
|
+
onChange: function onChange() {
|
|
677
|
+
return setOpen(false), _onChange.apply(void 0, arguments);
|
|
678
|
+
},
|
|
622
679
|
options: options,
|
|
623
680
|
style: {
|
|
624
681
|
textAlign: 'right',
|
|
625
682
|
minWidth: 100
|
|
626
|
-
}
|
|
627
|
-
|
|
683
|
+
},
|
|
684
|
+
onClick: onClick
|
|
685
|
+
}, moreProps))));
|
|
628
686
|
};
|
|
629
|
-
|
|
630
687
|
SchemaSettings.CascaderItem = function (props) {
|
|
631
688
|
var title = props.title,
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
689
|
+
options = props.options,
|
|
690
|
+
value = props.value,
|
|
691
|
+
onChange = props.onChange,
|
|
692
|
+
others = _objectWithoutProperties(props, _excluded4);
|
|
637
693
|
return /*#__PURE__*/React.createElement(SchemaSettings.Item, _objectSpread({}, others), /*#__PURE__*/React.createElement("div", {
|
|
638
694
|
style: {
|
|
639
695
|
alignItems: 'center',
|
|
@@ -651,17 +707,14 @@ SchemaSettings.CascaderItem = function (props) {
|
|
|
651
707
|
}
|
|
652
708
|
})));
|
|
653
709
|
};
|
|
654
|
-
|
|
655
710
|
SchemaSettings.SwitchItem = function (props) {
|
|
656
711
|
var title = props.title,
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
setChecked = _useState4[1];
|
|
664
|
-
|
|
712
|
+
onChange = props.onChange,
|
|
713
|
+
others = _objectWithoutProperties(props, _excluded5);
|
|
714
|
+
var _useState5 = useState(!!props.checked),
|
|
715
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
716
|
+
checked = _useState6[0],
|
|
717
|
+
setChecked = _useState6[1];
|
|
665
718
|
return /*#__PURE__*/React.createElement(SchemaSettings.Item, _objectSpread(_objectSpread({}, others), {}, {
|
|
666
719
|
onClick: function onClick() {
|
|
667
720
|
onChange === null || onChange === void 0 ? void 0 : onChange(!checked);
|
|
@@ -681,18 +734,14 @@ SchemaSettings.SwitchItem = function (props) {
|
|
|
681
734
|
}
|
|
682
735
|
})));
|
|
683
736
|
};
|
|
684
|
-
|
|
685
737
|
SchemaSettings.PopupItem = function (props) {
|
|
686
738
|
var schema = props.schema,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
setVisible = _useState6[1];
|
|
693
|
-
|
|
739
|
+
others = _objectWithoutProperties(props, _excluded6);
|
|
740
|
+
var _useState7 = useState(false),
|
|
741
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
742
|
+
visible = _useState8[0],
|
|
743
|
+
setVisible = _useState8[1];
|
|
694
744
|
var ctx = useContext(SchemaSettingsContext);
|
|
695
|
-
var actx = useActionContext();
|
|
696
745
|
return /*#__PURE__*/React.createElement(ActionContext.Provider, {
|
|
697
746
|
value: {
|
|
698
747
|
visible: visible,
|
|
@@ -710,36 +759,29 @@ SchemaSettings.PopupItem = function (props) {
|
|
|
710
759
|
}, schema)
|
|
711
760
|
}));
|
|
712
761
|
};
|
|
713
|
-
|
|
714
762
|
SchemaSettings.ActionModalItem = /*#__PURE__*/React.memo(function (props) {
|
|
715
763
|
var title = props.title,
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
var _useTranslation4 = useTranslation(),
|
|
735
|
-
t = _useTranslation4.t;
|
|
736
|
-
|
|
764
|
+
onSubmit = props.onSubmit,
|
|
765
|
+
initialValues = props.initialValues,
|
|
766
|
+
initialSchema = props.initialSchema,
|
|
767
|
+
schema = props.schema,
|
|
768
|
+
modalTip = props.modalTip,
|
|
769
|
+
components = props.components,
|
|
770
|
+
others = _objectWithoutProperties(props, _excluded7);
|
|
771
|
+
var _useState9 = useState(false),
|
|
772
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
773
|
+
visible = _useState10[0],
|
|
774
|
+
setVisible = _useState10[1];
|
|
775
|
+
var _useState11 = useState(props.uid),
|
|
776
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
777
|
+
schemaUid = _useState12[0],
|
|
778
|
+
setSchemaUid = _useState12[1];
|
|
779
|
+
var _useTranslation5 = useTranslation(),
|
|
780
|
+
t = _useTranslation5.t;
|
|
737
781
|
var fieldSchema = useFieldSchema();
|
|
738
782
|
var ctx = useContext(SchemaSettingsContext);
|
|
739
|
-
|
|
740
783
|
var _useSchemaSettings4 = useSchemaSettings(),
|
|
741
|
-
|
|
742
|
-
|
|
784
|
+
dn = _useSchemaSettings4.dn;
|
|
743
785
|
var compile = useCompile();
|
|
744
786
|
var api = useAPIClient();
|
|
745
787
|
var form = useMemo(function () {
|
|
@@ -748,77 +790,61 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
748
790
|
values: cloneDeep(initialValues)
|
|
749
791
|
});
|
|
750
792
|
}, []);
|
|
751
|
-
|
|
752
793
|
var cancelHandler = function cancelHandler() {
|
|
753
794
|
setVisible(false);
|
|
754
795
|
};
|
|
755
|
-
|
|
756
796
|
var submitHandler = /*#__PURE__*/function () {
|
|
757
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
758
|
-
return
|
|
759
|
-
while (1) {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
case 4:
|
|
770
|
-
case "end":
|
|
771
|
-
return _context7.stop();
|
|
772
|
-
}
|
|
797
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
798
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
799
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
800
|
+
case 0:
|
|
801
|
+
_context7.next = 2;
|
|
802
|
+
return form.submit();
|
|
803
|
+
case 2:
|
|
804
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(cloneDeep(form.values));
|
|
805
|
+
setVisible(false);
|
|
806
|
+
case 4:
|
|
807
|
+
case "end":
|
|
808
|
+
return _context7.stop();
|
|
773
809
|
}
|
|
774
810
|
}, _callee7);
|
|
775
811
|
}));
|
|
776
|
-
|
|
777
812
|
return function submitHandler() {
|
|
778
813
|
return _ref.apply(this, arguments);
|
|
779
814
|
};
|
|
780
815
|
}();
|
|
781
|
-
|
|
782
816
|
var openAssignedFieldValueHandler = /*#__PURE__*/function () {
|
|
783
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
|
784
|
-
return
|
|
785
|
-
while (1) {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
fieldSchema
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
setVisible(true);
|
|
808
|
-
|
|
809
|
-
case 8:
|
|
810
|
-
case "end":
|
|
811
|
-
return _context8.stop();
|
|
812
|
-
}
|
|
817
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
818
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
819
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
820
|
+
case 0:
|
|
821
|
+
if (!(!schemaUid && (initialSchema === null || initialSchema === void 0 ? void 0 : initialSchema['x-uid']))) {
|
|
822
|
+
_context8.next = 6;
|
|
823
|
+
break;
|
|
824
|
+
}
|
|
825
|
+
fieldSchema['x-action-settings'].schemaUid = initialSchema['x-uid'];
|
|
826
|
+
dn.emit('patch', {
|
|
827
|
+
schema: fieldSchema
|
|
828
|
+
});
|
|
829
|
+
_context8.next = 5;
|
|
830
|
+
return api.resource('uiSchemas').insert({
|
|
831
|
+
values: initialSchema
|
|
832
|
+
});
|
|
833
|
+
case 5:
|
|
834
|
+
setSchemaUid(initialSchema['x-uid']);
|
|
835
|
+
case 6:
|
|
836
|
+
ctx.setVisible(false);
|
|
837
|
+
setVisible(true);
|
|
838
|
+
case 8:
|
|
839
|
+
case "end":
|
|
840
|
+
return _context8.stop();
|
|
813
841
|
}
|
|
814
842
|
}, _callee8);
|
|
815
843
|
}));
|
|
816
|
-
|
|
817
844
|
return function openAssignedFieldValueHandler() {
|
|
818
845
|
return _ref2.apply(this, arguments);
|
|
819
846
|
};
|
|
820
847
|
}();
|
|
821
|
-
|
|
822
848
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SchemaSettings.Item, _objectSpread(_objectSpread({}, others), {}, {
|
|
823
849
|
onClick: openAssignedFieldValueHandler,
|
|
824
850
|
onKeyDown: function onKeyDown(e) {
|
|
@@ -859,105 +885,94 @@ SchemaSettings.ActionModalItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
859
885
|
schema: schema
|
|
860
886
|
}))))), document.body));
|
|
861
887
|
});
|
|
862
|
-
|
|
863
888
|
SchemaSettings.ModalItem = function (props) {
|
|
864
889
|
var hidden = props.hidden,
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
890
|
+
title = props.title,
|
|
891
|
+
components = props.components,
|
|
892
|
+
scope = props.scope,
|
|
893
|
+
effects = props.effects,
|
|
894
|
+
schema = props.schema,
|
|
895
|
+
onSubmit = props.onSubmit,
|
|
896
|
+
asyncGetInitialValues = props.asyncGetInitialValues,
|
|
897
|
+
initialValues = props.initialValues,
|
|
898
|
+
_props$width = props.width,
|
|
899
|
+
width = _props$width === void 0 ? 'fit-content' : _props$width,
|
|
900
|
+
others = _objectWithoutProperties(props, _excluded8);
|
|
876
901
|
var options = useContext(SchemaOptionsContext);
|
|
877
902
|
var cm = useContext(CollectionManagerContext);
|
|
878
|
-
|
|
903
|
+
var apiClient = useAPIClient();
|
|
879
904
|
if (hidden) {
|
|
880
905
|
return null;
|
|
881
906
|
}
|
|
882
|
-
|
|
883
907
|
return /*#__PURE__*/React.createElement(SchemaSettings.Item, _objectSpread(_objectSpread({}, others), {}, {
|
|
884
908
|
onClick: function () {
|
|
885
|
-
var
|
|
909
|
+
var _onClick6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
886
910
|
var values;
|
|
887
|
-
return
|
|
888
|
-
while (1) {
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
_context9.next = 6;
|
|
893
|
-
break;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
_context9.next = 3;
|
|
897
|
-
return asyncGetInitialValues();
|
|
898
|
-
|
|
899
|
-
case 3:
|
|
900
|
-
_context9.t0 = _context9.sent;
|
|
901
|
-
_context9.next = 7;
|
|
911
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
912
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
913
|
+
case 0:
|
|
914
|
+
if (!asyncGetInitialValues) {
|
|
915
|
+
_context9.next = 6;
|
|
902
916
|
break;
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
917
|
+
}
|
|
918
|
+
_context9.next = 3;
|
|
919
|
+
return asyncGetInitialValues();
|
|
920
|
+
case 3:
|
|
921
|
+
_context9.t0 = _context9.sent;
|
|
922
|
+
_context9.next = 7;
|
|
923
|
+
break;
|
|
924
|
+
case 6:
|
|
925
|
+
_context9.t0 = initialValues;
|
|
926
|
+
case 7:
|
|
927
|
+
values = _context9.t0;
|
|
928
|
+
FormDialog({
|
|
929
|
+
title: schema.title || title,
|
|
930
|
+
width: width
|
|
931
|
+
}, function () {
|
|
932
|
+
return /*#__PURE__*/React.createElement(CollectionManagerContext.Provider, {
|
|
933
|
+
value: cm
|
|
934
|
+
}, /*#__PURE__*/React.createElement(SchemaComponentOptions, {
|
|
935
|
+
scope: options.scope,
|
|
936
|
+
components: options.components
|
|
937
|
+
}, /*#__PURE__*/React.createElement(FormLayout, {
|
|
938
|
+
layout: 'vertical',
|
|
939
|
+
style: {
|
|
940
|
+
minWidth: 520
|
|
941
|
+
}
|
|
942
|
+
}, /*#__PURE__*/React.createElement(APIClientProvider, {
|
|
943
|
+
apiClient: apiClient
|
|
944
|
+
}, /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
945
|
+
components: components,
|
|
946
|
+
scope: scope,
|
|
947
|
+
schema: schema
|
|
948
|
+
})))));
|
|
949
|
+
}).open({
|
|
950
|
+
initialValues: values,
|
|
951
|
+
effects: effects
|
|
952
|
+
}).then(function (values) {
|
|
953
|
+
onSubmit(values);
|
|
954
|
+
});
|
|
955
|
+
case 9:
|
|
956
|
+
case "end":
|
|
957
|
+
return _context9.stop();
|
|
936
958
|
}
|
|
937
959
|
}, _callee9);
|
|
938
960
|
}));
|
|
939
|
-
|
|
940
961
|
function onClick() {
|
|
941
|
-
return
|
|
962
|
+
return _onClick6.apply(this, arguments);
|
|
942
963
|
}
|
|
943
|
-
|
|
944
964
|
return onClick;
|
|
945
965
|
}()
|
|
946
966
|
}), props.children || props.title);
|
|
947
967
|
};
|
|
948
|
-
|
|
949
968
|
SchemaSettings.BlockTitleItem = function () {
|
|
950
969
|
var _fieldSchema$xCompon;
|
|
951
|
-
|
|
952
970
|
var field = useField();
|
|
953
971
|
var fieldSchema = useFieldSchema();
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
var _useTranslation5 = useTranslation(),
|
|
959
|
-
t = _useTranslation5.t;
|
|
960
|
-
|
|
972
|
+
var _useDesignable2 = useDesignable(),
|
|
973
|
+
dn = _useDesignable2.dn;
|
|
974
|
+
var _useTranslation6 = useTranslation(),
|
|
975
|
+
t = _useTranslation6.t;
|
|
961
976
|
return /*#__PURE__*/React.createElement(SchemaSettings.ModalItem, {
|
|
962
977
|
title: t('Edit block title'),
|
|
963
978
|
schema: {
|
|
@@ -974,35 +989,109 @@ SchemaSettings.BlockTitleItem = function () {
|
|
|
974
989
|
}
|
|
975
990
|
},
|
|
976
991
|
onSubmit: function onSubmit(_ref3) {
|
|
977
|
-
var
|
|
978
|
-
|
|
992
|
+
var _schema3;
|
|
979
993
|
var title = _ref3.title;
|
|
980
994
|
var componentProps = fieldSchema['x-component-props'] || {};
|
|
981
995
|
componentProps.title = title;
|
|
982
996
|
fieldSchema['x-component-props'] = componentProps;
|
|
983
997
|
field.componentProps.title = title;
|
|
984
998
|
dn.emit('patch', {
|
|
985
|
-
schema: (
|
|
999
|
+
schema: (_schema3 = {}, _defineProperty(_schema3, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema3, 'x-component-props', fieldSchema['x-component-props']), _schema3)
|
|
986
1000
|
});
|
|
987
1001
|
dn.refresh();
|
|
988
1002
|
}
|
|
989
1003
|
});
|
|
990
1004
|
};
|
|
991
|
-
|
|
1005
|
+
SchemaSettings.DefaultSortingRules = function (props) {
|
|
1006
|
+
var sort = props.sort,
|
|
1007
|
+
sortFields = props.sortFields,
|
|
1008
|
+
onSubmit = props.onSubmit;
|
|
1009
|
+
var _useTranslation7 = useTranslation(),
|
|
1010
|
+
t = _useTranslation7.t;
|
|
1011
|
+
return /*#__PURE__*/React.createElement(SchemaSettings.ModalItem, {
|
|
1012
|
+
title: t('Set default sorting rules'),
|
|
1013
|
+
components: {
|
|
1014
|
+
ArrayItems: ArrayItems
|
|
1015
|
+
},
|
|
1016
|
+
schema: {
|
|
1017
|
+
type: 'object',
|
|
1018
|
+
title: t('Set default sorting rules'),
|
|
1019
|
+
properties: {
|
|
1020
|
+
sort: {
|
|
1021
|
+
type: 'array',
|
|
1022
|
+
default: sort,
|
|
1023
|
+
'x-component': 'ArrayItems',
|
|
1024
|
+
'x-decorator': 'FormItem',
|
|
1025
|
+
items: {
|
|
1026
|
+
type: 'object',
|
|
1027
|
+
properties: {
|
|
1028
|
+
space: {
|
|
1029
|
+
type: 'void',
|
|
1030
|
+
'x-component': 'Space',
|
|
1031
|
+
properties: {
|
|
1032
|
+
sort: {
|
|
1033
|
+
type: 'void',
|
|
1034
|
+
'x-decorator': 'FormItem',
|
|
1035
|
+
'x-component': 'ArrayItems.SortHandle'
|
|
1036
|
+
},
|
|
1037
|
+
field: {
|
|
1038
|
+
type: 'string',
|
|
1039
|
+
enum: sortFields,
|
|
1040
|
+
'x-decorator': 'FormItem',
|
|
1041
|
+
'x-component': 'Select',
|
|
1042
|
+
'x-component-props': {
|
|
1043
|
+
style: {
|
|
1044
|
+
width: 260
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
direction: {
|
|
1049
|
+
type: 'string',
|
|
1050
|
+
'x-decorator': 'FormItem',
|
|
1051
|
+
'x-component': 'Radio.Group',
|
|
1052
|
+
'x-component-props': {
|
|
1053
|
+
optionType: 'button'
|
|
1054
|
+
},
|
|
1055
|
+
enum: [{
|
|
1056
|
+
label: t('ASC'),
|
|
1057
|
+
value: 'asc'
|
|
1058
|
+
}, {
|
|
1059
|
+
label: t('DESC'),
|
|
1060
|
+
value: 'desc'
|
|
1061
|
+
}]
|
|
1062
|
+
},
|
|
1063
|
+
remove: {
|
|
1064
|
+
type: 'void',
|
|
1065
|
+
'x-decorator': 'FormItem',
|
|
1066
|
+
'x-component': 'ArrayItems.Remove'
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
properties: {
|
|
1073
|
+
add: {
|
|
1074
|
+
type: 'void',
|
|
1075
|
+
title: t('Add sort field'),
|
|
1076
|
+
'x-component': 'ArrayItems.Addition'
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
onSubmit: onSubmit
|
|
1083
|
+
});
|
|
1084
|
+
};
|
|
992
1085
|
SchemaSettings.LinkageRules = function (props) {
|
|
993
1086
|
var collectionName = props.collectionName;
|
|
994
1087
|
var fieldSchema = useFieldSchema();
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
var _useTranslation6 = useTranslation(),
|
|
1000
|
-
t = _useTranslation6.t;
|
|
1001
|
-
|
|
1088
|
+
var _useDesignable3 = useDesignable(),
|
|
1089
|
+
dn = _useDesignable3.dn;
|
|
1090
|
+
var _useTranslation8 = useTranslation(),
|
|
1091
|
+
t = _useTranslation8.t;
|
|
1002
1092
|
var _useSchemaTemplateMan4 = useSchemaTemplateManager(),
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
var type = fieldSchema['x-component'] === 'Action' ? 'button' : 'field';
|
|
1093
|
+
getTemplateById = _useSchemaTemplateMan4.getTemplateById;
|
|
1094
|
+
var type = ['Action', 'Action.Link'].includes(fieldSchema['x-component']) ? 'button' : 'field';
|
|
1006
1095
|
var gridSchema = findGridSchema(fieldSchema) || fieldSchema;
|
|
1007
1096
|
return /*#__PURE__*/React.createElement(SchemaSettings.ModalItem, {
|
|
1008
1097
|
title: t('Linkage rules'),
|
|
@@ -1010,7 +1099,7 @@ SchemaSettings.LinkageRules = function (props) {
|
|
|
1010
1099
|
ArrayCollapse: ArrayCollapse,
|
|
1011
1100
|
FormLayout: FormLayout
|
|
1012
1101
|
},
|
|
1013
|
-
width:
|
|
1102
|
+
width: 770,
|
|
1014
1103
|
schema: {
|
|
1015
1104
|
type: 'object',
|
|
1016
1105
|
title: t('Linkage rules'),
|
|
@@ -1019,7 +1108,7 @@ SchemaSettings.LinkageRules = function (props) {
|
|
|
1019
1108
|
'x-component': FormLinkageRules,
|
|
1020
1109
|
'x-component-props': {
|
|
1021
1110
|
useProps: function useProps() {
|
|
1022
|
-
var options =
|
|
1111
|
+
var options = useLinkageCollectionFilterOptions(collectionName);
|
|
1023
1112
|
return {
|
|
1024
1113
|
options: options,
|
|
1025
1114
|
defaultValues: (gridSchema === null || gridSchema === void 0 ? void 0 : gridSchema['x-linkage-rules']) || (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema['x-linkage-rules']),
|
|
@@ -1034,10 +1123,8 @@ SchemaSettings.LinkageRules = function (props) {
|
|
|
1034
1123
|
},
|
|
1035
1124
|
onSubmit: function onSubmit(v) {
|
|
1036
1125
|
var rules = [];
|
|
1037
|
-
|
|
1038
1126
|
var _iterator = _createForOfIteratorHelper(v.fieldReaction.rules),
|
|
1039
|
-
|
|
1040
|
-
|
|
1127
|
+
_step;
|
|
1041
1128
|
try {
|
|
1042
1129
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1043
1130
|
var rule = _step.value;
|
|
@@ -1048,12 +1135,9 @@ SchemaSettings.LinkageRules = function (props) {
|
|
|
1048
1135
|
} finally {
|
|
1049
1136
|
_iterator.f();
|
|
1050
1137
|
}
|
|
1051
|
-
|
|
1052
1138
|
var templateId = gridSchema['x-component'] === 'BlockTemplate' && gridSchema['x-component-props'].templateId;
|
|
1053
1139
|
var uid = templateId && getTemplateById(templateId).uid || gridSchema['x-uid'];
|
|
1054
|
-
|
|
1055
1140
|
var schema = _defineProperty({}, 'x-uid', uid);
|
|
1056
|
-
|
|
1057
1141
|
gridSchema['x-linkage-rules'] = rules;
|
|
1058
1142
|
schema['x-linkage-rules'] = rules;
|
|
1059
1143
|
dn.emit('patch', {
|
|
@@ -1063,17 +1147,67 @@ SchemaSettings.LinkageRules = function (props) {
|
|
|
1063
1147
|
}
|
|
1064
1148
|
});
|
|
1065
1149
|
};
|
|
1066
|
-
|
|
1150
|
+
export var useDataTemplates = function useDataTemplates() {
|
|
1151
|
+
var fieldSchema = useFieldSchema();
|
|
1152
|
+
var formSchema = findFormBlock(fieldSchema) || fieldSchema;
|
|
1153
|
+
return {
|
|
1154
|
+
templateData: _.cloneDeep(formSchema === null || formSchema === void 0 ? void 0 : formSchema['x-data-templates'])
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
SchemaSettings.DataTemplates = function (props) {
|
|
1158
|
+
var collectionName = props.collectionName;
|
|
1159
|
+
var fieldSchema = useFieldSchema();
|
|
1160
|
+
var _useDesignable4 = useDesignable(),
|
|
1161
|
+
dn = _useDesignable4.dn;
|
|
1162
|
+
var _useTranslation9 = useTranslation(),
|
|
1163
|
+
t = _useTranslation9.t;
|
|
1164
|
+
var formSchema = findFormBlock(fieldSchema) || fieldSchema;
|
|
1165
|
+
var _useDataTemplates = useDataTemplates(),
|
|
1166
|
+
templateData = _useDataTemplates.templateData;
|
|
1167
|
+
return /*#__PURE__*/React.createElement(SchemaSettings.ModalItem, {
|
|
1168
|
+
title: t('Form data templates'),
|
|
1169
|
+
components: {
|
|
1170
|
+
ArrayCollapse: ArrayCollapse,
|
|
1171
|
+
FormLayout: FormLayout
|
|
1172
|
+
},
|
|
1173
|
+
width: 770,
|
|
1174
|
+
schema: {
|
|
1175
|
+
type: 'object',
|
|
1176
|
+
title: t('Form data templates'),
|
|
1177
|
+
properties: {
|
|
1178
|
+
fieldReaction: {
|
|
1179
|
+
'x-component': FormDataTemplates,
|
|
1180
|
+
'x-component-props': {
|
|
1181
|
+
useProps: function useProps() {
|
|
1182
|
+
return {
|
|
1183
|
+
defaultValues: templateData,
|
|
1184
|
+
collectionName: collectionName
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
onSubmit: function onSubmit(v) {
|
|
1192
|
+
var _schema5;
|
|
1193
|
+
var data = v.fieldReaction || {};
|
|
1194
|
+
var schema = (_schema5 = {}, _defineProperty(_schema5, 'x-uid', formSchema['x-uid']), _defineProperty(_schema5, 'x-data-templates', data), _schema5);
|
|
1195
|
+
formSchema['x-data-templates'] = data;
|
|
1196
|
+
dn.emit('patch', {
|
|
1197
|
+
schema: schema
|
|
1198
|
+
});
|
|
1199
|
+
dn.refresh();
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
};
|
|
1067
1203
|
SchemaSettings.EnableChildCollections = function (props) {
|
|
1068
1204
|
var collectionName = props.collectionName;
|
|
1069
1205
|
var fieldSchema = useFieldSchema();
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
var
|
|
1075
|
-
t = _useTranslation7.t;
|
|
1076
|
-
|
|
1206
|
+
var _useDesignable5 = useDesignable(),
|
|
1207
|
+
dn = _useDesignable5.dn;
|
|
1208
|
+
var _useTranslation10 = useTranslation(),
|
|
1209
|
+
t = _useTranslation10.t;
|
|
1210
|
+
var allowAddToCurrent = fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema['x-allow-add-to-current'];
|
|
1077
1211
|
return /*#__PURE__*/React.createElement(SchemaSettings.ModalItem, {
|
|
1078
1212
|
title: t('Enable child collections'),
|
|
1079
1213
|
components: {
|
|
@@ -1095,15 +1229,21 @@ SchemaSettings.EnableChildCollections = function (props) {
|
|
|
1095
1229
|
};
|
|
1096
1230
|
}
|
|
1097
1231
|
}
|
|
1232
|
+
},
|
|
1233
|
+
allowAddToCurrent: {
|
|
1234
|
+
type: 'boolean',
|
|
1235
|
+
'x-content': "{{t('Allow adding records to the current collection')}}",
|
|
1236
|
+
'x-decorator': 'FormItem',
|
|
1237
|
+
'x-component': 'Checkbox',
|
|
1238
|
+
default: allowAddToCurrent === undefined ? true : allowAddToCurrent
|
|
1098
1239
|
}
|
|
1099
1240
|
}
|
|
1100
1241
|
},
|
|
1101
1242
|
onSubmit: function onSubmit(v) {
|
|
1243
|
+
console.log(v);
|
|
1102
1244
|
var enableChildren = [];
|
|
1103
|
-
|
|
1104
1245
|
var _iterator2 = _createForOfIteratorHelper(v.enableChildren.childrenCollections),
|
|
1105
|
-
|
|
1106
|
-
|
|
1246
|
+
_step2;
|
|
1107
1247
|
try {
|
|
1108
1248
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
1109
1249
|
var item = _step2.value;
|
|
@@ -1114,13 +1254,20 @@ SchemaSettings.EnableChildCollections = function (props) {
|
|
|
1114
1254
|
} finally {
|
|
1115
1255
|
_iterator2.f();
|
|
1116
1256
|
}
|
|
1117
|
-
|
|
1118
1257
|
var uid = fieldSchema['x-uid'];
|
|
1119
|
-
|
|
1120
1258
|
var schema = _defineProperty({}, 'x-uid', uid);
|
|
1121
|
-
|
|
1122
1259
|
fieldSchema['x-enable-children'] = enableChildren;
|
|
1260
|
+
fieldSchema['x-allow-add-to-current'] = v.allowAddToCurrent;
|
|
1261
|
+
fieldSchema['x-component-props'] = {
|
|
1262
|
+
openMode: 'drawer',
|
|
1263
|
+
component: 'CreateRecordAction'
|
|
1264
|
+
};
|
|
1123
1265
|
schema['x-enable-children'] = enableChildren;
|
|
1266
|
+
schema['x-allow-add-to-current'] = v.allowAddToCurrent;
|
|
1267
|
+
schema['x-component-props'] = {
|
|
1268
|
+
openMode: 'drawer',
|
|
1269
|
+
component: 'CreateRecordAction'
|
|
1270
|
+
};
|
|
1124
1271
|
dn.emit('patch', {
|
|
1125
1272
|
schema: schema
|
|
1126
1273
|
});
|