@nocobase/client 0.9.4-alpha.1 → 0.10.0-alpha.2
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/.dumi/global.less +1 -0
- package/.dumi/theme/builtins/LangSwitch/index.tsx +11 -0
- package/.dumi/theme/builtins/Previewer/index.tsx +23 -0
- package/.dumirc.ts +56 -0
- package/contributing.md +1 -1
- package/docs/develop.md +5 -0
- package/{intro.md → docs/intro.md} +21 -27
- package/es/acl/ACLProvider.d.ts +6 -7
- package/es/acl/ACLProvider.js +6 -22
- package/es/acl/ACLShortcut.d.ts +2 -3
- package/es/acl/ACLShortcut.js +2 -61
- package/es/acl/Configuration/ConfigureCenter.d.ts +3 -2
- package/es/acl/Configuration/ConfigureCenter.js +7 -22
- package/es/acl/Configuration/FilterDynamicComponent.d.ts +2 -2
- package/es/acl/Configuration/MenuConfigure.d.ts +2 -1
- package/es/acl/Configuration/MenuItemsProvider.d.ts +2 -1
- package/es/acl/Configuration/PermisionProvider.d.ts +2 -2
- package/es/acl/Configuration/RoleConfigure.d.ts +2 -1
- package/es/acl/Configuration/RoleTable.d.ts +2 -1
- package/es/acl/Configuration/ScopeSelect.d.ts +2 -1
- package/es/acl/Configuration/schemas/scopes.d.ts +1 -0
- package/es/antd-config-provider/index.d.ts +1 -1
- package/es/api-client/APIClient.d.ts +1 -1
- package/es/api-client/APIClientProvider.d.ts +2 -1
- package/es/api-client/hooks/assign.d.ts +0 -1
- package/es/api-client/hooks/assign.js +1 -7
- package/es/api-client/hooks/useRequest.d.ts +1 -1
- package/es/api-client/hooks/useRequest.js +1 -1
- package/es/appInfo/CurrentAppInfoProvider.d.ts +1 -1
- package/es/application/Application.d.ts +2 -1
- package/es/application/Application.js +5 -4
- package/es/application/compose.d.ts +2 -1
- package/es/application-v2/Application.d.ts +31 -0
- package/es/application-v2/Application.js +139 -0
- package/es/application-v2/Plugin.d.ts +14 -0
- package/es/application-v2/Plugin.js +92 -0
- package/es/application-v2/PluginManager.d.ts +19 -0
- package/es/application-v2/PluginManager.js +242 -0
- package/es/application-v2/Router.d.ts +13 -0
- package/es/application-v2/Router.js +103 -0
- package/es/application-v2/components/AppComponent.d.ts +2 -0
- package/es/application-v2/components/AppComponent.js +20 -0
- package/es/application-v2/components/MainComponent.d.ts +6 -0
- package/es/application-v2/components/MainComponent.js +13 -0
- package/es/application-v2/components/RouterProvider.d.ts +14 -0
- package/es/application-v2/components/RouterProvider.js +105 -0
- package/es/application-v2/components/index.d.ts +13 -0
- package/es/application-v2/components/index.js +13 -0
- package/es/application-v2/compose.d.ts +2 -0
- package/es/application-v2/compose.js +41 -0
- package/es/application-v2/context.d.ts +3 -0
- package/es/application-v2/context.js +2 -0
- package/es/application-v2/hooks/index.d.ts +3 -0
- package/es/application-v2/hooks/index.js +3 -0
- package/es/application-v2/hooks/useApp.d.ts +1 -0
- package/es/application-v2/hooks/useApp.js +5 -0
- package/es/application-v2/hooks/useLoad.d.ts +1 -0
- package/es/application-v2/hooks/useLoad.js +38 -0
- package/es/application-v2/hooks/useRouter.d.ts +1 -0
- package/es/application-v2/hooks/useRouter.js +5 -0
- package/es/application-v2/index.d.ts +3 -0
- package/es/application-v2/index.js +3 -0
- package/es/application-v2/types.d.ts +26 -0
- package/es/application-v2/types.js +1 -0
- package/es/async-data-provider/index.d.ts +1 -1
- package/es/auth/OptionsComponent.d.ts +7 -0
- package/es/auth/OptionsComponent.js +20 -0
- package/es/auth/SigninPage.d.ts +23 -0
- package/es/auth/SigninPage.js +141 -0
- package/es/auth/SigninPageExtension.d.ts +22 -0
- package/es/auth/SigninPageExtension.js +30 -0
- package/es/auth/SignupPage.d.ts +24 -0
- package/es/auth/SignupPage.js +82 -0
- package/es/auth/index.d.ts +4 -0
- package/es/auth/index.js +4 -0
- package/es/block-provider/BlockProvider.d.ts +4 -3
- package/es/block-provider/BlockProvider.js +23 -6
- package/es/block-provider/CalendarBlockProvider.d.ts +1 -1
- package/es/block-provider/DetailsBlockProvider.d.ts +1 -1
- package/es/block-provider/DetailsBlockProvider.js +1 -13
- package/es/block-provider/FilterFormBlockProvider.d.ts +2 -1
- package/es/block-provider/FormBlockProvider.d.ts +1 -1
- package/es/block-provider/FormBlockProvider.js +10 -21
- package/es/block-provider/FormFieldProvider.d.ts +1 -1
- package/es/block-provider/GanttBlockProvider.d.ts +1 -1
- package/es/block-provider/KanbanBlockProvider.d.ts +1 -1
- package/es/block-provider/TableBlockProvider.d.ts +1 -2
- package/es/block-provider/TableBlockProvider.js +57 -82
- package/es/block-provider/TableFieldProvider.d.ts +1 -1
- package/es/block-provider/TableSelectorProvider.d.ts +2 -2
- package/es/block-provider/hooks/index.d.ts +10 -1
- package/es/block-provider/hooks/index.js +53 -137
- package/es/block-provider/index.d.ts +1 -0
- package/es/block-provider/index.js +2 -1
- package/es/board/Card.d.ts +2 -2
- package/es/board/CardAdder.d.ts +2 -2
- package/es/board/CardForm.d.ts +2 -2
- package/es/board/Column.d.ts +3 -3
- package/es/board/ColumnAdder.d.ts +2 -2
- package/es/board/ColumnForm.d.ts +2 -2
- package/es/board/DefaultCard.d.ts +2 -2
- package/es/board/DefaultColumnHeader.d.ts +2 -2
- package/es/board/Kanban.d.ts +2 -2
- package/es/board/withDroppable.d.ts +2 -1
- package/es/china-region/index.d.ts +2 -1
- package/es/collection-manager/CollectionField.d.ts +1 -1
- package/es/collection-manager/CollectionField.js +2 -1
- package/es/collection-manager/CollectionManagerProvider.d.ts +2 -2
- package/es/collection-manager/CollectionManagerShortcut.d.ts +2 -3
- package/es/collection-manager/CollectionManagerShortcut.js +3 -60
- package/es/collection-manager/Configuration/AddCategoryAction.d.ts +3 -2
- package/es/collection-manager/Configuration/AddCategoryAction.js +2 -2
- package/es/collection-manager/Configuration/AddCollectionAction.d.ts +3 -2
- package/es/collection-manager/Configuration/AddCollectionAction.js +2 -2
- package/es/collection-manager/Configuration/AddFieldAction.d.ts +3 -2
- package/es/collection-manager/Configuration/AddFieldAction.js +2 -2
- package/es/collection-manager/Configuration/AddSubFieldAction.d.ts +2 -1
- package/es/collection-manager/Configuration/AddSubFieldAction.js +2 -2
- package/es/collection-manager/Configuration/CollectionFields.d.ts +2 -1
- package/es/collection-manager/Configuration/CollectionFieldsTable.d.ts +2 -2
- package/es/collection-manager/Configuration/CollectionFieldsTable.js +3 -1
- package/es/collection-manager/Configuration/CollectionFieldsTableArray.d.ts +2 -2
- package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +3 -1
- package/es/collection-manager/Configuration/ConfigurationTable.d.ts +2 -1
- package/es/collection-manager/Configuration/ConfigurationTabs.d.ts +2 -1
- package/es/collection-manager/Configuration/ConfigurationTabs.js +4 -0
- package/es/collection-manager/Configuration/EditCategoryAction.d.ts +3 -2
- package/es/collection-manager/Configuration/EditCategoryAction.js +2 -2
- package/es/collection-manager/Configuration/EditCollectionAction.d.ts +3 -2
- package/es/collection-manager/Configuration/EditCollectionAction.js +2 -2
- package/es/collection-manager/Configuration/EditFieldAction.d.ts +3 -2
- package/es/collection-manager/Configuration/EditFieldAction.js +2 -2
- package/es/collection-manager/Configuration/EditSubFieldAction.d.ts +2 -1
- package/es/collection-manager/Configuration/EditSubFieldAction.js +2 -2
- package/es/collection-manager/Configuration/OverridingCollectionField.d.ts +3 -2
- package/es/collection-manager/Configuration/OverridingCollectionField.js +2 -2
- package/es/collection-manager/Configuration/SyncFieldsAction.d.ts +3 -2
- package/es/collection-manager/Configuration/SyncFieldsAction.js +2 -2
- package/es/collection-manager/Configuration/ViewInheritedField.d.ts +3 -2
- package/es/collection-manager/Configuration/ViewInheritedField.js +2 -2
- package/es/collection-manager/Configuration/components/CollectionCategory.d.ts +1 -1
- package/es/collection-manager/Configuration/components/CollectionCategory.js +2 -0
- package/es/collection-manager/Configuration/components/CollectionFieldInterface.d.ts +1 -1
- package/es/collection-manager/Configuration/components/CollectionFieldInterface.js +2 -0
- package/es/collection-manager/Configuration/components/CollectionTemplate.d.ts +1 -1
- package/es/collection-manager/Configuration/components/CollectionTemplate.js +2 -0
- package/es/collection-manager/Configuration/components/FieldSummary.d.ts +1 -1
- package/es/collection-manager/Configuration/components/FieldSummary.js +4 -2
- package/es/collection-manager/Configuration/components/TemplateSummay.d.ts +1 -1
- package/es/collection-manager/Configuration/components/TemplateSummay.js +4 -2
- package/es/collection-manager/Configuration/components/index.d.ts +6 -6
- package/es/collection-manager/Configuration/components/index.js +12 -0
- package/es/collection-manager/Configuration/interfaces.d.ts +1 -0
- package/es/collection-manager/Configuration/templates.d.ts +1 -0
- package/es/collection-manager/ResourceActionProvider.d.ts +1 -1
- package/es/collection-manager/action-hooks.d.ts +1 -0
- package/es/collection-manager/action-hooks.js +168 -90
- package/es/collection-manager/index.d.ts +1 -1
- package/es/collection-manager/index.js +1 -1
- package/es/collection-manager/interfaces/components/index.d.ts +7 -6
- package/es/collection-manager/interfaces/index.d.ts +0 -1
- package/es/collection-manager/interfaces/index.js +0 -1
- package/es/collection-manager/interfaces/properties/index.d.ts +0 -1
- package/es/collection-manager/interfaces/properties/index.js +0 -40
- package/es/collection-manager/interfaces/url.js +0 -5
- package/es/collection-manager/sub-table.d.ts +2 -2
- package/es/collection-manager/sub-table.js +4 -0
- package/es/collection-manager/templates/components/PreviewFields.d.ts +1 -1
- package/es/collection-manager/templates/components/PreviewFields.js +2 -1
- package/es/collection-manager/templates/components/PreviewTable.d.ts +2 -1
- package/es/collection-manager/types.d.ts +2 -0
- package/es/filter-provider/FilterProvider.d.ts +5 -1
- package/es/filter-provider/FilterProvider.js +8 -3
- package/es/formula/Expression.d.ts +2 -1
- package/es/formula/Result.d.ts +2 -1
- package/es/formula/index.d.ts +2 -2
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useViewport.d.ts +1 -0
- package/es/hooks/useViewport.js +41 -0
- package/es/i18n/i18n.js +0 -1
- package/es/icon/Icon.d.ts +2 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/locale/en_US.d.ts +16 -21
- package/es/locale/en_US.js +19 -24
- package/es/locale/es_ES.d.ts +3 -1
- package/es/locale/es_ES.js +4 -2
- package/es/locale/ja_JP.d.ts +16 -19
- package/es/locale/ja_JP.js +17 -20
- package/es/locale/pt_BR.d.ts +2 -0
- package/es/locale/pt_BR.js +3 -1
- package/es/locale/ru_RU.d.ts +2 -18
- package/es/locale/ru_RU.js +3 -19
- package/es/locale/tr_TR.d.ts +0 -17
- package/es/locale/tr_TR.js +0 -17
- package/es/locale/zh_CN.d.ts +26 -24
- package/es/locale/zh_CN.js +28 -26
- package/es/plugin-manager/PinnedPluginListProvider.d.ts +1 -1
- package/es/plugin-manager/index.d.ts +1 -3
- package/es/plugin-manager/index.js +1 -3
- package/es/pm/Card.d.ts +8 -0
- package/es/pm/Card.js +364 -0
- package/es/pm/PluginManagerLink.d.ts +3 -2
- package/es/pm/PluginManagerLink.js +28 -20
- package/es/pm/index.d.ts +31 -2
- package/es/pm/index.js +82 -261
- package/es/powered-by/index.d.ts +2 -1
- package/es/route-switch/RouteSwitch.d.ts +2 -2
- package/es/route-switch/RouteSwitch.js +76 -45
- package/es/route-switch/RouteSwitchProvider.d.ts +3 -3
- package/es/route-switch/antd/admin-layout/index.d.ts +4 -2
- package/es/route-switch/antd/admin-layout/index.js +57 -53
- package/es/route-switch/antd/auth-layout/index.d.ts +2 -2
- package/es/route-switch/antd/auth-layout/index.js +2 -1
- package/es/route-switch/antd/route-schema-component/index.d.ts +2 -2
- package/es/route-switch/antd/route-schema-component/index.js +3 -3
- package/es/route-switch/context.d.ts +4 -0
- package/es/route-switch/context.js +5 -2
- package/es/route-switch/types.d.ts +2 -5
- package/es/schema-component/antd/AntdSchemaComponentProvider.d.ts +2 -1
- package/es/schema-component/antd/action/Action.Container.js +4 -0
- package/es/schema-component/antd/action/Action.Designer.d.ts +2 -1
- package/es/schema-component/antd/action/Action.Designer.js +208 -22
- package/es/schema-component/antd/action/Action.Drawer.js +15 -13
- package/es/schema-component/antd/action/Action.Link.js +3 -1
- package/es/schema-component/antd/action/Action.Modal.js +13 -12
- package/es/schema-component/antd/action/Action.Page.js +8 -2
- package/es/schema-component/antd/action/Action.js +28 -20
- package/es/schema-component/antd/action/ActionBar.d.ts +18 -2
- package/es/schema-component/antd/action/ActionBar.js +46 -20
- package/es/schema-component/antd/action/context.d.ts +8 -2
- package/es/schema-component/antd/action/context.js +15 -2
- package/es/schema-component/antd/action/hooks.d.ts +2 -0
- package/es/schema-component/antd/association-field/AssociationFieldProvider.d.ts +1 -1
- package/es/schema-component/antd/association-field/AssociationFieldProvider.js +100 -7
- package/es/schema-component/antd/association-field/AssociationSelect.js +89 -11
- package/es/schema-component/antd/association-field/Editable.d.ts +1 -1
- package/es/schema-component/antd/association-field/Editable.js +13 -44
- package/es/schema-component/antd/association-field/FileManager.d.ts +1 -1
- package/es/schema-component/antd/association-field/FileManager.js +14 -4
- package/es/schema-component/antd/association-field/InternalNester.d.ts +2 -1
- package/es/schema-component/antd/association-field/InternalNester.js +12 -1
- package/es/schema-component/antd/association-field/InternalPicker.d.ts +1 -1
- package/es/schema-component/antd/association-field/InternalPicker.js +10 -4
- package/es/schema-component/antd/association-field/InternalSubTable.d.ts +2 -1
- package/es/schema-component/antd/association-field/InternalSubTable.js +35 -6
- package/es/schema-component/antd/association-field/InternalViewer.js +10 -3
- package/es/schema-component/antd/association-field/Nester.d.ts +2 -1
- package/es/schema-component/antd/association-field/Nester.js +66 -15
- package/es/schema-component/antd/association-field/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/association-field/ReadPretty.js +4 -0
- package/es/schema-component/antd/association-field/SubTable.js +53 -12
- package/es/schema-component/antd/association-field/components/CreateRecordAction.d.ts +1 -1
- package/es/schema-component/antd/association-field/components/CreateRecordAction.js +4 -2
- package/es/schema-component/antd/association-field/context.d.ts +2 -0
- package/es/schema-component/antd/association-field/hooks.d.ts +2 -0
- package/es/schema-component/antd/association-field/schema.d.ts +3 -15
- package/es/schema-component/antd/association-field/schema.js +4 -16
- package/es/schema-component/antd/association-filter/ActionBarAssociationFilterAction.d.ts +2 -1
- package/es/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.d.ts +2 -1
- package/es/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.d.ts +2 -1
- package/es/schema-component/antd/association-filter/AssociationFilter.Initializer.d.ts +2 -1
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.Designer.d.ts +2 -1
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.d.ts +2 -1
- package/es/schema-component/antd/association-filter/AssociationFilter.d.ts +7 -6
- package/es/schema-component/antd/association-filter/AssociationFilterDesignerDelete.d.ts +2 -1
- package/es/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.d.ts +2 -1
- package/es/schema-component/antd/association-select/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/association-select/ReadPretty.js +2 -0
- package/es/schema-component/antd/block-item/BlockItem.js +6 -3
- package/es/schema-component/antd/block-item/TestDesigner.d.ts +2 -1
- package/es/schema-component/antd/calendar/Calendar.Designer.d.ts +2 -1
- package/es/schema-component/antd/calendar/Calendar.js +7 -5
- package/es/schema-component/antd/calendar/DeleteEvent.d.ts +1 -1
- package/es/schema-component/antd/calendar/DeleteEvent.js +2 -0
- package/es/schema-component/antd/calendar/Event.d.ts +1 -1
- package/es/schema-component/antd/calendar/Event.js +2 -0
- package/es/schema-component/antd/calendar/Nav.d.ts +1 -1
- package/es/schema-component/antd/calendar/Nav.js +5 -3
- package/es/schema-component/antd/calendar/Title.d.ts +1 -1
- package/es/schema-component/antd/calendar/Title.js +2 -0
- package/es/schema-component/antd/calendar/Today.d.ts +1 -1
- package/es/schema-component/antd/calendar/Today.js +4 -2
- package/es/schema-component/antd/calendar/ViewSelect.d.ts +1 -1
- package/es/schema-component/antd/calendar/ViewSelect.js +3 -0
- package/es/schema-component/antd/calendar/components/Header.d.ts +2 -1
- package/es/schema-component/antd/card-item/CardItem.js +1 -1
- package/es/schema-component/antd/cascader/Cascader.js +8 -1
- package/es/schema-component/antd/checkbox/Checkbox.d.ts +2 -1
- package/es/schema-component/antd/checkbox/Checkbox.js +14 -12
- package/es/schema-component/antd/collection-select/CollectionSelect.js +2 -0
- package/es/schema-component/antd/cron/Cron.d.ts +2 -1
- package/es/schema-component/antd/cron/Cron.js +3 -2
- package/es/schema-component/antd/date-picker/DatePicker.d.ts +4 -2
- package/es/schema-component/antd/date-picker/DatePicker.js +2 -1
- package/es/schema-component/antd/date-picker/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/date-picker/ReadPretty.js +1 -1
- package/es/schema-component/antd/error-fallback/ErrorFallback.d.ts +2 -1
- package/es/schema-component/antd/expand-action/Expand.Action.Design.d.ts +2 -1
- package/es/schema-component/antd/expand-action/Expand.Action.Design.js +2 -2
- package/es/schema-component/antd/expand-action/Expand.Action.d.ts +2 -1
- package/es/schema-component/antd/expand-action/Expand.Action.js +3 -6
- package/es/schema-component/antd/filter/DynamicComponent.d.ts +2 -1
- package/es/schema-component/antd/filter/Filter.Action.Designer.d.ts +2 -1
- package/es/schema-component/antd/filter/Filter.js +3 -1
- package/es/schema-component/antd/filter/FilterAction.d.ts +1 -1
- package/es/schema-component/antd/filter/FilterAction.js +5 -3
- package/es/schema-component/antd/filter/FilterItem.d.ts +1 -1
- package/es/schema-component/antd/filter/FilterItem.js +46 -41
- package/es/schema-component/antd/filter/FilterItems.d.ts +1 -1
- package/es/schema-component/antd/filter/FilterItems.js +2 -0
- package/es/schema-component/antd/filter/SaveDefaultValue.d.ts +2 -1
- package/es/schema-component/antd/filter/index.d.ts +1 -0
- package/es/schema-component/antd/filter/index.js +1 -0
- package/es/schema-component/antd/filter/useValues.js +3 -3
- package/es/schema-component/antd/form/Form.Designer.d.ts +2 -1
- package/es/schema-component/antd/form/Form.d.ts +1 -1
- package/es/schema-component/antd/form/Form.js +2 -0
- package/es/schema-component/antd/form-item/FormItem.FilterFormDesigner.d.ts +2 -1
- package/es/schema-component/antd/form-item/FormItem.js +99 -34
- package/es/schema-component/antd/form-item/SchemaSettingOptions.d.ts +11 -10
- package/es/schema-component/antd/form-item/SchemaSettingOptions.js +1 -1
- package/es/schema-component/antd/form-v2/Form.Designer.d.ts +4 -3
- package/es/schema-component/antd/form-v2/Form.FilterDesigner.d.ts +2 -1
- package/es/schema-component/antd/form-v2/Form.js +9 -2
- package/es/schema-component/antd/form-v2/FormField.js +2 -0
- package/es/schema-component/antd/form-v2/Templates.d.ts +7 -1
- package/es/schema-component/antd/form-v2/Templates.js +22 -4
- package/es/schema-component/antd/form-v2/index.js +2 -0
- package/es/schema-component/antd/g2plot/G2Plot.js +2 -0
- package/es/schema-component/antd/g2plot/G2PlotDesigner.d.ts +2 -1
- package/es/schema-component/antd/gantt/Gantt.Designer.d.ts +2 -1
- package/es/schema-component/antd/gantt/components/gantt/Event.d.ts +1 -1
- package/es/schema-component/antd/gantt/components/gantt/Event.js +2 -0
- package/es/schema-component/antd/gantt/components/gantt/gantt.js +2 -2
- package/es/schema-component/antd/grid/Block.d.ts +1 -1
- package/es/schema-component/antd/grid/Block.js +2 -0
- package/es/schema-component/antd/grid/Grid.js +25 -9
- package/es/schema-component/antd/grid-card/GridCard.Decorator.d.ts +1 -1
- package/es/schema-component/antd/grid-card/GridCard.Decorator.js +2 -12
- package/es/schema-component/antd/grid-card/GridCard.Designer.d.ts +2 -1
- package/es/schema-component/antd/grid-card/GridCard.Designer.js +1 -1
- package/es/schema-component/antd/grid-card/GridCard.Item.d.ts +2 -1
- package/es/schema-component/antd/grid-card/GridCard.d.ts +2 -1
- package/es/schema-component/antd/grid-card/GridCard.js +12 -8
- package/es/schema-component/antd/icon-picker/IconPicker.js +2 -2
- package/es/schema-component/antd/index.d.ts +1 -0
- package/es/schema-component/antd/index.js +1 -0
- package/es/schema-component/antd/index.less +20 -4
- package/es/schema-component/antd/input/EllipsisWithTooltip.js +2 -2
- package/es/schema-component/antd/input/Input.d.ts +2 -1
- package/es/schema-component/antd/input/Input.js +3 -2
- package/es/schema-component/antd/input/Json.d.ts +2 -2
- package/es/schema-component/antd/input/Json.js +43 -4
- package/es/schema-component/antd/input/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/input/ReadPretty.js +4 -4
- package/es/schema-component/antd/input-number/InputNumber.d.ts +5 -1
- package/es/schema-component/antd/input-number/InputNumber.js +2 -2
- package/es/schema-component/antd/input-number/ReadPretty.d.ts +2 -2
- package/es/schema-component/antd/input-number/ReadPretty.js +6 -2
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.d.ts +2 -1
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.d.ts +2 -1
- package/es/schema-component/antd/kanban/Kanban.Card.js +5 -3
- package/es/schema-component/antd/kanban/Kanban.CardViewer.js +2 -0
- package/es/schema-component/antd/kanban/Kanban.Designer.d.ts +2 -1
- package/es/schema-component/antd/kanban/Kanban.js +3 -1
- package/es/schema-component/antd/list/List.Decorator.d.ts +1 -1
- package/es/schema-component/antd/list/List.Decorator.js +7 -12
- package/es/schema-component/antd/list/List.Designer.d.ts +2 -1
- package/es/schema-component/antd/list/List.Item.d.ts +2 -1
- package/es/schema-component/antd/list/List.Item.js +1 -1
- package/es/schema-component/antd/list/List.d.ts +2 -1
- package/es/schema-component/antd/markdown/Markdown.Void.Designer.d.ts +2 -1
- package/es/schema-component/antd/markdown/Markdown.Void.js +2 -0
- package/es/schema-component/antd/markdown/Markdown.d.ts +2 -0
- package/es/schema-component/antd/markdown/Markdown.js +6 -2
- package/es/schema-component/antd/markdown/util.js +1 -1
- package/es/schema-component/antd/menu/Menu.Designer.d.ts +2 -1
- package/es/schema-component/antd/menu/Menu.js +46 -37
- package/es/schema-component/antd/menu/MenuItemInitializers/index.d.ts +2 -1
- package/es/schema-component/antd/page/FixedBlock.d.ts +2 -1
- package/es/schema-component/antd/page/FixedBlock.js +6 -2
- package/es/schema-component/antd/page/Page.d.ts +2 -1
- package/es/schema-component/antd/page/Page.js +25 -17
- package/es/schema-component/antd/page/PageTabDesigner.d.ts +3 -2
- package/es/schema-component/antd/pagination/index.d.ts +1 -1
- package/es/schema-component/antd/pagination/index.js +2 -0
- package/es/schema-component/antd/password/Password.d.ts +1 -1
- package/es/schema-component/antd/password/PasswordStrength.js +1 -144
- package/es/schema-component/antd/password/utils.d.ts +1 -0
- package/es/schema-component/antd/password/utils.js +144 -0
- package/es/schema-component/antd/percent/Percent.js +1 -1
- package/es/schema-component/antd/preview/Preview.d.ts +1 -1
- package/es/schema-component/antd/quick-edit/QuickEdit.d.ts +3 -0
- package/es/schema-component/antd/quick-edit/QuickEdit.js +88 -0
- package/es/schema-component/antd/quick-edit/index.d.ts +1 -0
- package/es/schema-component/antd/quick-edit/index.js +1 -0
- package/es/schema-component/antd/radio/Radio.d.ts +1 -1
- package/es/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -1
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +5 -7
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +10 -4
- package/es/schema-component/antd/remote-select/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/remote-select/ReadPretty.js +2 -0
- package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
- package/es/schema-component/antd/remote-select/RemoteSelect.js +56 -26
- package/es/schema-component/antd/select/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/select/ReadPretty.js +6 -6
- package/es/schema-component/antd/select/Select.d.ts +3 -0
- package/es/schema-component/antd/select/Select.js +33 -13
- package/es/schema-component/antd/select/index.d.ts +1 -1
- package/es/schema-component/antd/select/index.js +1 -1
- package/es/schema-component/antd/select/utils.d.ts +14 -0
- package/es/schema-component/antd/select/{shared.js → utils.js} +20 -18
- package/es/schema-component/antd/table/Table.Array.Designer.d.ts +2 -1
- package/es/schema-component/antd/table/Table.Array.d.ts +5 -5
- package/es/schema-component/antd/table/Table.Array.js +7 -5
- package/es/schema-component/antd/table/Table.Column.ActionBar.d.ts +1 -1
- package/es/schema-component/antd/table/Table.Column.ActionBar.js +2 -0
- package/es/schema-component/antd/table/Table.Column.Decorator.d.ts +2 -1
- package/es/schema-component/antd/table/Table.Column.Designer.d.ts +2 -1
- package/es/schema-component/antd/table/Table.Column.d.ts +2 -1
- package/es/schema-component/antd/table/Table.Designer.d.ts +2 -1
- package/es/schema-component/antd/table/Table.RowActionDesigner.d.ts +2 -1
- package/es/schema-component/antd/table/Table.RowSelection.d.ts +1 -1
- package/es/schema-component/antd/table/Table.RowSelection.js +2 -0
- package/es/schema-component/antd/table/Table.Void.Designer.d.ts +2 -1
- package/es/schema-component/antd/table/Table.Void.d.ts +1 -1
- package/es/schema-component/antd/table/Table.Void.js +2 -0
- package/es/schema-component/antd/table-v2/FilterDynamicComponent.d.ts +2 -2
- package/es/schema-component/antd/table-v2/Table.ActionColumnDesigner.d.ts +2 -1
- package/es/schema-component/antd/table-v2/Table.Column.ActionBar.d.ts +1 -1
- package/es/schema-component/antd/table-v2/Table.Column.ActionBar.js +2 -0
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +2 -1
- package/es/schema-component/antd/table-v2/Table.Column.Designer.d.ts +2 -1
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +101 -3
- package/es/schema-component/antd/table-v2/Table.Column.d.ts +2 -1
- package/es/schema-component/antd/table-v2/Table.Designer.d.ts +2 -1
- package/es/schema-component/antd/table-v2/Table.Index.d.ts +2 -1
- package/es/schema-component/antd/table-v2/Table.js +58 -27
- package/es/schema-component/antd/table-v2/TableBlockDesigner.d.ts +2 -1
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +53 -47
- package/es/schema-component/antd/table-v2/TableField.js +4 -0
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.d.ts +2 -1
- package/es/schema-component/antd/table-v2/index.d.ts +1 -0
- package/es/schema-component/antd/table-v2/index.js +1 -0
- package/es/schema-component/antd/table-v2/utils.js +1 -1
- package/es/schema-component/antd/tabs/Tabs.Designer.d.ts +2 -1
- package/es/schema-component/antd/tabs/Tabs.js +23 -5
- package/es/schema-component/antd/tabs/context.d.ts +8 -0
- package/es/schema-component/antd/tabs/context.js +15 -0
- package/es/schema-component/antd/tabs/index.d.ts +1 -0
- package/es/schema-component/antd/tabs/index.js +2 -1
- package/es/schema-component/antd/time-picker/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/time-picker/ReadPretty.js +1 -1
- package/es/schema-component/antd/time-picker/TimePicker.d.ts +1 -1
- package/es/schema-component/antd/time-picker/TimePicker.js +1 -1
- package/es/schema-component/antd/tree-select/ReadPretty.d.ts +1 -1
- package/es/schema-component/antd/tree-select/ReadPretty.js +3 -1
- package/es/schema-component/antd/upload/Upload.js +1 -1
- package/es/schema-component/antd/upload/shared.d.ts +3 -3
- package/es/schema-component/antd/upload/style.less +1 -2
- package/es/schema-component/antd/upload/type.d.ts +2 -2
- package/es/schema-component/antd/variable/Input.d.ts +2 -2
- package/es/schema-component/antd/variable/Input.js +182 -31
- package/es/schema-component/antd/variable/JSONInput.d.ts +2 -2
- package/es/schema-component/antd/variable/JSONInput.js +2 -23
- package/es/schema-component/antd/variable/TextArea.d.ts +2 -2
- package/es/schema-component/antd/variable/VariableSelect.d.ts +2 -2
- package/es/schema-component/common/dnd-context/index.d.ts +1 -1
- package/es/schema-component/common/dnd-context/index.js +11 -4
- package/es/schema-component/common/sortable-item/SortableItem.d.ts +11 -4
- package/es/schema-component/common/sortable-item/SortableItem.js +18 -8
- package/es/schema-component/common/utils/logic.js +64 -2
- package/es/schema-component/common/utils/uitls.js +48 -14
- package/es/schema-component/core/DesignableSwitch.d.ts +2 -1
- package/es/schema-component/core/SchemaComponent.d.ts +2 -1
- package/es/schema-component/core/SchemaComponentOptions.js +13 -8
- package/es/schema-component/core/SchemaComponentProvider.js +17 -6
- package/es/schema-component/hooks/useCompile.js +33 -5
- package/es/schema-component/hooks/useDesignable.d.ts +5 -4
- package/es/schema-component/hooks/useDesignable.js +30 -28
- package/es/schema-component/hooks/useFieldModeOptions.js +45 -21
- package/es/schema-component/hooks/useProps.d.ts +1 -10
- package/es/schema-component/hooks/useProps.js +20 -6
- package/es/schema-initializer/SchemaInitializer.d.ts +12 -3
- package/es/schema-initializer/SchemaInitializer.js +140 -14
- package/es/schema-initializer/SchemaInitializerProvider.d.ts +3 -3
- package/es/schema-initializer/SelectCollection.d.ts +2 -1
- package/es/schema-initializer/buttons/BlockInitializers.d.ts +2 -0
- package/es/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/CreateFormBlockInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/CustomFormItemInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/DetailsActionInitializers.d.ts +14 -0
- package/es/schema-initializer/buttons/DetailsActionInitializers.js +12 -0
- package/es/schema-initializer/buttons/FormItemInitializers.d.ts +3 -2
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +16 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +21 -16
- package/es/schema-initializer/buttons/ReadPrettyFormItemInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/RecordBlockInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/RecordFormBlockInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +4 -3
- package/es/schema-initializer/buttons/TabPaneInitializers.js +3 -3
- package/es/schema-initializer/buttons/TableActionColumnInitializers.d.ts +3 -2
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +12 -3
- package/es/schema-initializer/buttons/TableColumnInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/TableColumnInitializers.js +16 -9
- package/es/schema-initializer/buttons/TableSelectorInitializers.d.ts +2 -1
- package/es/schema-initializer/components/BulkEditField.d.ts +2 -1
- package/es/schema-initializer/components/CreateRecordAction.d.ts +2 -2
- package/es/schema-initializer/components/CreateRecordAction.js +6 -2
- package/es/schema-initializer/components/DeletedField.d.ts +2 -1
- package/es/schema-initializer/components/DuplicateAction.d.ts +3 -0
- package/es/schema-initializer/components/DuplicateAction.js +165 -0
- package/es/schema-initializer/components/assigned-field/AssignedField.d.ts +2 -1
- package/es/schema-initializer/components/assigned-field/AssignedField.js +1 -1
- package/es/schema-initializer/components/index.d.ts +1 -0
- package/es/schema-initializer/components/index.js +2 -1
- package/es/schema-initializer/index.d.ts +1 -1
- package/es/schema-initializer/index.js +1 -1
- package/es/schema-initializer/items/ActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/BlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/BulkDestroyActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CalendarBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CollectionFieldInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CreateActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CreateChildInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CreateFilterActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CreateFormBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CreateResetActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CreateSubmitActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CustomizeActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/DataBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/DeleteEventActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/DestroyActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/DetailsBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/DuplicateActionInitializer.d.ts +2 -0
- package/es/schema-initializer/items/DuplicateActionInitializer.js +61 -0
- package/es/schema-initializer/items/ExpandActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/ExpandActionInitializer.js +3 -3
- package/es/schema-initializer/items/FilterActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/FilterBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/FilterCollapseBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/FilterFormBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/FormBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/G2PlotInitializer.d.ts +2 -1
- package/es/schema-initializer/items/GanttBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/GridCardBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/InitializerWithSwitch.d.ts +2 -1
- package/es/schema-initializer/items/KanbanBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/ListBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/MarkdownBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/PrintActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RecordFormBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/RefreshActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/SelectActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/SubmitActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/TableActionColumnInitializer.d.ts +2 -1
- package/es/schema-initializer/items/TableBlockInitializer.d.ts +2 -1
- package/es/schema-initializer/items/TableCollectionFieldInitializer.d.ts +2 -1
- package/es/schema-initializer/items/TableSelectorInitializer.d.ts +2 -1
- package/es/schema-initializer/items/UpdateActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/UpdateSubmitActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/ViewActionInitializer.d.ts +2 -1
- package/es/schema-initializer/items/index.d.ts +1 -0
- package/es/schema-initializer/items/index.js +1 -0
- package/es/schema-initializer/utils.d.ts +13 -0
- package/es/schema-initializer/utils.js +70 -43
- package/es/schema-items/GeneralSchemaItems.js +5 -3
- package/es/schema-items/OpenModeSchemaItems.js +14 -10
- package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -1
- package/es/schema-settings/DataTemplates/FormDataTemplates.js +8 -6
- package/es/schema-settings/DataTemplates/TreeLabel.d.ts +2 -1
- package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.js +1 -1
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.js +11 -13
- package/es/schema-settings/DataTemplates/components/Designer.d.ts +1 -1
- package/es/schema-settings/DataTemplates/components/Designer.js +2 -0
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +3 -3
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.js +38 -57
- package/es/schema-settings/EnableChildCollections/index.d.ts +1 -1
- package/es/schema-settings/EnableChildCollections/index.js +2 -0
- package/es/schema-settings/GeneralSchemaDesigner.d.ts +2 -1
- package/es/schema-settings/GeneralSchemaDesigner.js +3 -2
- package/es/schema-settings/LinkageRules/DynamicComponent.d.ts +2 -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 +14 -10
- package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +2 -2
- package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.js +2 -0
- package/es/schema-settings/LinkageRules/ValueDynamicComponent.d.ts +2 -1
- package/es/schema-settings/LinkageRules/components/LinkageHeader.js +2 -0
- package/es/schema-settings/LinkageRules/index.d.ts +1 -1
- package/es/schema-settings/LinkageRules/index.js +3 -1
- package/es/schema-settings/SchemaSettings.d.ts +2 -1
- package/es/schema-settings/SchemaSettings.js +29 -18
- package/es/schema-settings/VariableInput/VariableInput.d.ts +1 -1
- package/es/schema-settings/VariableInput/VariableInput.js +1 -1
- package/es/schema-settings/VariableInput/hooks/useDateVariable.d.ts +12 -1
- package/es/schema-settings/VariableInput/hooks/useDateVariable.js +41 -36
- package/es/schema-settings/VariableInput/hooks/useUserVariable.d.ts +4 -4
- package/es/schema-settings/VariableInput/hooks/useUserVariable.js +66 -42
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +12 -1
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.js +6 -2
- package/es/schema-settings/VariableInput/type.d.ts +28 -0
- package/es/schema-settings/VariableInput/type.js +1 -0
- package/es/schema-settings/hooks/useIsShowMultipleSwitch.js +3 -2
- package/es/schema-templates/BlockTemplate.d.ts +1 -1
- package/es/schema-templates/BlockTemplate.js +4 -1
- package/es/schema-templates/BlockTemplateDetails.d.ts +2 -1
- package/es/schema-templates/BlockTemplateDetails.js +6 -6
- package/es/schema-templates/BlockTemplatePage.d.ts +3 -2
- package/es/schema-templates/SchemaTemplateManagerProvider.d.ts +5 -2
- package/es/schema-templates/SchemaTemplateManagerProvider.js +7 -0
- package/es/schema-templates/index.d.ts +0 -1
- package/es/schema-templates/index.js +1 -2
- package/es/settings-form/SettingsForm.js +8 -2
- package/es/system-settings/SystemSettingsProvider.d.ts +5 -3
- package/es/system-settings/SystemSettingsShortcut.d.ts +2 -3
- package/es/system-settings/SystemSettingsShortcut.js +33 -81
- package/es/test/collections.d.ts +1487 -0
- package/es/test/collections.js +1437 -0
- package/es/test/index.d.ts +3 -0
- package/es/test/index.js +3 -0
- package/es/test/mainCollections.d.ts +11359 -0
- package/es/test/mainCollections.js +3 -0
- package/es/test/mockAPIClient.d.ts +6 -0
- package/es/test/mockAPIClient.js +10 -0
- package/es/user/ChangePassword.d.ts +2 -1
- package/es/user/ChangePassword.js +2 -2
- package/es/user/CurrentUser.d.ts +7 -1
- package/es/user/CurrentUser.js +121 -114
- package/es/user/CurrentUserProvider.d.ts +1 -1
- package/es/user/CurrentUserProvider.js +4 -3
- package/es/user/EditProfile.d.ts +2 -1
- package/es/user/EditProfile.js +3 -3
- package/es/user/LanguageSettings.d.ts +2 -1
- package/es/user/SigninPage.d.ts +2 -1
- package/es/user/SigninPage.js +15 -7
- package/es/user/SigninPageExtension.d.ts +1 -1
- package/es/user/SignupPage.d.ts +2 -1
- package/es/user/SignupPage.js +5 -4
- package/es/user/SwitchRole.d.ts +2 -1
- package/es/user/SwitchRole.js +1 -3
- package/es/user/ThemeSettings.d.ts +2 -1
- package/es/user/VerificationCode.d.ts +2 -2
- package/es/user/index.d.ts +0 -3
- package/es/user/index.js +3 -3
- package/lib/acl/ACLProvider.d.ts +6 -7
- package/lib/acl/ACLProvider.js +6 -23
- package/lib/acl/ACLShortcut.d.ts +2 -3
- package/lib/acl/ACLShortcut.js +4 -64
- package/lib/acl/Configuration/ConfigureCenter.d.ts +3 -2
- package/lib/acl/Configuration/ConfigureCenter.js +8 -25
- package/lib/acl/Configuration/FilterDynamicComponent.d.ts +2 -2
- package/lib/acl/Configuration/MenuConfigure.d.ts +2 -1
- package/lib/acl/Configuration/MenuItemsProvider.d.ts +2 -1
- package/lib/acl/Configuration/PermisionProvider.d.ts +2 -2
- package/lib/acl/Configuration/RoleConfigure.d.ts +2 -1
- package/lib/acl/Configuration/RoleTable.d.ts +2 -1
- package/lib/acl/Configuration/ScopeSelect.d.ts +2 -1
- package/lib/acl/Configuration/schemas/scopes.d.ts +1 -0
- package/lib/antd-config-provider/index.d.ts +1 -1
- package/lib/api-client/APIClient.d.ts +1 -1
- package/lib/api-client/APIClientProvider.d.ts +2 -1
- package/lib/api-client/hooks/assign.d.ts +0 -1
- package/lib/api-client/hooks/assign.js +3 -10
- package/lib/api-client/hooks/useRequest.d.ts +1 -1
- package/lib/api-client/hooks/useRequest.js +1 -1
- package/lib/appInfo/CurrentAppInfoProvider.d.ts +1 -1
- package/lib/application/Application.d.ts +2 -1
- package/lib/application/Application.js +7 -6
- package/lib/application/compose.d.ts +2 -1
- package/lib/application-v2/Application.d.ts +31 -0
- package/lib/application-v2/Application.js +147 -0
- package/lib/application-v2/Plugin.d.ts +14 -0
- package/lib/application-v2/Plugin.js +99 -0
- package/lib/application-v2/PluginManager.d.ts +19 -0
- package/lib/application-v2/PluginManager.js +249 -0
- package/lib/application-v2/Router.d.ts +13 -0
- package/lib/application-v2/Router.js +111 -0
- package/lib/application-v2/components/AppComponent.d.ts +2 -0
- package/lib/application-v2/components/AppComponent.js +28 -0
- package/lib/application-v2/components/MainComponent.d.ts +6 -0
- package/lib/application-v2/components/MainComponent.js +23 -0
- package/lib/application-v2/components/RouterProvider.d.ts +14 -0
- package/lib/application-v2/components/RouterProvider.js +115 -0
- package/lib/application-v2/components/index.d.ts +13 -0
- package/lib/application-v2/components/index.js +56 -0
- package/lib/application-v2/compose.d.ts +2 -0
- package/lib/application-v2/compose.js +49 -0
- package/lib/application-v2/context.d.ts +3 -0
- package/lib/application-v2/context.js +9 -0
- package/lib/application-v2/hooks/index.d.ts +3 -0
- package/lib/application-v2/hooks/index.js +38 -0
- package/lib/application-v2/hooks/useApp.d.ts +1 -0
- package/lib/application-v2/hooks/useApp.js +12 -0
- package/lib/application-v2/hooks/useLoad.d.ts +1 -0
- package/lib/application-v2/hooks/useLoad.js +45 -0
- package/lib/application-v2/hooks/useRouter.d.ts +1 -0
- package/lib/application-v2/hooks/useRouter.js +12 -0
- package/lib/application-v2/index.d.ts +3 -0
- package/lib/application-v2/index.js +38 -0
- package/lib/application-v2/types.d.ts +26 -0
- package/lib/application-v2/types.js +5 -0
- package/lib/async-data-provider/index.d.ts +1 -1
- package/lib/auth/OptionsComponent.d.ts +7 -0
- package/lib/auth/OptionsComponent.js +32 -0
- package/lib/auth/SigninPage.d.ts +23 -0
- package/lib/auth/SigninPage.js +155 -0
- package/lib/auth/SigninPageExtension.d.ts +22 -0
- package/lib/auth/SigninPageExtension.js +42 -0
- package/lib/auth/SignupPage.d.ts +24 -0
- package/lib/auth/SignupPage.js +94 -0
- package/lib/auth/index.d.ts +4 -0
- package/lib/auth/index.js +49 -0
- package/lib/block-provider/BlockProvider.d.ts +4 -3
- package/lib/block-provider/BlockProvider.js +23 -5
- package/lib/block-provider/CalendarBlockProvider.d.ts +1 -1
- package/lib/block-provider/DetailsBlockProvider.d.ts +1 -1
- package/lib/block-provider/DetailsBlockProvider.js +1 -13
- package/lib/block-provider/FilterFormBlockProvider.d.ts +2 -1
- package/lib/block-provider/FormBlockProvider.d.ts +1 -1
- package/lib/block-provider/FormBlockProvider.js +10 -21
- package/lib/block-provider/FormFieldProvider.d.ts +1 -1
- package/lib/block-provider/GanttBlockProvider.d.ts +1 -1
- package/lib/block-provider/KanbanBlockProvider.d.ts +1 -1
- package/lib/block-provider/TableBlockProvider.d.ts +1 -2
- package/lib/block-provider/TableBlockProvider.js +57 -84
- package/lib/block-provider/TableFieldProvider.d.ts +1 -1
- package/lib/block-provider/TableSelectorProvider.d.ts +2 -2
- package/lib/block-provider/hooks/index.d.ts +10 -1
- package/lib/block-provider/hooks/index.js +50 -134
- package/lib/block-provider/index.d.ts +1 -0
- package/lib/block-provider/index.js +11 -0
- package/lib/board/Card.d.ts +2 -2
- package/lib/board/CardAdder.d.ts +2 -2
- package/lib/board/CardForm.d.ts +2 -2
- package/lib/board/Column.d.ts +3 -3
- package/lib/board/ColumnAdder.d.ts +2 -2
- package/lib/board/ColumnForm.d.ts +2 -2
- package/lib/board/DefaultCard.d.ts +2 -2
- package/lib/board/DefaultColumnHeader.d.ts +2 -2
- package/lib/board/Kanban.d.ts +2 -2
- package/lib/board/withDroppable.d.ts +2 -1
- package/lib/china-region/index.d.ts +2 -1
- package/lib/collection-manager/CollectionField.d.ts +1 -1
- package/lib/collection-manager/CollectionField.js +2 -1
- package/lib/collection-manager/CollectionManagerProvider.d.ts +2 -2
- package/lib/collection-manager/CollectionManagerShortcut.d.ts +2 -3
- package/lib/collection-manager/CollectionManagerShortcut.js +4 -63
- package/lib/collection-manager/Configuration/AddCategoryAction.d.ts +3 -2
- package/lib/collection-manager/Configuration/AddCategoryAction.js +1 -1
- package/lib/collection-manager/Configuration/AddCollectionAction.d.ts +3 -2
- package/lib/collection-manager/Configuration/AddCollectionAction.js +1 -1
- package/lib/collection-manager/Configuration/AddFieldAction.d.ts +3 -2
- package/lib/collection-manager/Configuration/AddFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/AddSubFieldAction.d.ts +2 -1
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/CollectionFields.d.ts +2 -1
- package/lib/collection-manager/Configuration/CollectionFieldsTable.d.ts +2 -2
- package/lib/collection-manager/Configuration/CollectionFieldsTable.js +3 -1
- package/lib/collection-manager/Configuration/CollectionFieldsTableArray.d.ts +2 -2
- package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +3 -1
- package/lib/collection-manager/Configuration/ConfigurationTable.d.ts +2 -1
- package/lib/collection-manager/Configuration/ConfigurationTabs.d.ts +2 -1
- package/lib/collection-manager/Configuration/ConfigurationTabs.js +4 -0
- package/lib/collection-manager/Configuration/EditCategoryAction.d.ts +3 -2
- package/lib/collection-manager/Configuration/EditCategoryAction.js +1 -1
- package/lib/collection-manager/Configuration/EditCollectionAction.d.ts +3 -2
- package/lib/collection-manager/Configuration/EditCollectionAction.js +1 -1
- package/lib/collection-manager/Configuration/EditFieldAction.d.ts +3 -2
- package/lib/collection-manager/Configuration/EditFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/EditSubFieldAction.d.ts +2 -1
- package/lib/collection-manager/Configuration/EditSubFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/OverridingCollectionField.d.ts +3 -2
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +1 -1
- package/lib/collection-manager/Configuration/SyncFieldsAction.d.ts +3 -2
- package/lib/collection-manager/Configuration/SyncFieldsAction.js +1 -1
- package/lib/collection-manager/Configuration/ViewInheritedField.d.ts +3 -2
- package/lib/collection-manager/Configuration/ViewInheritedField.js +1 -1
- package/lib/collection-manager/Configuration/components/CollectionCategory.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/CollectionCategory.js +2 -0
- package/lib/collection-manager/Configuration/components/CollectionFieldInterface.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/CollectionFieldInterface.js +2 -0
- package/lib/collection-manager/Configuration/components/CollectionTemplate.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/CollectionTemplate.js +2 -0
- package/lib/collection-manager/Configuration/components/FieldSummary.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/FieldSummary.js +4 -2
- package/lib/collection-manager/Configuration/components/TemplateSummay.d.ts +1 -1
- package/lib/collection-manager/Configuration/components/TemplateSummay.js +4 -2
- package/lib/collection-manager/Configuration/components/index.d.ts +6 -6
- package/lib/collection-manager/Configuration/components/index.js +12 -0
- package/lib/collection-manager/Configuration/interfaces.d.ts +1 -0
- package/lib/collection-manager/Configuration/templates.d.ts +1 -0
- package/lib/collection-manager/ResourceActionProvider.d.ts +1 -1
- package/lib/collection-manager/action-hooks.d.ts +1 -0
- package/lib/collection-manager/action-hooks.js +171 -92
- package/lib/collection-manager/index.d.ts +1 -1
- package/lib/collection-manager/index.js +7 -0
- package/lib/collection-manager/interfaces/components/index.d.ts +7 -6
- package/lib/collection-manager/interfaces/index.d.ts +0 -1
- package/lib/collection-manager/interfaces/index.js +0 -11
- package/lib/collection-manager/interfaces/properties/index.d.ts +0 -1
- package/lib/collection-manager/interfaces/properties/index.js +1 -42
- package/lib/collection-manager/interfaces/url.js +0 -5
- package/lib/collection-manager/sub-table.d.ts +2 -2
- package/lib/collection-manager/sub-table.js +4 -0
- package/lib/collection-manager/templates/components/PreviewFields.d.ts +1 -1
- package/lib/collection-manager/templates/components/PreviewFields.js +2 -1
- package/lib/collection-manager/templates/components/PreviewTable.d.ts +2 -1
- package/lib/collection-manager/types.d.ts +2 -0
- package/lib/filter-provider/FilterProvider.d.ts +5 -1
- package/lib/filter-provider/FilterProvider.js +9 -4
- package/lib/formula/Expression.d.ts +2 -1
- package/lib/formula/Result.d.ts +2 -1
- package/lib/formula/index.d.ts +2 -2
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +16 -0
- package/lib/hooks/useViewport.d.ts +1 -0
- package/lib/hooks/useViewport.js +47 -0
- package/lib/i18n/i18n.js +0 -1
- package/lib/icon/Icon.d.ts +2 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +22 -0
- package/lib/locale/en_US.d.ts +16 -21
- package/lib/locale/en_US.js +19 -24
- package/lib/locale/es_ES.d.ts +3 -1
- package/lib/locale/es_ES.js +4 -2
- package/lib/locale/ja_JP.d.ts +16 -19
- package/lib/locale/ja_JP.js +17 -20
- package/lib/locale/pt_BR.d.ts +2 -0
- package/lib/locale/pt_BR.js +3 -1
- package/lib/locale/ru_RU.d.ts +2 -18
- package/lib/locale/ru_RU.js +3 -19
- package/lib/locale/tr_TR.d.ts +0 -17
- package/lib/locale/tr_TR.js +0 -17
- package/lib/locale/zh_CN.d.ts +26 -24
- package/lib/locale/zh_CN.js +28 -26
- package/lib/plugin-manager/PinnedPluginListProvider.d.ts +1 -1
- package/lib/plugin-manager/index.d.ts +1 -3
- package/lib/plugin-manager/index.js +4 -26
- package/lib/pm/Card.d.ts +8 -0
- package/lib/pm/Card.js +375 -0
- package/lib/pm/PluginManagerLink.d.ts +3 -2
- package/lib/pm/PluginManagerLink.js +25 -17
- package/lib/pm/index.d.ts +31 -2
- package/lib/pm/index.js +77 -256
- package/lib/powered-by/index.d.ts +2 -1
- package/lib/route-switch/RouteSwitch.d.ts +2 -2
- package/lib/route-switch/RouteSwitch.js +78 -45
- package/lib/route-switch/RouteSwitchProvider.d.ts +3 -3
- package/lib/route-switch/antd/admin-layout/index.d.ts +4 -2
- package/lib/route-switch/antd/admin-layout/index.js +56 -51
- package/lib/route-switch/antd/auth-layout/index.d.ts +2 -2
- package/lib/route-switch/antd/auth-layout/index.js +2 -1
- package/lib/route-switch/antd/route-schema-component/index.d.ts +2 -2
- package/lib/route-switch/antd/route-schema-component/index.js +2 -2
- package/lib/route-switch/context.d.ts +4 -0
- package/lib/route-switch/context.js +6 -2
- package/lib/route-switch/types.d.ts +2 -5
- package/lib/schema-component/antd/AntdSchemaComponentProvider.d.ts +2 -1
- package/lib/schema-component/antd/action/Action.Container.js +4 -0
- package/lib/schema-component/antd/action/Action.Designer.d.ts +2 -1
- package/lib/schema-component/antd/action/Action.Designer.js +205 -19
- package/lib/schema-component/antd/action/Action.Drawer.js +15 -13
- package/lib/schema-component/antd/action/Action.Link.js +3 -1
- package/lib/schema-component/antd/action/Action.Modal.js +13 -12
- package/lib/schema-component/antd/action/Action.Page.js +8 -2
- package/lib/schema-component/antd/action/Action.js +27 -19
- package/lib/schema-component/antd/action/ActionBar.d.ts +18 -2
- package/lib/schema-component/antd/action/ActionBar.js +50 -21
- package/lib/schema-component/antd/action/context.d.ts +8 -2
- package/lib/schema-component/antd/action/context.js +19 -3
- package/lib/schema-component/antd/action/hooks.d.ts +2 -0
- package/lib/schema-component/antd/association-field/AssociationFieldProvider.d.ts +1 -1
- package/lib/schema-component/antd/association-field/AssociationFieldProvider.js +98 -6
- package/lib/schema-component/antd/association-field/AssociationSelect.js +88 -9
- package/lib/schema-component/antd/association-field/Editable.d.ts +1 -1
- package/lib/schema-component/antd/association-field/Editable.js +14 -46
- package/lib/schema-component/antd/association-field/FileManager.d.ts +1 -1
- package/lib/schema-component/antd/association-field/FileManager.js +13 -3
- package/lib/schema-component/antd/association-field/InternalNester.d.ts +2 -1
- package/lib/schema-component/antd/association-field/InternalNester.js +11 -1
- package/lib/schema-component/antd/association-field/InternalPicker.d.ts +1 -1
- package/lib/schema-component/antd/association-field/InternalPicker.js +9 -3
- package/lib/schema-component/antd/association-field/InternalSubTable.d.ts +2 -1
- package/lib/schema-component/antd/association-field/InternalSubTable.js +32 -4
- package/lib/schema-component/antd/association-field/InternalViewer.js +9 -2
- package/lib/schema-component/antd/association-field/Nester.d.ts +2 -1
- package/lib/schema-component/antd/association-field/Nester.js +64 -13
- package/lib/schema-component/antd/association-field/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/association-field/ReadPretty.js +4 -0
- package/lib/schema-component/antd/association-field/SubTable.js +53 -12
- package/lib/schema-component/antd/association-field/components/CreateRecordAction.d.ts +1 -1
- package/lib/schema-component/antd/association-field/components/CreateRecordAction.js +3 -1
- package/lib/schema-component/antd/association-field/context.d.ts +2 -0
- package/lib/schema-component/antd/association-field/hooks.d.ts +2 -0
- package/lib/schema-component/antd/association-field/schema.d.ts +3 -15
- package/lib/schema-component/antd/association-field/schema.js +4 -16
- package/lib/schema-component/antd/association-filter/ActionBarAssociationFilterAction.d.ts +2 -1
- package/lib/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.d.ts +2 -1
- package/lib/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.d.ts +2 -1
- package/lib/schema-component/antd/association-filter/AssociationFilter.Initializer.d.ts +2 -1
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.Designer.d.ts +2 -1
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.d.ts +2 -1
- package/lib/schema-component/antd/association-filter/AssociationFilter.d.ts +7 -6
- package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDelete.d.ts +2 -1
- package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.d.ts +2 -1
- package/lib/schema-component/antd/association-select/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/association-select/ReadPretty.js +2 -0
- package/lib/schema-component/antd/block-item/BlockItem.js +5 -2
- package/lib/schema-component/antd/block-item/TestDesigner.d.ts +2 -1
- package/lib/schema-component/antd/calendar/Calendar.Designer.d.ts +2 -1
- package/lib/schema-component/antd/calendar/Calendar.js +5 -3
- package/lib/schema-component/antd/calendar/DeleteEvent.d.ts +1 -1
- package/lib/schema-component/antd/calendar/DeleteEvent.js +2 -0
- package/lib/schema-component/antd/calendar/Event.d.ts +1 -1
- package/lib/schema-component/antd/calendar/Event.js +2 -0
- package/lib/schema-component/antd/calendar/Nav.d.ts +1 -1
- package/lib/schema-component/antd/calendar/Nav.js +5 -3
- package/lib/schema-component/antd/calendar/Title.d.ts +1 -1
- package/lib/schema-component/antd/calendar/Title.js +2 -0
- package/lib/schema-component/antd/calendar/Today.d.ts +1 -1
- package/lib/schema-component/antd/calendar/Today.js +4 -2
- package/lib/schema-component/antd/calendar/ViewSelect.d.ts +1 -1
- package/lib/schema-component/antd/calendar/ViewSelect.js +3 -0
- package/lib/schema-component/antd/calendar/components/Header.d.ts +2 -1
- package/lib/schema-component/antd/card-item/CardItem.js +1 -1
- package/lib/schema-component/antd/cascader/Cascader.js +8 -1
- package/lib/schema-component/antd/checkbox/Checkbox.d.ts +2 -1
- package/lib/schema-component/antd/checkbox/Checkbox.js +14 -12
- package/lib/schema-component/antd/collection-select/CollectionSelect.js +2 -0
- package/lib/schema-component/antd/cron/Cron.d.ts +2 -1
- package/lib/schema-component/antd/cron/Cron.js +3 -2
- package/lib/schema-component/antd/date-picker/DatePicker.d.ts +4 -2
- package/lib/schema-component/antd/date-picker/DatePicker.js +2 -1
- package/lib/schema-component/antd/date-picker/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/date-picker/ReadPretty.js +1 -1
- package/lib/schema-component/antd/error-fallback/ErrorFallback.d.ts +2 -1
- package/lib/schema-component/antd/expand-action/Expand.Action.Design.d.ts +2 -1
- package/lib/schema-component/antd/expand-action/Expand.Action.Design.js +8 -8
- package/lib/schema-component/antd/expand-action/Expand.Action.d.ts +2 -1
- package/lib/schema-component/antd/expand-action/Expand.Action.js +9 -12
- package/lib/schema-component/antd/filter/DynamicComponent.d.ts +2 -1
- package/lib/schema-component/antd/filter/Filter.Action.Designer.d.ts +2 -1
- package/lib/schema-component/antd/filter/Filter.js +3 -1
- package/lib/schema-component/antd/filter/FilterAction.d.ts +1 -1
- package/lib/schema-component/antd/filter/FilterAction.js +5 -3
- package/lib/schema-component/antd/filter/FilterItem.d.ts +1 -1
- package/lib/schema-component/antd/filter/FilterItem.js +46 -41
- package/lib/schema-component/antd/filter/FilterItems.d.ts +1 -1
- package/lib/schema-component/antd/filter/FilterItems.js +2 -0
- package/lib/schema-component/antd/filter/SaveDefaultValue.d.ts +2 -1
- package/lib/schema-component/antd/filter/index.d.ts +1 -0
- package/lib/schema-component/antd/filter/index.js +11 -0
- package/lib/schema-component/antd/filter/useValues.js +5 -3
- package/lib/schema-component/antd/form/Form.Designer.d.ts +2 -1
- package/lib/schema-component/antd/form/Form.d.ts +1 -1
- package/lib/schema-component/antd/form/Form.js +2 -0
- package/lib/schema-component/antd/form-item/FormItem.FilterFormDesigner.d.ts +2 -1
- package/lib/schema-component/antd/form-item/FormItem.js +101 -36
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.d.ts +11 -10
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +1 -1
- package/lib/schema-component/antd/form-v2/Form.Designer.d.ts +4 -3
- package/lib/schema-component/antd/form-v2/Form.FilterDesigner.d.ts +2 -1
- package/lib/schema-component/antd/form-v2/Form.js +8 -1
- package/lib/schema-component/antd/form-v2/FormField.js +2 -0
- package/lib/schema-component/antd/form-v2/Templates.d.ts +7 -1
- package/lib/schema-component/antd/form-v2/Templates.js +22 -3
- package/lib/schema-component/antd/form-v2/index.js +3 -1
- package/lib/schema-component/antd/g2plot/G2Plot.js +2 -0
- package/lib/schema-component/antd/g2plot/G2PlotDesigner.d.ts +2 -1
- package/lib/schema-component/antd/gantt/Gantt.Designer.d.ts +2 -1
- package/lib/schema-component/antd/gantt/components/gantt/Event.d.ts +1 -1
- package/lib/schema-component/antd/gantt/components/gantt/Event.js +2 -0
- package/lib/schema-component/antd/gantt/components/gantt/gantt.js +1 -1
- package/lib/schema-component/antd/grid/Block.d.ts +1 -1
- package/lib/schema-component/antd/grid/Block.js +2 -0
- package/lib/schema-component/antd/grid/Grid.js +25 -9
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.d.ts +1 -1
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.js +2 -12
- package/lib/schema-component/antd/grid-card/GridCard.Designer.d.ts +2 -1
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +1 -1
- package/lib/schema-component/antd/grid-card/GridCard.Item.d.ts +2 -1
- package/lib/schema-component/antd/grid-card/GridCard.d.ts +2 -1
- package/lib/schema-component/antd/grid-card/GridCard.js +11 -7
- package/lib/schema-component/antd/icon-picker/IconPicker.js +2 -2
- package/lib/schema-component/antd/index.d.ts +1 -0
- package/lib/schema-component/antd/index.js +11 -0
- package/lib/schema-component/antd/index.less +20 -4
- package/lib/schema-component/antd/input/EllipsisWithTooltip.js +2 -2
- package/lib/schema-component/antd/input/Input.d.ts +2 -1
- package/lib/schema-component/antd/input/Input.js +3 -2
- package/lib/schema-component/antd/input/Json.d.ts +2 -2
- package/lib/schema-component/antd/input/Json.js +49 -9
- package/lib/schema-component/antd/input/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/input/ReadPretty.js +4 -4
- package/lib/schema-component/antd/input-number/InputNumber.d.ts +5 -1
- package/lib/schema-component/antd/input-number/InputNumber.js +1 -1
- package/lib/schema-component/antd/input-number/ReadPretty.d.ts +2 -2
- package/lib/schema-component/antd/input-number/ReadPretty.js +6 -2
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.TitleSwitch.d.ts +2 -1
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.d.ts +2 -1
- package/lib/schema-component/antd/kanban/Kanban.Card.js +4 -2
- package/lib/schema-component/antd/kanban/Kanban.CardViewer.js +2 -0
- package/lib/schema-component/antd/kanban/Kanban.Designer.d.ts +2 -1
- package/lib/schema-component/antd/kanban/Kanban.js +3 -1
- package/lib/schema-component/antd/list/List.Decorator.d.ts +1 -1
- package/lib/schema-component/antd/list/List.Decorator.js +8 -13
- package/lib/schema-component/antd/list/List.Designer.d.ts +2 -1
- package/lib/schema-component/antd/list/List.Item.d.ts +2 -1
- package/lib/schema-component/antd/list/List.Item.js +1 -1
- package/lib/schema-component/antd/list/List.d.ts +2 -1
- package/lib/schema-component/antd/markdown/Markdown.Void.Designer.d.ts +2 -1
- package/lib/schema-component/antd/markdown/Markdown.Void.js +2 -0
- package/lib/schema-component/antd/markdown/Markdown.d.ts +2 -0
- package/lib/schema-component/antd/markdown/Markdown.js +9 -4
- package/lib/schema-component/antd/markdown/util.js +1 -1
- package/lib/schema-component/antd/menu/Menu.Designer.d.ts +2 -1
- package/lib/schema-component/antd/menu/Menu.js +46 -37
- package/lib/schema-component/antd/menu/MenuItemInitializers/index.d.ts +2 -1
- package/lib/schema-component/antd/page/FixedBlock.d.ts +2 -1
- package/lib/schema-component/antd/page/FixedBlock.js +6 -2
- package/lib/schema-component/antd/page/Page.d.ts +2 -1
- package/lib/schema-component/antd/page/Page.js +22 -14
- package/lib/schema-component/antd/page/PageTabDesigner.d.ts +3 -2
- package/lib/schema-component/antd/pagination/index.d.ts +1 -1
- package/lib/schema-component/antd/pagination/index.js +2 -0
- package/lib/schema-component/antd/password/Password.d.ts +1 -1
- package/lib/schema-component/antd/password/PasswordStrength.js +2 -145
- package/lib/schema-component/antd/password/utils.d.ts +1 -0
- package/lib/schema-component/antd/password/utils.js +151 -0
- package/lib/schema-component/antd/percent/Percent.js +2 -2
- package/lib/schema-component/antd/preview/Preview.d.ts +1 -1
- package/lib/schema-component/antd/quick-edit/QuickEdit.d.ts +3 -0
- package/lib/schema-component/antd/quick-edit/QuickEdit.js +98 -0
- package/lib/schema-component/antd/quick-edit/index.d.ts +1 -0
- package/lib/schema-component/antd/quick-edit/index.js +16 -0
- package/lib/schema-component/antd/radio/Radio.d.ts +1 -1
- package/lib/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -1
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +4 -6
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +9 -4
- package/lib/schema-component/antd/remote-select/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/remote-select/ReadPretty.js +2 -0
- package/lib/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +55 -25
- package/lib/schema-component/antd/select/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/select/ReadPretty.js +7 -7
- package/lib/schema-component/antd/select/Select.d.ts +3 -0
- package/lib/schema-component/antd/select/Select.js +34 -14
- package/lib/schema-component/antd/select/index.d.ts +1 -1
- package/lib/schema-component/antd/select/index.js +4 -4
- package/lib/schema-component/antd/select/utils.d.ts +14 -0
- package/lib/schema-component/antd/select/{shared.js → utils.js} +22 -20
- package/lib/schema-component/antd/table/Table.Array.Designer.d.ts +2 -1
- package/lib/schema-component/antd/table/Table.Array.d.ts +5 -5
- package/lib/schema-component/antd/table/Table.Array.js +7 -5
- package/lib/schema-component/antd/table/Table.Column.ActionBar.d.ts +1 -1
- package/lib/schema-component/antd/table/Table.Column.ActionBar.js +2 -0
- package/lib/schema-component/antd/table/Table.Column.Decorator.d.ts +2 -1
- package/lib/schema-component/antd/table/Table.Column.Designer.d.ts +2 -1
- package/lib/schema-component/antd/table/Table.Column.d.ts +2 -1
- package/lib/schema-component/antd/table/Table.Designer.d.ts +2 -1
- package/lib/schema-component/antd/table/Table.RowActionDesigner.d.ts +2 -1
- package/lib/schema-component/antd/table/Table.RowSelection.d.ts +1 -1
- package/lib/schema-component/antd/table/Table.RowSelection.js +2 -0
- package/lib/schema-component/antd/table/Table.Void.Designer.d.ts +2 -1
- package/lib/schema-component/antd/table/Table.Void.d.ts +1 -1
- package/lib/schema-component/antd/table/Table.Void.js +2 -0
- package/lib/schema-component/antd/table-v2/FilterDynamicComponent.d.ts +2 -2
- package/lib/schema-component/antd/table-v2/Table.ActionColumnDesigner.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/Table.Column.ActionBar.d.ts +1 -1
- package/lib/schema-component/antd/table-v2/Table.Column.ActionBar.js +2 -0
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +100 -2
- package/lib/schema-component/antd/table-v2/Table.Column.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/Table.Designer.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/Table.Index.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/Table.js +56 -25
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +54 -47
- package/lib/schema-component/antd/table-v2/TableField.js +4 -0
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.d.ts +2 -1
- package/lib/schema-component/antd/table-v2/index.d.ts +1 -0
- package/lib/schema-component/antd/table-v2/index.js +12 -0
- package/lib/schema-component/antd/table-v2/utils.js +1 -1
- package/lib/schema-component/antd/tabs/Tabs.Designer.d.ts +2 -1
- package/lib/schema-component/antd/tabs/Tabs.js +25 -5
- package/lib/schema-component/antd/tabs/context.d.ts +8 -0
- package/lib/schema-component/antd/tabs/context.js +24 -0
- package/lib/schema-component/antd/tabs/index.d.ts +1 -0
- package/lib/schema-component/antd/tabs/index.js +11 -0
- package/lib/schema-component/antd/time-picker/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/time-picker/ReadPretty.js +1 -1
- package/lib/schema-component/antd/time-picker/TimePicker.d.ts +1 -1
- package/lib/schema-component/antd/time-picker/TimePicker.js +1 -1
- package/lib/schema-component/antd/tree-select/ReadPretty.d.ts +1 -1
- package/lib/schema-component/antd/tree-select/ReadPretty.js +3 -1
- package/lib/schema-component/antd/upload/Upload.js +1 -1
- package/lib/schema-component/antd/upload/shared.d.ts +3 -3
- package/lib/schema-component/antd/upload/style.less +1 -2
- package/lib/schema-component/antd/upload/type.d.ts +2 -2
- package/lib/schema-component/antd/variable/Input.d.ts +2 -2
- package/lib/schema-component/antd/variable/Input.js +183 -31
- package/lib/schema-component/antd/variable/JSONInput.d.ts +2 -2
- package/lib/schema-component/antd/variable/JSONInput.js +2 -23
- package/lib/schema-component/antd/variable/TextArea.d.ts +2 -2
- package/lib/schema-component/antd/variable/VariableSelect.d.ts +2 -2
- package/lib/schema-component/common/dnd-context/index.d.ts +1 -1
- package/lib/schema-component/common/dnd-context/index.js +11 -4
- package/lib/schema-component/common/sortable-item/SortableItem.d.ts +11 -4
- package/lib/schema-component/common/sortable-item/SortableItem.js +18 -8
- package/lib/schema-component/common/utils/logic.js +64 -2
- package/lib/schema-component/common/utils/uitls.js +47 -13
- package/lib/schema-component/core/DesignableSwitch.d.ts +2 -1
- package/lib/schema-component/core/SchemaComponent.d.ts +2 -1
- package/lib/schema-component/core/SchemaComponentOptions.js +12 -7
- package/lib/schema-component/core/SchemaComponentProvider.js +17 -6
- package/lib/schema-component/hooks/useCompile.js +32 -4
- package/lib/schema-component/hooks/useDesignable.d.ts +5 -4
- package/lib/schema-component/hooks/useDesignable.js +30 -28
- package/lib/schema-component/hooks/useFieldModeOptions.js +44 -20
- package/lib/schema-component/hooks/useProps.d.ts +1 -10
- package/lib/schema-component/hooks/useProps.js +20 -6
- package/lib/schema-initializer/SchemaInitializer.d.ts +12 -3
- package/lib/schema-initializer/SchemaInitializer.js +138 -12
- package/lib/schema-initializer/SchemaInitializerProvider.d.ts +3 -3
- package/lib/schema-initializer/SelectCollection.d.ts +2 -1
- package/lib/schema-initializer/buttons/BlockInitializers.d.ts +2 -0
- package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/CreateFormBlockInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/CustomFormItemInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/DetailsActionInitializers.d.ts +14 -0
- package/lib/schema-initializer/buttons/DetailsActionInitializers.js +12 -0
- package/lib/schema-initializer/buttons/FormItemInitializers.d.ts +3 -2
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +16 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +21 -16
- package/lib/schema-initializer/buttons/ReadPrettyFormItemInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/RecordBlockInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/RecordFormBlockInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/TabPaneInitializers.d.ts +4 -3
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +3 -3
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.d.ts +3 -2
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +12 -3
- package/lib/schema-initializer/buttons/TableColumnInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +16 -9
- package/lib/schema-initializer/buttons/TableSelectorInitializers.d.ts +2 -1
- package/lib/schema-initializer/components/BulkEditField.d.ts +2 -1
- package/lib/schema-initializer/components/CreateRecordAction.d.ts +2 -2
- package/lib/schema-initializer/components/CreateRecordAction.js +5 -1
- package/lib/schema-initializer/components/DeletedField.d.ts +2 -1
- package/lib/schema-initializer/components/DuplicateAction.d.ts +3 -0
- package/lib/schema-initializer/components/DuplicateAction.js +174 -0
- package/lib/schema-initializer/components/assigned-field/AssignedField.d.ts +2 -1
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +1 -1
- package/lib/schema-initializer/components/index.d.ts +1 -0
- package/lib/schema-initializer/components/index.js +11 -0
- package/lib/schema-initializer/index.d.ts +1 -1
- package/lib/schema-initializer/index.js +7 -0
- package/lib/schema-initializer/items/ActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/BlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/BulkDestroyActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CalendarBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CollectionFieldInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CreateActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CreateChildInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CreateFilterActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CreateFormBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CreateResetActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CreateSubmitActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CustomizeActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/DataBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/DeleteEventActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/DestroyActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/DetailsBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/DuplicateActionInitializer.d.ts +2 -0
- package/lib/schema-initializer/items/DuplicateActionInitializer.js +69 -0
- package/lib/schema-initializer/items/ExpandActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/ExpandActionInitializer.js +3 -3
- package/lib/schema-initializer/items/FilterActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/FilterBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/FilterCollapseBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/FilterFormBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/FormBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/G2PlotInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/GanttBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/GridCardBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/InitializerWithSwitch.d.ts +2 -1
- package/lib/schema-initializer/items/KanbanBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/ListBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/MarkdownBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/PrintActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RecordFormBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/RefreshActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/SelectActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/SubmitActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/TableActionColumnInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/TableBlockInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/TableCollectionFieldInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/TableSelectorInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/UpdateActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/UpdateSubmitActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/ViewActionInitializer.d.ts +2 -1
- package/lib/schema-initializer/items/index.d.ts +1 -0
- package/lib/schema-initializer/items/index.js +11 -0
- package/lib/schema-initializer/utils.d.ts +13 -0
- package/lib/schema-initializer/utils.js +70 -43
- package/lib/schema-items/GeneralSchemaItems.js +5 -3
- package/lib/schema-items/OpenModeSchemaItems.js +14 -10
- package/lib/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -1
- package/lib/schema-settings/DataTemplates/FormDataTemplates.js +8 -6
- package/lib/schema-settings/DataTemplates/TreeLabel.d.ts +2 -1
- package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.js +1 -1
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.js +12 -14
- package/lib/schema-settings/DataTemplates/components/Designer.d.ts +1 -1
- package/lib/schema-settings/DataTemplates/components/Designer.js +2 -0
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.d.ts +3 -3
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +38 -58
- package/lib/schema-settings/EnableChildCollections/index.d.ts +1 -1
- package/lib/schema-settings/EnableChildCollections/index.js +2 -0
- package/lib/schema-settings/GeneralSchemaDesigner.d.ts +2 -1
- package/lib/schema-settings/GeneralSchemaDesigner.js +3 -2
- package/lib/schema-settings/LinkageRules/DynamicComponent.d.ts +2 -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 +14 -10
- package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +2 -2
- package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.js +2 -0
- package/lib/schema-settings/LinkageRules/ValueDynamicComponent.d.ts +2 -1
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.js +2 -0
- package/lib/schema-settings/LinkageRules/index.d.ts +1 -1
- package/lib/schema-settings/LinkageRules/index.js +3 -1
- package/lib/schema-settings/SchemaSettings.d.ts +2 -1
- package/lib/schema-settings/SchemaSettings.js +28 -17
- package/lib/schema-settings/VariableInput/VariableInput.d.ts +1 -1
- package/lib/schema-settings/VariableInput/VariableInput.js +1 -1
- package/lib/schema-settings/VariableInput/hooks/useDateVariable.d.ts +12 -1
- package/lib/schema-settings/VariableInput/hooks/useDateVariable.js +41 -36
- package/lib/schema-settings/VariableInput/hooks/useUserVariable.d.ts +4 -4
- package/lib/schema-settings/VariableInput/hooks/useUserVariable.js +66 -42
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +12 -1
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +6 -2
- package/lib/schema-settings/VariableInput/type.d.ts +28 -0
- package/lib/schema-settings/VariableInput/type.js +5 -0
- package/lib/schema-settings/hooks/useIsShowMultipleSwitch.js +3 -2
- package/lib/schema-templates/BlockTemplate.d.ts +1 -1
- package/lib/schema-templates/BlockTemplate.js +4 -1
- package/lib/schema-templates/BlockTemplateDetails.d.ts +2 -1
- package/lib/schema-templates/BlockTemplateDetails.js +5 -5
- package/lib/schema-templates/BlockTemplatePage.d.ts +3 -2
- package/lib/schema-templates/SchemaTemplateManagerProvider.d.ts +5 -2
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +7 -0
- package/lib/schema-templates/index.d.ts +0 -1
- package/lib/schema-templates/index.js +0 -11
- package/lib/settings-form/SettingsForm.js +8 -2
- package/lib/system-settings/SystemSettingsProvider.d.ts +5 -3
- package/lib/system-settings/SystemSettingsShortcut.d.ts +2 -3
- package/lib/system-settings/SystemSettingsShortcut.js +33 -85
- package/lib/test/collections.d.ts +1487 -0
- package/lib/test/collections.js +1444 -0
- package/lib/test/index.d.ts +3 -0
- package/lib/test/index.js +36 -0
- package/lib/test/mainCollections.d.ts +11359 -0
- package/lib/test/mainCollections.js +3 -0
- package/lib/test/mockAPIClient.d.ts +6 -0
- package/lib/test/mockAPIClient.js +18 -0
- package/lib/user/ChangePassword.d.ts +2 -1
- package/lib/user/ChangePassword.js +1 -1
- package/lib/user/CurrentUser.d.ts +7 -1
- package/lib/user/CurrentUser.js +123 -115
- package/lib/user/CurrentUserProvider.d.ts +1 -1
- package/lib/user/CurrentUserProvider.js +3 -2
- package/lib/user/EditProfile.d.ts +2 -1
- package/lib/user/EditProfile.js +2 -2
- package/lib/user/LanguageSettings.d.ts +2 -1
- package/lib/user/SigninPage.d.ts +2 -1
- package/lib/user/SigninPage.js +14 -6
- package/lib/user/SigninPageExtension.d.ts +1 -1
- package/lib/user/SignupPage.d.ts +2 -1
- package/lib/user/SignupPage.js +4 -3
- package/lib/user/SwitchRole.d.ts +2 -1
- package/lib/user/SwitchRole.js +1 -3
- package/lib/user/ThemeSettings.d.ts +2 -1
- package/lib/user/VerificationCode.d.ts +2 -2
- package/lib/user/index.d.ts +0 -3
- package/lib/user/index.js +0 -33
- package/package.json +15 -15
- package/tsconfig.json +2 -0
- package/.umirc.ts +0 -24
- package/develop.md +0 -5
- package/es/collection-manager/interfaces/attachment.d.ts +0 -2
- package/es/collection-manager/interfaces/attachment.js +0 -98
- package/es/plugin-manager/PluginManager.d.ts +0 -23
- package/es/plugin-manager/PluginManager.js +0 -166
- package/es/plugin-manager/PluginManagerProvider.d.ts +0 -2
- package/es/plugin-manager/PluginManagerProvider.js +0 -11
- package/es/schema-component/antd/select/shared.d.ts +0 -7
- package/es/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +0 -22
- package/es/schema-component/antd/table-v2/hooks/useUserVariable.js +0 -65
- package/es/schema-templates/SchemaTemplateShortcut.d.ts +0 -1
- package/es/schema-templates/SchemaTemplateShortcut.js +0 -17
- package/lib/collection-manager/interfaces/attachment.d.ts +0 -2
- package/lib/collection-manager/interfaces/attachment.js +0 -105
- package/lib/plugin-manager/PluginManager.d.ts +0 -23
- package/lib/plugin-manager/PluginManager.js +0 -178
- package/lib/plugin-manager/PluginManagerProvider.d.ts +0 -2
- package/lib/plugin-manager/PluginManagerProvider.js +0 -19
- package/lib/schema-component/antd/select/shared.d.ts +0 -7
- package/lib/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +0 -22
- package/lib/schema-component/antd/table-v2/hooks/useUserVariable.js +0 -73
- package/lib/schema-templates/SchemaTemplateShortcut.d.ts +0 -1
- package/lib/schema-templates/SchemaTemplateShortcut.js +0 -25
|
@@ -0,0 +1,242 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
+
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; }
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
export var PluginManager = /*#__PURE__*/function () {
|
|
21
|
+
function PluginManager(app) {
|
|
22
|
+
_classCallCheck(this, PluginManager);
|
|
23
|
+
this.app = void 0;
|
|
24
|
+
this.pluginInstances = void 0;
|
|
25
|
+
this.pluginPrepares = void 0;
|
|
26
|
+
this.app = app;
|
|
27
|
+
this.pluginInstances = new Map();
|
|
28
|
+
this.pluginPrepares = new Map();
|
|
29
|
+
this.addPresetPlugins();
|
|
30
|
+
}
|
|
31
|
+
_createClass(PluginManager, [{
|
|
32
|
+
key: "addPresetPlugins",
|
|
33
|
+
value: function addPresetPlugins() {
|
|
34
|
+
var plugins = this.app.options.plugins;
|
|
35
|
+
var _iterator = _createForOfIteratorHelper(plugins),
|
|
36
|
+
_step;
|
|
37
|
+
try {
|
|
38
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
39
|
+
var plugin = _step.value;
|
|
40
|
+
if (typeof plugin === 'string') {
|
|
41
|
+
this.prepare(plugin);
|
|
42
|
+
} else {
|
|
43
|
+
this.prepare.apply(this, _toConsumableArray(plugin));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
} catch (err) {
|
|
47
|
+
_iterator.e(err);
|
|
48
|
+
} finally {
|
|
49
|
+
_iterator.f();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
key: "prepare",
|
|
54
|
+
value: function prepare(nameOrClass, options) {
|
|
55
|
+
var opts = {};
|
|
56
|
+
if (typeof nameOrClass === 'string') {
|
|
57
|
+
opts['name'] = nameOrClass;
|
|
58
|
+
} else {
|
|
59
|
+
opts = _objectSpread(_objectSpread({}, options), {}, {
|
|
60
|
+
Plugin: nameOrClass
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return this.pluginPrepares.set(opts.name, opts);
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
key: "add",
|
|
67
|
+
value: function () {
|
|
68
|
+
var _add = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(nameOrClass, options) {
|
|
69
|
+
var opts, plugin;
|
|
70
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
71
|
+
while (1) switch (_context.prev = _context.next) {
|
|
72
|
+
case 0:
|
|
73
|
+
opts = {};
|
|
74
|
+
if (typeof nameOrClass === 'string') {
|
|
75
|
+
opts['name'] = nameOrClass;
|
|
76
|
+
} else {
|
|
77
|
+
opts = _objectSpread(_objectSpread({}, options), {}, {
|
|
78
|
+
Plugin: nameOrClass
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
_context.next = 4;
|
|
82
|
+
return this.makePlugin(opts);
|
|
83
|
+
case 4:
|
|
84
|
+
plugin = _context.sent;
|
|
85
|
+
this.pluginInstances.set(plugin.name, plugin);
|
|
86
|
+
_context.next = 8;
|
|
87
|
+
return plugin.afterAdd();
|
|
88
|
+
case 8:
|
|
89
|
+
return _context.abrupt("return", plugin);
|
|
90
|
+
case 9:
|
|
91
|
+
case "end":
|
|
92
|
+
return _context.stop();
|
|
93
|
+
}
|
|
94
|
+
}, _callee, this);
|
|
95
|
+
}));
|
|
96
|
+
function add(_x, _x2) {
|
|
97
|
+
return _add.apply(this, arguments);
|
|
98
|
+
}
|
|
99
|
+
return add;
|
|
100
|
+
}()
|
|
101
|
+
}, {
|
|
102
|
+
key: "makePlugin",
|
|
103
|
+
value: function () {
|
|
104
|
+
var _makePlugin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(opts) {
|
|
105
|
+
var importPlugins, P;
|
|
106
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
107
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
108
|
+
case 0:
|
|
109
|
+
importPlugins = this.app.options.importPlugins;
|
|
110
|
+
P = opts.Plugin;
|
|
111
|
+
if (P) {
|
|
112
|
+
_context2.next = 6;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
_context2.next = 5;
|
|
116
|
+
return importPlugins(opts.name);
|
|
117
|
+
case 5:
|
|
118
|
+
P = _context2.sent;
|
|
119
|
+
case 6:
|
|
120
|
+
if (P) {
|
|
121
|
+
_context2.next = 8;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
throw new Error("Plugin \"".concat(opts.name, " \" not found"));
|
|
125
|
+
case 8:
|
|
126
|
+
console.log(opts, P);
|
|
127
|
+
return _context2.abrupt("return", new P(opts, this.app));
|
|
128
|
+
case 10:
|
|
129
|
+
case "end":
|
|
130
|
+
return _context2.stop();
|
|
131
|
+
}
|
|
132
|
+
}, _callee2, this);
|
|
133
|
+
}));
|
|
134
|
+
function makePlugin(_x3) {
|
|
135
|
+
return _makePlugin.apply(this, arguments);
|
|
136
|
+
}
|
|
137
|
+
return makePlugin;
|
|
138
|
+
}()
|
|
139
|
+
}, {
|
|
140
|
+
key: "load",
|
|
141
|
+
value: function () {
|
|
142
|
+
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
143
|
+
var _iterator2, _step2, opts, plugin, _iterator3, _step3, _plugin, _iterator4, _step4, _plugin2;
|
|
144
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
145
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
146
|
+
case 0:
|
|
147
|
+
_iterator2 = _createForOfIteratorHelper(this.pluginPrepares.values());
|
|
148
|
+
_context3.prev = 1;
|
|
149
|
+
_iterator2.s();
|
|
150
|
+
case 3:
|
|
151
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
152
|
+
_context3.next = 13;
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
opts = _step2.value;
|
|
156
|
+
_context3.next = 7;
|
|
157
|
+
return this.makePlugin(opts);
|
|
158
|
+
case 7:
|
|
159
|
+
plugin = _context3.sent;
|
|
160
|
+
this.pluginInstances.set(plugin.name, plugin);
|
|
161
|
+
_context3.next = 11;
|
|
162
|
+
return plugin.afterAdd();
|
|
163
|
+
case 11:
|
|
164
|
+
_context3.next = 3;
|
|
165
|
+
break;
|
|
166
|
+
case 13:
|
|
167
|
+
_context3.next = 18;
|
|
168
|
+
break;
|
|
169
|
+
case 15:
|
|
170
|
+
_context3.prev = 15;
|
|
171
|
+
_context3.t0 = _context3["catch"](1);
|
|
172
|
+
_iterator2.e(_context3.t0);
|
|
173
|
+
case 18:
|
|
174
|
+
_context3.prev = 18;
|
|
175
|
+
_iterator2.f();
|
|
176
|
+
return _context3.finish(18);
|
|
177
|
+
case 21:
|
|
178
|
+
_iterator3 = _createForOfIteratorHelper(this.pluginInstances.values());
|
|
179
|
+
_context3.prev = 22;
|
|
180
|
+
_iterator3.s();
|
|
181
|
+
case 24:
|
|
182
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
183
|
+
_context3.next = 30;
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
_plugin = _step3.value;
|
|
187
|
+
_context3.next = 28;
|
|
188
|
+
return _plugin.beforeLoad();
|
|
189
|
+
case 28:
|
|
190
|
+
_context3.next = 24;
|
|
191
|
+
break;
|
|
192
|
+
case 30:
|
|
193
|
+
_context3.next = 35;
|
|
194
|
+
break;
|
|
195
|
+
case 32:
|
|
196
|
+
_context3.prev = 32;
|
|
197
|
+
_context3.t1 = _context3["catch"](22);
|
|
198
|
+
_iterator3.e(_context3.t1);
|
|
199
|
+
case 35:
|
|
200
|
+
_context3.prev = 35;
|
|
201
|
+
_iterator3.f();
|
|
202
|
+
return _context3.finish(35);
|
|
203
|
+
case 38:
|
|
204
|
+
_iterator4 = _createForOfIteratorHelper(this.pluginInstances.values());
|
|
205
|
+
_context3.prev = 39;
|
|
206
|
+
_iterator4.s();
|
|
207
|
+
case 41:
|
|
208
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
209
|
+
_context3.next = 47;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
_plugin2 = _step4.value;
|
|
213
|
+
_context3.next = 45;
|
|
214
|
+
return _plugin2.load();
|
|
215
|
+
case 45:
|
|
216
|
+
_context3.next = 41;
|
|
217
|
+
break;
|
|
218
|
+
case 47:
|
|
219
|
+
_context3.next = 52;
|
|
220
|
+
break;
|
|
221
|
+
case 49:
|
|
222
|
+
_context3.prev = 49;
|
|
223
|
+
_context3.t2 = _context3["catch"](39);
|
|
224
|
+
_iterator4.e(_context3.t2);
|
|
225
|
+
case 52:
|
|
226
|
+
_context3.prev = 52;
|
|
227
|
+
_iterator4.f();
|
|
228
|
+
return _context3.finish(52);
|
|
229
|
+
case 55:
|
|
230
|
+
case "end":
|
|
231
|
+
return _context3.stop();
|
|
232
|
+
}
|
|
233
|
+
}, _callee3, this, [[1, 15, 18, 21], [22, 32, 35, 38], [39, 49, 52, 55]]);
|
|
234
|
+
}));
|
|
235
|
+
function load() {
|
|
236
|
+
return _load.apply(this, arguments);
|
|
237
|
+
}
|
|
238
|
+
return load;
|
|
239
|
+
}()
|
|
240
|
+
}]);
|
|
241
|
+
return PluginManager;
|
|
242
|
+
}();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Application } from './Application';
|
|
2
|
+
import { RouterOptions } from './types';
|
|
3
|
+
export declare class Router {
|
|
4
|
+
protected options?: RouterOptions;
|
|
5
|
+
protected context?: any;
|
|
6
|
+
protected app: Application;
|
|
7
|
+
protected routes: Map<string, any>;
|
|
8
|
+
constructor(options?: RouterOptions, context?: any);
|
|
9
|
+
getRoutes(): any[];
|
|
10
|
+
createRouter(): any;
|
|
11
|
+
add(name: string, route: any): void;
|
|
12
|
+
remove(name: string): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var _excluded = ["type"];
|
|
2
|
+
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); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
+
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); }
|
|
17
|
+
import set from 'lodash/set';
|
|
18
|
+
import { createBrowserRouter, createHashRouter, createMemoryRouter } from 'react-router-dom';
|
|
19
|
+
export var Router = /*#__PURE__*/function () {
|
|
20
|
+
function Router(options, context) {
|
|
21
|
+
_classCallCheck(this, Router);
|
|
22
|
+
this.options = void 0;
|
|
23
|
+
this.context = void 0;
|
|
24
|
+
this.app = void 0;
|
|
25
|
+
this.routes = void 0;
|
|
26
|
+
this.options = options;
|
|
27
|
+
this.context = context;
|
|
28
|
+
this.routes = new Map();
|
|
29
|
+
this.app = context.app;
|
|
30
|
+
}
|
|
31
|
+
_createClass(Router, [{
|
|
32
|
+
key: "getRoutes",
|
|
33
|
+
value: function getRoutes() {
|
|
34
|
+
var _this = this;
|
|
35
|
+
var routes = {};
|
|
36
|
+
var _iterator = _createForOfIteratorHelper(this.routes),
|
|
37
|
+
_step;
|
|
38
|
+
try {
|
|
39
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
40
|
+
var _step$value = _slicedToArray(_step.value, 2),
|
|
41
|
+
name = _step$value[0],
|
|
42
|
+
route = _step$value[1];
|
|
43
|
+
set(routes, name.split('.').join('.children.'), route);
|
|
44
|
+
}
|
|
45
|
+
} catch (err) {
|
|
46
|
+
_iterator.e(err);
|
|
47
|
+
} finally {
|
|
48
|
+
_iterator.f();
|
|
49
|
+
}
|
|
50
|
+
var transform = function transform(item) {
|
|
51
|
+
if (item.component) {
|
|
52
|
+
item.Component = _this.app.getComponent(item.component);
|
|
53
|
+
}
|
|
54
|
+
return item;
|
|
55
|
+
};
|
|
56
|
+
var toArr = function toArr(items) {
|
|
57
|
+
return Object.values(items || {}).map(function (item) {
|
|
58
|
+
if (item.children) {
|
|
59
|
+
item.children = toArr(item.children);
|
|
60
|
+
}
|
|
61
|
+
return transform(item);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
return toArr(routes);
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
key: "createRouter",
|
|
68
|
+
value: function createRouter() {
|
|
69
|
+
var _this$options = this.options,
|
|
70
|
+
type = _this$options.type,
|
|
71
|
+
opts = _objectWithoutProperties(_this$options, _excluded);
|
|
72
|
+
var routes = this.getRoutes();
|
|
73
|
+
if (routes.length === 0) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
switch (type) {
|
|
77
|
+
case 'hash':
|
|
78
|
+
return createHashRouter(routes, opts);
|
|
79
|
+
case 'browser':
|
|
80
|
+
return createBrowserRouter(routes, opts);
|
|
81
|
+
case 'memory':
|
|
82
|
+
return createMemoryRouter(routes, opts);
|
|
83
|
+
default:
|
|
84
|
+
return createMemoryRouter(routes, opts);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "add",
|
|
89
|
+
value: function add(name, route) {
|
|
90
|
+
var _this2 = this;
|
|
91
|
+
this.routes.set(name, route);
|
|
92
|
+
Object.keys(route.children || {}).forEach(function (key) {
|
|
93
|
+
_this2.routes.set("".concat(name, ".").concat(key), route.children[key]);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
key: "remove",
|
|
98
|
+
value: function remove(name) {
|
|
99
|
+
this.routes.delete(name);
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
return Router;
|
|
103
|
+
}();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ApplicationContext } from '../context';
|
|
3
|
+
import { useApp, useLoad } from '../hooks';
|
|
4
|
+
var Internal = /*#__PURE__*/React.memo(function () {
|
|
5
|
+
var app = useApp();
|
|
6
|
+
var loading = useLoad();
|
|
7
|
+
if (loading) {
|
|
8
|
+
return app.renderComponent('App.Spin');
|
|
9
|
+
}
|
|
10
|
+
return app.renderComponent('App.Main', {
|
|
11
|
+
app: app,
|
|
12
|
+
providers: app.providers
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export var AppComponent = function AppComponent(props) {
|
|
16
|
+
var app = props.app;
|
|
17
|
+
return /*#__PURE__*/React.createElement(ApplicationContext.Provider, {
|
|
18
|
+
value: app
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Internal, null));
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { RouterProvider } from './RouterProvider';
|
|
3
|
+
export var MainComponent = /*#__PURE__*/React.memo(function (props) {
|
|
4
|
+
var app = props.app,
|
|
5
|
+
providers = props.providers;
|
|
6
|
+
var router = useMemo(function () {
|
|
7
|
+
return app.router.createRouter();
|
|
8
|
+
}, []);
|
|
9
|
+
return /*#__PURE__*/React.createElement(RouterProvider, {
|
|
10
|
+
router: router,
|
|
11
|
+
providers: providers
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RouterState } from '@remix-run/router';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type DataRouteObject, type RouterProviderProps } from 'react-router';
|
|
4
|
+
/**
|
|
5
|
+
* Given a Remix Router instance, render the appropriate UI
|
|
6
|
+
*/
|
|
7
|
+
export declare function RouterProvider({ fallbackElement, router, providers, }: RouterProviderProps & {
|
|
8
|
+
providers?: any;
|
|
9
|
+
}): React.ReactElement;
|
|
10
|
+
export declare function DataRoutes({ routes, state, }: {
|
|
11
|
+
routes: DataRouteObject[];
|
|
12
|
+
state: RouterState;
|
|
13
|
+
}): React.ReactElement | null;
|
|
14
|
+
export declare const RouterContextCleaner: (props: any) => React.JSX.Element;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { UNSAFE_DataRouterContext as DataRouterContext, UNSAFE_DataRouterStateContext as DataRouterStateContext, UNSAFE_LocationContext as LocationContext, UNSAFE_RouteContext as RouteContext, Router, UNSAFE_useRoutesImpl as useRoutesImpl } from 'react-router';
|
|
13
|
+
import { compose } from '../compose';
|
|
14
|
+
var START_TRANSITION = 'startTransition';
|
|
15
|
+
/**
|
|
16
|
+
* Given a Remix Router instance, render the appropriate UI
|
|
17
|
+
*/
|
|
18
|
+
export function RouterProvider(_ref) {
|
|
19
|
+
var fallbackElement = _ref.fallbackElement,
|
|
20
|
+
router = _ref.router,
|
|
21
|
+
providers = _ref.providers;
|
|
22
|
+
// Need to use a layout effect here so we are subscribed early enough to
|
|
23
|
+
// pick up on any render-driven redirects/navigations (useEffect/<Navigate>)
|
|
24
|
+
var _React$useState = React.useState(router.state),
|
|
25
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
26
|
+
state = _React$useState2[0],
|
|
27
|
+
setStateImpl = _React$useState2[1];
|
|
28
|
+
var setState = React.useCallback(function (newState) {
|
|
29
|
+
START_TRANSITION in React ? React[START_TRANSITION](function () {
|
|
30
|
+
return setStateImpl(newState);
|
|
31
|
+
}) : setStateImpl(newState);
|
|
32
|
+
}, [setStateImpl]);
|
|
33
|
+
React.useLayoutEffect(function () {
|
|
34
|
+
return router.subscribe(setState);
|
|
35
|
+
}, [router, setState]);
|
|
36
|
+
var navigator = React.useMemo(function () {
|
|
37
|
+
return {
|
|
38
|
+
createHref: router.createHref,
|
|
39
|
+
encodeLocation: router.encodeLocation,
|
|
40
|
+
go: function go(n) {
|
|
41
|
+
return router.navigate(n);
|
|
42
|
+
},
|
|
43
|
+
push: function push(to, state, opts) {
|
|
44
|
+
return router.navigate(to, {
|
|
45
|
+
state: state,
|
|
46
|
+
preventScrollReset: opts === null || opts === void 0 ? void 0 : opts.preventScrollReset
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
replace: function replace(to, state, opts) {
|
|
50
|
+
return router.navigate(to, {
|
|
51
|
+
replace: true,
|
|
52
|
+
state: state,
|
|
53
|
+
preventScrollReset: opts === null || opts === void 0 ? void 0 : opts.preventScrollReset
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}, [router]);
|
|
58
|
+
var basename = router.basename || '/';
|
|
59
|
+
var dataRouterContext = React.useMemo(function () {
|
|
60
|
+
return {
|
|
61
|
+
router: router,
|
|
62
|
+
navigator: navigator,
|
|
63
|
+
static: false,
|
|
64
|
+
basename: basename
|
|
65
|
+
};
|
|
66
|
+
}, [router, navigator, basename]);
|
|
67
|
+
var Providers = compose.apply(void 0, _toConsumableArray(providers))(function (props) {
|
|
68
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, props.children);
|
|
69
|
+
});
|
|
70
|
+
// The fragment and {null} here are important! We need them to keep React 18's
|
|
71
|
+
// useId happy when we are server-rendering since we may have a <script> here
|
|
72
|
+
// containing the hydrated server-side staticContext (from StaticRouterProvider).
|
|
73
|
+
// useId relies on the component tree structure to generate deterministic id's
|
|
74
|
+
// so we need to ensure it remains the same on the client even though
|
|
75
|
+
// we don't need the <script> tag
|
|
76
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RouterContextCleaner, null, /*#__PURE__*/React.createElement(DataRouterContext.Provider, {
|
|
77
|
+
value: dataRouterContext
|
|
78
|
+
}, /*#__PURE__*/React.createElement(DataRouterStateContext.Provider, {
|
|
79
|
+
value: state
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Router, {
|
|
81
|
+
basename: basename,
|
|
82
|
+
location: state.location,
|
|
83
|
+
navigationType: state.historyAction,
|
|
84
|
+
navigator: navigator
|
|
85
|
+
}, /*#__PURE__*/React.createElement(Providers, null, state.initialized ? /*#__PURE__*/React.createElement(DataRoutes, {
|
|
86
|
+
routes: router.routes,
|
|
87
|
+
state: state
|
|
88
|
+
}) : fallbackElement))))), null);
|
|
89
|
+
}
|
|
90
|
+
export function DataRoutes(_ref2) {
|
|
91
|
+
var routes = _ref2.routes,
|
|
92
|
+
state = _ref2.state;
|
|
93
|
+
return useRoutesImpl(routes, undefined, state);
|
|
94
|
+
}
|
|
95
|
+
export var RouterContextCleaner = function RouterContextCleaner(props) {
|
|
96
|
+
return /*#__PURE__*/React.createElement(RouteContext.Provider, {
|
|
97
|
+
value: {
|
|
98
|
+
outlet: null,
|
|
99
|
+
matches: [],
|
|
100
|
+
isDataRoute: false
|
|
101
|
+
}
|
|
102
|
+
}, /*#__PURE__*/React.createElement(LocationContext.Provider, {
|
|
103
|
+
value: null
|
|
104
|
+
}, props.children));
|
|
105
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export * from './AppComponent';
|
|
3
|
+
export * from './MainComponent';
|
|
4
|
+
export * from './RouterProvider';
|
|
5
|
+
export declare const defaultAppComponents: {
|
|
6
|
+
App: {
|
|
7
|
+
Main: React.MemoExoticComponent<(props: {
|
|
8
|
+
app: import("..").Application;
|
|
9
|
+
providers: any[];
|
|
10
|
+
}) => React.JSX.Element>;
|
|
11
|
+
Spin: () => React.ReactElement<"loading", string | React.JSXElementConstructor<any>>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MainComponent } from './MainComponent';
|
|
3
|
+
export * from './AppComponent';
|
|
4
|
+
export * from './MainComponent';
|
|
5
|
+
export * from './RouterProvider';
|
|
6
|
+
export var defaultAppComponents = {
|
|
7
|
+
App: {
|
|
8
|
+
Main: MainComponent,
|
|
9
|
+
Spin: function Spin() {
|
|
10
|
+
return /*#__PURE__*/React.createElement('div', 'loading');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React from 'react';
|
|
14
|
+
var Blank = function Blank(_ref) {
|
|
15
|
+
var children = _ref.children;
|
|
16
|
+
return children || null;
|
|
17
|
+
};
|
|
18
|
+
export var compose = function compose() {
|
|
19
|
+
for (var _len = arguments.length, components = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
|
+
components[_key] = arguments[_key];
|
|
21
|
+
}
|
|
22
|
+
var Root = [].concat(components, [Blank]).reduce(function (parent, child) {
|
|
23
|
+
var _ref2 = Array.isArray(parent) ? parent : [parent],
|
|
24
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
25
|
+
Parent = _ref3[0],
|
|
26
|
+
parentProps = _ref3[1];
|
|
27
|
+
var _ref4 = Array.isArray(child) ? child : [child],
|
|
28
|
+
_ref5 = _slicedToArray(_ref4, 2),
|
|
29
|
+
Child = _ref5[0],
|
|
30
|
+
childProps = _ref5[1];
|
|
31
|
+
return function (_ref6) {
|
|
32
|
+
var children = _ref6.children;
|
|
33
|
+
return /*#__PURE__*/React.createElement(Parent, _objectSpread({}, parentProps), /*#__PURE__*/React.createElement(Child, _objectSpread({}, childProps), children));
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
return function (LastChild) {
|
|
37
|
+
return function (props) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(Root, null, LastChild && /*#__PURE__*/React.createElement(LastChild, _objectSpread({}, props)));
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|