@_tc/template-core 0.0.1-bate.46 → 0.0.1-bate.47
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 +1610 -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/buildFB.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 +16 -14
- 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/buildFB.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/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/buildFB.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 +59 -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,46 @@
|
|
|
1
|
+
import { isStringAlias as e, toArray as t } from "./utils.js";
|
|
2
|
+
import { BUILTIN_MODULES as n } from "./constants.js";
|
|
3
|
+
import { normalizeExtensions as r } from "./normalize.js";
|
|
4
|
+
import { promises as i } from "node:fs";
|
|
5
|
+
import a from "node:path";
|
|
6
|
+
//#region scripts/vite-build/resolve.ts
|
|
7
|
+
async function o(t, n, r, o) {
|
|
8
|
+
let s = o.find((t) => e(t) && (n === t.find || n.startsWith(`${t.find}/`))), c = (s ? a.join(s.replacement, n.slice(s.find.length).replace(/^\/+/, "")) : null) ?? a.resolve(a.dirname(t), n), l = [
|
|
9
|
+
...r.map((e) => `${c}${e}`),
|
|
10
|
+
...r.map((e) => a.join(c, `index${e}`)),
|
|
11
|
+
c
|
|
12
|
+
];
|
|
13
|
+
for (let e of l) if ((await i.stat(e).catch(() => null))?.isFile()) return e;
|
|
14
|
+
return c;
|
|
15
|
+
}
|
|
16
|
+
function s(e, t) {
|
|
17
|
+
let n = e.map((e) => a.resolve(t, e));
|
|
18
|
+
return (e) => {
|
|
19
|
+
let t = a.resolve(e);
|
|
20
|
+
return n.some((e) => t === e || t.startsWith(`${e}${a.sep}`));
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function c(t, n) {
|
|
24
|
+
return n.some((n) => e(n) && (t === n.find || t.startsWith(`${n.find}/`)));
|
|
25
|
+
}
|
|
26
|
+
function l(e) {
|
|
27
|
+
return !e.startsWith(".") && !a.isAbsolute(e);
|
|
28
|
+
}
|
|
29
|
+
function u(e, t, n) {
|
|
30
|
+
return typeof n == "function" ? n(e, t) : typeof n == "string" ? e === n || e.startsWith(`${n}/`) : n.test(e);
|
|
31
|
+
}
|
|
32
|
+
function d(e, r, i = !0, a = !1) {
|
|
33
|
+
let o = t(r);
|
|
34
|
+
return (t, r) => i && n.has(t) || a && l(t) && !c(t, e) ? !0 : o.some((e) => u(t, r, e));
|
|
35
|
+
}
|
|
36
|
+
function f(e) {
|
|
37
|
+
let t = r(e), n = new Set(t);
|
|
38
|
+
return {
|
|
39
|
+
extensions: t,
|
|
40
|
+
test(e) {
|
|
41
|
+
return n.has(a.extname(e));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { f as createExtensionMatcher, d as createExternalPredicate, s as createIgnoreMatcher, l as isBareImport, c as matchesAlias, u as matchesExternalRule, o as resolveImportPath };
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { promises as e } from "node:fs";
|
|
2
|
+
import t from "node:path";
|
|
3
|
+
//#region scripts/vite-build/utils.ts
|
|
4
|
+
async function n(t) {
|
|
5
|
+
try {
|
|
6
|
+
return await e.access(t), !0;
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function r(e) {
|
|
12
|
+
return e.split(t.sep).join("/");
|
|
13
|
+
}
|
|
14
|
+
function i(e) {
|
|
15
|
+
return e === "" || e === "." ? "./" : e.startsWith(".") ? e : `./${e}`;
|
|
16
|
+
}
|
|
17
|
+
function a(e) {
|
|
18
|
+
return Array.isArray(e) ? e : e == null ? [] : [e];
|
|
19
|
+
}
|
|
20
|
+
function o(e) {
|
|
21
|
+
return typeof e.find == "string";
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { i as ensureRelativeImportPath, o as isStringAlias, n as pathExists, a as toArray, r as toPosixPath };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { getText } from "../../src/common/language.js";
|
|
2
|
+
import { generateMenuItemData } from "../../src/common/generateMenuData.js";
|
|
3
|
+
import defaultAlias_default from "../../../bundler/defaultAlias.js";
|
|
4
|
+
import { Menu } from "../../../packages/react/ui/components/Menu/Menu.js";
|
|
5
|
+
import "../../../packages/react/ui/components/index.js";
|
|
6
|
+
import { useModeStore } from "../../src/stores/mode.js";
|
|
7
|
+
import { findMenuItem, leftSidebarBasePath } from "../../src/common/menu.js";
|
|
8
|
+
import HeaderView from "../../src/components/BasePage/HeaderView.js";
|
|
9
|
+
import useRouterParams from "../../src/hooks/useRouterParams.js";
|
|
10
|
+
import useInit from "../../../packages/react/hooks/useInit.js";
|
|
11
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
12
|
+
import { Outlet, useNavigate } from "react-router-dom";
|
|
13
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
//#region frontend/apps/dash/Dashboard.tsx
|
|
15
|
+
var normalizePathname = (pathname) => {
|
|
16
|
+
if (!pathname) return "/";
|
|
17
|
+
const normalized = pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
18
|
+
return normalized.length > 1 ? normalized.replace(/\/+$/, "") : normalized;
|
|
19
|
+
};
|
|
20
|
+
var stripCurrentBasePath = (pathname) => {
|
|
21
|
+
const normalizedPathname = normalizePathname(pathname);
|
|
22
|
+
const basePath = normalizePathname(window._basePath ?? "");
|
|
23
|
+
if (basePath === "/") return normalizedPathname;
|
|
24
|
+
if (normalizedPathname === basePath) return "/";
|
|
25
|
+
if (normalizedPathname.startsWith(`${basePath}/`)) return normalizePathname(normalizedPathname.slice(basePath.length));
|
|
26
|
+
return normalizedPathname;
|
|
27
|
+
};
|
|
28
|
+
var getSearchParams = (search) => new URLSearchParams(search?.replace(/^\?/, ""));
|
|
29
|
+
var includesSearchParams = (expectedSearch, actualSearch) => {
|
|
30
|
+
const expectedParams = getSearchParams(expectedSearch);
|
|
31
|
+
const actualParams = getSearchParams(actualSearch);
|
|
32
|
+
for (const [key, value] of expectedParams.entries()) if (actualParams.get(key) !== value) return false;
|
|
33
|
+
return true;
|
|
34
|
+
};
|
|
35
|
+
var parseDashboardPath = (path) => {
|
|
36
|
+
const targetPath = path.trim();
|
|
37
|
+
if (!targetPath) return;
|
|
38
|
+
const url = new URL(targetPath, window.location.origin);
|
|
39
|
+
if (url.origin !== window.location.origin) return;
|
|
40
|
+
return {
|
|
41
|
+
pathname: stripCurrentBasePath(url.pathname),
|
|
42
|
+
search: url.search,
|
|
43
|
+
hash: url.hash
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
var collectRenderableMenuPaths = (menu, pathnamePrefix = "", selectedKey) => {
|
|
47
|
+
const paths = [];
|
|
48
|
+
menu.forEach((item) => {
|
|
49
|
+
if (item.menuType === "group") {
|
|
50
|
+
paths.push(...collectRenderableMenuPaths(item.subMenu ?? [], pathnamePrefix, selectedKey));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (item.moduleType === "sidebar") {
|
|
54
|
+
paths.push(...collectRenderableMenuPaths(item.sidebarConfig?.menu ?? [], `${pathnamePrefix}/${item.key}`, selectedKey ?? item.key));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const menuItem = findMenuItem(menu, item.key);
|
|
58
|
+
if (menuItem?.path?.pathname) paths.push({
|
|
59
|
+
pathname: normalizePathname(`${pathnamePrefix}${menuItem.path.pathname}`),
|
|
60
|
+
search: menuItem.path.search,
|
|
61
|
+
selectedKey: selectedKey ?? item.key
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
return paths;
|
|
65
|
+
};
|
|
66
|
+
var getRenderableHomePage = (projectInfo) => {
|
|
67
|
+
const homePage = parseDashboardPath(projectInfo.homePage);
|
|
68
|
+
if (!homePage) return;
|
|
69
|
+
const pathnamePrefix = projectInfo.menuLayout === "top" ? "" : `/${leftSidebarBasePath}`;
|
|
70
|
+
const targetMenuPath = collectRenderableMenuPaths(projectInfo.menu, pathnamePrefix).find((item) => {
|
|
71
|
+
return item.pathname === homePage.pathname && includesSearchParams(item.search, homePage.search);
|
|
72
|
+
});
|
|
73
|
+
if (!targetMenuPath) return;
|
|
74
|
+
return {
|
|
75
|
+
pathname: homePage.pathname,
|
|
76
|
+
search: homePage.search,
|
|
77
|
+
hash: homePage.hash,
|
|
78
|
+
selectedKey: projectInfo.menuLayout === "top" ? targetMenuPath.selectedKey : void 0
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
var Dashboard = () => {
|
|
82
|
+
const { initModeData, initData, projectInfo } = useModeStore();
|
|
83
|
+
const HeaderUserArea = defaultAlias_default["HeaderView.userArea"];
|
|
84
|
+
useInit(() => {
|
|
85
|
+
!initData && initModeData();
|
|
86
|
+
});
|
|
87
|
+
const isInit = useRef(false);
|
|
88
|
+
const params = useRouterParams();
|
|
89
|
+
const [SK, uSK] = useState(params.key ?? params.custk);
|
|
90
|
+
const nav = useNavigate();
|
|
91
|
+
const menu = useMemo(() => {
|
|
92
|
+
if (initData && projectInfo?.menuLayout === "top") return /* @__PURE__ */ jsx(Menu, {
|
|
93
|
+
className: " w-full",
|
|
94
|
+
mode: "top",
|
|
95
|
+
items: generateMenuItemData(projectInfo.menu),
|
|
96
|
+
selectedKey: SK,
|
|
97
|
+
onSelect: (e) => {
|
|
98
|
+
uSK(e);
|
|
99
|
+
const m = findMenuItem(projectInfo.menu, e);
|
|
100
|
+
m && nav(m?.path);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
return /* @__PURE__ */ jsx(Fragment$1, {});
|
|
104
|
+
}, [
|
|
105
|
+
initData,
|
|
106
|
+
projectInfo,
|
|
107
|
+
SK,
|
|
108
|
+
nav
|
|
109
|
+
]);
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (initData && projectInfo) {
|
|
112
|
+
if (isInit.current) return;
|
|
113
|
+
const homePage = getRenderableHomePage(projectInfo);
|
|
114
|
+
if (homePage) {
|
|
115
|
+
homePage.selectedKey && uSK(homePage.selectedKey);
|
|
116
|
+
isInit.current = true;
|
|
117
|
+
nav(homePage, { replace: true });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (projectInfo.menuLayout !== "top") {
|
|
121
|
+
console.log("left sidebar");
|
|
122
|
+
if (Object.keys(params).length && location.pathname.includes(`/_sidebar_`)) return;
|
|
123
|
+
const m = findMenuItem(projectInfo.menu);
|
|
124
|
+
nav({
|
|
125
|
+
pathname: `/${leftSidebarBasePath}${m.path.pathname}`,
|
|
126
|
+
search: m.path.search
|
|
127
|
+
}, { replace: true });
|
|
128
|
+
} else {
|
|
129
|
+
console.log("top sidebar");
|
|
130
|
+
if (!Object.keys(params).length || location.pathname.includes(`/_sidebar_`)) {
|
|
131
|
+
const m = findMenuItem(projectInfo.menu);
|
|
132
|
+
uSK(m.key);
|
|
133
|
+
nav(m.path, { replace: true });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
isInit.current = true;
|
|
137
|
+
}
|
|
138
|
+
}, [
|
|
139
|
+
initData,
|
|
140
|
+
projectInfo,
|
|
141
|
+
params,
|
|
142
|
+
nav
|
|
143
|
+
]);
|
|
144
|
+
const getTitle = () => {
|
|
145
|
+
const title = projectInfo?.desc ?? projectInfo?.name;
|
|
146
|
+
if (!isInit.current && title) document.title = projectInfo?.name ?? title;
|
|
147
|
+
return title ? getText(title) : void 0;
|
|
148
|
+
};
|
|
149
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
150
|
+
className: "dash-main h-screen flex flex-col overflow-hidden bg-theme-bg text-foreground",
|
|
151
|
+
children: [/* @__PURE__ */ jsx(HeaderView, {
|
|
152
|
+
icon: projectInfo?.icon,
|
|
153
|
+
title: getTitle(),
|
|
154
|
+
menu,
|
|
155
|
+
userArea: HeaderUserArea ? /* @__PURE__ */ jsx(HeaderUserArea, { projectInfo }) : void 0
|
|
156
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
157
|
+
className: "dash-container min-h-0 flex-1 overflow-hidden",
|
|
158
|
+
children: /* @__PURE__ */ jsx(Outlet, {})
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
Dashboard.displayName = "Dashboard";
|
|
163
|
+
//#endregion
|
|
164
|
+
export { Dashboard as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import defaultAlias_default from "../../../bundler/defaultAlias.js";
|
|
2
|
+
import { QK, leftSidebarBasePath } from "../../src/common/menu.js";
|
|
3
|
+
import Dashboard from "./Dashboard.js";
|
|
4
|
+
import { renderImportComponent } from "../../src/common/importComponent.js";
|
|
5
|
+
import { initApp } from "../../src/main.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region frontend/apps/dash/dash.entry.tsx
|
|
8
|
+
var baseRoutes = [{
|
|
9
|
+
path: "/",
|
|
10
|
+
component: /* @__PURE__ */ jsx(Dashboard, {}),
|
|
11
|
+
children: [{
|
|
12
|
+
path: `/:${QK.k}`,
|
|
13
|
+
component: renderImportComponent(import("../../src/defaultPages/SlotPage/index.js"))
|
|
14
|
+
}, {
|
|
15
|
+
path: `/ui-components`,
|
|
16
|
+
component: renderImportComponent(import("../ui-components/index.js"))
|
|
17
|
+
}]
|
|
18
|
+
}];
|
|
19
|
+
var sidebarRoutes = [{
|
|
20
|
+
path: `/:${QK.k}/*`,
|
|
21
|
+
component: renderImportComponent(import("../../src/defaultPages/SidebarSlotPage/index.js")),
|
|
22
|
+
children: [{
|
|
23
|
+
path: `:${QK.sk}`,
|
|
24
|
+
component: renderImportComponent(import("../../src/defaultPages/SlotPage/index.js"))
|
|
25
|
+
}]
|
|
26
|
+
}, {
|
|
27
|
+
path: `/${leftSidebarBasePath}/*`,
|
|
28
|
+
component: renderImportComponent(import("../../src/defaultPages/SidebarSlotPageTmp.js")),
|
|
29
|
+
children: [{
|
|
30
|
+
path: `:${QK.sk}`,
|
|
31
|
+
component: renderImportComponent(import("../../src/defaultPages/SlotPage/index.js"))
|
|
32
|
+
}]
|
|
33
|
+
}];
|
|
34
|
+
var getDefaultPageRoutes = () => {
|
|
35
|
+
if (typeof defaultAlias_default === "function") {
|
|
36
|
+
const ctx = {
|
|
37
|
+
topRoutes: [],
|
|
38
|
+
sidebarRoutes: []
|
|
39
|
+
};
|
|
40
|
+
defaultAlias_default(ctx);
|
|
41
|
+
const { topRoutes: customTopRoutes, sidebarRoutes: customSidebarRoutes } = ctx;
|
|
42
|
+
baseRoutes[0]?.children?.push(...customTopRoutes);
|
|
43
|
+
sidebarRoutes.forEach((sr) => {
|
|
44
|
+
sr.children?.push(...customSidebarRoutes);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
baseRoutes[0]?.children?.push(...sidebarRoutes);
|
|
48
|
+
return [...baseRoutes];
|
|
49
|
+
};
|
|
50
|
+
initApp(({ children }) => /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: "dash",
|
|
52
|
+
children
|
|
53
|
+
}), { routes: getDefaultPageRoutes() });
|
|
54
|
+
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ProjectInfo } from "../../src/api/baseInfo";
|
|
2
|
+
import type { RouteInfo } from "../../src/components/Router";
|
|
3
|
+
import type { ComponentType, LazyExoticComponent } from "react";
|
|
4
|
+
export type DashRoutesContext = {
|
|
5
|
+
/**
|
|
6
|
+
* 扩展 topMenu 自定义页面
|
|
7
|
+
*
|
|
8
|
+
* !!!! 路径要为相对路径,不能为全路径
|
|
9
|
+
*/
|
|
10
|
+
topRoutes: RouteInfo[];
|
|
11
|
+
/**
|
|
12
|
+
* 扩展 leftMenu 自定义页面
|
|
13
|
+
*
|
|
14
|
+
* !!!! 路径要为相对路径,不能为全路径
|
|
15
|
+
*/
|
|
16
|
+
sidebarRoutes: RouteInfo[];
|
|
17
|
+
};
|
|
18
|
+
export type DashRoutesExtender = (context: DashRoutesContext) => void;
|
|
19
|
+
export type DashHeaderUserAreaProps = {
|
|
20
|
+
projectInfo: ProjectInfo | null;
|
|
21
|
+
};
|
|
22
|
+
export type DashComponentsMap = {
|
|
23
|
+
'HeaderView.userArea'?: ComponentType<DashHeaderUserAreaProps> | LazyExoticComponent<ComponentType<DashHeaderUserAreaProps>>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { frontendLangKeys } from "../../src/language/index.js";
|
|
2
|
+
import { getText } from "../../src/common/language.js";
|
|
3
|
+
import { Button } from "../../../packages/react/ui/components/Button/Button.js";
|
|
4
|
+
import "../../../packages/react/ui/components/index.js";
|
|
5
|
+
import TestPage from "../../../packages/react/ui/components/testPage/index.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region frontend/apps/ui-components/index.tsx
|
|
8
|
+
var ui_components_default = () => {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
10
|
+
/* @__PURE__ */ jsx("h1", { children: getText(frontendLangKeys.uiComponentsTitle) }),
|
|
11
|
+
/* @__PURE__ */ jsx(Button, { children: getText(frontendLangKeys.uiComponentsButton) }),
|
|
12
|
+
/* @__PURE__ */ jsx(TestPage, {})
|
|
13
|
+
] });
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ui_components_default as default };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @type {SchemaFormComponentsMap}
|
|
3
3
|
*/
|
|
4
4
|
declare const frameComponentsMap: {
|
|
5
|
-
asyncSelect: import("react").LazyExoticComponent<(props: import("../../components/AsyncSelect").AsyncSelectProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
asyncSelect: import("react").LazyExoticComponent<(props: import("../../src/components/AsyncSelect/index").AsyncSelectProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
6
|
};
|
|
7
7
|
export type FrameComponentsMap = typeof frameComponentsMap;
|
|
8
8
|
export type FrameComponentsMapKey = keyof FrameComponentsMap;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { lazy } from
|
|
1
|
+
import { lazy } from "react";
|
|
2
|
+
//#region frontend/extended/SchemaForm/data.ts
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
export default frameComponentsMap;
|
|
4
|
+
* @type {SchemaFormComponentsMap}
|
|
5
|
+
*/
|
|
6
|
+
var frameComponentsMap = { asyncSelect: lazy(async () => await import("../../src/components/AsyncSelect/index.js")) };
|
|
7
|
+
//#endregion
|
|
8
|
+
export { frameComponentsMap as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { get } from "../common/request.js";
|
|
2
|
+
//#region frontend/src/api/baseInfo.ts
|
|
3
|
+
var getModelList = async () => {
|
|
4
|
+
const res = await get("/project/model_list");
|
|
5
|
+
if (res.data.code === 0) return res.data.data;
|
|
6
|
+
return [];
|
|
7
|
+
};
|
|
8
|
+
var getProjectData = async (key) => {
|
|
9
|
+
const res = await get(`/project/${key}`);
|
|
10
|
+
if (res.data.code === 0) return res.data.data;
|
|
11
|
+
return null;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getModelList, getProjectData };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region frontend/src/common/auth/index.ts
|
|
2
|
+
var AUTH_LOCAL_KEY = "auth_token";
|
|
3
|
+
var API_AUTH_LOCAL_KEY = "p_J_k";
|
|
4
|
+
var AUTH_HEADER_KEY = "Authorization";
|
|
5
|
+
async function getAuthToken() {
|
|
6
|
+
if (typeof localStorage === "undefined") return null;
|
|
7
|
+
return localStorage.getItem(AUTH_LOCAL_KEY);
|
|
8
|
+
}
|
|
9
|
+
async function clearAuthToken() {
|
|
10
|
+
if (typeof localStorage === "undefined") return;
|
|
11
|
+
localStorage.removeItem(AUTH_LOCAL_KEY);
|
|
12
|
+
}
|
|
13
|
+
var API_AUTH_HEADER_KEY = "projk";
|
|
14
|
+
var getApiAuth = () => {
|
|
15
|
+
return localStorage.getItem(API_AUTH_LOCAL_KEY) ?? "";
|
|
16
|
+
};
|
|
17
|
+
var setApiAuth = (v) => {
|
|
18
|
+
return localStorage.setItem(API_AUTH_LOCAL_KEY, v);
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { API_AUTH_HEADER_KEY, AUTH_HEADER_KEY, clearAuthToken, getApiAuth, getAuthToken, setApiAuth };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { BaseResponse, ResponseConfig } from
|
|
1
|
+
import type { BaseResponse, ResponseConfig } from "./request";
|
|
2
2
|
export declare const handlingRequestErrors: <D>(data: Promise<ResponseConfig<BaseResponse<D>, any>>) => Promise<ResponseConfig<BaseResponse<D>, any>>;
|
|
3
3
|
//# sourceMappingURL=fetchErrorShow.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getText } from "./language.js";
|
|
2
|
+
import { message } from "../../../packages/react/ui/components/Message/MessageManager.js";
|
|
3
|
+
import "../../../packages/react/ui/components/index.js";
|
|
4
|
+
//#region frontend/src/common/fetchErrorShow.ts
|
|
5
|
+
var handlingRequestErrors = async (data) => {
|
|
6
|
+
const res = await data;
|
|
7
|
+
if (res.data.code !== 0) message.error(getText(res.data.message));
|
|
8
|
+
return res;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { handlingRequestErrors };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProjectInfo } from "../api/baseInfo";
|
|
2
|
+
import type { MenuItemData } from "../../../packages/react/ui/components/index";
|
|
3
|
+
export declare const generateMenuItemData: (data: ProjectInfo["menu"]) => MenuItemData[];
|
|
4
|
+
//# sourceMappingURL=generateMenuData.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getText } from "./language.js";
|
|
2
|
+
//#region frontend/src/common/generateMenuData.ts
|
|
3
|
+
var generateMenuItemData = (data) => {
|
|
4
|
+
return data.map((m) => {
|
|
5
|
+
const children = m.menuType === "group" && m.subMenu.length ? generateMenuItemData(m.subMenu) : void 0;
|
|
6
|
+
return {
|
|
7
|
+
key: m.key,
|
|
8
|
+
label: getText(m.name),
|
|
9
|
+
icon: m.icon,
|
|
10
|
+
children,
|
|
11
|
+
minWidth: 100
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { generateMenuItemData };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Skeleton } from "../../../packages/react/ui/components/Skeleton/Skeleton.js";
|
|
2
|
+
import "../../../packages/react/ui/components/index.js";
|
|
3
|
+
import { Suspense, lazy } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region frontend/src/common/importComponent.tsx
|
|
6
|
+
var PageLoading = () => {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", {
|
|
8
|
+
className: "h-full min-h-[240px] w-full overflow-hidden bg-theme-bg",
|
|
9
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
10
|
+
mode: "pageloading",
|
|
11
|
+
rows: 5
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var renderImportComponent = (c, fallback) => {
|
|
16
|
+
const Component = lazy(() => c);
|
|
17
|
+
return /* @__PURE__ */ jsx(Suspense, {
|
|
18
|
+
fallback: typeof fallback !== "undefined" ? fallback : /* @__PURE__ */ jsx(PageLoading, {}),
|
|
19
|
+
children: /* @__PURE__ */ jsx(Component, {})
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { renderImportComponent };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { I18nInterpolationValues, I18nTranslateOptions } from "../../../packages/react/ui/i18n/index";
|
|
2
|
+
export declare const getText: (key: string, fillingData?: I18nInterpolationValues, options?: I18nTranslateOptions) => string;
|
|
3
|
+
//# sourceMappingURL=language.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { frontendI18nResources, i18nKeyPrefix } from "../language/index.js";
|
|
2
|
+
import { i18n, i18nStore } from "../../../packages/common/i18n/index.js";
|
|
3
|
+
import "../../../packages/react/ui/i18n/index.js";
|
|
4
|
+
//#region frontend/src/common/language.ts
|
|
5
|
+
i18nStore.getState().addResources("zh-CN", frontendI18nResources["zh-CN"] ?? {});
|
|
6
|
+
i18nStore.getState().addResources("en-US", frontendI18nResources["en-US"] ?? {});
|
|
7
|
+
var getText = (key, fillingData, options) => {
|
|
8
|
+
if (key.includes("$i18n::")) return i18n(key.replace(i18nKeyPrefix, ""), fillingData, options);
|
|
9
|
+
return key;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { getText };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const logPageNotFound: () => void;
|
|
2
2
|
export declare const logIllegalComponentCallback: (comName: string) => void;
|
|
3
3
|
export declare const logSubscriptionError: () => void;
|
|
4
|
+
export declare const logApiTamper: () => void;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { frontendLangKeys } from "../../language/index.js";
|
|
2
|
+
import { getText } from "../language.js";
|
|
3
|
+
//#region frontend/src/common/logFn/index.ts
|
|
4
|
+
var logJoin = (...logs) => logs.join(`
|
|
5
|
+
---------
|
|
6
|
+
`);
|
|
7
|
+
var logPageNotFound = () => {
|
|
8
|
+
console.error(logJoin(getText(frontendLangKeys.logPageNotFound), getText(frontendLangKeys.logPageNotFoundEn)));
|
|
9
|
+
};
|
|
10
|
+
var logIllegalComponentCallback = (comName) => console.error(logJoin(getText(frontendLangKeys.logIllegalComponentCallback, { comName }), getText(frontendLangKeys.logIllegalComponentCallbackEn, { comName })));
|
|
11
|
+
var logSubscriptionError = () => console.error(logJoin(getText(frontendLangKeys.logSubscriptionError), getText(frontendLangKeys.logSubscriptionErrorEn)));
|
|
12
|
+
var logApiTamper = () => console.error(logJoin(getText(frontendLangKeys.logApiTamper), getText(frontendLangKeys.logApiTamperEn)));
|
|
13
|
+
//#endregion
|
|
14
|
+
export { logApiTamper, logIllegalComponentCallback, logPageNotFound, logSubscriptionError };
|