@_tc/template-core 0.0.1-bate.46 → 0.0.1-bate.48
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/.skills/tc-component-usage-skills/SKILL.md +132 -0
- package/.skills/tc-component-usage-skills/reference/component-api.md +801 -0
- package/.skills/tc-component-usage-skills/reference/examples.md +435 -0
- package/.skills/tc-component-usage-skills/reference/patterns.md +392 -0
- package/.skills/tc-component-usage-skills/reference/template-core-frontend.md +104 -0
- package/.skills/tc-generator/SKILL.md +70 -0
- package/.skills/tc-generator/reference/example.md +357 -0
- package/.skills/tc-generator/reference/model-schema.md +328 -0
- package/.skills/tc-generator/reference/project-template/app/controller/product.js +73 -0
- package/.skills/tc-generator/reference/project-template/app/router/product.js +9 -0
- package/.skills/tc-generator/reference/project-template/config/config.default.js +7 -0
- package/.skills/tc-generator/reference/project-template/index.js +17 -0
- package/.skills/tc-generator/reference/project-template/model/product/mode.js +179 -0
- package/.skills/tc-generator/reference/project-template/model/product/project/default.js +5 -0
- package/.skills/tc-generator/reference/project-template/package.json +25 -0
- package/.skills/tc-generator/reference/runtime-extensions.md +190 -0
- package/README.md +1723 -0
- package/cjs/_virtual/_rolldown/runtime.js +1 -37
- package/cjs/app/controller/base.js +1 -29
- package/cjs/app/controller/project.js +1 -60
- package/cjs/app/controller/view.js +1 -24
- package/cjs/app/extend/$fetch.js +1 -0
- package/cjs/app/extend/db.js +20 -8
- package/cjs/app/extend/generateErrorMessage.js +1 -16
- package/cjs/app/extend/logger.js +1 -35
- package/cjs/app/extend/parsingParamsOnUrl.js +1 -22
- package/cjs/app/extend/render-view.js +1 -24
- package/cjs/app/middleware/api-params-verify.js +1 -72
- package/cjs/app/middleware/api-sign-verify.js +1 -23
- package/cjs/app/middleware/error-handle.js +1 -38
- package/cjs/app/middleware/project-handler.js +1 -21
- package/cjs/app/middleware.js +1 -32
- package/cjs/app/router/project.js +1 -10
- package/cjs/app/router/view.js +1 -9
- package/cjs/app/router-schema/project.js +1 -16
- package/cjs/app/service/base.js +1 -17
- package/cjs/app/service/project.js +1 -38
- package/cjs/app/type.js +0 -1
- package/cjs/app/typings.js +0 -1
- package/cjs/app/view/entry.tpl +27 -28
- package/cjs/bundler/buildBE.js +1 -0
- package/cjs/bundler/defaultAlias.js +1 -5
- package/cjs/bundler/dev.js +1 -20
- package/cjs/bundler/index.js +1 -19
- package/cjs/bundler/prod.js +1 -21
- package/cjs/bundler/state.js +1 -0
- package/cjs/bundler/utils.js +1 -262
- package/cjs/config/config.default.js +1 -0
- package/cjs/index.js +1 -23
- package/cjs/packages/common/LRUCache.js +1 -4
- package/cjs/packages/common/array/index.js +1 -43
- package/cjs/packages/common/cache/LRUCache.js +1 -45
- package/cjs/packages/common/cache/index.js +1 -4
- package/cjs/packages/common/guards/index.js +1 -34
- package/cjs/packages/common/http/index.js +1 -0
- package/cjs/packages/common/i18n/default.js +1 -95
- package/cjs/packages/common/i18n/en-US.js +1 -95
- package/cjs/packages/common/i18n/index.js +1 -178
- package/cjs/packages/common/i18n/locales.js +1 -17
- package/cjs/packages/common/i18n/types.js +0 -1
- package/cjs/packages/common/index.js +1 -65
- package/cjs/packages/common/log/index.js +2 -160
- package/cjs/packages/common/number/index.js +1 -14
- package/cjs/packages/common/object/filterEmpty.js +1 -32
- package/cjs/packages/common/object/filtereEmpty.js +1 -5
- package/cjs/packages/common/object/index.js +1 -26
- package/cjs/packages/common/string/index.js +1 -17
- package/cjs/packages/common/types/index.js +0 -1
- package/cjs/packages/core/env.js +1 -27
- package/cjs/packages/core/index.js +1 -110
- package/cjs/packages/core/loader/config.js +1 -43
- package/cjs/packages/core/loader/controller.js +1 -33
- package/cjs/packages/core/loader/extend.js +1 -31
- package/cjs/packages/core/loader/middleware.js +1 -30
- package/cjs/packages/core/loader/model.js +1 -111
- package/cjs/packages/core/loader/router-schema.js +1 -36
- package/cjs/packages/core/loader/router.js +1 -62
- package/cjs/packages/core/loader/service.js +1 -30
- package/cjs/packages/core/paths.js +1 -12
- package/cjs/packages/core/types.js +0 -1
- package/cjs/packages/utils/getAllFilesInFolder.js +1 -14
- package/cjs/packages/utils/getAllFnReturnValue.js +0 -1
- package/cjs/packages/utils/index.js +1 -11
- package/cjs/packages/utils/loadFile.js +1 -55
- package/cjs/packages/utils/path.js +1 -31
- package/cjs/packages/utils/runFileFn.js +1 -51
- package/cjs/scripts/vite-build/build.js +3 -0
- package/cjs/scripts/vite-build/collect.js +1 -0
- package/cjs/scripts/vite-build/constants.js +1 -0
- package/cjs/scripts/vite-build/dts.js +1 -0
- package/cjs/scripts/vite-build/index.js +1 -0
- package/cjs/scripts/vite-build/normalize.js +1 -0
- package/cjs/scripts/vite-build/plugins.js +1 -0
- package/cjs/scripts/vite-build/resolve.js +1 -0
- package/cjs/scripts/vite-build/types.js +0 -0
- package/cjs/scripts/vite-build/utils.js +1 -0
- package/esm/_virtual/_rolldown/runtime.js +4 -29
- package/esm/app/controller/base.js +14 -16
- package/esm/app/controller/project.js +39 -46
- package/esm/app/controller/view.js +23 -19
- package/esm/app/extend/$fetch.js +15 -0
- package/esm/app/extend/db.js +138 -4
- package/esm/app/extend/generateErrorMessage.js +4 -12
- package/esm/app/extend/logger.js +9 -17
- package/esm/app/extend/parsingParamsOnUrl.js +11 -18
- package/esm/app/extend/render-view.js +18 -16
- package/esm/app/middleware/api-params-verify.js +36 -50
- package/esm/app/middleware/api-sign-verify.js +10 -16
- package/esm/app/middleware/error-handle.js +17 -30
- package/esm/app/middleware/project-handler.js +11 -16
- package/esm/app/middleware.js +12 -19
- package/esm/app/router/project.js +4 -6
- package/esm/app/router/view.js +4 -5
- package/esm/app/router-schema/project.js +2 -2
- package/esm/app/service/base.js +6 -7
- package/esm/app/service/project.js +18 -32
- package/esm/app/view/entry.tpl +27 -28
- package/esm/bundler/buildBE.js +54 -0
- package/esm/bundler/defaultAlias.js +2 -2
- package/esm/bundler/dev.js +8 -14
- package/esm/bundler/index.js +11 -9
- package/esm/bundler/prod.js +9 -14
- package/esm/bundler/state.js +10 -0
- package/esm/bundler/utils.js +115 -164
- package/esm/config/config.default.js +9 -0
- package/esm/index.js +12 -15
- package/esm/packages/common/LRUCache.js +2 -2
- package/esm/packages/common/array/index.js +21 -31
- package/esm/packages/common/cache/LRUCache.js +21 -25
- package/esm/packages/common/cache/index.js +2 -2
- package/esm/packages/common/guards/index.js +5 -23
- package/esm/packages/common/http/index.js +256 -0
- package/esm/packages/common/i18n/default.js +2 -7
- package/esm/packages/common/i18n/en-US.js +2 -7
- package/esm/packages/common/i18n/index.js +73 -144
- package/esm/packages/common/i18n/locales.js +6 -8
- package/esm/packages/common/index.js +14 -13
- package/esm/packages/common/log/index.js +69 -122
- package/esm/packages/common/number/index.js +7 -8
- package/esm/packages/common/object/filterEmpty.js +16 -22
- package/esm/packages/common/object/filtereEmpty.js +2 -2
- package/esm/packages/common/object/index.js +14 -17
- package/esm/packages/common/string/index.js +2 -11
- package/esm/packages/core/env.js +22 -24
- package/esm/packages/core/index.js +36 -92
- package/esm/packages/core/loader/config.js +21 -35
- package/esm/packages/core/loader/controller.js +8 -27
- package/esm/packages/core/loader/extend.js +19 -21
- package/esm/packages/core/loader/middleware.js +9 -22
- package/esm/packages/core/loader/model.js +50 -91
- package/esm/packages/core/loader/router-schema.js +13 -29
- package/esm/packages/core/loader/router.js +27 -51
- package/esm/packages/core/loader/service.js +8 -24
- package/esm/packages/core/paths.js +5 -5
- package/esm/packages/utils/getAllFilesInFolder.js +6 -8
- package/esm/packages/utils/index.js +5 -5
- package/esm/packages/utils/loadFile.js +28 -43
- package/esm/packages/utils/path.js +10 -22
- package/esm/packages/utils/runFileFn.js +32 -37
- package/esm/scripts/vite-build/build.js +141 -0
- package/esm/scripts/vite-build/collect.js +79 -0
- package/esm/scripts/vite-build/constants.js +34 -0
- package/esm/scripts/vite-build/dts.js +132 -0
- package/esm/scripts/vite-build/index.js +3 -0
- package/esm/scripts/vite-build/normalize.js +78 -0
- package/esm/scripts/vite-build/plugins.js +106 -0
- package/esm/scripts/vite-build/resolve.js +46 -0
- package/esm/scripts/vite-build/types.js +0 -0
- package/esm/scripts/vite-build/utils.js +24 -0
- package/fe/bundler/defaultAlias.js +4 -0
- package/fe/frontend/apps/dash/Dashboard.d.ts +6 -0
- package/fe/frontend/apps/dash/Dashboard.js +164 -0
- package/fe/frontend/apps/dash/dash.entry.js +54 -0
- package/fe/frontend/apps/dash/types.d.ts +25 -0
- package/fe/frontend/apps/dash/types.js +0 -0
- package/fe/frontend/apps/ui-components/index.js +16 -0
- package/fe/frontend/apps/ui-components/ui-components.entry.d.ts +2 -0
- package/fe/frontend/apps/ui-components/ui-components.entry.js +8 -0
- package/fe/frontend/extended/SchemaForm/data.d.ts +1 -1
- package/fe/frontend/extended/SchemaForm/data.js +7 -7
- package/fe/frontend/{widgets → src}/api/baseInfo.d.ts +2 -2
- package/fe/frontend/src/api/baseInfo.js +14 -0
- package/fe/frontend/src/common/CRUD/CRUD.d.ts +3 -0
- package/fe/frontend/src/common/CRUD/CRUD.js +2 -0
- package/fe/frontend/src/common/CRUD/index.d.ts +2 -0
- package/fe/frontend/src/common/CRUD/index.js +2 -0
- package/fe/frontend/src/common/auth/index.js +21 -0
- package/fe/frontend/{widgets/defaultPages/Schema/utils → src/common}/fetchErrorShow.d.ts +1 -1
- package/fe/frontend/src/common/fetchErrorShow.js +11 -0
- package/fe/frontend/src/common/generateMenuData.d.ts +4 -0
- package/fe/frontend/src/common/generateMenuData.js +16 -0
- package/fe/frontend/{widgets → src}/common/importComponent.d.ts +1 -1
- package/fe/frontend/src/common/importComponent.js +23 -0
- package/fe/frontend/src/common/language.d.ts +3 -0
- package/fe/frontend/src/common/language.js +12 -0
- package/fe/frontend/{widgets → src}/common/logFn/index.d.ts +1 -0
- package/fe/frontend/src/common/logFn/index.js +14 -0
- package/fe/frontend/{widgets → src}/common/menu.d.ts +1 -1
- package/fe/frontend/src/common/menu.js +97 -0
- package/fe/frontend/src/common/request.d.ts +37 -0
- package/fe/frontend/src/common/request.js +183 -0
- package/fe/frontend/{components → src/components}/AsyncSelect/AsyncSelect.d.ts +3 -3
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.js +35 -0
- package/fe/frontend/src/components/AsyncSelect/index.d.ts +4 -0
- package/fe/frontend/src/components/AsyncSelect/index.js +5 -0
- package/fe/frontend/{widgets → src}/components/BasePage/HeaderView.d.ts +1 -0
- package/fe/frontend/src/components/BasePage/HeaderView.js +55 -0
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.d.ts +14 -0
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.js +44 -0
- package/fe/frontend/src/components/LanguageSwitch/index.d.ts +4 -0
- package/fe/frontend/src/components/LanguageSwitch/index.js +5 -0
- package/fe/frontend/{widgets → src}/components/Router/index.d.ts +2 -2
- package/fe/frontend/src/components/Router/index.js +21 -0
- package/fe/frontend/src/components/Router/type.js +0 -0
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.d.ts +15 -0
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.js +83 -0
- package/fe/frontend/src/components/ThemeSwitch/index.d.ts +4 -0
- package/fe/frontend/src/components/ThemeSwitch/index.js +5 -0
- package/fe/frontend/src/components/index.d.ts +11 -0
- package/fe/frontend/src/components/index.js +7 -0
- package/fe/frontend/src/defaultPages/Iframe/index.js +15 -0
- package/fe/frontend/src/defaultPages/NotFoundPage/index.d.ts +3 -0
- package/fe/frontend/src/defaultPages/NotFoundPage/index.js +28 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/components/CallCom/DetailPanel.d.ts +1 -1
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.js +102 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/components/CallCom/PopFrom.d.ts +1 -1
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.js +119 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +44 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.js +10 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.d.ts +4 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.js +9 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.js +62 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/components/SchemaTable/index.d.ts +2 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.js +200 -0
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.js +9 -0
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.js +4 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/hooks/useComConfig.d.ts +1 -1
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.js +17 -0
- package/fe/frontend/src/defaultPages/SchemaPage/index.css +112 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/index.d.ts +1 -0
- package/fe/frontend/src/defaultPages/SchemaPage/index.js +90 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/schemaType.d.ts +7 -6
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.js +7 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.js +6 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.js +66 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +11 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.js +122 -0
- package/fe/frontend/{widgets → src}/defaultPages/SidebarSlotPage/SidebarSlotContainer.d.ts +2 -2
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +55 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.js +21 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.js +21 -0
- package/fe/frontend/src/defaultPages/SlotPage/index.js +22 -0
- package/fe/frontend/src/exportStore.d.ts +17 -0
- package/fe/frontend/src/exportStore.js +5 -0
- package/fe/frontend/src/hooks/useCurrentMenuData.js +30 -0
- package/fe/frontend/src/hooks/useRouterParams.js +16 -0
- package/fe/frontend/src/index.d.ts +21 -0
- package/fe/frontend/src/index.js +19 -0
- package/fe/frontend/src/language/en-US.d.ts +89 -0
- package/fe/frontend/src/language/en-US.js +89 -0
- package/fe/frontend/src/language/index.d.ts +73 -0
- package/fe/frontend/src/language/index.js +79 -0
- package/fe/frontend/src/language/zh-CN.d.ts +89 -0
- package/fe/frontend/src/language/zh-CN.js +89 -0
- package/fe/frontend/src/main.css +96 -0
- package/fe/frontend/src/main.d.ts +27 -0
- package/fe/frontend/src/main.js +60 -0
- package/fe/frontend/src/stores/apiFreezer.d.ts +93 -0
- package/fe/frontend/src/stores/apiFreezer.js +53 -0
- package/fe/frontend/{widgets/store → src/stores}/mode.d.ts +3 -3
- package/fe/frontend/src/stores/mode.js +36 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src}/stores/schemaEventBus.d.ts +1 -1
- package/fe/frontend/src/stores/schemaEventBus.js +53 -0
- package/fe/frontend/{widgets/defaultPages/Schema → src}/stores/schemaStore.d.ts +5 -5
- package/fe/frontend/src/stores/schemaStore.js +28 -0
- package/fe/frontend/{typing → src/typing}/scalability.d.ts +3 -3
- package/fe/frontend/src/typing/scalability.js +0 -0
- package/fe/frontend/src/typing/window.d.ts +9 -0
- package/fe/frontend/src/typing/window.js +0 -0
- package/fe/model/types/data/button.d.ts +4 -4
- package/fe/model/types/data/component.d.ts +32 -47
- package/fe/model/types/data/schema.d.ts +6 -6
- package/fe/model/types/data/search.d.ts +1 -1
- package/fe/model/types/model.d.ts +19 -12
- package/fe/packages/common/cache/LRUCache.js +43 -47
- package/fe/packages/common/guards/index.js +8 -24
- package/fe/packages/common/http/index.d.ts +90 -0
- package/fe/packages/common/http/index.js +300 -0
- package/fe/packages/common/i18n/default.js +91 -88
- package/fe/packages/common/i18n/en-US.js +91 -88
- package/fe/packages/common/i18n/index.d.ts +3 -3
- package/fe/packages/common/i18n/index.js +142 -153
- package/fe/packages/common/i18n/locales.d.ts +3 -3
- package/fe/packages/common/i18n/locales.js +10 -9
- package/fe/packages/common/index.d.ts +1 -0
- package/fe/packages/common/object/filterEmpty.js +25 -30
- package/fe/packages/react/hooks/useBreadcrumb.d.ts +10 -0
- package/fe/packages/react/hooks/useBreadcrumb.js +5 -0
- package/fe/packages/react/hooks/useExecuteOnce.js +47 -0
- package/fe/packages/react/hooks/useInit.js +11 -0
- package/fe/packages/react/hooks/useLanguage.d.ts +2 -0
- package/fe/packages/react/hooks/useLanguage.js +8 -0
- package/fe/packages/react/hooks/usePagination.js +30 -0
- package/fe/packages/{ui/react → react}/hooks/useRefState.d.ts +1 -1
- package/fe/packages/react/hooks/useRefState.js +35 -0
- package/fe/packages/react/hooks/useWatch.js +60 -0
- package/fe/packages/react/hooks/useWatch.test.js +24 -0
- package/fe/packages/react/ui/assets/table/no-result.js +4 -0
- package/fe/packages/{ui/react → react/ui}/components/Button/Button.d.ts +1 -1
- package/fe/packages/react/ui/components/Button/Button.js +88 -0
- package/fe/packages/react/ui/components/Button/SubmitButton.d.ts +13 -0
- package/fe/packages/react/ui/components/Button/SubmitButton.js +30 -0
- package/fe/packages/react/ui/components/Button/index.d.ts +4 -0
- package/fe/packages/react/ui/components/Button/index.js +3 -0
- package/fe/packages/react/ui/components/Card/Card.d.ts +15 -0
- package/fe/packages/react/ui/components/Card/Card.js +31 -0
- package/fe/packages/react/ui/components/Card/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Card/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Checkbox/Checkbox.d.ts +1 -1
- package/fe/packages/react/ui/components/Checkbox/Checkbox.js +52 -0
- package/fe/packages/react/ui/components/Checkbox/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Checkbox/index.js +2 -0
- package/fe/packages/react/ui/components/ConfirmDialog/ConfirmDialog.js +41 -0
- package/fe/packages/react/ui/components/ConfirmDialog/index.d.ts +2 -0
- package/fe/packages/react/ui/components/ConfirmDialog/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/DataTable/ActionBtn.d.ts +1 -1
- package/fe/packages/react/ui/components/DataTable/ActionBtn.js +116 -0
- package/fe/packages/{ui/react → react/ui}/components/DataTable/index.d.ts +9 -7
- package/fe/packages/react/ui/components/DataTable/index.js +235 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/Calendar.d.ts +2 -2
- package/fe/packages/react/ui/components/Date/Calendar.js +351 -0
- package/fe/packages/react/ui/components/Date/Date.js +210 -0
- package/fe/packages/react/ui/components/Date/DateTestPage.js +340 -0
- package/fe/packages/react/ui/components/Date/LocaleContext.js +11 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/LocaleProvider.d.ts +2 -2
- package/fe/packages/react/ui/components/Date/LocaleProvider.js +31 -0
- package/fe/packages/react/ui/components/Date/TimePicker.js +136 -0
- package/fe/packages/react/ui/components/Date/data.js +7 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/dateLocaleStore.d.ts +1 -1
- package/fe/packages/react/ui/components/Date/dateLocaleStore.js +14 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.d.ts +3 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.js +12 -0
- package/fe/packages/react/ui/components/Date/index.d.ts +6 -0
- package/fe/packages/react/ui/components/Date/index.js +6 -0
- package/fe/packages/react/ui/components/Date/locales.js +25 -0
- package/fe/packages/{ui/react → react/ui}/components/Drawer/Drawer.d.ts +1 -1
- package/fe/packages/react/ui/components/Drawer/Drawer.js +151 -0
- package/fe/packages/react/ui/components/Drawer/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Drawer/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Dropdown/Dropdown.d.ts +3 -2
- package/fe/packages/react/ui/components/Dropdown/Dropdown.js +105 -0
- package/fe/packages/react/ui/components/Dropdown/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Dropdown/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/Form.d.ts +2 -2
- package/fe/packages/react/ui/components/Form/Form.js +15 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/FormItem.d.ts +3 -3
- package/fe/packages/react/ui/components/Form/FormItem.js +60 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/SchemaForm/data.d.ts +8 -8
- package/fe/packages/react/ui/components/Form/SchemaForm/data.js +16 -0
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.d.ts +4 -0
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.js +4 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/SchemaForm/index.d.ts +9 -9
- package/fe/packages/react/ui/components/Form/SchemaForm/index.js +119 -0
- package/fe/packages/react/ui/components/Form/index.d.ts +5 -0
- package/fe/packages/react/ui/components/Form/index.js +5 -0
- package/fe/packages/react/ui/components/Form/useForm.d.ts +3 -0
- package/fe/packages/react/ui/components/Form/useForm.js +2 -0
- package/fe/packages/react/ui/components/ImagePreview/ImagePreview.js +307 -0
- package/fe/packages/{ui/react → react/ui}/components/ImagePreview/PreviewImage.d.ts +2 -2
- package/fe/packages/react/ui/components/ImagePreview/PreviewImage.js +56 -0
- package/fe/packages/react/ui/components/ImagePreview/index.d.ts +3 -0
- package/fe/packages/react/ui/components/ImagePreview/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Input/Input.d.ts +1 -1
- package/fe/packages/react/ui/components/Input/Input.js +88 -0
- package/fe/packages/react/ui/components/Input/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Input/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/InputNumber/InputNumber.d.ts +2 -2
- package/fe/packages/react/ui/components/InputNumber/InputNumber.js +207 -0
- package/fe/packages/react/ui/components/InputNumber/index.d.ts +2 -0
- package/fe/packages/react/ui/components/InputNumber/index.js +2 -0
- package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.js +45 -0
- package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.test.js +59 -0
- package/fe/packages/{ui/react → react/ui}/components/Label/Label.d.ts +1 -1
- package/fe/packages/react/ui/components/Label/Label.js +58 -0
- package/fe/packages/react/ui/components/Label/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Label/index.js +2 -0
- package/fe/packages/react/ui/components/Layout/Layout.d.ts +11 -0
- package/fe/packages/react/ui/components/Layout/Layout.js +33 -0
- package/fe/packages/react/ui/components/Layout/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Layout/index.js +2 -0
- package/fe/packages/react/ui/components/Loading/Loading.d.ts +25 -0
- package/fe/packages/react/ui/components/Loading/Loading.js +48 -0
- package/fe/packages/react/ui/components/Loading/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Loading/index.js +2 -0
- package/fe/packages/react/ui/components/Menu/Menu.js +147 -0
- package/fe/packages/react/ui/components/Menu/MenuContext.js +88 -0
- package/fe/packages/react/ui/components/Menu/MenuItem.js +78 -0
- package/fe/packages/react/ui/components/Menu/SubMenu.js +207 -0
- package/fe/packages/react/ui/components/Menu/index.d.ts +9 -0
- package/fe/packages/react/ui/components/Menu/index.js +5 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/menuTypes.d.ts +1 -1
- package/fe/packages/react/ui/components/Menu/menuTypes.js +0 -0
- package/fe/packages/react/ui/components/Menu/utils.js +8 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/Message.d.ts +1 -1
- package/fe/packages/react/ui/components/Message/Message.js +76 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/MessageManager.d.ts +2 -2
- package/fe/packages/react/ui/components/Message/MessageManager.js +104 -0
- package/fe/packages/react/ui/components/Message/data.js +4 -0
- package/fe/packages/react/ui/components/Message/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Message/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Modal/Modal.d.ts +1 -1
- package/fe/packages/react/ui/components/Modal/Modal.js +59 -0
- package/fe/packages/{ui/react → react/ui}/components/Modal/ModalManager.d.ts +5 -5
- package/fe/packages/react/ui/components/Modal/ModalManager.js +106 -0
- package/fe/packages/react/ui/components/Modal/index.d.ts +4 -0
- package/fe/packages/react/ui/components/Modal/index.js +3 -0
- package/fe/packages/react/ui/components/Notification/Notification.d.ts +14 -0
- package/fe/packages/react/ui/components/Notification/Notification.js +56 -0
- package/fe/packages/react/ui/components/Notification/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Notification/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Overlay/Overlay.d.ts +1 -1
- package/fe/packages/react/ui/components/Overlay/Overlay.js +61 -0
- package/fe/packages/react/ui/components/Overlay/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Overlay/index.js +2 -0
- package/fe/packages/react/ui/components/Pagination/Pagination.js +115 -0
- package/fe/packages/react/ui/components/Pagination/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Pagination/index.js +2 -0
- package/fe/packages/react/ui/components/Popup/Popup.js +86 -0
- package/fe/packages/react/ui/components/Popup/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Popup/index.js +2 -0
- package/fe/packages/react/ui/components/Radio/Radio.d.ts +9 -0
- package/fe/packages/react/ui/components/Radio/Radio.js +36 -0
- package/fe/packages/react/ui/components/Radio/RadioGroup.d.ts +19 -0
- package/fe/packages/react/ui/components/Radio/RadioGroup.js +33 -0
- package/fe/packages/react/ui/components/Radio/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Radio/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Search/Search.d.ts +4 -4
- package/fe/packages/react/ui/components/Search/Search.js +24 -0
- package/fe/packages/react/ui/components/Search/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Search/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Select/Select.d.ts +1 -1
- package/fe/packages/react/ui/components/Select/Select.js +276 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.d.ts +3 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.js +16 -0
- package/fe/packages/react/ui/components/Select/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Select/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Skeleton/Skeleton.d.ts +1 -1
- package/fe/packages/react/ui/components/Skeleton/Skeleton.js +101 -0
- package/fe/packages/react/ui/components/Skeleton/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Skeleton/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Switch/Switch.d.ts +1 -1
- package/fe/packages/react/ui/components/Switch/Switch.js +28 -0
- package/fe/packages/react/ui/components/Switch/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Switch/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/TableSearch.d.ts +6 -6
- package/fe/packages/react/ui/components/TableSearch/TableSearch.js +146 -0
- package/fe/packages/react/ui/components/TableSearch/index.d.ts +3 -0
- package/fe/packages/react/ui/components/TableSearch/index.js +2 -0
- package/fe/packages/react/ui/components/TableSearch/lang.js +14 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/tableSearchLocaleStore.d.ts +1 -1
- package/fe/packages/react/ui/components/TableSearch/tableSearchLocaleStore.js +10 -0
- package/fe/packages/react/ui/components/Tabs/Tabs.d.ts +16 -0
- package/fe/packages/react/ui/components/Tabs/Tabs.js +33 -0
- package/fe/packages/react/ui/components/Tabs/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Tabs/index.js +2 -0
- package/fe/packages/react/ui/components/Textarea/Textarea.js +58 -0
- package/fe/packages/react/ui/components/Textarea/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Textarea/index.js +2 -0
- package/fe/packages/react/ui/components/Tooltip/Tooltip.js +77 -0
- package/fe/packages/react/ui/components/Tooltip/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Tooltip/index.js +2 -0
- package/fe/packages/react/ui/components/TreeSelect/TreeSelect.js +190 -0
- package/fe/packages/react/ui/components/TreeSelect/index.d.ts +2 -0
- package/fe/packages/react/ui/components/TreeSelect/index.js +2 -0
- package/fe/packages/react/ui/components/Upload/ImageUpload.js +101 -0
- package/fe/packages/{ui/react → react/ui}/components/Upload/Upload.d.ts +1 -1
- package/fe/packages/react/ui/components/Upload/Upload.js +29 -0
- package/fe/packages/react/ui/components/Upload/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Upload/index.js +3 -0
- package/fe/packages/react/ui/components/breadcrumb/breadcrumb.js +155 -0
- package/fe/packages/react/ui/components/breadcrumb/index.d.ts +2 -0
- package/fe/packages/react/ui/components/breadcrumb/index.js +2 -0
- package/fe/packages/react/ui/components/hooks/useDropdownPositioning.js +121 -0
- package/fe/packages/react/ui/components/hooks/useInputController.js +39 -0
- package/fe/packages/react/ui/components/index.d.ts +36 -0
- package/fe/packages/react/ui/components/index.js +81 -0
- package/fe/packages/react/ui/components/table/index.d.ts +2 -0
- package/fe/packages/react/ui/components/table/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/table/table.d.ts +16 -3
- package/fe/packages/react/ui/components/table/table.js +166 -0
- package/fe/packages/react/ui/components/testPage/MenuTestPage.js +397 -0
- package/fe/packages/react/ui/components/testPage/index.js +1612 -0
- package/fe/packages/{ui/react → react/ui}/i18n/I18nProvider.d.ts +2 -2
- package/fe/packages/react/ui/i18n/I18nProvider.js +38 -0
- package/fe/packages/react/ui/i18n/index.d.ts +4 -0
- package/fe/packages/react/ui/i18n/index.js +7 -0
- package/fe/packages/react/ui/i18n/useI18n.d.ts +13 -0
- package/fe/packages/react/ui/i18n/useI18n.js +25 -0
- package/fe/packages/{ui/react → react/ui}/index.css +70 -9
- package/fe/packages/react/ui/index.d.ts +5 -0
- package/fe/packages/react/ui/index.js +58 -0
- package/fe/packages/{ui/react → react/ui}/lib/createStoreHook.d.ts +1 -1
- package/fe/packages/react/ui/lib/createStoreHook.js +9 -0
- package/fe/packages/{ui/react → react/ui}/lib/export.d.ts +1 -1
- package/fe/packages/react/ui/lib/export.js +112 -0
- package/fe/packages/react/ui/lib/utils.js +64 -0
- package/fe/packages/{ui/react → react/ui}/stores/breadcrumb.d.ts +1 -1
- package/fe/packages/react/ui/stores/breadcrumb.js +52 -0
- package/fe/packages/react/ui/stores/language.d.ts +4 -0
- package/fe/packages/react/ui/stores/language.js +4 -0
- package/fe/packages/react/ui/types/index.js +0 -0
- package/fe/typings/type.d.ts +1 -0
- package/model/index.d.ts +1 -1
- package/model/types/data/button.d.ts +4 -4
- package/model/types/data/component.d.ts +32 -47
- package/model/types/data/schema.d.ts +6 -6
- package/model/types/data/search.d.ts +1 -1
- package/model/types/index.d.ts +2 -1
- package/model/types/model.d.ts +19 -12
- package/package.json +37 -39
- package/types/app/controller/project.d.ts +14 -2
- package/types/app/controller/view.d.ts +1 -1
- package/types/app/extend/$fetch.d.ts +8 -0
- package/types/app/extend/db.d.ts +54 -1
- package/types/app/extend/render-view.d.ts +3 -0
- package/types/app/middleware/api-params-verify.d.ts +1 -1
- package/types/app/middleware/project-handler.d.ts +2 -2
- package/types/app/router/project.d.ts +1 -1
- package/types/app/service/base.d.ts +3 -4
- package/types/app/service/project.d.ts +7 -2
- package/types/app/type.d.ts +5 -3
- package/types/app/typings.d.ts +4 -2
- package/types/bundler/buildBE.d.ts +13 -0
- package/types/bundler/index.d.ts +4 -1
- package/types/bundler/state.d.ts +18 -0
- package/types/bundler/utils.d.ts +5 -0
- package/types/config/config.default.d.ts +33 -2
- package/types/index.d.ts +6 -5
- package/{fe/frontend/widgets/common/CRUD/CRUD.d.ts → types/packages/common/http/index.d.ts} +29 -10
- package/types/packages/common/i18n/default.d.ts +5 -0
- package/types/packages/common/i18n/en-US.d.ts +5 -0
- package/types/packages/common/i18n/index.d.ts +24 -0
- package/types/packages/common/i18n/types.d.ts +24 -0
- package/types/packages/common/index.d.ts +1 -0
- package/types/packages/core/index.d.ts +3 -3
- package/types/packages/core/loader/config.d.ts +6 -0
- package/types/packages/core/loader/controller.d.ts +14 -0
- package/types/packages/core/loader/extend.d.ts +6 -1
- package/types/packages/core/loader/middleware.d.ts +8 -0
- package/types/packages/core/loader/model.d.ts +22 -0
- package/types/packages/core/loader/router-schema.d.ts +15 -0
- package/types/packages/core/loader/router.d.ts +5 -0
- package/types/packages/core/loader/service.d.ts +14 -0
- package/types/packages/core/paths.d.ts +10 -7
- package/types/packages/core/types.d.ts +66 -3
- package/types/packages/utils/getAllFilesInFolder.d.ts +5 -0
- package/types/packages/utils/loadFile.d.ts +6 -0
- package/types/packages/utils/path.d.ts +18 -0
- package/types/scripts/vite-build/build.d.ts +24 -0
- package/types/scripts/vite-build/collect.d.ts +57 -0
- package/types/scripts/vite-build/constants.d.ts +6 -0
- package/types/scripts/vite-build/dts.d.ts +53 -0
- package/types/scripts/vite-build/index.d.ts +2 -0
- package/types/scripts/vite-build/normalize.d.ts +66 -0
- package/types/scripts/vite-build/plugins.d.ts +67 -0
- package/types/scripts/vite-build/resolve.d.ts +61 -0
- package/types/scripts/vite-build/types.d.ts +174 -0
- package/types/scripts/vite-build/utils.d.ts +35 -0
- package/types/typings/type.d.ts +1 -0
- package/cjs/app/README.md +0 -286
- package/cjs/app/data/signKey.js +0 -23
- package/esm/app/README.md +0 -286
- package/esm/app/data/signKey.js +0 -10
- package/fe/frontend/components/AsyncSelect/AsyncSelect.js +0 -32
- package/fe/frontend/components/AsyncSelect/index.d.ts +0 -4
- package/fe/frontend/components/AsyncSelect/index.js +0 -3
- package/fe/frontend/dash/Dashboard.d.ts +0 -7
- package/fe/frontend/dash/Dashboard.js +0 -73
- package/fe/frontend/dash/dash.entry.js +0 -93
- package/fe/frontend/dash/types.d.ts +0 -17
- package/fe/frontend/dash/types.js +0 -1
- package/fe/frontend/index.d.ts +0 -5
- package/fe/frontend/index.js +0 -2
- package/fe/frontend/main.css +0 -5
- package/fe/frontend/main.d.ts +0 -11
- package/fe/frontend/main.js +0 -19
- package/fe/frontend/testPage/index.js +0 -6
- package/fe/frontend/testPage/testPage.entry.d.ts +0 -2
- package/fe/frontend/testPage/testPage.entry.js +0 -3
- package/fe/frontend/typing/scalability.js +0 -1
- package/fe/frontend/typing/window.d.ts +0 -7
- package/fe/frontend/typing/window.js +0 -1
- package/fe/frontend/widgets/api/baseInfo.js +0 -15
- package/fe/frontend/widgets/common/CRUD/CRUD.js +0 -208
- package/fe/frontend/widgets/common/CRUD/index.d.ts +0 -2
- package/fe/frontend/widgets/common/CRUD/index.js +0 -1
- package/fe/frontend/widgets/common/auth/index.js +0 -20
- package/fe/frontend/widgets/common/generateMenuData.d.ts +0 -4
- package/fe/frontend/widgets/common/generateMenuData.js +0 -14
- package/fe/frontend/widgets/common/importComponent.js +0 -8
- package/fe/frontend/widgets/common/language.d.ts +0 -2
- package/fe/frontend/widgets/common/language.js +0 -9
- package/fe/frontend/widgets/common/logFn/index.js +0 -8
- package/fe/frontend/widgets/common/menu.js +0 -101
- package/fe/frontend/widgets/common/request.d.ts +0 -36
- package/fe/frontend/widgets/common/request.js +0 -133
- package/fe/frontend/widgets/components/BasePage/HeaderView.js +0 -16
- package/fe/frontend/widgets/components/Router/index.js +0 -11
- package/fe/frontend/widgets/components/Router/type.js +0 -1
- package/fe/frontend/widgets/defaultPages/Iframe/index.js +0 -14
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/DetailPanel.js +0 -94
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/PopFrom.js +0 -124
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/data.d.ts +0 -3
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/data.js +0 -6
- package/fe/frontend/widgets/defaultPages/Schema/components/SchemaSearch/index.js +0 -63
- package/fe/frontend/widgets/defaultPages/Schema/components/SchemaTable/index.js +0 -188
- package/fe/frontend/widgets/defaultPages/Schema/data/eventInfo.js +0 -6
- package/fe/frontend/widgets/defaultPages/Schema/data/index.js +0 -1
- package/fe/frontend/widgets/defaultPages/Schema/hooks/useComConfig.js +0 -14
- package/fe/frontend/widgets/defaultPages/Schema/index.js +0 -74
- package/fe/frontend/widgets/defaultPages/Schema/schemaType.js +0 -4
- package/fe/frontend/widgets/defaultPages/Schema/stores/schemaEventBus.js +0 -70
- package/fe/frontend/widgets/defaultPages/Schema/stores/schemaStore.js +0 -26
- package/fe/frontend/widgets/defaultPages/Schema/utils/fetchErrorShow.js +0 -8
- package/fe/frontend/widgets/defaultPages/Schema/utils/permissions.js +0 -3
- package/fe/frontend/widgets/defaultPages/Schema/utils/schemaConversion.d.ts +0 -3
- package/fe/frontend/widgets/defaultPages/Schema/utils/schemaConversion.js +0 -115
- package/fe/frontend/widgets/defaultPages/Schema/utils/validator.d.ts +0 -7
- package/fe/frontend/widgets/defaultPages/Schema/utils/validator.js +0 -36
- package/fe/frontend/widgets/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +0 -38
- package/fe/frontend/widgets/defaultPages/SidebarSlotPage/index.js +0 -16
- package/fe/frontend/widgets/defaultPages/SidebarSlotPageTmp.js +0 -17
- package/fe/frontend/widgets/defaultPages/SlotPage/index.js +0 -26
- package/fe/frontend/widgets/defaultPages/Todo.d.ts +0 -3
- package/fe/frontend/widgets/defaultPages/Todo.js +0 -5
- package/fe/frontend/widgets/hooks/useCurrentMenuData.js +0 -28
- package/fe/frontend/widgets/hooks/useRouterParams.js +0 -11
- package/fe/frontend/widgets/store/mode.js +0 -37
- package/fe/model/types/data/button.js +0 -16
- package/fe/model/types/data/component.js +0 -11
- package/fe/model/types/data/fetchInfo.js +0 -1
- package/fe/model/types/data/schema.js +0 -1
- package/fe/model/types/data/search.js +0 -1
- package/fe/model/types/menuType.js +0 -1
- package/fe/model/types/model.js +0 -1
- package/fe/packages/common/array/index.js +0 -40
- package/fe/packages/common/cache/index.js +0 -1
- package/fe/packages/common/i18n/types.js +0 -1
- package/fe/packages/common/index.js +0 -9
- package/fe/packages/common/log/index.js +0 -176
- package/fe/packages/common/number/index.js +0 -10
- package/fe/packages/common/object/index.js +0 -25
- package/fe/packages/common/string/index.js +0 -17
- package/fe/packages/common/types/index.js +0 -1
- package/fe/packages/ui/react/components/Button/Button.js +0 -72
- package/fe/packages/ui/react/components/Button/SumbitButton.d.ts +0 -13
- package/fe/packages/ui/react/components/Button/SumbitButton.js +0 -25
- package/fe/packages/ui/react/components/Button/index.d.ts +0 -4
- package/fe/packages/ui/react/components/Button/index.js +0 -2
- package/fe/packages/ui/react/components/Checkbox/Checkbox.js +0 -39
- package/fe/packages/ui/react/components/Checkbox/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Checkbox/index.js +0 -1
- package/fe/packages/ui/react/components/ConfirmDialog/ConfirmDialog.js +0 -11
- package/fe/packages/ui/react/components/ConfirmDialog/index.d.ts +0 -2
- package/fe/packages/ui/react/components/ConfirmDialog/index.js +0 -1
- package/fe/packages/ui/react/components/DataTable/ActionBtn.js +0 -94
- package/fe/packages/ui/react/components/DataTable/index.js +0 -155
- package/fe/packages/ui/react/components/Date/Calendar.js +0 -216
- package/fe/packages/ui/react/components/Date/Date.js +0 -201
- package/fe/packages/ui/react/components/Date/DateTestPage.js +0 -29
- package/fe/packages/ui/react/components/Date/LocaleContext.js +0 -8
- package/fe/packages/ui/react/components/Date/LocaleProvider.js +0 -24
- package/fe/packages/ui/react/components/Date/TimePicker.js +0 -78
- package/fe/packages/ui/react/components/Date/data.js +0 -4
- package/fe/packages/ui/react/components/Date/dateLocaleStore.js +0 -14
- package/fe/packages/ui/react/components/Date/dropdownPositioning.d.ts +0 -3
- package/fe/packages/ui/react/components/Date/dropdownPositioning.js +0 -12
- package/fe/packages/ui/react/components/Date/index.d.ts +0 -6
- package/fe/packages/ui/react/components/Date/index.js +0 -5
- package/fe/packages/ui/react/components/Date/locales.js +0 -21
- package/fe/packages/ui/react/components/Drawer/Drawer.js +0 -100
- package/fe/packages/ui/react/components/Drawer/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Drawer/index.js +0 -1
- package/fe/packages/ui/react/components/Dropdown/Dropdown.js +0 -28
- package/fe/packages/ui/react/components/Dropdown/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Dropdown/index.js +0 -1
- package/fe/packages/ui/react/components/Form/Form.js +0 -8
- package/fe/packages/ui/react/components/Form/FormItem.js +0 -43
- package/fe/packages/ui/react/components/Form/SchemaForm/data.js +0 -18
- package/fe/packages/ui/react/components/Form/SchemaForm/index.js +0 -79
- package/fe/packages/ui/react/components/Form/index.d.ts +0 -5
- package/fe/packages/ui/react/components/Form/index.js +0 -4
- package/fe/packages/ui/react/components/Form/useForm.d.ts +0 -3
- package/fe/packages/ui/react/components/Form/useForm.js +0 -1
- package/fe/packages/ui/react/components/ImagePreview/ImagePreview.js +0 -169
- package/fe/packages/ui/react/components/ImagePreview/PreviewImage.js +0 -28
- package/fe/packages/ui/react/components/ImagePreview/index.d.ts +0 -3
- package/fe/packages/ui/react/components/ImagePreview/index.js +0 -2
- package/fe/packages/ui/react/components/Input/Input.js +0 -61
- package/fe/packages/ui/react/components/Input/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Input/index.js +0 -1
- package/fe/packages/ui/react/components/InputNumber/InputNumber.js +0 -144
- package/fe/packages/ui/react/components/InputNumber/index.d.ts +0 -2
- package/fe/packages/ui/react/components/InputNumber/index.js +0 -1
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.js +0 -63
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.js +0 -27
- package/fe/packages/ui/react/components/Label/Label.js +0 -35
- package/fe/packages/ui/react/components/Label/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Label/index.js +0 -2
- package/fe/packages/ui/react/components/Menu/Menu.js +0 -102
- package/fe/packages/ui/react/components/Menu/MenuContext.js +0 -97
- package/fe/packages/ui/react/components/Menu/MenuItem.js +0 -33
- package/fe/packages/ui/react/components/Menu/SubMenu.js +0 -169
- package/fe/packages/ui/react/components/Menu/index.d.ts +0 -9
- package/fe/packages/ui/react/components/Menu/index.js +0 -5
- package/fe/packages/ui/react/components/Menu/menuTypes.js +0 -1
- package/fe/packages/ui/react/components/Menu/utils.js +0 -7
- package/fe/packages/ui/react/components/Message/Message.js +0 -58
- package/fe/packages/ui/react/components/Message/MessageManager.js +0 -90
- package/fe/packages/ui/react/components/Message/data.js +0 -1
- package/fe/packages/ui/react/components/Message/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Message/index.js +0 -1
- package/fe/packages/ui/react/components/Modal/Modal.js +0 -14
- package/fe/packages/ui/react/components/Modal/ModalManager.js +0 -90
- package/fe/packages/ui/react/components/Modal/index.d.ts +0 -4
- package/fe/packages/ui/react/components/Modal/index.js +0 -2
- package/fe/packages/ui/react/components/Overlay/Overlay.js +0 -53
- package/fe/packages/ui/react/components/Overlay/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Overlay/index.js +0 -1
- package/fe/packages/ui/react/components/Pagination/Pagination.js +0 -88
- package/fe/packages/ui/react/components/Pagination/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Pagination/index.js +0 -1
- package/fe/packages/ui/react/components/Popup/Popup.js +0 -81
- package/fe/packages/ui/react/components/Popup/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Popup/index.js +0 -1
- package/fe/packages/ui/react/components/Search/Search.js +0 -12
- package/fe/packages/ui/react/components/Search/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Search/index.js +0 -1
- package/fe/packages/ui/react/components/Select/Select.js +0 -123
- package/fe/packages/ui/react/components/Select/dropdownPositioning.d.ts +0 -3
- package/fe/packages/ui/react/components/Select/dropdownPositioning.js +0 -13
- package/fe/packages/ui/react/components/Select/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Select/index.js +0 -1
- package/fe/packages/ui/react/components/Skeleton/Skeleton.js +0 -31
- package/fe/packages/ui/react/components/Skeleton/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Skeleton/index.js +0 -1
- package/fe/packages/ui/react/components/Switch/Switch.js +0 -22
- package/fe/packages/ui/react/components/Switch/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Switch/index.js +0 -1
- package/fe/packages/ui/react/components/TableSearch/TableSearch.js +0 -121
- package/fe/packages/ui/react/components/TableSearch/index.d.ts +0 -2
- package/fe/packages/ui/react/components/TableSearch/index.js +0 -1
- package/fe/packages/ui/react/components/TableSearch/lang.js +0 -14
- package/fe/packages/ui/react/components/TableSearch/tableSearchLocaleStore.js +0 -11
- package/fe/packages/ui/react/components/Textarea/Textarea.js +0 -37
- package/fe/packages/ui/react/components/Textarea/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Textarea/index.js +0 -1
- package/fe/packages/ui/react/components/Tooltip/Tooltip.js +0 -79
- package/fe/packages/ui/react/components/Tooltip/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Tooltip/index.js +0 -1
- package/fe/packages/ui/react/components/TreeSelect/TreeSelect.js +0 -160
- package/fe/packages/ui/react/components/TreeSelect/index.d.ts +0 -2
- package/fe/packages/ui/react/components/TreeSelect/index.js +0 -1
- package/fe/packages/ui/react/components/Upload/ImageUpload.js +0 -75
- package/fe/packages/ui/react/components/Upload/Upload.js +0 -6
- package/fe/packages/ui/react/components/Upload/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Upload/index.js +0 -2
- package/fe/packages/ui/react/components/breadcrumb/breadcrumb.js +0 -81
- package/fe/packages/ui/react/components/breadcrumb/index.d.ts +0 -2
- package/fe/packages/ui/react/components/breadcrumb/index.js +0 -1
- package/fe/packages/ui/react/components/hooks/useDropdownPositioning.js +0 -137
- package/fe/packages/ui/react/components/hooks/useInputController.js +0 -45
- package/fe/packages/ui/react/components/index.d.ts +0 -30
- package/fe/packages/ui/react/components/index.js +0 -29
- package/fe/packages/ui/react/components/table/index.d.ts +0 -2
- package/fe/packages/ui/react/components/table/index.js +0 -1
- package/fe/packages/ui/react/components/table/table.js +0 -20
- package/fe/packages/ui/react/components/testPage/MenuTestPage.js +0 -104
- package/fe/packages/ui/react/components/testPage/index.js +0 -314
- package/fe/packages/ui/react/hooks/useBreadcrumb.d.ts +0 -10
- package/fe/packages/ui/react/hooks/useBreadcrumb.js +0 -2
- package/fe/packages/ui/react/hooks/useExecuteOnce.js +0 -57
- package/fe/packages/ui/react/hooks/useInit.js +0 -9
- package/fe/packages/ui/react/hooks/useLanguage.d.ts +0 -2
- package/fe/packages/ui/react/hooks/useLanguage.js +0 -4
- package/fe/packages/ui/react/hooks/usePagination.js +0 -27
- package/fe/packages/ui/react/hooks/useRefState.js +0 -29
- package/fe/packages/ui/react/hooks/useWatch.js +0 -87
- package/fe/packages/ui/react/hooks/useWatch.test.js +0 -22
- package/fe/packages/ui/react/i18n/I18nProvider.js +0 -25
- package/fe/packages/ui/react/i18n/index.d.ts +0 -4
- package/fe/packages/ui/react/i18n/index.js +0 -3
- package/fe/packages/ui/react/i18n/useI18n.d.ts +0 -13
- package/fe/packages/ui/react/i18n/useI18n.js +0 -18
- package/fe/packages/ui/react/index.d.ts +0 -5
- package/fe/packages/ui/react/index.js +0 -6
- package/fe/packages/ui/react/lib/createStoreHook.js +0 -6
- package/fe/packages/ui/react/lib/export.js +0 -138
- package/fe/packages/ui/react/lib/utils.js +0 -70
- package/fe/packages/ui/react/stores/breadcrumb.js +0 -66
- package/fe/packages/ui/react/stores/language.d.ts +0 -4
- package/fe/packages/ui/react/stores/language.js +0 -2
- package/fe/packages/ui/react/types/index.js +0 -1
- package/fe/typings/type.js +0 -1
- package/types/app/data/signKey.d.ts +0 -1
- /package/fe/frontend/{dash → apps/dash}/dash.entry.d.ts +0 -0
- /package/fe/frontend/{testPage → apps/ui-components}/index.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/common/auth/index.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/components/Router/type.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/defaultPages/Iframe/index.d.ts +0 -0
- /package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/components/SchemaSearch/index.d.ts +0 -0
- /package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/data/eventInfo.d.ts +0 -0
- /package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/data/index.d.ts +0 -0
- /package/fe/frontend/{widgets/defaultPages/Schema → src/defaultPages/SchemaPage}/utils/permissions.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/defaultPages/SidebarSlotPage/index.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/defaultPages/SidebarSlotPageTmp.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/defaultPages/SlotPage/index.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/hooks/useCurrentMenuData.d.ts +0 -0
- /package/fe/frontend/{widgets → src}/hooks/useRouterParams.d.ts +0 -0
- /package/fe/packages/{ui/react → react}/hooks/useExecuteOnce.d.ts +0 -0
- /package/fe/packages/{ui/react → react}/hooks/useInit.d.ts +0 -0
- /package/fe/packages/{ui/react → react}/hooks/usePagination.d.ts +0 -0
- /package/fe/packages/{ui/react → react}/hooks/useWatch.d.ts +0 -0
- /package/fe/packages/{ui/react → react}/hooks/useWatch.test.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/assets/table/no-result.svg +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/ConfirmDialog/ConfirmDialog.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Date/Date.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Date/DateTestPage.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Date/LocaleContext.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Date/TimePicker.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Date/data.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Date/locales.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/ImagePreview/ImagePreview.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/InputNumber/inputNumberUtils.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/InputNumber/inputNumberUtils.test.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Menu/Menu.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Menu/MenuContext.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Menu/MenuItem.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Menu/SubMenu.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Menu/utils.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Message/data.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Pagination/Pagination.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Popup/Popup.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/TableSearch/lang.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Textarea/Textarea.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Tooltip/Tooltip.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/TreeSelect/TreeSelect.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/Upload/ImageUpload.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/breadcrumb/breadcrumb.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/hooks/useDropdownPositioning.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/hooks/useInputController.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/testPage/MenuTestPage.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/components/testPage/index.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/lib/utils.d.ts +0 -0
- /package/fe/packages/{ui/react → react/ui}/types/index.d.ts +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { frontendEnUSResources } from "./en-US.js";
|
|
2
|
+
import { frontendZhCNResources } from "./zh-CN.js";
|
|
3
|
+
//#region frontend/src/language/index.ts
|
|
4
|
+
var i18nKeyPrefix = "$i18n::";
|
|
5
|
+
var frontendI18nResources = {
|
|
6
|
+
"zh-CN": frontendZhCNResources,
|
|
7
|
+
"en-US": frontendEnUSResources
|
|
8
|
+
};
|
|
9
|
+
var withI18nKey = (key) => `${i18nKeyPrefix}${key}`;
|
|
10
|
+
var frontendLangKeys = {
|
|
11
|
+
appTitle: withI18nKey("frontend.app.title"),
|
|
12
|
+
uiComponentsTitle: withI18nKey("frontend.app.uiComponentsTitle"),
|
|
13
|
+
uiComponentsButton: withI18nKey("frontend.app.uiComponentsButton"),
|
|
14
|
+
languageSwitchPlaceholder: withI18nKey("frontend.components.languageSwitch.placeholder"),
|
|
15
|
+
languageSwitchZhCN: withI18nKey("frontend.components.languageSwitch.zhCN"),
|
|
16
|
+
languageSwitchEnUS: withI18nKey("frontend.components.languageSwitch.enUS"),
|
|
17
|
+
themeSwitchLight: withI18nKey("frontend.components.themeSwitch.light"),
|
|
18
|
+
themeSwitchDark: withI18nKey("frontend.components.themeSwitch.dark"),
|
|
19
|
+
themeSwitchToLight: withI18nKey("frontend.components.themeSwitch.toLight"),
|
|
20
|
+
themeSwitchToDark: withI18nKey("frontend.components.themeSwitch.toDark"),
|
|
21
|
+
yes: withI18nKey("frontend.common.yes"),
|
|
22
|
+
no: withI18nKey("frontend.common.no"),
|
|
23
|
+
noData: withI18nKey("frontend.common.noData"),
|
|
24
|
+
loading: withI18nKey("frontend.common.loading"),
|
|
25
|
+
operation: withI18nKey("frontend.common.operation"),
|
|
26
|
+
confirmDelete: withI18nKey("frontend.feedback.confirmDelete"),
|
|
27
|
+
requiredInput: withI18nKey("frontend.feedback.requiredInput"),
|
|
28
|
+
unknownError: withI18nKey("frontend.feedback.unknownError"),
|
|
29
|
+
requestTimedOut: withI18nKey("frontend.feedback.requestTimedOut"),
|
|
30
|
+
networkError: withI18nKey("frontend.feedback.networkError"),
|
|
31
|
+
notFoundTitle: withI18nKey("frontend.notFound.title"),
|
|
32
|
+
notFoundDescription: withI18nKey("frontend.notFound.description"),
|
|
33
|
+
validatorValue: withI18nKey("frontend.validator.value"),
|
|
34
|
+
validatorRequired: withI18nKey("frontend.validator.required"),
|
|
35
|
+
validatorType: withI18nKey("frontend.validator.type"),
|
|
36
|
+
validatorTypeString: withI18nKey("frontend.validator.typeString"),
|
|
37
|
+
validatorTypeNumber: withI18nKey("frontend.validator.typeNumber"),
|
|
38
|
+
validatorTypeInteger: withI18nKey("frontend.validator.typeInteger"),
|
|
39
|
+
validatorTypeBoolean: withI18nKey("frontend.validator.typeBoolean"),
|
|
40
|
+
validatorTypeArray: withI18nKey("frontend.validator.typeArray"),
|
|
41
|
+
validatorTypeObject: withI18nKey("frontend.validator.typeObject"),
|
|
42
|
+
validatorTypeNull: withI18nKey("frontend.validator.typeNull"),
|
|
43
|
+
validatorFormat: withI18nKey("frontend.validator.format"),
|
|
44
|
+
validatorMinimum: withI18nKey("frontend.validator.minimum"),
|
|
45
|
+
validatorMaximum: withI18nKey("frontend.validator.maximum"),
|
|
46
|
+
validatorExclusiveMinimum: withI18nKey("frontend.validator.exclusiveMinimum"),
|
|
47
|
+
validatorExclusiveMaximum: withI18nKey("frontend.validator.exclusiveMaximum"),
|
|
48
|
+
validatorMultipleOf: withI18nKey("frontend.validator.multipleOf"),
|
|
49
|
+
validatorMinLength: withI18nKey("frontend.validator.minLength"),
|
|
50
|
+
validatorMaxLength: withI18nKey("frontend.validator.maxLength"),
|
|
51
|
+
validatorPattern: withI18nKey("frontend.validator.pattern"),
|
|
52
|
+
validatorMinItems: withI18nKey("frontend.validator.minItems"),
|
|
53
|
+
validatorMaxItems: withI18nKey("frontend.validator.maxItems"),
|
|
54
|
+
validatorUniqueItems: withI18nKey("frontend.validator.uniqueItems"),
|
|
55
|
+
validatorMinProperties: withI18nKey("frontend.validator.minProperties"),
|
|
56
|
+
validatorMaxProperties: withI18nKey("frontend.validator.maxProperties"),
|
|
57
|
+
validatorAdditionalProperties: withI18nKey("frontend.validator.additionalProperties"),
|
|
58
|
+
validatorEnum: withI18nKey("frontend.validator.enum"),
|
|
59
|
+
validatorConst: withI18nKey("frontend.validator.const"),
|
|
60
|
+
validatorOneOf: withI18nKey("frontend.validator.oneOf"),
|
|
61
|
+
validatorAnyOf: withI18nKey("frontend.validator.anyOf"),
|
|
62
|
+
validatorAllOf: withI18nKey("frontend.validator.allOf"),
|
|
63
|
+
validatorNot: withI18nKey("frontend.validator.not"),
|
|
64
|
+
validatorPropertyNames: withI18nKey("frontend.validator.propertyNames"),
|
|
65
|
+
validatorDependencies: withI18nKey("frontend.validator.dependencies"),
|
|
66
|
+
validatorContains: withI18nKey("frontend.validator.contains"),
|
|
67
|
+
validatorIf: withI18nKey("frontend.validator.if"),
|
|
68
|
+
validatorFallback: withI18nKey("frontend.validator.fallback"),
|
|
69
|
+
logPageNotFound: withI18nKey("frontend.log.pageNotFound"),
|
|
70
|
+
logPageNotFoundEn: withI18nKey("frontend.log.pageNotFoundEn"),
|
|
71
|
+
logIllegalComponentCallback: withI18nKey("frontend.log.illegalComponentCallback"),
|
|
72
|
+
logIllegalComponentCallbackEn: withI18nKey("frontend.log.illegalComponentCallbackEn"),
|
|
73
|
+
logSubscriptionError: withI18nKey("frontend.log.subscriptionError"),
|
|
74
|
+
logSubscriptionErrorEn: withI18nKey("frontend.log.subscriptionErrorEn"),
|
|
75
|
+
logApiTamper: withI18nKey("frontend.log.apiTamper"),
|
|
76
|
+
logApiTamperEn: withI18nKey("frontend.log.apiTamperEn")
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { frontendI18nResources, frontendLangKeys, i18nKeyPrefix, withI18nKey };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const frontendZhCNResources: {
|
|
2
|
+
readonly frontend: {
|
|
3
|
+
readonly app: {
|
|
4
|
+
readonly title: "Template Core";
|
|
5
|
+
readonly uiComponentsTitle: "UI 组件";
|
|
6
|
+
readonly uiComponentsButton: "点击我";
|
|
7
|
+
};
|
|
8
|
+
readonly components: {
|
|
9
|
+
readonly languageSwitch: {
|
|
10
|
+
readonly placeholder: "选择语言";
|
|
11
|
+
readonly zhCN: "简体中文";
|
|
12
|
+
readonly enUS: "English";
|
|
13
|
+
};
|
|
14
|
+
readonly themeSwitch: {
|
|
15
|
+
readonly light: "浅色";
|
|
16
|
+
readonly dark: "深色";
|
|
17
|
+
readonly toLight: "切换为浅色主题";
|
|
18
|
+
readonly toDark: "切换为深色主题";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly common: {
|
|
22
|
+
readonly yes: "是";
|
|
23
|
+
readonly no: "否";
|
|
24
|
+
readonly noData: "暂无数据";
|
|
25
|
+
readonly loading: "加载中";
|
|
26
|
+
readonly operation: "操作";
|
|
27
|
+
};
|
|
28
|
+
readonly feedback: {
|
|
29
|
+
readonly confirmDelete: "确认删除?";
|
|
30
|
+
readonly requiredInput: "请输入{label}";
|
|
31
|
+
readonly unknownError: "未知错误";
|
|
32
|
+
readonly requestTimedOut: "请求超时";
|
|
33
|
+
readonly networkError: "网络错误";
|
|
34
|
+
};
|
|
35
|
+
readonly notFound: {
|
|
36
|
+
readonly title: "页面不存在";
|
|
37
|
+
readonly description: "当前路径无效,或页面未在路由中注册。";
|
|
38
|
+
};
|
|
39
|
+
readonly validator: {
|
|
40
|
+
readonly value: "值";
|
|
41
|
+
readonly required: "缺少必填字段: {field}";
|
|
42
|
+
readonly type: "{path} 类型错误,期望 {type}";
|
|
43
|
+
readonly typeString: "字符串";
|
|
44
|
+
readonly typeNumber: "数字";
|
|
45
|
+
readonly typeInteger: "整数";
|
|
46
|
+
readonly typeBoolean: "布尔值";
|
|
47
|
+
readonly typeArray: "数组";
|
|
48
|
+
readonly typeObject: "对象";
|
|
49
|
+
readonly typeNull: "空值";
|
|
50
|
+
readonly format: "{path} 格式不正确";
|
|
51
|
+
readonly minimum: "{path} 不能小于 {limit}";
|
|
52
|
+
readonly maximum: "{path} 不能大于 {limit}";
|
|
53
|
+
readonly exclusiveMinimum: "{path} 必须大于 {limit}";
|
|
54
|
+
readonly exclusiveMaximum: "{path} 必须小于 {limit}";
|
|
55
|
+
readonly multipleOf: "{path} 必须是 {multipleOf} 的倍数";
|
|
56
|
+
readonly minLength: "{path} 长度不能少于 {limit} 个字符";
|
|
57
|
+
readonly maxLength: "{path} 长度不能超过 {limit} 个字符";
|
|
58
|
+
readonly pattern: "{path} 格式不符合要求";
|
|
59
|
+
readonly minItems: "{path} 至少需要 {limit} 项";
|
|
60
|
+
readonly maxItems: "{path} 不能超过 {limit} 项";
|
|
61
|
+
readonly uniqueItems: "{path} 不能包含重复项";
|
|
62
|
+
readonly minProperties: "{path} 至少需要 {limit} 个属性";
|
|
63
|
+
readonly maxProperties: "{path} 不能超过 {limit} 个属性";
|
|
64
|
+
readonly additionalProperties: "{path} 包含不允许的属性 {property}";
|
|
65
|
+
readonly enum: "{path} 不在可选范围内";
|
|
66
|
+
readonly const: "{path} 必须等于指定值";
|
|
67
|
+
readonly oneOf: "{path} 只能匹配一个规则";
|
|
68
|
+
readonly anyOf: "{path} 至少需要匹配一个规则";
|
|
69
|
+
readonly allOf: "{path} 未满足全部规则";
|
|
70
|
+
readonly not: "{path} 不能匹配该规则";
|
|
71
|
+
readonly propertyNames: "{path} 属性名不符合要求";
|
|
72
|
+
readonly dependencies: "{path} 缺少关联字段";
|
|
73
|
+
readonly contains: "{path} 缺少符合要求的项";
|
|
74
|
+
readonly if: "{path} 条件校验未通过";
|
|
75
|
+
readonly fallback: "{path} 校验未通过";
|
|
76
|
+
};
|
|
77
|
+
readonly log: {
|
|
78
|
+
readonly pageNotFound: "url有问题 或者 自定义页面未在路由器注册";
|
|
79
|
+
readonly pageNotFoundEn: "The URL is incorrect, or the custom page is not registered with the router.";
|
|
80
|
+
readonly illegalComponentCallback: "非法的组件回调 - {comName}";
|
|
81
|
+
readonly illegalComponentCallbackEn: "Illegal component callback - {comName}";
|
|
82
|
+
readonly subscriptionError: "不曾订阅过,请检查代码,关注函数与取消函数必须为同一个";
|
|
83
|
+
readonly subscriptionErrorEn: "You haven't subscribed. Please check your code; the follow function and unsubscribe function must be the same.";
|
|
84
|
+
readonly apiTamper: "api属性不允许篡改";
|
|
85
|
+
readonly apiTamperEn: "API attributes cannot be tampered with";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=zh-CN.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//#region frontend/src/language/zh-CN.ts
|
|
2
|
+
var frontendZhCNResources = { frontend: {
|
|
3
|
+
app: {
|
|
4
|
+
title: "Template Core",
|
|
5
|
+
uiComponentsTitle: "UI 组件",
|
|
6
|
+
uiComponentsButton: "点击我"
|
|
7
|
+
},
|
|
8
|
+
components: {
|
|
9
|
+
languageSwitch: {
|
|
10
|
+
placeholder: "选择语言",
|
|
11
|
+
zhCN: "简体中文",
|
|
12
|
+
enUS: "English"
|
|
13
|
+
},
|
|
14
|
+
themeSwitch: {
|
|
15
|
+
light: "浅色",
|
|
16
|
+
dark: "深色",
|
|
17
|
+
toLight: "切换为浅色主题",
|
|
18
|
+
toDark: "切换为深色主题"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
common: {
|
|
22
|
+
yes: "是",
|
|
23
|
+
no: "否",
|
|
24
|
+
noData: "暂无数据",
|
|
25
|
+
loading: "加载中",
|
|
26
|
+
operation: "操作"
|
|
27
|
+
},
|
|
28
|
+
feedback: {
|
|
29
|
+
confirmDelete: "确认删除?",
|
|
30
|
+
requiredInput: "请输入{label}",
|
|
31
|
+
unknownError: "未知错误",
|
|
32
|
+
requestTimedOut: "请求超时",
|
|
33
|
+
networkError: "网络错误"
|
|
34
|
+
},
|
|
35
|
+
notFound: {
|
|
36
|
+
title: "页面不存在",
|
|
37
|
+
description: "当前路径无效,或页面未在路由中注册。"
|
|
38
|
+
},
|
|
39
|
+
validator: {
|
|
40
|
+
value: "值",
|
|
41
|
+
required: "缺少必填字段: {field}",
|
|
42
|
+
type: "{path} 类型错误,期望 {type}",
|
|
43
|
+
typeString: "字符串",
|
|
44
|
+
typeNumber: "数字",
|
|
45
|
+
typeInteger: "整数",
|
|
46
|
+
typeBoolean: "布尔值",
|
|
47
|
+
typeArray: "数组",
|
|
48
|
+
typeObject: "对象",
|
|
49
|
+
typeNull: "空值",
|
|
50
|
+
format: "{path} 格式不正确",
|
|
51
|
+
minimum: "{path} 不能小于 {limit}",
|
|
52
|
+
maximum: "{path} 不能大于 {limit}",
|
|
53
|
+
exclusiveMinimum: "{path} 必须大于 {limit}",
|
|
54
|
+
exclusiveMaximum: "{path} 必须小于 {limit}",
|
|
55
|
+
multipleOf: "{path} 必须是 {multipleOf} 的倍数",
|
|
56
|
+
minLength: "{path} 长度不能少于 {limit} 个字符",
|
|
57
|
+
maxLength: "{path} 长度不能超过 {limit} 个字符",
|
|
58
|
+
pattern: "{path} 格式不符合要求",
|
|
59
|
+
minItems: "{path} 至少需要 {limit} 项",
|
|
60
|
+
maxItems: "{path} 不能超过 {limit} 项",
|
|
61
|
+
uniqueItems: "{path} 不能包含重复项",
|
|
62
|
+
minProperties: "{path} 至少需要 {limit} 个属性",
|
|
63
|
+
maxProperties: "{path} 不能超过 {limit} 个属性",
|
|
64
|
+
additionalProperties: "{path} 包含不允许的属性 {property}",
|
|
65
|
+
enum: "{path} 不在可选范围内",
|
|
66
|
+
const: "{path} 必须等于指定值",
|
|
67
|
+
oneOf: "{path} 只能匹配一个规则",
|
|
68
|
+
anyOf: "{path} 至少需要匹配一个规则",
|
|
69
|
+
allOf: "{path} 未满足全部规则",
|
|
70
|
+
not: "{path} 不能匹配该规则",
|
|
71
|
+
propertyNames: "{path} 属性名不符合要求",
|
|
72
|
+
dependencies: "{path} 缺少关联字段",
|
|
73
|
+
contains: "{path} 缺少符合要求的项",
|
|
74
|
+
if: "{path} 条件校验未通过",
|
|
75
|
+
fallback: "{path} 校验未通过"
|
|
76
|
+
},
|
|
77
|
+
log: {
|
|
78
|
+
pageNotFound: "url有问题 或者 自定义页面未在路由器注册",
|
|
79
|
+
pageNotFoundEn: "The URL is incorrect, or the custom page is not registered with the router.",
|
|
80
|
+
illegalComponentCallback: "非法的组件回调 - {comName}",
|
|
81
|
+
illegalComponentCallbackEn: "Illegal component callback - {comName}",
|
|
82
|
+
subscriptionError: "不曾订阅过,请检查代码,关注函数与取消函数必须为同一个",
|
|
83
|
+
subscriptionErrorEn: "You haven't subscribed. Please check your code; the follow function and unsubscribe function must be the same.",
|
|
84
|
+
apiTamper: "api属性不允许篡改",
|
|
85
|
+
apiTamperEn: "API attributes cannot be tampered with"
|
|
86
|
+
}
|
|
87
|
+
} };
|
|
88
|
+
//#endregion
|
|
89
|
+
export { frontendZhCNResources };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@import '../../packages/react/ui/index.css';
|
|
2
|
+
|
|
3
|
+
/* 内容扫描 */
|
|
4
|
+
/* enhancedComponents */
|
|
5
|
+
@source "./**/*.{js,ts,jsx,tsx}";
|
|
6
|
+
|
|
7
|
+
.dark {
|
|
8
|
+
--background: 238 12% 7%;
|
|
9
|
+
--foreground: 225 16% 92%;
|
|
10
|
+
--card: 238 11% 8%;
|
|
11
|
+
--card-foreground: 225 16% 92%;
|
|
12
|
+
--popover: 238 11% 8%;
|
|
13
|
+
--popover-foreground: 225 16% 92%;
|
|
14
|
+
--primary: 225 16% 92%;
|
|
15
|
+
--primary-foreground: 238 12% 9%;
|
|
16
|
+
--secondary: 235 10% 15%;
|
|
17
|
+
--secondary-foreground: 225 16% 90%;
|
|
18
|
+
--muted: 235 10% 17%;
|
|
19
|
+
--muted-foreground: 228 9% 66%;
|
|
20
|
+
--accent: 226 16% 18%;
|
|
21
|
+
--accent-foreground: 225 16% 92%;
|
|
22
|
+
--border: 235 10% 20%;
|
|
23
|
+
--input: 235 10% 20%;
|
|
24
|
+
--ring: 225 16% 72%;
|
|
25
|
+
|
|
26
|
+
--theme-primary: 225 16% 92%;
|
|
27
|
+
--theme-primary-foreground: 238 12% 9%;
|
|
28
|
+
--theme-bg: 238 13% 9%;
|
|
29
|
+
--theme-text: 225 16% 92%;
|
|
30
|
+
|
|
31
|
+
--table-header-bg: 235 9% 18%;
|
|
32
|
+
--table-header-text: 228 10% 72%;
|
|
33
|
+
--table-head-text: 228 10% 72%;
|
|
34
|
+
--table-cell-text: 225 16% 90%;
|
|
35
|
+
--table-action-bg: 235 9% 19%;
|
|
36
|
+
--table-action-text: 225 16% 86%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
* {
|
|
40
|
+
scrollbar-color: hsl(var(--muted-foreground) / 0.34) transparent;
|
|
41
|
+
scrollbar-width: thin;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
*::-webkit-scrollbar {
|
|
45
|
+
width: 10px;
|
|
46
|
+
height: 10px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
*::-webkit-scrollbar-track {
|
|
50
|
+
background: transparent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
*::-webkit-scrollbar-thumb {
|
|
54
|
+
min-height: 40px;
|
|
55
|
+
border: 3px solid transparent;
|
|
56
|
+
border-radius: 999px;
|
|
57
|
+
background: hsl(var(--muted-foreground) / 0.28);
|
|
58
|
+
background-clip: padding-box;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
62
|
+
background: hsl(var(--muted-foreground) / 0.46);
|
|
63
|
+
background-clip: padding-box;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
*::-webkit-scrollbar-corner {
|
|
67
|
+
background: transparent;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.sidebar-shell-menu.tc-ui-menu {
|
|
71
|
+
width: 168px;
|
|
72
|
+
height: 100%;
|
|
73
|
+
border-radius: 0;
|
|
74
|
+
background: transparent;
|
|
75
|
+
box-shadow: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.sidebar-shell-menu .menuitem,
|
|
79
|
+
.sidebar-shell-menu .subMenuItem {
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
color: hsl(var(--muted-foreground));
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.sidebar-shell-menu .menuitem:hover,
|
|
86
|
+
.sidebar-shell-menu .subMenuItem:hover {
|
|
87
|
+
background: hsl(var(--muted) / 0.42);
|
|
88
|
+
color: hsl(var(--foreground));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sidebar-shell-menu .menuitem.bg-theme,
|
|
92
|
+
.sidebar-shell-menu .subMenuItem.bg-theme\/10 {
|
|
93
|
+
background: hsl(var(--foreground) / 0.08);
|
|
94
|
+
color: hsl(var(--foreground));
|
|
95
|
+
box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.8);
|
|
96
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { JSX } from "react/jsx-runtime";
|
|
2
|
+
import { RouteInfo } from "./components/Router/index";
|
|
3
|
+
import { RouterType } from "./components/Router/type";
|
|
4
|
+
import { type ReactNode } from "react";
|
|
5
|
+
import "./main.css";
|
|
6
|
+
import "./typing/window";
|
|
7
|
+
export declare const initApp: (
|
|
8
|
+
/**
|
|
9
|
+
* ## ⚠️ ‼️如果你有配置路由,一定要渲染 children
|
|
10
|
+
* 根组件函数
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
RootComponent: (props: {
|
|
14
|
+
children: Exclude<ReactNode, null | undefined>;
|
|
15
|
+
}) => JSX.Element, options?: {
|
|
16
|
+
routes?: RouteInfo[];
|
|
17
|
+
routerType?: RouterType;
|
|
18
|
+
modelType?: string;
|
|
19
|
+
/**
|
|
20
|
+
* - 初始化 model 数据
|
|
21
|
+
* - 默认开启
|
|
22
|
+
* - modelType 为 MD 时 默认开启
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
initModeData?: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "./main.css";
|
|
2
|
+
import { modeStore } from "./stores/mode.js";
|
|
3
|
+
import { renderImportComponent } from "./common/importComponent.js";
|
|
4
|
+
import { generateRouter } from "./components/Router/index.js";
|
|
5
|
+
import "./exportStore.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
8
|
+
import { createRoot } from "react-dom/client";
|
|
9
|
+
//#region frontend/src/main.tsx
|
|
10
|
+
var renderRouter = async ({ routerDom, requestModelData }) => {
|
|
11
|
+
if (requestModelData) {
|
|
12
|
+
const { initModeData } = modeStore.getState();
|
|
13
|
+
if (!modeStore.getState().initData) await new Promise((resolve, reject) => {
|
|
14
|
+
let settled = false;
|
|
15
|
+
let unsubscribe = () => {};
|
|
16
|
+
const done = () => {
|
|
17
|
+
if (settled) return;
|
|
18
|
+
settled = true;
|
|
19
|
+
unsubscribe();
|
|
20
|
+
resolve();
|
|
21
|
+
};
|
|
22
|
+
const fail = (error) => {
|
|
23
|
+
if (settled) return;
|
|
24
|
+
settled = true;
|
|
25
|
+
unsubscribe();
|
|
26
|
+
reject(error);
|
|
27
|
+
};
|
|
28
|
+
unsubscribe = modeStore.subscribe((ns) => {
|
|
29
|
+
if (ns.initData) done();
|
|
30
|
+
});
|
|
31
|
+
let initResult;
|
|
32
|
+
try {
|
|
33
|
+
initResult = initModeData();
|
|
34
|
+
} catch (error) {
|
|
35
|
+
fail(error);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
Promise.resolve(initResult).then(() => {
|
|
39
|
+
if (modeStore.getState().initData) done();
|
|
40
|
+
}, fail);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return { default: () => /* @__PURE__ */ jsx(Fragment, { children: routerDom }) };
|
|
44
|
+
};
|
|
45
|
+
var initApp = (RootComponent, options) => {
|
|
46
|
+
console.log("initApp");
|
|
47
|
+
const root = createRoot(document.getElementById("root"));
|
|
48
|
+
const { routerType = "browser", routes: pRoutes = [], initModeData = true, modelType = "MD" } = options ?? {};
|
|
49
|
+
const routes = [...pRoutes];
|
|
50
|
+
const usedRouter = !!routes.length;
|
|
51
|
+
let routerDom;
|
|
52
|
+
if (usedRouter) routerDom = generateRouter(routes, routerType);
|
|
53
|
+
const Component = renderImportComponent(renderRouter({
|
|
54
|
+
routerDom,
|
|
55
|
+
requestModelData: initModeData || modelType === "MD"
|
|
56
|
+
}));
|
|
57
|
+
root.render(/* @__PURE__ */ jsx(RootComponent, { children: Component }));
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { initApp };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/** 根据参数 + 路径 + config 生成hash key */
|
|
2
|
+
type freezeQueue = Map<string, {
|
|
3
|
+
/**
|
|
4
|
+
* - 包装的原始请求函数, 只需要存一次 因为参数完全一致
|
|
5
|
+
*
|
|
6
|
+
* - () => fn(...params)
|
|
7
|
+
*/
|
|
8
|
+
originFn: Function;
|
|
9
|
+
/**
|
|
10
|
+
* 响应的结果
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 需要回调的函数
|
|
14
|
+
*/
|
|
15
|
+
callBackFns: {
|
|
16
|
+
resolve: (value: unknown) => void;
|
|
17
|
+
reject: (reason?: any) => void;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
export declare const FreezeState: {
|
|
21
|
+
/**
|
|
22
|
+
* 休眠 - 待机状态
|
|
23
|
+
*/
|
|
24
|
+
readonly Hibernation: "Hibernation";
|
|
25
|
+
/**
|
|
26
|
+
* 冻结状态
|
|
27
|
+
*/
|
|
28
|
+
readonly Freeze: "Freeze";
|
|
29
|
+
/**
|
|
30
|
+
* 正在解冻
|
|
31
|
+
*/
|
|
32
|
+
readonly Thawing: "Thawing";
|
|
33
|
+
};
|
|
34
|
+
export type FreezeStateKeys = keyof typeof FreezeState;
|
|
35
|
+
export type FreezeStateEnum = (typeof FreezeState)[FreezeStateKeys];
|
|
36
|
+
export type ApiFreezerRequestMatcher = string | RegExp | ((api: string, params: readonly unknown[]) => boolean);
|
|
37
|
+
interface ApiFreezerState {
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
|
|
41
|
+
* 冻结器状态
|
|
42
|
+
* - 流程:
|
|
43
|
+
* 1. 开启冻结 标记 Freeze
|
|
44
|
+
* 2. 收录请求
|
|
45
|
+
* 3. 开始解冻 标记 Thaw
|
|
46
|
+
* 4. 消费队列
|
|
47
|
+
* 5. 标记 Hibernation
|
|
48
|
+
|
|
49
|
+
*/
|
|
50
|
+
readonly state: FreezeStateEnum;
|
|
51
|
+
/**
|
|
52
|
+
* - 开启冻结
|
|
53
|
+
* - 所有触发的请求不会实际发出,而是进入消息队列
|
|
54
|
+
*/
|
|
55
|
+
freezing: () => void;
|
|
56
|
+
/**
|
|
57
|
+
* - 开始解冻
|
|
58
|
+
* - 处理消息队列
|
|
59
|
+
*/
|
|
60
|
+
thawing: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* - 请求白名单
|
|
63
|
+
* - 需要放行的 api请求
|
|
64
|
+
*/
|
|
65
|
+
requestWhitelist: ApiFreezerRequestMatcher[];
|
|
66
|
+
setRequestWhitelist: (data: ApiFreezerState['requestWhitelist']) => void;
|
|
67
|
+
/**
|
|
68
|
+
* - 收录的待处理请求
|
|
69
|
+
*/
|
|
70
|
+
readonly freezeQueue: freezeQueue;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* 解冻的过程中 又插入了请求 如何处理?
|
|
75
|
+
*
|
|
76
|
+
* 冻结流程
|
|
77
|
+
*
|
|
78
|
+
* 1. 如果处于休眠 或者 api在白名单中 直接调用
|
|
79
|
+
* 2. 获取冻结队列
|
|
80
|
+
* 1. 如果没有则新增
|
|
81
|
+
* 3. 返回一个 Promise 给调用方 // 请求并未发出
|
|
82
|
+
* 4. 监听状态变化
|
|
83
|
+
* 5. 变为解冻时
|
|
84
|
+
* 6. 获取消息 冻结列表
|
|
85
|
+
* 7. 批处理请求
|
|
86
|
+
* 8. 响应后 回调 调用方 返回结果
|
|
87
|
+
* 9. 清空 冻结队列
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
export declare const apiFreezerStore: import("zustand").StoreApi<ApiFreezerState>;
|
|
91
|
+
export declare const useApiFreezer: import("../../../packages/react/ui/index").StoreHook<import("zustand").StoreApi<ApiFreezerState>>;
|
|
92
|
+
export {};
|
|
93
|
+
//# sourceMappingURL=apiFreezer.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createStoreHook } from "../../../packages/react/ui/lib/createStoreHook.js";
|
|
2
|
+
import "../../../packages/react/ui/index.js";
|
|
3
|
+
import { createStore } from "zustand";
|
|
4
|
+
//#region frontend/src/stores/apiFreezer.ts
|
|
5
|
+
var FreezeState = {
|
|
6
|
+
/**
|
|
7
|
+
* 休眠 - 待机状态
|
|
8
|
+
*/
|
|
9
|
+
Hibernation: "Hibernation",
|
|
10
|
+
/**
|
|
11
|
+
* 冻结状态
|
|
12
|
+
*/
|
|
13
|
+
Freeze: "Freeze",
|
|
14
|
+
/**
|
|
15
|
+
* 正在解冻
|
|
16
|
+
*/
|
|
17
|
+
Thawing: "Thawing"
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* 解冻的过程中 又插入了请求 如何处理?
|
|
22
|
+
*
|
|
23
|
+
* 冻结流程
|
|
24
|
+
*
|
|
25
|
+
* 1. 如果处于休眠 或者 api在白名单中 直接调用
|
|
26
|
+
* 2. 获取冻结队列
|
|
27
|
+
* 1. 如果没有则新增
|
|
28
|
+
* 3. 返回一个 Promise 给调用方 // 请求并未发出
|
|
29
|
+
* 4. 监听状态变化
|
|
30
|
+
* 5. 变为解冻时
|
|
31
|
+
* 6. 获取消息 冻结列表
|
|
32
|
+
* 7. 批处理请求
|
|
33
|
+
* 8. 响应后 回调 调用方 返回结果
|
|
34
|
+
* 9. 清空 冻结队列
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
var apiFreezerStore = createStore((set) => ({
|
|
38
|
+
state: FreezeState.Hibernation,
|
|
39
|
+
freezing() {
|
|
40
|
+
set({ state: FreezeState.Freeze });
|
|
41
|
+
},
|
|
42
|
+
thawing() {
|
|
43
|
+
set({ state: FreezeState.Thawing });
|
|
44
|
+
},
|
|
45
|
+
requestWhitelist: [],
|
|
46
|
+
setRequestWhitelist(requestWhitelist) {
|
|
47
|
+
set({ requestWhitelist });
|
|
48
|
+
},
|
|
49
|
+
freezeQueue: /* @__PURE__ */ new Map()
|
|
50
|
+
}));
|
|
51
|
+
var useApiFreezer = createStoreHook(apiFreezerStore);
|
|
52
|
+
//#endregion
|
|
53
|
+
export { FreezeState, apiFreezerStore, useApiFreezer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ModelInfo, type ProjectInfo } from
|
|
1
|
+
import { type ModelInfo, type ProjectInfo } from "../api/baseInfo";
|
|
2
2
|
interface ModeState {
|
|
3
3
|
modeList: ModelInfo[];
|
|
4
4
|
projectInfo: ProjectInfo | null;
|
|
@@ -10,10 +10,10 @@ interface ModeState {
|
|
|
10
10
|
interface ModeAction {
|
|
11
11
|
setModeList: (data: ModeState['modeList']) => void;
|
|
12
12
|
setProjectInfo: (data: ModeState['projectInfo']) => void;
|
|
13
|
-
initModeData: () => void
|
|
13
|
+
initModeData: () => Promise<void>;
|
|
14
14
|
}
|
|
15
15
|
type IStore = ModeState & ModeAction;
|
|
16
16
|
export declare const modeStore: import("zustand").StoreApi<IStore>;
|
|
17
|
-
export declare const useModeStore: import("../../../packages/ui/
|
|
17
|
+
export declare const useModeStore: import("../../../packages/react/ui/index").StoreHook<import("zustand").StoreApi<IStore>>;
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=mode.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createStoreHook } from "../../../packages/react/ui/lib/createStoreHook.js";
|
|
2
|
+
import { setApiAuth } from "../common/auth/index.js";
|
|
3
|
+
import { getModelList, getProjectData } from "../api/baseInfo.js";
|
|
4
|
+
import { deserializationUrlSearch } from "../common/menu.js";
|
|
5
|
+
import { createStore } from "zustand";
|
|
6
|
+
//#region frontend/src/stores/mode.ts
|
|
7
|
+
var modeStore = createStore((set, get) => ({
|
|
8
|
+
modeList: [],
|
|
9
|
+
projectInfo: null,
|
|
10
|
+
initData: false,
|
|
11
|
+
setModeList(modeList) {
|
|
12
|
+
set({ modeList });
|
|
13
|
+
},
|
|
14
|
+
setProjectInfo(projectInfo) {
|
|
15
|
+
set({ projectInfo });
|
|
16
|
+
},
|
|
17
|
+
async initModeData() {
|
|
18
|
+
const fetchModeData = async () => {
|
|
19
|
+
return await getModelList();
|
|
20
|
+
};
|
|
21
|
+
const fetchProjectData = async () => {
|
|
22
|
+
const key = deserializationUrlSearch(window.location.search)["projk"];
|
|
23
|
+
setApiAuth(key);
|
|
24
|
+
return await getProjectData(key);
|
|
25
|
+
};
|
|
26
|
+
const [modeList, projectInfo] = await Promise.all([fetchModeData(), fetchProjectData()]);
|
|
27
|
+
set({
|
|
28
|
+
modeList,
|
|
29
|
+
projectInfo,
|
|
30
|
+
initData: true
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
var useModeStore = createStoreHook(modeStore);
|
|
35
|
+
//#endregion
|
|
36
|
+
export { modeStore, useModeStore };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SchemaComEventInfo, SchemaDefaultValue, SchemaTableEmitData } from
|
|
1
|
+
import type { SchemaComEventInfo, SchemaDefaultValue, SchemaTableEmitData } from "../defaultPages/SchemaPage/schemaType";
|
|
2
2
|
/**
|
|
3
3
|
* 消费方 subscribeSearch(fn)
|
|
4
4
|
* unSubscribeSearch(fn)
|