@_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
|
@@ -1,35 +1,52 @@
|
|
|
1
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2
|
+
export type HttpHeaders = Record<string, string>;
|
|
3
|
+
export type RequestCredentials = 'omit' | 'same-origin' | 'include';
|
|
4
|
+
export type RequestCache = 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
|
|
5
|
+
export type RequestRedirect = 'error' | 'follow' | 'manual';
|
|
6
|
+
export type ReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
7
|
+
export interface HeadersLike {
|
|
8
|
+
forEach(callback: (value: string, key: string) => void): void;
|
|
9
|
+
has(name: string): boolean;
|
|
10
|
+
set(name: string, value: string): void;
|
|
11
|
+
}
|
|
12
|
+
export interface ProgressEventLike {
|
|
13
|
+
loaded?: number;
|
|
14
|
+
total?: number;
|
|
15
|
+
lengthComputable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type RequestBodyLike = string | ArrayBuffer | ArrayBufferView | object;
|
|
1
18
|
export interface RequestConfig<D = unknown> {
|
|
2
19
|
url?: string;
|
|
3
|
-
method?:
|
|
20
|
+
method?: HttpMethod;
|
|
4
21
|
baseURL?: string;
|
|
5
|
-
headers?:
|
|
22
|
+
headers?: HttpHeaders;
|
|
6
23
|
params?: Record<string, string | number | boolean | undefined | null>;
|
|
7
24
|
data?: D;
|
|
8
25
|
timeout?: number;
|
|
9
|
-
signal?:
|
|
26
|
+
signal?: unknown;
|
|
10
27
|
credentials?: RequestCredentials;
|
|
11
28
|
cache?: RequestCache;
|
|
12
29
|
redirect?: RequestRedirect;
|
|
13
30
|
referrer?: string;
|
|
14
31
|
referrerPolicy?: ReferrerPolicy;
|
|
15
|
-
transformRequest?: ((data: D, headers:
|
|
32
|
+
transformRequest?: ((data: D, headers: HeadersLike) => D | RequestBodyLike) | ((data: D, headers: HeadersLike) => D | RequestBodyLike)[];
|
|
16
33
|
transformResponse?: ((data: unknown) => unknown) | ((data: unknown) => unknown)[];
|
|
17
34
|
validateStatus?: (status: number) => boolean;
|
|
18
|
-
onUploadProgress?: (progress:
|
|
19
|
-
onDownloadProgress?: (progress:
|
|
35
|
+
onUploadProgress?: (progress: ProgressEventLike) => void;
|
|
36
|
+
onDownloadProgress?: (progress: ProgressEventLike) => void;
|
|
20
37
|
}
|
|
21
38
|
export interface ResponseConfig<T = unknown, D = unknown> {
|
|
22
39
|
data: T;
|
|
23
40
|
status: number;
|
|
24
41
|
statusText: string;
|
|
25
|
-
headers:
|
|
42
|
+
headers: HttpHeaders;
|
|
26
43
|
config: RequestConfig<D>;
|
|
27
|
-
request?:
|
|
44
|
+
request?: unknown;
|
|
28
45
|
}
|
|
29
46
|
export interface AxiosError<T = unknown, D = unknown> extends Error {
|
|
30
47
|
config: RequestConfig<D>;
|
|
31
48
|
code?: string;
|
|
32
|
-
request?:
|
|
49
|
+
request?: unknown;
|
|
33
50
|
response?: ResponseConfig<T, D>;
|
|
34
51
|
isAxiosError: boolean;
|
|
35
52
|
}
|
|
@@ -54,6 +71,9 @@ export declare class FetchAxios {
|
|
|
54
71
|
};
|
|
55
72
|
constructor(config?: RequestConfig);
|
|
56
73
|
private request;
|
|
74
|
+
private applyRequestInterceptors;
|
|
75
|
+
private applyResponseInterceptors;
|
|
76
|
+
private applyResponseErrorInterceptors;
|
|
57
77
|
private _doRequest;
|
|
58
78
|
private createError;
|
|
59
79
|
get<T = unknown, D = unknown>(url: string, config?: RequestConfig<D>): Promise<ResponseConfig<T, D>>;
|
|
@@ -67,4 +87,3 @@ export declare class FetchAxios {
|
|
|
67
87
|
export declare const axios: FetchAxios;
|
|
68
88
|
export declare const createInstance: (defaultConfig: RequestConfig) => FetchAxios;
|
|
69
89
|
export default FetchAxios;
|
|
70
|
-
//# sourceMappingURL=CRUD.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI component library default English language resources.
|
|
3
|
+
*
|
|
4
|
+
* Only built-in component copy belongs here. Applications can override or extend it with I18nProvider.resources.
|
|
5
|
+
*/
|
|
1
6
|
export declare const defaultEnglishResources: {
|
|
2
7
|
readonly common: {
|
|
3
8
|
readonly tip: "Prompt";
|
|
@@ -2,10 +2,30 @@ import type { I18nDictionary, I18nInterpolationValues, I18nMessage, I18nResource
|
|
|
2
2
|
export * from "./types";
|
|
3
3
|
export * from "./locales";
|
|
4
4
|
export declare const isPlainI18nDictionary: (value: I18nMessage) => value is I18nDictionary;
|
|
5
|
+
/**
|
|
6
|
+
* 深合并单个语言包。
|
|
7
|
+
* 嵌套对象递归合并,字符串、数组、数字等叶子节点直接以 patch 覆盖 base。
|
|
8
|
+
*/
|
|
5
9
|
export declare const mergeI18nDictionary: (base?: I18nDictionary, patch?: I18nDictionary) => I18nDictionary;
|
|
10
|
+
/**
|
|
11
|
+
* 合并多语言资源。
|
|
12
|
+
* 结构示例:{ 'zh-CN': { common: { ok: '确定' } }, 'en-US': { common: { ok: 'OK' } } }
|
|
13
|
+
*/
|
|
6
14
|
export declare const mergeI18nResources: (base?: I18nResources, patch?: I18nResources) => I18nResources;
|
|
15
|
+
/**
|
|
16
|
+
* 根据点分 key 从语言包中取值。
|
|
17
|
+
* 例如 common.submit 会读取 resources[language].common.submit。
|
|
18
|
+
*/
|
|
7
19
|
export declare const getI18nPathValue: (dictionary: I18nDictionary | undefined, key: string) => I18nMessage | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* 替换文案中的插值占位符。
|
|
22
|
+
* 例如 "Hello, {name}" + { name: "Tom" } => "Hello, Tom"。
|
|
23
|
+
*/
|
|
8
24
|
export declare const interpolateI18nMessage: (value: string, data?: I18nInterpolationValues) => string;
|
|
25
|
+
/**
|
|
26
|
+
* 纯翻译函数:只依赖传入的 state。
|
|
27
|
+
* 优先级:指定语言 -> 兜底语言 -> options.fallback -> 原 key。
|
|
28
|
+
*/
|
|
9
29
|
export declare const translate: <T = string>(state: I18nTranslateState, key: string, fillingData?: I18nInterpolationValues, options?: I18nTranslateOptions) => T | string;
|
|
10
30
|
export declare const i18nStore: {
|
|
11
31
|
getState: () => I18nStore;
|
|
@@ -13,6 +33,10 @@ export declare const i18nStore: {
|
|
|
13
33
|
setState: (partial: Partial<I18nStore> | ((state: I18nStore) => Partial<I18nStore>)) => void;
|
|
14
34
|
subscribe: (listener: I18nStoreListener) => () => void;
|
|
15
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* 对外使用的 i18n 函数。
|
|
38
|
+
* 每次调用都会读取最新 state,适合在非 React 代码中直接使用。
|
|
39
|
+
*/
|
|
16
40
|
export declare const i18n: <T = string>(key: string, fillingData?: I18nInterpolationValues, options?: I18nTranslateOptions) => string | T;
|
|
17
41
|
export declare const t: <T = string>(key: string, fillingData?: I18nInterpolationValues, options?: I18nTranslateOptions) => string | T;
|
|
18
42
|
export declare const getLanguage: <T = string>(key: string, fillingData?: I18nInterpolationValues, options?: I18nTranslateOptions) => string | T;
|
|
@@ -12,28 +12,52 @@ export interface I18nTranslateState {
|
|
|
12
12
|
resources: I18nResources;
|
|
13
13
|
}
|
|
14
14
|
export interface I18nState extends I18nTranslateState {
|
|
15
|
+
/** 持久化语言时使用的 localStorage key。 */
|
|
15
16
|
storageKey: string;
|
|
17
|
+
/** 是否把 setLanguage 的结果写入 localStorage。 */
|
|
16
18
|
persist: boolean;
|
|
17
19
|
}
|
|
18
20
|
export interface I18nTranslateOptions {
|
|
21
|
+
/**
|
|
22
|
+
* 指定本次翻译使用的语言,不传则使用全局 language。
|
|
23
|
+
*/
|
|
19
24
|
language?: I18nLanguage;
|
|
25
|
+
/**
|
|
26
|
+
* 当前语言未命中时使用的兜底语言,不传则使用全局 fallbackLanguage。
|
|
27
|
+
*/
|
|
20
28
|
fallbackLanguage?: I18nLanguage;
|
|
29
|
+
/**
|
|
30
|
+
* 当前语言和兜底语言都未命中时返回的兜底值。
|
|
31
|
+
*/
|
|
21
32
|
fallback?: I18nMessage;
|
|
22
33
|
}
|
|
23
34
|
export interface I18nSetResourcesOptions {
|
|
35
|
+
/**
|
|
36
|
+
* 是否和现有资源深合并。默认 false,直接替换 resources。
|
|
37
|
+
*/
|
|
24
38
|
merge?: boolean;
|
|
25
39
|
}
|
|
26
40
|
export interface I18nAddResourcesOptions {
|
|
41
|
+
/**
|
|
42
|
+
* 是否和当前语言资源深合并。默认 true。
|
|
43
|
+
*/
|
|
27
44
|
merge?: boolean;
|
|
28
45
|
}
|
|
29
46
|
export type I18nTranslator = <T = string>(key: string, fillingData?: I18nInterpolationValues, options?: I18nTranslateOptions) => T | string;
|
|
30
47
|
export interface I18nActions {
|
|
48
|
+
/** 设置当前展示语言。 */
|
|
31
49
|
setLanguage: (language: I18nLanguage) => void;
|
|
50
|
+
/** 设置兜底语言。 */
|
|
32
51
|
setFallbackLanguage: (language: I18nLanguage) => void;
|
|
52
|
+
/** 批量设置多语言资源,可选择替换或合并。 */
|
|
33
53
|
setResources: (resources: I18nResources, options?: I18nSetResourcesOptions) => void;
|
|
54
|
+
/** 为指定语言追加资源,默认和已有资源深合并。 */
|
|
34
55
|
addResources: (language: I18nLanguage, messages: I18nDictionary, options?: I18nAddResourcesOptions) => void;
|
|
56
|
+
/** 配置存储行为,主要由 I18nProvider 同步外部 props 使用。 */
|
|
35
57
|
configureI18n: (config: Partial<Pick<I18nState, 'storageKey' | 'persist'>>) => void;
|
|
58
|
+
/** 重置为默认语言、默认资源和默认存储配置。 */
|
|
36
59
|
resetI18n: () => void;
|
|
60
|
+
/** 挂在 store 上的翻译函数,方便直接读取。 */
|
|
37
61
|
t: I18nTranslator;
|
|
38
62
|
}
|
|
39
63
|
export type I18nStore = I18nState & I18nActions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./types";
|
|
2
1
|
import "../../app/typings";
|
|
2
|
+
import "./types";
|
|
3
3
|
import type { KoaApp, StartOptions } from "./types";
|
|
4
4
|
export declare const loaderModel: (app: KoaApp) => import("./loader/model").ModelConfig;
|
|
5
|
-
export type { AppConfig, AppOptions,
|
|
6
|
-
export declare const start: (options?: StartOptions) => KoaApp
|
|
5
|
+
export type { AppConfig, AppOptions, FrameworkAugment, IController, IExtends, IMiddlewares, IService, KoaApp, KoaAppExtensions, KoaMiddleware, KoaRouter, ProcessingFileCallbackFN, StartOptions, } from "./types";
|
|
6
|
+
export declare const start: (options?: StartOptions) => Promise<KoaApp>;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import type { KoaApp } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* 加载 xx/app/controller 文件夹下所有文件,可通过'app.controller.${目录}.'},访问
|
|
4
|
+
*
|
|
5
|
+
例子:
|
|
6
|
+
app/controller
|
|
7
|
+
|
|
8
|
+
|-- cuStom-moduLe
|
|
9
|
+
|
|
10
|
+
|-- custom-midd Leware.(js|ts)
|
|
11
|
+
|
|
12
|
+
=> app.controller.customModule. customMiddleware
|
|
13
|
+
*
|
|
14
|
+
* @param app
|
|
15
|
+
*/
|
|
2
16
|
declare const _default: (app: KoaApp) => void;
|
|
3
17
|
export default _default;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { KoaApp } from "../types";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* extend loader 扩展 koa app属性 只加载一级
|
|
4
|
+
*
|
|
5
|
+
* 加载 xx/app/extend 文件,可通过 'app.extends.${文件}' 访问
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: (app: KoaApp) => Promise<void>;
|
|
3
8
|
export default _default;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { KoaApp } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* xx/model/* ->
|
|
4
|
+
* [
|
|
5
|
+
* {
|
|
6
|
+
* model:{
|
|
7
|
+
* key: '',
|
|
8
|
+
* ...model.config
|
|
9
|
+
* }
|
|
10
|
+
* project: {
|
|
11
|
+
* [projectKey]: {
|
|
12
|
+
* ...project.config,
|
|
13
|
+
* key:string,
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ]
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
2
20
|
export interface ModelItem {
|
|
3
21
|
model: {
|
|
4
22
|
key: string;
|
|
@@ -10,5 +28,9 @@ export interface ModelItem {
|
|
|
10
28
|
};
|
|
11
29
|
}
|
|
12
30
|
export type ModelConfig = ModelItem[];
|
|
31
|
+
/**
|
|
32
|
+
* 获取使用方的 跟路径下的 model文件夹
|
|
33
|
+
* @param app
|
|
34
|
+
*/
|
|
13
35
|
declare const modelLoader: (app: KoaApp) => ModelConfig;
|
|
14
36
|
export default modelLoader;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import { KoaApp } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* router-schema loader 只处理一级
|
|
5
|
+
*
|
|
6
|
+
* @param app
|
|
7
|
+
*
|
|
8
|
+
* xx/app/router-schema/**.(js|ts)
|
|
9
|
+
*
|
|
10
|
+
* 输出:
|
|
11
|
+
* app.routerSchema = {
|
|
12
|
+
* [api1]: jsonSchema
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
2
17
|
declare const _default: (app: KoaApp) => void;
|
|
3
18
|
export default _default;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import type { KoaApp } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* 加载 xx/app/service 文件夹下所有文件 可通过'app.service.${目录}..},访问
|
|
4
|
+
*
|
|
5
|
+
例子:
|
|
6
|
+
app/service
|
|
7
|
+
|
|
8
|
+
|-- cuStom-moduLe
|
|
9
|
+
|
|
10
|
+
|-- custom-midd Leware.(js|ts)
|
|
11
|
+
|
|
12
|
+
=> app.service.customModule. customMiddleware
|
|
13
|
+
*
|
|
14
|
+
* @param app
|
|
15
|
+
*/
|
|
2
16
|
declare const _default: (app: KoaApp) => void;
|
|
3
17
|
export default _default;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import type { KoaApp } from "app/typings";
|
|
2
|
+
export type AppPathType = 'frame' | 'business';
|
|
2
3
|
export interface AppPathInfo {
|
|
3
4
|
type: AppPathType;
|
|
4
5
|
path: string;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare function
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 获取制定类型的app目录
|
|
9
|
+
*/
|
|
10
|
+
export declare function getAppPath(app: KoaApp, type: AppPathType): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* 获取所有app目录
|
|
13
|
+
*/
|
|
14
|
+
export declare function getAppPaths(app: KoaApp): string[];
|
|
@@ -28,13 +28,39 @@ export declare namespace FrameworkAugment {
|
|
|
28
28
|
}
|
|
29
29
|
export type ICTX = Parameters<Router.IMiddleware<any, {}>>[0];
|
|
30
30
|
export interface KoaAppExtensions {
|
|
31
|
+
/**
|
|
32
|
+
* 框架路径 .root
|
|
33
|
+
*/
|
|
31
34
|
frameBaseDir: string;
|
|
32
|
-
|
|
35
|
+
/**
|
|
36
|
+
* 框架跟路径 .root/app
|
|
37
|
+
*/
|
|
38
|
+
frameAppPath: string;
|
|
39
|
+
/**
|
|
40
|
+
* 使用方根路径 .root
|
|
41
|
+
*/
|
|
33
42
|
baseDir: string;
|
|
34
|
-
|
|
43
|
+
/**
|
|
44
|
+
* 使用方 .root/app
|
|
45
|
+
*/
|
|
46
|
+
businessAppPath: string;
|
|
47
|
+
/**
|
|
48
|
+
* 存着 框架 以及业务方的 app路径
|
|
49
|
+
*/
|
|
35
50
|
paths: AppPathInfo[];
|
|
51
|
+
/**
|
|
52
|
+
* 服务生命周期
|
|
53
|
+
*/
|
|
36
54
|
hooks: {
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* 服务初始化完成
|
|
58
|
+
*/
|
|
37
59
|
inited?: () => void;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* 服务开始初始化
|
|
63
|
+
*/
|
|
38
64
|
initing?: () => void;
|
|
39
65
|
};
|
|
40
66
|
envs: EnvReturn;
|
|
@@ -63,10 +89,42 @@ export interface AppConfig extends AppConfigBase {
|
|
|
63
89
|
[key: string]: unknown;
|
|
64
90
|
}
|
|
65
91
|
export interface StartOptions {
|
|
92
|
+
/**
|
|
93
|
+
* 写入 html.title
|
|
94
|
+
*/
|
|
66
95
|
name?: string;
|
|
96
|
+
/**
|
|
97
|
+
* - 配置时,当找不到模板文件时 重定向的路径
|
|
98
|
+
* @default '/'
|
|
99
|
+
*/
|
|
67
100
|
homePage?: string;
|
|
68
101
|
frameBaseDir?: string;
|
|
102
|
+
/**
|
|
103
|
+
* 如果不设置 默认为 运行目录
|
|
104
|
+
* @default process.cwd()
|
|
105
|
+
*/
|
|
69
106
|
baseDir?: string;
|
|
107
|
+
/**
|
|
108
|
+
* - 可配置的 资源路径(不要输入相对路径)
|
|
109
|
+
* - 主要是配合 buildFE 修改了输出路径时使用
|
|
110
|
+
*/
|
|
111
|
+
additionalPublicPaths?: string | string[];
|
|
112
|
+
/**
|
|
113
|
+
* API 访问前缀。
|
|
114
|
+
* 为空或空字符串时会使用默认值 `/api`。
|
|
115
|
+
* 配置后会影响内置项目 API 路由,以及 API 参数校验、签名校验、项目处理等中间件的路径匹配。
|
|
116
|
+
* @default '/api'
|
|
117
|
+
*/
|
|
118
|
+
apiPrefix?: string;
|
|
119
|
+
/**
|
|
120
|
+
* - 页面访问前缀 默认为 /
|
|
121
|
+
* @default '/'
|
|
122
|
+
* @example
|
|
123
|
+
* - 配置 '/test'
|
|
124
|
+
* - 所有前端页面的路径以 /test开头
|
|
125
|
+
* - 如: '/test/dash'
|
|
126
|
+
*
|
|
127
|
+
*/
|
|
70
128
|
pageBasePage?: string;
|
|
71
129
|
}
|
|
72
130
|
export interface AppOptions extends StartOptions {
|
|
@@ -75,8 +133,13 @@ export interface AppOptions extends StartOptions {
|
|
|
75
133
|
}
|
|
76
134
|
export type KoaApp = Koa & KoaAppExtensions;
|
|
77
135
|
export type KoaRouter = Router & {
|
|
136
|
+
/**
|
|
137
|
+
* 路由插入层级 默认为 0
|
|
138
|
+
* 数值越小越靠前
|
|
139
|
+
*/
|
|
78
140
|
level?: number;
|
|
79
141
|
};
|
|
80
142
|
export type KoaMiddleware = Koa.Middleware;
|
|
81
|
-
export type {
|
|
143
|
+
export type { EnvKeys, EnvType } from "./env";
|
|
144
|
+
/** 文件处理回调函数 */
|
|
82
145
|
export type ProcessingFileCallbackFN = <T extends Record<string, unknown>>(fileName: string, filePath: string, isDir: boolean, tempData: T) => T | undefined;
|
|
@@ -6,6 +6,12 @@ export interface LoadFileCallbackOptions {
|
|
|
6
6
|
processingFileCallback?: ProcessingFileCallbackFN;
|
|
7
7
|
preProcessingFileCallback?: PreProcessingFileCallbackFN;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param baseDir
|
|
12
|
+
* @param key
|
|
13
|
+
* @param callbackOpt
|
|
14
|
+
*/
|
|
9
15
|
declare function loadFileFn<T extends Record<string, unknown>>(baseDir: string, key: string, callbackOpt?: LoadFileCallbackOptions): T;
|
|
10
16
|
export { loadFileFn };
|
|
11
17
|
declare const _default: {
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
export interface SplicingOptions {
|
|
2
|
+
/**
|
|
3
|
+
* @default '/''
|
|
4
|
+
*/
|
|
2
5
|
symbol?: string;
|
|
6
|
+
/**
|
|
7
|
+
* @default before
|
|
8
|
+
*/
|
|
3
9
|
position?: "after" | "before";
|
|
4
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* splicing('path') : /path
|
|
13
|
+
*/
|
|
5
14
|
export declare function splicing(str: string, opt?: SplicingOptions): string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param paths
|
|
18
|
+
* @description input [a,b,c] -> out a/b/c
|
|
19
|
+
*
|
|
20
|
+
* window: input [a,b,c] -> out a\b\c
|
|
21
|
+
*
|
|
22
|
+
* 拼接路径
|
|
23
|
+
*/
|
|
6
24
|
export declare function resolve(...paths: string[]): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BuildEntriesConfig, BuildEntriesResult } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* 构建库入口文件的主函数
|
|
4
|
+
* 支持多格式输出(ESM/CJS)、类型声明文件生成、路径别名、文件复制等功能
|
|
5
|
+
* @param config - 构建配置选项
|
|
6
|
+
* @param config.input - 入口文件或目录列表
|
|
7
|
+
* @param config.format - 输出格式,默认 ['es', 'cjs']
|
|
8
|
+
* @param config.outputStructure - 输出结构,'preserve' 保留源路径,'bundle' 合并输出
|
|
9
|
+
* @param config.alias - 路径别名配置
|
|
10
|
+
* @param config.external - 外部依赖配置
|
|
11
|
+
* @param config.externalNodeBuiltins - 是否将 Node.js 内置模块视为外部依赖,默认 true
|
|
12
|
+
* @param config.bundleDependencies - 是否将 npm 依赖打进产物,默认兼容 externalPackages
|
|
13
|
+
* @param config.externalPackages - 兼容旧配置:是否将所有 npm 包视为外部依赖
|
|
14
|
+
* @param config.ignore - 忽略文件配置
|
|
15
|
+
* @param config.copy - 复制文件配置
|
|
16
|
+
* @param config.extensions - 需要处理的文件扩展名
|
|
17
|
+
* @param config.nonCodeExtensions - 非代码文件扩展名
|
|
18
|
+
* @param config.plugins - Vite 插件配置
|
|
19
|
+
* @param config.dts - 类型声明文件配置
|
|
20
|
+
* @param config.outDir - 输出根目录,默认 'dist'
|
|
21
|
+
* @param config.rootDir - 项目根目录,默认当前工作目录
|
|
22
|
+
* @returns 构建结果信息
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildEntries(config?: BuildEntriesConfig): Promise<BuildEntriesResult>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { CollectedPluginFile, PluginFileHandler } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* 递归收集 TypeScript 源文件
|
|
4
|
+
* 遍历目录树,收集符合扩展名要求且未被忽略的文件
|
|
5
|
+
* @param entryPath - 入口路径(文件或目录)
|
|
6
|
+
* @param collected - 收集到的文件路径集合
|
|
7
|
+
* @param isIgnored - 判断路径是否被忽略的函数
|
|
8
|
+
* @param extensionsSet - 需要收集的文件扩展名集合
|
|
9
|
+
*/
|
|
10
|
+
export declare function collectTsFiles(entryPath: string, collected: Set<string>, isIgnored: (targetPath: string) => boolean, extensionsSet: Set<string>, allowMissing?: boolean): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* 递归收集需要由插件处理的文件
|
|
13
|
+
* 根据插件的 test 函数判断文件是否需要处理
|
|
14
|
+
* @param entryPath - 入口路径(文件或目录)
|
|
15
|
+
* @param collected - 收集到的文件信息数组
|
|
16
|
+
* @param isIgnored - 判断路径是否被忽略的函数
|
|
17
|
+
* @param plugins - 插件处理器列表
|
|
18
|
+
*/
|
|
19
|
+
export declare function collectPluginFiles(entryPath: string, collected: CollectedPluginFile[], isIgnored: (targetPath: string) => boolean, plugins: PluginFileHandler[], allowMissing?: boolean): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* 递归收集指定扩展名的文件
|
|
22
|
+
* 用于收集特定类型的文件(如 .d.ts 文件)
|
|
23
|
+
* @param entryPath - 入口路径(文件或目录)
|
|
24
|
+
* @param collected - 收集到的文件路径集合
|
|
25
|
+
* @param extensionsSet - 需要收集的文件扩展名集合
|
|
26
|
+
*/
|
|
27
|
+
export declare function collectFilesWithExtensions(entryPath: string, collected: Set<string>, extensionsSet: Set<string>): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* 确保并返回有效的输入文件列表
|
|
30
|
+
* 处理多个输入路径,过滤忽略的文件,验证是否有匹配的源文件
|
|
31
|
+
* @param inputPaths - 输入路径列表
|
|
32
|
+
* @param rootDir - 项目根目录
|
|
33
|
+
* @param ignorePaths - 需要忽略的路径列表
|
|
34
|
+
* @param extensions - 需要处理的文件扩展名
|
|
35
|
+
* @returns 排序后的文件绝对路径数组
|
|
36
|
+
* @throws 如果没有找到匹配的源文件
|
|
37
|
+
*/
|
|
38
|
+
export declare function ensureInputFiles(inputPaths: string[], rootDir: string, ignorePaths: string[], extensions: string[], allowMissing?: boolean): Promise<string[]>;
|
|
39
|
+
/**
|
|
40
|
+
* 确保并返回需要插件处理的文件列表
|
|
41
|
+
* 收集所有匹配插件 test 函数的文件
|
|
42
|
+
* @param inputPaths - 输入路径列表
|
|
43
|
+
* @param rootDir - 项目根目录
|
|
44
|
+
* @param ignorePaths - 需要忽略的路径列表
|
|
45
|
+
* @param plugins - 插件处理器列表
|
|
46
|
+
* @returns 排序后的文件信息数组
|
|
47
|
+
*/
|
|
48
|
+
export declare function ensurePluginFiles(inputPaths: string[], rootDir: string, ignorePaths: string[], plugins: PluginFileHandler[], allowMissing?: boolean): Promise<CollectedPluginFile[]>;
|
|
49
|
+
/**
|
|
50
|
+
* 将文件路径列表转换为 Vite 入口映射对象
|
|
51
|
+
* 键为相对于根目录的路径(不含扩展名),值为绝对路径
|
|
52
|
+
* @param files - 文件绝对路径列表
|
|
53
|
+
* @param rootDir - 项目根目录
|
|
54
|
+
* @param extensions - 需要移除的文件扩展名列表
|
|
55
|
+
* @returns 入口映射对象 { [entryName]: absolutePath }
|
|
56
|
+
*/
|
|
57
|
+
export declare function toEntryMap(files: string[], rootDir: string, extensions: string[]): Record<string, string>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DEFAULT_EXTENSIONS: readonly [".ts", ".tsx", ".mts", ".cts", ".js"];
|
|
2
|
+
export declare const DEFAULT_FORMATS: readonly ["es", "cjs"];
|
|
3
|
+
export declare const COMMON_NON_CODE_EXTENSIONS: Set<string>;
|
|
4
|
+
export declare const FORMAT_OUTPUT_DIR: Record<string, string>;
|
|
5
|
+
export declare const DEFAULT_NON_CODE_EXTENSIONS: string[];
|
|
6
|
+
export declare const BUILTIN_MODULES: Set<string>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Alias } from "vite";
|
|
2
|
+
import type { AliasRewriteRule, NormalizedDtsConfig } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* 使用 TypeScript 编译器生成类型声明文件
|
|
5
|
+
* 创建临时 tsconfig 并调用 tsc 生成 .d.ts 文件
|
|
6
|
+
* @param files - 需要生成声明文件的源文件列表
|
|
7
|
+
* @param rootDir - 项目根目录
|
|
8
|
+
* @param aliases - 路径别名配置
|
|
9
|
+
* @param outDir - 声明文件输出目录
|
|
10
|
+
* @throws 如果找不到 TypeScript CLI 或编译失败
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildDeclarations(files: string[], rootDir: string, aliases: Alias[], dts: NormalizedDtsConfig): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* 创建别名重写规则列表
|
|
15
|
+
* 用于在声明文件中将路径别名转换为相对路径
|
|
16
|
+
* @param rootDir - 项目根目录
|
|
17
|
+
* @param aliases - Vite 路径别名配置
|
|
18
|
+
* @returns 按别名长度降序排列的重写规则数组
|
|
19
|
+
*/
|
|
20
|
+
export declare function createAliasRewriteRules(rootDir: string, aliases: Alias[]): AliasRewriteRule[];
|
|
21
|
+
/**
|
|
22
|
+
* 解析别名导入对应的声明文件路径
|
|
23
|
+
* 将别名路径解析为实际的 .d.ts 文件路径
|
|
24
|
+
* @param specifier - 导入标识符(可能包含别名)
|
|
25
|
+
* @param rootDir - 项目根目录
|
|
26
|
+
* @param aliases - 路径别名配置
|
|
27
|
+
* @param extensions - 需要处理的文件扩展名
|
|
28
|
+
* @param outDir - 声明文件输出目录
|
|
29
|
+
* @returns 对应的 .d.ts 文件路径,如果无法解析则返回 null
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveAliasedDeclarationTarget(specifier: string, rootDir: string, aliases: Alias[], extensions: string[], outDir: string): Promise<string | null>;
|
|
32
|
+
/**
|
|
33
|
+
* 重写声明文件中的别名导入标识符
|
|
34
|
+
* 将别名路径转换为相对于声明文件的相对路径
|
|
35
|
+
* @param specifier - 原始导入标识符
|
|
36
|
+
* @param declarationFilePath - 当前声明文件的绝对路径
|
|
37
|
+
* @param rootDir - 项目根目录
|
|
38
|
+
* @param outDir - 声明文件输出目录
|
|
39
|
+
* @param aliases - 路径别名配置
|
|
40
|
+
* @param rules - 别名重写规则
|
|
41
|
+
* @param extensions - 需要处理的文件扩展名
|
|
42
|
+
* @returns 重写后的导入标识符
|
|
43
|
+
*/
|
|
44
|
+
export declare function rewriteAliasedSpecifier(specifier: string, declarationFilePath: string, rootDir: string, outDir: string, aliases: Alias[], rules: AliasRewriteRule[], extensions: string[], mode: 'source' | 'declaration'): Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* 重写输出目录中所有声明文件的别名导入
|
|
47
|
+
* 处理静态导入、动态导入和模块声明中的别名路径
|
|
48
|
+
* @param outDir - 声明文件输出目录
|
|
49
|
+
* @param rootDir - 项目根目录
|
|
50
|
+
* @param aliases - 路径别名配置
|
|
51
|
+
* @param extensions - 需要处理的文件扩展名
|
|
52
|
+
*/
|
|
53
|
+
export declare function rewriteDeclarationAliases(outDir: string, rootDir: string, aliases: Alias[], extensions: string[], mode?: 'source' | 'declaration'): Promise<void>;
|