@_tc/template-core 0.0.1-bate.36 → 0.0.1-bate.38
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/cjs/app/controller/base.js +3 -3
- package/cjs/app/controller/project.js +1 -1
- package/cjs/app/controller/view.js +16 -7
- package/cjs/app/middleware/api-params-verify.js +10 -1
- package/cjs/app/middleware/error-handle.js +9 -3
- package/cjs/app/middleware/project-handler.js +1 -1
- package/cjs/app/router/view.js +3 -1
- package/cjs/app/router-schema/project.js +1 -1
- package/cjs/app/service/project.js +5 -0
- package/cjs/bundler/defaultAlias.js +5 -0
- package/cjs/bundler/dev.js +4 -3
- package/cjs/bundler/index.js +2 -1
- package/cjs/bundler/prod.js +4 -3
- package/cjs/bundler/utils.js +52 -23
- package/cjs/packages/common/LRUCache.js +4 -0
- package/cjs/packages/common/array/index.js +43 -0
- package/cjs/packages/common/cache/LRUCache.js +45 -0
- package/cjs/packages/common/cache/index.js +4 -0
- package/cjs/packages/common/guards/index.js +34 -0
- package/cjs/packages/common/i18n/default.js +95 -0
- package/cjs/packages/common/i18n/en-US.js +95 -0
- package/cjs/packages/common/i18n/index.js +178 -0
- package/cjs/packages/common/i18n/locales.js +17 -0
- package/cjs/packages/common/i18n/types.js +1 -0
- package/cjs/packages/common/index.js +65 -0
- package/cjs/packages/common/log/index.js +160 -0
- package/cjs/packages/common/number/index.js +14 -0
- package/cjs/packages/common/object/filterEmpty.js +32 -0
- package/cjs/packages/common/object/filtereEmpty.js +5 -0
- package/cjs/packages/common/object/index.js +26 -0
- package/cjs/packages/common/string/index.js +17 -0
- package/cjs/packages/common/types/index.js +1 -0
- package/cjs/packages/core/index.js +18 -13
- package/cjs/packages/core/loader/config.js +4 -2
- package/cjs/packages/core/loader/controller.js +2 -3
- package/cjs/packages/core/loader/extend.js +1 -2
- package/cjs/packages/core/loader/middleware.js +2 -3
- package/cjs/packages/core/loader/model.js +10 -6
- package/cjs/packages/core/loader/router-schema.js +4 -2
- package/cjs/packages/core/loader/router.js +24 -11
- package/cjs/packages/core/loader/service.js +2 -2
- package/cjs/packages/utils/runFileFn.js +46 -1
- package/esm/app/controller/base.js +3 -3
- package/esm/app/controller/project.js +3 -3
- package/esm/app/controller/view.js +16 -7
- package/esm/app/middleware/api-params-verify.js +10 -1
- package/esm/app/middleware/error-handle.js +9 -3
- package/esm/app/middleware/project-handler.js +1 -1
- package/esm/app/router/view.js +3 -1
- package/esm/app/router-schema/project.js +1 -1
- package/esm/app/service/project.js +5 -0
- package/esm/bundler/defaultAlias.js +4 -0
- package/esm/bundler/dev.js +4 -3
- package/esm/bundler/index.js +2 -1
- package/esm/bundler/prod.js +4 -3
- package/esm/bundler/utils.js +52 -23
- package/esm/index.js +2 -2
- package/esm/packages/common/LRUCache.js +2 -0
- package/esm/packages/common/array/index.js +37 -0
- package/esm/packages/common/cache/LRUCache.js +43 -0
- package/esm/packages/common/cache/index.js +2 -0
- package/esm/packages/common/guards/index.js +26 -0
- package/esm/packages/common/i18n/default.js +93 -0
- package/esm/packages/common/i18n/en-US.js +93 -0
- package/esm/packages/common/i18n/index.js +162 -0
- package/esm/packages/common/i18n/locales.js +11 -0
- package/esm/packages/common/i18n/types.js +0 -0
- package/esm/packages/common/index.js +13 -0
- package/esm/packages/common/log/index.js +146 -0
- package/esm/packages/common/number/index.js +11 -0
- package/esm/packages/common/object/filterEmpty.js +29 -0
- package/esm/packages/common/object/filtereEmpty.js +2 -0
- package/esm/packages/common/object/index.js +20 -0
- package/esm/packages/common/string/index.js +13 -0
- package/esm/packages/common/types/index.js +0 -0
- package/esm/packages/core/index.js +18 -14
- package/esm/packages/core/loader/config.js +4 -3
- package/esm/packages/core/loader/controller.js +2 -4
- package/esm/packages/core/loader/extend.js +1 -3
- package/esm/packages/core/loader/middleware.js +2 -4
- package/esm/packages/core/loader/model.js +10 -7
- package/esm/packages/core/loader/router-schema.js +4 -3
- package/esm/packages/core/loader/router.js +24 -12
- package/esm/packages/core/loader/service.js +2 -3
- package/esm/packages/utils/runFileFn.js +47 -1
- package/fe/frontend/dash/Dashboard.d.ts +7 -0
- package/fe/frontend/dash/Dashboard.js +73 -0
- package/fe/frontend/dash/dash.entry.d.ts +2 -0
- package/fe/frontend/dash/dash.entry.js +80 -0
- package/fe/frontend/index.d.ts +3 -0
- package/fe/frontend/index.js +1 -0
- package/fe/frontend/main.css +2 -184
- package/fe/frontend/main.d.ts +10 -3
- package/fe/frontend/main.js +15 -4
- package/fe/frontend/testPage/testPage.entry.js +1 -2
- package/fe/frontend/typing/window.d.ts +7 -0
- package/fe/frontend/typing/window.js +1 -0
- package/fe/frontend/widgets/api/baseInfo.d.ts +31 -0
- package/fe/frontend/widgets/api/baseInfo.js +15 -0
- package/fe/frontend/widgets/common/CRUD/CRUD.d.ts +70 -0
- package/fe/frontend/widgets/common/CRUD/CRUD.js +208 -0
- package/fe/frontend/widgets/common/CRUD/index.d.ts +2 -0
- package/fe/frontend/widgets/common/CRUD/index.js +1 -0
- package/fe/frontend/widgets/common/auth/index.d.ts +7 -0
- package/fe/frontend/widgets/common/auth/index.js +20 -0
- package/fe/frontend/widgets/common/generateMenuData.d.ts +4 -0
- package/fe/frontend/widgets/common/generateMenuData.js +14 -0
- package/fe/frontend/widgets/common/importComponent.d.ts +5 -0
- package/fe/frontend/widgets/common/importComponent.js +8 -0
- package/fe/frontend/widgets/common/language.d.ts +2 -0
- package/fe/frontend/widgets/common/language.js +9 -0
- package/fe/frontend/widgets/common/logFn/index.d.ts +4 -0
- package/fe/frontend/widgets/common/logFn/index.js +8 -0
- package/fe/frontend/widgets/common/menu.d.ts +34 -0
- package/fe/frontend/widgets/common/menu.js +101 -0
- package/fe/frontend/widgets/common/request.d.ts +36 -0
- package/fe/frontend/widgets/common/request.js +133 -0
- package/fe/frontend/widgets/components/BasePage/HeaderView.d.ts +9 -0
- package/fe/frontend/widgets/components/BasePage/HeaderView.js +16 -0
- package/fe/frontend/widgets/components/Router/index.d.ts +9 -0
- package/fe/frontend/widgets/components/Router/index.js +11 -0
- package/fe/frontend/widgets/components/Router/type.d.ts +2 -0
- package/fe/frontend/widgets/components/Router/type.js +1 -0
- package/fe/frontend/widgets/defaultPages/Iframe/index.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Iframe/index.js +14 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/DetailPanel.d.ts +7 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/DetailPanel.js +94 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/PopFrom.d.ts +13 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/PopFrom.js +124 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/data.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/CallCom/data.js +6 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/SchemaSearch/index.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/SchemaSearch/index.js +63 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/SchemaTable/index.d.ts +11 -0
- package/fe/frontend/widgets/defaultPages/Schema/components/SchemaTable/index.js +188 -0
- package/fe/frontend/widgets/defaultPages/Schema/data/eventInfo.d.ts +8 -0
- package/fe/frontend/widgets/defaultPages/Schema/data/eventInfo.js +6 -0
- package/fe/frontend/widgets/defaultPages/Schema/data/index.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/data/index.js +1 -0
- package/fe/frontend/widgets/defaultPages/Schema/hooks/useComConfig.d.ts +10 -0
- package/fe/frontend/widgets/defaultPages/Schema/hooks/useComConfig.js +14 -0
- package/fe/frontend/widgets/defaultPages/Schema/index.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/index.js +74 -0
- package/fe/frontend/widgets/defaultPages/Schema/schemaType.d.ts +50 -0
- package/fe/frontend/widgets/defaultPages/Schema/schemaType.js +4 -0
- package/fe/frontend/widgets/defaultPages/Schema/stores/schemaEventBus.d.ts +42 -0
- package/fe/frontend/widgets/defaultPages/Schema/stores/schemaEventBus.js +70 -0
- package/fe/frontend/widgets/defaultPages/Schema/stores/schemaStore.d.ts +47 -0
- package/fe/frontend/widgets/defaultPages/Schema/stores/schemaStore.js +26 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/fetchErrorShow.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/fetchErrorShow.js +8 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/permissions.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/permissions.js +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/schemaConversion.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/schemaConversion.js +115 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/validator.d.ts +7 -0
- package/fe/frontend/widgets/defaultPages/Schema/utils/validator.js +36 -0
- package/fe/frontend/widgets/defaultPages/SidebarSlotPage/SidebarSlotContainer.d.ts +10 -0
- package/fe/frontend/widgets/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +38 -0
- package/fe/frontend/widgets/defaultPages/SidebarSlotPage/index.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/SidebarSlotPage/index.js +16 -0
- package/fe/frontend/widgets/defaultPages/SidebarSlotPageTmp.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/SidebarSlotPageTmp.js +17 -0
- package/fe/frontend/widgets/defaultPages/SlotPage/index.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/SlotPage/index.js +26 -0
- package/fe/frontend/widgets/defaultPages/Todo.d.ts +3 -0
- package/fe/frontend/widgets/defaultPages/Todo.js +5 -0
- package/fe/frontend/widgets/hooks/useCurrentMenuData.d.ts +19 -0
- package/fe/frontend/widgets/hooks/useCurrentMenuData.js +28 -0
- package/fe/frontend/widgets/hooks/useRouterParams.d.ts +5 -0
- package/fe/frontend/widgets/hooks/useRouterParams.js +11 -0
- package/fe/frontend/widgets/store/mode.d.ts +19 -0
- package/fe/frontend/widgets/store/mode.js +37 -0
- package/fe/model/types/data/button.d.ts +32 -0
- package/fe/model/types/data/button.js +16 -0
- package/fe/model/types/data/component.d.ts +61 -0
- package/fe/model/types/data/component.js +11 -0
- package/fe/model/types/data/fetchInfo.d.ts +20 -0
- package/fe/model/types/data/fetchInfo.js +1 -0
- package/fe/model/types/data/schema.d.ts +98 -0
- package/fe/model/types/data/schema.js +1 -0
- package/fe/model/types/data/search.d.ts +7 -0
- package/fe/model/types/data/search.js +1 -0
- package/fe/model/types/menuType.d.ts +73 -0
- package/fe/model/types/menuType.js +1 -0
- package/fe/model/types/model.d.ts +33 -0
- package/fe/model/types/model.js +1 -0
- package/fe/packages/common/array/index.d.ts +7 -0
- package/fe/packages/common/array/index.js +40 -0
- package/fe/packages/common/cache/LRUCache.d.ts +13 -0
- package/fe/packages/common/cache/LRUCache.js +47 -0
- package/fe/packages/common/cache/index.d.ts +2 -0
- package/fe/packages/common/cache/index.js +1 -0
- package/fe/packages/common/guards/index.d.ts +9 -0
- package/fe/packages/common/guards/index.js +24 -0
- package/fe/packages/common/i18n/default.d.ts +92 -0
- package/fe/packages/common/i18n/default.js +90 -0
- package/fe/packages/common/i18n/en-US.d.ts +92 -0
- package/fe/packages/common/i18n/en-US.js +90 -0
- package/fe/packages/common/i18n/index.d.ts +43 -0
- package/fe/packages/common/i18n/index.js +173 -0
- package/fe/packages/common/i18n/locales.d.ts +8 -0
- package/fe/packages/common/i18n/locales.js +10 -0
- package/fe/packages/common/i18n/types.d.ts +71 -0
- package/fe/packages/common/i18n/types.js +1 -0
- package/fe/packages/common/index.d.ts +10 -0
- package/fe/packages/common/index.js +9 -0
- package/fe/packages/common/log/index.d.ts +33 -0
- package/fe/packages/common/log/index.js +176 -0
- package/fe/packages/common/number/index.d.ts +3 -0
- package/fe/packages/common/number/index.js +10 -0
- package/fe/packages/common/object/filterEmpty.d.ts +3 -0
- package/fe/packages/common/object/filterEmpty.js +33 -0
- package/fe/packages/common/object/index.d.ts +5 -0
- package/fe/packages/common/object/index.js +25 -0
- package/fe/packages/common/string/index.d.ts +4 -0
- package/fe/packages/common/string/index.js +17 -0
- package/fe/packages/common/types/index.d.ts +4 -0
- package/fe/packages/common/types/index.js +1 -0
- package/fe/packages/ui/react/components/Button/Button.d.ts +29 -10
- package/fe/packages/ui/react/components/Button/Button.js +53 -23
- package/fe/packages/ui/react/components/Button/SumbitButton.d.ts +2 -2
- package/fe/packages/ui/react/components/Button/SumbitButton.js +3 -10
- package/fe/packages/ui/react/components/Button/index.d.ts +1 -1
- package/fe/packages/ui/react/components/Checkbox/Checkbox.d.ts +1 -1
- package/fe/packages/ui/react/components/Checkbox/Checkbox.js +5 -3
- package/fe/packages/ui/react/components/ConfirmDialog/ConfirmDialog.js +11 -0
- package/fe/packages/ui/react/components/ConfirmDialog/index.d.ts +2 -0
- package/fe/packages/ui/react/components/ConfirmDialog/index.js +1 -0
- package/fe/packages/ui/react/components/DataTable/ActionBtn.d.ts +3 -1
- package/fe/packages/ui/react/components/DataTable/ActionBtn.js +85 -4
- package/fe/packages/ui/react/components/DataTable/{data-table.d.ts → index.d.ts} +10 -4
- package/fe/packages/ui/react/components/DataTable/{data-table.js → index.js} +58 -44
- package/fe/packages/ui/react/components/Date/Calendar.js +4 -3
- package/fe/packages/ui/react/components/Date/Date.d.ts +5 -3
- package/fe/packages/ui/react/components/Date/Date.js +71 -48
- package/fe/packages/ui/react/components/Date/TimePicker.js +3 -1
- package/fe/packages/ui/react/components/Date/dropdownPositioning.d.ts +3 -0
- package/fe/packages/ui/react/components/Date/dropdownPositioning.js +12 -0
- package/fe/packages/ui/react/components/Date/locales.d.ts +1 -0
- package/fe/packages/ui/react/components/Date/locales.js +7 -38
- package/fe/packages/ui/react/components/Drawer/Drawer.d.ts +29 -0
- package/fe/packages/ui/react/components/Drawer/Drawer.js +100 -0
- package/fe/packages/ui/react/components/Drawer/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Drawer/index.js +1 -0
- package/fe/packages/ui/react/components/Dropdown/Dropdown.d.ts +25 -0
- package/fe/packages/ui/react/components/Dropdown/Dropdown.js +28 -0
- package/fe/packages/ui/react/components/Dropdown/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Dropdown/index.js +1 -0
- package/fe/packages/ui/react/components/Form/Form.js +1 -1
- package/fe/packages/ui/react/components/Form/FormItem.js +1 -1
- package/fe/packages/ui/react/components/Form/SchemaForm/data.d.ts +45 -0
- package/fe/packages/ui/react/components/Form/{SchemeForm → SchemaForm}/data.js +9 -1
- package/fe/packages/ui/react/components/Form/{SchemeForm → SchemaForm}/index.d.ts +15 -14
- package/fe/packages/ui/react/components/Form/SchemaForm/index.js +79 -0
- package/fe/packages/ui/react/components/Form/index.d.ts +1 -1
- package/fe/packages/ui/react/components/Form/index.js +1 -1
- package/fe/packages/ui/react/components/ImagePreview/ImagePreview.js +15 -12
- package/fe/packages/ui/react/components/ImagePreview/PreviewImage.js +5 -2
- package/fe/packages/ui/react/components/Input/Input.d.ts +5 -1
- package/fe/packages/ui/react/components/Input/Input.js +5 -4
- package/fe/packages/ui/react/components/InputNumber/InputNumber.d.ts +28 -0
- package/fe/packages/ui/react/components/InputNumber/InputNumber.js +144 -0
- package/fe/packages/ui/react/components/InputNumber/index.d.ts +2 -0
- package/fe/packages/ui/react/components/InputNumber/index.js +1 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.d.ts +30 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.js +63 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.d.ts +2 -0
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.js +27 -0
- package/fe/packages/ui/react/components/Label/Label.js +2 -2
- package/fe/packages/ui/react/components/Menu/Menu.d.ts +18 -0
- package/fe/packages/ui/react/components/Menu/Menu.js +102 -0
- package/fe/packages/ui/react/components/Menu/MenuContext.d.ts +39 -0
- package/fe/packages/ui/react/components/Menu/MenuContext.js +97 -0
- package/fe/packages/ui/react/components/Menu/MenuItem.d.ts +3 -0
- package/fe/packages/ui/react/components/Menu/MenuItem.js +33 -0
- package/fe/packages/ui/react/components/Menu/SubMenu.d.ts +10 -0
- package/fe/packages/ui/react/components/Menu/SubMenu.js +169 -0
- package/fe/packages/ui/react/components/Menu/index.d.ts +9 -0
- package/fe/packages/ui/react/components/Menu/index.js +5 -0
- package/fe/packages/ui/react/components/Menu/menuTypes.d.ts +59 -0
- package/fe/packages/ui/react/components/Menu/menuTypes.js +1 -0
- package/fe/packages/ui/react/components/Menu/utils.d.ts +2 -0
- package/fe/packages/ui/react/components/Menu/utils.js +7 -0
- package/fe/packages/ui/react/components/Message/Message.js +4 -1
- package/fe/packages/ui/react/components/Modal/Modal.d.ts +3 -1
- package/fe/packages/ui/react/components/Modal/Modal.js +6 -43
- package/fe/packages/ui/react/components/Modal/ModalManager.js +4 -3
- package/fe/packages/ui/react/components/Overlay/Overlay.d.ts +23 -0
- package/fe/packages/ui/react/components/Overlay/Overlay.js +53 -0
- package/fe/packages/ui/react/components/Overlay/index.d.ts +3 -0
- package/fe/packages/ui/react/components/Overlay/index.js +1 -0
- package/fe/packages/ui/react/components/{Pagination.js → Pagination/Pagination.js} +4 -4
- package/fe/packages/ui/react/components/Pagination/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Pagination/index.js +1 -0
- package/fe/packages/ui/react/components/Popup/Popup.d.ts +26 -0
- package/fe/packages/ui/react/components/Popup/Popup.js +81 -0
- package/fe/packages/ui/react/components/Popup/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Popup/index.js +1 -0
- package/fe/packages/ui/react/components/Search/Search.d.ts +2 -2
- package/fe/packages/ui/react/components/Search/Search.js +3 -3
- package/fe/packages/ui/react/components/Select/Select.d.ts +5 -0
- package/fe/packages/ui/react/components/Select/Select.js +52 -109
- package/fe/packages/ui/react/components/Select/dropdownPositioning.d.ts +3 -0
- package/fe/packages/ui/react/components/Select/dropdownPositioning.js +13 -0
- package/fe/packages/ui/react/components/Skeleton/Skeleton.js +2 -2
- package/fe/packages/ui/react/components/Switch/Switch.js +3 -1
- package/fe/packages/ui/react/components/TableSearch/TableSearch.d.ts +5 -4
- package/fe/packages/ui/react/components/TableSearch/TableSearch.js +23 -21
- package/fe/packages/ui/react/components/TableSearch/lang.js +5 -14
- package/fe/packages/ui/react/components/{Textarea.d.ts → Textarea/Textarea.d.ts} +11 -3
- package/fe/packages/ui/react/components/Textarea/Textarea.js +37 -0
- package/fe/packages/ui/react/components/Textarea/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Textarea/index.js +1 -0
- package/fe/packages/ui/react/components/{Tooltip.d.ts → Tooltip/Tooltip.d.ts} +2 -2
- package/fe/packages/ui/react/components/Tooltip/Tooltip.js +79 -0
- package/fe/packages/ui/react/components/Tooltip/index.d.ts +2 -0
- package/fe/packages/ui/react/components/Tooltip/index.js +1 -0
- package/fe/packages/ui/react/components/{TreeSelect.js → TreeSelect/TreeSelect.js} +9 -11
- package/fe/packages/ui/react/components/TreeSelect/index.d.ts +2 -0
- package/fe/packages/ui/react/components/TreeSelect/index.js +1 -0
- package/fe/packages/ui/react/components/Upload/ImageUpload.js +18 -6
- package/fe/packages/ui/react/components/Upload/Upload.js +2 -1
- package/fe/packages/ui/react/components/{breadcrumb.js → breadcrumb/breadcrumb.js} +15 -12
- package/fe/packages/ui/react/components/breadcrumb/index.d.ts +2 -0
- package/fe/packages/ui/react/components/breadcrumb/index.js +1 -0
- package/fe/packages/ui/react/components/hooks/useDropdownPositioning.d.ts +49 -0
- package/fe/packages/ui/react/components/hooks/useDropdownPositioning.js +137 -0
- package/fe/packages/ui/react/components/index.d.ts +7 -1
- package/fe/packages/ui/react/components/index.js +7 -1
- package/fe/packages/ui/react/components/table/index.d.ts +2 -0
- package/fe/packages/ui/react/components/table/index.js +1 -0
- package/fe/packages/ui/react/components/table/table.js +20 -0
- package/fe/packages/ui/react/components/testPage/MenuTestPage.d.ts +2 -0
- package/fe/packages/ui/react/components/testPage/MenuTestPage.js +104 -0
- package/fe/packages/ui/react/components/testPage/index.js +277 -81
- package/fe/packages/ui/react/hooks/useExecuteOnce.d.ts +30 -0
- package/fe/packages/ui/react/hooks/useExecuteOnce.js +57 -0
- package/fe/packages/ui/react/hooks/useInit.d.ts +1 -1
- package/fe/packages/ui/react/hooks/useInit.js +1 -1
- package/fe/packages/ui/react/hooks/useLanguage.d.ts +1 -6
- package/fe/packages/ui/react/hooks/useRefState.d.ts +30 -0
- package/fe/packages/ui/react/hooks/useRefState.js +29 -0
- package/fe/packages/ui/react/hooks/useWatch.d.ts +23 -0
- package/fe/packages/ui/react/hooks/useWatch.js +87 -0
- package/fe/packages/ui/react/hooks/useWatch.test.d.ts +2 -0
- package/fe/packages/ui/react/hooks/useWatch.test.js +22 -0
- package/fe/packages/ui/react/i18n/I18nProvider.d.ts +31 -0
- package/fe/packages/ui/react/i18n/I18nProvider.js +25 -0
- package/fe/packages/ui/react/i18n/index.d.ts +4 -0
- package/fe/packages/ui/react/i18n/index.js +3 -0
- package/fe/packages/ui/react/i18n/useI18n.d.ts +13 -0
- package/fe/packages/ui/react/i18n/useI18n.js +18 -0
- package/fe/packages/ui/react/index.css +238 -0
- package/fe/packages/ui/react/index.d.ts +2 -0
- package/fe/packages/ui/react/index.js +2 -0
- package/fe/packages/ui/react/lib/createStoreHook.d.ts +9 -0
- package/fe/packages/ui/react/lib/createStoreHook.js +6 -0
- package/fe/packages/ui/react/lib/export.d.ts +2 -2
- package/fe/packages/ui/react/stores/language.d.ts +3 -12
- package/fe/packages/ui/react/stores/language.js +2 -51
- package/fe/typings/type.d.ts +5 -0
- package/fe/typings/type.js +1 -0
- package/model/index.d.ts +2 -0
- package/model/types/data/button.d.ts +32 -0
- package/model/types/data/component.d.ts +61 -0
- package/model/types/data/fetchInfo.d.ts +20 -0
- package/model/types/data/schema.d.ts +98 -0
- package/model/types/data/search.d.ts +7 -0
- package/model/types/index.d.ts +2 -0
- package/model/types/menuType.d.ts +73 -0
- package/model/types/model.d.ts +33 -0
- package/model/types/test.d.ts +2 -0
- package/package.json +20 -6
- package/types/app/controller/base.d.ts +3 -3
- package/types/app/router/view.d.ts +2 -3
- package/types/app/service/project.d.ts +29 -4
- package/types/app/type.d.ts +1 -0
- package/types/app/typings.d.ts +12 -21
- package/types/bundler/defaultAlias.d.ts +3 -0
- package/types/bundler/utils.d.ts +1 -1
- package/types/config/config.default.d.ts +14 -0
- package/types/packages/common/LRUCache.d.ts +1 -0
- package/types/packages/common/array/index.d.ts +6 -0
- package/types/packages/common/cache/LRUCache.d.ts +12 -0
- package/types/packages/common/cache/index.d.ts +1 -0
- package/types/packages/common/guards/index.d.ts +8 -0
- package/types/packages/common/i18n/default.d.ts +86 -0
- package/types/packages/common/i18n/en-US.d.ts +86 -0
- package/types/packages/common/i18n/index.d.ts +18 -0
- package/types/packages/common/i18n/locales.d.ts +7 -0
- package/types/packages/common/i18n/types.d.ts +46 -0
- package/types/packages/common/index.d.ts +9 -0
- package/types/packages/common/log/index.d.ts +32 -0
- package/types/packages/common/number/index.d.ts +2 -0
- package/types/packages/common/object/filterEmpty.d.ts +2 -0
- package/types/packages/common/object/filtereEmpty.d.ts +1 -0
- package/types/packages/common/object/index.d.ts +4 -0
- package/types/packages/common/string/index.d.ts +3 -0
- package/types/packages/common/types/index.d.ts +3 -0
- package/types/packages/core/index.d.ts +1 -1
- package/types/packages/core/loader/router.d.ts +1 -1
- package/types/packages/core/types.d.ts +12 -3
- package/types/packages/utils/runFileFn.d.ts +5 -3
- package/fe/packages/ui/react/components/ConfirmDialog.js +0 -9
- package/fe/packages/ui/react/components/Dropdown.d.ts +0 -16
- package/fe/packages/ui/react/components/Dropdown.js +0 -54
- package/fe/packages/ui/react/components/Form/SchemeForm/data.d.ts +0 -51
- package/fe/packages/ui/react/components/Form/SchemeForm/index.js +0 -69
- package/fe/packages/ui/react/components/Textarea.js +0 -35
- package/fe/packages/ui/react/components/Tooltip.js +0 -118
- package/fe/packages/ui/react/components/table.js +0 -20
- package/fe/packages/ui/react/locales/index.d.ts +0 -8
- package/fe/packages/ui/react/locales/index.js +0 -6
- /package/fe/packages/ui/react/components/{ConfirmDialog.d.ts → ConfirmDialog/ConfirmDialog.d.ts} +0 -0
- /package/fe/packages/ui/react/components/{Pagination.d.ts → Pagination/Pagination.d.ts} +0 -0
- /package/fe/packages/ui/react/components/{TreeSelect.d.ts → TreeSelect/TreeSelect.d.ts} +0 -0
- /package/fe/packages/ui/react/components/{breadcrumb.d.ts → breadcrumb/breadcrumb.d.ts} +0 -0
- /package/fe/packages/ui/react/components/{table.d.ts → table/table.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require("../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
//#region app/controller/base.ts
|
|
3
|
-
var
|
|
3
|
+
var getBaseController = (app) => class BaseController {
|
|
4
4
|
app;
|
|
5
5
|
config;
|
|
6
6
|
constructor() {
|
|
@@ -21,9 +21,9 @@ var base_default = (app) => class BaseController {
|
|
|
21
21
|
ctx.body = {
|
|
22
22
|
data,
|
|
23
23
|
code,
|
|
24
|
-
message
|
|
24
|
+
message: message ?? "ok"
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
|
-
module.exports =
|
|
29
|
+
module.exports = getBaseController;
|
|
@@ -32,7 +32,7 @@ var getProjectController = (app) => {
|
|
|
32
32
|
this.success(ctx, dtoModelList);
|
|
33
33
|
};
|
|
34
34
|
getProjectList = async (ctx) => {
|
|
35
|
-
const {
|
|
35
|
+
const { projk: projectKey } = ctx.query;
|
|
36
36
|
const dtoProject = (await this.service.project.getList(projectKey))?.map((project) => {
|
|
37
37
|
const { modelKey, key, name, desc, homePage } = project;
|
|
38
38
|
return {
|
|
@@ -2,13 +2,22 @@ require("../../_virtual/_rolldown/runtime.js");
|
|
|
2
2
|
//#region app/controller/view.ts
|
|
3
3
|
var getViewController = (app) => class ViewController {
|
|
4
4
|
async renderPage(ctx) {
|
|
5
|
-
app.extends.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
app.extends.logger.log(" - render page: " + ctx.params.page);
|
|
6
|
+
try {
|
|
7
|
+
app.extends.renderView(`dist/${ctx.params.page}.entry.tpl`, ctx, {
|
|
8
|
+
projKey: ctx.query.projk,
|
|
9
|
+
name: app.options?.name,
|
|
10
|
+
env: app.envs.get(),
|
|
11
|
+
basePath: `${app.options.pageBasePage}${ctx.params.page}`,
|
|
12
|
+
options: JSON.stringify(app.options)
|
|
13
|
+
});
|
|
14
|
+
} catch (error) {
|
|
15
|
+
app.extends.generateErrorMessage("template not found", {
|
|
16
|
+
status: 404,
|
|
17
|
+
showError: true,
|
|
18
|
+
code: 0
|
|
19
|
+
});
|
|
20
|
+
}
|
|
12
21
|
}
|
|
13
22
|
};
|
|
14
23
|
//#endregion
|
|
@@ -14,7 +14,16 @@ var validateFN = (key, data, schema) => {
|
|
|
14
14
|
var api_params_verify_default = (app) => async (ctx, next) => {
|
|
15
15
|
const { path, method } = ctx;
|
|
16
16
|
if (path.indexOf("/api") < 0) return next();
|
|
17
|
-
const
|
|
17
|
+
const currentUseRouter = app.currentUseRouter;
|
|
18
|
+
let route;
|
|
19
|
+
for (const r of currentUseRouter) {
|
|
20
|
+
const data = r.match(path, "get");
|
|
21
|
+
if (data) {
|
|
22
|
+
route = data;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const routePath = route?.path[0]?.path;
|
|
18
27
|
if (routePath) {
|
|
19
28
|
const params = app.extends.parsingParamsOnUrl(routePath, path);
|
|
20
29
|
const { body, query, headers } = ctx.request;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require("../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
//#region app/middleware/error-handle.ts
|
|
3
|
+
var redirectInfo = {};
|
|
3
4
|
var error_handle_default = (app) => async (ctx, next) => {
|
|
4
5
|
try {
|
|
5
6
|
await next();
|
|
@@ -9,9 +10,14 @@ var error_handle_default = (app) => async (ctx, next) => {
|
|
|
9
10
|
app.extends.logger?.error("-- [excption] --", error);
|
|
10
11
|
app.extends.logger?.error("-- [excption] info --", status, message, detail);
|
|
11
12
|
if (message?.includes("template not found")) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const url = ctx.req.url;
|
|
14
|
+
if (redirectInfo[url] !== void 0) redirectInfo[url] += 1;
|
|
15
|
+
else redirectInfo[url] = 0;
|
|
16
|
+
if (redirectInfo[url] < app.config.notFoundRedirectCount) {
|
|
17
|
+
ctx.status = 302;
|
|
18
|
+
ctx.redirect(app.options?.homePage ?? "/");
|
|
19
|
+
return;
|
|
20
|
+
} else redirectInfo[url] = 0;
|
|
15
21
|
}
|
|
16
22
|
if (returnError) {
|
|
17
23
|
ctx.status = status;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
//#region app/middleware/project-handler.ts
|
|
3
3
|
var project_handler_default = () => async (ctx, next) => {
|
|
4
|
-
const key = ctx.headers.
|
|
4
|
+
const key = ctx.headers.projk;
|
|
5
5
|
const { path } = ctx;
|
|
6
6
|
if (path.indexOf("/api/proj/") !== -1) {
|
|
7
7
|
if (!key || ["undefined", "null"].includes(key)) {
|
package/cjs/app/router/view.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
require("../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
//#region app/router/view.ts
|
|
3
3
|
var view_default = (app, router) => {
|
|
4
|
-
|
|
4
|
+
const { pageBasePage } = app.options;
|
|
5
|
+
router.level = 2;
|
|
6
|
+
router.get([`${pageBasePage}:page`, `${pageBasePage}:page/:r(.*)`], app.controller.view.renderPage.bind(app.controller.view));
|
|
5
7
|
};
|
|
6
8
|
//#endregion
|
|
7
9
|
module.exports = view_default;
|
package/cjs/bundler/dev.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_packages_common_log_index = require("../packages/common/log/index.js");
|
|
3
4
|
const require_bundler_utils = require("./utils.js");
|
|
4
5
|
//#region bundler/dev.ts
|
|
5
6
|
var init = async () => {
|
|
6
7
|
const input = require_bundler_utils.entries();
|
|
7
|
-
|
|
8
|
+
require_packages_common_log_index.logGreen(input);
|
|
8
9
|
if (!Object.keys(input).length) {
|
|
9
|
-
|
|
10
|
+
require_packages_common_log_index.logRed("no entry found");
|
|
10
11
|
process.exit(1);
|
|
11
12
|
}
|
|
12
|
-
await require_bundler_utils.VBuildFE(input);
|
|
13
|
+
await require_bundler_utils.VBuildFE(input, "dev");
|
|
13
14
|
};
|
|
14
15
|
async function dev() {
|
|
15
16
|
await init();
|
package/cjs/bundler/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_packages_common_log_index = require("../packages/common/log/index.js");
|
|
3
4
|
const require_bundler_dev = require("./dev.js");
|
|
4
5
|
const require_bundler_prod = require("./prod.js");
|
|
5
6
|
//#region bundler/index.ts
|
|
@@ -11,7 +12,7 @@ var buildFE = (mode) => {
|
|
|
11
12
|
case "prod":
|
|
12
13
|
require_bundler_prod.prod();
|
|
13
14
|
break;
|
|
14
|
-
default:
|
|
15
|
+
default: require_packages_common_log_index.logRed("Usage: npx tsx scripts/index.ts [dev|prod]");
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
18
|
//#endregion
|
package/cjs/bundler/prod.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_packages_common_log_index = require("../packages/common/log/index.js");
|
|
3
4
|
const require_bundler_utils = require("./utils.js");
|
|
4
5
|
//#region bundler/prod.ts
|
|
5
6
|
async function prod() {
|
|
6
7
|
const input = require_bundler_utils.entries();
|
|
7
8
|
if (!Object.keys(input).length) {
|
|
8
|
-
|
|
9
|
+
require_packages_common_log_index.logRed("no entry found");
|
|
9
10
|
process.exit(1);
|
|
10
11
|
}
|
|
11
12
|
try {
|
|
12
13
|
await require_bundler_utils.VBuildFE(input);
|
|
13
|
-
|
|
14
|
+
require_packages_common_log_index.logGreen("build done");
|
|
14
15
|
} catch (err) {
|
|
15
|
-
|
|
16
|
+
require_packages_common_log_index.logRed(String(err));
|
|
16
17
|
process.exit(1);
|
|
17
18
|
}
|
|
18
19
|
}
|
package/cjs/bundler/utils.js
CHANGED
|
@@ -2,14 +2,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.js");
|
|
3
3
|
const require_packages_utils_path = require("../packages/utils/path.js");
|
|
4
4
|
require("../packages/utils/index.js");
|
|
5
|
+
const require_packages_common_log_index = require("../packages/common/log/index.js");
|
|
5
6
|
let path = require("path");
|
|
6
7
|
path = require_runtime.__toESM(path);
|
|
7
8
|
let glob = require("glob");
|
|
8
9
|
glob = require_runtime.__toESM(glob);
|
|
9
|
-
let vite = require("vite");
|
|
10
10
|
let fs = require("fs");
|
|
11
11
|
let _tailwindcss_vite = require("@tailwindcss/vite");
|
|
12
12
|
_tailwindcss_vite = require_runtime.__toESM(_tailwindcss_vite);
|
|
13
|
+
let vite = require("vite");
|
|
13
14
|
//#region bundler/utils.ts
|
|
14
15
|
var base = process.cwd();
|
|
15
16
|
var framePath = path.default.resolve(__dirname, "../../");
|
|
@@ -23,8 +24,8 @@ var runFEPath = path.default.resolve(runPath, "./frontend");
|
|
|
23
24
|
* 生成入口
|
|
24
25
|
*/
|
|
25
26
|
function entries() {
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
require_packages_common_log_index.logWhite("frameFEPath: " + frameFEPath);
|
|
28
|
+
require_packages_common_log_index.logWhite("runFEPath: " + runFEPath);
|
|
28
29
|
/**
|
|
29
30
|
* 所有包含 entry 的文件
|
|
30
31
|
*/
|
|
@@ -77,12 +78,11 @@ var watchFiles = async (callback) => {
|
|
|
77
78
|
watcher.on("change", async (filePath) => {
|
|
78
79
|
if (building) return;
|
|
79
80
|
building = true;
|
|
80
|
-
|
|
81
|
+
require_packages_common_log_index.logYellow(`changed: ${filePath}`);
|
|
81
82
|
await callback?.();
|
|
82
|
-
console.log("rebuild done");
|
|
83
83
|
building = false;
|
|
84
84
|
});
|
|
85
|
-
|
|
85
|
+
require_packages_common_log_index.logYellow(`watching ${runFEPath}/...`);
|
|
86
86
|
};
|
|
87
87
|
/**
|
|
88
88
|
*
|
|
@@ -127,26 +127,55 @@ function flattenHtmlPlugin(suffix = ".html") {
|
|
|
127
127
|
* ------------------
|
|
128
128
|
*/
|
|
129
129
|
const endFiles = glob.sync("**/*" + suffix, { cwd: feDir });
|
|
130
|
-
for (const f of endFiles)
|
|
130
|
+
for (const f of endFiles) require_packages_common_log_index.logYellow("final file path -----> " + f);
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
134
|
+
/**
|
|
135
|
+
* 处理别名目录兜底
|
|
136
|
+
* 如果 alias 指向的路径不存在,则使用 ./defaultAlias 兜底文件
|
|
137
|
+
*/
|
|
138
|
+
function resolveAliasWithFallback(aliasList) {
|
|
139
|
+
const aliasExtensions = [
|
|
140
|
+
"",
|
|
141
|
+
".ts",
|
|
142
|
+
".tsx",
|
|
143
|
+
".js",
|
|
144
|
+
".jsx"
|
|
145
|
+
];
|
|
146
|
+
return aliasList.reduce((o, [aliasName, aliasPath]) => {
|
|
147
|
+
const businessFilePath = aliasExtensions.map((ext) => path.default.resolve(runFEPath, aliasPath + ext)).find((filePath) => (0, fs.existsSync)(filePath));
|
|
148
|
+
let filePath = path.default.resolve(__dirname, "./defaultAlias");
|
|
149
|
+
if (businessFilePath) filePath = businessFilePath;
|
|
150
|
+
o[aliasName] = filePath;
|
|
151
|
+
return o;
|
|
152
|
+
}, {});
|
|
153
|
+
}
|
|
154
|
+
var VBuildFE = async (input, OperatingEnv) => {
|
|
155
|
+
try {
|
|
156
|
+
await (0, vite.build)({
|
|
157
|
+
configFile: false,
|
|
158
|
+
base: "/dist",
|
|
159
|
+
plugins: [
|
|
160
|
+
(await import("@vitejs/plugin-react")).default(),
|
|
161
|
+
flattenHtmlPlugin(".tpl"),
|
|
162
|
+
(0, _tailwindcss_vite.default)()
|
|
163
|
+
],
|
|
164
|
+
build: {
|
|
165
|
+
outDir: outDir(),
|
|
166
|
+
emptyOutDir: true,
|
|
167
|
+
sourcemap: OperatingEnv === "dev" ? "inline" : "hidden",
|
|
168
|
+
rollupOptions: { input }
|
|
169
|
+
},
|
|
170
|
+
resolve: { alias: {
|
|
171
|
+
"@tc/ui-react": path.default.resolve(__dirname, "../../fe/packages/ui/react/"),
|
|
172
|
+
...resolveAliasWithFallback([["$business/SchemaForm/data", "./extended/SchemaForm/data"]])
|
|
173
|
+
} }
|
|
174
|
+
});
|
|
175
|
+
require_packages_common_log_index.logJoinColorized(require_packages_common_log_index.colorize("builded", "green"), require_packages_common_log_index.colorize(" -> ", "white"), require_packages_common_log_index.colorize("time: ", "cyan"), require_packages_common_log_index.colorize(/* @__PURE__ */ new Date(), "pink"));
|
|
176
|
+
} catch (error) {
|
|
177
|
+
require_packages_common_log_index.logRed(error);
|
|
178
|
+
}
|
|
150
179
|
};
|
|
151
180
|
//#endregion
|
|
152
181
|
exports.VBuildFE = VBuildFE;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_packages_common_guards_index = require("../guards/index.js");
|
|
4
|
+
//#region packages/common/array/index.ts
|
|
5
|
+
function toArray(value) {
|
|
6
|
+
if (value === null || value === void 0) return [];
|
|
7
|
+
return Array.isArray(value) ? [...value] : [value];
|
|
8
|
+
}
|
|
9
|
+
var compact = (items) => {
|
|
10
|
+
return items.filter(require_packages_common_guards_index.isNonNullable);
|
|
11
|
+
};
|
|
12
|
+
var uniqueBy = (items, getKey) => {
|
|
13
|
+
const keys = /* @__PURE__ */ new Set();
|
|
14
|
+
const result = [];
|
|
15
|
+
for (const item of items) {
|
|
16
|
+
const key = getKey(item);
|
|
17
|
+
if (keys.has(key)) continue;
|
|
18
|
+
keys.add(key);
|
|
19
|
+
result.push(item);
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
var groupBy = (items, getKey) => {
|
|
24
|
+
const result = {};
|
|
25
|
+
for (const item of items) {
|
|
26
|
+
const key = getKey(item);
|
|
27
|
+
result[key] = result[key] ?? [];
|
|
28
|
+
result[key].push(item);
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var chunk = (items, size) => {
|
|
33
|
+
if (!Number.isInteger(size) || size <= 0) throw new RangeError("chunk size must be a positive integer");
|
|
34
|
+
const result = [];
|
|
35
|
+
for (let index = 0; index < items.length; index += size) result.push(items.slice(index, index + size));
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.chunk = chunk;
|
|
40
|
+
exports.compact = compact;
|
|
41
|
+
exports.groupBy = groupBy;
|
|
42
|
+
exports.toArray = toArray;
|
|
43
|
+
exports.uniqueBy = uniqueBy;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
//#region packages/common/cache/LRUCache.ts
|
|
4
|
+
var LRUCache = class {
|
|
5
|
+
limit;
|
|
6
|
+
data;
|
|
7
|
+
constructor(limit) {
|
|
8
|
+
if (!Number.isInteger(limit) || limit <= 0) throw new Error("LRUCache limit must be a positive integer");
|
|
9
|
+
this.limit = limit;
|
|
10
|
+
this.data = /* @__PURE__ */ new Map();
|
|
11
|
+
}
|
|
12
|
+
get size() {
|
|
13
|
+
return this.data.size;
|
|
14
|
+
}
|
|
15
|
+
has(k) {
|
|
16
|
+
return this.data.has(k);
|
|
17
|
+
}
|
|
18
|
+
get(k) {
|
|
19
|
+
if (!this.data.has(k)) return void 0;
|
|
20
|
+
const value = this.data.get(k);
|
|
21
|
+
this.updateSorting(k, value);
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
set(k, v) {
|
|
25
|
+
if (this.data.has(k)) {
|
|
26
|
+
this.updateSorting(k, v);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (this.data.size >= this.limit) this.deleteFirstKey();
|
|
30
|
+
this.data.set(k, v);
|
|
31
|
+
}
|
|
32
|
+
push(k, v) {
|
|
33
|
+
this.set(k, v);
|
|
34
|
+
}
|
|
35
|
+
deleteFirstKey() {
|
|
36
|
+
const firstKey = this.data.keys().next().value;
|
|
37
|
+
if (firstKey !== void 0) this.data.delete(firstKey);
|
|
38
|
+
}
|
|
39
|
+
updateSorting(k, v) {
|
|
40
|
+
this.data.delete(k);
|
|
41
|
+
this.data.set(k, v);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.LRUCache = LRUCache;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
//#region packages/common/guards/index.ts
|
|
4
|
+
var isNil = (value) => {
|
|
5
|
+
return value === null || value === void 0;
|
|
6
|
+
};
|
|
7
|
+
var isNonNullable = (value) => {
|
|
8
|
+
return value !== null && value !== void 0;
|
|
9
|
+
};
|
|
10
|
+
var isString = (value) => {
|
|
11
|
+
return typeof value === "string";
|
|
12
|
+
};
|
|
13
|
+
var isNumber = (value) => {
|
|
14
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
15
|
+
};
|
|
16
|
+
var isBoolean = (value) => {
|
|
17
|
+
return typeof value === "boolean";
|
|
18
|
+
};
|
|
19
|
+
var isFunction = (value) => {
|
|
20
|
+
return typeof value === "function";
|
|
21
|
+
};
|
|
22
|
+
var isPlainObject = (value) => {
|
|
23
|
+
if (value === null || typeof value !== "object") return false;
|
|
24
|
+
const prototype = Object.getPrototypeOf(value);
|
|
25
|
+
return prototype === Object.prototype || prototype === null;
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.isBoolean = isBoolean;
|
|
29
|
+
exports.isFunction = isFunction;
|
|
30
|
+
exports.isNil = isNil;
|
|
31
|
+
exports.isNonNullable = isNonNullable;
|
|
32
|
+
exports.isNumber = isNumber;
|
|
33
|
+
exports.isPlainObject = isPlainObject;
|
|
34
|
+
exports.isString = isString;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
//#region packages/common/i18n/default.ts
|
|
4
|
+
/**
|
|
5
|
+
* UI 组件库默认中文语言资源。
|
|
6
|
+
*
|
|
7
|
+
* 这里只放组件内置文案,业务项目可以通过 I18nProvider.resources 覆盖或追加。
|
|
8
|
+
*/
|
|
9
|
+
var defaultLanguageResources = {
|
|
10
|
+
common: {
|
|
11
|
+
tip: "提示",
|
|
12
|
+
confirm: "确认",
|
|
13
|
+
cancel: "取消",
|
|
14
|
+
close: "关闭",
|
|
15
|
+
submit: "提交",
|
|
16
|
+
reset: "重置"
|
|
17
|
+
},
|
|
18
|
+
components: {
|
|
19
|
+
breadcrumb: { close: "关闭" },
|
|
20
|
+
confirmDialog: {
|
|
21
|
+
title: "提示",
|
|
22
|
+
okText: "确认",
|
|
23
|
+
cancelText: "取消"
|
|
24
|
+
},
|
|
25
|
+
dataTable: { noData: "暂无数据" },
|
|
26
|
+
date: {
|
|
27
|
+
placeholder: "请选择日期",
|
|
28
|
+
placeholderDateTime: "请选择日期时间",
|
|
29
|
+
placeholderRange: "选择日期范围",
|
|
30
|
+
placeholderDateTimeRange: "选择日期时间范围",
|
|
31
|
+
weekDays: [
|
|
32
|
+
"日",
|
|
33
|
+
"一",
|
|
34
|
+
"二",
|
|
35
|
+
"三",
|
|
36
|
+
"四",
|
|
37
|
+
"五",
|
|
38
|
+
"六"
|
|
39
|
+
],
|
|
40
|
+
selectTime: "选择时间",
|
|
41
|
+
startTime: "开始时间",
|
|
42
|
+
endTime: "结束时间",
|
|
43
|
+
confirm: "确认",
|
|
44
|
+
monthFormat: "yyyy年 M月",
|
|
45
|
+
quickRanges: "快速选择",
|
|
46
|
+
quickRangeToday: "今天",
|
|
47
|
+
quickRangeYesterday: "昨天",
|
|
48
|
+
quickRangeLast7Days: "近7天",
|
|
49
|
+
quickRangeLast30Days: "近30天",
|
|
50
|
+
quickRangeThisMonth: "本月",
|
|
51
|
+
quickRangeLastYear: "最近一年",
|
|
52
|
+
clear: "清除"
|
|
53
|
+
},
|
|
54
|
+
form: {
|
|
55
|
+
submit: "提交",
|
|
56
|
+
cancel: "取消"
|
|
57
|
+
},
|
|
58
|
+
imagePreview: {
|
|
59
|
+
closePreview: "关闭预览",
|
|
60
|
+
previousImage: "上一张",
|
|
61
|
+
nextImage: "下一张",
|
|
62
|
+
zoomOut: "缩小",
|
|
63
|
+
zoomIn: "放大",
|
|
64
|
+
reset: "重置",
|
|
65
|
+
rotateLeft: "左旋转",
|
|
66
|
+
rotateRight: "右旋转",
|
|
67
|
+
flipHorizontal: "左右镜像",
|
|
68
|
+
flipVertical: "上下镜像",
|
|
69
|
+
previewImage: "预览第{index}张"
|
|
70
|
+
},
|
|
71
|
+
modal: {
|
|
72
|
+
close: "关闭",
|
|
73
|
+
confirmTitle: "提示",
|
|
74
|
+
okText: "确认",
|
|
75
|
+
cancelText: "取消"
|
|
76
|
+
},
|
|
77
|
+
message: { close: "关闭" },
|
|
78
|
+
select: { empty: "暂无选项" },
|
|
79
|
+
tableSearch: {
|
|
80
|
+
reset: "重置",
|
|
81
|
+
search: "查询",
|
|
82
|
+
export: "导出Excel",
|
|
83
|
+
expand: "展开",
|
|
84
|
+
collapse: "收起",
|
|
85
|
+
exportCurrentPage: "当前页",
|
|
86
|
+
exportCurrentQuery: "当前查询条件"
|
|
87
|
+
},
|
|
88
|
+
upload: {
|
|
89
|
+
deleteImage: "删除图片",
|
|
90
|
+
upload: "上传"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
exports.defaultLanguageResources = defaultLanguageResources;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
//#region packages/common/i18n/en-US.ts
|
|
4
|
+
/**
|
|
5
|
+
* UI component library default English language resources.
|
|
6
|
+
*
|
|
7
|
+
* Only built-in component copy belongs here. Applications can override or extend it with I18nProvider.resources.
|
|
8
|
+
*/
|
|
9
|
+
var defaultEnglishResources = {
|
|
10
|
+
common: {
|
|
11
|
+
tip: "Prompt",
|
|
12
|
+
confirm: "Confirm",
|
|
13
|
+
cancel: "Cancel",
|
|
14
|
+
close: "Close",
|
|
15
|
+
submit: "Submit",
|
|
16
|
+
reset: "Reset"
|
|
17
|
+
},
|
|
18
|
+
components: {
|
|
19
|
+
breadcrumb: { close: "Close" },
|
|
20
|
+
confirmDialog: {
|
|
21
|
+
title: "Prompt",
|
|
22
|
+
okText: "Confirm",
|
|
23
|
+
cancelText: "Cancel"
|
|
24
|
+
},
|
|
25
|
+
dataTable: { noData: "No Data" },
|
|
26
|
+
date: {
|
|
27
|
+
placeholder: "Select date",
|
|
28
|
+
placeholderDateTime: "Select date and time",
|
|
29
|
+
placeholderRange: "Select date range",
|
|
30
|
+
placeholderDateTimeRange: "Select date and time range",
|
|
31
|
+
weekDays: [
|
|
32
|
+
"Sun",
|
|
33
|
+
"Mon",
|
|
34
|
+
"Tue",
|
|
35
|
+
"Wed",
|
|
36
|
+
"Thu",
|
|
37
|
+
"Fri",
|
|
38
|
+
"Sat"
|
|
39
|
+
],
|
|
40
|
+
selectTime: "Select time",
|
|
41
|
+
startTime: "Start time",
|
|
42
|
+
endTime: "End time",
|
|
43
|
+
confirm: "Confirm",
|
|
44
|
+
monthFormat: "MMM yyyy",
|
|
45
|
+
quickRanges: "Quick ranges",
|
|
46
|
+
quickRangeToday: "Today",
|
|
47
|
+
quickRangeYesterday: "Yesterday",
|
|
48
|
+
quickRangeLast7Days: "Last 7 days",
|
|
49
|
+
quickRangeLast30Days: "Last 30 days",
|
|
50
|
+
quickRangeThisMonth: "This month",
|
|
51
|
+
quickRangeLastYear: "Last year",
|
|
52
|
+
clear: "Clear"
|
|
53
|
+
},
|
|
54
|
+
form: {
|
|
55
|
+
submit: "Submit",
|
|
56
|
+
cancel: "Cancel"
|
|
57
|
+
},
|
|
58
|
+
imagePreview: {
|
|
59
|
+
closePreview: "Close preview",
|
|
60
|
+
previousImage: "Previous image",
|
|
61
|
+
nextImage: "Next image",
|
|
62
|
+
zoomOut: "Zoom out",
|
|
63
|
+
zoomIn: "Zoom in",
|
|
64
|
+
reset: "Reset",
|
|
65
|
+
rotateLeft: "Rotate left",
|
|
66
|
+
rotateRight: "Rotate right",
|
|
67
|
+
flipHorizontal: "Flip horizontal",
|
|
68
|
+
flipVertical: "Flip vertical",
|
|
69
|
+
previewImage: "Preview image {index}"
|
|
70
|
+
},
|
|
71
|
+
modal: {
|
|
72
|
+
close: "Close",
|
|
73
|
+
confirmTitle: "Prompt",
|
|
74
|
+
okText: "Confirm",
|
|
75
|
+
cancelText: "Cancel"
|
|
76
|
+
},
|
|
77
|
+
message: { close: "Close" },
|
|
78
|
+
select: { empty: "No options" },
|
|
79
|
+
tableSearch: {
|
|
80
|
+
reset: "Reset",
|
|
81
|
+
search: "Search",
|
|
82
|
+
export: "Export Excel",
|
|
83
|
+
expand: "Expand",
|
|
84
|
+
collapse: "Collapse",
|
|
85
|
+
exportCurrentPage: "Current Page",
|
|
86
|
+
exportCurrentQuery: "Current Filters"
|
|
87
|
+
},
|
|
88
|
+
upload: {
|
|
89
|
+
deleteImage: "Delete image",
|
|
90
|
+
upload: "Upload"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
exports.defaultEnglishResources = defaultEnglishResources;
|