@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,70 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.useTableColumnInitializerFields = exports.useRemoveGridFormItem = exports.useRecordCollectionDataSourceItems = exports.useInheritsTableColumnInitializerFields = exports.useInheritsFormItemInitializerFields = exports.useFormItemInitializerFields = exports.useCustomFormItemInitializerFields = exports.useCustomBulkEditFormItemInitializerFields = exports.useCurrentSchema = exports.useCollectionDataSourceItems = exports.useAssociatedTableColumnInitializerFields = exports.useAssociatedFormItemInitializerFields = exports.removeTableColumn = exports.removeGridFormItem = exports.itemsMerge = exports.gridRowColWrap = exports.findTableColumn = exports.createTableSelectorSchema = exports.createTableBlockSchema = exports.createReadPrettyFormBlockSchema = exports.createKanbanBlockSchema = exports.createFormBlockSchema = exports.createDetailsBlockSchema = exports.createCalendarBlockSchema = void 0;
|
|
9
|
-
|
|
6
|
+
exports.useTableColumnInitializerFields = exports.useRemoveGridFormItem = exports.useRecordCollectionDataSourceItems = exports.useInheritsTableColumnInitializerFields = exports.useInheritsFormItemInitializerFields = exports.useFormItemInitializerFields = exports.useFilterInheritsFormItemInitializerFields = exports.useFilterFormItemInitializerFields = exports.useFilterAssociatedFormItemInitializerFields = exports.useCustomFormItemInitializerFields = exports.useCustomBulkEditFormItemInitializerFields = exports.useCurrentSchema = exports.useCollectionDataSourceItems = exports.useAssociatedTableColumnInitializerFields = exports.useAssociatedFormItemInitializerFields = exports.removeTableColumn = exports.removeGridFormItem = exports.itemsMerge = exports.gridRowColWrap = exports.findTableColumn = exports.createTableSelectorSchema = exports.createTableBlockSchema = exports.createReadPrettyFormBlockSchema = exports.createKanbanBlockSchema = exports.createGanttBlockSchema = exports.createFormBlockSchema = exports.createFilterFormBlockSchema = exports.createDetailsBlockSchema = exports.createCollapseBlockSchema = exports.createCalendarBlockSchema = void 0;
|
|
10
7
|
var _react = require("@formily/react");
|
|
11
|
-
|
|
12
8
|
var _shared = require("@formily/shared");
|
|
13
|
-
|
|
14
9
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
10
|
var _reactI18next = require("react-i18next");
|
|
17
|
-
|
|
18
11
|
var _ = require("../");
|
|
19
|
-
|
|
20
12
|
var _collectionManager = require("../collection-manager");
|
|
21
|
-
|
|
13
|
+
var _utils = require("../filter-provider/utils");
|
|
22
14
|
var _schemaComponent = require("../schema-component");
|
|
23
|
-
|
|
24
15
|
var _schemaTemplates = require("../schema-templates");
|
|
25
|
-
|
|
26
16
|
var _SelectCollection = require("./SelectCollection");
|
|
27
|
-
|
|
28
17
|
var _excluded = ["formItemInitializers", "actionInitializers", "collection", "association", "resource", "template"],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
_excluded2 = ["formItemInitializers", "actionInitializers", "collection", "resource", "association", "action", "template"],
|
|
19
|
+
_excluded3 = ["formItemInitializers", "actionInitializers", "collection", "resource", "association", "action", "template"],
|
|
20
|
+
_excluded4 = ["formItemInitializers", "actionInitializers", "collection", "association", "resource", "template"],
|
|
21
|
+
_excluded5 = ["collection", "resource", "rowKey", "tableActionInitializers", "tableColumnInitializers", "tableActionColumnInitializers", "tableBlockProvider", "disableTemplate", "TableBlockDesigner", "blockType", "pageSize"],
|
|
22
|
+
_excluded6 = ["collection", "resource", "rowKey"],
|
|
23
|
+
_excluded7 = ["collection", "resource", "fieldNames"],
|
|
24
|
+
_excluded8 = ["collection", "resource", "fieldNames"],
|
|
25
|
+
_excluded9 = ["collection", "resource", "groupField"];
|
|
36
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
-
|
|
38
27
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
-
|
|
28
|
+
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); }
|
|
40
29
|
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; }
|
|
41
|
-
|
|
42
30
|
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; }
|
|
43
|
-
|
|
44
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; }
|
|
45
|
-
|
|
46
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; }
|
|
47
|
-
|
|
48
33
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
49
|
-
|
|
50
34
|
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."); }
|
|
51
|
-
|
|
52
|
-
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); }
|
|
53
|
-
|
|
54
|
-
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; }
|
|
55
|
-
|
|
56
|
-
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; }
|
|
57
|
-
|
|
35
|
+
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; } }
|
|
58
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
|
-
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
|
|
37
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
38
|
+
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."); }
|
|
39
|
+
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); }
|
|
40
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
41
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
42
|
+
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; }
|
|
43
|
+
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; }
|
|
44
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
45
|
+
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); }
|
|
46
|
+
var itemsMerge = function itemsMerge(items1) {
|
|
63
47
|
return items1;
|
|
64
48
|
};
|
|
65
|
-
|
|
66
49
|
exports.itemsMerge = itemsMerge;
|
|
67
|
-
|
|
68
50
|
var gridRowColWrap = function gridRowColWrap(schema) {
|
|
69
51
|
return {
|
|
70
52
|
type: 'void',
|
|
@@ -76,15 +58,11 @@ var gridRowColWrap = function gridRowColWrap(schema) {
|
|
|
76
58
|
})
|
|
77
59
|
};
|
|
78
60
|
};
|
|
79
|
-
|
|
80
61
|
exports.gridRowColWrap = gridRowColWrap;
|
|
81
|
-
|
|
82
62
|
var removeTableColumn = function removeTableColumn(schema, cb) {
|
|
83
63
|
cb(schema.parent);
|
|
84
64
|
};
|
|
85
|
-
|
|
86
65
|
exports.removeTableColumn = removeTableColumn;
|
|
87
|
-
|
|
88
66
|
var removeGridFormItem = function removeGridFormItem(schema, cb) {
|
|
89
67
|
cb(schema, {
|
|
90
68
|
removeParentsIfNoChildren: true,
|
|
@@ -93,14 +71,11 @@ var removeGridFormItem = function removeGridFormItem(schema, cb) {
|
|
|
93
71
|
}
|
|
94
72
|
});
|
|
95
73
|
};
|
|
96
|
-
|
|
97
74
|
exports.removeGridFormItem = removeGridFormItem;
|
|
98
|
-
|
|
99
75
|
var useRemoveGridFormItem = function useRemoveGridFormItem() {
|
|
100
76
|
var form = (0, _react.useForm)();
|
|
101
77
|
return function (schema, cb) {
|
|
102
78
|
var _form$values;
|
|
103
|
-
|
|
104
79
|
cb(schema, {
|
|
105
80
|
removeParentsIfNoChildren: true,
|
|
106
81
|
breakRemoveOn: {
|
|
@@ -110,48 +85,38 @@ var useRemoveGridFormItem = function useRemoveGridFormItem() {
|
|
|
110
85
|
(_form$values = form.values) === null || _form$values === void 0 ? true : delete _form$values[schema.name];
|
|
111
86
|
};
|
|
112
87
|
};
|
|
113
|
-
|
|
114
88
|
exports.useRemoveGridFormItem = useRemoveGridFormItem;
|
|
115
|
-
|
|
116
89
|
var findTableColumn = function findTableColumn(schema, key, action) {
|
|
117
90
|
var deepth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
118
91
|
return schema.reduceProperties(function (buf, s) {
|
|
119
92
|
if (s[key] === action) {
|
|
120
93
|
return s;
|
|
121
94
|
}
|
|
122
|
-
|
|
123
95
|
var c = s.reduceProperties(function (buf, s) {
|
|
124
96
|
if (s[key] === action) {
|
|
125
97
|
return s;
|
|
126
98
|
}
|
|
127
|
-
|
|
128
99
|
return buf;
|
|
129
100
|
});
|
|
130
|
-
|
|
131
101
|
if (c) {
|
|
132
102
|
return c;
|
|
133
103
|
}
|
|
134
|
-
|
|
135
104
|
return buf;
|
|
136
105
|
});
|
|
137
106
|
};
|
|
138
|
-
|
|
139
107
|
exports.findTableColumn = findTableColumn;
|
|
140
|
-
|
|
141
108
|
var useTableColumnInitializerFields = function useTableColumnInitializerFields() {
|
|
142
109
|
var _useCollection = (0, _collectionManager.useCollection)(),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
110
|
+
name = _useCollection.name,
|
|
111
|
+
_useCollection$curren = _useCollection.currentFields,
|
|
112
|
+
currentFields = _useCollection$curren === void 0 ? [] : _useCollection$curren;
|
|
147
113
|
var _useCollectionManager = (0, _collectionManager.useCollectionManager)(),
|
|
148
|
-
|
|
149
|
-
|
|
114
|
+
getInterface = _useCollectionManager.getInterface,
|
|
115
|
+
getCollection = _useCollectionManager.getCollection;
|
|
150
116
|
return currentFields.filter(function (field) {
|
|
151
|
-
return (field === null || field === void 0 ? void 0 : field.interface) && (field === null || field === void 0 ? void 0 : field.interface) !== 'subTable' && !(field === null || field === void 0 ? void 0 : field.isForeignKey);
|
|
117
|
+
return (field === null || field === void 0 ? void 0 : field.interface) && (field === null || field === void 0 ? void 0 : field.interface) !== 'subTable' && !(field === null || field === void 0 ? void 0 : field.isForeignKey) && !(field === null || field === void 0 ? void 0 : field.treeChildren);
|
|
152
118
|
}).map(function (field) {
|
|
153
119
|
var _field$uiSchema;
|
|
154
|
-
|
|
155
120
|
var interfaceConfig = getInterface(field.interface);
|
|
156
121
|
var schema = {
|
|
157
122
|
name: field.name,
|
|
@@ -159,8 +124,8 @@ var useTableColumnInitializerFields = function useTableColumnInitializerFields()
|
|
|
159
124
|
'x-component': 'CollectionField',
|
|
160
125
|
'x-read-pretty': true,
|
|
161
126
|
'x-component-props': {}
|
|
162
|
-
};
|
|
163
|
-
|
|
127
|
+
};
|
|
128
|
+
// interfaceConfig?.schemaInitialize?.(schema, { field, readPretty: true, block: 'Table' });
|
|
164
129
|
return {
|
|
165
130
|
type: 'item',
|
|
166
131
|
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema.title) || field.name,
|
|
@@ -169,11 +134,11 @@ var useTableColumnInitializerFields = function useTableColumnInitializerFields()
|
|
|
169
134
|
remove: removeTableColumn,
|
|
170
135
|
schemaInitialize: function schemaInitialize(s) {
|
|
171
136
|
var _interfaceConfig$sche;
|
|
172
|
-
|
|
173
137
|
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche === void 0 ? void 0 : _interfaceConfig$sche.call(interfaceConfig, s, {
|
|
174
138
|
field: field,
|
|
175
139
|
readPretty: true,
|
|
176
|
-
block: 'Table'
|
|
140
|
+
block: 'Table',
|
|
141
|
+
targetCollection: getCollection(field.target)
|
|
177
142
|
});
|
|
178
143
|
},
|
|
179
144
|
field: field,
|
|
@@ -181,34 +146,31 @@ var useTableColumnInitializerFields = function useTableColumnInitializerFields()
|
|
|
181
146
|
};
|
|
182
147
|
});
|
|
183
148
|
};
|
|
184
|
-
|
|
185
149
|
exports.useTableColumnInitializerFields = useTableColumnInitializerFields;
|
|
186
|
-
|
|
187
150
|
var useAssociatedTableColumnInitializerFields = function useAssociatedTableColumnInitializerFields() {
|
|
188
151
|
var _fields$filter;
|
|
189
|
-
|
|
190
152
|
var _useCollection2 = (0, _collectionManager.useCollection)(),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
153
|
+
name = _useCollection2.name,
|
|
154
|
+
fields = _useCollection2.fields;
|
|
194
155
|
var _useCollectionManager2 = (0, _collectionManager.useCollectionManager)(),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
156
|
+
getInterface = _useCollectionManager2.getInterface,
|
|
157
|
+
getCollectionFields = _useCollectionManager2.getCollectionFields,
|
|
158
|
+
getCollection = _useCollectionManager2.getCollection;
|
|
198
159
|
var groups = fields === null || fields === void 0 ? void 0 : (_fields$filter = fields.filter(function (field) {
|
|
199
160
|
return ['o2o', 'oho', 'obo', 'm2o'].includes(field.interface);
|
|
200
161
|
})) === null || _fields$filter === void 0 ? void 0 : _fields$filter.map(function (field) {
|
|
201
162
|
var _subFields$filter, _field$uiSchema2;
|
|
202
|
-
|
|
203
163
|
var subFields = getCollectionFields(field.target);
|
|
204
|
-
var items = subFields
|
|
205
|
-
|
|
206
|
-
===
|
|
164
|
+
var items = subFields
|
|
165
|
+
// ?.filter((subField) => subField?.interface && !['o2o', 'oho', 'obo', 'o2m', 'm2o', 'subTable', 'linkTo'].includes(subField?.interface))
|
|
166
|
+
=== null || subFields
|
|
167
|
+
// ?.filter((subField) => subField?.interface && !['o2o', 'oho', 'obo', 'o2m', 'm2o', 'subTable', 'linkTo'].includes(subField?.interface))
|
|
168
|
+
=== void 0 ? void 0 : (_subFields$filter = subFields
|
|
169
|
+
// ?.filter((subField) => subField?.interface && !['o2o', 'oho', 'obo', 'o2m', 'm2o', 'subTable', 'linkTo'].includes(subField?.interface))
|
|
207
170
|
.filter(function (subField) {
|
|
208
|
-
return (subField === null || subField === void 0 ? void 0 : subField.interface) && !['subTable'].includes(subField === null || subField === void 0 ? void 0 : subField.interface);
|
|
171
|
+
return (subField === null || subField === void 0 ? void 0 : subField.interface) && !['subTable'].includes(subField === null || subField === void 0 ? void 0 : subField.interface) && !(subField === null || subField === void 0 ? void 0 : subField.treeChildren);
|
|
209
172
|
})) === null || _subFields$filter === void 0 ? void 0 : _subFields$filter.map(function (subField) {
|
|
210
173
|
var _subField$uiSchema;
|
|
211
|
-
|
|
212
174
|
var interfaceConfig = getInterface(subField.interface);
|
|
213
175
|
var schema = {
|
|
214
176
|
// type: 'string',
|
|
@@ -227,11 +189,11 @@ var useAssociatedTableColumnInitializerFields = function useAssociatedTableColum
|
|
|
227
189
|
remove: removeTableColumn,
|
|
228
190
|
schemaInitialize: function schemaInitialize(s) {
|
|
229
191
|
var _interfaceConfig$sche2;
|
|
230
|
-
|
|
231
192
|
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche2 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche2 === void 0 ? void 0 : _interfaceConfig$sche2.call(interfaceConfig, s, {
|
|
232
193
|
field: subField,
|
|
233
194
|
readPretty: true,
|
|
234
|
-
block: 'Table'
|
|
195
|
+
block: 'Table',
|
|
196
|
+
targetCollection: getCollection(field.target)
|
|
235
197
|
});
|
|
236
198
|
},
|
|
237
199
|
field: subField,
|
|
@@ -246,19 +208,15 @@ var useAssociatedTableColumnInitializerFields = function useAssociatedTableColum
|
|
|
246
208
|
});
|
|
247
209
|
return groups;
|
|
248
210
|
};
|
|
249
|
-
|
|
250
211
|
exports.useAssociatedTableColumnInitializerFields = useAssociatedTableColumnInitializerFields;
|
|
251
|
-
|
|
252
212
|
var useInheritsTableColumnInitializerFields = function useInheritsTableColumnInitializerFields() {
|
|
253
213
|
var _useCollection3 = (0, _collectionManager.useCollection)(),
|
|
254
|
-
|
|
255
|
-
|
|
214
|
+
name = _useCollection3.name;
|
|
256
215
|
var _useCollectionManager3 = (0, _collectionManager.useCollectionManager)(),
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
216
|
+
getInterface = _useCollectionManager3.getInterface,
|
|
217
|
+
getInheritCollections = _useCollectionManager3.getInheritCollections,
|
|
218
|
+
getCollection = _useCollectionManager3.getCollection,
|
|
219
|
+
getParentCollectionFields = _useCollectionManager3.getParentCollectionFields;
|
|
262
220
|
var inherits = getInheritCollections(name);
|
|
263
221
|
return inherits === null || inherits === void 0 ? void 0 : inherits.map(function (v) {
|
|
264
222
|
var fields = getParentCollectionFields(v, name);
|
|
@@ -267,7 +225,6 @@ var useInheritsTableColumnInitializerFields = function useInheritsTableColumnIni
|
|
|
267
225
|
return field === null || field === void 0 ? void 0 : field.interface;
|
|
268
226
|
}).map(function (k) {
|
|
269
227
|
var _k$uiSchema;
|
|
270
|
-
|
|
271
228
|
var interfaceConfig = getInterface(k.interface);
|
|
272
229
|
var schema = {
|
|
273
230
|
name: "".concat(k.name),
|
|
@@ -284,11 +241,11 @@ var useInheritsTableColumnInitializerFields = function useInheritsTableColumnIni
|
|
|
284
241
|
remove: removeTableColumn,
|
|
285
242
|
schemaInitialize: function schemaInitialize(s) {
|
|
286
243
|
var _interfaceConfig$sche3;
|
|
287
|
-
|
|
288
244
|
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche3 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche3 === void 0 ? void 0 : _interfaceConfig$sche3.call(interfaceConfig, s, {
|
|
289
245
|
field: k,
|
|
290
246
|
readPretty: true,
|
|
291
|
-
block: 'Table'
|
|
247
|
+
block: 'Table',
|
|
248
|
+
targetCollection: getCollection(k === null || k === void 0 ? void 0 : k.target)
|
|
292
249
|
});
|
|
293
250
|
},
|
|
294
251
|
field: k,
|
|
@@ -297,50 +254,44 @@ var useInheritsTableColumnInitializerFields = function useInheritsTableColumnIni
|
|
|
297
254
|
}));
|
|
298
255
|
});
|
|
299
256
|
};
|
|
300
|
-
|
|
301
257
|
exports.useInheritsTableColumnInitializerFields = useInheritsTableColumnInitializerFields;
|
|
302
|
-
|
|
303
258
|
var useFormItemInitializerFields = function useFormItemInitializerFields(options) {
|
|
304
|
-
var
|
|
305
|
-
|
|
259
|
+
var _currentFields$filter;
|
|
306
260
|
var _useCollection4 = (0, _collectionManager.useCollection)(),
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
261
|
+
name = _useCollection4.name,
|
|
262
|
+
currentFields = _useCollection4.currentFields,
|
|
263
|
+
template = _useCollection4.template;
|
|
310
264
|
var _useCollectionManager4 = (0, _collectionManager.useCollectionManager)(),
|
|
311
|
-
|
|
312
|
-
|
|
265
|
+
getInterface = _useCollectionManager4.getInterface,
|
|
266
|
+
getCollection = _useCollectionManager4.getCollection;
|
|
313
267
|
var form = (0, _react.useForm)();
|
|
314
|
-
|
|
315
268
|
var _ref2 = options || {},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
var actionCtx = (0, _schemaComponent.useActionContext)();
|
|
322
|
-
var action = actionCtx === null || actionCtx === void 0 ? void 0 : (_actionCtx$fieldSchem = actionCtx.fieldSchema) === null || _actionCtx$fieldSchem === void 0 ? void 0 : _actionCtx$fieldSchem['x-action'];
|
|
323
|
-
|
|
269
|
+
_ref2$readPretty = _ref2.readPretty,
|
|
270
|
+
readPretty = _ref2$readPretty === void 0 ? form.readPretty : _ref2$readPretty,
|
|
271
|
+
_ref2$block = _ref2.block,
|
|
272
|
+
block = _ref2$block === void 0 ? 'Form' : _ref2$block;
|
|
324
273
|
var _useActionContext = (0, _schemaComponent.useActionContext)(),
|
|
325
|
-
|
|
326
|
-
|
|
274
|
+
snapshot = _useActionContext.snapshot,
|
|
275
|
+
fieldSchema = _useActionContext.fieldSchema;
|
|
276
|
+
var action = fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema['x-action'];
|
|
327
277
|
return currentFields === null || currentFields === void 0 ? void 0 : (_currentFields$filter = currentFields.filter(function (field) {
|
|
328
|
-
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : field.isForeignKey);
|
|
278
|
+
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : field.isForeignKey) && !(field === null || field === void 0 ? void 0 : field.treeChildren);
|
|
329
279
|
})) === null || _currentFields$filter === void 0 ? void 0 : _currentFields$filter.map(function (field) {
|
|
330
280
|
var _field$uiSchema3, _field$uiSchema4;
|
|
331
|
-
|
|
332
281
|
var interfaceConfig = getInterface(field.interface);
|
|
282
|
+
var targetCollection = getCollection(field.target);
|
|
283
|
+
var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
|
|
333
284
|
var schema = {
|
|
334
285
|
type: 'string',
|
|
335
286
|
name: field.name,
|
|
336
287
|
'x-designer': 'FormItem.Designer',
|
|
337
|
-
'x-component':
|
|
288
|
+
'x-component': component,
|
|
338
289
|
'x-decorator': 'FormItem',
|
|
339
290
|
'x-collection-field': "".concat(name, ".").concat(field.name),
|
|
340
291
|
'x-component-props': {},
|
|
341
292
|
'x-read-pretty': field === null || field === void 0 ? void 0 : (_field$uiSchema3 = field.uiSchema) === null || _field$uiSchema3 === void 0 ? void 0 : _field$uiSchema3['x-read-pretty']
|
|
342
|
-
};
|
|
343
|
-
|
|
293
|
+
};
|
|
294
|
+
// interfaceConfig?.schemaInitialize?.(schema, { field, block: 'Form', readPretty: form.readPretty });
|
|
344
295
|
var resultItem = {
|
|
345
296
|
type: 'item',
|
|
346
297
|
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema4 = field.uiSchema) === null || _field$uiSchema4 === void 0 ? void 0 : _field$uiSchema4.title) || field.name,
|
|
@@ -348,61 +299,122 @@ var useFormItemInitializerFields = function useFormItemInitializerFields(options
|
|
|
348
299
|
remove: removeGridFormItem,
|
|
349
300
|
schemaInitialize: function schemaInitialize(s) {
|
|
350
301
|
var _interfaceConfig$sche4;
|
|
351
|
-
|
|
352
302
|
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche4 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche4 === void 0 ? void 0 : _interfaceConfig$sche4.call(interfaceConfig, s, {
|
|
353
303
|
field: field,
|
|
354
304
|
block: block,
|
|
355
305
|
readPretty: readPretty,
|
|
356
|
-
action: action
|
|
306
|
+
action: action,
|
|
307
|
+
targetCollection: targetCollection
|
|
357
308
|
});
|
|
358
309
|
},
|
|
359
310
|
schema: schema
|
|
360
311
|
};
|
|
361
|
-
|
|
362
312
|
if (block == 'Kanban') {
|
|
363
313
|
resultItem['find'] = function (schema, key, action) {
|
|
364
314
|
var s = findSchema(schema, 'x-component', block);
|
|
365
315
|
return findSchema(s, key, action);
|
|
366
316
|
};
|
|
367
317
|
}
|
|
368
|
-
|
|
369
318
|
return resultItem;
|
|
370
319
|
});
|
|
371
320
|
};
|
|
372
|
-
|
|
321
|
+
// 筛选表单相关
|
|
373
322
|
exports.useFormItemInitializerFields = useFormItemInitializerFields;
|
|
374
|
-
|
|
375
|
-
var
|
|
376
|
-
var _fields$filter2;
|
|
377
|
-
|
|
323
|
+
var useFilterFormItemInitializerFields = function useFilterFormItemInitializerFields(options) {
|
|
324
|
+
var _currentFields$filter2;
|
|
378
325
|
var _useCollection5 = (0, _collectionManager.useCollection)(),
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
326
|
+
name = _useCollection5.name,
|
|
327
|
+
currentFields = _useCollection5.currentFields;
|
|
382
328
|
var _useCollectionManager5 = (0, _collectionManager.useCollectionManager)(),
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
329
|
+
getInterface = _useCollectionManager5.getInterface,
|
|
330
|
+
getCollection = _useCollectionManager5.getCollection;
|
|
386
331
|
var form = (0, _react.useForm)();
|
|
387
|
-
|
|
388
332
|
var _ref3 = options || {},
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
333
|
+
_ref3$readPretty = _ref3.readPretty,
|
|
334
|
+
readPretty = _ref3$readPretty === void 0 ? form.readPretty : _ref3$readPretty,
|
|
335
|
+
_ref3$block = _ref3.block,
|
|
336
|
+
block = _ref3$block === void 0 ? 'FilterForm' : _ref3$block;
|
|
337
|
+
var _useActionContext2 = (0, _schemaComponent.useActionContext)(),
|
|
338
|
+
snapshot = _useActionContext2.snapshot,
|
|
339
|
+
fieldSchema = _useActionContext2.fieldSchema;
|
|
340
|
+
var action = fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema['x-action'];
|
|
341
|
+
return currentFields === null || currentFields === void 0 ? void 0 : (_currentFields$filter2 = currentFields.filter(function (field) {
|
|
342
|
+
var _getInterface;
|
|
343
|
+
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : field.isForeignKey) && ((_getInterface = getInterface(field.interface)) === null || _getInterface === void 0 ? void 0 : _getInterface.filterable);
|
|
344
|
+
})) === null || _currentFields$filter2 === void 0 ? void 0 : _currentFields$filter2.map(function (field) {
|
|
345
|
+
var _field$uiSchema6;
|
|
346
|
+
var interfaceConfig = getInterface(field.interface);
|
|
347
|
+
var targetCollection = getCollection(field.target);
|
|
348
|
+
var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
|
|
349
|
+
var schema = {
|
|
350
|
+
type: 'string',
|
|
351
|
+
name: field.name,
|
|
352
|
+
required: false,
|
|
353
|
+
'x-designer': 'FormItem.FilterFormDesigner',
|
|
354
|
+
'x-component': component,
|
|
355
|
+
'x-decorator': 'FormItem',
|
|
356
|
+
'x-collection-field': "".concat(name, ".").concat(field.name),
|
|
357
|
+
'x-component-props': {}
|
|
358
|
+
};
|
|
359
|
+
if ((0, _utils.isAssocField)(field)) {
|
|
360
|
+
var _field$uiSchema5;
|
|
361
|
+
schema = {
|
|
362
|
+
type: 'string',
|
|
363
|
+
name: field.name,
|
|
364
|
+
required: false,
|
|
365
|
+
'x-designer': 'AssociationSelect.FilterDesigner',
|
|
366
|
+
'x-component': 'AssociationSelect',
|
|
367
|
+
'x-decorator': 'FormItem',
|
|
368
|
+
'x-collection-field': "".concat(name, ".").concat(field.name),
|
|
369
|
+
'x-component-props': (_field$uiSchema5 = field.uiSchema) === null || _field$uiSchema5 === void 0 ? void 0 : _field$uiSchema5['x-component-props']
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
var resultItem = {
|
|
373
|
+
type: 'item',
|
|
374
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema6 = field.uiSchema) === null || _field$uiSchema6 === void 0 ? void 0 : _field$uiSchema6.title) || field.name,
|
|
375
|
+
component: 'CollectionFieldInitializer',
|
|
376
|
+
remove: removeGridFormItem,
|
|
377
|
+
schemaInitialize: function schemaInitialize(s) {
|
|
378
|
+
var _interfaceConfig$sche5;
|
|
379
|
+
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche5 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche5 === void 0 ? void 0 : _interfaceConfig$sche5.call(interfaceConfig, s, {
|
|
380
|
+
field: field,
|
|
381
|
+
block: block,
|
|
382
|
+
readPretty: readPretty,
|
|
383
|
+
action: action,
|
|
384
|
+
targetCollection: targetCollection
|
|
385
|
+
});
|
|
386
|
+
},
|
|
387
|
+
schema: schema
|
|
388
|
+
};
|
|
389
|
+
return resultItem;
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
exports.useFilterFormItemInitializerFields = useFilterFormItemInitializerFields;
|
|
393
|
+
var useAssociatedFormItemInitializerFields = function useAssociatedFormItemInitializerFields(options) {
|
|
394
|
+
var _fields$filter2;
|
|
395
|
+
var _useCollection6 = (0, _collectionManager.useCollection)(),
|
|
396
|
+
name = _useCollection6.name,
|
|
397
|
+
fields = _useCollection6.fields;
|
|
398
|
+
var _useCollectionManager6 = (0, _collectionManager.useCollectionManager)(),
|
|
399
|
+
getInterface = _useCollectionManager6.getInterface,
|
|
400
|
+
getCollectionFields = _useCollectionManager6.getCollectionFields,
|
|
401
|
+
getCollection = _useCollectionManager6.getCollection;
|
|
402
|
+
var form = (0, _react.useForm)();
|
|
403
|
+
var _ref4 = options || {},
|
|
404
|
+
_ref4$readPretty = _ref4.readPretty,
|
|
405
|
+
readPretty = _ref4$readPretty === void 0 ? form.readPretty : _ref4$readPretty,
|
|
406
|
+
_ref4$block = _ref4.block,
|
|
407
|
+
block = _ref4$block === void 0 ? 'Form' : _ref4$block;
|
|
394
408
|
var interfaces = block === 'Form' ? ['m2o'] : ['o2o', 'oho', 'obo', 'm2o'];
|
|
395
409
|
var groups = fields === null || fields === void 0 ? void 0 : (_fields$filter2 = fields.filter(function (field) {
|
|
396
410
|
return interfaces.includes(field.interface);
|
|
397
411
|
})) === null || _fields$filter2 === void 0 ? void 0 : _fields$filter2.map(function (field) {
|
|
398
|
-
var _subFields$filter2, _field$
|
|
399
|
-
|
|
412
|
+
var _subFields$filter2, _field$uiSchema7;
|
|
400
413
|
var subFields = getCollectionFields(field.target);
|
|
401
414
|
var items = subFields === null || subFields === void 0 ? void 0 : (_subFields$filter2 = subFields.filter(function (subField) {
|
|
402
|
-
return (subField === null || subField === void 0 ? void 0 : subField.interface) && !['subTable'].includes(subField === null || subField === void 0 ? void 0 : subField.interface);
|
|
415
|
+
return (subField === null || subField === void 0 ? void 0 : subField.interface) && !['subTable'].includes(subField === null || subField === void 0 ? void 0 : subField.interface) && !subField.treeChildren;
|
|
403
416
|
})) === null || _subFields$filter2 === void 0 ? void 0 : _subFields$filter2.map(function (subField) {
|
|
404
417
|
var _subField$uiSchema2;
|
|
405
|
-
|
|
406
418
|
var interfaceConfig = getInterface(subField.interface);
|
|
407
419
|
var schema = {
|
|
408
420
|
type: 'string',
|
|
@@ -422,12 +434,12 @@ var useAssociatedFormItemInitializerFields = function useAssociatedFormItemIniti
|
|
|
422
434
|
component: 'CollectionFieldInitializer',
|
|
423
435
|
remove: removeGridFormItem,
|
|
424
436
|
schemaInitialize: function schemaInitialize(s) {
|
|
425
|
-
var _interfaceConfig$
|
|
426
|
-
|
|
427
|
-
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche5 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche5 === void 0 ? void 0 : _interfaceConfig$sche5.call(interfaceConfig, s, {
|
|
437
|
+
var _interfaceConfig$sche6;
|
|
438
|
+
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche6 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche6 === void 0 ? void 0 : _interfaceConfig$sche6.call(interfaceConfig, s, {
|
|
428
439
|
field: subField,
|
|
429
440
|
block: block,
|
|
430
|
-
readPretty: readPretty
|
|
441
|
+
readPretty: readPretty,
|
|
442
|
+
targetCollection: getCollection(field.target)
|
|
431
443
|
});
|
|
432
444
|
},
|
|
433
445
|
schema: schema
|
|
@@ -435,72 +447,118 @@ var useAssociatedFormItemInitializerFields = function useAssociatedFormItemIniti
|
|
|
435
447
|
});
|
|
436
448
|
return {
|
|
437
449
|
type: 'subMenu',
|
|
438
|
-
title: (_field$
|
|
450
|
+
title: (_field$uiSchema7 = field.uiSchema) === null || _field$uiSchema7 === void 0 ? void 0 : _field$uiSchema7.title,
|
|
439
451
|
children: items
|
|
440
452
|
};
|
|
441
453
|
});
|
|
442
454
|
return groups;
|
|
443
455
|
};
|
|
444
|
-
|
|
445
456
|
exports.useAssociatedFormItemInitializerFields = useAssociatedFormItemInitializerFields;
|
|
446
|
-
|
|
457
|
+
var getItem = function getItem(field, schemaName, collectionName, getCollectionFields, processedCollections) {
|
|
458
|
+
var _field$uiSchema9;
|
|
459
|
+
if (field.interface === 'm2o') {
|
|
460
|
+
var _field$uiSchema8;
|
|
461
|
+
if (processedCollections.includes(field.target)) return null;
|
|
462
|
+
var subFields = getCollectionFields(field.target);
|
|
463
|
+
return {
|
|
464
|
+
type: 'subMenu',
|
|
465
|
+
title: (_field$uiSchema8 = field.uiSchema) === null || _field$uiSchema8 === void 0 ? void 0 : _field$uiSchema8.title,
|
|
466
|
+
children: subFields.map(function (subField) {
|
|
467
|
+
return getItem(subField, "".concat(schemaName, ".").concat(subField.name), collectionName, getCollectionFields, [].concat(_toConsumableArray(processedCollections), [field.target]));
|
|
468
|
+
}).filter(Boolean)
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
if ((0, _utils.isAssocField)(field)) return null;
|
|
472
|
+
var schema = {
|
|
473
|
+
type: 'string',
|
|
474
|
+
name: schemaName,
|
|
475
|
+
'x-designer': 'FormItem.FilterFormDesigner',
|
|
476
|
+
'x-designer-props': {
|
|
477
|
+
// 在 useOperatorList 中使用,用于获取对应的操作符列表
|
|
478
|
+
interface: field.interface
|
|
479
|
+
},
|
|
480
|
+
'x-component': 'CollectionField',
|
|
481
|
+
'x-read-pretty': false,
|
|
482
|
+
'x-decorator': 'FormItem',
|
|
483
|
+
'x-collection-field': "".concat(collectionName, ".").concat(schemaName)
|
|
484
|
+
};
|
|
485
|
+
return {
|
|
486
|
+
type: 'item',
|
|
487
|
+
title: ((_field$uiSchema9 = field.uiSchema) === null || _field$uiSchema9 === void 0 ? void 0 : _field$uiSchema9.title) || field.name,
|
|
488
|
+
component: 'CollectionFieldInitializer',
|
|
489
|
+
remove: removeGridFormItem,
|
|
490
|
+
schema: schema
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
// 筛选表单相关
|
|
494
|
+
var useFilterAssociatedFormItemInitializerFields = function useFilterAssociatedFormItemInitializerFields() {
|
|
495
|
+
var _fields$filter3;
|
|
496
|
+
var _useCollection7 = (0, _collectionManager.useCollection)(),
|
|
497
|
+
name = _useCollection7.name,
|
|
498
|
+
fields = _useCollection7.fields;
|
|
499
|
+
var _useCollectionManager7 = (0, _collectionManager.useCollectionManager)(),
|
|
500
|
+
getCollectionFields = _useCollectionManager7.getCollectionFields;
|
|
501
|
+
var interfaces = ['m2o'];
|
|
502
|
+
var groups = fields === null || fields === void 0 ? void 0 : (_fields$filter3 = fields.filter(function (field) {
|
|
503
|
+
return interfaces.includes(field.interface);
|
|
504
|
+
})) === null || _fields$filter3 === void 0 ? void 0 : _fields$filter3.map(function (field) {
|
|
505
|
+
return getItem(field, field.name, name, getCollectionFields, []);
|
|
506
|
+
});
|
|
507
|
+
return groups;
|
|
508
|
+
};
|
|
509
|
+
exports.useFilterAssociatedFormItemInitializerFields = useFilterAssociatedFormItemInitializerFields;
|
|
447
510
|
var useInheritsFormItemInitializerFields = function useInheritsFormItemInitializerFields(options) {
|
|
448
|
-
var
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
511
|
+
var _useCollection8 = (0, _collectionManager.useCollection)(),
|
|
512
|
+
name = _useCollection8.name,
|
|
513
|
+
template = _useCollection8.template;
|
|
514
|
+
var _useCollectionManager8 = (0, _collectionManager.useCollectionManager)(),
|
|
515
|
+
getInterface = _useCollectionManager8.getInterface,
|
|
516
|
+
getInheritCollections = _useCollectionManager8.getInheritCollections,
|
|
517
|
+
getCollection = _useCollectionManager8.getCollection,
|
|
518
|
+
getParentCollectionFields = _useCollectionManager8.getParentCollectionFields;
|
|
457
519
|
var inherits = getInheritCollections(name);
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
snapshot = _useActionContext2.snapshot;
|
|
461
|
-
|
|
520
|
+
var _useActionContext3 = (0, _schemaComponent.useActionContext)(),
|
|
521
|
+
snapshot = _useActionContext3.snapshot;
|
|
462
522
|
return inherits === null || inherits === void 0 ? void 0 : inherits.map(function (v) {
|
|
463
|
-
var _fields$
|
|
464
|
-
|
|
523
|
+
var _fields$filter4;
|
|
465
524
|
var fields = getParentCollectionFields(v, name);
|
|
466
525
|
var form = (0, _react.useForm)();
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
block = _ref4$block === void 0 ? 'Form' : _ref4$block;
|
|
473
|
-
|
|
526
|
+
var _ref5 = options || {},
|
|
527
|
+
_ref5$readPretty = _ref5.readPretty,
|
|
528
|
+
readPretty = _ref5$readPretty === void 0 ? form.readPretty : _ref5$readPretty,
|
|
529
|
+
_ref5$block = _ref5.block,
|
|
530
|
+
block = _ref5$block === void 0 ? 'Form' : _ref5$block;
|
|
474
531
|
var targetCollection = getCollection(v);
|
|
475
|
-
return _defineProperty({}, targetCollection.title, fields === null || fields === void 0 ? void 0 : (_fields$
|
|
532
|
+
return _defineProperty({}, targetCollection.title, fields === null || fields === void 0 ? void 0 : (_fields$filter4 = fields.filter(function (field) {
|
|
476
533
|
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : field.isForeignKey);
|
|
477
|
-
})) === null || _fields$
|
|
478
|
-
var _field$
|
|
479
|
-
|
|
534
|
+
})) === null || _fields$filter4 === void 0 ? void 0 : _fields$filter4.map(function (field) {
|
|
535
|
+
var _field$uiSchema10, _field$uiSchema11, _field$uiSchema12;
|
|
480
536
|
var interfaceConfig = getInterface(field.interface);
|
|
537
|
+
var targetCollection = getCollection(field.target);
|
|
538
|
+
var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
|
|
481
539
|
var schema = {
|
|
482
540
|
type: 'string',
|
|
483
541
|
name: field.name,
|
|
484
|
-
title: (field === null || field === void 0 ? void 0 : (_field$
|
|
542
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema10 = field.uiSchema) === null || _field$uiSchema10 === void 0 ? void 0 : _field$uiSchema10.title) || field.name,
|
|
485
543
|
'x-designer': 'FormItem.Designer',
|
|
486
|
-
'x-component':
|
|
544
|
+
'x-component': component,
|
|
487
545
|
'x-decorator': 'FormItem',
|
|
488
546
|
'x-collection-field': "".concat(name, ".").concat(field.name),
|
|
489
547
|
'x-component-props': {},
|
|
490
|
-
'x-read-pretty': field === null || field === void 0 ? void 0 : (_field$
|
|
548
|
+
'x-read-pretty': field === null || field === void 0 ? void 0 : (_field$uiSchema11 = field.uiSchema) === null || _field$uiSchema11 === void 0 ? void 0 : _field$uiSchema11['x-read-pretty']
|
|
491
549
|
};
|
|
492
550
|
return {
|
|
493
551
|
type: 'item',
|
|
494
|
-
title: (field === null || field === void 0 ? void 0 : (_field$
|
|
552
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema12 = field.uiSchema) === null || _field$uiSchema12 === void 0 ? void 0 : _field$uiSchema12.title) || field.name,
|
|
495
553
|
component: 'CollectionFieldInitializer',
|
|
496
554
|
remove: removeGridFormItem,
|
|
497
555
|
schemaInitialize: function schemaInitialize(s) {
|
|
498
|
-
var _interfaceConfig$
|
|
499
|
-
|
|
500
|
-
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche6 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche6 === void 0 ? void 0 : _interfaceConfig$sche6.call(interfaceConfig, s, {
|
|
556
|
+
var _interfaceConfig$sche7;
|
|
557
|
+
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche7 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche7 === void 0 ? void 0 : _interfaceConfig$sche7.call(interfaceConfig, s, {
|
|
501
558
|
field: field,
|
|
502
559
|
block: block,
|
|
503
|
-
readPretty: readPretty
|
|
560
|
+
readPretty: readPretty,
|
|
561
|
+
targetCollection: targetCollection
|
|
504
562
|
});
|
|
505
563
|
},
|
|
506
564
|
schema: schema
|
|
@@ -508,40 +566,94 @@ var useInheritsFormItemInitializerFields = function useInheritsFormItemInitializ
|
|
|
508
566
|
}));
|
|
509
567
|
});
|
|
510
568
|
};
|
|
511
|
-
|
|
569
|
+
// 筛选表单相关
|
|
512
570
|
exports.useInheritsFormItemInitializerFields = useInheritsFormItemInitializerFields;
|
|
513
|
-
|
|
571
|
+
var useFilterInheritsFormItemInitializerFields = function useFilterInheritsFormItemInitializerFields(options) {
|
|
572
|
+
var _useCollection9 = (0, _collectionManager.useCollection)(),
|
|
573
|
+
name = _useCollection9.name;
|
|
574
|
+
var _useCollectionManager9 = (0, _collectionManager.useCollectionManager)(),
|
|
575
|
+
getInterface = _useCollectionManager9.getInterface,
|
|
576
|
+
getInheritCollections = _useCollectionManager9.getInheritCollections,
|
|
577
|
+
getCollection = _useCollectionManager9.getCollection,
|
|
578
|
+
getParentCollectionFields = _useCollectionManager9.getParentCollectionFields;
|
|
579
|
+
var inherits = getInheritCollections(name);
|
|
580
|
+
var _useActionContext4 = (0, _schemaComponent.useActionContext)(),
|
|
581
|
+
snapshot = _useActionContext4.snapshot;
|
|
582
|
+
return inherits === null || inherits === void 0 ? void 0 : inherits.map(function (v) {
|
|
583
|
+
var _fields$filter5;
|
|
584
|
+
var fields = getParentCollectionFields(v, name);
|
|
585
|
+
var form = (0, _react.useForm)();
|
|
586
|
+
var _ref7 = options || {},
|
|
587
|
+
_ref7$readPretty = _ref7.readPretty,
|
|
588
|
+
readPretty = _ref7$readPretty === void 0 ? form.readPretty : _ref7$readPretty,
|
|
589
|
+
_ref7$block = _ref7.block,
|
|
590
|
+
block = _ref7$block === void 0 ? 'Form' : _ref7$block;
|
|
591
|
+
var targetCollection = getCollection(v);
|
|
592
|
+
return _defineProperty({}, targetCollection.title, fields === null || fields === void 0 ? void 0 : (_fields$filter5 = fields.filter(function (field) {
|
|
593
|
+
var _getInterface2;
|
|
594
|
+
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : field.isForeignKey) && ((_getInterface2 = getInterface(field.interface)) === null || _getInterface2 === void 0 ? void 0 : _getInterface2.filterable);
|
|
595
|
+
})) === null || _fields$filter5 === void 0 ? void 0 : _fields$filter5.map(function (field) {
|
|
596
|
+
var _field$uiSchema13, _field$uiSchema14, _field$uiSchema15;
|
|
597
|
+
var interfaceConfig = getInterface(field.interface);
|
|
598
|
+
var targetCollection = getCollection(field.target);
|
|
599
|
+
var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
|
|
600
|
+
var schema = {
|
|
601
|
+
type: 'string',
|
|
602
|
+
name: field.name,
|
|
603
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema13 = field.uiSchema) === null || _field$uiSchema13 === void 0 ? void 0 : _field$uiSchema13.title) || field.name,
|
|
604
|
+
required: false,
|
|
605
|
+
'x-designer': 'FormItem.FilterFormDesigner',
|
|
606
|
+
'x-component': component,
|
|
607
|
+
'x-decorator': 'FormItem',
|
|
608
|
+
'x-collection-field': "".concat(name, ".").concat(field.name),
|
|
609
|
+
'x-component-props': {},
|
|
610
|
+
'x-read-pretty': field === null || field === void 0 ? void 0 : (_field$uiSchema14 = field.uiSchema) === null || _field$uiSchema14 === void 0 ? void 0 : _field$uiSchema14['x-read-pretty']
|
|
611
|
+
};
|
|
612
|
+
return {
|
|
613
|
+
type: 'item',
|
|
614
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema15 = field.uiSchema) === null || _field$uiSchema15 === void 0 ? void 0 : _field$uiSchema15.title) || field.name,
|
|
615
|
+
component: 'CollectionFieldInitializer',
|
|
616
|
+
remove: removeGridFormItem,
|
|
617
|
+
schemaInitialize: function schemaInitialize(s) {
|
|
618
|
+
var _interfaceConfig$sche8;
|
|
619
|
+
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche8 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche8 === void 0 ? void 0 : _interfaceConfig$sche8.call(interfaceConfig, s, {
|
|
620
|
+
field: field,
|
|
621
|
+
block: block,
|
|
622
|
+
readPretty: readPretty,
|
|
623
|
+
targetCollection: targetCollection
|
|
624
|
+
});
|
|
625
|
+
},
|
|
626
|
+
schema: schema
|
|
627
|
+
};
|
|
628
|
+
}));
|
|
629
|
+
});
|
|
630
|
+
};
|
|
631
|
+
exports.useFilterInheritsFormItemInitializerFields = useFilterInheritsFormItemInitializerFields;
|
|
514
632
|
var useCustomFormItemInitializerFields = function useCustomFormItemInitializerFields(options) {
|
|
515
|
-
var _currentFields$
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
getInterface = _useCollectionManager7.getInterface;
|
|
523
|
-
|
|
633
|
+
var _currentFields$filter3;
|
|
634
|
+
var _useCollection10 = (0, _collectionManager.useCollection)(),
|
|
635
|
+
name = _useCollection10.name,
|
|
636
|
+
currentFields = _useCollection10.currentFields;
|
|
637
|
+
var _useCollectionManager10 = (0, _collectionManager.useCollectionManager)(),
|
|
638
|
+
getInterface = _useCollectionManager10.getInterface,
|
|
639
|
+
getCollection = _useCollectionManager10.getCollection;
|
|
524
640
|
var form = (0, _react.useForm)();
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
block = _ref6$block === void 0 ? 'Form' : _ref6$block;
|
|
531
|
-
|
|
641
|
+
var _ref9 = options || {},
|
|
642
|
+
_ref9$readPretty = _ref9.readPretty,
|
|
643
|
+
readPretty = _ref9$readPretty === void 0 ? form.readPretty : _ref9$readPretty,
|
|
644
|
+
_ref9$block = _ref9.block,
|
|
645
|
+
block = _ref9$block === void 0 ? 'Form' : _ref9$block;
|
|
532
646
|
var remove = useRemoveGridFormItem();
|
|
533
|
-
return currentFields === null || currentFields === void 0 ? void 0 : (_currentFields$
|
|
534
|
-
var _field$
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
var _field$uiSchema10, _field$uiSchema11;
|
|
539
|
-
|
|
647
|
+
return currentFields === null || currentFields === void 0 ? void 0 : (_currentFields$filter3 = currentFields.filter(function (field) {
|
|
648
|
+
var _field$uiSchema16;
|
|
649
|
+
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : (_field$uiSchema16 = field.uiSchema) === null || _field$uiSchema16 === void 0 ? void 0 : _field$uiSchema16['x-read-pretty']) && field.interface !== 'snapshot';
|
|
650
|
+
})) === null || _currentFields$filter3 === void 0 ? void 0 : _currentFields$filter3.map(function (field) {
|
|
651
|
+
var _field$uiSchema17, _field$uiSchema18;
|
|
540
652
|
var interfaceConfig = getInterface(field.interface);
|
|
541
653
|
var schema = {
|
|
542
654
|
type: 'string',
|
|
543
655
|
name: field.name,
|
|
544
|
-
title: (field === null || field === void 0 ? void 0 : (_field$
|
|
656
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema17 = field.uiSchema) === null || _field$uiSchema17 === void 0 ? void 0 : _field$uiSchema17.title) || field.name,
|
|
545
657
|
'x-designer': 'FormItem.Designer',
|
|
546
658
|
'x-component': 'AssignedField',
|
|
547
659
|
'x-decorator': 'FormItem',
|
|
@@ -549,56 +661,48 @@ var useCustomFormItemInitializerFields = function useCustomFormItemInitializerFi
|
|
|
549
661
|
};
|
|
550
662
|
return {
|
|
551
663
|
type: 'item',
|
|
552
|
-
title: (field === null || field === void 0 ? void 0 : (_field$
|
|
664
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema18 = field.uiSchema) === null || _field$uiSchema18 === void 0 ? void 0 : _field$uiSchema18.title) || field.name,
|
|
553
665
|
component: 'CollectionFieldInitializer',
|
|
554
666
|
remove: remove,
|
|
555
667
|
schemaInitialize: function schemaInitialize(s) {
|
|
556
|
-
var _interfaceConfig$
|
|
557
|
-
|
|
558
|
-
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche7 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche7 === void 0 ? void 0 : _interfaceConfig$sche7.call(interfaceConfig, s, {
|
|
668
|
+
var _interfaceConfig$sche9;
|
|
669
|
+
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche9 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche9 === void 0 ? void 0 : _interfaceConfig$sche9.call(interfaceConfig, s, {
|
|
559
670
|
field: field,
|
|
560
671
|
block: block,
|
|
561
|
-
readPretty: readPretty
|
|
672
|
+
readPretty: readPretty,
|
|
673
|
+
targetCollection: getCollection(field.target)
|
|
562
674
|
});
|
|
563
675
|
},
|
|
564
676
|
schema: schema
|
|
565
677
|
};
|
|
566
678
|
});
|
|
567
679
|
};
|
|
568
|
-
|
|
569
680
|
exports.useCustomFormItemInitializerFields = useCustomFormItemInitializerFields;
|
|
570
|
-
|
|
571
681
|
var useCustomBulkEditFormItemInitializerFields = function useCustomBulkEditFormItemInitializerFields(options) {
|
|
572
|
-
var _fields$
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
getInterface = _useCollectionManager8.getInterface;
|
|
580
|
-
|
|
682
|
+
var _fields$filter6;
|
|
683
|
+
var _useCollection11 = (0, _collectionManager.useCollection)(),
|
|
684
|
+
name = _useCollection11.name,
|
|
685
|
+
fields = _useCollection11.fields;
|
|
686
|
+
var _useCollectionManager11 = (0, _collectionManager.useCollectionManager)(),
|
|
687
|
+
getInterface = _useCollectionManager11.getInterface,
|
|
688
|
+
getCollection = _useCollectionManager11.getCollection;
|
|
581
689
|
var form = (0, _react.useForm)();
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
block = _ref7$block === void 0 ? 'Form' : _ref7$block;
|
|
588
|
-
|
|
690
|
+
var _ref10 = options || {},
|
|
691
|
+
_ref10$readPretty = _ref10.readPretty,
|
|
692
|
+
readPretty = _ref10$readPretty === void 0 ? form.readPretty : _ref10$readPretty,
|
|
693
|
+
_ref10$block = _ref10.block,
|
|
694
|
+
block = _ref10$block === void 0 ? 'Form' : _ref10$block;
|
|
589
695
|
var remove = useRemoveGridFormItem();
|
|
590
|
-
return fields === null || fields === void 0 ? void 0 : (_fields$
|
|
591
|
-
var _field$
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
var _field$uiSchema13, _field$uiSchema14;
|
|
596
|
-
|
|
696
|
+
return fields === null || fields === void 0 ? void 0 : (_fields$filter6 = fields.filter(function (field) {
|
|
697
|
+
var _field$uiSchema19;
|
|
698
|
+
return (field === null || field === void 0 ? void 0 : field.interface) && !(field === null || field === void 0 ? void 0 : (_field$uiSchema19 = field.uiSchema) === null || _field$uiSchema19 === void 0 ? void 0 : _field$uiSchema19['x-read-pretty']) && field.interface !== 'snapshot';
|
|
699
|
+
})) === null || _fields$filter6 === void 0 ? void 0 : _fields$filter6.map(function (field) {
|
|
700
|
+
var _field$uiSchema20, _field$uiSchema21;
|
|
597
701
|
var interfaceConfig = getInterface(field.interface);
|
|
598
702
|
var schema = {
|
|
599
703
|
type: 'string',
|
|
600
704
|
name: field.name,
|
|
601
|
-
title: (field === null || field === void 0 ? void 0 : (_field$
|
|
705
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema20 = field.uiSchema) === null || _field$uiSchema20 === void 0 ? void 0 : _field$uiSchema20.title) || field.name,
|
|
602
706
|
'x-designer': 'FormItem.Designer',
|
|
603
707
|
'x-component': 'BulkEditField',
|
|
604
708
|
'x-decorator': 'FormItem',
|
|
@@ -606,73 +710,59 @@ var useCustomBulkEditFormItemInitializerFields = function useCustomBulkEditFormI
|
|
|
606
710
|
};
|
|
607
711
|
return {
|
|
608
712
|
type: 'item',
|
|
609
|
-
title: (field === null || field === void 0 ? void 0 : (_field$
|
|
713
|
+
title: (field === null || field === void 0 ? void 0 : (_field$uiSchema21 = field.uiSchema) === null || _field$uiSchema21 === void 0 ? void 0 : _field$uiSchema21.title) || field.name,
|
|
610
714
|
component: 'CollectionFieldInitializer',
|
|
611
715
|
remove: remove,
|
|
612
716
|
schemaInitialize: function schemaInitialize(s) {
|
|
613
|
-
var _interfaceConfig$
|
|
614
|
-
|
|
615
|
-
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche8 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche8 === void 0 ? void 0 : _interfaceConfig$sche8.call(interfaceConfig, s, {
|
|
717
|
+
var _interfaceConfig$sche10;
|
|
718
|
+
interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche10 = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche10 === void 0 ? void 0 : _interfaceConfig$sche10.call(interfaceConfig, s, {
|
|
616
719
|
field: field,
|
|
617
720
|
block: block,
|
|
618
|
-
readPretty: readPretty
|
|
721
|
+
readPretty: readPretty,
|
|
722
|
+
targetCollection: getCollection(field.target)
|
|
619
723
|
});
|
|
620
724
|
},
|
|
621
725
|
schema: schema
|
|
622
726
|
};
|
|
623
727
|
});
|
|
624
728
|
};
|
|
625
|
-
|
|
626
729
|
exports.useCustomBulkEditFormItemInitializerFields = useCustomBulkEditFormItemInitializerFields;
|
|
627
|
-
|
|
628
730
|
var findSchema = function findSchema(schema, key, action) {
|
|
629
731
|
if (!_react.Schema.isSchemaInstance(schema)) return null;
|
|
630
732
|
return schema.reduceProperties(function (buf, s) {
|
|
631
733
|
if (s[key] === action) {
|
|
632
734
|
return s;
|
|
633
735
|
}
|
|
634
|
-
|
|
635
736
|
var c = findSchema(s, key, action);
|
|
636
|
-
|
|
637
737
|
if (c) {
|
|
638
738
|
return c;
|
|
639
739
|
}
|
|
640
|
-
|
|
641
740
|
return buf;
|
|
642
741
|
});
|
|
643
742
|
};
|
|
644
|
-
|
|
645
743
|
var removeSchema = function removeSchema(schema, cb) {
|
|
646
744
|
return cb(schema);
|
|
647
745
|
};
|
|
648
|
-
|
|
649
746
|
var recursiveParent = function recursiveParent(schema) {
|
|
650
747
|
if (!schema.parent) return null;
|
|
651
748
|
if (schema.parent['x-initializer']) return schema.parent;
|
|
652
749
|
return recursiveParent(schema.parent);
|
|
653
750
|
};
|
|
654
|
-
|
|
655
751
|
var useCurrentSchema = function useCurrentSchema(action, key) {
|
|
656
752
|
var _fieldSchema;
|
|
657
|
-
|
|
658
753
|
var find = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : findSchema;
|
|
659
754
|
var rm = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : removeSchema;
|
|
660
755
|
var fieldSchema = (0, _react.useFieldSchema)();
|
|
661
|
-
|
|
662
756
|
if (!((_fieldSchema = fieldSchema) === null || _fieldSchema === void 0 ? void 0 : _fieldSchema['x-initializer'])) {
|
|
663
757
|
var recursiveInitializerSchema = recursiveParent(fieldSchema);
|
|
664
|
-
|
|
665
758
|
if (recursiveInitializerSchema) {
|
|
666
759
|
fieldSchema = recursiveInitializerSchema;
|
|
667
760
|
}
|
|
668
761
|
}
|
|
669
|
-
|
|
670
762
|
var _useDesignable = (0, _schemaComponent.useDesignable)(),
|
|
671
|
-
|
|
672
|
-
|
|
763
|
+
_remove = _useDesignable.remove;
|
|
673
764
|
var schema = find(fieldSchema, key, action);
|
|
674
765
|
var ctx = (0, _react2.useContext)(_.BlockRequestContext);
|
|
675
|
-
var exists = !!schema;
|
|
676
766
|
return {
|
|
677
767
|
schema: schema,
|
|
678
768
|
exists: !!schema,
|
|
@@ -682,37 +772,28 @@ var useCurrentSchema = function useCurrentSchema(action, key) {
|
|
|
682
772
|
ctx.field.data.activeFields = ctx.field.data.activeFields || new Set();
|
|
683
773
|
ctx.field.data.activeFields.delete(schema.name);
|
|
684
774
|
}
|
|
685
|
-
|
|
686
775
|
schema && rm(schema, _remove);
|
|
687
776
|
}
|
|
688
777
|
};
|
|
689
778
|
};
|
|
690
|
-
|
|
691
779
|
exports.useCurrentSchema = useCurrentSchema;
|
|
692
|
-
|
|
693
780
|
var useRecordCollectionDataSourceItems = function useRecordCollectionDataSourceItems(componentName) {
|
|
694
781
|
var item = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
695
782
|
var collectionName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
696
783
|
var resourceName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
697
|
-
|
|
698
784
|
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
699
|
-
|
|
700
|
-
|
|
785
|
+
t = _useTranslation.t;
|
|
701
786
|
var collection = (0, _collectionManager.useCollection)();
|
|
702
|
-
|
|
703
787
|
var _useSchemaTemplateMan = (0, _schemaTemplates.useSchemaTemplateManager)(),
|
|
704
|
-
|
|
705
|
-
|
|
788
|
+
getTemplatesByCollection = _useSchemaTemplateMan.getTemplatesByCollection;
|
|
706
789
|
var templates = getTemplatesByCollection(collectionName || collection.name).filter(function (template) {
|
|
707
790
|
return componentName && template.componentName === componentName;
|
|
708
791
|
}).filter(function (template) {
|
|
709
792
|
return ['FormItem', 'ReadPrettyFormItem'].includes(componentName) || template.resourceName === resourceName;
|
|
710
793
|
});
|
|
711
|
-
|
|
712
794
|
if (!templates.length) {
|
|
713
795
|
return [];
|
|
714
796
|
}
|
|
715
|
-
|
|
716
797
|
var index = 0;
|
|
717
798
|
return [{
|
|
718
799
|
key: "".concat(collectionName || componentName, "_table_blank"),
|
|
@@ -756,36 +837,27 @@ var useRecordCollectionDataSourceItems = function useRecordCollectionDataSourceI
|
|
|
756
837
|
})
|
|
757
838
|
}];
|
|
758
839
|
};
|
|
759
|
-
|
|
760
840
|
exports.useRecordCollectionDataSourceItems = useRecordCollectionDataSourceItems;
|
|
761
|
-
|
|
762
841
|
var useCollectionDataSourceItems = function useCollectionDataSourceItems(componentName) {
|
|
763
842
|
var _collections$filter;
|
|
764
|
-
|
|
765
843
|
var _useTranslation2 = (0, _reactI18next.useTranslation)(),
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
collections = _useCollectionManager9.collections;
|
|
770
|
-
|
|
844
|
+
t = _useTranslation2.t;
|
|
845
|
+
var _useCollectionManager12 = (0, _collectionManager.useCollectionManager)(),
|
|
846
|
+
collections = _useCollectionManager12.collections;
|
|
771
847
|
var _useSchemaTemplateMan2 = (0, _schemaTemplates.useSchemaTemplateManager)(),
|
|
772
|
-
|
|
773
|
-
|
|
848
|
+
getTemplatesByCollection = _useSchemaTemplateMan2.getTemplatesByCollection;
|
|
774
849
|
var _useState = (0, _react2.useState)([]),
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
850
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
851
|
+
selected = _useState2[0],
|
|
852
|
+
setSelected = _useState2[1];
|
|
779
853
|
var _useState3 = (0, _react2.useState)(null),
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
854
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
855
|
+
value = _useState4[0],
|
|
856
|
+
onChange = _useState4[1];
|
|
784
857
|
var clearKeywords = function clearKeywords() {
|
|
785
858
|
setSelected([]);
|
|
786
859
|
onChange(null);
|
|
787
860
|
};
|
|
788
|
-
|
|
789
861
|
return [{
|
|
790
862
|
key: 'tableBlock',
|
|
791
863
|
type: 'itemGroup',
|
|
@@ -796,13 +868,16 @@ var useCollectionDataSourceItems = function useCollectionDataSourceItems(compone
|
|
|
796
868
|
}),
|
|
797
869
|
children: collections === null || collections === void 0 ? void 0 : (_collections$filter = collections.filter(function (item) {
|
|
798
870
|
var b = !value || selected.includes(item.name);
|
|
799
|
-
|
|
800
871
|
if (item.inherit) {
|
|
801
872
|
return false;
|
|
802
873
|
} else if (item.autoGenId === false && !item.fields.find(function (v) {
|
|
803
874
|
return v.primaryKey;
|
|
804
875
|
})) {
|
|
805
876
|
return false;
|
|
877
|
+
} else if (['Kanban', 'FormItem'].includes(componentName) && item.template === 'view') {
|
|
878
|
+
return false;
|
|
879
|
+
} else if (item.template === 'file' && ['Kanban', 'FormItem', 'Calendar'].includes(componentName)) {
|
|
880
|
+
return false;
|
|
806
881
|
} else {
|
|
807
882
|
return b && !((item === null || item === void 0 ? void 0 : item.isThrough) && (item === null || item === void 0 ? void 0 : item.autoCreate));
|
|
808
883
|
}
|
|
@@ -810,7 +885,6 @@ var useCollectionDataSourceItems = function useCollectionDataSourceItems(compone
|
|
|
810
885
|
var templates = getTemplatesByCollection(item.name).filter(function (template) {
|
|
811
886
|
return componentName && template.componentName === componentName && (!template.resourceName || template.resourceName === item.name);
|
|
812
887
|
});
|
|
813
|
-
|
|
814
888
|
if (!templates.length) {
|
|
815
889
|
return {
|
|
816
890
|
type: 'item',
|
|
@@ -819,7 +893,6 @@ var useCollectionDataSourceItems = function useCollectionDataSourceItems(compone
|
|
|
819
893
|
clearKeywords: clearKeywords
|
|
820
894
|
};
|
|
821
895
|
}
|
|
822
|
-
|
|
823
896
|
return {
|
|
824
897
|
key: "".concat(componentName, "_table_subMenu_").concat(index),
|
|
825
898
|
type: 'subMenu',
|
|
@@ -869,20 +942,18 @@ var useCollectionDataSourceItems = function useCollectionDataSourceItems(compone
|
|
|
869
942
|
})
|
|
870
943
|
}];
|
|
871
944
|
};
|
|
872
|
-
|
|
873
945
|
exports.useCollectionDataSourceItems = useCollectionDataSourceItems;
|
|
874
|
-
|
|
875
946
|
var createDetailsBlockSchema = function createDetailsBlockSchema(options) {
|
|
947
|
+
var _properties3;
|
|
876
948
|
var _options$formItemInit = options.formItemInitializers,
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
949
|
+
formItemInitializers = _options$formItemInit === void 0 ? 'ReadPrettyFormItemInitializers' : _options$formItemInit,
|
|
950
|
+
_options$actionInitia = options.actionInitializers,
|
|
951
|
+
actionInitializers = _options$actionInitia === void 0 ? 'DetailsActionInitializers' : _options$actionInitia,
|
|
952
|
+
collection = options.collection,
|
|
953
|
+
association = options.association,
|
|
954
|
+
resource = options.resource,
|
|
955
|
+
template = options.template,
|
|
956
|
+
others = _objectWithoutProperties(options, _excluded);
|
|
886
957
|
var resourceName = resource || association || collection;
|
|
887
958
|
var schema = {
|
|
888
959
|
type: 'void',
|
|
@@ -902,57 +973,50 @@ var createDetailsBlockSchema = function createDetailsBlockSchema(options) {
|
|
|
902
973
|
'x-component': 'CardItem',
|
|
903
974
|
properties: _defineProperty({}, (0, _shared.uid)(), {
|
|
904
975
|
type: 'void',
|
|
905
|
-
'x-component': '
|
|
976
|
+
'x-component': 'Details',
|
|
906
977
|
'x-read-pretty': true,
|
|
907
978
|
'x-component-props': {
|
|
908
979
|
useProps: '{{ useDetailsBlockProps }}'
|
|
909
980
|
},
|
|
910
|
-
properties: {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
marginBottom: 24
|
|
918
|
-
}
|
|
919
|
-
},
|
|
920
|
-
properties: {}
|
|
921
|
-
},
|
|
922
|
-
grid: template || {
|
|
923
|
-
type: 'void',
|
|
924
|
-
'x-component': 'Grid',
|
|
925
|
-
'x-initializer': formItemInitializers,
|
|
926
|
-
properties: {}
|
|
927
|
-
},
|
|
928
|
-
pagination: {
|
|
929
|
-
type: 'void',
|
|
930
|
-
'x-component': 'Pagination',
|
|
931
|
-
'x-component-props': {
|
|
932
|
-
useProps: '{{ useDetailsPaginationProps }}'
|
|
981
|
+
properties: (_properties3 = {}, _defineProperty(_properties3, (0, _shared.uid)(), {
|
|
982
|
+
type: 'void',
|
|
983
|
+
'x-initializer': actionInitializers,
|
|
984
|
+
'x-component': 'ActionBar',
|
|
985
|
+
'x-component-props': {
|
|
986
|
+
style: {
|
|
987
|
+
marginBottom: 24
|
|
933
988
|
}
|
|
989
|
+
},
|
|
990
|
+
properties: {}
|
|
991
|
+
}), _defineProperty(_properties3, "grid", template || {
|
|
992
|
+
type: 'void',
|
|
993
|
+
'x-component': 'Grid',
|
|
994
|
+
'x-initializer': formItemInitializers,
|
|
995
|
+
properties: {}
|
|
996
|
+
}), _defineProperty(_properties3, "pagination", {
|
|
997
|
+
type: 'void',
|
|
998
|
+
'x-component': 'Pagination',
|
|
999
|
+
'x-component-props': {
|
|
1000
|
+
useProps: '{{ useDetailsPaginationProps }}'
|
|
934
1001
|
}
|
|
935
|
-
}
|
|
1002
|
+
}), _properties3)
|
|
936
1003
|
})
|
|
937
1004
|
};
|
|
938
1005
|
console.log(JSON.stringify(schema, null, 2));
|
|
939
1006
|
return schema;
|
|
940
1007
|
};
|
|
941
|
-
|
|
942
1008
|
exports.createDetailsBlockSchema = createDetailsBlockSchema;
|
|
943
|
-
|
|
944
1009
|
var createFormBlockSchema = function createFormBlockSchema(options) {
|
|
945
1010
|
var _options$formItemInit2 = options.formItemInitializers,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1011
|
+
formItemInitializers = _options$formItemInit2 === void 0 ? 'FormItemInitializers' : _options$formItemInit2,
|
|
1012
|
+
_options$actionInitia2 = options.actionInitializers,
|
|
1013
|
+
actionInitializers = _options$actionInitia2 === void 0 ? 'FormActionInitializers' : _options$actionInitia2,
|
|
1014
|
+
collection = options.collection,
|
|
1015
|
+
resource = options.resource,
|
|
1016
|
+
association = options.association,
|
|
1017
|
+
action = options.action,
|
|
1018
|
+
template = options.template,
|
|
1019
|
+
others = _objectWithoutProperties(options, _excluded2);
|
|
956
1020
|
var resourceName = resource || association || collection;
|
|
957
1021
|
var schema = {
|
|
958
1022
|
type: 'void',
|
|
@@ -965,10 +1029,11 @@ var createFormBlockSchema = function createFormBlockSchema(options) {
|
|
|
965
1029
|
action: action,
|
|
966
1030
|
resource: resourceName,
|
|
967
1031
|
collection: collection,
|
|
968
|
-
association: association
|
|
1032
|
+
association: association
|
|
1033
|
+
// action: 'get',
|
|
969
1034
|
// useParams: '{{ useParamsFromRecord }}',
|
|
970
|
-
|
|
971
1035
|
}),
|
|
1036
|
+
|
|
972
1037
|
'x-designer': 'FormV2.Designer',
|
|
973
1038
|
'x-component': 'CardItem',
|
|
974
1039
|
properties: _defineProperty({}, (0, _shared.uid)(), {
|
|
@@ -999,23 +1064,77 @@ var createFormBlockSchema = function createFormBlockSchema(options) {
|
|
|
999
1064
|
}
|
|
1000
1065
|
})
|
|
1001
1066
|
};
|
|
1002
|
-
console.log(JSON.stringify(schema, null, 2));
|
|
1003
1067
|
return schema;
|
|
1004
1068
|
};
|
|
1005
|
-
|
|
1006
1069
|
exports.createFormBlockSchema = createFormBlockSchema;
|
|
1007
|
-
|
|
1008
|
-
var createReadPrettyFormBlockSchema = function createReadPrettyFormBlockSchema(options) {
|
|
1070
|
+
var createFilterFormBlockSchema = function createFilterFormBlockSchema(options) {
|
|
1009
1071
|
var _options$formItemInit3 = options.formItemInitializers,
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1072
|
+
formItemInitializers = _options$formItemInit3 === void 0 ? 'FilterFormItemInitializers' : _options$formItemInit3,
|
|
1073
|
+
_options$actionInitia3 = options.actionInitializers,
|
|
1074
|
+
actionInitializers = _options$actionInitia3 === void 0 ? 'FilterFormActionInitializers' : _options$actionInitia3,
|
|
1075
|
+
collection = options.collection,
|
|
1076
|
+
resource = options.resource,
|
|
1077
|
+
association = options.association,
|
|
1078
|
+
action = options.action,
|
|
1079
|
+
template = options.template,
|
|
1080
|
+
others = _objectWithoutProperties(options, _excluded3);
|
|
1081
|
+
var resourceName = resource || association || collection;
|
|
1082
|
+
var schema = {
|
|
1083
|
+
type: 'void',
|
|
1084
|
+
'x-decorator': 'FilterFormBlockProvider',
|
|
1085
|
+
'x-decorator-props': _objectSpread(_objectSpread({}, others), {}, {
|
|
1086
|
+
action: action,
|
|
1087
|
+
resource: resourceName,
|
|
1088
|
+
collection: collection,
|
|
1089
|
+
association: association
|
|
1090
|
+
}),
|
|
1091
|
+
'x-designer': 'FormV2.FilterDesigner',
|
|
1092
|
+
'x-component': 'CardItem',
|
|
1093
|
+
// 保存当前筛选区块所能过滤的数据区块
|
|
1094
|
+
'x-filter-targets': [],
|
|
1095
|
+
// 用于存储用户设置的每个字段的运算符,目前仅筛选表单区块支持自定义
|
|
1096
|
+
'x-filter-operators': {},
|
|
1097
|
+
properties: _defineProperty({}, (0, _shared.uid)(), {
|
|
1098
|
+
type: 'void',
|
|
1099
|
+
'x-component': 'FormV2',
|
|
1100
|
+
'x-component-props': {
|
|
1101
|
+
useProps: '{{ useFormBlockProps }}'
|
|
1102
|
+
},
|
|
1103
|
+
properties: {
|
|
1104
|
+
grid: template || {
|
|
1105
|
+
type: 'void',
|
|
1106
|
+
'x-component': 'Grid',
|
|
1107
|
+
'x-initializer': formItemInitializers,
|
|
1108
|
+
properties: {}
|
|
1109
|
+
},
|
|
1110
|
+
actions: {
|
|
1111
|
+
type: 'void',
|
|
1112
|
+
'x-initializer': actionInitializers,
|
|
1113
|
+
'x-component': 'ActionBar',
|
|
1114
|
+
'x-component-props': {
|
|
1115
|
+
layout: 'one-column',
|
|
1116
|
+
style: {
|
|
1117
|
+
float: 'right'
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1120
|
+
properties: {}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
})
|
|
1124
|
+
};
|
|
1125
|
+
return schema;
|
|
1126
|
+
};
|
|
1127
|
+
exports.createFilterFormBlockSchema = createFilterFormBlockSchema;
|
|
1128
|
+
var createReadPrettyFormBlockSchema = function createReadPrettyFormBlockSchema(options) {
|
|
1129
|
+
var _options$formItemInit4 = options.formItemInitializers,
|
|
1130
|
+
formItemInitializers = _options$formItemInit4 === void 0 ? 'ReadPrettyFormItemInitializers' : _options$formItemInit4,
|
|
1131
|
+
_options$actionInitia4 = options.actionInitializers,
|
|
1132
|
+
actionInitializers = _options$actionInitia4 === void 0 ? 'ReadPrettyFormActionInitializers' : _options$actionInitia4,
|
|
1133
|
+
collection = options.collection,
|
|
1134
|
+
association = options.association,
|
|
1135
|
+
resource = options.resource,
|
|
1136
|
+
template = options.template,
|
|
1137
|
+
others = _objectWithoutProperties(options, _excluded4);
|
|
1019
1138
|
var resourceName = resource || association || collection;
|
|
1020
1139
|
var schema = {
|
|
1021
1140
|
type: 'void',
|
|
@@ -1058,24 +1177,25 @@ var createReadPrettyFormBlockSchema = function createReadPrettyFormBlockSchema(o
|
|
|
1058
1177
|
}
|
|
1059
1178
|
}
|
|
1060
1179
|
})
|
|
1061
|
-
};
|
|
1062
|
-
|
|
1180
|
+
};
|
|
1181
|
+
// console.log(JSON.stringify(schema, null, 2));
|
|
1063
1182
|
return schema;
|
|
1064
1183
|
};
|
|
1065
|
-
|
|
1066
1184
|
exports.createReadPrettyFormBlockSchema = createReadPrettyFormBlockSchema;
|
|
1067
|
-
|
|
1068
1185
|
var createTableBlockSchema = function createTableBlockSchema(options) {
|
|
1069
1186
|
var collection = options.collection,
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1187
|
+
resource = options.resource,
|
|
1188
|
+
rowKey = options.rowKey,
|
|
1189
|
+
tableActionInitializers = options.tableActionInitializers,
|
|
1190
|
+
tableColumnInitializers = options.tableColumnInitializers,
|
|
1191
|
+
tableActionColumnInitializers = options.tableActionColumnInitializers,
|
|
1192
|
+
tableBlockProvider = options.tableBlockProvider,
|
|
1193
|
+
disableTemplate = options.disableTemplate,
|
|
1194
|
+
TableBlockDesigner = options.TableBlockDesigner,
|
|
1195
|
+
blockType = options.blockType,
|
|
1196
|
+
_options$pageSize = options.pageSize,
|
|
1197
|
+
pageSize = _options$pageSize === void 0 ? 20 : _options$pageSize,
|
|
1198
|
+
others = _objectWithoutProperties(options, _excluded5);
|
|
1079
1199
|
var schema = {
|
|
1080
1200
|
type: 'void',
|
|
1081
1201
|
'x-decorator': tableBlockProvider !== null && tableBlockProvider !== void 0 ? tableBlockProvider : 'TableBlockProvider',
|
|
@@ -1085,15 +1205,17 @@ var createTableBlockSchema = function createTableBlockSchema(options) {
|
|
|
1085
1205
|
resource: resource || collection,
|
|
1086
1206
|
action: 'list',
|
|
1087
1207
|
params: {
|
|
1088
|
-
pageSize:
|
|
1208
|
+
pageSize: pageSize
|
|
1089
1209
|
},
|
|
1090
1210
|
rowKey: rowKey,
|
|
1091
1211
|
showIndex: true,
|
|
1092
1212
|
dragSort: false,
|
|
1093
|
-
disableTemplate: disableTemplate !== null && disableTemplate !== void 0 ? disableTemplate : false
|
|
1213
|
+
disableTemplate: disableTemplate !== null && disableTemplate !== void 0 ? disableTemplate : false,
|
|
1214
|
+
blockType: blockType
|
|
1094
1215
|
}, others),
|
|
1095
|
-
'x-designer': 'TableBlockDesigner',
|
|
1216
|
+
'x-designer': TableBlockDesigner !== null && TableBlockDesigner !== void 0 ? TableBlockDesigner : 'TableBlockDesigner',
|
|
1096
1217
|
'x-component': 'CardItem',
|
|
1218
|
+
'x-filter-targets': [],
|
|
1097
1219
|
properties: _defineProperty({
|
|
1098
1220
|
actions: {
|
|
1099
1221
|
type: 'void',
|
|
@@ -1140,19 +1262,43 @@ var createTableBlockSchema = function createTableBlockSchema(options) {
|
|
|
1140
1262
|
}
|
|
1141
1263
|
}
|
|
1142
1264
|
})
|
|
1143
|
-
};
|
|
1144
|
-
|
|
1265
|
+
};
|
|
1266
|
+
// console.log(JSON.stringify(schema, null, 2));
|
|
1145
1267
|
return schema;
|
|
1146
1268
|
};
|
|
1147
|
-
|
|
1148
1269
|
exports.createTableBlockSchema = createTableBlockSchema;
|
|
1149
|
-
|
|
1270
|
+
var createCollapseBlockSchema = function createCollapseBlockSchema(options) {
|
|
1271
|
+
var collection = options.collection,
|
|
1272
|
+
blockType = options.blockType;
|
|
1273
|
+
var schema = {
|
|
1274
|
+
type: 'void',
|
|
1275
|
+
'x-decorator': 'AssociationFilter.Provider',
|
|
1276
|
+
'x-decorator-props': {
|
|
1277
|
+
collection: collection,
|
|
1278
|
+
blockType: blockType,
|
|
1279
|
+
associationFilterStyle: {
|
|
1280
|
+
width: '100%'
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
'x-designer': 'AssociationFilter.BlockDesigner',
|
|
1284
|
+
'x-component': 'CardItem',
|
|
1285
|
+
'x-filter-targets': [],
|
|
1286
|
+
properties: _defineProperty({}, (0, _shared.uid)(), {
|
|
1287
|
+
type: 'void',
|
|
1288
|
+
'x-action': 'associateFilter',
|
|
1289
|
+
'x-initializer': 'AssociationFilter.FilterBlockInitializer',
|
|
1290
|
+
'x-component': 'AssociationFilter',
|
|
1291
|
+
properties: {}
|
|
1292
|
+
})
|
|
1293
|
+
};
|
|
1294
|
+
return schema;
|
|
1295
|
+
};
|
|
1296
|
+
exports.createCollapseBlockSchema = createCollapseBlockSchema;
|
|
1150
1297
|
var createTableSelectorSchema = function createTableSelectorSchema(options) {
|
|
1151
1298
|
var collection = options.collection,
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1299
|
+
resource = options.resource,
|
|
1300
|
+
rowKey = options.rowKey,
|
|
1301
|
+
others = _objectWithoutProperties(options, _excluded6);
|
|
1156
1302
|
var schema = {
|
|
1157
1303
|
type: 'void',
|
|
1158
1304
|
'x-acl-action': "".concat(resource || collection, ":list"),
|
|
@@ -1197,15 +1343,12 @@ var createTableSelectorSchema = function createTableSelectorSchema(options) {
|
|
|
1197
1343
|
console.log(JSON.stringify(schema, null, 2));
|
|
1198
1344
|
return schema;
|
|
1199
1345
|
};
|
|
1200
|
-
|
|
1201
1346
|
exports.createTableSelectorSchema = createTableSelectorSchema;
|
|
1202
|
-
|
|
1203
1347
|
var createCalendarBlockSchema = function createCalendarBlockSchema(options) {
|
|
1204
1348
|
var collection = options.collection,
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1349
|
+
resource = options.resource,
|
|
1350
|
+
fieldNames = options.fieldNames,
|
|
1351
|
+
others = _objectWithoutProperties(options, _excluded7);
|
|
1209
1352
|
var schema = {
|
|
1210
1353
|
type: 'void',
|
|
1211
1354
|
'x-acl-action': "".concat(resource || collection, ":list"),
|
|
@@ -1258,6 +1401,9 @@ var createCalendarBlockSchema = function createCalendarBlockSchema(options) {
|
|
|
1258
1401
|
'x-component': 'Tabs',
|
|
1259
1402
|
'x-component-props': {},
|
|
1260
1403
|
'x-initializer': 'TabPaneInitializers',
|
|
1404
|
+
'x-initializer-props': {
|
|
1405
|
+
gridInitializer: 'RecordBlockInitializers'
|
|
1406
|
+
},
|
|
1261
1407
|
properties: {
|
|
1262
1408
|
tab1: {
|
|
1263
1409
|
type: 'void',
|
|
@@ -1289,15 +1435,140 @@ var createCalendarBlockSchema = function createCalendarBlockSchema(options) {
|
|
|
1289
1435
|
console.log(JSON.stringify(schema, null, 2));
|
|
1290
1436
|
return schema;
|
|
1291
1437
|
};
|
|
1292
|
-
|
|
1293
1438
|
exports.createCalendarBlockSchema = createCalendarBlockSchema;
|
|
1294
|
-
|
|
1439
|
+
var createGanttBlockSchema = function createGanttBlockSchema(options) {
|
|
1440
|
+
var collection = options.collection,
|
|
1441
|
+
resource = options.resource,
|
|
1442
|
+
fieldNames = options.fieldNames,
|
|
1443
|
+
others = _objectWithoutProperties(options, _excluded8);
|
|
1444
|
+
var schema = {
|
|
1445
|
+
type: 'void',
|
|
1446
|
+
'x-acl-action': "".concat(resource || collection, ":list"),
|
|
1447
|
+
'x-decorator': 'GanttBlockProvider',
|
|
1448
|
+
'x-decorator-props': _objectSpread({
|
|
1449
|
+
collection: collection,
|
|
1450
|
+
resource: resource || collection,
|
|
1451
|
+
action: 'list',
|
|
1452
|
+
fieldNames: _objectSpread({
|
|
1453
|
+
id: 'id'
|
|
1454
|
+
}, fieldNames),
|
|
1455
|
+
params: {
|
|
1456
|
+
paginate: false
|
|
1457
|
+
}
|
|
1458
|
+
}, others),
|
|
1459
|
+
'x-designer': 'Gantt.Designer',
|
|
1460
|
+
'x-component': 'CardItem',
|
|
1461
|
+
properties: _defineProperty({}, (0, _shared.uid)(), {
|
|
1462
|
+
type: 'void',
|
|
1463
|
+
'x-component': 'Gantt',
|
|
1464
|
+
'x-component-props': {
|
|
1465
|
+
useProps: '{{ useGanttBlockProps }}'
|
|
1466
|
+
},
|
|
1467
|
+
properties: {
|
|
1468
|
+
toolBar: {
|
|
1469
|
+
type: 'void',
|
|
1470
|
+
'x-component': 'ActionBar',
|
|
1471
|
+
'x-component-props': {
|
|
1472
|
+
style: {
|
|
1473
|
+
marginBottom: 24
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
'x-initializer': 'GanttActionInitializers',
|
|
1477
|
+
properties: {}
|
|
1478
|
+
},
|
|
1479
|
+
table: {
|
|
1480
|
+
type: 'array',
|
|
1481
|
+
'x-decorator': 'div',
|
|
1482
|
+
'x-decorator-props': {
|
|
1483
|
+
style: {
|
|
1484
|
+
float: 'left',
|
|
1485
|
+
maxWidth: '35%'
|
|
1486
|
+
}
|
|
1487
|
+
},
|
|
1488
|
+
'x-initializer': 'TableColumnInitializers',
|
|
1489
|
+
'x-component': 'TableV2',
|
|
1490
|
+
'x-component-props': {
|
|
1491
|
+
rowKey: 'id',
|
|
1492
|
+
rowSelection: {
|
|
1493
|
+
type: 'checkbox'
|
|
1494
|
+
},
|
|
1495
|
+
useProps: '{{ useTableBlockProps }}',
|
|
1496
|
+
pagination: false
|
|
1497
|
+
},
|
|
1498
|
+
properties: {
|
|
1499
|
+
actions: {
|
|
1500
|
+
type: 'void',
|
|
1501
|
+
title: '{{ t("Actions") }}',
|
|
1502
|
+
'x-action-column': 'actions',
|
|
1503
|
+
'x-decorator': 'TableV2.Column.ActionBar',
|
|
1504
|
+
'x-component': 'TableV2.Column',
|
|
1505
|
+
'x-designer': 'TableV2.ActionColumnDesigner',
|
|
1506
|
+
'x-initializer': 'TableActionColumnInitializers',
|
|
1507
|
+
properties: {
|
|
1508
|
+
actions: {
|
|
1509
|
+
type: 'void',
|
|
1510
|
+
'x-decorator': 'DndContext',
|
|
1511
|
+
'x-component': 'Space',
|
|
1512
|
+
'x-component-props': {
|
|
1513
|
+
split: '|'
|
|
1514
|
+
},
|
|
1515
|
+
properties: {}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
detail: {
|
|
1522
|
+
type: 'void',
|
|
1523
|
+
'x-component': 'Gantt.Event',
|
|
1524
|
+
properties: {
|
|
1525
|
+
drawer: {
|
|
1526
|
+
type: 'void',
|
|
1527
|
+
'x-component': 'Action.Drawer',
|
|
1528
|
+
'x-component-props': {
|
|
1529
|
+
className: 'nb-action-popup'
|
|
1530
|
+
},
|
|
1531
|
+
title: '{{ t("View record") }}',
|
|
1532
|
+
properties: {
|
|
1533
|
+
tabs: {
|
|
1534
|
+
type: 'void',
|
|
1535
|
+
'x-component': 'Tabs',
|
|
1536
|
+
'x-component-props': {},
|
|
1537
|
+
'x-initializer': 'TabPaneInitializers',
|
|
1538
|
+
properties: {
|
|
1539
|
+
tab1: {
|
|
1540
|
+
type: 'void',
|
|
1541
|
+
title: '{{t("Details")}}',
|
|
1542
|
+
'x-component': 'Tabs.TabPane',
|
|
1543
|
+
'x-designer': 'Tabs.Designer',
|
|
1544
|
+
'x-component-props': {},
|
|
1545
|
+
properties: {
|
|
1546
|
+
grid: {
|
|
1547
|
+
type: 'void',
|
|
1548
|
+
'x-component': 'Grid',
|
|
1549
|
+
'x-initializer': 'RecordBlockInitializers',
|
|
1550
|
+
properties: {}
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
})
|
|
1562
|
+
};
|
|
1563
|
+
console.log(JSON.stringify(schema, null, 2));
|
|
1564
|
+
return schema;
|
|
1565
|
+
};
|
|
1566
|
+
exports.createGanttBlockSchema = createGanttBlockSchema;
|
|
1295
1567
|
var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
1296
1568
|
var collection = options.collection,
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1569
|
+
resource = options.resource,
|
|
1570
|
+
groupField = options.groupField,
|
|
1571
|
+
others = _objectWithoutProperties(options, _excluded9);
|
|
1301
1572
|
var schema = {
|
|
1302
1573
|
type: 'void',
|
|
1303
1574
|
'x-acl-action': "".concat(resource || collection, ":list"),
|
|
@@ -1335,8 +1606,12 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
|
1335
1606
|
card: {
|
|
1336
1607
|
type: 'void',
|
|
1337
1608
|
'x-read-pretty': true,
|
|
1609
|
+
'x-label-disabled': true,
|
|
1338
1610
|
'x-decorator': 'BlockItem',
|
|
1339
1611
|
'x-component': 'Kanban.Card',
|
|
1612
|
+
'x-component-props': {
|
|
1613
|
+
openMode: 'drawer'
|
|
1614
|
+
},
|
|
1340
1615
|
'x-designer': 'Kanban.Card.Designer',
|
|
1341
1616
|
properties: {
|
|
1342
1617
|
grid: {
|
|
@@ -1353,6 +1628,7 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
|
1353
1628
|
title: '{{ t("View") }}',
|
|
1354
1629
|
'x-designer': 'Action.Designer',
|
|
1355
1630
|
'x-component': 'Kanban.CardViewer',
|
|
1631
|
+
'x-action': 'view',
|
|
1356
1632
|
'x-component-props': {
|
|
1357
1633
|
openMode: 'drawer'
|
|
1358
1634
|
},
|
|
@@ -1397,5 +1673,4 @@ var createKanbanBlockSchema = function createKanbanBlockSchema(options) {
|
|
|
1397
1673
|
};
|
|
1398
1674
|
return schema;
|
|
1399
1675
|
};
|
|
1400
|
-
|
|
1401
1676
|
exports.createKanbanBlockSchema = createKanbanBlockSchema;
|