@nocobase/client 0.10.0-alpha.5 → 0.11.0-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/docs/develop.md +1 -1
- package/docs/intro.md +28 -170
- package/es/acl/ACLProvider.js +8 -7
- package/es/acl/Configuration/ConfigureCenter.js +5 -1
- package/es/acl/Configuration/MenuConfigure.js +4 -0
- package/es/acl/Configuration/PermisionProvider.js +1 -1
- package/es/acl/Configuration/RoleConfigure.js +3 -2
- package/es/acl/Configuration/RolesResourcesActions.d.ts +1 -1
- package/es/acl/Configuration/RolesResourcesActions.js +6 -1
- package/es/acl/Configuration/StrategyActions.d.ts +1 -1
- package/es/acl/Configuration/StrategyActions.js +1 -1
- package/es/acl/index.d.ts +4 -1
- package/es/acl/index.js +52 -1
- package/es/acl/style.d.ts +1 -0
- package/es/acl/style.js +7 -0
- package/es/antd-config-provider/index.d.ts +4 -0
- package/es/antd-config-provider/index.js +49 -5
- package/es/api-client/hooks/assign.d.ts +3 -3
- package/es/api-client/hooks/useRequest.d.ts +2 -2
- package/es/appInfo/CurrentAppInfoProvider.js +0 -15
- package/es/application/Application.d.ts +35 -20
- package/es/application/Application.js +167 -209
- package/es/application/Plugin.d.ts +11 -0
- package/es/{application-v2 → application}/Plugin.js +4 -13
- package/es/application/PluginManager.d.ts +21 -0
- package/es/{application-v2 → application}/PluginManager.js +144 -163
- package/es/application/RouterManager.d.ts +33 -0
- package/es/application/RouterManager.js +139 -0
- package/es/application/components/AppComponent.d.ts +6 -0
- package/es/application/components/AppComponent.js +26 -0
- package/es/application/components/BlankComponent.d.ts +4 -0
- package/es/application/components/BlankComponent.js +5 -0
- package/es/application/components/MainComponent.d.ts +2 -0
- package/es/application/components/MainComponent.js +15 -0
- package/es/application/components/RouterContextCleaner.d.ts +4 -0
- package/es/application/components/RouterContextCleaner.js +14 -0
- package/es/application/components/defaultComponents.d.ts +8 -0
- package/es/application/components/defaultComponents.js +14 -0
- package/es/application/components/index.d.ts +4 -0
- package/es/application/components/index.js +4 -0
- package/es/{application-v2 → application}/context.d.ts +1 -1
- package/es/application/hooks/index.d.ts +4 -0
- package/es/application/hooks/index.js +4 -0
- package/es/application/hooks/useApp.d.ts +2 -0
- package/es/{application-v2 → application}/hooks/useApp.js +1 -1
- package/es/application/hooks/useAppPluginLoad.d.ts +5 -0
- package/es/{application-v2/hooks/useLoad.js → application/hooks/useAppPluginLoad.js} +40 -22
- package/es/application/hooks/usePlugin.d.ts +3 -0
- package/es/application/hooks/usePlugin.js +5 -0
- package/es/application/hooks/useRouter.d.ts +1 -0
- package/es/application/index.d.ts +4 -1
- package/es/application/index.js +4 -1
- package/es/application/utils/index.d.ts +3 -0
- package/es/application/{compose.js → utils/index.js} +29 -18
- package/es/auth/SigninPage.d.ts +1 -1
- package/es/auth/index.d.ts +6 -2
- package/es/auth/index.js +49 -2
- package/es/block-provider/BlockProvider.js +3 -3
- package/es/block-provider/BlockSchemaComponentProvider.d.ts +6 -0
- package/es/block-provider/BlockSchemaComponentProvider.js +84 -4
- package/es/block-provider/CalendarBlockProvider.js +1 -1
- package/es/block-provider/FormBlockProvider.js +1 -1
- package/es/block-provider/FormFieldProvider.js +1 -1
- package/es/block-provider/GanttBlockProvider.js +1 -1
- package/es/block-provider/KanbanBlockProvider.js +2 -2
- package/es/block-provider/SharedFilterProvider.d.ts +3 -3
- package/es/block-provider/TableBlockProvider.js +6 -6
- package/es/block-provider/TableFieldProvider.js +2 -2
- package/es/block-provider/TableSelectorProvider.d.ts +2 -2
- package/es/block-provider/TableSelectorProvider.js +5 -5
- package/es/block-provider/hooks/index.js +22 -22
- package/es/board/Board.js +6 -1
- package/es/board/Column.js +1 -1
- package/es/board/style.d.ts +1 -0
- package/es/board/style.js +7 -0
- package/es/collection-manager/CollectionField.d.ts +1 -1
- package/es/collection-manager/CollectionField.js +2 -2
- package/es/collection-manager/CollectionManagerProvider.js +2 -2
- package/es/collection-manager/Configuration/AddCollectionAction.js +2 -2
- package/es/collection-manager/Configuration/AddFieldAction.js +20 -7
- package/es/collection-manager/Configuration/AddSubFieldAction.js +1 -1
- package/es/collection-manager/Configuration/CollectionFields.js +7 -3
- package/es/collection-manager/Configuration/CollectionFieldsTable.d.ts +1 -1
- package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +1 -1
- package/es/collection-manager/Configuration/ConfigurationTable.js +3 -3
- package/es/collection-manager/Configuration/EditCollectionAction.js +1 -1
- package/es/collection-manager/Configuration/EditFieldAction.js +17 -7
- package/es/collection-manager/Configuration/EditSubFieldAction.js +1 -1
- package/es/collection-manager/Configuration/OverridingCollectionField.js +17 -7
- package/es/collection-manager/Configuration/SyncFieldsAction.js +5 -6
- package/es/collection-manager/Configuration/ViewInheritedField.js +3 -3
- package/es/collection-manager/Configuration/components/CollectionCategory.d.ts +1 -1
- package/es/collection-manager/Configuration/components/CollectionFieldInterface.d.ts +1 -1
- package/es/collection-manager/Configuration/components/CollectionTemplate.d.ts +1 -1
- package/es/collection-manager/Configuration/components/FieldSummary.d.ts +1 -1
- package/es/collection-manager/Configuration/components/TemplateSummay.d.ts +1 -1
- package/es/collection-manager/Configuration/components/index.js +5 -5
- package/es/collection-manager/ResourceActionProvider.js +1 -1
- package/es/collection-manager/action-hooks.d.ts +5 -1
- package/es/collection-manager/action-hooks.js +46 -71
- package/es/collection-manager/hooks/useCollection.d.ts +1 -1
- package/es/collection-manager/hooks/useCollectionManager.js +3 -3
- package/es/collection-manager/index.d.ts +1 -0
- package/es/collection-manager/index.js +2 -1
- package/es/collection-manager/interfaces/collection.d.ts +2 -0
- package/es/{route-switch/RouteSwitchProvider.js → collection-manager/interfaces/collection.js} +32 -26
- package/es/collection-manager/interfaces/index.d.ts +2 -0
- package/es/collection-manager/interfaces/index.js +2 -0
- package/es/collection-manager/interfaces/linkTo.js +1 -1
- package/es/collection-manager/interfaces/m2m.js +1 -1
- package/es/collection-manager/interfaces/m2o.js +1 -1
- package/es/collection-manager/interfaces/o2m.js +1 -1
- package/es/collection-manager/interfaces/o2o.js +1 -1
- package/es/collection-manager/interfaces/properties/index.d.ts +1 -0
- package/es/collection-manager/interfaces/properties/index.js +10 -0
- package/es/collection-manager/interfaces/properties/operators.d.ts +46 -0
- package/es/collection-manager/interfaces/properties/operators.js +59 -0
- package/es/collection-manager/interfaces/tableoid.d.ts +2 -0
- package/es/collection-manager/interfaces/tableoid.js +43 -0
- package/es/collection-manager/sub-table.d.ts +1 -1
- package/es/collection-manager/sub-table.js +1 -1
- package/es/collection-manager/templates/components/PreviewFields.js +4 -4
- package/es/collection-manager/templates/properties/index.d.ts +1 -1
- package/es/document-title/index.d.ts +4 -0
- package/es/document-title/index.js +47 -1
- package/es/filter-provider/FilterProvider.d.ts +1 -1
- package/es/filter-provider/utils.js +2 -2
- package/es/formula/index.d.ts +1 -0
- package/es/hooks/useMenuItem.d.ts +1 -1
- package/es/index.d.ts +11 -1
- package/es/index.js +13 -1
- package/es/locale/en_US.d.ts +1 -0
- package/es/locale/en_US.js +2 -1
- package/es/locale/index.d.ts +1 -1
- package/es/locale/ja_JP.d.ts +1 -0
- package/es/locale/ja_JP.js +2 -1
- package/es/locale/zh_CN.d.ts +2 -0
- package/es/locale/zh_CN.js +3 -1
- package/es/nocobase-buildin-plugin/index.d.ts +8 -0
- package/es/{application-v2/Application.js → nocobase-buildin-plugin/index.js} +190 -109
- package/es/plugin-manager/PinnedPluginListProvider.js +1 -1
- package/es/plugin-manager/index.d.ts +5 -1
- package/es/plugin-manager/index.js +48 -1
- package/es/pm/Card.js +12 -6
- package/es/pm/index.d.ts +8 -2
- package/es/pm/index.js +95 -35
- package/es/pm/style.d.ts +10 -0
- package/es/pm/style.js +13 -0
- package/es/record-provider/index.js +1 -1
- package/es/route-switch/antd/admin-layout/index.d.ts +4 -1
- package/es/route-switch/antd/admin-layout/index.js +55 -8
- package/es/route-switch/index.d.ts +0 -5
- package/es/route-switch/index.js +1 -6
- package/es/schema-component/antd/AntdSchemaComponentProvider.d.ts +6 -0
- package/es/schema-component/antd/AntdSchemaComponentProvider.js +60 -2
- package/es/schema-component/antd/__builtins__/hooks/index.d.ts +3 -0
- package/es/schema-component/antd/__builtins__/hooks/index.js +3 -0
- package/es/schema-component/antd/__builtins__/hooks/useConfig.d.ts +1 -0
- package/es/schema-component/antd/__builtins__/hooks/useConfig.js +6 -0
- package/es/schema-component/antd/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/es/schema-component/antd/__builtins__/hooks/usePrefixCls.js +13 -0
- package/es/schema-component/antd/__builtins__/hooks/useToken.d.ts +6 -0
- package/es/schema-component/antd/__builtins__/hooks/useToken.js +3 -0
- package/es/schema-component/antd/__builtins__/index.d.ts +2 -0
- package/es/schema-component/antd/__builtins__/index.js +2 -0
- package/es/schema-component/antd/__builtins__/style.d.ts +28 -0
- package/es/schema-component/antd/__builtins__/style.js +63 -0
- package/es/schema-component/antd/action/Action.Designer.js +35 -13
- package/es/schema-component/antd/action/Action.Drawer.js +1 -1
- package/es/schema-component/antd/action/Action.Modal.js +1 -1
- package/es/schema-component/antd/action/Action.Popover.d.ts +0 -1
- package/es/schema-component/antd/action/Action.js +8 -6
- package/es/schema-component/antd/action/ActionBar.d.ts +1 -1
- package/es/schema-component/antd/action/context.d.ts +1 -1
- package/es/schema-component/antd/action/types.d.ts +3 -3
- package/es/schema-component/antd/association-field/AssociationFieldProvider.js +1 -1
- package/es/schema-component/antd/association-field/AssociationSelect.d.ts +2 -2
- package/es/schema-component/antd/association-field/AssociationSelect.js +5 -7
- package/es/schema-component/antd/association-field/FileManager.d.ts +1 -1
- package/es/schema-component/antd/association-field/InternalNester.js +3 -4
- package/es/schema-component/antd/association-field/InternalPicker.d.ts +1 -1
- package/es/schema-component/antd/association-field/InternalPicker.js +1 -1
- package/es/schema-component/antd/association-field/InternalSubTable.js +1 -1
- package/es/schema-component/antd/association-field/InternalViewer.js +2 -2
- package/es/schema-component/antd/association-field/Nester.js +3 -3
- package/es/schema-component/antd/association-field/hooks.js +3 -3
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.Designer.js +3 -3
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +1 -1
- package/es/schema-component/antd/association-select/AssociationSelect.d.ts +1 -1
- package/es/schema-component/antd/association-select/AssociationSelect.js +11 -11
- package/es/schema-component/antd/association-select/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/association-select/useServiceOptions.js +3 -3
- package/es/schema-component/antd/auto-complete/AutoComplete.d.ts +6 -0
- package/es/schema-component/antd/auto-complete/AutoComplete.js +6 -0
- package/es/schema-component/antd/auto-complete/index.d.ts +1 -0
- package/es/schema-component/antd/auto-complete/index.js +1 -0
- package/es/schema-component/antd/calendar/Calendar.d.ts +0 -1
- package/es/schema-component/antd/calendar/Calendar.js +22 -16
- package/es/schema-component/antd/calendar/DeleteEvent.js +2 -2
- package/es/schema-component/antd/calendar/Nav.js +2 -4
- package/es/schema-component/antd/calendar/Title.js +2 -2
- package/es/schema-component/antd/calendar/ViewSelect.js +1 -1
- package/es/schema-component/antd/calendar/components/Header.js +1 -2
- package/es/schema-component/antd/calendar/global.style.d.ts +3 -0
- package/es/schema-component/antd/calendar/global.style.js +6 -0
- package/es/schema-component/antd/calendar/index.d.ts +0 -1
- package/es/schema-component/antd/calendar/index.js +1 -2
- package/es/schema-component/antd/calendar/style.d.ts +2 -0
- package/es/schema-component/antd/calendar/style.js +659 -0
- package/es/schema-component/antd/calendar/utils.d.ts +3 -3
- package/es/schema-component/antd/calendar/utils.js +2 -2
- package/es/schema-component/antd/cascader/Cascader.d.ts +1 -1
- package/es/schema-component/antd/cascader/Cascader.js +1 -1
- package/es/schema-component/antd/checkbox/Checkbox.d.ts +1 -1
- package/es/schema-component/antd/collection-select/CollectionSelect.d.ts +3 -1
- package/es/schema-component/antd/collection-select/CollectionSelect.js +21 -8
- package/es/schema-component/antd/color-select/ColorSelect.d.ts +1 -1
- package/es/schema-component/antd/color-select/ColorSelect.js +1 -1
- package/es/schema-component/antd/cron/CronSet.js +1 -1
- package/es/schema-component/antd/date-picker/DatePicker.js +63 -7
- package/es/schema-component/antd/date-picker/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/date-picker/ReadPretty.js +6 -7
- package/es/schema-component/antd/date-picker/util.d.ts +22 -21
- package/es/schema-component/antd/date-picker/util.js +10 -8
- package/es/schema-component/antd/error-fallback/ErrorFallback.d.ts +3 -4
- package/es/schema-component/antd/expand-action/Expand.Action.Design.js +1 -1
- package/es/schema-component/antd/expand-action/Expand.Action.js +2 -2
- package/es/schema-component/antd/filter/Filter.js +9 -4
- package/es/schema-component/antd/filter/FilterAction.d.ts +1 -1
- package/es/schema-component/antd/filter/FilterGroup.d.ts +1 -1
- package/es/schema-component/antd/filter/FilterItem.d.ts +1 -1
- package/es/schema-component/antd/filter/FilterItem.js +3 -3
- package/es/schema-component/antd/filter/FilterItems.js +1 -1
- package/es/schema-component/antd/filter/context.d.ts +1 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +13 -104
- package/es/schema-component/antd/filter/useValues.js +3 -3
- package/es/schema-component/antd/form/Form.d.ts +2 -2
- package/es/schema-component/antd/form/Form.js +1 -1
- package/es/schema-component/antd/form-item/FormItem.js +55 -46
- package/es/schema-component/antd/form-item/SchemaSettingOptions.js +6 -6
- package/es/schema-component/antd/form-v2/Form.Designer.js +1 -1
- package/es/schema-component/antd/form-v2/Form.js +2 -2
- package/es/schema-component/antd/form-v2/FormField.js +1 -1
- package/es/schema-component/antd/form-v2/Templates.js +1 -1
- package/es/schema-component/antd/g2plot/G2Plot.d.ts +1 -1
- package/es/schema-component/antd/g2plot/G2Plot.js +1 -1
- package/es/schema-component/antd/g2plot/G2PlotDesigner.js +2 -2
- package/es/schema-component/antd/gantt/components/calendar/calendar.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/gantt/task-gantt-content.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/gantt/task-gantt-content.js +4 -4
- package/es/schema-component/antd/gantt/components/gantt/task-gantt.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/grid/grid-body.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/grid/grid-body.js +1 -1
- package/es/schema-component/antd/gantt/components/grid/grid.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/other/arrow.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/other/tooltip.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/task-item/task-item.d.ts +1 -1
- package/es/schema-component/antd/gantt/helpers/date-helper.d.ts +3 -2
- package/es/schema-component/antd/gantt/types/bar-task.d.ts +1 -1
- package/es/schema-component/antd/gantt/types/gantt-task-actions.d.ts +3 -3
- package/es/schema-component/antd/gantt/types/public-types.d.ts +1 -1
- package/es/schema-component/antd/grid/Grid.js +2 -2
- package/es/schema-component/antd/grid-card/GridCard.Decorator.js +3 -3
- package/es/schema-component/antd/grid-card/GridCard.Designer.js +1 -1
- package/es/schema-component/antd/icon-picker/IconPicker.d.ts +1 -1
- package/es/schema-component/antd/icon-picker/IconPicker.js +2 -2
- package/es/schema-component/antd/index.d.ts +2 -1
- package/es/schema-component/antd/index.js +2 -1
- package/es/schema-component/antd/index.less +1 -0
- package/es/schema-component/antd/input/Input.d.ts +1 -1
- package/es/schema-component/antd/input/Input.js +1 -1
- package/es/schema-component/antd/input/Json.d.ts +2 -2
- package/es/schema-component/antd/input/Json.js +1 -1
- package/es/schema-component/antd/input/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/input/ReadPretty.js +1 -1
- package/es/schema-component/antd/input-number/InputNumber.d.ts +1 -1
- package/es/schema-component/antd/input-number/InputNumber.js +2 -1
- package/es/schema-component/antd/kanban/Kanban.Card.js +2 -2
- package/es/schema-component/antd/kanban/Kanban.d.ts +0 -2
- package/es/schema-component/antd/kanban/Kanban.js +8 -8
- package/es/schema-component/antd/kanban/style.d.ts +1 -0
- package/es/schema-component/antd/kanban/style.js +33 -0
- package/es/schema-component/antd/list/List.Decorator.js +2 -2
- package/es/schema-component/antd/list/List.Designer.js +4 -4
- package/es/schema-component/antd/markdown/Markdown.Void.js +1 -1
- package/es/schema-component/antd/markdown/Markdown.d.ts +0 -1
- package/es/schema-component/antd/markdown/Markdown.js +10 -6
- package/es/schema-component/antd/markdown/style.d.ts +1 -0
- package/es/schema-component/antd/markdown/style.js +20 -0
- package/es/schema-component/antd/menu/Menu.Designer.js +2 -2
- package/es/schema-component/antd/menu/Menu.d.ts +1 -1
- package/es/schema-component/antd/menu/MenuItemInitializers/index.js +1 -1
- package/es/schema-component/antd/page/FixedBlock.js +1 -1
- package/es/schema-component/antd/page/Page.js +2 -2
- package/es/schema-component/antd/page/PageTabDesigner.js +2 -2
- package/es/schema-component/antd/pagination/index.d.ts +1 -1
- package/es/schema-component/antd/password/PasswordStrength.d.ts +1 -1
- package/es/schema-component/antd/percent/Percent.d.ts +1 -1
- package/es/schema-component/antd/preview/Preview.d.ts +2 -3
- package/es/schema-component/antd/preview/Preview.js +22 -17
- package/es/schema-component/antd/quick-edit/QuickEdit.js +1 -1
- package/es/schema-component/antd/radio/Radio.d.ts +1 -1
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +1 -1
- package/es/schema-component/antd/remote-select/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +1 -1
- package/es/schema-component/antd/remote-select/RemoteSelect.js +39 -21
- package/es/schema-component/antd/rich-text/RichText.d.ts +1 -2
- package/es/schema-component/antd/rich-text/RichText.js +8 -3
- package/es/schema-component/antd/rich-text/style.d.ts +7 -0
- package/es/schema-component/antd/rich-text/style.js +814 -0
- package/es/schema-component/antd/select/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/select/Select.js +4 -4
- package/es/schema-component/antd/space/index.js +2 -2
- package/es/schema-component/antd/table/Table.Column.Decorator.js +1 -1
- package/es/schema-component/antd/table/Table.Column.Designer.js +1 -1
- package/es/schema-component/antd/table/Table.Void.Designer.js +1 -1
- package/es/schema-component/antd/table/Table.Void.d.ts +1 -1
- package/es/schema-component/antd/table/Table.Void.js +3 -3
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.js +1 -1
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +3 -3
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +4 -4
- package/es/schema-component/antd/table-v2/TableField.js +1 -1
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +1 -1
- package/es/schema-component/antd/tabs/Tabs.js +1 -7
- package/es/schema-component/antd/time-picker/ReadPretty.js +3 -3
- package/es/schema-component/antd/time-picker/TimePicker.d.ts +1 -1
- package/es/schema-component/antd/time-picker/TimePicker.js +3 -3
- package/es/schema-component/antd/tree-select/ReadPretty.js +3 -3
- package/es/schema-component/antd/tree-select/TreeSelect.js +1 -1
- package/es/schema-component/antd/upload/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/upload/ReadPretty.js +19 -14
- package/es/schema-component/antd/upload/Upload.d.ts +0 -1
- package/es/schema-component/antd/upload/Upload.js +45 -33
- package/es/schema-component/antd/upload/shared.d.ts +2 -0
- package/es/schema-component/antd/upload/shared.js +3 -3
- package/es/schema-component/antd/upload/style.d.ts +1 -0
- package/es/schema-component/antd/upload/style.js +45 -0
- package/es/schema-component/antd/variable/Input.js +79 -76
- package/es/schema-component/antd/variable/JSONInput.js +5 -40
- package/es/schema-component/antd/variable/RawTextArea.d.ts +2 -0
- package/es/schema-component/antd/variable/RawTextArea.js +67 -0
- package/es/schema-component/antd/variable/TextArea.js +145 -45
- package/es/schema-component/antd/variable/Variable.d.ts +4 -3
- package/es/schema-component/antd/variable/Variable.js +3 -1
- package/es/schema-component/antd/variable/VariableSelect.d.ts +7 -2
- package/es/schema-component/antd/variable/VariableSelect.js +50 -13
- package/es/schema-component/antd/variable/XButton.d.ts +5 -5
- package/es/schema-component/antd/variable/style.d.ts +1 -0
- package/es/schema-component/antd/variable/style.js +74 -0
- package/es/schema-component/common/dnd-context/index.js +1 -1
- package/es/schema-component/common/utils/uitls.d.ts +8 -4
- package/es/schema-component/common/utils/uitls.js +2 -2
- package/es/schema-component/core/SchemaComponent.js +1 -1
- package/es/schema-component/core/SchemaComponentOptions.d.ts +1 -0
- package/es/schema-component/core/SchemaComponentOptions.js +1 -1
- package/es/schema-component/core/index.d.ts +6 -0
- package/es/schema-component/core/index.js +61 -1
- package/es/schema-component/hooks/useDesignable.d.ts +2 -2
- package/es/schema-component/hooks/useDesignable.js +4 -4
- package/es/schema-component/hooks/useFieldComponentOptions.js +1 -1
- package/es/schema-component/hooks/useFieldModeOptions.js +1 -1
- package/es/schema-component/hooks/useFieldTitle.js +1 -1
- package/es/schema-initializer/SchemaInitializer.d.ts +0 -1
- package/es/schema-initializer/SchemaInitializer.js +12 -16
- package/es/schema-initializer/buttons/KanbanCardFormItemInitializers.d.ts +0 -1
- package/es/schema-initializer/buttons/RecordBlockInitializers.js +1 -1
- package/es/schema-initializer/buttons/TableColumnInitializers.js +1 -1
- package/es/schema-initializer/components/BulkEditField.js +1 -1
- package/es/schema-initializer/components/CreateRecordAction.d.ts +2 -2
- package/es/schema-initializer/components/CreateRecordAction.js +112 -36
- package/es/schema-initializer/components/DuplicateAction.d.ts +1 -1
- package/es/schema-initializer/components/DuplicateAction.js +28 -15
- package/es/schema-initializer/components/assigned-field/AssignedField.js +37 -156
- package/es/schema-initializer/index.d.ts +7 -3
- package/es/schema-initializer/index.js +51 -3
- package/es/schema-initializer/items/CalendarBlockInitializer.js +1 -1
- package/es/schema-initializer/items/GanttBlockInitializer.js +2 -2
- package/es/schema-initializer/items/KanbanBlockInitializer.js +3 -3
- package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +4 -4
- package/es/schema-initializer/style.d.ts +6 -0
- package/es/schema-initializer/style.js +9 -0
- package/es/schema-initializer/types.d.ts +5 -5
- package/es/schema-initializer/utils.js +10 -10
- package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -1
- package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.d.ts +1 -1
- package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.js +1 -1
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.d.ts +1 -2
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.js +8 -6
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.style.d.ts +5 -0
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.style.js +8 -0
- package/es/schema-settings/DataTemplates/components/Designer.js +1 -1
- package/es/schema-settings/EnableChildCollections/DynamicComponent.d.ts +9 -0
- package/es/schema-settings/EnableChildCollections/DynamicComponent.js +48 -0
- package/es/schema-settings/EnableChildCollections/index.d.ts +1 -1
- package/es/schema-settings/EnableChildCollections/index.js +5 -4
- package/es/schema-settings/GeneralSchemaDesigner.js +5 -1
- package/es/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +1 -1
- package/es/schema-settings/LinkageRules/LinkageRuleAction.d.ts +2 -2
- package/es/schema-settings/LinkageRules/LinkageRuleAction.js +3 -3
- package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +1 -1
- package/es/schema-settings/LinkageRules/Variables.js +1 -1
- package/es/schema-settings/LinkageRules/components/EnableLinkage.d.ts +1 -1
- package/es/schema-settings/LinkageRules/components/EnableLinkage.js +3 -3
- package/es/schema-settings/LinkageRules/components/LinkageHeader.d.ts +1 -2
- package/es/schema-settings/LinkageRules/components/LinkageHeader.js +8 -6
- package/es/schema-settings/LinkageRules/components/LinkageHeader.style.d.ts +5 -0
- package/es/schema-settings/LinkageRules/components/LinkageHeader.style.js +8 -0
- package/es/schema-settings/LinkageRules/index.d.ts +1 -1
- package/es/schema-settings/LinkageRules/index.js +4 -3
- package/es/schema-settings/SchemaSettings.d.ts +1 -1
- package/es/schema-settings/SchemaSettings.js +49 -21
- package/es/schema-settings/VariableInput/VariableInput.d.ts +3 -1
- package/es/schema-settings/VariableInput/VariableInput.js +8 -3
- package/es/schema-settings/VariableInput/hooks/useFormVariable.d.ts +2 -4
- package/es/schema-settings/VariableInput/hooks/useFormVariable.js +16 -9
- package/es/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +15 -5
- package/es/schema-settings/VariableInput/hooks/useIterationVariable.js +67 -46
- package/es/schema-settings/VariableInput/hooks/useUserVariable.js +1 -3
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +22 -5
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.js +4 -4
- package/es/schema-settings/VariableInput/type.d.ts +3 -2
- package/es/schema-templates/BlockTemplate.d.ts +1 -1
- package/es/schema-templates/SchemaTemplateManagerProvider.d.ts +6 -0
- package/es/schema-templates/SchemaTemplateManagerProvider.js +70 -37
- package/es/system-settings/SystemSettingsProvider.js +0 -14
- package/es/system-settings/index.d.ts +4 -0
- package/es/system-settings/index.js +48 -1
- package/es/user/ChangePassword.d.ts +1 -1
- package/es/user/CurrentUser.js +2 -5
- package/es/user/CurrentUserProvider.d.ts +1 -0
- package/es/user/CurrentUserProvider.js +31 -2
- package/es/user/EditProfile.d.ts +1 -1
- package/es/user/LanguageSettings.d.ts +1 -1
- package/es/user/LanguageSettings.js +1 -1
- package/es/user/SwitchRole.d.ts +1 -1
- package/es/user/SwitchRole.js +2 -25
- package/lib/acl/ACLProvider.js +8 -7
- package/lib/acl/Configuration/ConfigureCenter.js +5 -1
- package/lib/acl/Configuration/MenuConfigure.js +4 -0
- package/lib/acl/Configuration/PermisionProvider.js +1 -1
- package/lib/acl/Configuration/RoleConfigure.js +3 -2
- package/lib/acl/Configuration/RolesResourcesActions.d.ts +1 -1
- package/lib/acl/Configuration/RolesResourcesActions.js +17 -12
- package/lib/acl/Configuration/StrategyActions.d.ts +1 -1
- package/lib/acl/Configuration/StrategyActions.js +1 -1
- package/lib/acl/index.d.ts +4 -1
- package/lib/acl/index.js +58 -1
- package/lib/acl/style.d.ts +1 -0
- package/lib/acl/style.js +14 -0
- package/lib/antd-config-provider/index.d.ts +4 -0
- package/lib/antd-config-provider/index.js +51 -6
- package/lib/api-client/hooks/assign.d.ts +3 -3
- package/lib/api-client/hooks/useRequest.d.ts +2 -2
- package/lib/appInfo/CurrentAppInfoProvider.js +0 -15
- package/lib/application/Application.d.ts +35 -20
- package/lib/application/Application.js +169 -213
- package/lib/application/Plugin.d.ts +11 -0
- package/lib/{application-v2 → application}/Plugin.js +4 -13
- package/lib/application/PluginManager.d.ts +21 -0
- package/lib/{application-v2 → application}/PluginManager.js +144 -163
- package/lib/application/RouterManager.d.ts +33 -0
- package/lib/application/RouterManager.js +148 -0
- package/lib/application/components/AppComponent.d.ts +6 -0
- package/lib/application/components/AppComponent.js +36 -0
- package/lib/application/components/BlankComponent.d.ts +4 -0
- package/lib/application/components/BlankComponent.js +13 -0
- package/lib/application/components/MainComponent.d.ts +2 -0
- package/lib/{application-v2 → application}/components/MainComponent.js +13 -11
- package/lib/application/components/RouterContextCleaner.d.ts +4 -0
- package/lib/application/components/RouterContextCleaner.js +22 -0
- package/lib/application/components/defaultComponents.d.ts +8 -0
- package/lib/application/components/defaultComponents.js +22 -0
- package/lib/application/components/index.d.ts +4 -0
- package/lib/application/components/index.js +49 -0
- package/lib/{application-v2 → application}/context.d.ts +1 -1
- package/lib/application/hooks/index.d.ts +4 -0
- package/lib/{application-v2 → application}/hooks/index.js +15 -4
- package/lib/application/hooks/useApp.d.ts +2 -0
- package/lib/{application-v2 → application}/hooks/useApp.js +1 -1
- package/lib/application/hooks/useAppPluginLoad.d.ts +5 -0
- package/lib/{application-v2/hooks/useLoad.js → application/hooks/useAppPluginLoad.js} +41 -24
- package/lib/application/hooks/usePlugin.d.ts +3 -0
- package/lib/application/hooks/usePlugin.js +11 -0
- package/lib/application/hooks/useRouter.d.ts +1 -0
- package/lib/application/index.d.ts +4 -1
- package/lib/application/index.js +37 -4
- package/lib/application/utils/index.d.ts +3 -0
- package/lib/{application-v2/compose.js → application/utils/index.js} +30 -18
- package/lib/auth/SigninPage.d.ts +1 -1
- package/lib/auth/index.d.ts +6 -2
- package/lib/auth/index.js +72 -17
- package/lib/block-provider/BlockProvider.js +3 -3
- package/lib/block-provider/BlockSchemaComponentProvider.d.ts +6 -0
- package/lib/block-provider/BlockSchemaComponentProvider.js +87 -6
- package/lib/block-provider/CalendarBlockProvider.js +1 -1
- package/lib/block-provider/FormBlockProvider.js +1 -1
- package/lib/block-provider/FormFieldProvider.js +1 -1
- package/lib/block-provider/GanttBlockProvider.js +1 -1
- package/lib/block-provider/KanbanBlockProvider.js +2 -2
- package/lib/block-provider/SharedFilterProvider.d.ts +3 -3
- package/lib/block-provider/TableBlockProvider.js +6 -6
- package/lib/block-provider/TableFieldProvider.js +2 -2
- package/lib/block-provider/TableSelectorProvider.d.ts +2 -2
- package/lib/block-provider/TableSelectorProvider.js +5 -5
- package/lib/block-provider/hooks/index.js +22 -22
- package/lib/board/Board.js +6 -1
- package/lib/board/Column.js +1 -1
- package/lib/board/style.d.ts +1 -0
- package/lib/board/style.js +14 -0
- package/lib/collection-manager/CollectionField.d.ts +1 -1
- package/lib/collection-manager/CollectionField.js +2 -2
- package/lib/collection-manager/CollectionManagerProvider.js +2 -2
- package/lib/collection-manager/Configuration/AddCollectionAction.js +6 -6
- package/lib/collection-manager/Configuration/AddFieldAction.js +24 -11
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +5 -5
- package/lib/collection-manager/Configuration/CollectionFields.js +7 -3
- package/lib/collection-manager/Configuration/CollectionFieldsTable.d.ts +1 -1
- package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +1 -1
- package/lib/collection-manager/Configuration/ConfigurationTable.js +3 -3
- package/lib/collection-manager/Configuration/EditCollectionAction.js +2 -2
- package/lib/collection-manager/Configuration/EditFieldAction.js +17 -7
- package/lib/collection-manager/Configuration/EditSubFieldAction.js +2 -2
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +17 -7
- package/lib/collection-manager/Configuration/SyncFieldsAction.js +6 -6
- package/lib/collection-manager/Configuration/ViewInheritedField.js +4 -4
- package/lib/collection-manager/Configuration/components/CollectionCategory.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/CollectionFieldInterface.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/CollectionTemplate.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/FieldSummary.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/TemplateSummay.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/index.js +5 -5
- package/lib/collection-manager/ResourceActionProvider.js +1 -1
- package/lib/collection-manager/action-hooks.d.ts +5 -1
- package/lib/collection-manager/action-hooks.js +48 -72
- package/lib/collection-manager/hooks/useCollection.d.ts +1 -1
- package/lib/collection-manager/hooks/useCollectionManager.js +3 -3
- package/lib/collection-manager/index.d.ts +1 -0
- package/lib/collection-manager/index.js +11 -0
- package/lib/collection-manager/interfaces/collection.d.ts +2 -0
- package/lib/{route-switch/RouteSwitchProvider.js → collection-manager/interfaces/collection.js} +34 -29
- package/lib/collection-manager/interfaces/index.d.ts +2 -0
- package/lib/collection-manager/interfaces/index.js +22 -0
- package/lib/collection-manager/interfaces/linkTo.js +1 -1
- package/lib/collection-manager/interfaces/m2m.js +1 -1
- package/lib/collection-manager/interfaces/m2o.js +1 -1
- package/lib/collection-manager/interfaces/o2m.js +1 -1
- package/lib/collection-manager/interfaces/o2o.js +1 -1
- package/lib/collection-manager/interfaces/properties/index.d.ts +1 -0
- package/lib/collection-manager/interfaces/properties/index.js +13 -2
- package/lib/collection-manager/interfaces/properties/operators.d.ts +46 -0
- package/lib/collection-manager/interfaces/properties/operators.js +63 -2
- package/lib/collection-manager/interfaces/tableoid.d.ts +2 -0
- package/lib/collection-manager/interfaces/tableoid.js +50 -0
- package/lib/collection-manager/sub-table.d.ts +1 -1
- package/lib/collection-manager/sub-table.js +1 -1
- package/lib/collection-manager/templates/components/PreviewFields.js +12 -12
- package/lib/collection-manager/templates/properties/index.d.ts +1 -1
- package/lib/document-title/index.d.ts +4 -0
- package/lib/document-title/index.js +48 -2
- package/lib/filter-provider/FilterProvider.d.ts +1 -1
- package/lib/filter-provider/utils.js +2 -2
- package/lib/formula/index.d.ts +1 -0
- package/lib/hooks/useMenuItem.d.ts +1 -1
- package/lib/index.d.ts +11 -1
- package/lib/index.js +31 -1
- package/lib/locale/en_US.d.ts +1 -0
- package/lib/locale/en_US.js +2 -1
- package/lib/locale/index.d.ts +1 -1
- package/lib/locale/ja_JP.d.ts +1 -0
- package/lib/locale/ja_JP.js +2 -1
- package/lib/locale/zh_CN.d.ts +2 -0
- package/lib/locale/zh_CN.js +3 -1
- package/lib/nocobase-buildin-plugin/index.d.ts +8 -0
- package/lib/{application-v2/Application.js → nocobase-buildin-plugin/index.js} +193 -112
- package/lib/plugin-manager/PinnedPluginListProvider.js +1 -1
- package/lib/plugin-manager/index.d.ts +5 -1
- package/lib/plugin-manager/index.js +62 -9
- package/lib/pm/Card.js +12 -7
- package/lib/pm/index.d.ts +8 -2
- package/lib/pm/index.js +109 -48
- package/lib/pm/style.d.ts +10 -0
- package/lib/pm/style.js +20 -0
- package/lib/record-provider/index.js +1 -1
- package/lib/route-switch/antd/admin-layout/index.d.ts +4 -1
- package/lib/route-switch/antd/admin-layout/index.js +55 -8
- package/lib/route-switch/index.d.ts +0 -5
- package/lib/route-switch/index.js +0 -55
- package/lib/schema-component/antd/AntdSchemaComponentProvider.d.ts +6 -0
- package/lib/schema-component/antd/AntdSchemaComponentProvider.js +63 -4
- package/lib/schema-component/antd/__builtins__/hooks/index.d.ts +3 -0
- package/lib/schema-component/antd/__builtins__/hooks/index.js +38 -0
- package/lib/schema-component/antd/__builtins__/hooks/useConfig.d.ts +1 -0
- package/lib/schema-component/antd/__builtins__/hooks/useConfig.js +13 -0
- package/lib/schema-component/antd/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/lib/schema-component/antd/__builtins__/hooks/usePrefixCls.js +20 -0
- package/lib/schema-component/antd/__builtins__/hooks/useToken.d.ts +6 -0
- package/lib/schema-component/antd/__builtins__/hooks/useToken.js +9 -0
- package/lib/schema-component/antd/__builtins__/index.d.ts +2 -0
- package/lib/schema-component/antd/__builtins__/index.js +27 -0
- package/lib/schema-component/antd/__builtins__/style.d.ts +28 -0
- package/lib/schema-component/antd/__builtins__/style.js +71 -0
- package/lib/schema-component/antd/action/Action.Designer.js +34 -12
- package/lib/schema-component/antd/action/Action.Drawer.js +1 -1
- package/lib/schema-component/antd/action/Action.Modal.js +1 -1
- package/lib/schema-component/antd/action/Action.Popover.d.ts +0 -1
- package/lib/schema-component/antd/action/Action.js +8 -6
- package/lib/schema-component/antd/action/ActionBar.d.ts +1 -1
- package/lib/schema-component/antd/action/context.d.ts +1 -1
- package/lib/schema-component/antd/action/types.d.ts +3 -3
- package/lib/schema-component/antd/association-field/AssociationFieldProvider.js +1 -1
- package/lib/schema-component/antd/association-field/AssociationSelect.d.ts +2 -2
- package/lib/schema-component/antd/association-field/AssociationSelect.js +4 -5
- package/lib/schema-component/antd/association-field/FileManager.d.ts +1 -1
- package/lib/schema-component/antd/association-field/InternalNester.js +3 -3
- package/lib/schema-component/antd/association-field/InternalPicker.d.ts +1 -1
- package/lib/schema-component/antd/association-field/InternalPicker.js +1 -1
- package/lib/schema-component/antd/association-field/InternalSubTable.js +3 -3
- package/lib/schema-component/antd/association-field/InternalViewer.js +1 -1
- package/lib/schema-component/antd/association-field/Nester.js +3 -3
- package/lib/schema-component/antd/association-field/hooks.js +3 -3
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.Designer.js +3 -3
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +1 -1
- package/lib/schema-component/antd/association-select/AssociationSelect.d.ts +1 -1
- package/lib/schema-component/antd/association-select/AssociationSelect.js +21 -21
- package/lib/schema-component/antd/association-select/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/association-select/useServiceOptions.js +3 -3
- package/lib/schema-component/antd/auto-complete/AutoComplete.d.ts +6 -0
- package/lib/schema-component/antd/auto-complete/AutoComplete.js +13 -0
- package/lib/schema-component/antd/auto-complete/index.d.ts +1 -0
- package/lib/schema-component/antd/auto-complete/index.js +16 -0
- package/lib/schema-component/antd/calendar/Calendar.d.ts +0 -1
- package/lib/schema-component/antd/calendar/Calendar.js +21 -15
- package/lib/schema-component/antd/calendar/DeleteEvent.js +2 -3
- package/lib/schema-component/antd/calendar/Nav.js +2 -4
- package/lib/schema-component/antd/calendar/Title.js +2 -2
- package/lib/schema-component/antd/calendar/ViewSelect.js +1 -1
- package/lib/schema-component/antd/calendar/global.style.d.ts +3 -0
- package/lib/schema-component/antd/calendar/global.style.js +13 -0
- package/lib/schema-component/antd/calendar/index.d.ts +0 -1
- package/lib/schema-component/antd/calendar/index.js +1 -2
- package/lib/schema-component/antd/calendar/style.d.ts +2 -0
- package/lib/schema-component/antd/calendar/style.js +666 -0
- package/lib/schema-component/antd/calendar/utils.d.ts +3 -3
- package/lib/schema-component/antd/calendar/utils.js +2 -2
- package/lib/schema-component/antd/cascader/Cascader.d.ts +1 -1
- package/lib/schema-component/antd/cascader/Cascader.js +1 -1
- package/lib/schema-component/antd/checkbox/Checkbox.d.ts +1 -1
- package/lib/schema-component/antd/collection-select/CollectionSelect.d.ts +3 -1
- package/lib/schema-component/antd/collection-select/CollectionSelect.js +21 -7
- package/lib/schema-component/antd/color-select/ColorSelect.d.ts +1 -1
- package/lib/schema-component/antd/color-select/ColorSelect.js +1 -1
- package/lib/schema-component/antd/cron/CronSet.js +1 -1
- package/lib/schema-component/antd/date-picker/DatePicker.js +63 -7
- package/lib/schema-component/antd/date-picker/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/date-picker/ReadPretty.js +5 -6
- package/lib/schema-component/antd/date-picker/util.d.ts +22 -21
- package/lib/schema-component/antd/date-picker/util.js +9 -8
- package/lib/schema-component/antd/error-fallback/ErrorFallback.d.ts +3 -4
- package/lib/schema-component/antd/expand-action/Expand.Action.Design.js +1 -1
- package/lib/schema-component/antd/expand-action/Expand.Action.js +2 -2
- package/lib/schema-component/antd/filter/Filter.js +11 -5
- package/lib/schema-component/antd/filter/FilterAction.d.ts +1 -1
- package/lib/schema-component/antd/filter/FilterGroup.d.ts +1 -1
- package/lib/schema-component/antd/filter/FilterItem.d.ts +1 -1
- package/lib/schema-component/antd/filter/FilterItem.js +3 -3
- package/lib/schema-component/antd/filter/FilterItems.js +1 -1
- package/lib/schema-component/antd/filter/context.d.ts +1 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +13 -104
- package/lib/schema-component/antd/filter/useValues.js +3 -3
- package/lib/schema-component/antd/form/Form.d.ts +2 -2
- package/lib/schema-component/antd/form/Form.js +6 -6
- package/lib/schema-component/antd/form-item/FormItem.js +63 -54
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +10 -10
- package/lib/schema-component/antd/form-v2/Form.Designer.js +2 -2
- package/lib/schema-component/antd/form-v2/Form.js +7 -7
- package/lib/schema-component/antd/form-v2/FormField.js +1 -1
- package/lib/schema-component/antd/form-v2/Templates.js +1 -1
- package/lib/schema-component/antd/g2plot/G2Plot.d.ts +1 -1
- package/lib/schema-component/antd/g2plot/G2Plot.js +1 -1
- package/lib/schema-component/antd/g2plot/G2PlotDesigner.js +2 -2
- package/lib/schema-component/antd/gantt/components/calendar/calendar.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/gantt/task-gantt-content.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/gantt/task-gantt-content.js +4 -4
- package/lib/schema-component/antd/gantt/components/gantt/task-gantt.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/grid/grid-body.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/grid/grid-body.js +1 -1
- package/lib/schema-component/antd/gantt/components/grid/grid.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/other/arrow.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/other/tooltip.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-date-handle.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-progress-handle.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/task-item.d.ts +1 -1
- package/lib/schema-component/antd/gantt/helpers/date-helper.d.ts +3 -2
- package/lib/schema-component/antd/gantt/types/bar-task.d.ts +1 -1
- package/lib/schema-component/antd/gantt/types/gantt-task-actions.d.ts +3 -3
- package/lib/schema-component/antd/gantt/types/public-types.d.ts +1 -1
- package/lib/schema-component/antd/grid/Grid.js +2 -2
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.js +4 -4
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +4 -4
- package/lib/schema-component/antd/icon-picker/IconPicker.d.ts +1 -1
- package/lib/schema-component/antd/icon-picker/IconPicker.js +8 -8
- package/lib/schema-component/antd/index.d.ts +2 -1
- package/lib/schema-component/antd/index.js +22 -11
- package/lib/schema-component/antd/index.less +1 -0
- package/lib/schema-component/antd/input/Input.d.ts +1 -1
- package/lib/schema-component/antd/input/Input.js +1 -1
- package/lib/schema-component/antd/input/Json.d.ts +2 -2
- package/lib/schema-component/antd/input/Json.js +1 -1
- package/lib/schema-component/antd/input/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/input/ReadPretty.js +1 -1
- package/lib/schema-component/antd/input-number/InputNumber.d.ts +1 -1
- package/lib/schema-component/antd/input-number/InputNumber.js +2 -1
- package/lib/schema-component/antd/kanban/Kanban.Card.js +6 -6
- package/lib/schema-component/antd/kanban/Kanban.d.ts +0 -2
- package/lib/schema-component/antd/kanban/Kanban.js +8 -8
- package/lib/schema-component/antd/kanban/style.d.ts +1 -0
- package/lib/schema-component/antd/kanban/style.js +40 -0
- package/lib/schema-component/antd/list/List.Decorator.js +3 -3
- package/lib/schema-component/antd/list/List.Designer.js +4 -4
- package/lib/schema-component/antd/markdown/Markdown.Void.js +1 -1
- package/lib/schema-component/antd/markdown/Markdown.d.ts +0 -1
- package/lib/schema-component/antd/markdown/Markdown.js +10 -6
- package/lib/schema-component/antd/markdown/style.d.ts +1 -0
- package/lib/schema-component/antd/markdown/style.js +27 -0
- package/lib/schema-component/antd/menu/Menu.Designer.js +3 -3
- package/lib/schema-component/antd/menu/Menu.d.ts +1 -1
- package/lib/schema-component/antd/menu/MenuItemInitializers/index.js +7 -7
- package/lib/schema-component/antd/page/FixedBlock.js +1 -1
- package/lib/schema-component/antd/page/Page.js +8 -8
- package/lib/schema-component/antd/page/PageTabDesigner.js +2 -2
- package/lib/schema-component/antd/pagination/index.d.ts +1 -1
- package/lib/schema-component/antd/password/PasswordStrength.d.ts +1 -1
- package/lib/schema-component/antd/percent/Percent.d.ts +1 -1
- package/lib/schema-component/antd/preview/Preview.d.ts +2 -3
- package/lib/schema-component/antd/preview/Preview.js +22 -17
- package/lib/schema-component/antd/quick-edit/QuickEdit.js +5 -5
- package/lib/schema-component/antd/radio/Radio.d.ts +1 -1
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +1 -1
- package/lib/schema-component/antd/remote-select/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/remote-select/RemoteSelect.d.ts +1 -1
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +38 -20
- package/lib/schema-component/antd/rich-text/RichText.d.ts +1 -2
- package/lib/schema-component/antd/rich-text/RichText.js +8 -3
- package/lib/schema-component/antd/rich-text/style.d.ts +7 -0
- package/lib/schema-component/antd/rich-text/style.js +821 -0
- package/lib/schema-component/antd/select/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/select/Select.js +3 -3
- package/lib/schema-component/antd/space/index.js +5 -5
- package/lib/schema-component/antd/table/Table.Column.Decorator.js +1 -1
- package/lib/schema-component/antd/table/Table.Column.Designer.js +1 -1
- package/lib/schema-component/antd/table/Table.Void.Designer.js +2 -2
- package/lib/schema-component/antd/table/Table.Void.d.ts +1 -1
- package/lib/schema-component/antd/table/Table.Void.js +3 -3
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.js +1 -1
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +3 -3
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +5 -5
- package/lib/schema-component/antd/table-v2/TableField.js +1 -1
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +2 -2
- package/lib/schema-component/antd/tabs/Tabs.js +1 -7
- package/lib/schema-component/antd/time-picker/ReadPretty.js +3 -3
- package/lib/schema-component/antd/time-picker/TimePicker.d.ts +1 -1
- package/lib/schema-component/antd/time-picker/TimePicker.js +3 -3
- package/lib/schema-component/antd/tree-select/ReadPretty.js +3 -3
- package/lib/schema-component/antd/tree-select/TreeSelect.js +1 -1
- package/lib/schema-component/antd/upload/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/upload/ReadPretty.js +18 -13
- package/lib/schema-component/antd/upload/Upload.d.ts +0 -1
- package/lib/schema-component/antd/upload/Upload.js +43 -31
- package/lib/schema-component/antd/upload/shared.d.ts +2 -0
- package/lib/schema-component/antd/upload/shared.js +3 -3
- package/lib/schema-component/antd/upload/style.d.ts +1 -0
- package/lib/schema-component/antd/upload/style.js +52 -0
- package/lib/schema-component/antd/variable/Input.js +78 -75
- package/lib/schema-component/antd/variable/JSONInput.js +7 -43
- package/lib/schema-component/antd/variable/RawTextArea.d.ts +2 -0
- package/lib/schema-component/antd/variable/RawTextArea.js +75 -0
- package/lib/schema-component/antd/variable/TextArea.js +155 -56
- package/lib/schema-component/antd/variable/Variable.d.ts +4 -3
- package/lib/schema-component/antd/variable/Variable.js +3 -1
- package/lib/schema-component/antd/variable/VariableSelect.d.ts +7 -2
- package/lib/schema-component/antd/variable/VariableSelect.js +48 -12
- package/lib/schema-component/antd/variable/XButton.d.ts +5 -5
- package/lib/schema-component/antd/variable/style.d.ts +1 -0
- package/lib/schema-component/antd/variable/style.js +81 -0
- package/lib/schema-component/common/dnd-context/index.js +1 -1
- package/lib/schema-component/common/utils/uitls.d.ts +8 -4
- package/lib/schema-component/common/utils/uitls.js +2 -2
- package/lib/schema-component/core/SchemaComponent.js +1 -1
- package/lib/schema-component/core/SchemaComponentOptions.d.ts +1 -0
- package/lib/schema-component/core/SchemaComponentOptions.js +2 -1
- package/lib/schema-component/core/index.d.ts +6 -0
- package/lib/schema-component/core/index.js +71 -1
- package/lib/schema-component/hooks/useDesignable.d.ts +2 -2
- package/lib/schema-component/hooks/useDesignable.js +4 -4
- package/lib/schema-component/hooks/useFieldComponentOptions.js +1 -1
- package/lib/schema-component/hooks/useFieldModeOptions.js +1 -1
- package/lib/schema-component/hooks/useFieldTitle.js +1 -1
- package/lib/schema-initializer/SchemaInitializer.d.ts +0 -1
- package/lib/schema-initializer/SchemaInitializer.js +12 -16
- package/lib/schema-initializer/buttons/KanbanCardFormItemInitializers.d.ts +0 -1
- package/lib/schema-initializer/buttons/RecordBlockInitializers.js +1 -1
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +1 -1
- package/lib/schema-initializer/components/BulkEditField.js +1 -1
- package/lib/schema-initializer/components/CreateRecordAction.d.ts +2 -2
- package/lib/schema-initializer/components/CreateRecordAction.js +111 -35
- package/lib/schema-initializer/components/DuplicateAction.d.ts +1 -1
- package/lib/schema-initializer/components/DuplicateAction.js +41 -27
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +35 -154
- package/lib/schema-initializer/index.d.ts +7 -3
- package/lib/schema-initializer/index.js +84 -27
- package/lib/schema-initializer/items/CalendarBlockInitializer.js +3 -3
- package/lib/schema-initializer/items/GanttBlockInitializer.js +10 -10
- package/lib/schema-initializer/items/KanbanBlockInitializer.js +11 -11
- package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +12 -12
- package/lib/schema-initializer/style.d.ts +6 -0
- package/lib/schema-initializer/style.js +16 -0
- package/lib/schema-initializer/types.d.ts +5 -5
- package/lib/schema-initializer/utils.js +10 -10
- package/lib/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -1
- package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.d.ts +1 -1
- package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.js +5 -5
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.d.ts +1 -2
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.js +24 -22
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.style.d.ts +5 -0
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.style.js +15 -0
- package/lib/schema-settings/DataTemplates/components/Designer.js +1 -1
- package/lib/schema-settings/EnableChildCollections/DynamicComponent.d.ts +9 -0
- package/lib/schema-settings/EnableChildCollections/DynamicComponent.js +58 -0
- package/lib/schema-settings/EnableChildCollections/index.d.ts +1 -1
- package/lib/schema-settings/EnableChildCollections/index.js +5 -4
- package/lib/schema-settings/GeneralSchemaDesigner.js +5 -1
- package/lib/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +1 -1
- package/lib/schema-settings/LinkageRules/LinkageRuleAction.d.ts +2 -2
- package/lib/schema-settings/LinkageRules/LinkageRuleAction.js +8 -8
- package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +1 -1
- package/lib/schema-settings/LinkageRules/Variables.js +1 -1
- package/lib/schema-settings/LinkageRules/components/EnableLinkage.d.ts +1 -1
- package/lib/schema-settings/LinkageRules/components/EnableLinkage.js +5 -5
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.d.ts +1 -2
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.js +24 -22
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.style.d.ts +5 -0
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.style.js +15 -0
- package/lib/schema-settings/LinkageRules/index.d.ts +1 -1
- package/lib/schema-settings/LinkageRules/index.js +4 -3
- package/lib/schema-settings/SchemaSettings.d.ts +1 -1
- package/lib/schema-settings/SchemaSettings.js +78 -50
- package/lib/schema-settings/VariableInput/VariableInput.d.ts +3 -1
- package/lib/schema-settings/VariableInput/VariableInput.js +7 -2
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.d.ts +2 -4
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.js +16 -9
- package/lib/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +15 -5
- package/lib/schema-settings/VariableInput/hooks/useIterationVariable.js +67 -46
- package/lib/schema-settings/VariableInput/hooks/useUserVariable.js +1 -3
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +22 -5
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +4 -4
- package/lib/schema-settings/VariableInput/type.d.ts +3 -2
- package/lib/schema-templates/BlockTemplate.d.ts +1 -1
- package/lib/schema-templates/SchemaTemplateManagerProvider.d.ts +6 -0
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +72 -38
- package/lib/system-settings/SystemSettingsProvider.js +0 -14
- package/lib/system-settings/index.d.ts +4 -0
- package/lib/system-settings/index.js +54 -1
- package/lib/user/ChangePassword.d.ts +1 -1
- package/lib/user/CurrentUser.js +2 -5
- package/lib/user/CurrentUserProvider.d.ts +1 -0
- package/lib/user/CurrentUserProvider.js +32 -2
- package/lib/user/EditProfile.d.ts +1 -1
- package/lib/user/LanguageSettings.d.ts +1 -1
- package/lib/user/LanguageSettings.js +1 -1
- package/lib/user/SwitchRole.d.ts +1 -1
- package/lib/user/SwitchRole.js +2 -25
- package/package.json +14 -12
- package/.dumi/global.less +0 -1
- package/es/acl/style.less +0 -10
- package/es/application/compose.d.ts +0 -2
- package/es/application-v2/Application.d.ts +0 -31
- package/es/application-v2/Plugin.d.ts +0 -14
- package/es/application-v2/PluginManager.d.ts +0 -19
- package/es/application-v2/Router.d.ts +0 -13
- package/es/application-v2/Router.js +0 -103
- package/es/application-v2/components/AppComponent.d.ts +0 -2
- package/es/application-v2/components/AppComponent.js +0 -20
- package/es/application-v2/components/MainComponent.d.ts +0 -6
- package/es/application-v2/components/MainComponent.js +0 -13
- package/es/application-v2/components/RouterProvider.d.ts +0 -14
- package/es/application-v2/components/RouterProvider.js +0 -105
- package/es/application-v2/components/index.d.ts +0 -13
- package/es/application-v2/components/index.js +0 -13
- package/es/application-v2/compose.d.ts +0 -2
- package/es/application-v2/compose.js +0 -41
- package/es/application-v2/hooks/index.d.ts +0 -3
- package/es/application-v2/hooks/index.js +0 -3
- package/es/application-v2/hooks/useApp.d.ts +0 -1
- package/es/application-v2/hooks/useLoad.d.ts +0 -1
- package/es/application-v2/hooks/useRouter.d.ts +0 -1
- package/es/application-v2/index.d.ts +0 -3
- package/es/application-v2/index.js +0 -3
- package/es/application-v2/types.d.ts +0 -26
- package/es/application-v2/types.js +0 -1
- package/es/board/style.less +0 -154
- package/es/route-switch/RouteSwitch.d.ts +0 -3
- package/es/route-switch/RouteSwitch.js +0 -87
- package/es/route-switch/RouteSwitchProvider.d.ts +0 -4
- package/es/route-switch/context.d.ts +0 -11
- package/es/route-switch/context.js +0 -9
- package/es/route-switch/hooks.d.ts +0 -3
- package/es/route-switch/hooks.js +0 -26
- package/es/route-switch/types.d.ts +0 -27
- package/es/route-switch/types.js +0 -1
- package/es/schema-component/antd/calendar/style.less +0 -811
- package/es/schema-component/antd/filter/style.less +0 -18
- package/es/schema-component/antd/kanban/index.less +0 -19
- package/es/schema-component/antd/markdown/style.less +0 -16
- package/es/schema-component/antd/rich-text/style.less +0 -950
- package/es/schema-component/antd/upload/style.less +0 -60
- package/es/schema-initializer/style.less +0 -4
- package/es/user/ThemeSettings.d.ts +0 -1
- package/es/user/ThemeSettings.js +0 -75
- package/lib/acl/style.less +0 -10
- package/lib/application/compose.d.ts +0 -2
- package/lib/application/compose.js +0 -49
- package/lib/application-v2/Application.d.ts +0 -31
- package/lib/application-v2/Plugin.d.ts +0 -14
- package/lib/application-v2/PluginManager.d.ts +0 -19
- package/lib/application-v2/Router.d.ts +0 -13
- package/lib/application-v2/Router.js +0 -111
- package/lib/application-v2/components/AppComponent.d.ts +0 -2
- package/lib/application-v2/components/AppComponent.js +0 -28
- package/lib/application-v2/components/MainComponent.d.ts +0 -6
- package/lib/application-v2/components/RouterProvider.d.ts +0 -14
- package/lib/application-v2/components/RouterProvider.js +0 -115
- package/lib/application-v2/components/index.d.ts +0 -13
- package/lib/application-v2/components/index.js +0 -56
- package/lib/application-v2/compose.d.ts +0 -2
- package/lib/application-v2/hooks/index.d.ts +0 -3
- package/lib/application-v2/hooks/useApp.d.ts +0 -1
- package/lib/application-v2/hooks/useLoad.d.ts +0 -1
- package/lib/application-v2/hooks/useRouter.d.ts +0 -1
- package/lib/application-v2/index.d.ts +0 -3
- package/lib/application-v2/index.js +0 -38
- package/lib/application-v2/types.d.ts +0 -26
- package/lib/application-v2/types.js +0 -5
- package/lib/board/style.less +0 -154
- package/lib/route-switch/RouteSwitch.d.ts +0 -3
- package/lib/route-switch/RouteSwitch.js +0 -96
- package/lib/route-switch/RouteSwitchProvider.d.ts +0 -4
- package/lib/route-switch/context.d.ts +0 -11
- package/lib/route-switch/context.js +0 -18
- package/lib/route-switch/hooks.d.ts +0 -3
- package/lib/route-switch/hooks.js +0 -35
- package/lib/route-switch/types.d.ts +0 -27
- package/lib/route-switch/types.js +0 -5
- package/lib/schema-component/antd/calendar/style.less +0 -811
- package/lib/schema-component/antd/filter/style.less +0 -18
- package/lib/schema-component/antd/kanban/index.less +0 -19
- package/lib/schema-component/antd/markdown/style.less +0 -16
- package/lib/schema-component/antd/rich-text/style.less +0 -950
- package/lib/schema-component/antd/upload/style.less +0 -60
- package/lib/schema-initializer/style.less +0 -4
- package/lib/user/ThemeSettings.d.ts +0 -1
- package/lib/user/ThemeSettings.js +0 -84
- /package/es/{application-v2 → application}/context.js +0 -0
- /package/es/{application-v2 → application}/hooks/useRouter.js +0 -0
- /package/lib/{application-v2 → application}/context.js +0 -0
- /package/lib/{application-v2 → application}/hooks/useRouter.js +0 -0
package/docs/develop.md
CHANGED
package/docs/intro.md
CHANGED
|
@@ -8,92 +8,48 @@ order: 1
|
|
|
8
8
|
|
|
9
9
|
示例:
|
|
10
10
|
|
|
11
|
-
```tsx
|
|
12
|
-
const app = new Application();
|
|
13
|
-
|
|
14
|
-
app.use([MemoryRouter, { initialEntries: ['/'] }]);
|
|
15
|
-
|
|
16
|
-
app.use(({ children }) => {
|
|
17
|
-
const location = useLocation();
|
|
18
|
-
if (location.pathname === '/hello') {
|
|
19
|
-
return <div>Hello NocoBase!</div>;
|
|
20
|
-
}
|
|
21
|
-
return children;
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export default app.compose();
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## RouteSwitch
|
|
28
|
-
|
|
29
|
-
稍微复杂的应用都会用到路由来管理前端的页面,如下:
|
|
30
|
-
|
|
31
|
-
```jsx
|
|
11
|
+
```tsx
|
|
32
12
|
/**
|
|
33
13
|
* defaultShowCode: true
|
|
34
|
-
* title: Router
|
|
35
14
|
*/
|
|
36
15
|
import React from 'react';
|
|
37
|
-
import {
|
|
16
|
+
import { Link, Outlet } from 'react-router-dom';
|
|
17
|
+
import { Application } from '@nocobase/client';
|
|
38
18
|
|
|
39
19
|
const Home = () => <h1>Home</h1>;
|
|
40
20
|
const About = () => <h1>About</h1>;
|
|
41
21
|
|
|
42
|
-
const
|
|
43
|
-
<
|
|
44
|
-
<Link to={'/'}>Home</Link>, <Link to={'/about'}>About</Link>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</Routes>
|
|
49
|
-
</Router>
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
export default App;
|
|
53
|
-
```
|
|
22
|
+
const Layout = () => {
|
|
23
|
+
return <div>
|
|
24
|
+
<div><Link to={'/'}>Home</Link>, <Link to={'/about'}>About</Link></div>
|
|
25
|
+
<Outlet />
|
|
26
|
+
</div>
|
|
27
|
+
}
|
|
54
28
|
|
|
55
|
-
|
|
29
|
+
const app = new Application({
|
|
30
|
+
router: {
|
|
31
|
+
type: 'memory',
|
|
32
|
+
initialEntries: ['/']
|
|
33
|
+
}
|
|
34
|
+
})
|
|
56
35
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
* title: RouteSwitch
|
|
61
|
-
*/
|
|
62
|
-
import React from 'react';
|
|
63
|
-
import { Link, MemoryRouter as Router } from 'react-router-dom';
|
|
64
|
-
import { RouteRedirectProps, RouteSwitchProvider, RouteSwitch } from '@nocobase/client';
|
|
36
|
+
app.router.add('root', {
|
|
37
|
+
element: <Layout />
|
|
38
|
+
})
|
|
65
39
|
|
|
66
|
-
|
|
67
|
-
|
|
40
|
+
app.router.add('root.home', {
|
|
41
|
+
path: '/',
|
|
42
|
+
element: <Home />
|
|
43
|
+
})
|
|
68
44
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
component: 'Home',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
type: 'route',
|
|
77
|
-
path: '/about',
|
|
78
|
-
component: 'About',
|
|
79
|
-
},
|
|
80
|
-
];
|
|
45
|
+
app.router.add('root.about', {
|
|
46
|
+
path: '/about',
|
|
47
|
+
element: <About />
|
|
48
|
+
})
|
|
81
49
|
|
|
82
|
-
export default ()
|
|
83
|
-
return (
|
|
84
|
-
<RouteSwitchProvider components={{ Home, About }}>
|
|
85
|
-
<Router initialEntries={['/']}>
|
|
86
|
-
<Link to={'/'}>Home</Link>, <Link to={'/about'}>About</Link>
|
|
87
|
-
<RouteSwitch routes={routes} />
|
|
88
|
-
</Router>
|
|
89
|
-
</RouteSwitchProvider>
|
|
90
|
-
);
|
|
91
|
-
};
|
|
50
|
+
export default app.getRootComponent();
|
|
92
51
|
```
|
|
93
52
|
|
|
94
|
-
- 由 RouteSwitchProvider 配置 components,由开发编写,以 Layout 或 Template 的方式提供给 RouteSwitch 使用。
|
|
95
|
-
- 由 RouteSwitch 配置 routes,JSON 的方式,可以由后端获取,方便后续的动态化、无代码的支持。
|
|
96
|
-
|
|
97
53
|
## SchemaComponent
|
|
98
54
|
|
|
99
55
|
路由可以通过 JSON 的方式配置,可以注册诸多可供路由使用的组件模板,以方便各种场景支持,但是这些组件还是需要开发编写和维护,所以进一步将组件抽象,转换成配置化的方式。如:
|
|
@@ -459,101 +415,6 @@ export default function App() {
|
|
|
459
415
|
}
|
|
460
416
|
```
|
|
461
417
|
|
|
462
|
-
## RouteSwitch + SchemaComponent
|
|
463
|
-
|
|
464
|
-
当路由和组件都可以配置之后,可以进一步将二者结合,例子如下:
|
|
465
|
-
|
|
466
|
-
```tsx
|
|
467
|
-
/**
|
|
468
|
-
* defaultShowCode: true
|
|
469
|
-
* title: RouteSwitch + SchemaComponent
|
|
470
|
-
*/
|
|
471
|
-
import React, { useMemo, useEffect } from 'react';
|
|
472
|
-
import { Link, MemoryRouter as Router } from 'react-router-dom';
|
|
473
|
-
import {
|
|
474
|
-
RouteRedirectProps,
|
|
475
|
-
RouteSwitchProvider,
|
|
476
|
-
RouteSwitch,
|
|
477
|
-
useRoute,
|
|
478
|
-
SchemaComponentProvider,
|
|
479
|
-
SchemaComponent,
|
|
480
|
-
useDesignable,
|
|
481
|
-
useSchemaComponentContext,
|
|
482
|
-
} from '@nocobase/client';
|
|
483
|
-
import { Spin, Button } from 'antd';
|
|
484
|
-
import { observer, Schema } from '@formily/react';
|
|
485
|
-
|
|
486
|
-
const Hello = observer(({ name }) => {
|
|
487
|
-
const { patch, remove } = useDesignable();
|
|
488
|
-
return (
|
|
489
|
-
<div>
|
|
490
|
-
<h1>Hello {name}!</h1>
|
|
491
|
-
<Button
|
|
492
|
-
onClick={() => {
|
|
493
|
-
patch('x-component-props.name', Math.random());
|
|
494
|
-
}}
|
|
495
|
-
>更新</Button>
|
|
496
|
-
</div>
|
|
497
|
-
)
|
|
498
|
-
}, { displayName: 'Hello' });
|
|
499
|
-
|
|
500
|
-
const RouteSchemaComponent = (props) => {
|
|
501
|
-
const route = useRoute();
|
|
502
|
-
const { reset } = useSchemaComponentContext();
|
|
503
|
-
useEffect(() => {
|
|
504
|
-
reset();
|
|
505
|
-
}, route.schema);
|
|
506
|
-
return <SchemaComponent schema={route.schema}/>
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
const routes: RouteRedirectProps[] = [
|
|
510
|
-
{
|
|
511
|
-
type: 'route',
|
|
512
|
-
path: '/',
|
|
513
|
-
component: 'RouteSchemaComponent',
|
|
514
|
-
schema: {
|
|
515
|
-
name: 'home',
|
|
516
|
-
'x-component': 'Hello',
|
|
517
|
-
'x-component-props': {
|
|
518
|
-
name: 'Home',
|
|
519
|
-
},
|
|
520
|
-
},
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
type: 'route',
|
|
524
|
-
path: '/about',
|
|
525
|
-
component: 'RouteSchemaComponent',
|
|
526
|
-
schema: {
|
|
527
|
-
name: 'home',
|
|
528
|
-
'x-component': 'Hello',
|
|
529
|
-
'x-component-props': {
|
|
530
|
-
name: 'About',
|
|
531
|
-
},
|
|
532
|
-
},
|
|
533
|
-
},
|
|
534
|
-
];
|
|
535
|
-
|
|
536
|
-
export default () => {
|
|
537
|
-
return (
|
|
538
|
-
<SchemaComponentProvider components={{ Hello }}>
|
|
539
|
-
<RouteSwitchProvider components={{ RouteSchemaComponent }}>
|
|
540
|
-
<Router initialEntries={['/']}>
|
|
541
|
-
<Link to={'/'}>Home</Link>, <Link to={'/about'}>About</Link>
|
|
542
|
-
<RouteSwitch routes={routes} />
|
|
543
|
-
</Router>
|
|
544
|
-
</RouteSwitchProvider>
|
|
545
|
-
</SchemaComponentProvider>
|
|
546
|
-
);
|
|
547
|
-
};
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
以上例子实现了路由和组件层面的配置化,在开发层面配置了两个组件:
|
|
551
|
-
|
|
552
|
-
- `<RouteSchemaComponent/>` 简易的可以在路由里配置 schema 的方案
|
|
553
|
-
- `<Hello/>` 自定义的 Schema 组件
|
|
554
|
-
|
|
555
|
-
为了让大家更加能感受到 Schema 组件的不一样之处,例子添加了一个简易的随机更新 `x-component-props.name` 值的按钮,当路由切换后,更新后的 name 并不会被重置。这也是 Schema 组件的 Designable 的能力,可以任意的动态更新 schema 配置,实时更新,实时渲染。
|
|
556
|
-
|
|
557
418
|
## Designable
|
|
558
419
|
|
|
559
420
|
SchemaComponent 基于 Formily 的 SchemaField,Formily 提供了 [Designable](https://github.com/alibaba/designable) 来解决 Schema 的配置问题,但是这套方案:
|
|
@@ -781,7 +642,6 @@ const { data, loading } = useRequest();
|
|
|
781
642
|
|
|
782
643
|
客户端的扩展以 Providers 的形式存在,提供各种可供组件使用的 Context,可全局也可以局部使用。上文我们已经介绍了核心的三个 Providers:
|
|
783
644
|
|
|
784
|
-
- RouteSwitchProvider,提供配置路由所需的 Layout 和 Template 组件
|
|
785
645
|
- SchemaComponentProvider,提供配置 Schema 所需的各种组件
|
|
786
646
|
- ApiClientProvider,提供客户端 SDK
|
|
787
647
|
|
|
@@ -800,16 +660,14 @@ const { data, loading } = useRequest();
|
|
|
800
660
|
```tsx | pure
|
|
801
661
|
<ApiClientProvider>
|
|
802
662
|
<SchemaComponentProvider>
|
|
803
|
-
<RouteSwitchProvider>
|
|
804
663
|
{...}
|
|
805
|
-
</RouteSwitchProvider>
|
|
806
664
|
</SchemaComponentProvider>
|
|
807
665
|
</ApiClientProvider>
|
|
808
666
|
```
|
|
809
667
|
|
|
810
668
|
但是这样的方式不利于 Providers 的管理和扩展,为此提炼了 `compose()` 函数用于配置多个 providers,如下:
|
|
811
669
|
|
|
812
|
-
<code id='intro-demo2' defaultShowCode="true" titile="compose" src="../src/application/demos/demo1
|
|
670
|
+
<code id='intro-demo2' defaultShowCode="true" titile="compose" src="../src/application/demos/demo1.tsx"></code>
|
|
813
671
|
|
|
814
672
|
## Application
|
|
815
673
|
|
package/es/acl/ACLProvider.js
CHANGED
|
@@ -21,6 +21,7 @@ import { useResourceActionContext } from '../collection-manager/ResourceActionPr
|
|
|
21
21
|
import { useRecord } from '../record-provider';
|
|
22
22
|
import { SchemaComponentOptions, useDesignable } from '../schema-component';
|
|
23
23
|
export var ACLContext = /*#__PURE__*/createContext({});
|
|
24
|
+
// TODO: delete this,replace by `ACLPlugin`
|
|
24
25
|
export var ACLProvider = function ACLProvider(props) {
|
|
25
26
|
return /*#__PURE__*/React.createElement(SchemaComponentOptions, {
|
|
26
27
|
components: {
|
|
@@ -33,7 +34,7 @@ export var ACLProvider = function ACLProvider(props) {
|
|
|
33
34
|
};
|
|
34
35
|
var getRouteUrl = function getRouteUrl(props) {
|
|
35
36
|
var _props$children;
|
|
36
|
-
if (props
|
|
37
|
+
if (props !== null && props !== void 0 && props.match) {
|
|
37
38
|
return props.match;
|
|
38
39
|
}
|
|
39
40
|
return props && getRouteUrl(props === null || props === void 0 ? void 0 : (_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.props);
|
|
@@ -48,7 +49,7 @@ export var ACLRolesCheckProvider = function ACLRolesCheckProvider(props) {
|
|
|
48
49
|
}, {
|
|
49
50
|
onSuccess: function onSuccess(data) {
|
|
50
51
|
var _data$data, _data$data2;
|
|
51
|
-
if (!(data
|
|
52
|
+
if (!(data !== null && data !== void 0 && (_data$data = data.data) !== null && _data$data !== void 0 && _data$data.snippets.includes('ui.*'))) {
|
|
52
53
|
setDesignable(false);
|
|
53
54
|
}
|
|
54
55
|
if ((data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.role) !== api.auth.role) {
|
|
@@ -131,10 +132,10 @@ var getIgnoreScope = function getIgnoreScope() {
|
|
|
131
132
|
if (options.ignoreScope) {
|
|
132
133
|
ignoreScope = true;
|
|
133
134
|
}
|
|
134
|
-
if (schema
|
|
135
|
+
if (schema !== null && schema !== void 0 && schema['x-acl-ignore-scope']) {
|
|
135
136
|
ignoreScope = true;
|
|
136
137
|
}
|
|
137
|
-
if (schema
|
|
138
|
+
if (schema !== null && schema !== void 0 && (_schema$xAclAction = schema['x-acl-action-props']) !== null && _schema$xAclAction !== void 0 && _schema$xAclAction['skipScopeCheck']) {
|
|
138
139
|
ignoreScope = true;
|
|
139
140
|
}
|
|
140
141
|
if (!recordPkValue) {
|
|
@@ -184,7 +185,7 @@ export function useACLRoleContext() {
|
|
|
184
185
|
return r ? {} : null;
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
|
-
if (data
|
|
188
|
+
if (data !== null && data !== void 0 && data.allowAll) {
|
|
188
189
|
return {};
|
|
189
190
|
}
|
|
190
191
|
if (inResources(resourceName)) {
|
|
@@ -202,7 +203,7 @@ export var ACLCollectionProvider = function ACLCollectionProvider(props) {
|
|
|
202
203
|
if (allowAll) {
|
|
203
204
|
return props.children;
|
|
204
205
|
}
|
|
205
|
-
var actionPath = schema['x-acl-action'];
|
|
206
|
+
var actionPath = schema === null || schema === void 0 ? void 0 : schema['x-acl-action'];
|
|
206
207
|
if (!actionPath) {
|
|
207
208
|
return props.children;
|
|
208
209
|
}
|
|
@@ -237,7 +238,7 @@ export var ACLActionProvider = function ACLActionProvider(props) {
|
|
|
237
238
|
if (!actionPath && resource && schema['x-action']) {
|
|
238
239
|
actionPath = "".concat(resource, ":").concat(schema['x-action']);
|
|
239
240
|
}
|
|
240
|
-
if (!((_actionPath = actionPath)
|
|
241
|
+
if (!((_actionPath = actionPath) !== null && _actionPath !== void 0 && _actionPath.includes(':'))) {
|
|
241
242
|
actionPath = "".concat(resource, ":").concat(actionPath);
|
|
242
243
|
}
|
|
243
244
|
if (!actionPath) {
|
|
@@ -17,6 +17,7 @@ import { useAPIClient, useRequest } from '../../api-client';
|
|
|
17
17
|
import { SettingsCenterContext } from '../../pm';
|
|
18
18
|
import { useRecord } from '../../record-provider';
|
|
19
19
|
import { useCompile } from '../../schema-component';
|
|
20
|
+
import { useStyles } from '../style';
|
|
20
21
|
var getParentKeys = function getParentKeys(tree, func) {
|
|
21
22
|
var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
22
23
|
if (!tree) return [];
|
|
@@ -98,6 +99,8 @@ var formatPluginTabs = function formatPluginTabs(data) {
|
|
|
98
99
|
return pluginsTabs;
|
|
99
100
|
};
|
|
100
101
|
export var SettingsCenterConfigure = function SettingsCenterConfigure() {
|
|
102
|
+
var _useStyles = useStyles(),
|
|
103
|
+
styles = _useStyles.styles;
|
|
101
104
|
var record = useRecord();
|
|
102
105
|
var api = useAPIClient();
|
|
103
106
|
var pluginTags = useContext(SettingMenuContext);
|
|
@@ -161,6 +164,7 @@ export var SettingsCenterConfigure = function SettingsCenterConfigure() {
|
|
|
161
164
|
};
|
|
162
165
|
}();
|
|
163
166
|
return (items === null || items === void 0 ? void 0 : items.length) && /*#__PURE__*/React.createElement(Table, {
|
|
167
|
+
className: styles,
|
|
164
168
|
loading: loading,
|
|
165
169
|
rowKey: 'key',
|
|
166
170
|
pagination: false,
|
|
@@ -181,7 +185,7 @@ export var SettingsCenterConfigure = function SettingsCenterConfigure() {
|
|
|
181
185
|
title: t('Accessible'),
|
|
182
186
|
render: function render(_, record) {
|
|
183
187
|
var _data$data;
|
|
184
|
-
var checked = !(data
|
|
188
|
+
var checked = !(data !== null && data !== void 0 && (_data$data = data.data) !== null && _data$data !== void 0 && _data$data.includes('!' + record.key));
|
|
185
189
|
return !record.children && /*#__PURE__*/React.createElement(Checkbox, {
|
|
186
190
|
checked: checked,
|
|
187
191
|
onChange: function onChange() {
|
|
@@ -19,6 +19,7 @@ import React, { useState } from 'react';
|
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
20
20
|
import { useAPIClient, useRequest } from '../../api-client';
|
|
21
21
|
import { useRecord } from '../../record-provider';
|
|
22
|
+
import { useStyles } from '../style';
|
|
22
23
|
import { useMenuItems } from './MenuItemsProvider';
|
|
23
24
|
var findUids = function findUids(items) {
|
|
24
25
|
if (!Array.isArray(items)) {
|
|
@@ -82,6 +83,8 @@ var getChildrenUids = function getChildrenUids() {
|
|
|
82
83
|
return arr;
|
|
83
84
|
};
|
|
84
85
|
export var MenuConfigure = function MenuConfigure() {
|
|
86
|
+
var _useStyles = useStyles(),
|
|
87
|
+
styles = _useStyles.styles;
|
|
85
88
|
var record = useRecord();
|
|
86
89
|
var api = useAPIClient();
|
|
87
90
|
var _useMenuItems = useMenuItems(),
|
|
@@ -160,6 +163,7 @@ export var MenuConfigure = function MenuConfigure() {
|
|
|
160
163
|
};
|
|
161
164
|
}();
|
|
162
165
|
return /*#__PURE__*/React.createElement(Table, {
|
|
166
|
+
className: styles,
|
|
163
167
|
loading: loading,
|
|
164
168
|
rowKey: 'uid',
|
|
165
169
|
pagination: false,
|
|
@@ -22,7 +22,7 @@ export var SettingCenterPermissionProvider = function SettingCenterPermissionPro
|
|
|
22
22
|
var _currentRecord$snippe;
|
|
23
23
|
var _useContext = useContext(PermissionContext),
|
|
24
24
|
currentRecord = _useContext.currentRecord;
|
|
25
|
-
if (!(currentRecord
|
|
25
|
+
if (!(currentRecord !== null && currentRecord !== void 0 && (_currentRecord$snippe = currentRecord.snippets) !== null && _currentRecord$snippe !== void 0 && _currentRecord$snippe.includes('pm.*'))) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
return /*#__PURE__*/React.createElement("div", null, props.children);
|
|
@@ -22,7 +22,8 @@ var SnippetCheckboxGroup = connect(function (props) {
|
|
|
22
22
|
t = _useTranslation.t;
|
|
23
23
|
return /*#__PURE__*/React.createElement(Checkbox.Group, {
|
|
24
24
|
style: {
|
|
25
|
-
width: '100%'
|
|
25
|
+
width: '100%',
|
|
26
|
+
display: 'block'
|
|
26
27
|
},
|
|
27
28
|
value: props.value,
|
|
28
29
|
onChange: function onChange(values) {
|
|
@@ -33,7 +34,7 @@ var SnippetCheckboxGroup = connect(function (props) {
|
|
|
33
34
|
var value = uniq([].concat(_toConsumableArray(props.value || []), _toConsumableArray(values))).filter(function (key) {
|
|
34
35
|
return key && !disallowSnippets.includes(key);
|
|
35
36
|
}).map(function (key) {
|
|
36
|
-
if (!snippets.includes(key) ||
|
|
37
|
+
if (!snippets.includes(key) || values !== null && values !== void 0 && values.includes(key)) {
|
|
37
38
|
return key;
|
|
38
39
|
}
|
|
39
40
|
return "!".concat(key);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const RoleResourceCollectionContext: React.Context<any>;
|
|
3
|
-
export declare const RolesResourcesActions: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const RolesResourcesActions: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -11,13 +11,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import { FormItem, FormLayout } from '@formily/antd';
|
|
14
|
+
import { FormItem, FormLayout } from '@formily/antd-v5';
|
|
15
15
|
import { connect, useField, useForm } from '@formily/react';
|
|
16
16
|
import { Checkbox, Table, Tag } from 'antd';
|
|
17
17
|
import { isEmpty } from 'lodash';
|
|
18
18
|
import React, { createContext } from 'react';
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
20
20
|
import { useCollectionManager, useCompile, useRecord } from '../..';
|
|
21
|
+
import { useStyles } from '../style';
|
|
21
22
|
import { useAvailableActions } from './RoleTable';
|
|
22
23
|
import { ScopeSelect } from './ScopeSelect';
|
|
23
24
|
var toActionMap = function toActionMap(arr) {
|
|
@@ -34,6 +35,8 @@ var toActionMap = function toActionMap(arr) {
|
|
|
34
35
|
export var RoleResourceCollectionContext = /*#__PURE__*/createContext({});
|
|
35
36
|
export var RolesResourcesActions = connect(function (props) {
|
|
36
37
|
var _collectionFields$fil;
|
|
38
|
+
var _useStyles = useStyles(),
|
|
39
|
+
styles = _useStyles.styles;
|
|
37
40
|
// const { onChange } = props;
|
|
38
41
|
var _onChange = function onChange(values) {
|
|
39
42
|
var items = values.map(function (item) {
|
|
@@ -133,6 +136,7 @@ export var RolesResourcesActions = connect(function (props) {
|
|
|
133
136
|
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
134
137
|
label: t('Action permission')
|
|
135
138
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
139
|
+
className: styles,
|
|
136
140
|
size: 'small',
|
|
137
141
|
pagination: false,
|
|
138
142
|
columns: [{
|
|
@@ -191,6 +195,7 @@ export var RolesResourcesActions = connect(function (props) {
|
|
|
191
195
|
})), /*#__PURE__*/React.createElement(FormItem, {
|
|
192
196
|
label: t('Field permission')
|
|
193
197
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
198
|
+
className: styles,
|
|
194
199
|
pagination: false,
|
|
195
200
|
dataSource: fieldPermissions,
|
|
196
201
|
columns: [{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const StrategyActions: React.ForwardRefExoticComponent<
|
|
2
|
+
export declare const StrategyActions: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -93,7 +93,7 @@ export var StrategyActions = connect(function (props) {
|
|
|
93
93
|
title: t('Data scope'),
|
|
94
94
|
render: function render(scope, action) {
|
|
95
95
|
return !action.onNewRecord && /*#__PURE__*/React.createElement(Select, {
|
|
96
|
-
|
|
96
|
+
popupMatchSelectWidth: false,
|
|
97
97
|
size: 'small',
|
|
98
98
|
value: scope,
|
|
99
99
|
options: [{
|
package/es/acl/index.d.ts
CHANGED
package/es/acl/index.js
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
15
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1
17
|
export * from './ACLProvider';
|
|
2
18
|
export * from './ACLShortcut';
|
|
3
|
-
import '
|
|
19
|
+
import { Plugin } from '../application/Plugin';
|
|
20
|
+
import { ACLActionProvider, ACLCollectionFieldProvider, ACLCollectionProvider, ACLMenuItemProvider } from './ACLProvider';
|
|
21
|
+
export var ACLPlugin = /*#__PURE__*/function (_Plugin) {
|
|
22
|
+
_inherits(ACLPlugin, _Plugin);
|
|
23
|
+
var _super = _createSuper(ACLPlugin);
|
|
24
|
+
function ACLPlugin() {
|
|
25
|
+
_classCallCheck(this, ACLPlugin);
|
|
26
|
+
return _super.apply(this, arguments);
|
|
27
|
+
}
|
|
28
|
+
_createClass(ACLPlugin, [{
|
|
29
|
+
key: "load",
|
|
30
|
+
value: function () {
|
|
31
|
+
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
32
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33
|
+
while (1) switch (_context.prev = _context.next) {
|
|
34
|
+
case 0:
|
|
35
|
+
this.app.addComponents({
|
|
36
|
+
ACLCollectionFieldProvider: ACLCollectionFieldProvider,
|
|
37
|
+
ACLActionProvider: ACLActionProvider,
|
|
38
|
+
ACLMenuItemProvider: ACLMenuItemProvider,
|
|
39
|
+
ACLCollectionProvider: ACLCollectionProvider
|
|
40
|
+
});
|
|
41
|
+
case 1:
|
|
42
|
+
case "end":
|
|
43
|
+
return _context.stop();
|
|
44
|
+
}
|
|
45
|
+
}, _callee, this);
|
|
46
|
+
}));
|
|
47
|
+
function load() {
|
|
48
|
+
return _load.apply(this, arguments);
|
|
49
|
+
}
|
|
50
|
+
return load;
|
|
51
|
+
}()
|
|
52
|
+
}]);
|
|
53
|
+
return ACLPlugin;
|
|
54
|
+
}(Plugin);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<import("antd-style").SerializedStyles>;
|
package/es/acl/style.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref) {
|
|
5
|
+
var css = _ref.css;
|
|
6
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-table-cell {\n > .ant-space-horizontal {\n .ant-space-item:empty:not(:last-child) + .ant-space-item-split {\n display: none;\n }\n .ant-space-item-split:has(+ .ant-space-item:last-child:empty) {\n display: none;\n }\n }\n }\n "])));
|
|
7
|
+
});
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Plugin } from '../application/Plugin';
|
|
2
3
|
export declare const AppLangContext: React.Context<any>;
|
|
3
4
|
export declare const useAppLangContext: () => any;
|
|
4
5
|
export declare function AntdConfigProvider(props: any): React.JSX.Element;
|
|
6
|
+
export declare class AntdConfigPlugin extends Plugin {
|
|
7
|
+
load(): Promise<void>;
|
|
8
|
+
}
|