@_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,176 +0,0 @@
|
|
|
1
|
-
export const ANSI_RESET = '\x1b[0m';
|
|
2
|
-
export const ansiColors = {
|
|
3
|
-
black: '\x1b[30m',
|
|
4
|
-
red: '\x1b[31m',
|
|
5
|
-
green: '\x1b[32m',
|
|
6
|
-
yellow: '\x1b[33m',
|
|
7
|
-
blue: '\x1b[34m',
|
|
8
|
-
magenta: '\x1b[35m',
|
|
9
|
-
pink: '\x1b[95m',
|
|
10
|
-
cyan: '\x1b[36m',
|
|
11
|
-
white: '\x1b[37m',
|
|
12
|
-
gray: '\x1b[90m',
|
|
13
|
-
};
|
|
14
|
-
const getConsole = () => {
|
|
15
|
-
const globalValue = globalThis;
|
|
16
|
-
return globalValue.console;
|
|
17
|
-
};
|
|
18
|
-
export const colorize = (message, color = 'green') => {
|
|
19
|
-
return `${ansiColors[color]}${String(message)}${ANSI_RESET}`;
|
|
20
|
-
};
|
|
21
|
-
export const joinColorized = (...messages) => {
|
|
22
|
-
return messages.map(String).join('');
|
|
23
|
-
};
|
|
24
|
-
export const logJoinColorized = (...messages) => {
|
|
25
|
-
getConsole()?.log(messages.map(String).join(''));
|
|
26
|
-
};
|
|
27
|
-
const inspectPrimitive = (value) => {
|
|
28
|
-
if (typeof value === 'string')
|
|
29
|
-
return `'${value}'`;
|
|
30
|
-
if (typeof value === 'bigint')
|
|
31
|
-
return `${value}n`;
|
|
32
|
-
if (typeof value === 'symbol')
|
|
33
|
-
return String(value);
|
|
34
|
-
if (typeof value === 'function')
|
|
35
|
-
return `[Function${value.name ? `: ${value.name}` : ''}]`;
|
|
36
|
-
if (value === undefined)
|
|
37
|
-
return 'undefined';
|
|
38
|
-
if (value === null)
|
|
39
|
-
return 'null';
|
|
40
|
-
return String(value);
|
|
41
|
-
};
|
|
42
|
-
const inspectValue = (value, context, depth = 0) => {
|
|
43
|
-
if (value === null || typeof value !== 'object')
|
|
44
|
-
return inspectPrimitive(value);
|
|
45
|
-
if (context.seen.has(value))
|
|
46
|
-
return '[Circular]';
|
|
47
|
-
if (value instanceof Date)
|
|
48
|
-
return value.toISOString();
|
|
49
|
-
if (value instanceof Error)
|
|
50
|
-
return value.stack ?? `${value.name}: ${value.message}`;
|
|
51
|
-
context.seen.add(value);
|
|
52
|
-
if (Array.isArray(value)) {
|
|
53
|
-
const items = value.map((item) => inspectValue(item, context, depth + 1));
|
|
54
|
-
context.seen.delete(value);
|
|
55
|
-
return `[${items.join(', ')}]`;
|
|
56
|
-
}
|
|
57
|
-
const entries = Object.entries(value);
|
|
58
|
-
if (entries.length === 0) {
|
|
59
|
-
context.seen.delete(value);
|
|
60
|
-
return '{}';
|
|
61
|
-
}
|
|
62
|
-
const indent = ' '.repeat(depth);
|
|
63
|
-
const nextIndent = ' '.repeat(depth + 1);
|
|
64
|
-
const body = entries
|
|
65
|
-
.map(([key, item]) => `${nextIndent}${key}: ${inspectValue(item, context, depth + 1)}`)
|
|
66
|
-
.join(',\n');
|
|
67
|
-
context.seen.delete(value);
|
|
68
|
-
return `{\n${body}\n${indent}}`;
|
|
69
|
-
};
|
|
70
|
-
const stringifyLogValue = (value) => {
|
|
71
|
-
return typeof value === 'string' ? value : inspectValue(value, { seen: new WeakSet() });
|
|
72
|
-
};
|
|
73
|
-
const formatSpecifier = (specifier, value) => {
|
|
74
|
-
if (specifier === '%%')
|
|
75
|
-
return '%';
|
|
76
|
-
if (specifier === '%s')
|
|
77
|
-
return String(value);
|
|
78
|
-
if (specifier === '%d' || specifier === '%i')
|
|
79
|
-
return Number.parseInt(String(value), 10).toString();
|
|
80
|
-
if (specifier === '%f')
|
|
81
|
-
return Number.parseFloat(String(value)).toString();
|
|
82
|
-
if (specifier === '%j') {
|
|
83
|
-
try {
|
|
84
|
-
return JSON.stringify(value);
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
return '[Circular]';
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (specifier === '%o' || specifier === '%O')
|
|
91
|
-
return stringifyLogValue(value);
|
|
92
|
-
if (specifier === '%c')
|
|
93
|
-
return '';
|
|
94
|
-
return specifier;
|
|
95
|
-
};
|
|
96
|
-
const formatLogData = (data) => {
|
|
97
|
-
if (data.length === 0)
|
|
98
|
-
return '';
|
|
99
|
-
const [first, ...rest] = data;
|
|
100
|
-
if (typeof first !== 'string') {
|
|
101
|
-
return data.map(stringifyLogValue).join(' ');
|
|
102
|
-
}
|
|
103
|
-
let index = 0;
|
|
104
|
-
const formatted = first.replace(/%[sdifjoOc%]/g, (specifier) => {
|
|
105
|
-
if (specifier === '%%')
|
|
106
|
-
return '%';
|
|
107
|
-
if (index >= rest.length)
|
|
108
|
-
return specifier;
|
|
109
|
-
const value = rest[index];
|
|
110
|
-
index += 1;
|
|
111
|
-
return formatSpecifier(specifier, value);
|
|
112
|
-
});
|
|
113
|
-
const remaining = rest.slice(index).map(stringifyLogValue);
|
|
114
|
-
return [formatted, ...remaining].join(' ');
|
|
115
|
-
};
|
|
116
|
-
const isLogColor = (value) => {
|
|
117
|
-
return typeof value === 'string' && value in ansiColors;
|
|
118
|
-
};
|
|
119
|
-
const isColorLogOptions = (value) => {
|
|
120
|
-
if (value === null || typeof value !== 'object')
|
|
121
|
-
return false;
|
|
122
|
-
const keys = Object.keys(value);
|
|
123
|
-
if (!keys.some((key) => key === 'color' || key === 'prefix' || key === 'suffix')) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
const options = value;
|
|
127
|
-
return options.color === undefined || isLogColor(options.color);
|
|
128
|
-
};
|
|
129
|
-
const withColor = (color, data, options = {}) => {
|
|
130
|
-
const prefix = options.prefix ?? '';
|
|
131
|
-
const suffix = options.suffix ?? '';
|
|
132
|
-
const message = formatLogData(data);
|
|
133
|
-
return [`${ansiColors[color]}${prefix}${message}${suffix}${ANSI_RESET}`];
|
|
134
|
-
};
|
|
135
|
-
const printColorMessage = (data, config) => {
|
|
136
|
-
const color = config.color ?? 'green';
|
|
137
|
-
getConsole()?.log(...withColor(color, data, config));
|
|
138
|
-
};
|
|
139
|
-
export function colorLog(...data) {
|
|
140
|
-
const [first, ...rest] = data;
|
|
141
|
-
const last = data.at(-1);
|
|
142
|
-
if (isLogColor(first) && data.length >= 2) {
|
|
143
|
-
printColorMessage(rest, { color: first });
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
if (isLogColor(last) && data.length === 2) {
|
|
147
|
-
printColorMessage([first], { color: last });
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
if (isColorLogOptions(last) && data.length >= 2) {
|
|
151
|
-
printColorMessage(data.slice(0, -1), last);
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
printColorMessage(data, { color: 'green' });
|
|
155
|
-
}
|
|
156
|
-
export const logColor = (color, ...data) => {
|
|
157
|
-
printColorMessage(data, { color });
|
|
158
|
-
};
|
|
159
|
-
export const logColorized = (...messages) => {
|
|
160
|
-
getConsole()?.log(...messages);
|
|
161
|
-
};
|
|
162
|
-
export const logGreen = (...data) => {
|
|
163
|
-
logColor('green', ...data);
|
|
164
|
-
};
|
|
165
|
-
export const logYellow = (...data) => {
|
|
166
|
-
logColor('yellow', ...data);
|
|
167
|
-
};
|
|
168
|
-
export const logPink = (...data) => {
|
|
169
|
-
logColor('pink', ...data);
|
|
170
|
-
};
|
|
171
|
-
export const logWhite = (...data) => {
|
|
172
|
-
logColor('white', ...data);
|
|
173
|
-
};
|
|
174
|
-
export const logRed = (...data) => {
|
|
175
|
-
logColor('red', ...data);
|
|
176
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const clamp = (value, min, max) => {
|
|
2
|
-
if (min > max) {
|
|
3
|
-
throw new RangeError("min must be less than or equal to max");
|
|
4
|
-
}
|
|
5
|
-
return Math.min(Math.max(value, min), max);
|
|
6
|
-
};
|
|
7
|
-
export const toFiniteNumber = (value, fallback = 0) => {
|
|
8
|
-
const numberValue = typeof value === "number" ? value : Number(value);
|
|
9
|
-
return Number.isFinite(numberValue) ? numberValue : fallback;
|
|
10
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export * from "./filterEmpty";
|
|
2
|
-
export const pick = (target, keys) => {
|
|
3
|
-
const result = {};
|
|
4
|
-
for (const key of keys) {
|
|
5
|
-
if (key in target) {
|
|
6
|
-
result[key] = target[key];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return result;
|
|
10
|
-
};
|
|
11
|
-
export const omit = (target, keys) => {
|
|
12
|
-
const result = { ...target };
|
|
13
|
-
for (const key of keys) {
|
|
14
|
-
delete result[key];
|
|
15
|
-
}
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
export const mapValues = (target, mapper) => {
|
|
19
|
-
const result = {};
|
|
20
|
-
const keys = Object.keys(target);
|
|
21
|
-
for (const key of keys) {
|
|
22
|
-
result[key] = mapper(target[key], key);
|
|
23
|
-
}
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const isBlank = (value) => {
|
|
2
|
-
return value === null || value === undefined || value.trim().length === 0;
|
|
3
|
-
};
|
|
4
|
-
export const capitalize = (value) => {
|
|
5
|
-
if (value.length === 0)
|
|
6
|
-
return value;
|
|
7
|
-
const first = value.charAt(0).toUpperCase();
|
|
8
|
-
return `${first}${value.slice(1)}`;
|
|
9
|
-
};
|
|
10
|
-
export const kebabCase = (value) => {
|
|
11
|
-
return value
|
|
12
|
-
.trim()
|
|
13
|
-
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
14
|
-
.replace(/[\s_]+/g, "-")
|
|
15
|
-
.replace(/-+/g, "-")
|
|
16
|
-
.toLowerCase();
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../lib/utils';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import { LoadingIndicator } from '../Loading';
|
|
5
|
-
const Button = forwardRef((props, ref) => {
|
|
6
|
-
const { className, size = 'md', state, disabled: disabledProp, loading: loadingProp, leftIcon, rightIcon, noUnderline, children, } = props;
|
|
7
|
-
const variant = props.variant ?? 'default';
|
|
8
|
-
const danger = state === 'danger';
|
|
9
|
-
const ghost = state === 'ghost';
|
|
10
|
-
const loading = loadingProp;
|
|
11
|
-
const disabled = disabledProp;
|
|
12
|
-
const isDisabled = disabled || loading;
|
|
13
|
-
// 基础样式
|
|
14
|
-
const baseStyles = 'inline-flex items-center justify-center rounded-lg font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 cursor-pointer';
|
|
15
|
-
const getVariantStyles = () => {
|
|
16
|
-
if (variant === 'text' || variant === 'link') {
|
|
17
|
-
return danger
|
|
18
|
-
? 'bg-transparent border-0 text-destructive focus-visible:ring-destructive'
|
|
19
|
-
: 'bg-transparent border-0 text-foreground focus-visible:ring-border';
|
|
20
|
-
}
|
|
21
|
-
const ghostStyles = ghost && 'bg-transparent hover:bg-transparent';
|
|
22
|
-
if (danger) {
|
|
23
|
-
if (variant === 'primary') {
|
|
24
|
-
return cn(ghost
|
|
25
|
-
? 'border border-destructive text-destructive focus-visible:ring-destructive'
|
|
26
|
-
: 'bg-destructive text-destructive-foreground border border-destructive hover:bg-destructive/90 focus-visible:ring-destructive', ghostStyles);
|
|
27
|
-
}
|
|
28
|
-
return cn(ghost ? 'text-destructive' : 'bg-background text-destructive hover:bg-destructive/10', variant === 'dashed' ? 'border border-dashed' : 'border', 'border-destructive focus-visible:ring-destructive', ghostStyles);
|
|
29
|
-
}
|
|
30
|
-
const variantStyles = {
|
|
31
|
-
default: 'bg-background border border-border text-foreground hover:bg-muted/50 focus-visible:ring-border',
|
|
32
|
-
primary: 'bg-theme text-theme-foreground border border-theme hover:bg-theme/90 focus-visible:ring-theme',
|
|
33
|
-
dashed: 'bg-background border border-dashed border-border text-foreground hover:bg-muted/50 focus-visible:ring-border',
|
|
34
|
-
text: 'bg-transparent border-0 text-foreground focus-visible:ring-border',
|
|
35
|
-
};
|
|
36
|
-
return cn(variantStyles[variant], ghostStyles);
|
|
37
|
-
};
|
|
38
|
-
const disabledStyles = 'disabled:bg-background/60 disabled:border-border/60 disabled:text-foreground/40 disabled:hover:bg-background/60 aria-disabled:text-foreground/40 aria-disabled:hover:bg-transparent';
|
|
39
|
-
// 尺寸样式
|
|
40
|
-
const sizeStyles = {
|
|
41
|
-
sm: 'h-8 px-3 text-sm',
|
|
42
|
-
md: 'h-10 px-4 text-sm',
|
|
43
|
-
lg: 'h-12 px-6 text-base',
|
|
44
|
-
};
|
|
45
|
-
const spinnerSize = {
|
|
46
|
-
sm: 'h-3 w-3',
|
|
47
|
-
md: 'h-4 w-4',
|
|
48
|
-
lg: 'h-5 w-5',
|
|
49
|
-
};
|
|
50
|
-
const loadingIcon = loading ? (_jsx("span", { className: cn('flex items-center', children && 'mr-2'), children: _jsx(LoadingIndicator, { size: "sm", className: cn('text-current', spinnerSize[size]) }) }, "loading")) : null;
|
|
51
|
-
// 展示内容
|
|
52
|
-
const contents = [
|
|
53
|
-
loadingIcon,
|
|
54
|
-
!loading && leftIcon && (_jsx("span", { className: cn('flex items-center', 'mr-2'), children: leftIcon }, "left")),
|
|
55
|
-
children,
|
|
56
|
-
rightIcon ? (_jsx("span", { className: cn('flex items-center', 'ml-2'), children: rightIcon }, "right")) : undefined,
|
|
57
|
-
].filter(Boolean);
|
|
58
|
-
const buttonClassName = cn('tc-ui-button', baseStyles, getVariantStyles(), disabledStyles, ['text', 'link'].includes(variant) ? 'h-auto px-0 py-0 text-sm font-normal' : sizeStyles[size], ['text', 'link'].includes(variant) ? '' : 'before:content-normal', variant === 'link' && !noUnderline && 'hover:underline', variant === 'link' && !noUnderline && 'aria-disabled:hover:no-underline', disabled && !loading && 'cursor-not-allowed', loading && 'cursor-wait', className);
|
|
59
|
-
if (props.variant === 'link') {
|
|
60
|
-
const { className: _className, variant: _variant, size: _size, state: _state, disabled: _disabled, loading: _loading, leftIcon: _leftIcon, rightIcon: _rightIcon, noUnderline: _noUnderline, children: _children, onClick, tabIndex, ...anchorProps } = props;
|
|
61
|
-
return (_jsx("a", { ref: ref, className: buttonClassName, "aria-disabled": isDisabled || undefined, tabIndex: isDisabled ? -1 : tabIndex, onClick: (event) => {
|
|
62
|
-
if (isDisabled) {
|
|
63
|
-
event.preventDefault();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
onClick?.(event);
|
|
67
|
-
}, ...anchorProps, children: contents }));
|
|
68
|
-
}
|
|
69
|
-
const { className: _className, variant: _variant, size: _size, state: _state, disabled: _disabled, loading: _loading, leftIcon: _leftIcon, rightIcon: _rightIcon, noUnderline: _noUnderline, children: _children, ...buttonProps } = props;
|
|
70
|
-
return (_jsx("button", { ref: ref, className: buttonClassName, disabled: isDisabled, ...buttonProps, children: contents }));
|
|
71
|
-
});
|
|
72
|
-
Button.displayName = 'Button';
|
|
73
|
-
export { Button };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../lib/utils';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { Button } from './Button';
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* 会自动添加loading 其余同button一致
|
|
8
|
-
*/
|
|
9
|
-
const SubmitButton = (props) => {
|
|
10
|
-
const { onClick, className, loading: loadingProp, ...bprops } = props;
|
|
11
|
-
const [loading, uLoading] = useState(false);
|
|
12
|
-
return (_jsx(Button, { className: cn('tc-ui-submit-button', className), loading: loading || loadingProp, onClick: async (e) => {
|
|
13
|
-
if (loading)
|
|
14
|
-
return;
|
|
15
|
-
uLoading(true);
|
|
16
|
-
try {
|
|
17
|
-
return await onClick?.(e);
|
|
18
|
-
}
|
|
19
|
-
finally {
|
|
20
|
-
uLoading(false);
|
|
21
|
-
}
|
|
22
|
-
}, ...bprops }));
|
|
23
|
-
};
|
|
24
|
-
const AsynchronousButton = SubmitButton;
|
|
25
|
-
export { AsynchronousButton, SubmitButton };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../lib/utils';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
const Card = forwardRef(({ header, footer, children, className, hoverable = true }, ref) => {
|
|
5
|
-
return (_jsxs("div", { ref: ref, className: cn('tc-ui-card rounded-xl border border-border/60 bg-card text-card-foreground', 'shadow-[inset_0_1px_0_hsl(var(--foreground)/0.04)]', hoverable && [
|
|
6
|
-
'transition-[transform,box-shadow,border-color] duration-200 ease-out',
|
|
7
|
-
'hover:-translate-y-0.5 hover:border-border/80',
|
|
8
|
-
'hover:shadow-[var(--shadow-panel),inset_0_1px_0_hsl(var(--foreground)/0.06)]',
|
|
9
|
-
], className), children: [header && (_jsx("div", { className: "tc-ui-card-header border-b border-border/50 px-4 py-3 text-sm font-medium", children: header })), _jsx("div", { className: "tc-ui-card-body px-4 py-4", children: children }), footer && (_jsx("div", { className: "tc-ui-card-footer border-t border-border/50 px-4 py-3", children: footer }))] }));
|
|
10
|
-
});
|
|
11
|
-
Card.displayName = 'Card';
|
|
12
|
-
export { Card };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Card';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../lib/utils';
|
|
3
|
-
import { Check, Minus } from 'lucide-react';
|
|
4
|
-
import { forwardRef, useLayoutEffect, useRef, useState } from 'react';
|
|
5
|
-
const Checkbox = forwardRef(({ className, checked: _controlledChecked, value, defaultChecked, indeterminate, onChange, disabled, ...props }, ref) => {
|
|
6
|
-
const internalRef = useRef(null);
|
|
7
|
-
const controlledChecked = value ?? _controlledChecked;
|
|
8
|
-
const setRefs = (element) => {
|
|
9
|
-
internalRef.current = element;
|
|
10
|
-
if (typeof ref === 'function') {
|
|
11
|
-
ref(element);
|
|
12
|
-
}
|
|
13
|
-
else if (ref) {
|
|
14
|
-
ref.current = element;
|
|
15
|
-
}
|
|
16
|
-
if (element) {
|
|
17
|
-
element.indeterminate = indeterminate ?? false;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
useLayoutEffect(() => {
|
|
21
|
-
if (internalRef.current) {
|
|
22
|
-
internalRef.current.indeterminate = indeterminate ?? false;
|
|
23
|
-
}
|
|
24
|
-
}, [indeterminate]);
|
|
25
|
-
const isControlled = controlledChecked !== undefined;
|
|
26
|
-
const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);
|
|
27
|
-
const checked = isControlled ? controlledChecked : internalChecked;
|
|
28
|
-
const showChecked = checked && !indeterminate;
|
|
29
|
-
const handleChange = (e) => {
|
|
30
|
-
const newChecked = e.target.checked;
|
|
31
|
-
if (!isControlled) {
|
|
32
|
-
setInternalChecked(newChecked);
|
|
33
|
-
}
|
|
34
|
-
onChange?.(newChecked, e);
|
|
35
|
-
};
|
|
36
|
-
return (_jsxs("span", { className: cn('tc-ui-checkbox relative inline-flex h-4 w-4 shrink-0', className), children: [_jsx("input", { type: "checkbox", ref: setRefs, checked: checked, disabled: disabled, onChange: handleChange, className: cn('peer absolute inset-0 z-10 m-0 h-full w-full appearance-none rounded opacity-0', disabled ? 'cursor-not-allowed' : 'cursor-pointer'), ...props }), _jsxs("span", { "aria-hidden": "true", className: cn('pointer-events-none flex h-full w-full items-center justify-center rounded border transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background', (showChecked || indeterminate) && 'border-theme bg-theme text-theme-foreground', !showChecked && !indeterminate && 'border-border bg-background text-theme', disabled && 'opacity-60'), children: [showChecked && _jsx(Check, { className: "h-3 w-3", strokeWidth: 3 }), indeterminate && _jsx(Minus, { className: "h-3 w-3", strokeWidth: 3 })] })] }));
|
|
37
|
-
});
|
|
38
|
-
Checkbox.displayName = 'Checkbox';
|
|
39
|
-
export { Checkbox };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Checkbox';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useI18n } from '../../i18n';
|
|
3
|
-
import { Button } from '../Button';
|
|
4
|
-
import { Modal } from '../Modal';
|
|
5
|
-
export function ConfirmDialog({ open, title, content, okText, cancelText, loading = false, onOk, onCancel, }) {
|
|
6
|
-
const t = useI18n();
|
|
7
|
-
const handleOk = async () => {
|
|
8
|
-
await onOk();
|
|
9
|
-
};
|
|
10
|
-
return (_jsx(Modal, { open: open, onClose: onCancel, title: title ?? t('components.confirmDialog.title'), width: 450, className: "tc-ui-confirm-dialog", footer: _jsxs("div", { className: "flex justify-end gap-3", children: [_jsx(Button, { onClick: onCancel, className: "min-w-[100px] bg-background border-[hsl(var(--theme-primary))] text-[hsl(var(--theme-primary))] hover:bg-[hsl(var(--theme-primary))]/5", children: cancelText ?? t('components.confirmDialog.cancelText') }), _jsx(Button, { variant: "primary", loading: loading, onClick: handleOk, className: "min-w-[100px] bg-[hsl(var(--theme-primary))] hover:bg-[hsl(var(--theme-primary))]/90 border-[hsl(var(--theme-primary))] text-[hsl(var(--theme-primary-foreground))]", children: okText ?? t('components.confirmDialog.okText') })] }), children: _jsx("div", { className: "py-4 text-base text-foreground", children: content }) }));
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ConfirmDialog';
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../lib/utils';
|
|
3
|
-
import { MoreHorizontal } from 'lucide-react';
|
|
4
|
-
import { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
5
|
-
import { Button } from '../Button';
|
|
6
|
-
import { Dropdown } from '../Dropdown';
|
|
7
|
-
const isInlineAction = (action) => !('render' in action);
|
|
8
|
-
const renderActionLabel = (action) => (_jsxs(_Fragment, { children: [action.icon && _jsx("span", { className: "flex-shrink-0", children: action.icon }), _jsx("span", { className: "truncate", children: action.label })] }));
|
|
9
|
-
const canShowInlineActions = (actions) => actions.every(isInlineAction);
|
|
10
|
-
const InlineActions = ({ actions }) => (_jsx("div", { className: "tc-ui-action-btn-list inline-flex max-w-full items-center justify-center gap-1 whitespace-nowrap", children: actions.map((action) => isInlineAction(action) ? (_jsx(Button, { type: "button", onClick: action.onClick, className: cn('tc-ui-action-btn inline-flex h-8 max-w-full items-center justify-center gap-1 rounded px-2 text-sm transition-colors', action.danger
|
|
11
|
-
? 'text-destructive hover:bg-destructive/10'
|
|
12
|
-
: 'text-table-action-text hover:bg-background/60'), children: renderActionLabel(action) }, action.key)) : null) }));
|
|
13
|
-
const DropdownActions = ({ actions }) => (_jsx(Dropdown, { items: actions, placement: "bottom-end", children: _jsx(Button, { type: "button", state: "ghost", variant: "text", "aria-label": "More actions", className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-table-action-text transition-colors hover:bg-background/60 focus-visible:ring-border", children: _jsx(MoreHorizontal, { className: "h-5 w-5 opacity-70" }) }) }));
|
|
14
|
-
const AutoActionBtn = ({ actions }) => {
|
|
15
|
-
const containerRef = useRef(null);
|
|
16
|
-
const measureRef = useRef(null);
|
|
17
|
-
const [canShowInline, setCanShowInline] = useState(false);
|
|
18
|
-
const updateOverflow = useCallback(() => {
|
|
19
|
-
const container = containerRef.current;
|
|
20
|
-
const measure = measureRef.current;
|
|
21
|
-
if (!container || !measure) {
|
|
22
|
-
setCanShowInline(false);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const containerWidth = container.clientWidth;
|
|
26
|
-
const actionsWidth = measure.scrollWidth;
|
|
27
|
-
setCanShowInline(containerWidth > 0 && actionsWidth <= containerWidth);
|
|
28
|
-
}, []);
|
|
29
|
-
useLayoutEffect(() => {
|
|
30
|
-
if (!canShowInlineActions(actions))
|
|
31
|
-
return;
|
|
32
|
-
if (actions.length <= 1)
|
|
33
|
-
return;
|
|
34
|
-
updateOverflow();
|
|
35
|
-
let rafId = 0;
|
|
36
|
-
const scheduleUpdate = () => {
|
|
37
|
-
cancelAnimationFrame(rafId);
|
|
38
|
-
rafId = requestAnimationFrame(updateOverflow);
|
|
39
|
-
};
|
|
40
|
-
if (typeof ResizeObserver === 'undefined') {
|
|
41
|
-
window.addEventListener('resize', scheduleUpdate);
|
|
42
|
-
return () => {
|
|
43
|
-
cancelAnimationFrame(rafId);
|
|
44
|
-
window.removeEventListener('resize', scheduleUpdate);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
const observer = new ResizeObserver(scheduleUpdate);
|
|
48
|
-
if (containerRef.current) {
|
|
49
|
-
observer.observe(containerRef.current);
|
|
50
|
-
}
|
|
51
|
-
if (measureRef.current) {
|
|
52
|
-
observer.observe(measureRef.current);
|
|
53
|
-
}
|
|
54
|
-
window.addEventListener('resize', scheduleUpdate);
|
|
55
|
-
return () => {
|
|
56
|
-
cancelAnimationFrame(rafId);
|
|
57
|
-
observer.disconnect();
|
|
58
|
-
window.removeEventListener('resize', scheduleUpdate);
|
|
59
|
-
};
|
|
60
|
-
}, [actions, updateOverflow]);
|
|
61
|
-
if (actions.length === 0) {
|
|
62
|
-
return '-';
|
|
63
|
-
}
|
|
64
|
-
if (actions.length === 1) {
|
|
65
|
-
if (!canShowInlineActions(actions)) {
|
|
66
|
-
return _jsx(DropdownActions, { actions: actions });
|
|
67
|
-
}
|
|
68
|
-
return _jsx(InlineActions, { actions: actions });
|
|
69
|
-
}
|
|
70
|
-
if (!canShowInlineActions(actions)) {
|
|
71
|
-
return _jsx(DropdownActions, { actions: actions });
|
|
72
|
-
}
|
|
73
|
-
return (_jsxs("div", { ref: containerRef, className: "relative w-full min-w-0", children: [_jsx("div", { ref: measureRef, "aria-hidden": "true", className: "pointer-events-none invisible absolute left-0 top-0 w-max max-w-none", children: _jsx(InlineActions, { actions: actions }) }), canShowInline ? _jsx(InlineActions, { actions: actions }) : _jsx(DropdownActions, { actions: actions })] }));
|
|
74
|
-
};
|
|
75
|
-
export const ActionBtn = ({ actions, overflow }) => {
|
|
76
|
-
if (overflow === 'dropdown') {
|
|
77
|
-
return actions.length === 0 ? '-' : _jsx(DropdownActions, { actions: actions });
|
|
78
|
-
}
|
|
79
|
-
if (overflow === 'auto') {
|
|
80
|
-
return _jsx(AutoActionBtn, { actions: actions });
|
|
81
|
-
}
|
|
82
|
-
if (actions.length === 0) {
|
|
83
|
-
return '-';
|
|
84
|
-
}
|
|
85
|
-
if (overflow === 'inline') {
|
|
86
|
-
return canShowInlineActions(actions) ? (_jsx(InlineActions, { actions: actions })) : (_jsx(DropdownActions, { actions: actions }));
|
|
87
|
-
}
|
|
88
|
-
if (actions.length === 1) {
|
|
89
|
-
const action = actions[0];
|
|
90
|
-
if (!isInlineAction(action)) {
|
|
91
|
-
return _jsx(DropdownActions, { actions: actions });
|
|
92
|
-
}
|
|
93
|
-
return (_jsx(Button, { type: "button", onClick: action.onClick, className: "tc-ui-action-btn inline-flex items-center justify-center w-8 h-8 rounded transition-colors", children: action.label }));
|
|
94
|
-
}
|
|
95
|
-
return _jsx(DropdownActions, { actions: actions });
|
|
96
|
-
};
|