@_tc/template-core 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1108 -0
- package/cjs/_virtual/_rolldown/runtime.js +1 -0
- package/cjs/app/controller/base.js +1 -0
- package/cjs/app/controller/project.js +1 -0
- package/cjs/app/controller/view.js +1 -0
- package/cjs/app/data/signKey.js +1 -0
- package/cjs/app/extend/$fetch.js +1 -0
- package/cjs/app/extend/db.js +1 -0
- package/cjs/app/extend/generateErrorMessage.js +1 -0
- package/cjs/app/extend/logger.js +1 -0
- package/cjs/app/extend/parsingParamsOnUrl.js +1 -0
- package/cjs/app/extend/render-view.js +1 -0
- package/cjs/app/middleware/api-params-verify.js +1 -0
- package/cjs/app/middleware/api-sign-verify.js +1 -0
- package/cjs/app/middleware/error-handle.js +1 -0
- package/cjs/app/middleware/project-handler.js +1 -0
- package/cjs/app/middleware.js +1 -0
- package/cjs/app/router/project.js +1 -0
- package/cjs/app/router/view.js +1 -0
- package/cjs/app/router-schema/project.js +1 -0
- package/cjs/app/service/base.js +1 -0
- package/cjs/app/service/project.js +1 -0
- package/cjs/app/type.js +1 -0
- package/cjs/app/typings.js +1 -0
- package/cjs/app/view/entry.tpl +30 -0
- package/cjs/bundler/defaultAlias.js +1 -0
- package/cjs/bundler/dev.js +1 -0
- package/cjs/bundler/index.js +1 -0
- package/cjs/bundler/prod.js +1 -0
- package/cjs/bundler/state.js +1 -0
- package/cjs/bundler/utils.js +1 -0
- package/cjs/index.js +1 -0
- package/cjs/packages/common/LRUCache.js +1 -0
- package/cjs/packages/common/array/index.js +1 -0
- package/cjs/packages/common/cache/LRUCache.js +1 -0
- package/cjs/packages/common/cache/index.js +1 -0
- package/cjs/packages/common/guards/index.js +1 -0
- package/cjs/packages/common/http/index.js +1 -0
- package/cjs/packages/common/i18n/default.js +1 -0
- package/cjs/packages/common/i18n/en-US.js +1 -0
- package/cjs/packages/common/i18n/index.js +1 -0
- package/cjs/packages/common/i18n/locales.js +1 -0
- package/cjs/packages/common/i18n/types.js +1 -0
- package/cjs/packages/common/index.js +1 -0
- package/cjs/packages/common/log/index.js +2 -0
- package/cjs/packages/common/number/index.js +1 -0
- package/cjs/packages/common/object/filterEmpty.js +1 -0
- package/cjs/packages/common/object/filtereEmpty.js +1 -0
- package/cjs/packages/common/object/index.js +1 -0
- package/cjs/packages/common/string/index.js +1 -0
- package/cjs/packages/common/types/index.js +1 -0
- package/cjs/packages/core/env.js +1 -0
- package/cjs/packages/core/index.js +1 -0
- package/cjs/packages/core/loader/config.js +1 -0
- package/cjs/packages/core/loader/controller.js +1 -0
- package/cjs/packages/core/loader/extend.js +1 -0
- package/cjs/packages/core/loader/middleware.js +1 -0
- package/cjs/packages/core/loader/model.js +1 -0
- package/cjs/packages/core/loader/router-schema.js +1 -0
- package/cjs/packages/core/loader/router.js +1 -0
- package/cjs/packages/core/loader/service.js +1 -0
- package/cjs/packages/core/paths.js +1 -0
- package/cjs/packages/core/types.js +1 -0
- package/cjs/packages/utils/getAllFilesInFolder.js +1 -0
- package/cjs/packages/utils/getAllFnReturnValue.js +1 -0
- package/cjs/packages/utils/index.js +1 -0
- package/cjs/packages/utils/loadFile.js +1 -0
- package/cjs/packages/utils/path.js +1 -0
- package/cjs/packages/utils/runFileFn.js +1 -0
- package/esm/_virtual/_rolldown/runtime.js +20 -0
- package/esm/app/controller/base.js +26 -0
- package/esm/app/controller/project.js +52 -0
- package/esm/app/controller/view.js +23 -0
- package/esm/app/data/signKey.js +8 -0
- package/esm/app/extend/$fetch.js +15 -0
- package/esm/app/extend/db.js +6 -0
- package/esm/app/extend/generateErrorMessage.js +7 -0
- package/esm/app/extend/logger.js +26 -0
- package/esm/app/extend/parsingParamsOnUrl.js +14 -0
- package/esm/app/extend/render-view.js +19 -0
- package/esm/app/middleware/api-params-verify.js +56 -0
- package/esm/app/middleware/api-sign-verify.js +18 -0
- package/esm/app/middleware/error-handle.js +24 -0
- package/esm/app/middleware/project-handler.js +15 -0
- package/esm/app/middleware.js +18 -0
- package/esm/app/router/project.js +7 -0
- package/esm/app/router/view.js +7 -0
- package/esm/app/router-schema/project.js +15 -0
- package/esm/app/service/base.js +14 -0
- package/esm/app/service/project.js +23 -0
- package/esm/app/type.js +0 -0
- package/esm/app/typings.js +0 -0
- package/esm/app/view/entry.tpl +30 -0
- package/esm/bundler/defaultAlias.js +4 -0
- package/esm/bundler/dev.js +12 -0
- package/esm/bundler/index.js +18 -0
- package/esm/bundler/prod.js +14 -0
- package/esm/bundler/state.js +10 -0
- package/esm/bundler/utils.js +194 -0
- package/esm/index.js +16 -0
- package/esm/packages/common/LRUCache.js +2 -0
- package/esm/packages/common/array/index.js +27 -0
- package/esm/packages/common/cache/LRUCache.js +39 -0
- package/esm/packages/common/cache/index.js +2 -0
- package/esm/packages/common/guards/index.js +8 -0
- package/esm/packages/common/http/index.js +256 -0
- package/esm/packages/common/i18n/default.js +88 -0
- package/esm/packages/common/i18n/en-US.js +88 -0
- package/esm/packages/common/i18n/index.js +91 -0
- package/esm/packages/common/i18n/locales.js +9 -0
- package/esm/packages/common/i18n/types.js +0 -0
- package/esm/packages/common/index.js +14 -0
- package/esm/packages/common/log/index.js +93 -0
- package/esm/packages/common/number/index.js +10 -0
- package/esm/packages/common/object/filterEmpty.js +23 -0
- package/esm/packages/common/object/filtereEmpty.js +2 -0
- package/esm/packages/common/object/index.js +17 -0
- package/esm/packages/common/string/index.js +4 -0
- package/esm/packages/common/types/index.js +0 -0
- package/esm/packages/core/env.js +24 -0
- package/esm/packages/core/index.js +52 -0
- package/esm/packages/core/loader/config.js +27 -0
- package/esm/packages/core/loader/controller.js +13 -0
- package/esm/packages/core/loader/extend.js +23 -0
- package/esm/packages/core/loader/middleware.js +16 -0
- package/esm/packages/core/loader/model.js +68 -0
- package/esm/packages/core/loader/router-schema.js +19 -0
- package/esm/packages/core/loader/router.js +36 -0
- package/esm/packages/core/loader/service.js +13 -0
- package/esm/packages/core/paths.js +9 -0
- package/esm/packages/core/types.js +0 -0
- package/esm/packages/utils/getAllFilesInFolder.js +9 -0
- package/esm/packages/utils/getAllFnReturnValue.js +0 -0
- package/esm/packages/utils/index.js +5 -0
- package/esm/packages/utils/loadFile.js +34 -0
- package/esm/packages/utils/path.js +16 -0
- package/esm/packages/utils/runFileFn.js +45 -0
- package/fe/frontend/apps/dash/Dashboard.d.ts +6 -0
- package/fe/frontend/apps/dash/Dashboard.js +75 -0
- package/fe/frontend/apps/dash/dash.entry.d.ts +2 -0
- package/fe/frontend/apps/dash/dash.entry.js +80 -0
- package/fe/frontend/apps/dash/types.d.ts +17 -0
- package/fe/frontend/apps/dash/types.js +1 -0
- package/fe/frontend/apps/testPage/index.d.ts +3 -0
- package/fe/frontend/apps/testPage/index.js +6 -0
- package/fe/frontend/apps/testPage/testPage.entry.d.ts +2 -0
- package/fe/frontend/apps/testPage/testPage.entry.js +6 -0
- package/fe/frontend/extended/SchemaForm/data.d.ts +13 -0
- package/fe/frontend/extended/SchemaForm/data.js +8 -0
- package/fe/frontend/src/api/baseInfo.d.ts +31 -0
- package/fe/frontend/src/api/baseInfo.js +15 -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 +1 -0
- package/fe/frontend/src/common/auth/index.d.ts +7 -0
- package/fe/frontend/src/common/auth/index.js +20 -0
- package/fe/frontend/src/common/fetchErrorShow.d.ts +3 -0
- package/fe/frontend/src/common/fetchErrorShow.js +8 -0
- package/fe/frontend/src/common/generateMenuData.d.ts +4 -0
- package/fe/frontend/src/common/generateMenuData.js +12 -0
- package/fe/frontend/src/common/importComponent.d.ts +5 -0
- package/fe/frontend/src/common/importComponent.js +8 -0
- package/fe/frontend/src/common/language.d.ts +2 -0
- package/fe/frontend/src/common/language.js +9 -0
- package/fe/frontend/src/common/logFn/index.d.ts +5 -0
- package/fe/frontend/src/common/logFn/index.js +9 -0
- package/fe/frontend/src/common/menu.d.ts +34 -0
- package/fe/frontend/src/common/menu.js +101 -0
- package/fe/frontend/src/common/request.d.ts +37 -0
- package/fe/frontend/src/common/request.js +217 -0
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +8 -0
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.js +32 -0
- package/fe/frontend/src/components/AsyncSelect/index.d.ts +4 -0
- package/fe/frontend/src/components/AsyncSelect/index.js +3 -0
- package/fe/frontend/src/components/BasePage/HeaderView.d.ts +9 -0
- package/fe/frontend/src/components/BasePage/HeaderView.js +14 -0
- package/fe/frontend/src/components/Router/index.d.ts +9 -0
- package/fe/frontend/src/components/Router/index.js +11 -0
- package/fe/frontend/src/components/Router/type.d.ts +2 -0
- package/fe/frontend/src/components/Router/type.js +1 -0
- package/fe/frontend/src/defaultPages/Iframe/index.d.ts +3 -0
- package/fe/frontend/src/defaultPages/Iframe/index.js +14 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.d.ts +7 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.js +94 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.d.ts +13 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.js +124 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +44 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.js +7 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.d.ts +4 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.js +6 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.js +63 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.d.ts +11 -0
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.js +188 -0
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.d.ts +8 -0
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.js +6 -0
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.js +1 -0
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.d.ts +10 -0
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.js +14 -0
- package/fe/frontend/src/defaultPages/SchemaPage/index.css +167 -0
- package/fe/frontend/src/defaultPages/SchemaPage/index.d.ts +4 -0
- package/fe/frontend/src/defaultPages/SchemaPage/index.js +75 -0
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.d.ts +51 -0
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.js +4 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.js +3 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.js +115 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +7 -0
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.js +36 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.d.ts +10 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +38 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.js +16 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.js +17 -0
- package/fe/frontend/src/defaultPages/SlotPage/index.d.ts +3 -0
- package/fe/frontend/src/defaultPages/SlotPage/index.js +26 -0
- package/fe/frontend/src/exportStore.d.ts +17 -0
- package/fe/frontend/src/exportStore.js +16 -0
- package/fe/frontend/src/hooks/useCurrentMenuData.d.ts +19 -0
- package/fe/frontend/src/hooks/useCurrentMenuData.js +28 -0
- package/fe/frontend/src/hooks/useRouterParams.d.ts +5 -0
- package/fe/frontend/src/hooks/useRouterParams.js +11 -0
- package/fe/frontend/src/index.d.ts +16 -0
- package/fe/frontend/src/index.js +13 -0
- package/fe/frontend/src/main.css +96 -0
- package/fe/frontend/src/main.d.ts +27 -0
- package/fe/frontend/src/main.js +72 -0
- package/fe/frontend/src/stores/apiFreezer.d.ts +93 -0
- package/fe/frontend/src/stores/apiFreezer.js +49 -0
- package/fe/frontend/src/stores/mode.d.ts +19 -0
- package/fe/frontend/src/stores/mode.js +37 -0
- package/fe/frontend/src/stores/schemaEventBus.d.ts +42 -0
- package/fe/frontend/src/stores/schemaEventBus.js +70 -0
- package/fe/frontend/src/stores/schemaStore.d.ts +47 -0
- package/fe/frontend/src/stores/schemaStore.js +26 -0
- package/fe/frontend/src/typing/scalability.d.ts +47 -0
- package/fe/frontend/src/typing/scalability.js +1 -0
- package/fe/frontend/src/typing/window.d.ts +7 -0
- package/fe/frontend/src/typing/window.js +1 -0
- package/fe/model/types/data/button.d.ts +32 -0
- package/fe/model/types/data/button.js +16 -0
- package/fe/model/types/data/component.d.ts +40 -0
- package/fe/model/types/data/component.js +11 -0
- package/fe/model/types/data/fetchInfo.d.ts +20 -0
- package/fe/model/types/data/fetchInfo.js +1 -0
- package/fe/model/types/data/schema.d.ts +98 -0
- package/fe/model/types/data/schema.js +1 -0
- package/fe/model/types/data/search.d.ts +7 -0
- package/fe/model/types/data/search.js +1 -0
- package/fe/model/types/menuType.d.ts +73 -0
- package/fe/model/types/menuType.js +1 -0
- package/fe/model/types/model.d.ts +33 -0
- package/fe/model/types/model.js +1 -0
- package/fe/packages/common/array/index.d.ts +7 -0
- package/fe/packages/common/array/index.js +40 -0
- package/fe/packages/common/cache/LRUCache.d.ts +13 -0
- package/fe/packages/common/cache/LRUCache.js +47 -0
- package/fe/packages/common/cache/index.d.ts +2 -0
- package/fe/packages/common/cache/index.js +1 -0
- package/fe/packages/common/guards/index.d.ts +9 -0
- package/fe/packages/common/guards/index.js +24 -0
- package/fe/packages/common/http/index.d.ts +90 -0
- package/fe/packages/common/http/index.js +310 -0
- package/fe/packages/common/i18n/default.d.ts +92 -0
- package/fe/packages/common/i18n/default.js +90 -0
- package/fe/packages/common/i18n/en-US.d.ts +92 -0
- package/fe/packages/common/i18n/en-US.js +90 -0
- package/fe/packages/common/i18n/index.d.ts +43 -0
- package/fe/packages/common/i18n/index.js +173 -0
- package/fe/packages/common/i18n/locales.d.ts +8 -0
- package/fe/packages/common/i18n/locales.js +10 -0
- package/fe/packages/common/i18n/types.d.ts +71 -0
- package/fe/packages/common/i18n/types.js +1 -0
- package/fe/packages/common/index.d.ts +11 -0
- package/fe/packages/common/index.js +10 -0
- package/fe/packages/common/log/index.d.ts +33 -0
- package/fe/packages/common/log/index.js +176 -0
- package/fe/packages/common/number/index.d.ts +3 -0
- package/fe/packages/common/number/index.js +10 -0
- package/fe/packages/common/object/filterEmpty.d.ts +3 -0
- package/fe/packages/common/object/filterEmpty.js +33 -0
- package/fe/packages/common/object/index.d.ts +5 -0
- package/fe/packages/common/object/index.js +25 -0
- package/fe/packages/common/string/index.d.ts +4 -0
- package/fe/packages/common/string/index.js +17 -0
- package/fe/packages/common/types/index.d.ts +4 -0
- package/fe/packages/common/types/index.js +1 -0
- package/fe/packages/ui/react/assets/table/no-result.svg +5 -0
- package/fe/packages/ui/react/components/Button/Button.d.ts +58 -0
- package/fe/packages/ui/react/components/Button/Button.js +72 -0
- package/fe/packages/ui/react/components/Button/SumbitButton.d.ts +13 -0
- package/fe/packages/ui/react/components/Button/SumbitButton.js +25 -0
- package/fe/packages/ui/react/components/Button/index.d.ts +4 -0
- package/fe/packages/ui/react/components/Button/index.js +2 -0
- package/fe/packages/ui/react/components/Checkbox/Checkbox.d.ts +17 -0
- package/fe/packages/ui/react/components/Checkbox/Checkbox.js +39 -0
- package/fe/packages/ui/react/components/Checkbox/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Checkbox/index.js +1 -0
- package/fe/packages/ui/react/components/ConfirmDialog/ConfirmDialog.d.ts +20 -0
- package/fe/packages/ui/react/components/ConfirmDialog/ConfirmDialog.js +11 -0
- package/fe/packages/ui/react/components/ConfirmDialog/index.d.ts +2 -0
- package/fe/packages/ui/react/components/ConfirmDialog/index.js +1 -0
- package/fe/packages/ui/react/components/DataTable/ActionBtn.d.ts +8 -0
- package/fe/packages/ui/react/components/DataTable/ActionBtn.js +96 -0
- package/fe/packages/ui/react/components/DataTable/index.d.ts +52 -0
- package/fe/packages/ui/react/components/DataTable/index.js +187 -0
- package/fe/packages/ui/react/components/Date/Calendar.d.ts +35 -0
- package/fe/packages/ui/react/components/Date/Calendar.js +216 -0
- package/fe/packages/ui/react/components/Date/Date.d.ts +38 -0
- package/fe/packages/ui/react/components/Date/Date.js +201 -0
- package/fe/packages/ui/react/components/Date/DateTestPage.d.ts +2 -0
- package/fe/packages/ui/react/components/Date/DateTestPage.js +29 -0
- package/fe/packages/ui/react/components/Date/LocaleContext.d.ts +6 -0
- package/fe/packages/ui/react/components/Date/LocaleContext.js +8 -0
- package/fe/packages/ui/react/components/Date/LocaleProvider.d.ts +19 -0
- package/fe/packages/ui/react/components/Date/LocaleProvider.js +24 -0
- package/fe/packages/ui/react/components/Date/TimePicker.d.ts +7 -0
- package/fe/packages/ui/react/components/Date/TimePicker.js +78 -0
- package/fe/packages/ui/react/components/Date/data.d.ts +6 -0
- package/fe/packages/ui/react/components/Date/data.js +4 -0
- package/fe/packages/ui/react/components/Date/dateLocaleStore.d.ts +16 -0
- package/fe/packages/ui/react/components/Date/dateLocaleStore.js +14 -0
- package/fe/packages/ui/react/components/Date/dropdownPositioning.d.ts +3 -0
- package/fe/packages/ui/react/components/Date/dropdownPositioning.js +12 -0
- package/fe/packages/ui/react/components/Date/index.d.ts +6 -0
- package/fe/packages/ui/react/components/Date/index.js +5 -0
- package/fe/packages/ui/react/components/Date/locales.d.ts +43 -0
- package/fe/packages/ui/react/components/Date/locales.js +21 -0
- package/fe/packages/ui/react/components/Drawer/Drawer.d.ts +29 -0
- package/fe/packages/ui/react/components/Drawer/Drawer.js +100 -0
- package/fe/packages/ui/react/components/Drawer/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Drawer/index.js +1 -0
- package/fe/packages/ui/react/components/Dropdown/Dropdown.d.ts +26 -0
- package/fe/packages/ui/react/components/Dropdown/Dropdown.js +49 -0
- package/fe/packages/ui/react/components/Dropdown/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Dropdown/index.js +1 -0
- package/fe/packages/ui/react/components/Form/Form.d.ts +18 -0
- package/fe/packages/ui/react/components/Form/Form.js +8 -0
- package/fe/packages/ui/react/components/Form/FormItem.d.ts +41 -0
- package/fe/packages/ui/react/components/Form/FormItem.js +43 -0
- package/fe/packages/ui/react/components/Form/SchemaForm/data.d.ts +40 -0
- package/fe/packages/ui/react/components/Form/SchemaForm/data.js +18 -0
- package/fe/packages/ui/react/components/Form/SchemaForm/index.d.ts +153 -0
- package/fe/packages/ui/react/components/Form/SchemaForm/index.js +79 -0
- package/fe/packages/ui/react/components/Form/index.d.ts +5 -0
- package/fe/packages/ui/react/components/Form/index.js +4 -0
- package/fe/packages/ui/react/components/Form/useForm.d.ts +3 -0
- package/fe/packages/ui/react/components/Form/useForm.js +1 -0
- package/fe/packages/ui/react/components/ImagePreview/ImagePreview.d.ts +8 -0
- package/fe/packages/ui/react/components/ImagePreview/ImagePreview.js +169 -0
- package/fe/packages/ui/react/components/ImagePreview/PreviewImage.d.ts +11 -0
- package/fe/packages/ui/react/components/ImagePreview/PreviewImage.js +28 -0
- package/fe/packages/ui/react/components/ImagePreview/index.d.ts +3 -0
- package/fe/packages/ui/react/components/ImagePreview/index.js +2 -0
- package/fe/packages/ui/react/components/Input/Input.d.ts +45 -0
- package/fe/packages/ui/react/components/Input/Input.js +61 -0
- package/fe/packages/ui/react/components/Input/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Input/index.js +1 -0
- package/fe/packages/ui/react/components/InputNumber/InputNumber.d.ts +28 -0
- package/fe/packages/ui/react/components/InputNumber/InputNumber.js +144 -0
- package/fe/packages/ui/react/components/InputNumber/index.d.ts +2 -0
- package/fe/packages/ui/react/components/InputNumber/index.js +1 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.d.ts +30 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.js +63 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.d.ts +2 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.js +27 -0
- package/fe/packages/ui/react/components/Label/Label.d.ts +51 -0
- package/fe/packages/ui/react/components/Label/Label.js +35 -0
- package/fe/packages/ui/react/components/Label/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Label/index.js +2 -0
- package/fe/packages/ui/react/components/Menu/Menu.d.ts +18 -0
- package/fe/packages/ui/react/components/Menu/Menu.js +102 -0
- package/fe/packages/ui/react/components/Menu/MenuContext.d.ts +39 -0
- package/fe/packages/ui/react/components/Menu/MenuContext.js +97 -0
- package/fe/packages/ui/react/components/Menu/MenuItem.d.ts +3 -0
- package/fe/packages/ui/react/components/Menu/MenuItem.js +33 -0
- package/fe/packages/ui/react/components/Menu/SubMenu.d.ts +10 -0
- package/fe/packages/ui/react/components/Menu/SubMenu.js +169 -0
- package/fe/packages/ui/react/components/Menu/index.d.ts +9 -0
- package/fe/packages/ui/react/components/Menu/index.js +5 -0
- package/fe/packages/ui/react/components/Menu/menuTypes.d.ts +59 -0
- package/fe/packages/ui/react/components/Menu/menuTypes.js +1 -0
- package/fe/packages/ui/react/components/Menu/utils.d.ts +2 -0
- package/fe/packages/ui/react/components/Menu/utils.js +7 -0
- package/fe/packages/ui/react/components/Message/Message.d.ts +20 -0
- package/fe/packages/ui/react/components/Message/Message.js +58 -0
- package/fe/packages/ui/react/components/Message/MessageManager.d.ts +37 -0
- package/fe/packages/ui/react/components/Message/MessageManager.js +90 -0
- package/fe/packages/ui/react/components/Message/data.d.ts +2 -0
- package/fe/packages/ui/react/components/Message/data.js +1 -0
- package/fe/packages/ui/react/components/Message/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Message/index.js +1 -0
- package/fe/packages/ui/react/components/Modal/Modal.d.ts +27 -0
- package/fe/packages/ui/react/components/Modal/Modal.js +14 -0
- package/fe/packages/ui/react/components/Modal/ModalManager.d.ts +59 -0
- package/fe/packages/ui/react/components/Modal/ModalManager.js +90 -0
- package/fe/packages/ui/react/components/Modal/index.d.ts +4 -0
- package/fe/packages/ui/react/components/Modal/index.js +2 -0
- package/fe/packages/ui/react/components/Overlay/Overlay.d.ts +23 -0
- package/fe/packages/ui/react/components/Overlay/Overlay.js +53 -0
- package/fe/packages/ui/react/components/Overlay/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Overlay/index.js +1 -0
- package/fe/packages/ui/react/components/Pagination/Pagination.d.ts +18 -0
- package/fe/packages/ui/react/components/Pagination/Pagination.js +88 -0
- package/fe/packages/ui/react/components/Pagination/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Pagination/index.js +1 -0
- package/fe/packages/ui/react/components/Popup/Popup.d.ts +26 -0
- package/fe/packages/ui/react/components/Popup/Popup.js +81 -0
- package/fe/packages/ui/react/components/Popup/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Popup/index.js +1 -0
- package/fe/packages/ui/react/components/Search/Search.d.ts +17 -0
- package/fe/packages/ui/react/components/Search/Search.js +12 -0
- package/fe/packages/ui/react/components/Search/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Search/index.js +1 -0
- package/fe/packages/ui/react/components/Select/Select.d.ts +26 -0
- package/fe/packages/ui/react/components/Select/Select.js +123 -0
- package/fe/packages/ui/react/components/Select/dropdownPositioning.d.ts +3 -0
- package/fe/packages/ui/react/components/Select/dropdownPositioning.js +13 -0
- package/fe/packages/ui/react/components/Select/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Select/index.js +1 -0
- package/fe/packages/ui/react/components/Skeleton/Skeleton.d.ts +28 -0
- package/fe/packages/ui/react/components/Skeleton/Skeleton.js +31 -0
- package/fe/packages/ui/react/components/Skeleton/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Skeleton/index.js +1 -0
- package/fe/packages/ui/react/components/Switch/Switch.d.ts +11 -0
- package/fe/packages/ui/react/components/Switch/Switch.js +22 -0
- package/fe/packages/ui/react/components/Switch/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Switch/index.js +1 -0
- package/fe/packages/ui/react/components/TableSearch/TableSearch.d.ts +68 -0
- package/fe/packages/ui/react/components/TableSearch/TableSearch.js +121 -0
- package/fe/packages/ui/react/components/TableSearch/index.d.ts +2 -0
- package/fe/packages/ui/react/components/TableSearch/index.js +1 -0
- package/fe/packages/ui/react/components/TableSearch/lang.d.ts +15 -0
- package/fe/packages/ui/react/components/TableSearch/lang.js +14 -0
- package/fe/packages/ui/react/components/TableSearch/tableSearchLocaleStore.d.ts +9 -0
- package/fe/packages/ui/react/components/TableSearch/tableSearchLocaleStore.js +11 -0
- package/fe/packages/ui/react/components/Textarea/Textarea.d.ts +67 -0
- package/fe/packages/ui/react/components/Textarea/Textarea.js +37 -0
- package/fe/packages/ui/react/components/Textarea/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Textarea/index.js +1 -0
- package/fe/packages/ui/react/components/Tooltip/Tooltip.d.ts +25 -0
- package/fe/packages/ui/react/components/Tooltip/Tooltip.js +79 -0
- package/fe/packages/ui/react/components/Tooltip/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Tooltip/index.js +1 -0
- package/fe/packages/ui/react/components/TreeSelect/TreeSelect.d.ts +25 -0
- package/fe/packages/ui/react/components/TreeSelect/TreeSelect.js +160 -0
- package/fe/packages/ui/react/components/TreeSelect/index.d.ts +2 -0
- package/fe/packages/ui/react/components/TreeSelect/index.js +1 -0
- package/fe/packages/ui/react/components/Upload/ImageUpload.d.ts +9 -0
- package/fe/packages/ui/react/components/Upload/ImageUpload.js +75 -0
- package/fe/packages/ui/react/components/Upload/Upload.d.ts +41 -0
- package/fe/packages/ui/react/components/Upload/Upload.js +6 -0
- package/fe/packages/ui/react/components/Upload/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Upload/index.js +2 -0
- package/fe/packages/ui/react/components/breadcrumb/breadcrumb.d.ts +35 -0
- package/fe/packages/ui/react/components/breadcrumb/breadcrumb.js +81 -0
- package/fe/packages/ui/react/components/breadcrumb/index.d.ts +2 -0
- package/fe/packages/ui/react/components/breadcrumb/index.js +1 -0
- package/fe/packages/ui/react/components/hooks/useDropdownPositioning.d.ts +49 -0
- package/fe/packages/ui/react/components/hooks/useDropdownPositioning.js +137 -0
- package/fe/packages/ui/react/components/hooks/useInputController.d.ts +24 -0
- package/fe/packages/ui/react/components/hooks/useInputController.js +45 -0
- package/fe/packages/ui/react/components/index.d.ts +30 -0
- package/fe/packages/ui/react/components/index.js +29 -0
- package/fe/packages/ui/react/components/table/index.d.ts +2 -0
- package/fe/packages/ui/react/components/table/index.js +1 -0
- package/fe/packages/ui/react/components/table/table.d.ts +27 -0
- package/fe/packages/ui/react/components/table/table.js +116 -0
- package/fe/packages/ui/react/components/testPage/MenuTestPage.d.ts +2 -0
- package/fe/packages/ui/react/components/testPage/MenuTestPage.js +104 -0
- package/fe/packages/ui/react/components/testPage/index.d.ts +3 -0
- package/fe/packages/ui/react/components/testPage/index.js +337 -0
- package/fe/packages/ui/react/hooks/useBreadcrumb.d.ts +10 -0
- package/fe/packages/ui/react/hooks/useBreadcrumb.js +2 -0
- package/fe/packages/ui/react/hooks/useExecuteOnce.d.ts +30 -0
- package/fe/packages/ui/react/hooks/useExecuteOnce.js +57 -0
- package/fe/packages/ui/react/hooks/useInit.d.ts +3 -0
- package/fe/packages/ui/react/hooks/useInit.js +9 -0
- package/fe/packages/ui/react/hooks/useLanguage.d.ts +2 -0
- package/fe/packages/ui/react/hooks/useLanguage.js +4 -0
- package/fe/packages/ui/react/hooks/usePagination.d.ts +16 -0
- package/fe/packages/ui/react/hooks/usePagination.js +27 -0
- package/fe/packages/ui/react/hooks/useRefState.d.ts +30 -0
- package/fe/packages/ui/react/hooks/useRefState.js +29 -0
- package/fe/packages/ui/react/hooks/useWatch.d.ts +23 -0
- package/fe/packages/ui/react/hooks/useWatch.js +87 -0
- package/fe/packages/ui/react/hooks/useWatch.test.d.ts +2 -0
- package/fe/packages/ui/react/hooks/useWatch.test.js +22 -0
- package/fe/packages/ui/react/i18n/I18nProvider.d.ts +31 -0
- package/fe/packages/ui/react/i18n/I18nProvider.js +25 -0
- package/fe/packages/ui/react/i18n/index.d.ts +4 -0
- package/fe/packages/ui/react/i18n/index.js +3 -0
- package/fe/packages/ui/react/i18n/useI18n.d.ts +13 -0
- package/fe/packages/ui/react/i18n/useI18n.js +18 -0
- package/fe/packages/ui/react/index.css +238 -0
- package/fe/packages/ui/react/index.d.ts +5 -0
- package/fe/packages/ui/react/index.js +6 -0
- package/fe/packages/ui/react/lib/createStoreHook.d.ts +9 -0
- package/fe/packages/ui/react/lib/createStoreHook.js +6 -0
- package/fe/packages/ui/react/lib/export.d.ts +66 -0
- package/fe/packages/ui/react/lib/export.js +138 -0
- package/fe/packages/ui/react/lib/utils.d.ts +34 -0
- package/fe/packages/ui/react/lib/utils.js +70 -0
- package/fe/packages/ui/react/stores/breadcrumb.d.ts +15 -0
- package/fe/packages/ui/react/stores/breadcrumb.js +66 -0
- package/fe/packages/ui/react/stores/language.d.ts +4 -0
- package/fe/packages/ui/react/stores/language.js +2 -0
- package/{typings/type.d.ts → fe/packages/ui/react/types/index.d.ts} +1 -1
- package/fe/packages/ui/react/types/index.js +1 -0
- package/fe/typings/type.d.ts +5 -0
- package/fe/typings/type.js +1 -0
- package/model/index.d.ts +1 -1
- package/model/test.d.ts +1 -5
- package/model/types/data/button.d.ts +32 -0
- package/model/types/data/component.d.ts +40 -0
- package/model/types/data/fetchInfo.d.ts +20 -0
- package/model/types/data/schema.d.ts +98 -0
- package/model/types/data/search.d.ts +7 -0
- package/model/types/index.d.ts +3 -0
- package/model/types/menuType.d.ts +73 -0
- package/model/types/model.d.ts +33 -0
- package/package.json +61 -8
- package/{app → types/app}/controller/base.d.ts +4 -6
- package/types/app/controller/project.d.ts +22 -0
- package/{app → types/app}/controller/view.d.ts +1 -3
- package/{app → types/app}/data/signKey.d.ts +0 -1
- package/types/app/extend/$fetch.d.ts +8 -0
- package/types/app/extend/db.d.ts +2 -0
- package/{app → types/app}/extend/generateErrorMessage.d.ts +0 -1
- package/{app → types/app}/extend/logger.d.ts +1 -2
- package/{app → types/app}/extend/parsingParamsOnUrl.d.ts +0 -1
- package/{app → types/app}/extend/render-view.d.ts +1 -3
- package/{app → types/app}/middleware/api-params-verify.d.ts +1 -3
- package/{app → types/app}/middleware/api-sign-verify.d.ts +1 -3
- package/types/app/middleware/error-handle.d.ts +4 -0
- package/types/app/middleware/project-handler.d.ts +4 -0
- package/{app → types/app}/middleware.d.ts +0 -3
- package/{app/router/view.d.ts → types/app/router/project.d.ts} +1 -2
- package/types/app/router/view.d.ts +3 -0
- package/types/app/router-schema/project.d.ts +3 -0
- package/types/app/service/base.d.ts +9 -0
- package/types/app/service/project.d.ts +57 -0
- package/types/app/type.d.ts +5 -0
- package/types/app/typings.d.ts +43 -0
- package/types/bundler/defaultAlias.d.ts +3 -0
- package/types/bundler/dev.d.ts +1 -0
- package/types/bundler/index.d.ts +2 -0
- package/types/bundler/prod.d.ts +1 -0
- package/types/bundler/state.d.ts +18 -0
- package/types/bundler/utils.d.ts +9 -0
- package/types/config/config.default.d.ts +14 -0
- package/types/index.d.ts +28 -0
- package/types/packages/common/LRUCache.d.ts +1 -0
- package/types/packages/common/array/index.d.ts +6 -0
- package/types/packages/common/cache/LRUCache.d.ts +12 -0
- package/types/packages/common/cache/index.d.ts +1 -0
- package/types/packages/common/guards/index.d.ts +8 -0
- package/types/packages/common/http/index.d.ts +89 -0
- package/types/packages/common/i18n/default.d.ts +91 -0
- package/types/packages/common/i18n/en-US.d.ts +91 -0
- package/types/packages/common/i18n/index.d.ts +42 -0
- package/types/packages/common/i18n/locales.d.ts +7 -0
- package/types/packages/common/i18n/types.d.ts +70 -0
- package/types/packages/common/index.d.ts +10 -0
- package/types/packages/common/log/index.d.ts +32 -0
- package/types/packages/common/number/index.d.ts +2 -0
- package/types/packages/common/object/filterEmpty.d.ts +2 -0
- package/types/packages/common/object/filtereEmpty.d.ts +1 -0
- package/types/packages/common/object/index.d.ts +4 -0
- package/types/packages/common/string/index.d.ts +3 -0
- package/types/packages/common/types/index.d.ts +3 -0
- package/{packages → types/packages}/core/env.d.ts +0 -1
- package/{packages → types/packages}/core/index.d.ts +1 -2
- package/types/packages/core/loader/config.d.ts +9 -0
- package/types/packages/core/loader/controller.d.ts +17 -0
- package/types/packages/core/loader/extend.d.ts +8 -0
- package/types/packages/core/loader/middleware.d.ts +11 -0
- package/types/packages/core/loader/model.d.ts +36 -0
- package/types/packages/core/loader/router-schema.d.ts +18 -0
- package/{packages/core/loader/extend.d.ts → types/packages/core/loader/router.d.ts} +5 -1
- package/types/packages/core/loader/service.d.ts +17 -0
- package/{packages → types/packages}/core/paths.d.ts +0 -1
- package/{packages → types/packages}/core/types.d.ts +60 -9
- package/{packages → types/packages}/utils/getAllFilesInFolder.d.ts +5 -1
- package/types/packages/utils/getAllFnReturnValue.d.ts +0 -0
- package/{packages → types/packages}/utils/index.d.ts +0 -1
- package/{packages → types/packages}/utils/loadFile.d.ts +6 -1
- package/types/packages/utils/path.d.ts +24 -0
- package/types/packages/utils/runFileFn.d.ts +7 -0
- package/types/typings/type.d.ts +4 -0
- package/app/controller/base.d.ts.map +0 -1
- package/app/controller/base.js +0 -24
- package/app/controller/base.js.map +0 -1
- package/app/controller/project.d.ts +0 -12
- package/app/controller/project.d.ts.map +0 -1
- package/app/controller/project.js +0 -48
- package/app/controller/project.js.map +0 -1
- package/app/controller/view.d.ts.map +0 -1
- package/app/controller/view.js +0 -15
- package/app/controller/view.js.map +0 -1
- package/app/data/signKey.d.ts.map +0 -1
- package/app/data/signKey.js +0 -5
- package/app/data/signKey.js.map +0 -1
- package/app/extend/db.d.ts +0 -3
- package/app/extend/db.d.ts.map +0 -1
- package/app/extend/db.js +0 -8
- package/app/extend/db.js.map +0 -1
- package/app/extend/generateErrorMessage.d.ts.map +0 -1
- package/app/extend/generateErrorMessage.js +0 -12
- package/app/extend/generateErrorMessage.js.map +0 -1
- package/app/extend/logger.d.ts.map +0 -1
- package/app/extend/logger.js +0 -73
- package/app/extend/logger.js.map +0 -1
- package/app/extend/parsingParamsOnUrl.d.ts.map +0 -1
- package/app/extend/parsingParamsOnUrl.js +0 -23
- package/app/extend/parsingParamsOnUrl.js.map +0 -1
- package/app/extend/render-view.d.ts.map +0 -1
- package/app/extend/render-view.js +0 -22
- package/app/extend/render-view.js.map +0 -1
- package/app/middleware/api-params-verify.d.ts.map +0 -1
- package/app/middleware/api-params-verify.js +0 -64
- package/app/middleware/api-params-verify.js.map +0 -1
- package/app/middleware/api-sign-verify.d.ts.map +0 -1
- package/app/middleware/api-sign-verify.js +0 -29
- package/app/middleware/api-sign-verify.js.map +0 -1
- package/app/middleware/error-handle.d.ts +0 -6
- package/app/middleware/error-handle.d.ts.map +0 -1
- package/app/middleware/error-handle.js +0 -34
- package/app/middleware/error-handle.js.map +0 -1
- package/app/middleware/project-handler.d.ts +0 -5
- package/app/middleware/project-handler.d.ts.map +0 -1
- package/app/middleware/project-handler.js +0 -22
- package/app/middleware/project-handler.js.map +0 -1
- package/app/middleware.d.ts.map +0 -1
- package/app/middleware.js +0 -39
- package/app/middleware.js.map +0 -1
- package/app/router/project.d.ts +0 -5
- package/app/router/project.d.ts.map +0 -1
- package/app/router/project.js +0 -9
- package/app/router/project.js.map +0 -1
- package/app/router/view.d.ts.map +0 -1
- package/app/router/view.js +0 -6
- package/app/router/view.js.map +0 -1
- package/app/router-schema/project.d.ts +0 -4
- package/app/router-schema/project.d.ts.map +0 -1
- package/app/router-schema/project.js +0 -34
- package/app/router-schema/project.js.map +0 -1
- package/app/service/bese.d.ts +0 -11
- package/app/service/bese.d.ts.map +0 -1
- package/app/service/bese.js +0 -18
- package/app/service/bese.js.map +0 -1
- package/app/service/project.d.ts +0 -28
- package/app/service/project.d.ts.map +0 -1
- package/app/service/project.js +0 -39
- package/app/service/project.js.map +0 -1
- package/app/type.d.ts +0 -3
- package/app/type.d.ts.map +0 -1
- package/app/type.js +0 -3
- package/app/type.js.map +0 -1
- package/app/typings.d.ts +0 -52
- package/app/typings.d.ts.map +0 -1
- package/app/typings.js +0 -3
- package/app/typings.js.map +0 -1
- package/index.d.ts +0 -29
- package/index.d.ts.map +0 -1
- package/index.js +0 -22
- package/index.js.map +0 -1
- package/model/index.d.ts.map +0 -1
- package/model/index.js +0 -7
- package/model/index.js.map +0 -1
- package/model/test.d.ts.map +0 -1
- package/model/test.js +0 -6
- package/model/test.js.map +0 -1
- package/model/test2.d.ts +0 -6
- package/model/test2.d.ts.map +0 -1
- package/model/test2.js +0 -6
- package/model/test2.js.map +0 -1
- package/packages/core/env.d.ts.map +0 -1
- package/packages/core/env.js +0 -26
- package/packages/core/env.js.map +0 -1
- package/packages/core/index.d.ts.map +0 -1
- package/packages/core/index.js +0 -93
- package/packages/core/index.js.map +0 -1
- package/packages/core/loader/config.d.ts +0 -4
- package/packages/core/loader/config.d.ts.map +0 -1
- package/packages/core/loader/config.js +0 -32
- package/packages/core/loader/config.js.map +0 -1
- package/packages/core/loader/controller.d.ts +0 -4
- package/packages/core/loader/controller.d.ts.map +0 -1
- package/packages/core/loader/controller.js +0 -18
- package/packages/core/loader/controller.js.map +0 -1
- package/packages/core/loader/extend.d.ts.map +0 -1
- package/packages/core/loader/extend.js +0 -34
- package/packages/core/loader/extend.js.map +0 -1
- package/packages/core/loader/middleware.d.ts +0 -4
- package/packages/core/loader/middleware.d.ts.map +0 -1
- package/packages/core/loader/middleware.js +0 -16
- package/packages/core/loader/middleware.js.map +0 -1
- package/packages/core/loader/model.d.ts +0 -15
- package/packages/core/loader/model.d.ts.map +0 -1
- package/packages/core/loader/model.js +0 -90
- package/packages/core/loader/model.js.map +0 -1
- package/packages/core/loader/router-schema.d.ts +0 -4
- package/packages/core/loader/router-schema.d.ts.map +0 -1
- package/packages/core/loader/router-schema.js +0 -20
- package/packages/core/loader/router-schema.js.map +0 -1
- package/packages/core/loader/router.d.ts +0 -4
- package/packages/core/loader/router.d.ts.map +0 -1
- package/packages/core/loader/router.js +0 -46
- package/packages/core/loader/router.js.map +0 -1
- package/packages/core/loader/service.d.ts +0 -4
- package/packages/core/loader/service.d.ts.map +0 -1
- package/packages/core/loader/service.js +0 -17
- package/packages/core/loader/service.js.map +0 -1
- package/packages/core/paths.d.ts.map +0 -1
- package/packages/core/paths.js +0 -11
- package/packages/core/paths.js.map +0 -1
- package/packages/core/types.d.ts.map +0 -1
- package/packages/core/types.js +0 -3
- package/packages/core/types.js.map +0 -1
- package/packages/utils/getAllFilesInFolder.d.ts.map +0 -1
- package/packages/utils/getAllFilesInFolder.js +0 -46
- package/packages/utils/getAllFilesInFolder.js.map +0 -1
- package/packages/utils/getAllFnReturnValue.d.ts +0 -1
- package/packages/utils/getAllFnReturnValue.d.ts.map +0 -1
- package/packages/utils/getAllFnReturnValue.js +0 -2
- package/packages/utils/getAllFnReturnValue.js.map +0 -1
- package/packages/utils/index.d.ts.map +0 -1
- package/packages/utils/index.js +0 -21
- package/packages/utils/index.js.map +0 -1
- package/packages/utils/loadFile.d.ts.map +0 -1
- package/packages/utils/loadFile.js +0 -57
- package/packages/utils/loadFile.js.map +0 -1
- package/packages/utils/path.d.ts +0 -7
- package/packages/utils/path.d.ts.map +0 -1
- package/packages/utils/path.js +0 -51
- package/packages/utils/path.js.map +0 -1
- package/packages/utils/runFileFn.d.ts +0 -6
- package/packages/utils/runFileFn.d.ts.map +0 -1
- package/packages/utils/runFileFn.js +0 -6
- package/packages/utils/runFileFn.js.map +0 -1
- package/typings/type.d.ts.map +0 -1
- package/typings/type.js +0 -3
- package/typings/type.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useCallback, useRef, useState } from 'react';
|
|
2
|
+
import useInit from './useInit';
|
|
3
|
+
export default function usePagination(params) {
|
|
4
|
+
const initValue = {
|
|
5
|
+
...(params?.defaultValue ?? { current: 1, size: 10, total: 0 }),
|
|
6
|
+
onChange: () => { },
|
|
7
|
+
};
|
|
8
|
+
const paginationData = useRef({ ...initValue });
|
|
9
|
+
const [, changeView] = useState(0);
|
|
10
|
+
const updata = useCallback((params) => {
|
|
11
|
+
if (typeof params.current !== 'undefined') {
|
|
12
|
+
paginationData.current.current = params.current;
|
|
13
|
+
}
|
|
14
|
+
if (typeof params.size !== 'undefined') {
|
|
15
|
+
paginationData.current.size = params.size;
|
|
16
|
+
}
|
|
17
|
+
if (typeof params.total !== 'undefined') {
|
|
18
|
+
paginationData.current.total = params.total;
|
|
19
|
+
}
|
|
20
|
+
if ([params.size, params.current, params.total].some((i) => typeof i !== 'undefined'))
|
|
21
|
+
changeView((e) => e + 1);
|
|
22
|
+
}, []);
|
|
23
|
+
useInit(() => {
|
|
24
|
+
paginationData.current.onChange = updata;
|
|
25
|
+
});
|
|
26
|
+
return paginationData;
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
type SetState<S> = (value: S | ((preValue: S) => S), callback?: CallBackFN<S>) => void;
|
|
3
|
+
type CallBackFN<T> = (value: T) => void;
|
|
4
|
+
type RefState<T> = RefObject<{
|
|
5
|
+
data: T;
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @demo
|
|
10
|
+
* ```
|
|
11
|
+
const [data, setData, dataRef] = useState(0);
|
|
12
|
+
|
|
13
|
+
setData(1, (newData) => {
|
|
14
|
+
// newData 1
|
|
15
|
+
// data 0
|
|
16
|
+
})
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export default function useRefState<S>(initialState: S | (() => S)): [
|
|
20
|
+
S,
|
|
21
|
+
SetState<S>,
|
|
22
|
+
RefState<S>
|
|
23
|
+
];
|
|
24
|
+
export default function useRefState<S = undefined>(): [
|
|
25
|
+
S | undefined,
|
|
26
|
+
SetState<S | undefined>,
|
|
27
|
+
RefState<S | undefined>
|
|
28
|
+
];
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=useRefState.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useState as RUS, useCallback, useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import useInit from './useInit';
|
|
3
|
+
export default function useRefState(initialState) {
|
|
4
|
+
const [v, setValue] = RUS(initialState);
|
|
5
|
+
const data = useRef({ data: undefined });
|
|
6
|
+
const callbackRef = useRef(null);
|
|
7
|
+
const [callbackVersion, setCallbackVersion] = RUS(0);
|
|
8
|
+
useInit(() => {
|
|
9
|
+
data.current.data = v;
|
|
10
|
+
});
|
|
11
|
+
const setData = useCallback((action, callback) => {
|
|
12
|
+
const value = typeof action === 'function' ? action(data.current.data) : action;
|
|
13
|
+
setValue(value);
|
|
14
|
+
data.current.data = value;
|
|
15
|
+
if (callback) {
|
|
16
|
+
callbackRef.current = callback;
|
|
17
|
+
setCallbackVersion((version) => version + 1);
|
|
18
|
+
}
|
|
19
|
+
}, [setCallbackVersion, setValue]);
|
|
20
|
+
useLayoutEffect(() => {
|
|
21
|
+
if (callbackRef.current) {
|
|
22
|
+
const callback = callbackRef.current;
|
|
23
|
+
callbackRef.current = null;
|
|
24
|
+
callback(data.current.data);
|
|
25
|
+
}
|
|
26
|
+
}, [callbackVersion]);
|
|
27
|
+
return [v, setData, data];
|
|
28
|
+
// as [ExtractFNType<S>, SetState<S>];
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type WatchCallback<T> = (value: T, prevValue: T | undefined) => void | (() => void);
|
|
2
|
+
export type WatchCompare<T> = (value: T, prevValue: T) => boolean;
|
|
3
|
+
export type WatchCompareType = 'identity' | 'shallow';
|
|
4
|
+
export type WatchSelector<TSource, TValue> = (source: TSource) => TValue;
|
|
5
|
+
export type UseWatchOptions<T> = {
|
|
6
|
+
/**
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
immediate?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Return true when the two values should be treated as equal.
|
|
12
|
+
*
|
|
13
|
+
* @default Array values use shallow compare, other values use Object.is.
|
|
14
|
+
*/
|
|
15
|
+
compare?: WatchCompareType | WatchCompare<T>;
|
|
16
|
+
};
|
|
17
|
+
export declare const identityCompare: <T>(value: T, prevValue: T) => boolean;
|
|
18
|
+
export declare const shallowCompare: <T>(value: T, prevValue: T) => boolean;
|
|
19
|
+
export declare const defaultCompare: <T>(value: T, prevValue: T) => boolean;
|
|
20
|
+
export declare function useWatch<T>(value: T, callback: WatchCallback<T>, options?: UseWatchOptions<T>): void;
|
|
21
|
+
export declare function useWatch<TSource, TValue>(source: TSource, selector: WatchSelector<TSource, TValue>, callback: WatchCallback<TValue>, options?: UseWatchOptions<TValue>): void;
|
|
22
|
+
export default useWatch;
|
|
23
|
+
//# sourceMappingURL=useWatch.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
export const identityCompare = (value, prevValue) => Object.is(value, prevValue);
|
|
3
|
+
export const shallowCompare = (value, prevValue) => {
|
|
4
|
+
if (Object.is(value, prevValue)) {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
if (Array.isArray(value) && Array.isArray(prevValue)) {
|
|
8
|
+
if (value.length !== prevValue.length) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return value.every((item, index) => Object.is(item, prevValue[index]));
|
|
12
|
+
}
|
|
13
|
+
if (value &&
|
|
14
|
+
prevValue &&
|
|
15
|
+
typeof value === 'object' &&
|
|
16
|
+
typeof prevValue === 'object') {
|
|
17
|
+
const valuePrototype = Object.getPrototypeOf(value);
|
|
18
|
+
const prevValuePrototype = Object.getPrototypeOf(prevValue);
|
|
19
|
+
if (valuePrototype !== prevValuePrototype ||
|
|
20
|
+
(valuePrototype !== Object.prototype && valuePrototype !== null)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
const valueKeys = Object.keys(value);
|
|
24
|
+
const prevValueKeys = Object.keys(prevValue);
|
|
25
|
+
if (valueKeys.length !== prevValueKeys.length) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return valueKeys.every((key) => Object.prototype.hasOwnProperty.call(prevValue, key) &&
|
|
29
|
+
Object.is(value[key], prevValue[key]));
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
};
|
|
33
|
+
export const defaultCompare = (value, prevValue) => {
|
|
34
|
+
if (Array.isArray(value) && Array.isArray(prevValue)) {
|
|
35
|
+
return shallowCompare(value, prevValue);
|
|
36
|
+
}
|
|
37
|
+
return identityCompare(value, prevValue);
|
|
38
|
+
};
|
|
39
|
+
const getCompare = (compare) => {
|
|
40
|
+
if (compare === 'identity') {
|
|
41
|
+
return identityCompare;
|
|
42
|
+
}
|
|
43
|
+
if (compare === 'shallow') {
|
|
44
|
+
return shallowCompare;
|
|
45
|
+
}
|
|
46
|
+
return compare ?? defaultCompare;
|
|
47
|
+
};
|
|
48
|
+
const useStableWatchValue = (value, compare) => {
|
|
49
|
+
const valueRef = useRef(value);
|
|
50
|
+
if (!compare(value, valueRef.current)) {
|
|
51
|
+
valueRef.current = value;
|
|
52
|
+
}
|
|
53
|
+
return valueRef.current;
|
|
54
|
+
};
|
|
55
|
+
export function useWatch(source, selectorOrCallback, callbackOrOptions, options) {
|
|
56
|
+
const hasSelector = typeof callbackOrOptions === 'function';
|
|
57
|
+
const selector = hasSelector ? selectorOrCallback : null;
|
|
58
|
+
const callback = hasSelector
|
|
59
|
+
? callbackOrOptions
|
|
60
|
+
: selectorOrCallback;
|
|
61
|
+
const watchOptions = hasSelector ? options : callbackOrOptions;
|
|
62
|
+
const nextValue = selector ? selector(source) : source;
|
|
63
|
+
const stableValue = useStableWatchValue(nextValue, getCompare(watchOptions?.compare));
|
|
64
|
+
const isInit = useRef(false);
|
|
65
|
+
const valueRef = useRef(stableValue);
|
|
66
|
+
const callbackRef = useRef(callback);
|
|
67
|
+
const optionsRef = useRef(watchOptions);
|
|
68
|
+
callbackRef.current = callback;
|
|
69
|
+
optionsRef.current = watchOptions;
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (!isInit.current) {
|
|
72
|
+
isInit.current = true;
|
|
73
|
+
valueRef.current = stableValue;
|
|
74
|
+
if (optionsRef.current?.immediate) {
|
|
75
|
+
return callbackRef.current(stableValue, undefined);
|
|
76
|
+
}
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const prevValue = valueRef.current;
|
|
80
|
+
if (Object.is(stableValue, prevValue)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
valueRef.current = stableValue;
|
|
84
|
+
return callbackRef.current(stableValue, prevValue);
|
|
85
|
+
}, [stableValue]);
|
|
86
|
+
}
|
|
87
|
+
export default useWatch;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import test from 'node:test';
|
|
3
|
+
import { defaultCompare, identityCompare, shallowCompare } from './useWatch';
|
|
4
|
+
test('defaultCompare treats inline arrays with the same items as equal', () => {
|
|
5
|
+
assert.equal(defaultCompare([1, 'a'], [1, 'a']), true);
|
|
6
|
+
});
|
|
7
|
+
test('defaultCompare detects changed array items', () => {
|
|
8
|
+
assert.equal(defaultCompare([1, 'a'], [1, 'b']), false);
|
|
9
|
+
});
|
|
10
|
+
test('defaultCompare uses identity for object values', () => {
|
|
11
|
+
assert.equal(defaultCompare({ current: 1 }, { current: 1 }), false);
|
|
12
|
+
});
|
|
13
|
+
test('identityCompare detects changed array references', () => {
|
|
14
|
+
assert.equal(identityCompare([1, 2], [1, 2]), false);
|
|
15
|
+
});
|
|
16
|
+
test('shallowCompare supports selector array results', () => {
|
|
17
|
+
assert.equal(shallowCompare([1, 10], [1, 10]), true);
|
|
18
|
+
assert.equal(shallowCompare([1, 10], [2, 10]), false);
|
|
19
|
+
});
|
|
20
|
+
test('shallowCompare does not treat non-plain objects as equal by empty keys', () => {
|
|
21
|
+
assert.equal(shallowCompare(new Date(0), new Date(0)), false);
|
|
22
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { I18nLanguage, I18nResources } from '../../../common/i18n';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export interface I18nProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* 外部控制的显示语言。
|
|
6
|
+
*/
|
|
7
|
+
language?: I18nLanguage;
|
|
8
|
+
/**
|
|
9
|
+
* 未命中当前语言文案时的兜底语言。
|
|
10
|
+
*/
|
|
11
|
+
fallbackLanguage?: I18nLanguage;
|
|
12
|
+
/**
|
|
13
|
+
* 业务侧注入的多语言资源。
|
|
14
|
+
*/
|
|
15
|
+
resources?: I18nResources;
|
|
16
|
+
/**
|
|
17
|
+
* 是否把传入 resources 和现有 resources 合并。默认 true。
|
|
18
|
+
*/
|
|
19
|
+
mergeResources?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 是否把 language 写入 localStorage。默认 true。
|
|
22
|
+
*/
|
|
23
|
+
persist?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* localStorage key。
|
|
26
|
+
*/
|
|
27
|
+
storageKey?: string;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare function I18nProvider({ language, fallbackLanguage, resources, mergeResources, persist, storageKey, children, }: I18nProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=I18nProvider.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { defaultLanguage, languageLocalKey } from '../../../common/i18n';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useI18nStore } from './useI18n';
|
|
5
|
+
export function I18nProvider({ language = defaultLanguage, fallbackLanguage = defaultLanguage, resources, mergeResources = true, persist = true, storageKey = languageLocalKey, children, }) {
|
|
6
|
+
const configureI18n = useI18nStore((state) => state.configureI18n);
|
|
7
|
+
const setLanguage = useI18nStore((state) => state.setLanguage);
|
|
8
|
+
const setFallbackLanguage = useI18nStore((state) => state.setFallbackLanguage);
|
|
9
|
+
const setResources = useI18nStore((state) => state.setResources);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
configureI18n({ persist, storageKey });
|
|
12
|
+
}, [configureI18n, persist, storageKey]);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setLanguage(language);
|
|
15
|
+
}, [language, setLanguage]);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setFallbackLanguage(fallbackLanguage);
|
|
18
|
+
}, [fallbackLanguage, setFallbackLanguage]);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (!resources)
|
|
21
|
+
return;
|
|
22
|
+
setResources(resources, { merge: mergeResources });
|
|
23
|
+
}, [mergeResources, resources, setResources]);
|
|
24
|
+
return _jsx(_Fragment, { children: children });
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { I18nInterpolationValues, I18nTranslateOptions } from '../../../common/i18n';
|
|
2
|
+
export declare const useI18nStore: import("..").StoreHook<{
|
|
3
|
+
getState: () => import("..").I18nStore;
|
|
4
|
+
getInitialState: () => import("..").I18nStore;
|
|
5
|
+
setState: (partial: Partial<import("..").I18nStore> | ((state: import("..").I18nStore) => Partial<import("..").I18nStore>)) => void;
|
|
6
|
+
subscribe: (listener: import("..").I18nStoreListener) => () => void;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* React 组件内使用的翻译 hook。
|
|
10
|
+
* 会订阅 language、fallbackLanguage、resources,语言或资源变化时触发组件更新。
|
|
11
|
+
*/
|
|
12
|
+
export declare function useI18n(): <T = string>(key: string, fillingData?: I18nInterpolationValues, options?: I18nTranslateOptions) => string | T;
|
|
13
|
+
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { i18nStore, translate } from '../../../common/i18n';
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { createStoreHook } from '../lib/createStoreHook';
|
|
4
|
+
export const useI18nStore = createStoreHook(i18nStore);
|
|
5
|
+
/**
|
|
6
|
+
* React 组件内使用的翻译 hook。
|
|
7
|
+
* 会订阅 language、fallbackLanguage、resources,语言或资源变化时触发组件更新。
|
|
8
|
+
*/
|
|
9
|
+
export function useI18n() {
|
|
10
|
+
const language = useI18nStore((state) => state.language);
|
|
11
|
+
const fallbackLanguage = useI18nStore((state) => state.fallbackLanguage);
|
|
12
|
+
const resources = useI18nStore((state) => state.resources);
|
|
13
|
+
return useCallback((key, fillingData, options) => translate({
|
|
14
|
+
language,
|
|
15
|
+
fallbackLanguage,
|
|
16
|
+
resources,
|
|
17
|
+
}, key, fillingData, options), [fallbackLanguage, language, resources]);
|
|
18
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
/* 内容扫描 */
|
|
4
|
+
/* baseComponents */
|
|
5
|
+
@source "./**/*.{js,ts,jsx,tsx}";
|
|
6
|
+
|
|
7
|
+
/* 暗色模式变体 */
|
|
8
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
9
|
+
|
|
10
|
+
/* 主题配置 */
|
|
11
|
+
@theme {
|
|
12
|
+
/* 圆角 */
|
|
13
|
+
--radius-lg: var(--radius);
|
|
14
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
15
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
16
|
+
|
|
17
|
+
/* 颜色 */
|
|
18
|
+
--color-background: hsl(var(--background));
|
|
19
|
+
--color-foreground: hsl(var(--foreground));
|
|
20
|
+
|
|
21
|
+
--color-card: hsl(var(--card));
|
|
22
|
+
--color-card-foreground: hsl(var(--card-foreground));
|
|
23
|
+
|
|
24
|
+
--color-popover: hsl(var(--popover));
|
|
25
|
+
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
26
|
+
|
|
27
|
+
--color-primary: hsl(var(--primary));
|
|
28
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
29
|
+
|
|
30
|
+
--color-secondary: hsl(var(--secondary));
|
|
31
|
+
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
32
|
+
|
|
33
|
+
--color-muted: hsl(var(--muted));
|
|
34
|
+
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
35
|
+
|
|
36
|
+
--color-accent: hsl(var(--accent));
|
|
37
|
+
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
38
|
+
|
|
39
|
+
--color-destructive: hsl(var(--destructive));
|
|
40
|
+
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
41
|
+
|
|
42
|
+
--color-border: hsl(var(--border));
|
|
43
|
+
--color-input: hsl(var(--input));
|
|
44
|
+
--color-ring: hsl(var(--ring));
|
|
45
|
+
|
|
46
|
+
--color-chart-1: hsl(var(--chart-1));
|
|
47
|
+
--color-chart-2: hsl(var(--chart-2));
|
|
48
|
+
--color-chart-3: hsl(var(--chart-3));
|
|
49
|
+
--color-chart-4: hsl(var(--chart-4));
|
|
50
|
+
--color-chart-5: hsl(var(--chart-5));
|
|
51
|
+
|
|
52
|
+
/* 主题色 - 与 @layer base 中的 CSS 变量对应 */
|
|
53
|
+
--color-theme: hsl(var(--theme-primary));
|
|
54
|
+
--color-theme-foreground: hsl(var(--theme-primary-foreground));
|
|
55
|
+
--color-theme-bg: hsl(var(--theme-bg));
|
|
56
|
+
--color-theme-text: hsl(var(--theme-text));
|
|
57
|
+
|
|
58
|
+
/* 表格颜色 */
|
|
59
|
+
--color-table-header: hsl(var(--table-header-bg));
|
|
60
|
+
--color-table-header-text: hsl(var(--table-header-text));
|
|
61
|
+
--color-table-head-text: hsl(var(--table-head-text));
|
|
62
|
+
--color-table-cell-text: hsl(var(--table-cell-text));
|
|
63
|
+
--color-table-action: hsl(var(--table-action-bg));
|
|
64
|
+
--color-table-action-text: hsl(var(--table-action-text));
|
|
65
|
+
|
|
66
|
+
/* 面包屑颜色 */
|
|
67
|
+
--color-breadcrumb-text: hsl(var(--breadcrumb-text));
|
|
68
|
+
--color-breadcrumb-border: hsl(var(--breadcrumb-border));
|
|
69
|
+
--color-breadcrumb-active-text: hsl(var(--breadcrumb-active-text));
|
|
70
|
+
--color-breadcrumb-active-bg: hsl(var(--breadcrumb-active-bg));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* CSS 变量定义 */
|
|
74
|
+
:root {
|
|
75
|
+
--background: 0 0% 100%;
|
|
76
|
+
--foreground: 240 10% 3.9%;
|
|
77
|
+
--card: 0 0% 100%;
|
|
78
|
+
--card-foreground: 240 10% 3.9%;
|
|
79
|
+
--popover: 0 0% 100%;
|
|
80
|
+
--popover-foreground: 240 10% 3.9%;
|
|
81
|
+
--primary: 240 5.9% 10%;
|
|
82
|
+
--primary-foreground: 0 0% 98%;
|
|
83
|
+
--secondary: 240 4.8% 95.9%;
|
|
84
|
+
--secondary-foreground: 240 5.9% 10%;
|
|
85
|
+
--muted: 240 4.8% 95.9%;
|
|
86
|
+
--muted-foreground: 240 3.8% 46.1%;
|
|
87
|
+
--accent: 240 4.8% 95.9%;
|
|
88
|
+
--accent-foreground: 240 5.9% 10%;
|
|
89
|
+
--destructive: 0 84.2% 60.2%;
|
|
90
|
+
--destructive-foreground: 0 0% 98%;
|
|
91
|
+
--border: 240 5.9% 90%;
|
|
92
|
+
--input: 240 5.9% 90%;
|
|
93
|
+
--ring: 240 5.9% 10%;
|
|
94
|
+
--radius: 0.5rem;
|
|
95
|
+
--chart-1: 12 76% 61%;
|
|
96
|
+
--chart-2: 173 58% 39%;
|
|
97
|
+
--chart-3: 197 37% 24%;
|
|
98
|
+
--chart-4: 43 74% 66%;
|
|
99
|
+
--chart-5: 27 87% 67%;
|
|
100
|
+
|
|
101
|
+
/* 主题色 - 默认亮色中性主题 */
|
|
102
|
+
--theme-primary: 0 0% 0%;
|
|
103
|
+
--theme-primary-foreground: 0 0% 100%;
|
|
104
|
+
--theme-bg: 210 20% 98%;
|
|
105
|
+
--theme-text: 222 47% 11%;
|
|
106
|
+
|
|
107
|
+
/* 表格颜色 - 默认亮色中性主题 */
|
|
108
|
+
--table-header-bg: 220 14% 96%;
|
|
109
|
+
--table-header-text: 220 9% 46%;
|
|
110
|
+
--table-head-text: 217 19% 27%;
|
|
111
|
+
--table-cell-text: 180 4% 16%;
|
|
112
|
+
--table-action-bg: 220 13% 91%;
|
|
113
|
+
--table-action-text: 0 0% 0%;
|
|
114
|
+
|
|
115
|
+
/* 面包屑颜色 - 默认亮色中性主题 */
|
|
116
|
+
--breadcrumb-text: 220 10% 46%;
|
|
117
|
+
--breadcrumb-border: 0 0% 88%;
|
|
118
|
+
--breadcrumb-active-text: 0 0% 100%;
|
|
119
|
+
--breadcrumb-active-bg: 0 0% 0%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* 绿色主题 */
|
|
123
|
+
[data-theme='green'] {
|
|
124
|
+
--theme-primary: 142 76% 36%;
|
|
125
|
+
--theme-primary-foreground: 0 0% 100%;
|
|
126
|
+
--theme-bg: 120 25% 93%;
|
|
127
|
+
--theme-text: 141 48% 13%;
|
|
128
|
+
|
|
129
|
+
--table-header-bg: 0 0% 88%;
|
|
130
|
+
--table-header-text: 120 4% 16%;
|
|
131
|
+
--table-head-text: 120 4% 16%;
|
|
132
|
+
--table-cell-text: 120 4% 16%;
|
|
133
|
+
--table-action-bg: 120 25% 93% / 0.8;
|
|
134
|
+
--table-action-text: 141 48% 13%;
|
|
135
|
+
|
|
136
|
+
--breadcrumb-text: 0 0% 27%;
|
|
137
|
+
--breadcrumb-border: 0 0% 88%;
|
|
138
|
+
--breadcrumb-active-text: 141 48% 13%;
|
|
139
|
+
--breadcrumb-active-bg: 140 96% 72%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* 暗色模式 */
|
|
143
|
+
.dark {
|
|
144
|
+
--background: 240 10% 8%;
|
|
145
|
+
--foreground: 0 0% 95%;
|
|
146
|
+
--card: 240 10% 8%;
|
|
147
|
+
--card-foreground: 0 0% 95%;
|
|
148
|
+
--popover: 240 10% 8%;
|
|
149
|
+
--popover-foreground: 0 0% 95%;
|
|
150
|
+
--primary: 0 0% 95%;
|
|
151
|
+
--primary-foreground: 240 5% 15%;
|
|
152
|
+
--secondary: 240 6% 20%;
|
|
153
|
+
--secondary-foreground: 0 0% 95%;
|
|
154
|
+
--muted: 240 6% 20%;
|
|
155
|
+
--muted-foreground: 240 5% 75%;
|
|
156
|
+
--accent: 240 6% 20%;
|
|
157
|
+
--accent-foreground: 0 0% 95%;
|
|
158
|
+
--destructive: 0 70% 40%;
|
|
159
|
+
--destructive-foreground: 0 0% 98%;
|
|
160
|
+
--border: 240 6% 20%;
|
|
161
|
+
--input: 240 6% 20%;
|
|
162
|
+
--ring: 240 4.9% 83.9%;
|
|
163
|
+
--chart-1: 220 70% 50%;
|
|
164
|
+
--chart-2: 160 60% 45%;
|
|
165
|
+
--chart-3: 30 80% 55%;
|
|
166
|
+
--chart-4: 280 65% 60%;
|
|
167
|
+
--chart-5: 340 75% 55%;
|
|
168
|
+
|
|
169
|
+
/* 主题色调整 */
|
|
170
|
+
--theme-primary: 0 0% 92%;
|
|
171
|
+
--theme-primary-foreground: 240 10% 10%;
|
|
172
|
+
--theme-bg: 240 8% 12%;
|
|
173
|
+
--theme-text: 0 0% 95%;
|
|
174
|
+
|
|
175
|
+
/* 表格颜色优化 */
|
|
176
|
+
--table-header-bg: 240 5% 18%;
|
|
177
|
+
--table-header-text: 240 5% 75%;
|
|
178
|
+
--table-head-text: 240 5% 85%;
|
|
179
|
+
--table-cell-text: 0 0% 90%;
|
|
180
|
+
--table-action-bg: 240 5% 22%;
|
|
181
|
+
--table-action-text: 0 0% 95%;
|
|
182
|
+
|
|
183
|
+
/* 面包屑颜色优化 */
|
|
184
|
+
--breadcrumb-text: 240 5% 72%;
|
|
185
|
+
--breadcrumb-border: 240 4% 24%;
|
|
186
|
+
--breadcrumb-active-text: 240 10% 10%;
|
|
187
|
+
--breadcrumb-active-bg: 0 0% 92%;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.dark[data-theme='green'],
|
|
191
|
+
.dark [data-theme='green'] {
|
|
192
|
+
--theme-primary: 142 68% 46%;
|
|
193
|
+
--theme-primary-foreground: 0 0% 100%;
|
|
194
|
+
--theme-bg: 145 22% 14%;
|
|
195
|
+
--theme-text: 140 30% 92%;
|
|
196
|
+
|
|
197
|
+
--table-header-bg: 145 18% 18%;
|
|
198
|
+
--table-header-text: 142 20% 72%;
|
|
199
|
+
--table-head-text: 140 24% 88%;
|
|
200
|
+
--table-cell-text: 140 18% 90%;
|
|
201
|
+
--table-action-bg: 145 16% 22%;
|
|
202
|
+
--table-action-text: 140 24% 88%;
|
|
203
|
+
|
|
204
|
+
--breadcrumb-text: 142 16% 72%;
|
|
205
|
+
--breadcrumb-border: 145 12% 26%;
|
|
206
|
+
--breadcrumb-active-text: 0 0% 100%;
|
|
207
|
+
--breadcrumb-active-bg: 142 68% 46%;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* 中间态主题 */
|
|
211
|
+
[data-theme='gray'] {
|
|
212
|
+
--theme-primary: 220 9% 38%;
|
|
213
|
+
--theme-primary-foreground: 0 0% 100%;
|
|
214
|
+
--theme-bg: 220 16% 92%;
|
|
215
|
+
--theme-text: 222 20% 22%;
|
|
216
|
+
|
|
217
|
+
--table-header-bg: 220 12% 90%;
|
|
218
|
+
--table-header-text: 220 9% 38%;
|
|
219
|
+
--table-head-text: 220 15% 24%;
|
|
220
|
+
--table-cell-text: 220 10% 22%;
|
|
221
|
+
--table-action-bg: 220 11% 86%;
|
|
222
|
+
--table-action-text: 220 15% 24%;
|
|
223
|
+
|
|
224
|
+
--breadcrumb-text: 220 10% 40%;
|
|
225
|
+
--breadcrumb-border: 220 10% 82%;
|
|
226
|
+
--breadcrumb-active-text: 0 0% 100%;
|
|
227
|
+
--breadcrumb-active-bg: 220 9% 38%;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* 全局样式 */
|
|
231
|
+
* {
|
|
232
|
+
border-color: hsl(var(--border));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
body {
|
|
236
|
+
background-color: hsl(var(--background));
|
|
237
|
+
color: hsl(var(--foreground));
|
|
238
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExtractState, StoreApi } from 'zustand/vanilla';
|
|
2
|
+
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
|
|
3
|
+
export type StoreHook<TStore extends ReadonlyStoreApi<unknown>> = {
|
|
4
|
+
(): ExtractState<TStore>;
|
|
5
|
+
<T>(selector: (state: ExtractState<TStore>) => T): T;
|
|
6
|
+
};
|
|
7
|
+
export declare function createStoreHook<TStore extends ReadonlyStoreApi<unknown>>(store: TStore): StoreHook<TStore>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=createStoreHook.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 导出 Excel 工具方法
|
|
3
|
+
*
|
|
4
|
+
* 功能:
|
|
5
|
+
* - 支持导出「当前页」或「当前查询条件下的全部页数据」
|
|
6
|
+
* - 通过 DataTable 的 columns 控制导出列及顺序
|
|
7
|
+
*
|
|
8
|
+
* 使用方式(示例):
|
|
9
|
+
* ```ts
|
|
10
|
+
* await exportToExcel({
|
|
11
|
+
* fetchData: (pageNum, pageSize) => getWithdrawList({ ...searchParams, pageNum, pageSize }),
|
|
12
|
+
* columns, // 直接复用 DataTable 的 columns
|
|
13
|
+
* exportType: 'all', // 'all' 导出全部页;'current' 仅导出当前页
|
|
14
|
+
* currentPage,
|
|
15
|
+
* pageSize,
|
|
16
|
+
* total,
|
|
17
|
+
* currentPageData: tableData, // 可选,导出当前页时直接使用现有数据,避免重复请求
|
|
18
|
+
* fileName: '提币记录',
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
import { type TableColumnDef } from '../components';
|
|
23
|
+
export declare const ExportType: {
|
|
24
|
+
/**
|
|
25
|
+
* 当前查询条件下所有页
|
|
26
|
+
*/
|
|
27
|
+
readonly all: 0;
|
|
28
|
+
/**
|
|
29
|
+
* 当前页
|
|
30
|
+
*/
|
|
31
|
+
readonly current: 1;
|
|
32
|
+
};
|
|
33
|
+
export type ExportType = (typeof ExportType)[keyof typeof ExportType];
|
|
34
|
+
interface ExportExcelParams<T> {
|
|
35
|
+
/** 获取数据方法 */
|
|
36
|
+
fetchData: (pageNum: number, pageSize: number, searchParams?: Record<string, any>) => Promise<{
|
|
37
|
+
records: T[];
|
|
38
|
+
total: number;
|
|
39
|
+
}>;
|
|
40
|
+
/** 直接复用 DataTable 的 columns 配置 会自动过滤 操作栏*/
|
|
41
|
+
columns: TableColumnDef<T>[];
|
|
42
|
+
/** 导出类型:all=当前查询条件下所有页;current=当前页 */
|
|
43
|
+
exportType: ExportType;
|
|
44
|
+
/** 当前页码(导出当前页时使用)默认 1 */
|
|
45
|
+
currentPage?: number;
|
|
46
|
+
/** 每页条数,默认 2000 */
|
|
47
|
+
pageSize?: number;
|
|
48
|
+
/**
|
|
49
|
+
* 最大导出条数,超过则停止继续请求
|
|
50
|
+
* @default 10000
|
|
51
|
+
*/
|
|
52
|
+
maxCount?: number;
|
|
53
|
+
/**
|
|
54
|
+
* 当前页已有数据
|
|
55
|
+
* - 当 exportType === 'current' 且传入该字段时,将直接使用该数据,不会再次请求接口
|
|
56
|
+
*/
|
|
57
|
+
currentPageData?: T[];
|
|
58
|
+
/** 文件名(不含扩展名),默认:export-YYYYMMDDHHmmss */
|
|
59
|
+
fileName?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 通用导出 Excel 方法
|
|
63
|
+
*/
|
|
64
|
+
export declare function exportToExcel<T>(options: ExportExcelParams<T>): Promise<void>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=export.d.ts.map
|