@_tc/template-core 0.1.16 → 0.2.0-bate.0
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 +9 -2
- package/.skills/tc-component-usage-skills/reference/component-api.md +6 -3
- package/.skills/tc-component-usage-skills/reference/patterns.md +3 -3
- package/.skills/tc-component-usage-skills/reference/template-core-frontend.md +3 -1
- package/.skills/tc-generator/SKILL.md +1 -1
- package/.skills/tc-generator/reference/example.md +4 -0
- package/.skills/tc-generator/reference/project-template/config/config.default.js +4 -0
- package/.skills/tc-generator/reference/project-template/model/product/project/default.js +2 -0
- package/.skills/tc-generator/reference/runtime-extensions.md +110 -0
- package/AGENT_README.md +632 -0
- package/README.md +443 -37
- package/cjs/app/controller/project.js +1 -1
- package/cjs/app/controller/view.js +1 -1
- package/cjs/app/extend/crypto.js +1 -0
- package/cjs/app/extend/render-view.js +1 -1
- package/cjs/app/middleware.js +1 -1
- package/cjs/app/middlewares/api-params-verify.js +1 -0
- package/cjs/app/middlewares/api-sign-verify.js +1 -0
- package/cjs/app/{middleware → middlewares}/error-handle.js +1 -1
- package/cjs/app/middlewares/project-handler.js +1 -0
- package/cjs/app/middlewares/request-parameter-parsing.js +1 -0
- package/cjs/app/router/project.js +1 -1
- package/cjs/app/view/entry.tpl +19 -0
- package/cjs/bundler/buildBE.js +1 -0
- package/cjs/bundler/defaultRouteGuard.js +1 -0
- package/cjs/bundler/index.js +1 -1
- package/cjs/bundler/utils.js +3 -1
- package/cjs/config/config.default.js +1 -1
- package/cjs/packages/core/env.js +1 -1
- package/cjs/packages/core/index.js +1 -1
- package/cjs/packages/core/loader/middleware.js +1 -1
- package/cjs/packages/core/loader/router.js +1 -1
- 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/app/controller/project.js +7 -2
- package/esm/app/controller/view.js +21 -18
- package/esm/app/extend/crypto.js +31 -0
- package/esm/app/extend/render-view.js +5 -3
- package/esm/app/middleware.js +7 -2
- package/esm/app/{middleware → middlewares}/api-params-verify.js +2 -2
- package/esm/app/{middleware → middlewares}/api-sign-verify.js +2 -2
- package/esm/app/{middleware → middlewares}/error-handle.js +2 -2
- package/esm/app/middlewares/project-handler.js +15 -0
- package/esm/app/middlewares/request-parameter-parsing.js +18 -0
- package/esm/app/router/project.js +2 -2
- package/esm/app/view/entry.tpl +19 -0
- package/esm/bundler/buildBE.js +54 -0
- package/esm/bundler/defaultRouteGuard.js +4 -0
- package/esm/bundler/index.js +11 -14
- package/esm/bundler/utils.js +103 -60
- package/esm/config/config.default.js +4 -0
- package/esm/packages/core/env.js +1 -1
- package/esm/packages/core/index.js +37 -33
- package/esm/packages/core/loader/middleware.js +1 -1
- package/esm/packages/core/loader/router.js +5 -2
- 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/frontend/apps/dash/Dashboard.d.ts +0 -1
- package/fe/frontend/apps/dash/Dashboard.js +178 -169
- package/fe/frontend/apps/dash/dash.entry.d.ts +0 -1
- package/fe/frontend/apps/dash/dash.entry.js +58 -78
- package/fe/frontend/apps/dash/types.d.ts +16 -14
- package/fe/frontend/apps/dash/types.js +0 -1
- package/fe/frontend/apps/ui-components/index.d.ts +0 -1
- package/fe/frontend/apps/ui-components/index.js +7 -7
- package/fe/frontend/apps/ui-components/ui-components.entry.d.ts +0 -1
- package/fe/frontend/apps/ui-components/ui-components.entry.js +7 -5
- package/fe/frontend/extended/SchemaForm/data.d.ts +1 -5
- package/fe/frontend/extended/SchemaForm/data.js +7 -7
- package/fe/frontend/src/api/baseInfo.d.ts +1 -2
- package/fe/frontend/src/api/baseInfo.js +12 -13
- package/fe/frontend/src/common/CRUD/CRUD.d.ts +2 -3
- package/fe/frontend/src/common/CRUD/CRUD.js +2 -2
- package/fe/frontend/src/common/CRUD/index.d.ts +1 -2
- package/fe/frontend/src/common/CRUD/index.js +2 -1
- package/fe/frontend/src/common/auth/index.d.ts +6 -2
- package/fe/frontend/src/common/auth/index.js +23 -16
- package/fe/frontend/src/common/fetchErrorShow.d.ts +1 -2
- package/fe/frontend/src/common/fetchErrorShow.js +10 -8
- package/fe/frontend/src/common/generateMenuData.d.ts +2 -3
- package/fe/frontend/src/common/generateMenuData.js +15 -12
- package/fe/frontend/src/common/importComponent.d.ts +1 -2
- package/fe/frontend/src/common/importComponent.js +21 -9
- package/fe/frontend/src/common/language.d.ts +1 -2
- package/fe/frontend/src/common/language.js +11 -10
- package/fe/frontend/src/common/logFn/index.d.ts +0 -1
- package/fe/frontend/src/common/logFn/index.js +11 -8
- package/fe/frontend/src/common/menu.d.ts +1 -14
- package/fe/frontend/src/common/menu.js +94 -98
- package/fe/frontend/src/common/request.d.ts +2 -6
- package/fe/frontend/src/common/request.js +159 -195
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +3 -4
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.js +35 -31
- package/fe/frontend/src/components/AsyncSelect/index.d.ts +2 -3
- package/fe/frontend/src/components/AsyncSelect/index.js +5 -3
- package/fe/frontend/src/components/BasePage/HeaderView.d.ts +1 -2
- package/fe/frontend/src/components/BasePage/HeaderView.js +53 -17
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.d.ts +14 -5
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.js +80 -31
- package/fe/frontend/src/components/LanguageSwitch/index.d.ts +2 -3
- package/fe/frontend/src/components/LanguageSwitch/index.js +5 -3
- package/fe/frontend/src/components/Router/index.d.ts +2 -3
- package/fe/frontend/src/components/Router/index.js +20 -10
- package/fe/frontend/src/components/Router/type.d.ts +0 -1
- package/fe/frontend/src/components/Router/type.js +0 -1
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.d.ts +0 -1
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.js +83 -55
- package/fe/frontend/src/components/ThemeSwitch/index.d.ts +2 -3
- package/fe/frontend/src/components/ThemeSwitch/index.js +5 -3
- package/fe/frontend/src/components/index.d.ts +10 -11
- package/fe/frontend/src/components/index.js +7 -10
- package/fe/frontend/src/defaultPages/Iframe/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/Iframe/index.js +14 -7
- package/fe/frontend/src/defaultPages/NotFoundPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/NotFoundPage/index.js +27 -6
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.js +97 -90
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.js +116 -127
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +2 -18
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.js +9 -6
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.js +8 -5
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.js +60 -61
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.d.ts +2 -3
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.js +199 -186
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.js +8 -5
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.js +4 -1
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.js +16 -13
- package/fe/frontend/src/defaultPages/SchemaPage/index.css +1 -26
- package/fe/frontend/src/defaultPages/SchemaPage/index.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/index.js +89 -76
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.d.ts +4 -14
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.js +7 -4
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.js +6 -3
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.js +63 -112
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +1 -5
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.js +116 -165
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.d.ts +2 -3
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +54 -37
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.js +20 -16
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.js +20 -16
- package/fe/frontend/src/defaultPages/SlotPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SlotPage/index.js +21 -26
- package/fe/frontend/src/exportStore.d.ts +4 -17
- package/fe/frontend/src/exportStore.js +5 -16
- package/fe/frontend/src/hooks/useCurrentMenuData.d.ts +1 -10
- package/fe/frontend/src/hooks/useCurrentMenuData.js +28 -26
- package/fe/frontend/src/hooks/useRouterParams.d.ts +0 -1
- package/fe/frontend/src/hooks/useRouterParams.js +15 -10
- package/fe/frontend/src/index.d.ts +13 -21
- package/fe/frontend/src/index.js +20 -18
- package/fe/frontend/src/language/en-US.d.ts +0 -1
- package/fe/frontend/src/language/en-US.js +89 -88
- package/fe/frontend/src/language/index.d.ts +1 -2
- package/fe/frontend/src/language/index.js +77 -74
- package/fe/frontend/src/language/zh-CN.d.ts +0 -1
- package/fe/frontend/src/language/zh-CN.js +89 -88
- package/fe/frontend/src/main.css +1 -1
- package/fe/frontend/src/main.d.ts +13 -20
- package/fe/frontend/src/main.js +75 -70
- package/fe/frontend/src/stores/apiFreezer.d.ts +1 -68
- package/fe/frontend/src/stores/apiFreezer.js +50 -46
- package/fe/frontend/src/stores/mode.d.ts +2 -6
- package/fe/frontend/src/stores/mode.js +35 -36
- package/fe/frontend/src/stores/schemaEventBus.d.ts +1 -21
- package/fe/frontend/src/stores/schemaEventBus.js +52 -69
- package/fe/frontend/src/stores/schemaStore.d.ts +5 -20
- package/fe/frontend/src/stores/schemaStore.js +27 -25
- package/fe/frontend/src/typing/scalability.d.ts +3 -35
- package/fe/frontend/src/typing/scalability.js +0 -1
- package/fe/frontend/src/typing/window.d.ts +0 -1
- package/fe/frontend/src/typing/window.js +0 -1
- package/fe/model/types/data/button.d.ts +2 -12
- package/fe/model/types/data/component.d.ts +4 -14
- package/fe/model/types/data/fetchInfo.d.ts +0 -13
- package/fe/model/types/data/schema.d.ts +6 -58
- package/fe/model/types/data/search.d.ts +1 -2
- package/{model → fe/model}/types/index.d.ts +2 -3
- package/fe/model/types/menuType.d.ts +0 -30
- package/fe/model/types/model.d.ts +1 -15
- package/fe/packages/common/LRUCache.d.ts +1 -0
- package/fe/packages/common/array/index.d.ts +0 -1
- package/fe/packages/common/cache/LRUCache.d.ts +0 -1
- package/fe/packages/common/cache/LRUCache.js +43 -47
- package/fe/packages/common/cache/index.d.ts +0 -1
- package/fe/packages/common/guards/index.d.ts +0 -1
- package/fe/packages/common/guards/index.js +8 -24
- package/fe/packages/common/http/index.d.ts +0 -1
- package/fe/packages/common/http/index.js +272 -282
- package/fe/packages/common/i18n/default.d.ts +0 -6
- package/fe/packages/common/i18n/default.js +91 -88
- package/fe/packages/common/i18n/en-US.d.ts +0 -6
- package/fe/packages/common/i18n/en-US.js +91 -88
- package/fe/packages/common/i18n/index.d.ts +3 -28
- package/fe/packages/common/i18n/index.js +142 -153
- package/fe/packages/common/i18n/locales.d.ts +3 -4
- package/fe/packages/common/i18n/locales.js +10 -9
- package/fe/packages/common/i18n/types.d.ts +0 -25
- package/fe/packages/common/index.d.ts +0 -1
- package/fe/packages/common/log/index.d.ts +0 -1
- package/fe/packages/common/number/index.d.ts +0 -1
- package/fe/packages/common/object/filterEmpty.d.ts +0 -1
- package/fe/packages/common/object/filterEmpty.js +25 -30
- package/fe/packages/common/object/filtereEmpty.d.ts +1 -0
- package/fe/packages/common/object/index.d.ts +0 -1
- package/fe/packages/common/string/index.d.ts +0 -1
- package/fe/packages/common/types/index.d.ts +0 -1
- package/fe/packages/{ui/react → react}/hooks/useBreadcrumb.d.ts +3 -4
- package/fe/packages/react/hooks/useBreadcrumb.js +5 -0
- package/fe/packages/react/hooks/useExecuteOnce.d.ts +11 -0
- package/fe/packages/react/hooks/useExecuteOnce.js +47 -0
- package/fe/packages/{ui/react → react}/hooks/useInit.d.ts +0 -1
- package/fe/packages/react/hooks/useInit.js +11 -0
- package/fe/packages/react/hooks/useLanguage.d.ts +1 -0
- package/fe/packages/react/hooks/useLanguage.js +8 -0
- package/fe/packages/{ui/react → react}/hooks/usePagination.d.ts +0 -1
- package/fe/packages/react/hooks/usePagination.js +30 -0
- package/fe/packages/{ui/react → react}/hooks/useRefState.d.ts +1 -14
- package/fe/packages/react/hooks/useRefState.js +35 -0
- package/fe/packages/{ui/react → react}/hooks/useWatch.d.ts +0 -9
- 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 -35
- package/fe/packages/react/ui/components/Button/Button.js +88 -0
- package/fe/packages/{ui/react → react/ui}/components/Button/SubmitButton.d.ts +2 -7
- package/fe/packages/react/ui/components/Button/SubmitButton.js +30 -0
- package/fe/packages/react/ui/components/Button/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Button/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Card/Card.d.ts +1 -6
- package/fe/packages/react/ui/components/Card/Card.js +31 -0
- package/fe/packages/react/ui/components/Card/index.d.ts +1 -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 -2
- package/fe/packages/react/ui/components/Checkbox/Checkbox.js +52 -0
- package/fe/packages/react/ui/components/Checkbox/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Checkbox/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/ConfirmDialog/ConfirmDialog.d.ts +0 -9
- package/fe/packages/react/ui/components/ConfirmDialog/ConfirmDialog.js +41 -0
- package/fe/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -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 -2
- package/fe/packages/react/ui/components/DataTable/ActionBtn.js +116 -0
- package/fe/packages/{ui/react → react/ui}/components/DataTable/index.d.ts +8 -28
- package/fe/packages/react/ui/components/DataTable/index.js +235 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/Calendar.d.ts +2 -16
- package/fe/packages/react/ui/components/Date/Calendar.js +351 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/Date.d.ts +0 -12
- package/fe/packages/react/ui/components/Date/Date.js +210 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/DateTestPage.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/DateTestPage.js +340 -0
- package/fe/packages/react/ui/components/Date/LocaleContext.d.ts +1 -0
- package/fe/packages/react/ui/components/Date/LocaleContext.js +11 -0
- package/fe/packages/react/ui/components/Date/LocaleProvider.d.ts +7 -0
- package/fe/packages/react/ui/components/Date/LocaleProvider.js +31 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/TimePicker.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/TimePicker.js +136 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/data.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/data.js +7 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/dateLocaleStore.d.ts +1 -8
- package/fe/packages/react/ui/components/Date/dateLocaleStore.js +14 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.js +12 -0
- package/fe/packages/react/ui/components/Date/index.d.ts +5 -0
- package/fe/packages/react/ui/components/Date/index.js +6 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/locales.d.ts +0 -20
- package/fe/packages/react/ui/components/Date/locales.js +25 -0
- package/fe/packages/{ui/react → react/ui}/components/Drawer/Drawer.d.ts +1 -8
- package/fe/packages/react/ui/components/Drawer/Drawer.js +151 -0
- package/fe/packages/react/ui/components/Drawer/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Drawer/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Dropdown/Dropdown.d.ts +2 -4
- package/fe/packages/react/ui/components/Dropdown/Dropdown.js +105 -0
- package/fe/packages/react/ui/components/Dropdown/index.d.ts +1 -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 -9
- package/fe/packages/react/ui/components/Form/Form.js +15 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/FormItem.d.ts +3 -25
- 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 -9
- package/fe/packages/react/ui/components/Form/SchemaForm/data.js +16 -0
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.d.ts +3 -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 -103
- package/fe/packages/react/ui/components/Form/SchemaForm/index.js +119 -0
- package/fe/packages/react/ui/components/Form/index.d.ts +4 -0
- package/fe/packages/react/ui/components/Form/index.js +5 -0
- package/fe/packages/react/ui/components/Form/useForm.d.ts +2 -0
- package/fe/packages/react/ui/components/Form/useForm.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/ImagePreview/ImagePreview.d.ts +0 -1
- package/fe/packages/react/ui/components/ImagePreview/ImagePreview.js +307 -0
- package/fe/packages/{ui/react → react/ui}/components/ImagePreview/PreviewImage.d.ts +2 -6
- package/fe/packages/react/ui/components/ImagePreview/PreviewImage.js +56 -0
- package/fe/packages/react/ui/components/ImagePreview/index.d.ts +2 -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 -24
- package/fe/packages/react/ui/components/Input/Input.js +142 -0
- package/fe/packages/react/ui/components/Input/index.d.ts +1 -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 -5
- package/fe/packages/react/ui/components/InputNumber/InputNumber.js +207 -0
- package/fe/packages/react/ui/components/InputNumber/index.d.ts +1 -0
- package/fe/packages/react/ui/components/InputNumber/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/InputNumber/inputNumberUtils.d.ts +0 -1
- 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 -31
- package/fe/packages/react/ui/components/Label/Label.js +58 -0
- package/fe/packages/react/ui/components/Label/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Label/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Layout/Layout.d.ts +1 -2
- package/fe/packages/react/ui/components/Layout/Layout.js +33 -0
- package/fe/packages/react/ui/components/Layout/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Layout/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Loading/Loading.d.ts +1 -13
- package/fe/packages/react/ui/components/Loading/Loading.js +48 -0
- package/fe/packages/react/ui/components/Loading/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Loading/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/Menu.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/Menu.js +147 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/MenuContext.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/MenuContext.js +88 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/MenuItem.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/MenuItem.js +78 -0
- package/fe/packages/react/ui/components/Menu/SubMenu.d.ts +2 -0
- package/fe/packages/react/ui/components/Menu/SubMenu.js +207 -0
- package/fe/packages/react/ui/components/Menu/index.d.ts +8 -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 -3
- package/fe/packages/react/ui/components/Menu/menuTypes.js +0 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/utils.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/utils.js +8 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/Message.d.ts +1 -9
- package/fe/packages/react/ui/components/Message/Message.js +76 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/MessageManager.d.ts +2 -3
- package/fe/packages/react/ui/components/Message/MessageManager.js +104 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/data.d.ts +0 -1
- package/fe/packages/react/ui/components/Message/data.js +4 -0
- package/fe/packages/react/ui/components/Message/index.d.ts +2 -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 -8
- package/fe/packages/react/ui/components/Modal/Modal.js +59 -0
- package/fe/packages/{ui/react → react/ui}/components/Modal/ModalManager.d.ts +3 -16
- package/fe/packages/react/ui/components/Modal/ModalManager.js +106 -0
- package/fe/packages/react/ui/components/Modal/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Modal/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Notification/Notification.d.ts +1 -2
- package/fe/packages/react/ui/components/Notification/Notification.js +56 -0
- package/fe/packages/react/ui/components/Notification/index.d.ts +1 -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 -5
- package/fe/packages/react/ui/components/Overlay/Overlay.js +61 -0
- package/fe/packages/react/ui/components/Overlay/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Overlay/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Pagination/Pagination.d.ts +0 -8
- package/fe/packages/react/ui/components/Pagination/Pagination.js +115 -0
- package/fe/packages/react/ui/components/Pagination/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Pagination/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Popup/Popup.d.ts +0 -1
- package/fe/packages/react/ui/components/Popup/Popup.js +86 -0
- package/fe/packages/react/ui/components/Popup/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Popup/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Radio/Radio.d.ts +1 -2
- package/fe/packages/react/ui/components/Radio/Radio.js +36 -0
- package/fe/packages/{ui/react → react/ui}/components/Radio/RadioGroup.d.ts +1 -2
- package/fe/packages/react/ui/components/Radio/RadioGroup.js +33 -0
- package/fe/packages/react/ui/components/Radio/index.d.ts +2 -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 -8
- package/fe/packages/react/ui/components/Search/Search.js +24 -0
- package/fe/packages/react/ui/components/Search/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Search/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Select/Select.d.ts +2 -7
- package/fe/packages/react/ui/components/Select/Select.js +282 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.js +16 -0
- package/fe/packages/react/ui/components/Select/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Select/index.js +2 -0
- package/fe/packages/react/ui/components/Skeleton/Skeleton.d.ts +12 -0
- package/fe/packages/react/ui/components/Skeleton/Skeleton.js +101 -0
- package/fe/packages/react/ui/components/Skeleton/index.d.ts +2 -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 -2
- package/fe/packages/react/ui/components/Switch/Switch.js +28 -0
- package/fe/packages/react/ui/components/Switch/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Switch/index.js +2 -0
- package/fe/packages/react/ui/components/TableSearch/TableSearch.d.ts +30 -0
- package/fe/packages/react/ui/components/TableSearch/TableSearch.js +146 -0
- package/fe/packages/react/ui/components/TableSearch/index.d.ts +2 -0
- package/fe/packages/react/ui/components/TableSearch/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/lang.d.ts +0 -1
- package/fe/packages/react/ui/components/TableSearch/lang.js +14 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/tableSearchLocaleStore.d.ts +1 -2
- package/fe/packages/react/ui/components/TableSearch/tableSearchLocaleStore.js +10 -0
- package/fe/packages/{ui/react → react/ui}/components/Tabs/Tabs.d.ts +1 -2
- package/fe/packages/react/ui/components/Tabs/Tabs.js +33 -0
- package/fe/packages/react/ui/components/Tabs/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Tabs/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Textarea/Textarea.d.ts +0 -47
- package/fe/packages/react/ui/components/Textarea/Textarea.js +58 -0
- package/fe/packages/react/ui/components/Textarea/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Textarea/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Tooltip/Tooltip.d.ts +0 -17
- package/fe/packages/react/ui/components/Tooltip/Tooltip.js +77 -0
- package/fe/packages/react/ui/components/Tooltip/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Tooltip/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/TreeSelect/TreeSelect.d.ts +0 -7
- package/fe/packages/react/ui/components/TreeSelect/TreeSelect.js +190 -0
- package/fe/packages/react/ui/components/TreeSelect/index.d.ts +1 -0
- package/fe/packages/react/ui/components/TreeSelect/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Upload/ImageUpload.d.ts +0 -1
- package/fe/packages/react/ui/components/Upload/ImageUpload.js +101 -0
- package/fe/packages/react/ui/components/Upload/Upload.d.ts +13 -0
- package/fe/packages/react/ui/components/Upload/Upload.js +29 -0
- package/fe/packages/react/ui/components/Upload/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Upload/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/breadcrumb/breadcrumb.d.ts +0 -1
- package/fe/packages/react/ui/components/breadcrumb/breadcrumb.js +155 -0
- package/fe/packages/react/ui/components/breadcrumb/index.d.ts +1 -0
- package/fe/packages/react/ui/components/breadcrumb/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/hooks/useDropdownPositioning.d.ts +0 -7
- package/fe/packages/react/ui/components/hooks/useDropdownPositioning.js +121 -0
- package/fe/packages/{ui/react → react/ui}/components/hooks/useInputController.d.ts +0 -4
- package/fe/packages/react/ui/components/hooks/useInputController.js +39 -0
- package/fe/packages/react/ui/components/index.d.ts +35 -0
- package/fe/packages/react/ui/components/index.js +81 -0
- package/fe/packages/react/ui/components/table/index.d.ts +1 -0
- package/fe/packages/react/ui/components/table/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/table/table.d.ts +1 -2
- package/fe/packages/react/ui/components/table/table.js +166 -0
- package/fe/packages/{ui/react → react/ui}/components/testPage/MenuTestPage.d.ts +0 -1
- package/fe/packages/react/ui/components/testPage/MenuTestPage.js +397 -0
- package/fe/packages/{ui/react → react/ui}/components/testPage/index.d.ts +0 -1
- package/fe/packages/react/ui/components/testPage/index.js +1638 -0
- package/fe/packages/react/ui/i18n/I18nProvider.d.ts +12 -0
- package/fe/packages/react/ui/i18n/I18nProvider.js +38 -0
- package/fe/packages/react/ui/i18n/index.d.ts +3 -0
- package/fe/packages/react/ui/i18n/index.js +7 -0
- package/fe/packages/react/ui/i18n/useI18n.d.ts +8 -0
- package/fe/packages/react/ui/i18n/useI18n.js +25 -0
- package/fe/packages/react/ui/index.d.ts +4 -0
- package/fe/packages/react/ui/index.js +58 -0
- package/fe/packages/{ui/react → react/ui}/lib/createStoreHook.d.ts +1 -2
- package/fe/packages/react/ui/lib/createStoreHook.js +9 -0
- package/fe/packages/react/ui/lib/export.d.ts +21 -0
- package/fe/packages/react/ui/lib/export.js +112 -0
- package/fe/packages/react/ui/lib/utils.d.ts +9 -0
- package/fe/packages/react/ui/lib/utils.js +64 -0
- package/fe/packages/{ui/react → react/ui}/stores/breadcrumb.d.ts +1 -2
- package/fe/packages/react/ui/stores/breadcrumb.js +52 -0
- package/fe/packages/react/ui/stores/language.d.ts +3 -0
- package/fe/packages/react/ui/stores/language.js +4 -0
- package/fe/packages/{ui/react → react/ui}/types/index.d.ts +0 -1
- package/fe/packages/react/ui/types/index.js +0 -0
- package/fe/typings/type.d.ts +0 -1
- package/model/frontend/extended/SchemaForm/data.d.ts +9 -0
- package/model/frontend/src/common/auth/index.d.ts +11 -0
- package/model/frontend/src/common/fetchErrorShow.d.ts +2 -0
- package/model/frontend/src/common/language.d.ts +2 -0
- package/model/frontend/src/common/logFn/index.d.ts +4 -0
- package/model/frontend/src/common/request.d.ts +33 -0
- package/model/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +7 -0
- package/model/frontend/src/components/AsyncSelect/index.d.ts +3 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.d.ts +6 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.d.ts +12 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +28 -0
- package/model/frontend/src/defaultPages/SchemaPage/data/eventInfo.d.ts +7 -0
- package/model/frontend/src/defaultPages/SchemaPage/data/index.d.ts +2 -0
- package/model/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.d.ts +9 -0
- package/model/frontend/src/defaultPages/SchemaPage/schemaType.d.ts +41 -0
- package/model/frontend/src/defaultPages/SchemaPage/utils/permissions.d.ts +2 -0
- package/model/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +7 -0
- package/model/frontend/src/language/en-US.d.ts +88 -0
- package/model/frontend/src/language/index.d.ts +72 -0
- package/model/frontend/src/language/zh-CN.d.ts +88 -0
- package/model/frontend/src/stores/apiFreezer.d.ts +26 -0
- package/model/frontend/src/stores/schemaEventBus.d.ts +22 -0
- package/model/frontend/src/stores/schemaStore.d.ts +32 -0
- package/model/frontend/src/typing/scalability.d.ts +15 -0
- package/model/frontend/src/typing/window.d.ts +8 -0
- package/model/{index.d.ts → model/index.d.ts} +1 -2
- package/model/{types → model/types}/data/button.d.ts +2 -12
- package/model/{types → model/types}/data/component.d.ts +4 -14
- package/model/model/types/data/fetchInfo.d.ts +7 -0
- package/model/model/types/data/schema.d.ts +46 -0
- package/model/{types → model/types}/data/search.d.ts +1 -2
- package/model/model/types/index.d.ts +2 -0
- package/model/{types → model/types}/menuType.d.ts +0 -30
- package/model/{types → model/types}/model.d.ts +1 -15
- package/model/packages/common/array/index.d.ts +6 -0
- package/model/packages/common/cache/LRUCache.d.ts +12 -0
- package/model/packages/common/guards/index.d.ts +8 -0
- package/model/packages/common/http/index.d.ts +89 -0
- package/model/packages/common/i18n/default.d.ts +86 -0
- package/model/packages/common/i18n/en-US.d.ts +86 -0
- package/model/packages/common/i18n/index.d.ts +18 -0
- package/model/packages/common/i18n/locales.d.ts +7 -0
- package/model/packages/common/i18n/types.d.ts +46 -0
- package/model/packages/common/log/index.d.ts +32 -0
- package/model/packages/common/number/index.d.ts +2 -0
- package/model/packages/common/object/filterEmpty.d.ts +2 -0
- package/model/packages/common/object/index.d.ts +4 -0
- package/model/packages/common/string/index.d.ts +3 -0
- package/model/packages/common/types/index.d.ts +3 -0
- package/model/packages/react/hooks/useBreadcrumb.d.ts +9 -0
- package/model/packages/react/hooks/useExecuteOnce.d.ts +11 -0
- package/model/packages/react/hooks/useLanguage.d.ts +1 -0
- package/model/packages/react/ui/components/Button/Button.d.ts +24 -0
- package/model/packages/react/ui/components/Button/SubmitButton.d.ts +8 -0
- package/model/packages/react/ui/components/Button/index.d.ts +3 -0
- package/model/packages/react/ui/components/Card/Card.d.ts +10 -0
- package/model/packages/react/ui/components/Card/index.d.ts +1 -0
- package/model/packages/react/ui/components/Checkbox/Checkbox.d.ts +16 -0
- package/model/packages/react/ui/components/Checkbox/index.d.ts +1 -0
- package/model/packages/react/ui/components/ConfirmDialog/ConfirmDialog.d.ts +11 -0
- package/model/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -0
- package/model/packages/react/ui/components/DataTable/ActionBtn.d.ts +7 -0
- package/model/packages/react/ui/components/DataTable/index.d.ts +32 -0
- package/model/packages/react/ui/components/Date/Calendar.d.ts +21 -0
- package/model/packages/react/ui/components/Date/Date.d.ts +26 -0
- package/model/packages/react/ui/components/Date/LocaleContext.d.ts +1 -0
- package/model/packages/react/ui/components/Date/LocaleProvider.d.ts +7 -0
- package/model/packages/react/ui/components/Date/TimePicker.d.ts +6 -0
- package/model/packages/react/ui/components/Date/data.d.ts +5 -0
- package/model/packages/react/ui/components/Date/dateLocaleStore.d.ts +9 -0
- package/model/packages/react/ui/components/Date/dropdownPositioning.d.ts +2 -0
- package/model/packages/react/ui/components/Date/index.d.ts +5 -0
- package/model/packages/react/ui/components/Date/locales.d.ts +23 -0
- package/model/packages/react/ui/components/Drawer/Drawer.d.ts +22 -0
- package/model/packages/react/ui/components/Drawer/index.d.ts +2 -0
- package/model/packages/react/ui/components/Dropdown/Dropdown.d.ts +24 -0
- package/model/packages/react/ui/components/Dropdown/index.d.ts +1 -0
- package/model/packages/react/ui/components/Form/Form.d.ts +11 -0
- package/model/packages/react/ui/components/Form/FormItem.d.ts +19 -0
- package/model/packages/react/ui/components/Form/SchemaForm/data.d.ts +39 -0
- package/model/packages/react/ui/components/Form/SchemaForm/index.d.ts +59 -0
- package/model/packages/react/ui/components/Form/index.d.ts +4 -0
- package/model/packages/react/ui/components/Form/useForm.d.ts +2 -0
- package/model/packages/react/ui/components/ImagePreview/ImagePreview.d.ts +7 -0
- package/model/packages/react/ui/components/ImagePreview/PreviewImage.d.ts +7 -0
- package/model/packages/react/ui/components/ImagePreview/index.d.ts +2 -0
- package/model/packages/react/ui/components/Input/Input.d.ts +22 -0
- package/model/packages/react/ui/components/Input/index.d.ts +1 -0
- package/model/packages/react/ui/components/InputNumber/InputNumber.d.ts +25 -0
- package/model/packages/react/ui/components/InputNumber/index.d.ts +1 -0
- package/model/packages/react/ui/components/InputNumber/inputNumberUtils.d.ts +29 -0
- package/model/packages/react/ui/components/Label/Label.d.ts +21 -0
- package/model/packages/react/ui/components/Label/index.d.ts +2 -0
- package/model/packages/react/ui/components/Layout/Layout.d.ts +10 -0
- package/model/packages/react/ui/components/Layout/index.d.ts +1 -0
- package/model/packages/react/ui/components/Loading/Loading.d.ts +13 -0
- package/model/packages/react/ui/components/Loading/index.d.ts +1 -0
- package/model/packages/react/ui/components/Menu/Menu.d.ts +17 -0
- package/model/packages/react/ui/components/Menu/MenuContext.d.ts +38 -0
- package/model/packages/react/ui/components/Menu/MenuItem.d.ts +2 -0
- package/model/packages/react/ui/components/Menu/SubMenu.d.ts +2 -0
- package/model/packages/react/ui/components/Menu/index.d.ts +8 -0
- package/model/packages/react/ui/components/Menu/menuTypes.d.ts +57 -0
- package/model/packages/react/ui/components/Menu/utils.d.ts +1 -0
- package/model/packages/react/ui/components/Message/Message.d.ts +12 -0
- package/model/packages/react/ui/components/Message/MessageManager.d.ts +36 -0
- package/model/packages/react/ui/components/Message/data.d.ts +1 -0
- package/model/packages/react/ui/components/Message/index.d.ts +2 -0
- package/model/packages/react/ui/components/Modal/Modal.d.ts +20 -0
- package/model/packages/react/ui/components/Modal/ModalManager.d.ts +46 -0
- package/model/packages/react/ui/components/Modal/index.d.ts +3 -0
- package/model/packages/react/ui/components/Notification/Notification.d.ts +13 -0
- package/model/packages/react/ui/components/Notification/index.d.ts +1 -0
- package/model/packages/react/ui/components/Overlay/Overlay.d.ts +19 -0
- package/model/packages/react/ui/components/Overlay/index.d.ts +2 -0
- package/model/packages/react/ui/components/Pagination/Pagination.d.ts +10 -0
- package/model/packages/react/ui/components/Pagination/index.d.ts +1 -0
- package/model/packages/react/ui/components/Popup/Popup.d.ts +25 -0
- package/model/packages/react/ui/components/Popup/index.d.ts +1 -0
- package/model/packages/react/ui/components/Radio/Radio.d.ts +8 -0
- package/model/packages/react/ui/components/Radio/RadioGroup.d.ts +18 -0
- package/model/packages/react/ui/components/Radio/index.d.ts +2 -0
- package/model/packages/react/ui/components/Search/Search.d.ts +13 -0
- package/model/packages/react/ui/components/Search/index.d.ts +1 -0
- package/model/packages/react/ui/components/Select/Select.d.ts +21 -0
- package/model/packages/react/ui/components/Select/dropdownPositioning.d.ts +2 -0
- package/model/packages/react/ui/components/Select/index.d.ts +1 -0
- package/model/packages/react/ui/components/Skeleton/Skeleton.d.ts +12 -0
- package/model/packages/react/ui/components/Skeleton/index.d.ts +2 -0
- package/model/packages/react/ui/components/Switch/Switch.d.ts +10 -0
- package/model/packages/react/ui/components/Switch/index.d.ts +1 -0
- package/model/packages/react/ui/components/TableSearch/TableSearch.d.ts +30 -0
- package/model/packages/react/ui/components/TableSearch/index.d.ts +2 -0
- package/model/packages/react/ui/components/TableSearch/lang.d.ts +14 -0
- package/model/packages/react/ui/components/TableSearch/tableSearchLocaleStore.d.ts +8 -0
- package/model/packages/react/ui/components/Tabs/Tabs.d.ts +15 -0
- package/model/packages/react/ui/components/Tabs/index.d.ts +1 -0
- package/model/packages/react/ui/components/Textarea/Textarea.d.ts +20 -0
- package/model/packages/react/ui/components/Textarea/index.d.ts +1 -0
- package/model/packages/react/ui/components/Tooltip/Tooltip.d.ts +8 -0
- package/model/packages/react/ui/components/Tooltip/index.d.ts +1 -0
- package/model/packages/react/ui/components/TreeSelect/TreeSelect.d.ts +18 -0
- package/model/packages/react/ui/components/TreeSelect/index.d.ts +1 -0
- package/model/packages/react/ui/components/Upload/ImageUpload.d.ts +8 -0
- package/model/packages/react/ui/components/Upload/Upload.d.ts +13 -0
- package/model/packages/react/ui/components/Upload/index.d.ts +2 -0
- package/model/packages/react/ui/components/breadcrumb/breadcrumb.d.ts +34 -0
- package/model/packages/react/ui/components/breadcrumb/index.d.ts +1 -0
- package/model/packages/react/ui/components/hooks/useDropdownPositioning.d.ts +42 -0
- package/model/packages/react/ui/components/hooks/useInputController.d.ts +20 -0
- package/model/packages/react/ui/components/index.d.ts +35 -0
- package/model/packages/react/ui/components/table/index.d.ts +1 -0
- package/model/packages/react/ui/components/table/table.d.ts +29 -0
- package/model/packages/react/ui/i18n/I18nProvider.d.ts +12 -0
- package/model/packages/react/ui/i18n/index.d.ts +3 -0
- package/model/packages/react/ui/i18n/useI18n.d.ts +8 -0
- package/model/packages/react/ui/index.d.ts +4 -0
- package/model/packages/react/ui/lib/createStoreHook.d.ts +8 -0
- package/model/packages/react/ui/lib/export.d.ts +21 -0
- package/model/packages/react/ui/lib/utils.d.ts +9 -0
- package/model/packages/react/ui/stores/breadcrumb.d.ts +14 -0
- package/model/packages/react/ui/stores/language.d.ts +3 -0
- package/model/packages/react/ui/types/index.d.ts +1 -0
- package/model/typings/type.d.ts +4 -0
- package/package.json +24 -9
- package/types/app/controller/view.d.ts +2 -1
- package/types/app/extend/crypto.d.ts +64 -0
- package/types/app/extend/render-view.d.ts +2 -1
- package/types/app/middlewares/project-handler.d.ts +4 -0
- package/types/app/middlewares/request-parameter-parsing.d.ts +7 -0
- package/types/app/router/project.d.ts +1 -1
- package/types/app/type.d.ts +30 -1
- package/types/app/typings.d.ts +3 -0
- package/types/bundler/buildBE.d.ts +13 -0
- package/types/bundler/defaultRouteGuard.d.ts +2 -0
- package/types/bundler/index.d.ts +3 -1
- package/types/config/config.default.d.ts +27 -1
- package/types/index.d.ts +2 -1
- package/types/packages/core/loader/config.d.ts +1 -1
- package/types/packages/core/loader/middleware.d.ts +1 -1
- package/types/packages/core/types.d.ts +7 -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/cjs/app/middleware/api-params-verify.js +0 -1
- package/cjs/app/middleware/api-sign-verify.js +0 -1
- package/cjs/app/middleware/project-handler.js +0 -1
- package/esm/app/middleware/project-handler.js +0 -15
- package/fe/model/types/data/button.js +0 -16
- package/fe/model/types/data/component.js +0 -11
- 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/i18n/types.js +0 -1
- 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 -73
- package/fe/packages/ui/react/components/Button/SubmitButton.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/Card/Card.js +0 -12
- package/fe/packages/ui/react/components/Card/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Card/index.js +0 -1
- 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 -96
- package/fe/packages/ui/react/components/DataTable/index.js +0 -191
- 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.d.ts +0 -6
- package/fe/packages/ui/react/components/Date/LocaleContext.js +0 -8
- package/fe/packages/ui/react/components/Date/LocaleProvider.d.ts +0 -19
- 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 -109
- 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 -89
- 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 -171
- 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.d.ts +0 -2
- 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/Layout/Layout.js +0 -8
- package/fe/packages/ui/react/components/Layout/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Layout/index.js +0 -1
- package/fe/packages/ui/react/components/Loading/Loading.js +0 -21
- package/fe/packages/ui/react/components/Loading/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Loading/index.js +0 -1
- package/fe/packages/ui/react/components/Menu/Menu.js +0 -110
- 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.d.ts +0 -10
- 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/Notification/Notification.js +0 -29
- package/fe/packages/ui/react/components/Notification/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Notification/index.js +0 -1
- 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 -96
- 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/Radio/Radio.js +0 -20
- package/fe/packages/ui/react/components/Radio/RadioGroup.js +0 -21
- package/fe/packages/ui/react/components/Radio/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Radio/index.js +0 -2
- package/fe/packages/ui/react/components/Search/Search.js +0 -8
- 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 -220
- 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.d.ts +0 -28
- 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.d.ts +0 -68
- package/fe/packages/ui/react/components/TableSearch/TableSearch.js +0 -121
- package/fe/packages/ui/react/components/TableSearch/index.d.ts +0 -3
- 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/Tabs/Tabs.js +0 -19
- package/fe/packages/ui/react/components/Tabs/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Tabs/index.js +0 -1
- 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.d.ts +0 -41
- package/fe/packages/ui/react/components/Upload/Upload.js +0 -7
- 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 -44
- package/fe/packages/ui/react/components/index.d.ts +0 -36
- package/fe/packages/ui/react/components/index.js +0 -35
- 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 -116
- package/fe/packages/ui/react/components/testPage/MenuTestPage.js +0 -104
- package/fe/packages/ui/react/components/testPage/index.js +0 -475
- package/fe/packages/ui/react/hooks/useBreadcrumb.js +0 -2
- package/fe/packages/ui/react/hooks/useExecuteOnce.d.ts +0 -30
- 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.d.ts +0 -2
- package/fe/packages/ui/react/hooks/useWatch.test.js +0 -22
- package/fe/packages/ui/react/i18n/I18nProvider.d.ts +0 -31
- 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.d.ts +0 -66
- package/fe/packages/ui/react/lib/export.js +0 -138
- package/fe/packages/ui/react/lib/utils.d.ts +0 -34
- 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/model/test.d.ts +0 -2
- package/model/types/data/fetchInfo.d.ts +0 -20
- package/model/types/data/schema.d.ts +0 -98
- package/types/app/middleware/project-handler.d.ts +0 -4
- /package/fe/packages/{ui/react → react/ui}/assets/table/no-result.svg +0 -0
- /package/fe/packages/{ui/react → react/ui}/index.css +0 -0
- /package/{fe/model/types/data/fetchInfo.js → model/model/test.d.ts} +0 -0
- /package/{fe/packages/common/cache/index.js → model/packages/common/cache/index.d.ts} +0 -0
- /package/{fe/packages/common/index.js → model/packages/common/index.d.ts} +0 -0
- /package/types/app/{middleware → middlewares}/api-params-verify.d.ts +0 -0
- /package/types/app/{middleware → middlewares}/api-sign-verify.d.ts +0 -0
- /package/types/app/{middleware → middlewares}/error-handle.d.ts +0 -0
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Breadcrumb, BreadcrumbItem, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, ConfirmDialog, DataTable, Drawer, Dropdown, Form, FormItem, ImageUpload, Input, InputNumber, Label, Layout, Loading, message, Modal, modal, Notification, Pagination, PreviewImage, Radio, RadioGroup, SchemaForm, Search, Select, Skeleton, Switch, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableSearch, Tabs, Textarea, Tooltip, TreeSelect, useForm, } from '../../components';
|
|
3
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
4
|
-
import DateTestPage from '../Date/DateTestPage';
|
|
5
|
-
import MenuTestPage from './MenuTestPage';
|
|
6
|
-
function ThemeSwitcher() {
|
|
7
|
-
const [mode, setMode] = useState('dark');
|
|
8
|
-
const [theme, setTheme] = useState('default');
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
const root = document.documentElement;
|
|
11
|
-
const previousTheme = root.getAttribute('data-theme');
|
|
12
|
-
const previousDark = root.classList.contains('dark');
|
|
13
|
-
root.classList.toggle('dark', mode === 'dark');
|
|
14
|
-
if (theme === 'default') {
|
|
15
|
-
root.removeAttribute('data-theme');
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
root.setAttribute('data-theme', theme);
|
|
19
|
-
}
|
|
20
|
-
return () => {
|
|
21
|
-
root.classList.toggle('dark', previousDark);
|
|
22
|
-
if (previousTheme) {
|
|
23
|
-
root.setAttribute('data-theme', previousTheme);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
root.removeAttribute('data-theme');
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}, [mode, theme]);
|
|
30
|
-
return (_jsx(Section, { title: "Theme", children: _jsxs("div", { className: "flex w-full flex-wrap items-center gap-6 rounded-xl border border-border bg-background p-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-sm text-muted-foreground", children: "\u6A21\u5F0F" }), _jsx(Button, { variant: mode === 'light' ? 'primary' : 'default', size: "sm", onClick: () => setMode('light'), children: "Light" }), _jsx(Button, { variant: mode === 'dark' ? 'primary' : 'default', size: "sm", onClick: () => setMode('dark'), children: "Dark" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-sm text-muted-foreground", children: "\u4E3B\u9898" }), _jsx(Button, { variant: theme === 'default' ? 'primary' : 'default', size: "sm", onClick: () => setTheme('default'), children: "Default" }), _jsx(Button, { variant: theme === 'green' ? 'primary' : 'default', size: "sm", onClick: () => setTheme('green'), children: "Green" }), _jsx(Button, { variant: theme === 'gray' ? 'primary' : 'default', size: "sm", onClick: () => setTheme('gray'), children: "Gray" })] }), _jsxs("div", { className: "text-sm text-muted-foreground", children: ["\u5F53\u524D: ", mode, " / ", theme] })] }) }));
|
|
31
|
-
}
|
|
32
|
-
// ─── Section wrapper ────────────────────────────────────────────────────────
|
|
33
|
-
function Section({ title, children }) {
|
|
34
|
-
return (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold mb-3 border-b pb-1", children: title }), _jsx("div", { className: "flex flex-wrap gap-3 items-start", children: children })] }));
|
|
35
|
-
}
|
|
36
|
-
// ─── Button ─────────────────────────────────────────────────────────────────
|
|
37
|
-
function ButtonDemo() {
|
|
38
|
-
const [loading, setLoading] = useState(false);
|
|
39
|
-
return (_jsxs(Section, { title: "Button", children: [_jsx(Button, { children: "default" }), _jsx(Button, { variant: "primary", children: "primary" }), _jsx(Button, { variant: "dashed", children: "dashed" }), _jsx(Button, { variant: "text", children: "text" }), _jsx(Button, { variant: "link", href: "#button", children: "link" }), _jsx(Button, { state: "danger", children: "danger" }), _jsx(Button, { variant: "primary", state: "danger", children: "primary danger" }), _jsx("div", { className: " bg-red-300 p-1.5", children: _jsx(Button, { state: "ghost", children: "ghost" }) }), _jsx(Button, { variant: "primary", state: "ghost", children: "primary ghost" }), _jsx(Button, { disabled: true, children: "disabled" }), _jsx(Button, { loading: loading, onClick: () => {
|
|
40
|
-
setLoading(true);
|
|
41
|
-
setTimeout(() => setLoading(false), 2000);
|
|
42
|
-
}, children: "loading (click)" }), _jsx(Button, { size: "sm", children: "sm" }), _jsx(Button, { size: "md", children: "md" }), _jsx(Button, { size: "lg", children: "lg" })] }));
|
|
43
|
-
}
|
|
44
|
-
// ─── Input ───────────────────────────────────────────────────────────────────
|
|
45
|
-
function InputDemo() {
|
|
46
|
-
return (_jsxs(Section, { title: "Input", children: [_jsx(Input, { placeholder: "\u666E\u901A\u8F93\u5165\u6846" }), _jsx(Input, { type: "password", placeholder: "\u5BC6\u7801\u8F93\u5165\u6846" }), _jsx(Input, { disabled: true, placeholder: "\u7981\u7528\u72B6\u6001" })] }));
|
|
47
|
-
}
|
|
48
|
-
function InputNumberDemo() {
|
|
49
|
-
const [price, setPrice] = useState(12.5);
|
|
50
|
-
const [ratio, setRatio] = useState(0.25);
|
|
51
|
-
return (_jsxs(Section, { title: "InputNumber", children: [_jsx(InputNumber, { placeholder: "\u57FA\u7840\u6570\u5B57\u8F93\u5165", className: "w-48" }), _jsx(InputNumber, { value: price, onChange: setPrice, precision: 2, min: 0, max: 9999, placeholder: "\u4EF7\u683C", addonAfter: _jsx("span", { className: "text-xs text-muted-foreground", children: "CNY" }), className: "w-56" }), _jsx(InputNumber, { value: ratio, onChange: setRatio, precision: 2, step: 0.05, min: 0, max: 1, allowStep: true, placeholder: "\u6BD4\u4F8B", className: "w-48" }), _jsx(InputNumber, { defaultValue: 10, step: 0.5, precision: 1, allowStep: true, allowClear: true, className: "w-48" }), _jsx(InputNumber, { disabled: true, defaultValue: 88.8, precision: 1, className: "w-48" })] }));
|
|
52
|
-
}
|
|
53
|
-
// ─── Textarea ────────────────────────────────────────────────────────────────
|
|
54
|
-
function TextareaDemo() {
|
|
55
|
-
const [val, setVal] = useState('');
|
|
56
|
-
return (_jsxs(Section, { title: "Textarea", children: [_jsx(Textarea, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9\uFF08\u6700\u591A 500 \u5B57\uFF09", value: val, onChange: (v) => setVal(v), className: "w-80" }), _jsx(Textarea, { placeholder: "\u4E0D\u663E\u793A\u8BA1\u6570", showCount: false, className: "w-80" })] }));
|
|
57
|
-
}
|
|
58
|
-
// ─── Select ──────────────────────────────────────────────────────────────────
|
|
59
|
-
function SelectDemo() {
|
|
60
|
-
const [val, setVal] = useState(undefined);
|
|
61
|
-
const options = [
|
|
62
|
-
{ label: '选项 A', value: 'a' },
|
|
63
|
-
{ label: '选项 B', value: 'b' },
|
|
64
|
-
{ label: '选项 C', value: 'c' },
|
|
65
|
-
];
|
|
66
|
-
return (_jsxs(Section, { title: "Select", children: [_jsx(Select, { options: options, value: val, onChange: setVal, placeholder: "\u8BF7\u9009\u62E9", className: "w-40" }), _jsx(Select, { options: options, placeholder: "\u4E0D\u53EF\u641C\u7D22", searchable: false, className: "w-40" }), _jsx(Select, { options: options, placeholder: "\u4E0D\u53EF\u6E05\u9664", clearable: false, className: "w-40" }), _jsx(Select, { options: options, disabled: true, placeholder: "\u7981\u7528", className: "w-40" }), _jsxs("div", { className: "relative w-64 rounded-lg border border-border bg-muted/30 p-4", children: [_jsx("div", { className: "mb-2 text-sm text-muted-foreground", children: "parent popup container" }), _jsx(Select, { options: options, placeholder: "\u6302\u8F7D\u5230\u7236\u5143\u7D20", getPopupContainer: "parent", className: "w-full" })] })] }));
|
|
67
|
-
}
|
|
68
|
-
// ─── Checkbox ────────────────────────────────────────────────────────────────
|
|
69
|
-
function CheckboxDemo() {
|
|
70
|
-
const [checked, setChecked] = useState(false);
|
|
71
|
-
return (_jsxs(Section, { title: "Checkbox", children: [_jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [_jsx(Checkbox, { checked: checked, onChange: (c) => setChecked(c) }), _jsxs("span", { children: ["\u53D7\u63A7: ", checked ? '选中' : '未选中'] })] }), _jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [_jsx(Checkbox, { defaultChecked: true }), _jsx("span", { children: "\u975E\u53D7\u63A7\u9ED8\u8BA4\u9009\u4E2D" })] }), _jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [_jsx(Checkbox, { indeterminate: true }), _jsx("span", { children: "\u534A\u9009\u72B6\u6001" })] }), _jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [_jsx(Checkbox, { disabled: true }), _jsx("span", { children: "\u7981\u7528" })] })] }));
|
|
72
|
-
}
|
|
73
|
-
// ─── Switch ──────────────────────────────────────────────────────────────────
|
|
74
|
-
function SwitchDemo() {
|
|
75
|
-
const [on, setOn] = useState(false);
|
|
76
|
-
return (_jsxs(Section, { title: "Switch", children: [_jsx(Switch, { checked: on, onChange: setOn }), _jsx("span", { className: "self-center text-sm", children: on ? 'ON' : 'OFF' }), _jsx(Switch, { defaultChecked: true }), _jsx(Switch, { disabled: true }), _jsx(Switch, { disabled: true, checked: true })] }));
|
|
77
|
-
}
|
|
78
|
-
// ─── Tooltip ─────────────────────────────────────────────────────────────────
|
|
79
|
-
function TooltipDemo() {
|
|
80
|
-
return (_jsx(Section, { title: "Tooltip", children: ['top', 'bottom', 'left', 'right'].map((p) => (_jsx(Tooltip, { content: `placement: ${p}`, placement: p, children: _jsx(Button, { children: p }) }, p))) }));
|
|
81
|
-
}
|
|
82
|
-
// ─── Dropdown ────────────────────────────────────────────────────────────────
|
|
83
|
-
function DropdownDemo() {
|
|
84
|
-
const items = [
|
|
85
|
-
{ key: 'edit', label: '编辑', onClick: () => console.log('edit') },
|
|
86
|
-
{ key: 'copy', label: '复制', onClick: () => console.log('copy') },
|
|
87
|
-
{ key: 'delete', label: '删除', danger: true, onClick: () => console.log('delete') },
|
|
88
|
-
];
|
|
89
|
-
return (_jsxs(Section, { title: "Dropdown", children: [_jsx(Dropdown, { items: items, children: _jsx(Button, { children: "\u64CD\u4F5C \u25BE" }) }), _jsx(Dropdown, { items: items, placement: "bottom-start", children: _jsx(Button, { variant: "text", children: "bottom-start \u25BE" }) })] }));
|
|
90
|
-
}
|
|
91
|
-
// ─── Message ─────────────────────────────────────────────────────────────────
|
|
92
|
-
function MessageDemo() {
|
|
93
|
-
return (_jsxs(Section, { title: "Message (imperative)", children: [_jsx(Button, { onClick: () => message.success('操作成功'), children: "success" }), _jsx(Button, { onClick: () => message.error('操作失败'), children: "error" }), _jsx(Button, { onClick: () => message.warning('警告信息'), children: "warning" }), _jsx(Button, { onClick: () => message.info('提示信息'), children: "info" }), _jsx(Button, { onClick: () => {
|
|
94
|
-
const id = message.success('5秒后关闭', { duration: 5000 });
|
|
95
|
-
setTimeout(() => message.close(id), 2000);
|
|
96
|
-
}, children: "\u63D0\u524D\u5173\u95ED" })] }));
|
|
97
|
-
}
|
|
98
|
-
// ─── Modal ───────────────────────────────────────────────────────────────────
|
|
99
|
-
function ModalDemo() {
|
|
100
|
-
const [open, setOpen] = useState(false);
|
|
101
|
-
return (_jsxs(Section, { title: "Modal", children: [_jsx(Button, { onClick: () => setOpen(true), children: "JSX Modal" }), _jsx(Button, { onClick: () => modal.open({
|
|
102
|
-
title: '命令式弹窗',
|
|
103
|
-
content: _jsx("p", { children: "\u8FD9\u662F\u547D\u4EE4\u5F0F\u6253\u5F00\u7684\u5F39\u7A97\u5185\u5BB9\u3002" }),
|
|
104
|
-
}), children: "modal.open" }), _jsx(Button, { onClick: () => modal.confirm({
|
|
105
|
-
title: '确认操作',
|
|
106
|
-
content: '确定要执行此操作吗?',
|
|
107
|
-
onOk: () => {
|
|
108
|
-
message.success('已确认');
|
|
109
|
-
},
|
|
110
|
-
onCancel: () => {
|
|
111
|
-
message.info('已取消');
|
|
112
|
-
},
|
|
113
|
-
}), children: "modal.confirm" }), _jsxs(Modal, { open: open, onClose: () => setOpen(false), title: "JSX \u5F39\u7A97", children: [_jsx("p", { children: "\u8FD9\u662F\u4E00\u4E2A\u4F7F\u7528 JSX \u63A7\u5236\u7684\u5F39\u7A97\u3002" }), _jsx("div", { className: "mt-4 flex justify-end gap-2", children: _jsx(Button, { onClick: () => setOpen(false), children: "\u5173\u95ED" }) })] })] }));
|
|
114
|
-
}
|
|
115
|
-
// ─── Drawer ──────────────────────────────────────────────────────────────────
|
|
116
|
-
function DrawerDemo() {
|
|
117
|
-
const [placement, setPlacement] = useState('right');
|
|
118
|
-
const [open, setOpen] = useState(false);
|
|
119
|
-
const openDrawer = (nextPlacement) => {
|
|
120
|
-
setPlacement(nextPlacement);
|
|
121
|
-
setOpen(true);
|
|
122
|
-
};
|
|
123
|
-
return (_jsxs(Section, { title: "Drawer", children: [_jsx(Button, { onClick: () => openDrawer('left'), children: "left" }), _jsx(Button, { onClick: () => openDrawer('right'), children: "right" }), _jsx(Button, { onClick: () => openDrawer('top'), children: "top" }), _jsx(Button, { onClick: () => openDrawer('bottom'), children: "bottom" }), _jsx(Button, { onClick: () => openDrawer('right'), variant: "primary", children: "\u6253\u5F00\u8BE6\u60C5" }), _jsx(Drawer, { open: open, onClose: () => setOpen(false), title: `Drawer ${placement}`, placement: placement, width: 420, height: 320, footer: _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { onClick: () => setOpen(false), children: "\u53D6\u6D88" }), _jsx(Button, { variant: "primary", onClick: () => {
|
|
124
|
-
message.success('已保存');
|
|
125
|
-
setOpen(false);
|
|
126
|
-
}, children: "\u4FDD\u5B58" })] }), children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("div", { className: "mb-1 text-sm font-medium text-foreground", children: "\u5916\u90E8 children" }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: "\u8FD9\u91CC\u7684\u5185\u5BB9\u5B8C\u5168\u7531\u8C03\u7528\u65B9\u5B9A\u4E49\uFF0C\u53EF\u4EE5\u653E\u8868\u5355\u3001\u5217\u8868\u3001\u8BE6\u60C5\u6216\u4EFB\u610F JSX\u3002" })] }), _jsxs("div", { className: "grid gap-3", children: [_jsx(Label, { label: "\u540D\u79F0", layout: "vertical", children: _jsx(Input, { placeholder: "\u8BF7\u8F93\u5165\u540D\u79F0" }) }), _jsx(Label, { label: "\u72B6\u6001", layout: "vertical", children: _jsx(Select, { placeholder: "\u8BF7\u9009\u62E9\u72B6\u6001", options: [
|
|
127
|
-
{ label: '启用', value: 'enabled' },
|
|
128
|
-
{ label: '停用', value: 'disabled' },
|
|
129
|
-
] }) })] })] }) })] }));
|
|
130
|
-
}
|
|
131
|
-
// ─── ConfirmDialog ───────────────────────────────────────────────────────────
|
|
132
|
-
function ConfirmDialogDemo() {
|
|
133
|
-
const [open, setOpen] = useState(false);
|
|
134
|
-
return (_jsxs(Section, { title: "ConfirmDialog", children: [_jsx(Button, { onClick: () => setOpen(true), children: "\u6253\u5F00\u786E\u8BA4\u6846" }), _jsx(ConfirmDialog, { open: open, title: "\u5220\u9664\u786E\u8BA4", content: "\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002", onOk: () => {
|
|
135
|
-
message.success('已删除');
|
|
136
|
-
setOpen(false);
|
|
137
|
-
}, onCancel: () => setOpen(false) })] }));
|
|
138
|
-
}
|
|
139
|
-
// ─── Pagination ───────────────────────────────────────────────────────────────
|
|
140
|
-
function PaginationDemo() {
|
|
141
|
-
const [page, setPage] = useState(1);
|
|
142
|
-
const [pageSize, setPageSize] = useState(10);
|
|
143
|
-
return (_jsx(Section, { title: "Pagination", children: _jsxs("div", { className: "w-full", children: [_jsxs("p", { className: "text-sm mb-2", children: ["\u5F53\u524D\u9875: ", page, " / \u6BCF\u9875: ", pageSize] }), _jsx(Pagination, { current: page, pageSize: pageSize, total: 238, onChange: setPage, onPageSizeChange: setPageSize })] }) }));
|
|
144
|
-
}
|
|
145
|
-
// ─── Table (低层组件) ─────────────────────────────────────────────────────────
|
|
146
|
-
function TableDemo() {
|
|
147
|
-
const rows = [
|
|
148
|
-
{ id: 1, name: '张三', role: '管理员', status: '正常' },
|
|
149
|
-
{ id: 2, name: '李四', role: '用户', status: '禁用' },
|
|
150
|
-
{ id: 3, name: '王五', role: '审计员', status: '正常' },
|
|
151
|
-
];
|
|
152
|
-
return (_jsx(Section, { title: "Table (\u4F4E\u5C42)", children: _jsx("div", { className: "w-full", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs("tr", { children: [_jsx(TableHead, { children: "ID" }), _jsx(TableHead, { children: "\u59D3\u540D" }), _jsx(TableHead, { children: "\u89D2\u8272" }), _jsx(TableHead, { children: "\u72B6\u6001" }), _jsx(TableHead, { isAction: true, children: "\u64CD\u4F5C" })] }) }), _jsx(TableBody, { children: rows.map((row) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: row.id }), _jsx(TableCell, { children: row.name }), _jsx(TableCell, { children: row.role }), _jsx(TableCell, { children: row.status }), _jsx(TableCell, { isAction: true, children: _jsx(Button, { variant: "link", size: "sm", children: "\u7F16\u8F91" }) })] }, row.id))) })] }) }) }));
|
|
153
|
-
}
|
|
154
|
-
function DataTableDemo() {
|
|
155
|
-
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
156
|
-
const columns = [
|
|
157
|
-
{ key: 'id', title: 'ID', width: '60px' },
|
|
158
|
-
{ key: 'name', title: '姓名' },
|
|
159
|
-
{ key: 'role1', title: '角色1', dataIndex: 'role', fixed: 'left' },
|
|
160
|
-
{ key: 'status1', title: '状态1', dataIndex: 'status', fixed: 'left' },
|
|
161
|
-
{ key: 'role2', title: '角色2', dataIndex: 'role' },
|
|
162
|
-
{ key: 'status2', title: '状态2', dataIndex: 'status' },
|
|
163
|
-
{ key: 'role3', title: '角色3', dataIndex: 'role' },
|
|
164
|
-
{ key: 'status3', title: '状态3', dataIndex: 'status' },
|
|
165
|
-
{ key: 'role4', title: '角色4', dataIndex: 'role' },
|
|
166
|
-
{ key: 'status4', title: '状态4', dataIndex: 'status' },
|
|
167
|
-
{ key: 'role5', title: '角色5', dataIndex: 'role' },
|
|
168
|
-
{ key: 'status5', title: '状态5', dataIndex: 'status' },
|
|
169
|
-
{ key: 'role6', title: '角色6', dataIndex: 'role' },
|
|
170
|
-
{ key: 'status6', title: '状态6', dataIndex: 'status' },
|
|
171
|
-
{ key: 'role7', title: '角色', dataIndex: 'role', fixed: 'right' },
|
|
172
|
-
{ key: 'status7', title: '状态', dataIndex: 'status' },
|
|
173
|
-
{
|
|
174
|
-
key: 'action',
|
|
175
|
-
title: '操作',
|
|
176
|
-
width: '96px',
|
|
177
|
-
actionOverflow: 'dropdown',
|
|
178
|
-
actions: (_, record) => [
|
|
179
|
-
{ key: 'edit', label: '修改', onClick: () => console.log('edit', record.id) },
|
|
180
|
-
{ key: 'view', label: '查看', onClick: () => console.log('view', record.id) },
|
|
181
|
-
{ key: 'delete', label: '删除', danger: true, onClick: () => console.log('delete', record.id) },
|
|
182
|
-
],
|
|
183
|
-
},
|
|
184
|
-
];
|
|
185
|
-
const data = [
|
|
186
|
-
{
|
|
187
|
-
id: 1,
|
|
188
|
-
name: '张三',
|
|
189
|
-
role: '管理员',
|
|
190
|
-
role7: '管理员',
|
|
191
|
-
role6: '管理员',
|
|
192
|
-
role5: '管理员',
|
|
193
|
-
role4: '管理员',
|
|
194
|
-
role3: '管理员',
|
|
195
|
-
role2: '管理员',
|
|
196
|
-
role1: '管理员',
|
|
197
|
-
status: '正常',
|
|
198
|
-
status7: '正常',
|
|
199
|
-
status6: '正常',
|
|
200
|
-
status5: '正常',
|
|
201
|
-
status4: '正常',
|
|
202
|
-
status3: '正常',
|
|
203
|
-
status2: '正常',
|
|
204
|
-
status1: '正常',
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
id: 2,
|
|
208
|
-
name: '李四',
|
|
209
|
-
role: '用户',
|
|
210
|
-
role7: '用户',
|
|
211
|
-
role6: '用户',
|
|
212
|
-
role5: '用户',
|
|
213
|
-
role4: '用户',
|
|
214
|
-
role3: '用户',
|
|
215
|
-
role2: '用户',
|
|
216
|
-
role1: '用户',
|
|
217
|
-
status: '禁用',
|
|
218
|
-
status7: '禁用',
|
|
219
|
-
status6: '禁用',
|
|
220
|
-
status5: '禁用',
|
|
221
|
-
status4: '禁用',
|
|
222
|
-
status3: '禁用',
|
|
223
|
-
status2: '禁用',
|
|
224
|
-
status1: '禁用',
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
id: 3,
|
|
228
|
-
name: '王五',
|
|
229
|
-
role: '审计员',
|
|
230
|
-
role7: '审计员',
|
|
231
|
-
role6: '审计员',
|
|
232
|
-
role5: '审计员',
|
|
233
|
-
role4: '审计员',
|
|
234
|
-
role3: '审计员',
|
|
235
|
-
role2: '审计员',
|
|
236
|
-
role1: '审计员',
|
|
237
|
-
status: '正常',
|
|
238
|
-
status7: '正常',
|
|
239
|
-
status6: '正常',
|
|
240
|
-
status5: '正常',
|
|
241
|
-
status4: '正常',
|
|
242
|
-
status3: '正常',
|
|
243
|
-
status2: '正常',
|
|
244
|
-
status1: '正常',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
id: 4,
|
|
248
|
-
name: '赵六',
|
|
249
|
-
role: '用户',
|
|
250
|
-
role7: '用户',
|
|
251
|
-
role6: '用户',
|
|
252
|
-
role5: '用户',
|
|
253
|
-
role4: '用户',
|
|
254
|
-
role3: '用户',
|
|
255
|
-
role2: '用户',
|
|
256
|
-
role1: '用户',
|
|
257
|
-
status: '正常',
|
|
258
|
-
status7: '正常',
|
|
259
|
-
status6: '正常',
|
|
260
|
-
status5: '正常',
|
|
261
|
-
status4: '正常',
|
|
262
|
-
status3: '正常',
|
|
263
|
-
status2: '正常',
|
|
264
|
-
status1: '正常',
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
id: 5,
|
|
268
|
-
name: '孙七',
|
|
269
|
-
role: '用户',
|
|
270
|
-
role7: '用户',
|
|
271
|
-
role6: '用户',
|
|
272
|
-
role5: '用户',
|
|
273
|
-
role4: '用户',
|
|
274
|
-
role3: '用户',
|
|
275
|
-
role2: '用户',
|
|
276
|
-
role1: '用户',
|
|
277
|
-
status: '正常',
|
|
278
|
-
status7: '正常',
|
|
279
|
-
status6: '正常',
|
|
280
|
-
status5: '正常',
|
|
281
|
-
status4: '正常',
|
|
282
|
-
status3: '正常',
|
|
283
|
-
status2: '正常',
|
|
284
|
-
status1: '正常',
|
|
285
|
-
},
|
|
286
|
-
];
|
|
287
|
-
return (_jsx(Section, { title: "DataTable", children: _jsxs("div", { className: "w-full", children: [_jsxs("p", { className: "text-sm mb-2", children: ["\u5DF2\u9009: ", JSON.stringify(selectedKeys)] }), _jsx(DataTable, { columns: columns, data: data, rowKey: "id", rowSelection: {
|
|
288
|
-
selectedRowKeys: selectedKeys,
|
|
289
|
-
onChange: (keys) => setSelectedKeys(keys),
|
|
290
|
-
} })] }) }));
|
|
291
|
-
}
|
|
292
|
-
// ─── Search ───────────────────────────────────────────────────────────────────
|
|
293
|
-
function SearchDemo() {
|
|
294
|
-
return (_jsx(Section, { title: "Search", children: _jsx("div", { className: "w-full", children: _jsxs(Search, { schemas: [
|
|
295
|
-
{ type: 'input', key: 'keyword', label: '关键字', fieldProps: { placeholder: '请输入' } },
|
|
296
|
-
{
|
|
297
|
-
type: 'select',
|
|
298
|
-
key: 'status',
|
|
299
|
-
label: '状态',
|
|
300
|
-
fieldProps: {
|
|
301
|
-
options: [
|
|
302
|
-
{ label: '正常', value: 'active' },
|
|
303
|
-
{ label: '禁用', value: 'disabled' },
|
|
304
|
-
],
|
|
305
|
-
placeholder: '请选择',
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
], children: [_jsx(Button, { type: "submit", variant: "primary", children: "\u641C\u7D22" }), _jsx(Button, { type: "reset", children: "\u91CD\u7F6E" })] }) }) }));
|
|
309
|
-
}
|
|
310
|
-
// ─── Breadcrumb ───────────────────────────────────────────────────────────────
|
|
311
|
-
function BreadcrumbDemo() {
|
|
312
|
-
const [items, setItems] = useState([
|
|
313
|
-
{ id: 'home', label: '首页' },
|
|
314
|
-
{ id: 'list', label: '用户列表' },
|
|
315
|
-
{ id: 'detail', label: '用户详情', active: true },
|
|
316
|
-
]);
|
|
317
|
-
return (_jsx(Section, { title: "Breadcrumb", children: _jsx(Breadcrumb, { children: _jsx(BreadcrumbList, { children: items.map((item, idx) => (_jsxs(React.Fragment, { children: [_jsx(BreadcrumbItem, { children: _jsx(BreadcrumbPage, { active: item.active, onClose: () => setItems((prev) => prev.filter((i) => i.id !== item.id)), onClick: () => setItems((prev) => prev.map((i) => ({ ...i, active: i.id === item.id }))), className: "cursor-pointer", children: item.label }) }), idx < items.length - 1 && _jsx(BreadcrumbSeparator, {})] }, item.id))) }) }) }));
|
|
318
|
-
}
|
|
319
|
-
// ─── Label ────────────────────────────────────────────────────────────────────
|
|
320
|
-
function LabelDemo() {
|
|
321
|
-
return (_jsxs(Section, { title: "Label", children: [_jsx(Label, { label: "\u6C34\u5E73\u5E03\u5C40", layout: "horizontal", children: _jsx("span", { className: "text-sm", children: "\u5185\u5BB9\u533A\u57DF" }) }), _jsx(Label, { label: "\u5782\u76F4\u5E03\u5C40", layout: "vertical", children: _jsx("span", { className: "text-sm", children: "\u5185\u5BB9\u533A\u57DF" }) })] }));
|
|
322
|
-
}
|
|
323
|
-
// ─── Form ─────────────────────────────────────────────────────────────────────
|
|
324
|
-
function FormDemo() {
|
|
325
|
-
const [form] = useForm();
|
|
326
|
-
return (_jsx(Section, { title: "Form", children: _jsxs(Form, { form: form, onFinish: (v) => console.log('表单值:', v), children: [_jsx(FormItem, { name: "username", label: "\u7528\u6237\u540D", required: true, rules: [{ required: true, message: '请输入用户名' }], children: _jsx(Input, { placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D" }) }), _jsx(FormItem, { name: "password", label: "\u5BC6\u7801", required: true, rules: [{ required: true, message: '请输入密码' }], children: _jsx(Input, { type: "password", placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801" }) }), _jsx(Button, { type: "submit", children: "\u63D0\u4EA4" })] }) }));
|
|
327
|
-
}
|
|
328
|
-
// ─── SchemaForm ───────────────────────────────────────────────────────────────
|
|
329
|
-
function SchemaFormDemo() {
|
|
330
|
-
const form = useRef(undefined);
|
|
331
|
-
return (_jsx(Section, { title: "SchemaForm", children: _jsx(SchemaForm, { layout: "horizontal", getForm: (f) => {
|
|
332
|
-
form.current = f;
|
|
333
|
-
}, schemas: [
|
|
334
|
-
{
|
|
335
|
-
key: 'username',
|
|
336
|
-
label: '用户名',
|
|
337
|
-
type: 'input',
|
|
338
|
-
required: true,
|
|
339
|
-
rules: [{ required: true, message: '请输入用户名' }],
|
|
340
|
-
fieldProps: { placeholder: '请输入用户名' },
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
key: 'role',
|
|
344
|
-
label: '角色',
|
|
345
|
-
type: 'select',
|
|
346
|
-
fieldProps: {
|
|
347
|
-
placeholder: '请选择',
|
|
348
|
-
options: [
|
|
349
|
-
{ label: '管理员', value: 'admin' },
|
|
350
|
-
{ label: '用户', value: 'user' },
|
|
351
|
-
],
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
], onFinish: (values) => console.log(values) }) }));
|
|
355
|
-
}
|
|
356
|
-
// ─── TableSearch ─────────────────────────────────────────────────────────────
|
|
357
|
-
function TableSearchDemo() {
|
|
358
|
-
return (_jsx(Section, { title: "TableSearch", children: _jsx(TableSearch, { onSearch: (v) => console.log(v), schemas: [
|
|
359
|
-
{ type: 'input', key: 'q1', label: '字段1', fieldProps: {} },
|
|
360
|
-
{ type: 'select', key: 'q2', label: '状态', fieldProps: { options: [{ value: 'a', label: 'A' }] } },
|
|
361
|
-
{ type: 'switch', key: 'q3', label: '开关', fieldProps: {} },
|
|
362
|
-
{ type: 'date', key: 'q4', label: '日期', fieldProps: {} },
|
|
363
|
-
{ type: 'date', key: 'q5', label: '范围', fieldProps: { mode: 'range' } },
|
|
364
|
-
{ type: 'textarea', key: 'q6', label: '文本', fieldProps: {} },
|
|
365
|
-
{ type: 'input', key: 'q7', label: '字段7', fieldProps: {} },
|
|
366
|
-
{ type: 'input', key: 'q8', label: '字段8', fieldProps: {} },
|
|
367
|
-
] }) }));
|
|
368
|
-
}
|
|
369
|
-
// ─── Skeleton ─────────────────────────────────────────────────────────────────
|
|
370
|
-
function SkeletonDemo() {
|
|
371
|
-
return (_jsx(Section, { title: "Skeleton", children: _jsxs("div", { className: "w-full space-y-4", children: [_jsxs("div", { children: [_jsx("p", { className: "text-xs text-gray-500 mb-1", children: "pageloading" }), _jsx(Skeleton, { mode: "pageloading", rows: 3, showTitle: true, showActions: true })] }), _jsxs("div", { children: [_jsx("p", { className: "text-xs text-gray-500 mb-1", children: "tableloading" }), _jsx(Skeleton, { mode: "tableloading", rows: 4 })] }), _jsxs("div", { children: [_jsx("p", { className: "text-xs text-gray-500 mb-1", children: "componentsloading" }), _jsx(Skeleton, { mode: "componentsloading", rows: 2 })] })] }) }));
|
|
372
|
-
}
|
|
373
|
-
// ─── TreeSelect ───────────────────────────────────────────────────────────────
|
|
374
|
-
function TreeSelectDemo() {
|
|
375
|
-
const [value, setValue] = useState(['1.1.1', '1.1.2']);
|
|
376
|
-
const [indeterminate, setIndeterminate] = useState([]);
|
|
377
|
-
const treeData = [
|
|
378
|
-
{
|
|
379
|
-
id: '1',
|
|
380
|
-
name: '节点 1',
|
|
381
|
-
children: [
|
|
382
|
-
{
|
|
383
|
-
id: '1.1',
|
|
384
|
-
name: '节点 1.1',
|
|
385
|
-
children: [
|
|
386
|
-
{
|
|
387
|
-
id: '1.1.1',
|
|
388
|
-
name: '节点 1.1.1',
|
|
389
|
-
children: [
|
|
390
|
-
{ id: '1.1.1.1', name: '1.1.1.1' },
|
|
391
|
-
{ id: '1.1.1.2', name: '1.1.1.2' },
|
|
392
|
-
],
|
|
393
|
-
},
|
|
394
|
-
{ id: '1.1.2', name: '节点 1.1.2' },
|
|
395
|
-
],
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
id: '1.2',
|
|
399
|
-
name: '节点 1.2',
|
|
400
|
-
children: [
|
|
401
|
-
{ id: '1.2.1', name: '1.2.1' },
|
|
402
|
-
{ id: '1.2.2', name: '1.2.2' },
|
|
403
|
-
],
|
|
404
|
-
},
|
|
405
|
-
],
|
|
406
|
-
},
|
|
407
|
-
];
|
|
408
|
-
return (_jsx(Section, { title: "TreeSelect", children: _jsxs("div", { children: [_jsxs("div", { className: "text-sm mb-2", children: [_jsxs("span", { children: ["\u9009\u4E2D: ", JSON.stringify(value)] }), _jsxs("span", { className: "ml-4", children: ["\u534A\u9009: ", JSON.stringify(indeterminate)] })] }), _jsx(TreeSelect, { data: treeData, value: value, onChange: ({ checked, indeterminate }) => {
|
|
409
|
-
setValue(checked);
|
|
410
|
-
setIndeterminate(indeterminate);
|
|
411
|
-
} })] }) }));
|
|
412
|
-
}
|
|
413
|
-
// ─── PreviewImage ─────────────────────────────────────────────────────────────
|
|
414
|
-
function PreviewImageDemo() {
|
|
415
|
-
const images = [
|
|
416
|
-
'https://images.unsplash.com/photo-1778512828600-4a6540a1a115?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxmZWF0dXJlZC1waG90b3MtZmVlZHw0fHx8ZW58MHx8fHx8',
|
|
417
|
-
'https://images.unsplash.com/photo-1778392120781-a6b2b55dc12a?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxmZWF0dXJlZC1waG90b3MtZmVlZHwyNnx8fGVufDB8fHx8fA%3D%3D',
|
|
418
|
-
];
|
|
419
|
-
return (_jsx(Section, { title: "PreviewImage", children: _jsx(PreviewImage, { images: images, initialIndex: 0 }) }));
|
|
420
|
-
}
|
|
421
|
-
// ─── ImageUpload ─────────────────────────────────────────────────────────────
|
|
422
|
-
function ImageUploadDemo() {
|
|
423
|
-
return (_jsx(Section, { title: "ImageUpload", children: _jsx(ImageUpload, { accept: ".jpg,.png", maxCount: 4, beforeChange: (f) => {
|
|
424
|
-
console.log(f);
|
|
425
|
-
return parseInt(Math.random() * 10 + '') % 2 === 0;
|
|
426
|
-
} }) }));
|
|
427
|
-
}
|
|
428
|
-
// ─── Radio ───────────────────────────────────────────────────────────────────
|
|
429
|
-
function RadioDemo() {
|
|
430
|
-
const [selected, setSelected] = useState('a');
|
|
431
|
-
const [groupValue, setGroupValue] = useState('green');
|
|
432
|
-
const options = [
|
|
433
|
-
{ label: '选项 A', value: 'a' },
|
|
434
|
-
{ label: '选项 B', value: 'b' },
|
|
435
|
-
{ label: '选项 C', value: 'c' },
|
|
436
|
-
];
|
|
437
|
-
return (_jsxs(Section, { title: "Radio", children: [_jsxs("div", { className: "space-y-2", children: [_jsxs("p", { className: "text-sm text-muted-foreground", children: ["\u53D7\u63A7: ", selected] }), options.map((opt) => (_jsx(Radio, { name: "demo-radio", label: opt.label, checked: selected === opt.value, onChange: () => setSelected(opt.value) }, opt.value)))] }), _jsxs("div", { className: "space-y-2 ml-8", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "\u975E\u53D7\u63A7\u9ED8\u8BA4\u9009\u4E2D" }), _jsx(Radio, { name: "demo-radio-2", label: "\u9ED8\u8BA4\u9009\u4E2D", defaultChecked: true }), _jsx(Radio, { name: "demo-radio-2", label: "\u7981\u7528\u72B6\u6001", disabled: true }), _jsx(Radio, { name: "demo-radio-2", label: "\u7981\u7528\u4E14\u9009\u4E2D", disabled: true, defaultChecked: true })] }), _jsxs("div", { className: "w-full ml-8 space-y-2", children: [_jsxs("p", { className: "text-sm text-muted-foreground", children: ["RadioGroup \u5782\u76F4\u5E03\u5C40: ", groupValue] }), _jsxs(RadioGroup, { name: "demo-group", value: groupValue, onChange: setGroupValue, children: [_jsx(Radio, { value: "default", label: "\u9ED8\u8BA4\u4E3B\u9898" }), _jsx(Radio, { value: "green", label: "\u7EFF\u8272\u4E3B\u9898" }), _jsx(Radio, { value: "gray", label: "\u7070\u8272\u4E3B\u9898" })] })] }), _jsxs("div", { className: "w-full ml-8 space-y-2", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "RadioGroup \u6C34\u5E73\u5E03\u5C40 (\u975E\u53D7\u63A7)" }), _jsxs(RadioGroup, { name: "demo-group-2", defaultValue: "b", direction: "horizontal", children: [_jsx(Radio, { value: "a", label: "\u9009\u9879 A" }), _jsx(Radio, { value: "b", label: "\u9009\u9879 B" }), _jsx(Radio, { value: "c", label: "\u9009\u9879 C" }), _jsx(Radio, { value: "d", label: "\u7981\u7528\u9009\u9879", disabled: true })] })] })] }));
|
|
438
|
-
}
|
|
439
|
-
// ─── Notification ────────────────────────────────────────────────────────────
|
|
440
|
-
function NotificationDemo() {
|
|
441
|
-
return (_jsx(Section, { title: "Notification", children: _jsxs("div", { className: "w-full space-y-3", children: [_jsx(Notification, { type: "info", title: "\u4FE1\u606F\u63D0\u793A", message: "\u8FD9\u662F\u4E00\u6761\u666E\u901A\u4FE1\u606F\u901A\u77E5\u3002" }), _jsx(Notification, { type: "success", title: "\u64CD\u4F5C\u6210\u529F", message: "\u6570\u636E\u5DF2\u6210\u529F\u4FDD\u5B58\u3002" }), _jsx(Notification, { type: "warning", title: "\u8B66\u544A", message: "\u8BF7\u6CE8\u610F\u68C0\u67E5\u914D\u7F6E\u9879\u662F\u5426\u6B63\u786E\u3002" }), _jsx(Notification, { type: "error", title: "\u9519\u8BEF", message: "\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002", closable: false }), _jsx(Notification, { type: "info", title: "\u4E0D\u81EA\u52A8\u5173\u95ED", message: "\u6B64\u901A\u77E5\u9700\u8981\u624B\u52A8\u5173\u95ED\u3002", duration: 0 })] }) }));
|
|
442
|
-
}
|
|
443
|
-
// ─── Loading ─────────────────────────────────────────────────────────────────
|
|
444
|
-
function LoadingDemo() {
|
|
445
|
-
return (_jsx(Section, { title: "Loading", children: _jsxs("div", { className: "flex items-end gap-8", children: [_jsx(Loading, { size: "sm", text: "\u52A0\u8F7D\u4E2D..." }), _jsx(Loading, { size: "md", text: "\u52A0\u8F7D\u4E2D..." }), _jsx(Loading, { size: "lg" })] }) }));
|
|
446
|
-
}
|
|
447
|
-
// ─── Layout ──────────────────────────────────────────────────────────────────
|
|
448
|
-
function LayoutDemo() {
|
|
449
|
-
return (_jsx(Section, { title: "Layout", children: _jsx("div", { className: "w-full h-80 border rounded-lg overflow-hidden", children: _jsx(Layout, { header: _jsx("div", { className: "flex items-center h-12 px-4 text-sm font-medium", children: "Header" }), sidebar: _jsxs("div", { className: "p-4", children: [_jsx("p", { className: "text-sm font-medium mb-2", children: "Sidebar" }), _jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "text-sm text-muted-foreground p-1 rounded hover:bg-muted cursor-pointer", children: "\u83DC\u5355\u9879 1" }), _jsx("div", { className: "text-sm text-muted-foreground p-1 rounded hover:bg-muted cursor-pointer", children: "\u83DC\u5355\u9879 2" }), _jsx("div", { className: "text-sm text-muted-foreground p-1 rounded hover:bg-muted cursor-pointer", children: "\u83DC\u5355\u9879 3" })] })] }), footer: _jsx("div", { className: "flex items-center h-10 px-4 text-xs text-muted-foreground", children: "Footer" }), children: _jsxs("div", { className: "p-4", children: [_jsx("p", { className: "text-sm font-medium mb-1", children: "Content" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "\u8FD9\u662F\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\u3002" })] }) }) }) }));
|
|
450
|
-
}
|
|
451
|
-
// ─── Card ────────────────────────────────────────────────────────────────────
|
|
452
|
-
function CardDemo() {
|
|
453
|
-
return (_jsxs(Section, { title: "Card", children: [_jsx("div", { className: "w-72", children: _jsx(Card, { header: _jsx("span", { className: "text-sm font-medium", children: "\u5361\u7247\u6807\u9898" }), footer: _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { size: "sm", children: "\u53D6\u6D88" }), _jsx(Button, { variant: "primary", size: "sm", children: "\u786E\u8BA4" })] }), children: _jsx("p", { className: "text-sm text-muted-foreground", children: "\u8FD9\u662F\u4E00\u5F20\u57FA\u7840\u5361\u7247\uFF0C\u5305\u542B header\u3001body \u548C footer \u4E09\u4E2A\u533A\u57DF\u3002" }) }) }), _jsx("div", { className: "w-72", children: _jsx(Card, { className: "border-theme", children: _jsx("p", { className: "text-sm text-muted-foreground", children: "\u65E0 header/footer \u7684\u7B80\u6D01\u5361\u7247\u3002" }) }) })] }));
|
|
454
|
-
}
|
|
455
|
-
// ─── Tabs ────────────────────────────────────────────────────────────────────
|
|
456
|
-
function TabsDemo() {
|
|
457
|
-
const [activeTab, setActiveTab] = useState('tab1');
|
|
458
|
-
const items = [
|
|
459
|
-
{ key: 'tab1', label: '标签页 1' },
|
|
460
|
-
{ key: 'tab2', label: '标签页 2' },
|
|
461
|
-
{ key: 'tab3', label: '标签页 3' },
|
|
462
|
-
{ key: 'tab4', label: '禁用标签', disabled: true },
|
|
463
|
-
];
|
|
464
|
-
const tabContents = {
|
|
465
|
-
tab1: '这是标签页 1 的内容区域。',
|
|
466
|
-
tab2: '这是标签页 2 的内容区域。',
|
|
467
|
-
tab3: '这是标签页 3 的内容区域。',
|
|
468
|
-
};
|
|
469
|
-
return (_jsx(Section, { title: "Tabs", children: _jsxs("div", { className: "w-full", children: [_jsx(Tabs, { items: items, activeKey: activeTab, onChange: setActiveTab }), _jsx("div", { className: "p-4 border border-t-0 rounded-b-lg bg-background", children: _jsx("p", { className: "text-sm text-muted-foreground", children: tabContents[activeTab] }) })] }) }));
|
|
470
|
-
}
|
|
471
|
-
// ─── Main ─────────────────────────────────────────────────────────────────────
|
|
472
|
-
const TestPage = () => {
|
|
473
|
-
return (_jsxs("div", { className: "p-6 max-w-5xl mx-auto", children: [_jsx("h1", { className: "text-2xl font-bold mb-6", children: "\u7EC4\u4EF6\u5C55\u793A" }), _jsx(ThemeSwitcher, {}), _jsx(ButtonDemo, {}), _jsx(InputDemo, {}), _jsx(InputNumberDemo, {}), _jsx(TextareaDemo, {}), _jsx(SelectDemo, {}), _jsx(CheckboxDemo, {}), _jsx(RadioDemo, {}), _jsx(SwitchDemo, {}), _jsx(TooltipDemo, {}), _jsx(DropdownDemo, {}), _jsx(MessageDemo, {}), _jsx(NotificationDemo, {}), _jsx(LoadingDemo, {}), _jsx(ModalDemo, {}), _jsx(DrawerDemo, {}), _jsx(ConfirmDialogDemo, {}), _jsx(PaginationDemo, {}), _jsx(TableDemo, {}), _jsx(DataTableDemo, {}), _jsx(SearchDemo, {}), _jsx(BreadcrumbDemo, {}), _jsx(LabelDemo, {}), _jsx(LayoutDemo, {}), _jsx(CardDemo, {}), _jsx(TabsDemo, {}), _jsx(FormDemo, {}), _jsx(SchemaFormDemo, {}), _jsx(TableSearchDemo, {}), _jsx(SkeletonDemo, {}), _jsx(TreeSelectDemo, {}), _jsx(DateTestPage, {}), _jsx(PreviewImageDemo, {}), _jsx(ImageUploadDemo, {}), _jsx(MenuTestPage, {})] }));
|
|
474
|
-
};
|
|
475
|
-
export default TestPage;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const executionPhaseType: {
|
|
2
|
-
readonly mount: "mount";
|
|
3
|
-
readonly render: "render";
|
|
4
|
-
readonly unMount: "unMount";
|
|
5
|
-
};
|
|
6
|
-
type ExecutionPhaseTypeKeys = keyof typeof executionPhaseType;
|
|
7
|
-
export type ExecutionPhaseType = (typeof executionPhaseType)[ExecutionPhaseTypeKeys];
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @description 在各个阶段只触发一次
|
|
11
|
-
* @demo
|
|
12
|
-
* ```
|
|
13
|
-
const count = useExecuteOnce(() => {
|
|
14
|
-
console.log('123'); // 只会在第一次render时触发
|
|
15
|
-
return 123
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
// count 123
|
|
19
|
-
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export default function useExecuteOnce<T>(factory: () => T,
|
|
23
|
-
/**
|
|
24
|
-
* @default executionPhase = render
|
|
25
|
-
*/
|
|
26
|
-
options?: {
|
|
27
|
-
executionPhase: ExecutionPhaseType[] | ExecutionPhaseType;
|
|
28
|
-
}): T | null;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=useExecuteOnce.d.ts.map
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
export const executionPhaseType = {
|
|
3
|
-
mount: 'mount',
|
|
4
|
-
render: 'render',
|
|
5
|
-
unMount: 'unMount',
|
|
6
|
-
};
|
|
7
|
-
// type ExecutionPhaseType =
|
|
8
|
-
// (typeof executionPhaseType)[keyof typeof executionPhaseType];
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @description 在各个阶段只触发一次
|
|
12
|
-
* @demo
|
|
13
|
-
* ```
|
|
14
|
-
const count = useExecuteOnce(() => {
|
|
15
|
-
console.log('123'); // 只会在第一次render时触发
|
|
16
|
-
return 123
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
// count 123
|
|
20
|
-
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export default function useExecuteOnce(factory,
|
|
24
|
-
/**
|
|
25
|
-
* @default executionPhase = render
|
|
26
|
-
*/
|
|
27
|
-
options) {
|
|
28
|
-
const { executionPhase: pExecutionPhase = executionPhaseType.render } = options ?? {};
|
|
29
|
-
const result = useRef(null);
|
|
30
|
-
const _executionPhase = useMemo(() => (typeof pExecutionPhase === 'string' ? [pExecutionPhase] : pExecutionPhase), [pExecutionPhase]);
|
|
31
|
-
const allowExecution = useRef([]);
|
|
32
|
-
// 跳过依赖;
|
|
33
|
-
const executionPhase = useRef(_executionPhase);
|
|
34
|
-
const runFN = (phase) => {
|
|
35
|
-
if (!allowExecution.current.includes(phase)) {
|
|
36
|
-
result.current = factory();
|
|
37
|
-
allowExecution.current.push(phase);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
const fn = useRef(runFN);
|
|
41
|
-
executionPhase.current = _executionPhase;
|
|
42
|
-
fn.current = runFN;
|
|
43
|
-
if (executionPhase.current.includes(executionPhaseType.render)) {
|
|
44
|
-
fn.current(executionPhaseType.render);
|
|
45
|
-
}
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
if (executionPhase.current.includes(executionPhaseType.mount)) {
|
|
48
|
-
fn.current(executionPhaseType['mount']);
|
|
49
|
-
}
|
|
50
|
-
return () => {
|
|
51
|
-
if (executionPhase.current.includes(executionPhaseType['unMount'])) {
|
|
52
|
-
fn.current(executionPhaseType['unMount']);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}, []);
|
|
56
|
-
return result.current;
|
|
57
|
-
}
|