@gct-paas/core 0.1.4-dev.6 → 0.1.4-dev.8
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/dist/index.esm.min.mjs +6103 -0
- package/dist/index.min.cjs +13 -14
- package/dist/index.system.min.js +13 -14
- package/es/constants/core.mjs +0 -1
- package/es/constants/editor-register/editor-register.mjs +0 -1
- package/es/constants/editor-type/editor-type.d.ts +65 -1
- package/es/constants/editor-type/editor-type.mjs +14 -1
- package/es/constants/form-container-type/form-container-type.mjs +0 -1
- package/es/constants/index.d.ts +4 -0
- package/es/constants/index.mjs +2 -7
- package/es/controller/edit-form/edit-form.controller.mjs +0 -1
- package/es/controller/editor/color-editor.controller.mjs +0 -1
- package/es/controller/editor/length-unit-editor.controller.mjs +0 -1
- package/es/controller/editor-item/editor-item.controller.mjs +0 -1
- package/es/controller/form/form.controller.mjs +5 -4
- package/es/controller/form-collapse/form-collapse.controller.mjs +4 -3
- package/es/controller/form-collapse-pane/form-collapse-pane.controller.mjs +4 -3
- package/es/controller/form-edit-item/form-edit-item.controller.d.ts +1 -0
- package/es/controller/form-edit-item/form-edit-item.controller.mjs +6 -2
- package/es/controller/form-group/form-group.controller.mjs +4 -3
- package/es/controller/form-item/form-item.controller.d.ts +1 -0
- package/es/controller/form-item/form-item.controller.mjs +7 -3
- package/es/controller/form-item-basic/form-item-basic.controller.mjs +3 -2
- package/es/controller/form-item-hidden/form-item-hidden.controller.mjs +0 -1
- package/es/controller/form-tab/form-tab.controller.mjs +4 -3
- package/es/controller/form-tab-pane/form-tab-pane.controller.mjs +4 -3
- package/es/controller/gct-form/gct-form.controller.mjs +5 -4
- package/es/create-app-vue.mjs +5 -5
- package/es/enums/app-designer/index.d.ts +13 -1
- package/es/enums/app-designer/index.mjs +8 -2
- package/es/enums/appEnum.d.ts +17 -66
- package/es/enums/appEnum.mjs +18 -14
- package/es/enums/appStateEnum.mjs +0 -1
- package/es/enums/authActionEnum.mjs +0 -1
- package/es/enums/breakpointEnum.mjs +0 -1
- package/es/enums/cacheEnum.mjs +0 -1
- package/es/enums/designEnum.mjs +0 -1
- package/es/enums/exceptionEnum.mjs +0 -1
- package/es/enums/globalEnum.d.ts +38 -0
- package/es/enums/globalEnum.mjs +25 -0
- package/es/enums/httpEnum.mjs +0 -1
- package/es/enums/index.d.ts +13 -0
- package/es/enums/index.mjs +15 -20
- package/es/enums/menuEnum.mjs +0 -1
- package/es/enums/page-designer/designer.d.ts +17 -3
- package/es/enums/page-designer/designer.mjs +85 -6
- package/es/enums/page-designer/panel.mjs +0 -1
- package/es/enums/page-designer/toolkit.mjs +0 -1
- package/es/enums/page-designer/widget.d.ts +2 -1
- package/es/enums/page-designer/widget.mjs +3 -3
- package/es/enums/pageEnum.mjs +0 -1
- package/es/enums/plugin-enum.mjs +0 -1
- package/es/enums/processEnum.mjs +0 -1
- package/es/enums/roleEnum.mjs +0 -1
- package/es/enums/sizeEnum.mjs +0 -1
- package/es/global/gct/gct.d.ts +3 -14
- package/es/global/gct/gct.mjs +20 -16
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/use-app-inst/use-app-inst.d.ts +8 -0
- package/es/hooks/use-app-inst/use-app-inst.mjs +8 -0
- package/es/hooks/use-form/use-form.mjs +0 -1
- package/es/hooks/use-gct-form-value/use-gct-form-value.d.ts +1 -1
- package/es/hooks/use-gct-form-value/use-gct-form-value.mjs +0 -4
- package/es/hooks/use-modal/use-modal.mjs +0 -1
- package/es/hooks/use-namespace/use-namespace.mjs +11 -2
- package/es/hooks/use-sub-app-utils/use-sub-app-utils.d.ts +31 -0
- package/es/hooks/use-sub-app-utils/use-sub-app-utils.mjs +30 -0
- package/es/hooks/useCopyToClipboard.d.ts +3 -3
- package/es/hooks/useCopyToClipboard.mjs +0 -1
- package/es/index.d.ts +5 -1
- package/es/index.mjs +61 -42
- package/es/interface/controller/form-edit-item/form-edit-item.controller.d.ts +5 -0
- package/es/interface/controller/index.d.ts +0 -1
- package/es/interface/form/i-editor/i-editor-basic.d.ts +2 -2
- package/es/interface/form/i-editor/i-model-field-select-editor.d.ts +18 -0
- package/es/interface/form/i-form/i-form-collapse-pane.d.ts +4 -0
- package/es/interface/form/i-form/i-form-item-basic.d.ts +1 -1
- package/es/interface/form/i-form/i-form-tab-pane.d.ts +4 -0
- package/es/interface/form/index.d.ts +1 -0
- package/es/interface/i-app-context/i-app-context.d.ts +34 -0
- package/es/interface/i-field-code-chain/i-field-code-chain.d.ts +17 -0
- package/es/interface/i-global-var/i-global-var.d.ts +15 -0
- package/es/interface/i-mobile-home-menu-item/i-mobile-home-menu-item.d.ts +94 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +8 -20
- package/es/interface/i-pinia-getter/i-global-getters.d.ts +1 -1
- package/es/interface/i-pinia-state/i-global-state.d.ts +7 -14
- package/es/interface/index.d.ts +5 -2
- package/es/interface/open-util/i-open-window-options/i-open-window-options.d.ts +59 -0
- package/es/interface/state/index.d.ts +0 -1
- package/es/locale/index.mjs +1 -2
- package/es/modules/env-manager/env-manager.const.mjs +0 -1
- package/es/modules/env-manager/env-manager.interface.mjs +0 -1
- package/es/modules/env-manager/env-manager.mjs +7 -8
- package/es/modules/error-handler/error-handler.const.mjs +1 -30
- package/es/modules/error-handler/error-strategy.mjs +4 -2
- package/es/modules/error-handler/index.mjs +0 -1
- package/es/modules/platform-config/constants/index.d.ts +7 -0
- package/es/modules/platform-config/constants/login.const.d.ts +15 -0
- package/es/modules/platform-config/constants/login.const.mjs +50 -0
- package/es/modules/platform-config/constants/org.const.d.ts +9 -0
- package/es/modules/platform-config/constants/org.const.mjs +54 -0
- package/es/modules/platform-config/constants/theme.const.d.ts +9 -0
- package/es/modules/platform-config/constants/theme.const.mjs +5 -0
- package/es/modules/platform-config/constants/watermark.const.d.ts +16 -0
- package/es/modules/platform-config/constants/watermark.const.mjs +14 -0
- package/es/modules/platform-config/enums/deploy.enum.d.ts +10 -0
- package/es/modules/platform-config/enums/deploy.enum.mjs +7 -0
- package/es/modules/platform-config/enums/index.d.ts +6 -0
- package/es/modules/platform-config/{constants.d.ts → enums/login.enum.d.ts} +3 -7
- package/es/modules/platform-config/enums/login.enum.mjs +16 -0
- package/es/modules/platform-config/enums/platform.enum.d.ts +27 -0
- package/es/modules/platform-config/{types.mjs → enums/platform.enum.mjs} +0 -1
- package/es/modules/platform-config/index.d.ts +6 -17
- package/es/modules/platform-config/interfaces/global-setting.interface.d.ts +7 -0
- package/es/modules/platform-config/interfaces/index.d.ts +7 -0
- package/es/modules/platform-config/interfaces/login-config.interface.d.ts +17 -0
- package/es/modules/platform-config/interfaces/platform-map.interface.d.ts +8 -0
- package/es/modules/platform-config/interfaces/theme-setting.interface.d.ts +30 -0
- package/es/modules/platform-config/store.d.ts +221 -0
- package/es/modules/platform-config/store.mjs +78 -0
- package/es/modules/platform-config/useBasicSetting.d.ts +6 -2
- package/es/modules/platform-config/useBasicSetting.mjs +4 -15
- package/es/modules/platform-config/useDeploySetting.d.ts +9 -4
- package/es/modules/platform-config/useDeploySetting.mjs +4 -9
- package/es/modules/platform-config/useLoginSetting.d.ts +8 -10
- package/es/modules/platform-config/useLoginSetting.mjs +24 -30
- package/es/modules/platform-config/useOrgSetting.d.ts +19 -1
- package/es/modules/platform-config/useOrgSetting.mjs +9 -64
- package/es/modules/platform-config/useProjectSetting.d.ts +12 -0
- package/es/modules/platform-config/useProjectSetting.mjs +11 -0
- package/es/modules/platform-config/useSecuritySetting.d.ts +5 -1
- package/es/modules/platform-config/useSecuritySetting.mjs +0 -11
- package/es/modules/platform-config/useThemeSetting.d.ts +7 -4
- package/es/modules/platform-config/useThemeSetting.mjs +5 -14
- package/es/modules/platform-config/useWatermarkSetting.d.ts +4 -1
- package/es/modules/platform-config/useWatermarkSetting.mjs +2 -24
- package/es/modules/user-stores/index.d.ts +3 -0
- package/es/modules/user-stores/store/permission.store.d.ts +21 -0
- package/es/modules/user-stores/store/permission.store.mjs +38 -0
- package/es/modules/user-stores/store/tenant.store.d.ts +9 -0
- package/es/modules/user-stores/store/tenant.store.mjs +24 -0
- package/es/modules/user-stores/store/user.store.d.ts +154 -0
- package/es/modules/user-stores/store/user.store.mjs +100 -0
- package/es/modules/user-stores/types/permission.d.ts +1 -0
- package/es/modules/user-stores/types/tenant.d.ts +1 -0
- package/es/modules/user-stores/types/user.d.ts +14 -0
- package/es/register/editor-register/editor-register.d.ts +5 -13
- package/es/register/editor-register/editor-register.mjs +8 -17
- package/es/register/form-item-register/form-item-register.d.ts +4 -15
- package/es/register/form-item-register/form-item-register.mjs +7 -17
- package/es/register/index.d.ts +18 -1
- package/es/register/render-register/render-register.mjs +0 -1
- package/es/router/index.mjs +0 -1
- package/es/state/form/form.state.mjs +0 -1
- package/es/state/form-collapse/form-collapse.state.mjs +0 -1
- package/es/state/form-collapse-pane/form-collapse-pane.state.mjs +0 -1
- package/es/state/form-edit-item/form-edit-item.state.mjs +0 -1
- package/es/state/form-group/form-group.state.mjs +0 -1
- package/es/state/form-item/form-item.state.mjs +0 -1
- package/es/state/form-item-basic/form-item-basic.state.mjs +0 -1
- package/es/state/form-tab/form-tab.state.mjs +0 -1
- package/es/state/form-tab-pane/form-tab-pane.state.mjs +0 -1
- package/es/state/global-pinia-state/global-pinia-state.d.ts +8 -25
- package/es/state/global-pinia-state/global-pinia-state.mjs +30 -16
- package/es/store/global-store.d.ts +1 -0
- package/es/store/global-store.mjs +34 -32
- package/es/store/index.d.ts +2 -3
- package/es/store/index.mjs +0 -1
- package/es/types/index.d.ts +14 -3
- package/es/utils/axios/interceptors.mjs +3 -23
- package/es/utils/deviceFingerprint.d.ts +17 -0
- package/es/utils/deviceFingerprint.mjs +73 -0
- package/es/utils/dictionary/dictionary.mjs +0 -1
- package/es/utils/i18n/index.d.ts +2 -1
- package/es/utils/i18n/index.mjs +3 -4
- package/es/utils/index.d.ts +11 -2
- package/es/utils/linked-list/linked-list.d.ts +72 -0
- package/es/utils/linked-list/linked-list.mjs +119 -0
- package/es/utils/linked-node/linked-node.d.ts +31 -0
- package/es/utils/linked-node/linked-node.mjs +32 -0
- package/es/utils/mitt/mitt.d.ts +1 -0
- package/es/utils/mitt/mitt.mjs +5 -0
- package/es/utils/model-loader/model-loader.d.ts +118 -0
- package/es/utils/model-loader/model-loader.mjs +326 -0
- package/es/utils/namespace/namespace.mjs +0 -1
- package/es/utils/plugin-static-resource/plugin-static-resource.mjs +0 -1
- package/es/utils/props/gct-form-item/gct-form-item.props.d.ts +63 -0
- package/es/utils/props/gct-form-item/gct-form-item.props.mjs +66 -0
- package/es/utils/props/index.d.ts +1 -0
- package/es/utils/style/index.d.ts +16 -0
- package/es/utils/style/index.mjs +141 -0
- package/es/utils/tools/tools.d.ts +13 -10
- package/es/utils/tools/tools.mjs +19 -11
- package/es/utils/treeHelper/treeHelper.d.ts +117 -0
- package/es/utils/treeHelper/treeHelper.mjs +220 -0
- package/es/utils/util.d.ts +39 -0
- package/es/utils/util.mjs +40 -0
- package/es/utils/value-helper/value-helper.d.ts +49 -0
- package/es/utils/value-helper/value-helper.mjs +109 -0
- package/es/utils/width-install/width-install.mjs +0 -2
- package/package.json +34 -36
- package/es/controller/index.mjs +0 -17
- package/es/enums/page-designer/index.mjs +0 -6
- package/es/global/index.mjs +0 -3
- package/es/hooks/index.mjs +0 -7
- package/es/interface/controller/edit-form/edit-form.controller.mjs +0 -1
- package/es/interface/controller/editor/i-color-editor.controller.mjs +0 -1
- package/es/interface/controller/editor/i-length-unit-editor.controller.mjs +0 -1
- package/es/interface/controller/editor-item/editor-item.controller.mjs +0 -1
- package/es/interface/controller/form/form.controller.mjs +0 -3
- package/es/interface/controller/form-collapse/form-collapse.controller.mjs +0 -1
- package/es/interface/controller/form-collapse-pane/form-collapse-pane.controller.mjs +0 -1
- package/es/interface/controller/form-edit-item/form-edit-item.controller.mjs +0 -1
- package/es/interface/controller/form-group/form-group.controller.mjs +0 -1
- package/es/interface/controller/form-hidden-item/form-hidden-item.controller.mjs +0 -1
- package/es/interface/controller/form-item/form-item.controller.mjs +0 -1
- package/es/interface/controller/form-item-basic/form-item-basic.controller.mjs +0 -1
- package/es/interface/controller/form-tab/form-tab.controller.mjs +0 -1
- package/es/interface/controller/form-tab-pane/form-tab-pane.controller.mjs +0 -1
- package/es/interface/controller/i-designer-controller.d.ts +0 -116
- package/es/interface/controller/i-designer-controller.mjs +0 -1
- package/es/interface/controller/index.mjs +0 -1
- package/es/interface/events/form/i-form.event.mjs +0 -1
- package/es/interface/events/index.mjs +0 -1
- package/es/interface/form/i-editor/i-check-switch.mjs +0 -3
- package/es/interface/form/i-editor/i-checkbox-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-color-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-editor-basic.mjs +0 -1
- package/es/interface/form/i-editor/i-icon-select-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-info-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-length-unit-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-number-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-picker-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-radio-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-select-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-span-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-switch-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-text-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-textarea-editor.mjs +0 -3
- package/es/interface/form/i-form/i-edit-form.mjs +0 -1
- package/es/interface/form/i-form/i-form-collapse-pane.mjs +0 -1
- package/es/interface/form/i-form/i-form-collapse.mjs +0 -1
- package/es/interface/form/i-form/i-form-container.mjs +0 -1
- package/es/interface/form/i-form/i-form-edit-item.mjs +0 -1
- package/es/interface/form/i-form/i-form-group-container.mjs +0 -1
- package/es/interface/form/i-form/i-form-group.mjs +0 -1
- package/es/interface/form/i-form/i-form-hidden-item.mjs +0 -1
- package/es/interface/form/i-form/i-form-item-basic.mjs +0 -1
- package/es/interface/form/i-form/i-form-item.mjs +0 -1
- package/es/interface/form/i-form/i-form-tab-pane.mjs +0 -1
- package/es/interface/form/i-form/i-form-tab.mjs +0 -1
- package/es/interface/form/i-form/i-form.mjs +0 -1
- package/es/interface/form/index.mjs +0 -1
- package/es/interface/hooks/i-designer-hooks.d.ts +0 -26
- package/es/interface/hooks/i-designer-hooks.mjs +0 -3
- package/es/interface/hooks/index.d.ts +0 -1
- package/es/interface/hooks/index.mjs +0 -1
- package/es/interface/i-dictionary/i-dictionary-item.mjs +0 -1
- package/es/interface/i-dictionary/i-dictionary.mjs +0 -1
- package/es/interface/i-import-style-map/i-import-style-map.mjs +0 -1
- package/es/interface/i-message-util/i-message-util.mjs +0 -1
- package/es/interface/i-modal/i-modal.mjs +0 -3
- package/es/interface/i-modal-data/i-modal-data.mjs +0 -1
- package/es/interface/i-pinia-action/i-global-actions.mjs +0 -1
- package/es/interface/i-pinia-getter/i-global-getters.mjs +0 -1
- package/es/interface/i-pinia-state/i-global-state.mjs +0 -1
- package/es/interface/index.mjs +0 -1
- package/es/interface/layout/i-flex-layout/i-flex-container.mjs +0 -1
- package/es/interface/layout/i-flex-layout/i-flex-item.mjs +0 -1
- package/es/interface/layout/i-grid-layout/i-grid-container.mjs +0 -1
- package/es/interface/layout/i-grid-layout/i-grid-item-span.mjs +0 -1
- package/es/interface/layout/i-grid-layout/i-grid-item.mjs +0 -1
- package/es/interface/layout/i-layout-basis/i-layout-container-basis.mjs +0 -1
- package/es/interface/layout/index.mjs +0 -1
- package/es/interface/low-code-types/index.d.ts +0 -4
- package/es/interface/low-code-types/index.mjs +0 -5
- package/es/interface/low-code-types/modal-types.d.ts +0 -67
- package/es/interface/low-code-types/modal-types.mjs +0 -3
- package/es/interface/low-code-types/model/index.d.ts +0 -5338
- package/es/interface/low-code-types/model/index.mjs +0 -1
- package/es/interface/low-code-types/schema/index.d.ts +0 -12
- package/es/interface/low-code-types/schema/index.mjs +0 -1
- package/es/interface/low-code-types/widget-basic-types.d.ts +0 -667
- package/es/interface/low-code-types/widget-basic-types.mjs +0 -3
- package/es/interface/provider/i-editor-provider/i-editor-provider.mjs +0 -1
- package/es/interface/provider/i-form-item-provider/i-form-item-provider.mjs +0 -1
- package/es/interface/provider/i-provider-basic/i-provider-basic.mjs +0 -1
- package/es/interface/provider/index.mjs +0 -1
- package/es/interface/state/form/form.state.mjs +0 -1
- package/es/interface/state/form-collapse/form-collapse.state.mjs +0 -1
- package/es/interface/state/form-collapse-pane/form-collapse-pane.state.mjs +0 -1
- package/es/interface/state/form-edit-item/form-edit-item.state.mjs +0 -1
- package/es/interface/state/form-group/form-group.state.mjs +0 -1
- package/es/interface/state/form-hidden-item/form-hidden-item.state.mjs +0 -1
- package/es/interface/state/form-item/form-item.state.mjs +0 -1
- package/es/interface/state/form-item-basic/form-item-basic.state.mjs +0 -1
- package/es/interface/state/form-tab/form-tab.state.mjs +0 -1
- package/es/interface/state/form-tab-pane/form-tab-pane.state.mjs +0 -1
- package/es/interface/state/i-designer-state.d.ts +0 -27
- package/es/interface/state/i-designer-state.mjs +0 -1
- package/es/interface/state/index.mjs +0 -1
- package/es/interface/style/i-border.mjs +0 -1
- package/es/interface/style/i-font.mjs +0 -1
- package/es/interface/style/i-margin.mjs +0 -1
- package/es/interface/style/i-padding.mjs +0 -1
- package/es/interface/style/i-position.mjs +0 -1
- package/es/interface/style/i-spacing.mjs +0 -1
- package/es/interface/style/index.mjs +0 -1
- package/es/modules/api-service/api-manage.d.ts +0 -26
- package/es/modules/api-service/api-manage.mjs +0 -33
- package/es/modules/api-service/api-service.d.ts +0 -96
- package/es/modules/api-service/api-service.interface.d.ts +0 -159
- package/es/modules/api-service/api-service.interface.mjs +0 -4
- package/es/modules/api-service/api-service.mjs +0 -173
- package/es/modules/api-service/http.enum.d.ts +0 -76
- package/es/modules/api-service/http.enum.mjs +0 -63
- package/es/modules/api-service/http.util.d.ts +0 -113
- package/es/modules/api-service/http.util.mjs +0 -160
- package/es/modules/api-service/index.d.ts +0 -8
- package/es/modules/api-service/index.mjs +0 -13
- package/es/modules/env-manager/index.mjs +0 -5
- package/es/modules/error-handler/error-handler.interface.mjs +0 -1
- package/es/modules/platform-config/constants.mjs +0 -63
- package/es/modules/platform-config/index.mjs +0 -17
- package/es/modules/platform-config/types.d.ts +0 -67
- package/es/provider/i-designer-provider/i-designer-provider.d.ts +0 -102
- package/es/provider/i-designer-provider/i-designer-provider.mjs +0 -1
- package/es/provider/index.d.ts +0 -1
- package/es/provider/index.mjs +0 -1
- package/es/register/designer-register/designer-register.d.ts +0 -53
- package/es/register/designer-register/designer-register.mjs +0 -68
- package/es/register/index.mjs +0 -6
- package/es/state/index.mjs +0 -12
- package/es/utils/index.mjs +0 -10
- package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +0 -96
- package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +0 -260
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import FingerprintJS from '@fingerprintjs/fingerprintjs';
|
|
2
|
+
|
|
3
|
+
const FINGERPRINT_KEY = "FINGERPRINT";
|
|
4
|
+
function isBrowserEnv() {
|
|
5
|
+
return typeof window !== "undefined" && typeof navigator !== "undefined";
|
|
6
|
+
}
|
|
7
|
+
function getClientPlatform() {
|
|
8
|
+
if (!isBrowserEnv()) {
|
|
9
|
+
return { type: "unknown", name: "unknown" };
|
|
10
|
+
}
|
|
11
|
+
const ua = navigator.userAgent;
|
|
12
|
+
if (/iPad|iPhone|iPod/i.test(ua)) {
|
|
13
|
+
return { type: "mobile", name: "iOS" };
|
|
14
|
+
}
|
|
15
|
+
if (/Android/i.test(ua)) {
|
|
16
|
+
return { type: "mobile", name: "Android" };
|
|
17
|
+
}
|
|
18
|
+
if (/Windows Phone/i.test(ua)) {
|
|
19
|
+
return { type: "mobile", name: "Windows Phone" };
|
|
20
|
+
}
|
|
21
|
+
if (/BlackBerry/i.test(ua)) {
|
|
22
|
+
return { type: "mobile", name: "BlackBerry" };
|
|
23
|
+
}
|
|
24
|
+
if (/Edg/i.test(ua)) {
|
|
25
|
+
return { type: "web", name: "Edge" };
|
|
26
|
+
}
|
|
27
|
+
if (/OPR|Opera/i.test(ua)) {
|
|
28
|
+
return { type: "web", name: "Opera" };
|
|
29
|
+
}
|
|
30
|
+
if (/Firefox/i.test(ua)) {
|
|
31
|
+
return { type: "web", name: "Firefox" };
|
|
32
|
+
}
|
|
33
|
+
if (/Chrome/i.test(ua)) {
|
|
34
|
+
return { type: "web", name: "Chrome" };
|
|
35
|
+
}
|
|
36
|
+
if (/Safari/i.test(ua)) {
|
|
37
|
+
return { type: "web", name: "Safari" };
|
|
38
|
+
}
|
|
39
|
+
return { type: "unknown", name: "unknown" };
|
|
40
|
+
}
|
|
41
|
+
async function getFingerprint() {
|
|
42
|
+
const agent = await FingerprintJS.load();
|
|
43
|
+
return agent.get();
|
|
44
|
+
}
|
|
45
|
+
async function getDeviceFingerprint() {
|
|
46
|
+
if (!isBrowserEnv()) {
|
|
47
|
+
return "unknown/unknown";
|
|
48
|
+
}
|
|
49
|
+
const { type, name } = getClientPlatform();
|
|
50
|
+
const isWeb = type === "web";
|
|
51
|
+
if (isWeb) {
|
|
52
|
+
const cached = localStorage.getItem(FINGERPRINT_KEY);
|
|
53
|
+
if (cached) {
|
|
54
|
+
return `${name}/${cached}`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const fingerprint = await getFingerprint();
|
|
58
|
+
const visitorId = fingerprint.visitorId;
|
|
59
|
+
if (isWeb) {
|
|
60
|
+
localStorage.setItem(FINGERPRINT_KEY, visitorId);
|
|
61
|
+
}
|
|
62
|
+
return `${name}/${visitorId}`;
|
|
63
|
+
}
|
|
64
|
+
function getPageIdentification() {
|
|
65
|
+
let pageTag = sessionStorage.getItem("currentPageTag");
|
|
66
|
+
if (!pageTag) {
|
|
67
|
+
pageTag = Date.now().toString();
|
|
68
|
+
sessionStorage.setItem("currentPageTag", pageTag);
|
|
69
|
+
}
|
|
70
|
+
return pageTag;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { getClientPlatform, getDeviceFingerprint, getFingerprint, getPageIdentification };
|
package/es/utils/i18n/index.d.ts
CHANGED
package/es/utils/i18n/index.mjs
CHANGED
package/es/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
export { DictionaryUtil } from './dictionary/dictionary';
|
|
2
2
|
export { t } from './i18n';
|
|
3
|
+
export { LinkedList } from './linked-list/linked-list';
|
|
4
|
+
export { LinkedNode } from './linked-node/linked-node';
|
|
5
|
+
export { mitt } from './mitt/mitt';
|
|
6
|
+
export { modelLoader } from './model-loader/model-loader';
|
|
3
7
|
export { Namespace } from './namespace/namespace';
|
|
4
|
-
export { PluginPgkUtil, type IModuleMap, type LoadPluginResult, } from './plugin-pkg-util/plugin-pkg-util';
|
|
5
8
|
export { PluginStaticResource } from './plugin-static-resource/plugin-static-resource';
|
|
6
|
-
export {
|
|
9
|
+
export { gctFormItemEditorProps } from './props';
|
|
10
|
+
export { getToken, setToken, getTenant, getTimezone, isMobile, setTenant, deepMerge, stringifyMatrixParams, parseMatrixParams, } from './tools/tools';
|
|
11
|
+
export * from './value-helper/value-helper';
|
|
7
12
|
export { widthEditorInstall } from './width-install/width-install';
|
|
8
13
|
export { interceptors } from './axios/interceptors';
|
|
14
|
+
export { getDeviceFingerprint, getPageIdentification, } from './deviceFingerprint';
|
|
15
|
+
export { TreeHelper } from './treeHelper/treeHelper';
|
|
16
|
+
export * from './style';
|
|
17
|
+
export * from './util';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { LinkedNode } from '../linked-node/linked-node';
|
|
2
|
+
/**
|
|
3
|
+
* 链表列表
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-07-31 15:07:37
|
|
7
|
+
* @export
|
|
8
|
+
* @class LinkedList
|
|
9
|
+
*/
|
|
10
|
+
export declare class LinkedList<T = any> {
|
|
11
|
+
/**
|
|
12
|
+
* 当前激活节点
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghanrui
|
|
15
|
+
* @date 2024-07-31 15:07:02
|
|
16
|
+
* @type {(LinkedNode<T> | null)}
|
|
17
|
+
*/
|
|
18
|
+
active: LinkedNode<T> | null;
|
|
19
|
+
/**
|
|
20
|
+
* 新增节点
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-07-31 15:07:45
|
|
24
|
+
* @param {T} data
|
|
25
|
+
*/
|
|
26
|
+
add(data: T): void;
|
|
27
|
+
/**
|
|
28
|
+
* 删除节点
|
|
29
|
+
*
|
|
30
|
+
* @author zhanghanrui
|
|
31
|
+
* @date 2024-07-31 15:07:11
|
|
32
|
+
* @param {LinkedNode<T>} node
|
|
33
|
+
*/
|
|
34
|
+
delete(node: LinkedNode<T>): void;
|
|
35
|
+
/**
|
|
36
|
+
* 上一个节点
|
|
37
|
+
*
|
|
38
|
+
* @author zhanghanrui
|
|
39
|
+
* @date 2024-07-31 16:07:41
|
|
40
|
+
*/
|
|
41
|
+
prev(): void;
|
|
42
|
+
/**
|
|
43
|
+
* 下一个节点
|
|
44
|
+
*
|
|
45
|
+
* @author zhanghanrui
|
|
46
|
+
* @date 2024-07-31 16:07:57
|
|
47
|
+
*/
|
|
48
|
+
next(): void;
|
|
49
|
+
/**
|
|
50
|
+
* 清理所有缓存
|
|
51
|
+
*
|
|
52
|
+
* @author zhanghanrui
|
|
53
|
+
* @date 2024-07-31 16:07:43
|
|
54
|
+
*/
|
|
55
|
+
clearAll(): void;
|
|
56
|
+
/**
|
|
57
|
+
* 是否可以撤销
|
|
58
|
+
*
|
|
59
|
+
* @author zhanghanrui
|
|
60
|
+
* @date 2024-08-21 15:08:57
|
|
61
|
+
* @return {*} {boolean}
|
|
62
|
+
*/
|
|
63
|
+
canUndo(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 是否可以重做
|
|
66
|
+
*
|
|
67
|
+
* @author zhanghanrui
|
|
68
|
+
* @date 2024-08-21 15:08:33
|
|
69
|
+
* @return {*} {boolean}
|
|
70
|
+
*/
|
|
71
|
+
canRedo(): boolean;
|
|
72
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { LinkedNode } from '../linked-node/linked-node.mjs';
|
|
2
|
+
|
|
3
|
+
class LinkedList {
|
|
4
|
+
/**
|
|
5
|
+
* 当前激活节点
|
|
6
|
+
*
|
|
7
|
+
* @author zhanghanrui
|
|
8
|
+
* @date 2024-07-31 15:07:02
|
|
9
|
+
* @type {(LinkedNode<T> | null)}
|
|
10
|
+
*/
|
|
11
|
+
active = null;
|
|
12
|
+
/**
|
|
13
|
+
* 新增节点
|
|
14
|
+
*
|
|
15
|
+
* @author zhanghanrui
|
|
16
|
+
* @date 2024-07-31 15:07:45
|
|
17
|
+
* @param {T} data
|
|
18
|
+
*/
|
|
19
|
+
add(data) {
|
|
20
|
+
if (!this.active) {
|
|
21
|
+
this.active = new LinkedNode(data);
|
|
22
|
+
} else {
|
|
23
|
+
if (this.active.next) {
|
|
24
|
+
let next = this.active.next;
|
|
25
|
+
while (next) {
|
|
26
|
+
next = next.next;
|
|
27
|
+
if (next) {
|
|
28
|
+
next.clear();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const node = new LinkedNode(data, null, this.active);
|
|
33
|
+
this.active.next = node;
|
|
34
|
+
this.active = node;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 删除节点
|
|
39
|
+
*
|
|
40
|
+
* @author zhanghanrui
|
|
41
|
+
* @date 2024-07-31 15:07:11
|
|
42
|
+
* @param {LinkedNode<T>} node
|
|
43
|
+
*/
|
|
44
|
+
delete(node) {
|
|
45
|
+
const { prev, next } = node;
|
|
46
|
+
if (prev) {
|
|
47
|
+
prev.next = next;
|
|
48
|
+
}
|
|
49
|
+
if (next) {
|
|
50
|
+
next.prev = prev;
|
|
51
|
+
}
|
|
52
|
+
node.clear();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 上一个节点
|
|
56
|
+
*
|
|
57
|
+
* @author zhanghanrui
|
|
58
|
+
* @date 2024-07-31 16:07:41
|
|
59
|
+
*/
|
|
60
|
+
prev() {
|
|
61
|
+
if (this.active && this.active.prev) {
|
|
62
|
+
this.active = this.active.prev;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 下一个节点
|
|
67
|
+
*
|
|
68
|
+
* @author zhanghanrui
|
|
69
|
+
* @date 2024-07-31 16:07:57
|
|
70
|
+
*/
|
|
71
|
+
next() {
|
|
72
|
+
if (this.active && this.active.next) {
|
|
73
|
+
this.active = this.active.next;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 清理所有缓存
|
|
78
|
+
*
|
|
79
|
+
* @author zhanghanrui
|
|
80
|
+
* @date 2024-07-31 16:07:43
|
|
81
|
+
*/
|
|
82
|
+
clearAll() {
|
|
83
|
+
if (this.active) {
|
|
84
|
+
let prev = this.active.prev;
|
|
85
|
+
let next = this.active.next;
|
|
86
|
+
while (prev) {
|
|
87
|
+
prev.clear();
|
|
88
|
+
prev = prev.prev;
|
|
89
|
+
}
|
|
90
|
+
while (next) {
|
|
91
|
+
next.clear();
|
|
92
|
+
next = next.next;
|
|
93
|
+
}
|
|
94
|
+
this.active.clear();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* 是否可以撤销
|
|
99
|
+
*
|
|
100
|
+
* @author zhanghanrui
|
|
101
|
+
* @date 2024-08-21 15:08:57
|
|
102
|
+
* @return {*} {boolean}
|
|
103
|
+
*/
|
|
104
|
+
canUndo() {
|
|
105
|
+
return !!this.active && !!this.active.prev;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 是否可以重做
|
|
109
|
+
*
|
|
110
|
+
* @author zhanghanrui
|
|
111
|
+
* @date 2024-08-21 15:08:33
|
|
112
|
+
* @return {*} {boolean}
|
|
113
|
+
*/
|
|
114
|
+
canRedo() {
|
|
115
|
+
return !!this.active && !!this.active.next;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export { LinkedList };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 链表节点
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-07-31 15:07:21
|
|
6
|
+
* @export
|
|
7
|
+
* @class LinkedNode
|
|
8
|
+
* @template T
|
|
9
|
+
*/
|
|
10
|
+
export declare class LinkedNode<T = any> {
|
|
11
|
+
data: T;
|
|
12
|
+
next: LinkedNode | null;
|
|
13
|
+
prev: LinkedNode | null;
|
|
14
|
+
/**
|
|
15
|
+
* Creates an instance of LinkedNode.
|
|
16
|
+
*
|
|
17
|
+
* @author zhanghanrui
|
|
18
|
+
* @date 2024-07-31 15:07:43
|
|
19
|
+
* @param {T} data 当前节点数据
|
|
20
|
+
* @param {(LinkedNode | null)} [next=null] 下一个节点
|
|
21
|
+
* @param {(LinkedNode | null)} [prev=null] 上一个节点
|
|
22
|
+
*/
|
|
23
|
+
constructor(data: T, next?: LinkedNode | null, prev?: LinkedNode | null);
|
|
24
|
+
/**
|
|
25
|
+
* 清理链表,避免内存泄漏
|
|
26
|
+
*
|
|
27
|
+
* @author zhanghanrui
|
|
28
|
+
* @date 2024-07-31 15:07:34
|
|
29
|
+
*/
|
|
30
|
+
clear(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
class LinkedNode {
|
|
2
|
+
data;
|
|
3
|
+
next;
|
|
4
|
+
prev;
|
|
5
|
+
/**
|
|
6
|
+
* Creates an instance of LinkedNode.
|
|
7
|
+
*
|
|
8
|
+
* @author zhanghanrui
|
|
9
|
+
* @date 2024-07-31 15:07:43
|
|
10
|
+
* @param {T} data 当前节点数据
|
|
11
|
+
* @param {(LinkedNode | null)} [next=null] 下一个节点
|
|
12
|
+
* @param {(LinkedNode | null)} [prev=null] 上一个节点
|
|
13
|
+
*/
|
|
14
|
+
constructor(data, next = null, prev = null) {
|
|
15
|
+
this.data = data;
|
|
16
|
+
this.next = next;
|
|
17
|
+
this.prev = prev;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 清理链表,避免内存泄漏
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-07-31 15:07:34
|
|
24
|
+
*/
|
|
25
|
+
clear() {
|
|
26
|
+
this.data = null;
|
|
27
|
+
this.next = null;
|
|
28
|
+
this.prev = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { LinkedNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mitt: import('mitt').Emitter<Record<import('mitt').EventType, unknown>>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { IFieldCodeChain } from '../../interface';
|
|
2
|
+
import { FieldMetaDTO, ModelMetaDTO, ModelPageableRow, QueryRefDataRequest } from '@gct-paas/api/apaas';
|
|
3
|
+
/**
|
|
4
|
+
* 模型加载器,提供模型缓存和请求去重功能
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2025-06-20 16:06:12
|
|
8
|
+
* @class ModelLoader
|
|
9
|
+
*/
|
|
10
|
+
declare class ModelLoader {
|
|
11
|
+
private readonly CACHE_EXPIRATION_TIME;
|
|
12
|
+
private modelCache;
|
|
13
|
+
private modelLoadingCache;
|
|
14
|
+
private modelsLoadingCache;
|
|
15
|
+
private enumCache;
|
|
16
|
+
private enumLoadingCache;
|
|
17
|
+
private queryRefDataCache;
|
|
18
|
+
private queryRefDataLoadingCache;
|
|
19
|
+
/**
|
|
20
|
+
* 检查缓存条目是否过期
|
|
21
|
+
*
|
|
22
|
+
* @param {CacheEntry<any>} entry
|
|
23
|
+
* @returns {*} {boolean}
|
|
24
|
+
*/
|
|
25
|
+
private isExpired;
|
|
26
|
+
/**
|
|
27
|
+
* 创建缓存条目
|
|
28
|
+
*
|
|
29
|
+
* @param {T} data
|
|
30
|
+
* @returns {*} {CacheEntry<T>}
|
|
31
|
+
*/
|
|
32
|
+
private createCacheEntry;
|
|
33
|
+
/**
|
|
34
|
+
* 加载模型信息,具有缓存和请求去重功能
|
|
35
|
+
*
|
|
36
|
+
* @author chitanda
|
|
37
|
+
* @date 2025-06-20 16:06:05
|
|
38
|
+
* @param {string} modelKey
|
|
39
|
+
* @returns {*} {Promise<ModelMetaDTO>}
|
|
40
|
+
*/
|
|
41
|
+
loadModel(modelKey: string): Promise<ModelMetaDTO>;
|
|
42
|
+
/**
|
|
43
|
+
* 加载多个模型信息
|
|
44
|
+
*
|
|
45
|
+
* @author chitanda
|
|
46
|
+
* @date 2025-06-22 15:06:54
|
|
47
|
+
* @param {string[]} modelKeys
|
|
48
|
+
* @returns {*} {Promise<ModelMetaDTO[]>}
|
|
49
|
+
*/
|
|
50
|
+
loadModels(modelKeys: string[]): Promise<ModelMetaDTO[]>;
|
|
51
|
+
/**
|
|
52
|
+
* 加载指定模型的字段信息
|
|
53
|
+
*
|
|
54
|
+
* @author chitanda
|
|
55
|
+
* @date 2025-06-22 14:06:37
|
|
56
|
+
* @param {string} modelKey
|
|
57
|
+
* @param {string} fieldKey
|
|
58
|
+
* @returns {*} {(Promise<FieldMetaDTO | undefined>)}
|
|
59
|
+
*/
|
|
60
|
+
loadField(modelKey: string, fieldKey: string): Promise<FieldMetaDTO | undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* 加载指定模型的字段路径信息
|
|
63
|
+
*
|
|
64
|
+
* @author chitanda
|
|
65
|
+
* @date 2025-06-22 14:06:11
|
|
66
|
+
* @param {string} modelKey
|
|
67
|
+
* @param {string} fieldKey
|
|
68
|
+
* @returns {*} {Promise<string[]>}
|
|
69
|
+
*/
|
|
70
|
+
loadFieldPaths(modelKey: string, fieldKey: string, fieldCodeChain: IFieldCodeChain): Promise<string[]>;
|
|
71
|
+
/**
|
|
72
|
+
* 加载指定模型的枚举列表
|
|
73
|
+
*
|
|
74
|
+
* @param {string} modelKey
|
|
75
|
+
* @param {string} fieldKey
|
|
76
|
+
* @param {string} [modelCategory=EntityModelCategoryEnum.ENTITY]
|
|
77
|
+
* @returns {*} {Promise<IObject[]>}
|
|
78
|
+
*/
|
|
79
|
+
loadEnumList(modelKey: string, fieldKey: string, modelCategory?: string): Promise<IObject[]>;
|
|
80
|
+
/**
|
|
81
|
+
* 加载关联数据查询(QueryRef)
|
|
82
|
+
*
|
|
83
|
+
* @param {QueryRefDataRequest} request
|
|
84
|
+
* @returns {*} {Promise<ModelPageableRow>}
|
|
85
|
+
*/
|
|
86
|
+
loadQueryRefData(request: QueryRefDataRequest): Promise<ModelPageableRow>;
|
|
87
|
+
/**
|
|
88
|
+
* 获取已缓存的模型
|
|
89
|
+
* @param modelKey 模型键
|
|
90
|
+
* @returns ModelMetaDTO | undefined
|
|
91
|
+
*/
|
|
92
|
+
getCachedModel(modelKey: string): ModelMetaDTO | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* 清除指定模型的缓存
|
|
95
|
+
*
|
|
96
|
+
* @author chitanda
|
|
97
|
+
* @date 2025-06-20 16:06:41
|
|
98
|
+
* @param {string} modelKey
|
|
99
|
+
*/
|
|
100
|
+
clear(modelKey: string): void;
|
|
101
|
+
/**
|
|
102
|
+
* 清除所有模型缓存
|
|
103
|
+
*
|
|
104
|
+
* @author chitanda
|
|
105
|
+
* @date 2025-06-20 16:06:35
|
|
106
|
+
*/
|
|
107
|
+
clearAll(): void;
|
|
108
|
+
/**
|
|
109
|
+
* 获取所有已缓存的模型键
|
|
110
|
+
*
|
|
111
|
+
* @author chitanda
|
|
112
|
+
* @date 2025-06-20 16:06:55
|
|
113
|
+
* @returns {*} {string[]}
|
|
114
|
+
*/
|
|
115
|
+
keys(): string[];
|
|
116
|
+
}
|
|
117
|
+
export declare const modelLoader: ModelLoader;
|
|
118
|
+
export {};
|