@gct-paas/core 0.1.4-dev.11 → 0.1.4-dev.13

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.
Files changed (142) hide show
  1. package/dist/index.esm.min.js +4522 -0
  2. package/es/constants/core.mjs +5 -4
  3. package/es/constants/default-date-type/default-date-type.mjs +73 -21
  4. package/es/constants/editor-register/editor-register.mjs +17 -5
  5. package/es/constants/expression-type/BuiltOperators.mjs +152 -147
  6. package/es/constants/expression-type/FunctionKeys.mjs +75 -79
  7. package/es/constants/expression-type/editor.mjs +10 -3
  8. package/es/constants/expression-type/function.mjs +602 -613
  9. package/es/constants/expression-type/index.mjs +111 -113
  10. package/es/constants/expression-type/modeCfg.mjs +256 -263
  11. package/es/constants/expression-type/variable.mjs +43 -39
  12. package/es/constants/form-container-type/form-container-type.mjs +17 -5
  13. package/es/constants/index.d.ts +1 -0
  14. package/es/constants/index.mjs +31 -10
  15. package/es/constants/page-designer/model.mjs +15 -5
  16. package/es/constants/page-designer/regex.d.ts +2 -0
  17. package/es/constants/page-designer/regex.mjs +5 -0
  18. package/es/create-app-vue.mjs +15 -9
  19. package/es/enums/app-designer/index.d.ts +19 -0
  20. package/es/enums/app-designer/index.mjs +131 -63
  21. package/es/enums/appEnum.mjs +681 -360
  22. package/es/enums/appStateEnum.mjs +17 -10
  23. package/es/enums/authActionEnum.mjs +63 -51
  24. package/es/enums/breakpointEnum.mjs +27 -26
  25. package/es/enums/cacheEnum.mjs +22 -21
  26. package/es/enums/designEnum.mjs +110 -71
  27. package/es/enums/developer-center/integration.mjs +7 -6
  28. package/es/enums/exceptionEnum.mjs +21 -17
  29. package/es/enums/expressionEnum.d.ts +1 -1
  30. package/es/enums/expressionEnum.mjs +81 -74
  31. package/es/enums/globalEnum.mjs +59 -36
  32. package/es/enums/httpEnum.mjs +71 -61
  33. package/es/enums/index.mjs +44 -14
  34. package/es/enums/menuEnum.mjs +42 -38
  35. package/es/enums/page-designer/designer.mjs +403 -407
  36. package/es/enums/page-designer/index.d.ts +1 -0
  37. package/es/enums/page-designer/index.mjs +5 -0
  38. package/es/enums/page-designer/layout.d.ts +12 -0
  39. package/es/enums/page-designer/layout.mjs +17 -0
  40. package/es/enums/page-designer/panel.mjs +341 -213
  41. package/es/enums/page-designer/toolkit.mjs +13 -12
  42. package/es/enums/page-designer/widget.mjs +425 -338
  43. package/es/enums/pageEnum.mjs +14 -13
  44. package/es/enums/plugin-enum.mjs +23 -7
  45. package/es/enums/processEnum.mjs +95 -60
  46. package/es/enums/roleEnum.mjs +7 -6
  47. package/es/enums/sizeEnum.d.ts +18 -0
  48. package/es/enums/sizeEnum.mjs +28 -8
  49. package/es/global/gct/gct.mjs +84 -96
  50. package/es/global/index.mjs +1 -0
  51. package/es/hooks/index.mjs +4 -0
  52. package/es/hooks/use-app-inst/use-app-inst.mjs +11 -5
  53. package/es/hooks/use-modal/use-modal.mjs +16 -10
  54. package/es/hooks/use-sub-app-utils/use-sub-app-utils.mjs +43 -23
  55. package/es/hooks/useCopyToClipboard.mjs +50 -50
  56. package/es/index.mjs +125 -114
  57. package/es/interface/i-pinia-state/i-global-state.d.ts +0 -11
  58. package/es/locale/index.mjs +50 -57
  59. package/es/modules/env-manager/env-manager.const.mjs +16 -8
  60. package/es/modules/env-manager/env-manager.d.ts +2 -0
  61. package/es/modules/env-manager/env-manager.interface.d.ts +2 -0
  62. package/es/modules/env-manager/env-manager.interface.mjs +14 -7
  63. package/es/modules/env-manager/env-manager.mjs +108 -107
  64. package/es/modules/error-handler/error-handler.const.mjs +11 -16
  65. package/es/modules/error-handler/error-strategy.mjs +199 -175
  66. package/es/modules/error-handler/index.mjs +120 -106
  67. package/es/modules/mqtt/constants/mqtt.const.mjs +21 -24
  68. package/es/modules/mqtt/enums/mqtt-status.enum.mjs +23 -9
  69. package/es/modules/mqtt/index.mjs +4 -0
  70. package/es/modules/mqtt/mqtt-client.mjs +228 -261
  71. package/es/modules/mqtt/mqtt-manager.mjs +117 -77
  72. package/es/modules/platform-config/constants/index.mjs +4 -0
  73. package/es/modules/platform-config/constants/login.const.mjs +48 -45
  74. package/es/modules/platform-config/constants/org.const.mjs +57 -52
  75. package/es/modules/platform-config/constants/theme.const.mjs +11 -4
  76. package/es/modules/platform-config/constants/watermark.const.mjs +17 -12
  77. package/es/modules/platform-config/enums/deploy.enum.mjs +13 -6
  78. package/es/modules/platform-config/enums/login.enum.mjs +29 -15
  79. package/es/modules/platform-config/enums/platform.enum.mjs +16 -13
  80. package/es/modules/platform-config/index.mjs +9 -0
  81. package/es/modules/platform-config/store.mjs +68 -79
  82. package/es/modules/platform-config/useBasicSetting.mjs +47 -35
  83. package/es/modules/platform-config/useDeploySetting.mjs +29 -21
  84. package/es/modules/platform-config/useLoginSetting.mjs +151 -173
  85. package/es/modules/platform-config/useOrgSetting.mjs +63 -62
  86. package/es/modules/platform-config/useProjectSetting.mjs +14 -6
  87. package/es/modules/platform-config/useSecuritySetting.mjs +68 -56
  88. package/es/modules/platform-config/useThemeSetting.mjs +78 -59
  89. package/es/modules/platform-config/useWatermarkSetting.mjs +37 -23
  90. package/es/modules/user-stores/index.mjs +3 -0
  91. package/es/modules/user-stores/store/permission.store.mjs +27 -36
  92. package/es/modules/user-stores/store/tenant.store.mjs +20 -22
  93. package/es/modules/user-stores/store/user.store.mjs +94 -117
  94. package/es/router/index.mjs +25 -28
  95. package/es/setup-app.mjs +23 -39
  96. package/es/state/global-pinia-state/global-pinia-state.d.ts +0 -6
  97. package/es/state/global-pinia-state/global-pinia-state.mjs +43 -71
  98. package/es/state/index.mjs +1 -0
  99. package/es/store/global-store.mjs +50 -72
  100. package/es/store/index.mjs +25 -19
  101. package/es/types/index.d.ts +7 -0
  102. package/es/utils/axios/interceptors.mjs +21 -17
  103. package/es/utils/cache-adapter/cache-adapter.mjs +61 -56
  104. package/es/utils/css-loader/css-loader.d.ts +36 -0
  105. package/es/utils/css-loader/css-loader.mjs +82 -0
  106. package/es/utils/design/design.mjs +18 -12
  107. package/es/utils/deviceFingerprint.mjs +77 -63
  108. package/es/utils/dictionary/dictionary.mjs +142 -145
  109. package/es/utils/file/base64Conver.mjs +35 -30
  110. package/es/utils/file/download.mjs +94 -98
  111. package/es/utils/file/parser.d.ts +3 -0
  112. package/es/utils/file/parser.mjs +29 -0
  113. package/es/utils/i18n/index.mjs +14 -3
  114. package/es/utils/index.d.ts +3 -1
  115. package/es/utils/index.mjs +32 -0
  116. package/es/utils/is-sort-filed/is-sort-filed.mjs +42 -37
  117. package/es/utils/linked-list/linked-list.mjs +115 -118
  118. package/es/utils/linked-node/linked-node.mjs +41 -31
  119. package/es/utils/lowcode/utils.mjs +13 -18
  120. package/es/utils/lowcode/validate.mjs +20 -26
  121. package/es/utils/mitt/mitt.mjs +4 -4
  122. package/es/utils/model-loader/model-loader.mjs +280 -325
  123. package/es/utils/namespace/namespace.mjs +178 -164
  124. package/es/utils/openUtil/index.mjs +2 -0
  125. package/es/utils/openUtil/modal/modal.mjs +72 -79
  126. package/es/utils/openUtil/overlay-container/overlay-container.mjs +144 -138
  127. package/es/utils/permission.mjs +33 -37
  128. package/es/utils/plugin-static-resource/plugin-static-resource.mjs +46 -42
  129. package/es/utils/style/index.mjs +94 -138
  130. package/es/utils/tools/tools.mjs +86 -54
  131. package/es/utils/treeHelper/treeHelper.mjs +205 -233
  132. package/es/utils/uploader/uploader.mjs +81 -115
  133. package/es/utils/useUUid.mjs +79 -87
  134. package/es/utils/util.mjs +55 -35
  135. package/es/utils/uuid/uuid.d.ts +2 -0
  136. package/es/utils/uuid/uuid.mjs +33 -43
  137. package/es/utils/validate.mjs +15 -19
  138. package/es/utils/value-helper/value-helper.mjs +113 -98
  139. package/package.json +9 -18
  140. package/dist/index.esm.min.mjs +0 -18322
  141. package/dist/index.min.cjs +0 -393
  142. package/dist/index.system.min.js +0 -393
@@ -1,57 +1,57 @@
1
- import { ref, watch } from 'vue';
2
-
1
+ import { ref, watch } from "vue";
2
+ //#region src/hooks/useCopyToClipboard.ts
3
3
  function isDef(val) {
4
- return typeof val !== "undefined";
4
+ return typeof val !== "undefined";
5
5
  }
6
6
  function useCopyToClipboard(initial) {
7
- const clipboardRef = ref(initial || "");
8
- const isSuccessRef = ref(false);
9
- const copiedRef = ref(false);
10
- watch(
11
- clipboardRef,
12
- (str) => {
13
- if (isDef(str)) {
14
- copiedRef.value = true;
15
- isSuccessRef.value = copyTextToClipboard(str);
16
- }
17
- },
18
- { immediate: !!initial, flush: "sync" }
19
- );
20
- return { clipboardRef, isSuccessRef, copiedRef };
7
+ const clipboardRef = ref(initial || "");
8
+ const isSuccessRef = ref(false);
9
+ const copiedRef = ref(false);
10
+ watch(clipboardRef, (str) => {
11
+ if (isDef(str)) {
12
+ copiedRef.value = true;
13
+ isSuccessRef.value = copyTextToClipboard(str);
14
+ }
15
+ }, {
16
+ immediate: !!initial,
17
+ flush: "sync"
18
+ });
19
+ return {
20
+ clipboardRef,
21
+ isSuccessRef,
22
+ copiedRef
23
+ };
21
24
  }
22
25
  function copyTextToClipboard(input, { target = document.body } = {}) {
23
- const element = document.createElement("textarea");
24
- const previouslyFocusedElement = document.activeElement;
25
- element.value = input;
26
- element.setAttribute("readonly", "");
27
- element.style.contain = "strict";
28
- element.style.position = "absolute";
29
- element.style.left = "-9999px";
30
- element.style.fontSize = "12pt";
31
- const selection = document.getSelection();
32
- let originalRange;
33
- if (selection && selection.rangeCount > 0) {
34
- originalRange = selection.getRangeAt(0);
35
- }
36
- target.append(element);
37
- element.select();
38
- element.selectionStart = 0;
39
- element.selectionEnd = input.length;
40
- let isSuccess = false;
41
- try {
42
- isSuccess = document.execCommand("copy");
43
- } catch (e) {
44
- throw new Error(e);
45
- }
46
- element.remove();
47
- if (originalRange && selection) {
48
- selection.removeAllRanges();
49
- selection.addRange(originalRange);
50
- }
51
- if (previouslyFocusedElement) {
52
- previouslyFocusedElement.focus();
53
- }
54
- return isSuccess;
26
+ const element = document.createElement("textarea");
27
+ const previouslyFocusedElement = document.activeElement;
28
+ element.value = input;
29
+ element.setAttribute("readonly", "");
30
+ element.style.contain = "strict";
31
+ element.style.position = "absolute";
32
+ element.style.left = "-9999px";
33
+ element.style.fontSize = "12pt";
34
+ const selection = document.getSelection();
35
+ let originalRange;
36
+ if (selection && selection.rangeCount > 0) originalRange = selection.getRangeAt(0);
37
+ target.append(element);
38
+ element.select();
39
+ element.selectionStart = 0;
40
+ element.selectionEnd = input.length;
41
+ let isSuccess = false;
42
+ try {
43
+ isSuccess = document.execCommand("copy");
44
+ } catch (err) {
45
+ console.error("Unable to copy.", err);
46
+ isSuccess = false;
47
+ }
48
+ element.remove();
49
+ if (originalRange && selection) {
50
+ selection.removeAllRanges();
51
+ selection.addRange(originalRange);
52
+ }
53
+ if (previouslyFocusedElement) previouslyFocusedElement.focus();
54
+ return isSuccess;
55
55
  }
56
-
56
+ //#endregion
57
57
  export { copyTextToClipboard, isDef, useCopyToClipboard };
package/es/index.mjs CHANGED
@@ -1,117 +1,128 @@
1
- import { GctGlobal } from './global/gct/gct.mjs';
2
- import { api } from '@gct-paas/api';
3
- export { APP_INST, PLUGIN_BASE_URL, STYLE_NAMESPACE_TAG, VITE_MINIO_PATH } from './constants/index.mjs';
4
- export { GctMqttTopsEnum, GlobalParamEnum } from './enums/index.mjs';
5
- export { useAppInst } from './hooks/use-app-inst/use-app-inst.mjs';
6
- export { useModal } from './hooks/use-modal/use-modal.mjs';
7
- export { useIFrameProps, useWuJieBus, useWuJieProps } from './hooks/use-sub-app-utils/use-sub-app-utils.mjs';
8
- export { copyTextToClipboard, isDef, useCopyToClipboard } from './hooks/useCopyToClipboard.mjs';
9
- export { LocaleUtil, setupI18n } from './locale/index.mjs';
10
- export { EnvironmentType } from './modules/env-manager/env-manager.interface.mjs';
11
- export { APP_PREVIEW_PATH_REG, APP_PROD_PATH_REG, APP_RUN_PATH_REG, DEV_SINGLE_PATH_REG, HOST_REG, IP_REG, TEST_SINGLE_PATH_REG } from './modules/env-manager/env-manager.const.mjs';
12
- export { EnvironmentManager } from './modules/env-manager/env-manager.mjs';
13
- export { ErrorHandler, setupErrorHandler } from './modules/error-handler/index.mjs';
14
- export { MQTT_CLIENT_EVENT, MQTT_DEFAULT_CONNECT_OPTIONS } from './modules/mqtt/constants/mqtt.const.mjs';
15
- export { MqttConnectionStatus } from './modules/mqtt/enums/mqtt-status.enum.mjs';
16
- export { MqttClient } from './modules/mqtt/mqtt-client.mjs';
17
- export { MqttManager } from './modules/mqtt/mqtt-manager.mjs';
18
- export { LoginSortTypeEnum, LoginTypeEnum } from './modules/platform-config/enums/login.enum.mjs';
19
- export { KickRuleEnum, PassRule } from './modules/platform-config/enums/platform.enum.mjs';
20
- export { DeployModeEnum } from './modules/platform-config/enums/deploy.enum.mjs';
21
- export { OTHER_LOGIN_KEYS, SYSTEM_LOGIN_KEYS, getLoginTypeOptions } from './modules/platform-config/constants/login.const.mjs';
22
- export { RELATION_FIELDS } from './modules/platform-config/constants/org.const.mjs';
23
- export { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS } from './modules/platform-config/constants/theme.const.mjs';
24
- export { WATERMARK_INIT_DATA } from './modules/platform-config/constants/watermark.const.mjs';
25
- export { usePlatformConfigStore } from './modules/platform-config/store.mjs';
26
- export { useUserStore } from './modules/user-stores/store/user.store.mjs';
27
- export { useTenantStore } from './modules/user-stores/store/tenant.store.mjs';
28
- export { usePermissionStore } from './modules/user-stores/store/permission.store.mjs';
29
- export { GlobalStoreUtil } from './store/index.mjs';
30
- export { gctMemoizeAsync } from './utils/cache-adapter/cache-adapter.mjs';
31
- export { DictionaryUtil } from './utils/dictionary/dictionary.mjs';
32
- export { t } from './utils/i18n/index.mjs';
33
- export { LinkedList } from './utils/linked-list/linked-list.mjs';
34
- export { LinkedNode } from './utils/linked-node/linked-node.mjs';
35
- export { insertCustomCssToHead } from './utils/lowcode/utils.mjs';
36
- export { buildItemRules } from './utils/lowcode/validate.mjs';
37
- export { mitt } from './utils/mitt/mitt.mjs';
38
- export { modelLoader } from './utils/model-loader/model-loader.mjs';
39
- export { Namespace, useNamespace } from './utils/namespace/namespace.mjs';
40
- export { Modal } from './utils/openUtil/modal/modal.mjs';
41
- export { OverlayContainer } from './utils/openUtil/overlay-container/overlay-container.mjs';
42
- export { PluginStaticResource } from './utils/plugin-static-resource/plugin-static-resource.mjs';
43
- export { deepMerge, getTenant, getTimezone, getToken, isMobile, parseMatrixParams, setTenant, setToken, stringifyMatrixParams } from './utils/tools/tools.mjs';
44
- export { buildShortUUID, buildUUID, uuid2 } from './utils/uuid/uuid.mjs';
45
- export { afterFieldSet, afterValueSet, cacheFnReturn, computedEx, emitFieldSet, parseValueUnit } from './utils/value-helper/value-helper.mjs';
46
- export { interceptors } from './utils/axios/interceptors.mjs';
47
- export { getDeviceFingerprint, getPageIdentification } from './utils/deviceFingerprint.mjs';
48
- export { TreeHelper } from './utils/treeHelper/treeHelper.mjs';
49
- export { calcFontStyle, calcStyle } from './utils/style/index.mjs';
50
- export { genUrl, openWindow } from './utils/util.mjs';
51
- export { isSortFiled } from './utils/is-sort-filed/is-sort-filed.mjs';
52
- export { randomUUID, useUUid } from './utils/useUUid.mjs';
53
- export { hasEmojiAndSpecStr, hasEmojiAndSpecStr1, validateEmoji, validateIsModelName, validateModelName } from './utils/validate.mjs';
54
- export { Uploader } from './utils/uploader/uploader.mjs';
55
- export { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, uploaderFiles } from './utils/file/download.mjs';
56
- export { dataURLtoBlob, urlToBase64 } from './utils/file/base64Conver.mjs';
57
- export { isMultipleOperator } from './utils/design/design.mjs';
58
- export { permission } from './utils/permission.mjs';
59
- export { createAppVue } from './create-app-vue.mjs';
60
- export { setupApp } from './setup-app.mjs';
61
- export { AGLINE_ENUMS, ButtonOpeEnum, RdoButtonOpeEnum, SEARCH_SERVICE, notSingleArr, presetColor } from './enums/designEnum.mjs';
62
- export { APP_DARK_MODE_KEY_, APP_LOCAL_CACHE_KEY, APP_SESSION_CACHE_KEY, CacheTypeEnum, DESIGNER_SESSION_CACHE_KEY, LOCALE_KEY, LOCALE_LIST_KEY, LOCAL_I18N_TRANSLATE, LOCK_INFO_KEY, MULTIPLE_TABS_KEY, PROJ_CFG_KEY, ROLES_KEY, TENANT_KEY, TIMEZONE_KEY, TOKEN_KEY, USER_INFO_KEY } from './enums/cacheEnum.mjs';
63
- export { ARRAY_TYPE, BOOLEAN_TYPE, FUN_BOL_TYPE, FUN_NUM_TYPE, FUN_OBJ_OR_ARR_TYPE, FUN_STR_TYPE, NUMBER_TYPE, OBJECT_TYPE, RETURN_TYPE_MAP, STRING_TYPE, WinMsgTypeEnum, operator2FuncMap } from './constants/expression-type/index.mjs';
64
- export { ASSIGNMENTSTRATEGY_ENUM, BorderStyle, COLUMNS_TYPE, Dependency_ENUM, DisplayTagTypeEnum, DisplayType, EventCategory, GLOBAL_TYPE, GLOBAL_VAR_TYPE, INNER_EVENT, PanelEnum, Postion, ProgressTypeEnum, PropGroup, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, StyleGroup, TagTypeEnum, TextAlign, TextDecoration, VERIFICATIONCONDITIONS_TYPE, tagEnum } from './enums/page-designer/panel.mjs';
65
- export { AggTypes, CARD_TRIGGER_ENUM, ContentEnum, CreateType, FIELD_TYPE, FIELD_TYPE_BASIC, FIELD_TYPE_CATEGORY, FIELD_TYPE_LOGIC, FIELD_TYPE_TRACE, FieldIconMap, FieldTypeToJs, GENDER_TYPE, MaterialEnum, MenuType, MessageType, NodesConfigTypeEnum, OpenMode, PermissionModeEnum, PersonalCenterType, ProjectName, RouterTransitionEnum, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, TODO_TYPE, ThemeEnum, UniqueConstraintType, WorkbenchType, selectionTypeEnums } from './enums/appEnum.mjs';
66
- export { AppPublishStateEnum } from './enums/appStateEnum.mjs';
67
- export { BasicAction, CustomAction, DefaultActions, PlatformSettingActions } from './enums/authActionEnum.mjs';
68
- export { BindCmpStyleEnum, BindCmpStyleTypeEnum, Ch_BindCmpStyleEnum, FormComponents, SCOPE, SCOPEINFO, SearchComponents, bindCmpStyleMap, buttonShowType, controlConfigEnum, fixedAlignENUM, mobileSearchListByFieldType, padSearchListByFieldType, searchListByFieldType, sortTypeEnum, statisticalMethodEnum, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, transformBindCmp2CmpType } from './enums/page-designer/designer.mjs';
69
- export { BizServiceEnum, ContentTypeEnum, RequestEnum, ResultEnum } from './enums/httpEnum.mjs';
70
- export { BpmnNodeTypeEnum, ButtonTypeEnum, ExamineAndApproveStateEnum, OpinionTypeEnum, ProcessStatusEnum, ch_ProcessStatusMap } from './enums/processEnum.mjs';
71
- export { BuiltOperators, allOperator, booleanOperator, getOperatorList, numberOperator, returnBolOperator } from './constants/expression-type/BuiltOperators.mjs';
72
- export { BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonSize, ButtonStyle, ButtonType, ButtonTypeGroup, ButtonType_vant, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CategoryTypeEnum, DatasourceTypeEnum, DateRangeEnums, DisplayEnums, KeyMode, ListTreeSearchTypeEnum, Platform, PrintModeEnums, ResetRuleType, RowSelectionTypeEnums, SelectPickerEnums, SignatureStyleEnum, SignatureTypeEnum, StatisticalMethodEnums, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TransactionMode, WidgetInScopeEnum, openWindowEnums, operateSysEnums } from './enums/page-designer/widget.mjs';
73
- export { CUSTOM_LANGUAGE, CUSTOM_THEME } from './constants/expression-type/editor.mjs';
74
- export { CoreConst } from './constants/core.mjs';
75
- export { DataSetReturnTypeEnum, EntityFormulaReturnTypeEnum, ExpressionModeEnum, ExpressionTabEnum, IdentifierAddon, OperatorTypeEnum, ReturnTypeEnum, VarTypeEnum, zeroWidthSpace } from './enums/expressionEnum.mjs';
76
- export { DefaultDateTypeConst } from './constants/default-date-type/default-date-type.mjs';
77
- export { DeviceParamsTypeEnum, PlatformSettingEnum, PlatformType, nullDisplayEnum } from './enums/globalEnum.mjs';
78
- export { EditorRegisterConst } from './constants/editor-register/editor-register.mjs';
79
- export { EntityModelCategoryEnum, EntityModelTypeEnum, FieldDefaultValueTypeEnum, FieldSysVarDefaultValueEnum, SHOW_FIELDTYPES, UserServiceType, pageLayoutModeEnum, scriptTypeEnum } from './enums/app-designer/index.mjs';
80
- export { ErrorStrategyFactory } from './modules/error-handler/error-strategy.mjs';
81
- export { ErrorTypeEnum, ExceptionEnum } from './enums/exceptionEnum.mjs';
82
- export { FUNC_KEYS } from './constants/expression-type/FunctionKeys.mjs';
83
- export { FormContainerType } from './constants/form-container-type/form-container-type.mjs';
84
- export { MenuModeEnum, MenuSplitTyeEnum, MenuTypeEnum, MixSidebarTriggerEnum, TopMenuAlignEnum, TriggerEnum } from './enums/menuEnum.mjs';
85
- export { ModeFnMap, ModeTabDict, ModeTabMap, ReturnTypeMaps } from './constants/expression-type/modeCfg.mjs';
86
- export { ModelTypeOptions } from './constants/page-designer/model.mjs';
87
- export { PageEnum } from './enums/pageEnum.mjs';
88
- export { PluginModeEnum } from './enums/plugin-enum.mjs';
89
- export { PrintResourceEnum } from './enums/developer-center/integration.mjs';
90
- export { RoleEnum } from './enums/roleEnum.mjs';
91
- export { SYSTEM_VAR_PREFIX, booleanTypes, innerVarIds, innerVarList, numberTypes } from './constants/expression-type/variable.mjs';
92
- export { SizeEnum } from './enums/sizeEnum.mjs';
93
- export { ToolkitEnum } from './enums/page-designer/toolkit.mjs';
94
- export { biBackFunctionGroup, biBackFunctionMap, functionGroup, functionMap, ipaasBackFunctionGroup, ipaasBackFunctionMap } from './constants/expression-type/function.mjs';
95
- export { screenEnum, screenMap, sizeEnum } from './enums/breakpointEnum.mjs';
96
-
1
+ import { AggTypes, CARD_TRIGGER_ENUM, ContentEnum, CreateType, FIELD_TYPE, FIELD_TYPE_BASIC, FIELD_TYPE_CATEGORY, FIELD_TYPE_LOGIC, FIELD_TYPE_TRACE, FieldIconMap, FieldTypeToJs, GENDER_TYPE, MaterialEnum, MenuType, MessageType, NodesConfigTypeEnum, OpenMode, PermissionModeEnum, PersonalCenterType, ProjectName, RouterTransitionEnum, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, TODO_TYPE, ThemeEnum, UniqueConstraintType, WorkbenchType, selectionTypeEnums } from "./enums/appEnum.mjs";
2
+ import { EntityModelCategoryEnum, EntityModelTypeEnum, FieldDefaultValueTypeEnum, FieldSysVarDefaultValueEnum, PatternEnum, SHOW_FIELDTYPES, TypeEnum, UserServiceType, pageLayoutModeEnum, scriptTypeEnum } from "./enums/app-designer/index.mjs";
3
+ import { ASSIGNMENTSTRATEGY_ENUM, BorderStyle, COLUMNS_TYPE, Dependency_ENUM, DisplayTagTypeEnum, DisplayType, EventCategory, GLOBAL_TYPE, GLOBAL_VAR_TYPE, INNER_EVENT, PanelEnum, Postion, ProgressTypeEnum, PropGroup, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, StyleGroup, TagTypeEnum, TextAlign, TextDecoration, VERIFICATIONCONDITIONS_TYPE, tagEnum } from "./enums/page-designer/panel.mjs";
4
+ import { ToolkitEnum } from "./enums/page-designer/toolkit.mjs";
5
+ import { BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonSize, ButtonStyle, ButtonType, ButtonTypeGroup, ButtonType_vant, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CategoryTypeEnum, DatasourceTypeEnum, DateRangeEnums, DisplayEnums, KeyMode, ListTreeSearchTypeEnum, Platform, PrintModeEnums, ResetRuleType, RowSelectionTypeEnums, SelectPickerEnums, SignatureStyleEnum, SignatureTypeEnum, StatisticalMethodEnums, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TransactionMode, WidgetInScopeEnum, openWindowEnums, operateSysEnums } from "./enums/page-designer/widget.mjs";
6
+ import { BindCmpStyleEnum, BindCmpStyleTypeEnum, Ch_BindCmpStyleEnum, FormComponents, SCOPE, SCOPEINFO, SearchComponents, bindCmpStyleMap, buttonShowType, controlConfigEnum, fixedAlignENUM, mobileSearchListByFieldType, padSearchListByFieldType, searchListByFieldType, sortTypeEnum, statisticalMethodEnum, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, transformBindCmp2CmpType } from "./enums/page-designer/designer.mjs";
7
+ import { FormDesignEnum, PrintTypeEnum } from "./enums/page-designer/layout.mjs";
8
+ import { PrintResourceEnum } from "./enums/developer-center/integration.mjs";
9
+ import { AppPublishStateEnum } from "./enums/appStateEnum.mjs";
10
+ import { BasicAction, CustomAction, DefaultActions, PlatformSettingActions } from "./enums/authActionEnum.mjs";
11
+ import { screenEnum, screenMap, sizeEnum } from "./enums/breakpointEnum.mjs";
12
+ import { APP_DARK_MODE_KEY_, APP_LOCAL_CACHE_KEY, APP_SESSION_CACHE_KEY, CacheTypeEnum, DESIGNER_SESSION_CACHE_KEY, LOCALE_KEY, LOCALE_LIST_KEY, LOCAL_I18N_TRANSLATE, LOCK_INFO_KEY, MULTIPLE_TABS_KEY, PROJ_CFG_KEY, ROLES_KEY, TENANT_KEY, TIMEZONE_KEY, TOKEN_KEY, USER_INFO_KEY } from "./enums/cacheEnum.mjs";
13
+ import { AGLINE_ENUMS, ButtonOpeEnum, RdoButtonOpeEnum, SEARCH_SERVICE, notSingleArr, presetColor } from "./enums/designEnum.mjs";
14
+ import { ErrorTypeEnum, ExceptionEnum } from "./enums/exceptionEnum.mjs";
15
+ import { BizServiceEnum, ContentTypeEnum, RequestEnum, ResultEnum } from "./enums/httpEnum.mjs";
16
+ import { DeviceParamsTypeEnum, PlatformSettingEnum, PlatformType, nullDisplayEnum } from "./enums/globalEnum.mjs";
17
+ import { MenuModeEnum, MenuSplitTyeEnum, MenuTypeEnum, MixSidebarTriggerEnum, TopMenuAlignEnum, TriggerEnum } from "./enums/menuEnum.mjs";
18
+ import { PageEnum } from "./enums/pageEnum.mjs";
19
+ import { RoleEnum } from "./enums/roleEnum.mjs";
20
+ import { SizeEnum, UploadTypeEnum } from "./enums/sizeEnum.mjs";
21
+ import { BpmnNodeTypeEnum, ButtonTypeEnum, ExamineAndApproveStateEnum, OpinionTypeEnum, ProcessStatusEnum, ch_ProcessStatusMap } from "./enums/processEnum.mjs";
22
+ import { PluginModeEnum } from "./enums/plugin-enum.mjs";
23
+ import { DataSetReturnTypeEnum, EntityFormulaReturnTypeEnum, ExpressionModeEnum, ExpressionTabEnum, IdentifierAddon, OperatorTypeEnum, ReturnTypeEnum, VarTypeEnum, zeroWidthSpace } from "./enums/expressionEnum.mjs";
24
+ import { GctMqttTopsEnum, GlobalParamEnum } from "./enums/index.mjs";
25
+ import { cssLoader } from "./utils/css-loader/css-loader.mjs";
26
+ import { gctMemoizeAsync } from "./utils/cache-adapter/cache-adapter.mjs";
27
+ import { DictionaryUtil } from "./utils/dictionary/dictionary.mjs";
28
+ import { t } from "./utils/i18n/index.mjs";
29
+ import { LinkedNode } from "./utils/linked-node/linked-node.mjs";
30
+ import { LinkedList } from "./utils/linked-list/linked-list.mjs";
31
+ import { insertCustomCssToHead } from "./utils/lowcode/utils.mjs";
32
+ import { buildItemRules } from "./utils/lowcode/validate.mjs";
33
+ import { mitt } from "./utils/mitt/mitt.mjs";
34
+ import { modelLoader } from "./utils/model-loader/model-loader.mjs";
35
+ import { ModeFnMap, ModeTabDict, ModeTabMap, ReturnTypeMaps } from "./constants/expression-type/modeCfg.mjs";
36
+ import { BuiltOperators, allOperator, booleanOperator, getOperatorList, numberOperator, returnBolOperator } from "./constants/expression-type/BuiltOperators.mjs";
37
+ import { CUSTOM_LANGUAGE, CUSTOM_THEME } from "./constants/expression-type/editor.mjs";
38
+ import { biBackFunctionGroup, biBackFunctionMap, functionGroup, functionMap, ipaasBackFunctionGroup, ipaasBackFunctionMap } from "./constants/expression-type/function.mjs";
39
+ import { FUNC_KEYS } from "./constants/expression-type/FunctionKeys.mjs";
40
+ import { SYSTEM_VAR_PREFIX, booleanTypes, innerVarIds, innerVarList, numberTypes } from "./constants/expression-type/variable.mjs";
41
+ import { ARRAY_TYPE, BOOLEAN_TYPE, FUN_BOL_TYPE, FUN_NUM_TYPE, FUN_OBJ_OR_ARR_TYPE, FUN_STR_TYPE, NUMBER_TYPE, OBJECT_TYPE, RETURN_TYPE_MAP, STRING_TYPE, WinMsgTypeEnum, operator2FuncMap } from "./constants/expression-type/index.mjs";
42
+ import { EditorRegisterConst } from "./constants/editor-register/editor-register.mjs";
43
+ import { FormContainerType } from "./constants/form-container-type/form-container-type.mjs";
44
+ import { DefaultDateTypeConst } from "./constants/default-date-type/default-date-type.mjs";
45
+ import { CoreConst } from "./constants/core.mjs";
46
+ import { ModelTypeOptions } from "./constants/page-designer/model.mjs";
47
+ import { timeReg, urlReg } from "./constants/page-designer/regex.mjs";
48
+ import { APP_INST, PLUGIN_BASE_URL, STYLE_NAMESPACE_TAG, VITE_MINIO_PATH } from "./constants/index.mjs";
49
+ import { Namespace, useNamespace } from "./utils/namespace/namespace.mjs";
50
+ import { Modal } from "./utils/openUtil/modal/modal.mjs";
51
+ import { OverlayContainer } from "./utils/openUtil/overlay-container/overlay-container.mjs";
52
+ import { PluginStaticResource } from "./utils/plugin-static-resource/plugin-static-resource.mjs";
53
+ import { deepMerge, getTenant, getTimezone, getToken, isMobile, parseMatrixParams, setTenant, setToken, stringifyMatrixParams } from "./utils/tools/tools.mjs";
54
+ import { buildShortUUID, buildUUID, sha256, uuid2 } from "./utils/uuid/uuid.mjs";
55
+ import { afterFieldSet, afterValueSet, cacheFnReturn, computedEx, emitFieldSet, parseValueUnit } from "./utils/value-helper/value-helper.mjs";
56
+ import { interceptors } from "./utils/axios/interceptors.mjs";
57
+ import { getDeviceFingerprint, getMobileBrowserFingerprint, getPageIdentification } from "./utils/deviceFingerprint.mjs";
58
+ import { TreeHelper } from "./utils/treeHelper/treeHelper.mjs";
59
+ import { calcFontStyle, calcStyle } from "./utils/style/index.mjs";
60
+ import { genUrl, openWindow } from "./utils/util.mjs";
61
+ import { isSortFiled } from "./utils/is-sort-filed/is-sort-filed.mjs";
62
+ import { randomUUID, useUUid } from "./utils/useUUid.mjs";
63
+ import { hasEmojiAndSpecStr, hasEmojiAndSpecStr1, validateEmoji, validateIsModelName, validateModelName } from "./utils/validate.mjs";
64
+ import { Uploader } from "./utils/uploader/uploader.mjs";
65
+ import { dataURLtoBlob, urlToBase64 } from "./utils/file/base64Conver.mjs";
66
+ import { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, uploaderFiles } from "./utils/file/download.mjs";
67
+ import { sizeParser, typeParser } from "./utils/file/parser.mjs";
68
+ import { isMultipleOperator } from "./utils/design/design.mjs";
69
+ import { permission } from "./utils/permission.mjs";
70
+ import "./utils/index.mjs";
71
+ import { GlobalStoreUtil } from "./store/index.mjs";
72
+ import { EnvironmentType } from "./modules/env-manager/env-manager.interface.mjs";
73
+ import { APP_PREVIEW_PATH_REG, APP_PROD_PATH_REG, APP_RUN_PATH_REG, DEV_SINGLE_PATH_REG, HOST_REG, IP_REG, TEST_SINGLE_PATH_REG } from "./modules/env-manager/env-manager.const.mjs";
74
+ import { EnvironmentManager } from "./modules/env-manager/env-manager.mjs";
75
+ import { MQTT_CLIENT_EVENT, MQTT_DEFAULT_CONNECT_OPTIONS } from "./modules/mqtt/constants/mqtt.const.mjs";
76
+ import { MqttConnectionStatus } from "./modules/mqtt/enums/mqtt-status.enum.mjs";
77
+ import { MqttClient } from "./modules/mqtt/mqtt-client.mjs";
78
+ import { MqttManager } from "./modules/mqtt/mqtt-manager.mjs";
79
+ import "./modules/mqtt/index.mjs";
80
+ import { LocaleUtil, setupI18n } from "./locale/index.mjs";
81
+ import { GctGlobal } from "./global/gct/gct.mjs";
82
+ import "./global/index.mjs";
83
+ import { useAppInst } from "./hooks/use-app-inst/use-app-inst.mjs";
84
+ import { useModal } from "./hooks/use-modal/use-modal.mjs";
85
+ import { useIFrameProps, useWuJieBus, useWuJieProps } from "./hooks/use-sub-app-utils/use-sub-app-utils.mjs";
86
+ import { copyTextToClipboard, isDef, useCopyToClipboard } from "./hooks/useCopyToClipboard.mjs";
87
+ import "./hooks/index.mjs";
88
+ import { ErrorStrategyFactory } from "./modules/error-handler/error-strategy.mjs";
89
+ import { ErrorHandler, setupErrorHandler } from "./modules/error-handler/index.mjs";
90
+ import { LoginSortTypeEnum, LoginTypeEnum } from "./modules/platform-config/enums/login.enum.mjs";
91
+ import { KickRuleEnum, PassRule } from "./modules/platform-config/enums/platform.enum.mjs";
92
+ import { DeployModeEnum } from "./modules/platform-config/enums/deploy.enum.mjs";
93
+ import { OTHER_LOGIN_KEYS, SYSTEM_LOGIN_KEYS, getLoginTypeOptions } from "./modules/platform-config/constants/login.const.mjs";
94
+ import { RELATION_FIELDS } from "./modules/platform-config/constants/org.const.mjs";
95
+ import { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS } from "./modules/platform-config/constants/theme.const.mjs";
96
+ import { WATERMARK_INIT_DATA } from "./modules/platform-config/constants/watermark.const.mjs";
97
+ import { usePlatformConfigStore } from "./modules/platform-config/store.mjs";
98
+ import "./modules/platform-config/index.mjs";
99
+ import { useUserStore } from "./modules/user-stores/store/user.store.mjs";
100
+ import { useTenantStore } from "./modules/user-stores/store/tenant.store.mjs";
101
+ import { usePermissionStore } from "./modules/user-stores/store/permission.store.mjs";
102
+ import "./modules/user-stores/index.mjs";
103
+ import { createAppVue } from "./create-app-vue.mjs";
104
+ import { setupApp } from "./setup-app.mjs";
105
+ import { api } from "@gct-paas/api";
106
+ //#region src/index.ts
107
+ /**
108
+ * 核心包全局对象初始化,挂载到 window._gct 上
109
+ *
110
+ * @export
111
+ */
97
112
  function onInit() {
98
- if (window._gct) {
99
- console.warn("核心包已安装,请勿重复安装!");
100
- return;
101
- }
102
- console.info("核心包安装成功!");
103
- window._gct = new GctGlobal();
104
- Object.defineProperty(window._gct, "api", {
105
- get() {
106
- return api;
107
- }
108
- });
109
- Object.defineProperty(window, "_api", {
110
- get() {
111
- return api;
112
- }
113
- });
113
+ if (window._gct) {
114
+ console.warn("核心包已安装,请勿重复安装!");
115
+ return;
116
+ }
117
+ console.info("核心包安装成功!");
118
+ window._gct = new GctGlobal();
119
+ Object.defineProperty(window._gct, "api", { get() {
120
+ return api;
121
+ } });
122
+ Object.defineProperty(window, "_api", { get() {
123
+ return api;
124
+ } });
114
125
  }
115
126
  onInit();
116
-
117
- export { GctGlobal };
127
+ //#endregion
128
+ export { AGLINE_ENUMS, APP_DARK_MODE_KEY_, APP_INST, APP_LOCAL_CACHE_KEY, APP_PREVIEW_PATH_REG, APP_PROD_PATH_REG, APP_RUN_PATH_REG, APP_SESSION_CACHE_KEY, ARRAY_TYPE, ASSIGNMENTSTRATEGY_ENUM, AggTypes, AppPublishStateEnum, BOOLEAN_TYPE, BasicAction, BindCmpStyleEnum, BindCmpStyleTypeEnum, BizServiceEnum, BorderStyle, BpmnNodeTypeEnum, BuiltOperators, BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonOpeEnum, ButtonSize, ButtonStyle, ButtonType, ButtonTypeEnum, ButtonTypeGroup, ButtonType_vant, CARD_TRIGGER_ENUM, COLUMNS_TYPE, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CUSTOM_LANGUAGE, CUSTOM_THEME, CacheTypeEnum, CategoryTypeEnum, Ch_BindCmpStyleEnum, ContentEnum, ContentTypeEnum, CoreConst, CreateType, CustomAction, DESIGNER_SESSION_CACHE_KEY, DEV_SINGLE_PATH_REG, DataSetReturnTypeEnum, DatasourceTypeEnum, DateRangeEnums, DefaultActions, DefaultDateTypeConst, Dependency_ENUM, DeployModeEnum, DeviceParamsTypeEnum, DictionaryUtil, DisplayEnums, DisplayTagTypeEnum, DisplayType, EditorRegisterConst, EntityFormulaReturnTypeEnum, EntityModelCategoryEnum, EntityModelTypeEnum, EnvironmentManager, EnvironmentType, ErrorHandler, ErrorStrategyFactory, ErrorTypeEnum, EventCategory, ExamineAndApproveStateEnum, ExceptionEnum, ExpressionModeEnum, ExpressionTabEnum, FIELD_TYPE, FIELD_TYPE_BASIC, FIELD_TYPE_CATEGORY, FIELD_TYPE_LOGIC, FIELD_TYPE_TRACE, FUNC_KEYS, FUN_BOL_TYPE, FUN_NUM_TYPE, FUN_OBJ_OR_ARR_TYPE, FUN_STR_TYPE, FieldDefaultValueTypeEnum, FieldIconMap, FieldSysVarDefaultValueEnum, FieldTypeToJs, FormComponents, FormContainerType, FormDesignEnum, GENDER_TYPE, GLOBAL_TYPE, GLOBAL_VAR_TYPE, GctGlobal, GctMqttTopsEnum, GlobalParamEnum, GlobalStoreUtil, HOST_REG, INNER_EVENT, IP_REG, IdentifierAddon, KeyMode, KickRuleEnum, LOCALE_KEY, LOCALE_LIST_KEY, LOCAL_I18N_TRANSLATE, LOCK_INFO_KEY, LinkedList, LinkedNode, ListTreeSearchTypeEnum, LocaleUtil, LoginSortTypeEnum, LoginTypeEnum, MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, MQTT_CLIENT_EVENT, MQTT_DEFAULT_CONNECT_OPTIONS, MULTIPLE_TABS_KEY, MaterialEnum, MenuModeEnum, MenuSplitTyeEnum, MenuType, MenuTypeEnum, MessageType, MixSidebarTriggerEnum, Modal, ModeFnMap, ModeTabDict, ModeTabMap, ModelTypeOptions, MqttClient, MqttConnectionStatus, MqttManager, NUMBER_TYPE, Namespace, NodesConfigTypeEnum, OBJECT_TYPE, OTHER_LOGIN_KEYS, OpenMode, OperatorTypeEnum, OpinionTypeEnum, OverlayContainer, PLUGIN_BASE_URL, PROJ_CFG_KEY, PageEnum, PanelEnum, PassRule, PatternEnum, PermissionModeEnum, PersonalCenterType, Platform, PlatformSettingActions, PlatformSettingEnum, PlatformType, PluginModeEnum, PluginStaticResource, Postion, PrintModeEnums, PrintResourceEnum, PrintTypeEnum, ProcessStatusEnum, ProgressTypeEnum, ProjectName, PropGroup, RELATION_FIELDS, RETURN_TYPE_MAP, ROLES_KEY, RdoButtonOpeEnum, RequestEnum, ResetRuleType, ResultEnum, ReturnTypeEnum, ReturnTypeMaps, RoleEnum, RouterTransitionEnum, RowSelectionTypeEnums, SCOPE, SCOPEINFO, SEARCH_SERVICE, SHOW_FIELDTYPES, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, STRING_TYPE, STYLE_NAMESPACE_TAG, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, SYSTEM_LOGIN_KEYS, SYSTEM_VAR_PREFIX, SearchComponents, SelectPickerEnums, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, SignatureStyleEnum, SignatureTypeEnum, SizeEnum, StatisticalMethodEnums, StyleGroup, TENANT_KEY, TEST_SINGLE_PATH_REG, THEME_COLORS, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TIMEZONE_KEY, TODO_TYPE, TOKEN_KEY, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TagTypeEnum, TextAlign, TextDecoration, ThemeEnum, ToolkitEnum, TopMenuAlignEnum, TransactionMode, TreeHelper, TriggerEnum, TypeEnum, USER_INFO_KEY, UniqueConstraintType, UploadTypeEnum, Uploader, UserServiceType, VERIFICATIONCONDITIONS_TYPE, VITE_MINIO_PATH, VarTypeEnum, WATERMARK_INIT_DATA, WidgetInScopeEnum, WinMsgTypeEnum, WorkbenchType, afterFieldSet, afterValueSet, allOperator, biBackFunctionGroup, biBackFunctionMap, bindCmpStyleMap, booleanOperator, booleanTypes, buildItemRules, buildShortUUID, buildUUID, buttonShowType, cacheFnReturn, calcFontStyle, calcStyle, ch_ProcessStatusMap, computedEx, controlConfigEnum, copyTextToClipboard, createAppVue, cssLoader, dataURLtoBlob, deepMerge, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, emitFieldSet, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getDeviceFingerprint, getLoginTypeOptions, getMobileBrowserFingerprint, getOperatorList, getPageIdentification, getTenant, getTimezone, getToken, hasEmojiAndSpecStr, hasEmojiAndSpecStr1, innerVarIds, innerVarList, insertCustomCssToHead, interceptors, ipaasBackFunctionGroup, ipaasBackFunctionMap, isDef, isMobile, isMultipleOperator, isSortFiled, mitt, mobileSearchListByFieldType, modelLoader, notSingleArr, nullDisplayEnum, numberOperator, numberTypes, openWindow, openWindowEnums, operateSysEnums, operator2FuncMap, padSearchListByFieldType, pageLayoutModeEnum, parseMatrixParams, parseValueUnit, permission, presetColor, randomUUID, returnBolOperator, screenEnum, screenMap, scriptTypeEnum, searchListByFieldType, selectionTypeEnums, setTenant, setToken, setupApp, setupErrorHandler, setupI18n, sha256, sizeEnum, sizeParser, sortTypeEnum, statisticalMethodEnum, stringifyMatrixParams, t, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, tagEnum, timeReg, transformBindCmp2CmpType, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useCopyToClipboard, useIFrameProps, useModal, useNamespace, usePermissionStore, usePlatformConfigStore, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
@@ -21,17 +21,6 @@ export interface IGlobalState extends StateTree {
21
21
  * @type {ProjectName}
22
22
  */
23
23
  projectName: ProjectName;
24
- /**
25
- * 租户标识
26
- *
27
- * @type {string}
28
- */
29
- /**
30
- * 多语言环境
31
- *
32
- * @default zh-CN
33
- * @type {string}
34
- */
35
24
  /**
36
25
  * 应用信息, todo: 等 api 包完成后,实际类型从 api 导入
37
26
  *
@@ -1,60 +1,53 @@
1
- import { createI18n } from 'vue-i18n';
2
-
3
- class LocaleUtil {
4
- i18n = createI18n({
5
- legacy: false,
6
- locale: "zh-CN",
7
- fallbackLocale: "en",
8
- messages: {
9
- en: {
10
- message: {
11
- hello: "hello world"
12
- }
13
- },
14
- ja: {
15
- message: {
16
- hello: "こんにちは、世界"
17
- }
18
- }
19
- }
20
- });
21
- locale = "zh-CN";
22
- constructor() {
23
- this.init();
24
- }
25
- async init() {
26
- await this.loadLocales();
27
- const platformUrl = this.getMessageUrl({ locale: this.locale });
28
- await this.loadMessages(platformUrl);
29
- }
30
- async loadLocales() {
31
- const res = await (await fetch("/gct-platform/api/i18n-config/list")).json();
32
- if (res.code === 200) {
33
- const defaultItem = res.data.find((item) => item.defaultLanguage);
34
- this.locale = defaultItem.languageTag;
35
- }
36
- }
37
- async loadMessages(url, locale = this.locale) {
38
- const res = await fetch(url);
39
- const text = await res.text();
40
- const messages = text.split("\n").reduce((acc, item) => {
41
- const [key, ...value] = item.split(":");
42
- acc[key] = value.join(":");
43
- return acc;
44
- }, {});
45
- this.i18n.global.mergeLocaleMessage(locale, messages);
46
- }
47
- getMessageUrl(payload) {
48
- if ("app" in payload) {
49
- const tag = payload.env === "dev" ? `dev_${payload.branch}` : payload.env;
50
- return `minio/${payload.app}/locale-js/${tag}/${payload.locale}__.json`;
51
- }
52
- return `/minio/locale-js/${payload.locale}__platform__.json`;
53
- }
54
- // changeLocale(locale: string) {}
55
- }
1
+ import { createI18n } from "vue-i18n";
2
+ import { HttpUtil } from "@gct-paas/api";
3
+ //#region src/locale/index.ts
4
+ var LocaleUtil = class {
5
+ i18n = createI18n({
6
+ legacy: false,
7
+ locale: "zh-CN",
8
+ fallbackLocale: "en",
9
+ messages: {
10
+ en: { message: { hello: "hello world" } },
11
+ ja: { message: { hello: "こんにちは、世界" } }
12
+ }
13
+ });
14
+ locale = "zh-CN";
15
+ constructor() {
16
+ this.init();
17
+ }
18
+ async init() {
19
+ await this.loadLocales();
20
+ const platformUrl = this.getMessageUrl({ locale: this.locale });
21
+ await this.loadMessages(platformUrl);
22
+ }
23
+ async loadLocales() {
24
+ const data = await HttpUtil.get("/gct-platform/api/i18n-config/list");
25
+ if (data) {
26
+ const defaultItem = data.find((item) => item.defaultLanguage);
27
+ if (defaultItem) this.locale = defaultItem.languageTag;
28
+ }
29
+ }
30
+ async loadMessages(url, locale = this.locale) {
31
+ const data = await HttpUtil.get(url);
32
+ if (data) {
33
+ const messages = data.split("\n").reduce((acc, item) => {
34
+ const [key, ...value] = item.split(":");
35
+ acc[key] = value.join(":");
36
+ return acc;
37
+ }, {});
38
+ this.i18n.global.mergeLocaleMessage(locale, messages);
39
+ }
40
+ }
41
+ getMessageUrl(payload) {
42
+ if ("app" in payload) {
43
+ const tag = payload.env === "dev" ? `dev_${payload.branch}` : payload.env;
44
+ return `minio/${payload.app}/locale-js/${tag}/${payload.locale}__.json`;
45
+ }
46
+ return `/minio/locale-js/${payload.locale}__platform__.json`;
47
+ }
48
+ };
56
49
  function setupI18n(app) {
57
- app.use(_gct.i18n);
50
+ app.use(_gct.i18n);
58
51
  }
59
-
52
+ //#endregion
60
53
  export { LocaleUtil, setupI18n };
@@ -1,9 +1,17 @@
1
- const IP_REG = /^http:\/\/\d{1,3}(\.\d{1,3}){3}:(\d{1,5})$/;
2
- const HOST_REG = /^https?:\/\/([a-z0-9]+)-test\./;
3
- const APP_RUN_PATH_REG = /\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//;
4
- const APP_PROD_PATH_REG = /\/web\/|\/web-single\//;
5
- const APP_PREVIEW_PATH_REG = /\/web-render\//;
6
- const DEV_SINGLE_PATH_REG = /\/dev-single\//;
7
- const TEST_SINGLE_PATH_REG = /\/test-single\//;
8
-
1
+ //#region src/modules/env-manager/env-manager.const.ts
2
+ /** IP地址正则表达式 */
3
+ var IP_REG = /^http:\/\/\d{1,3}(\.\d{1,3}){3}:(\d{1,5})$/;
4
+ /** 域名正则表达式 */
5
+ var HOST_REG = /^https?:\/\/([a-z0-9]+)-test\./;
6
+ /** 应用运行时路径正则表达式 */
7
+ var APP_RUN_PATH_REG = /\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//;
8
+ /** 应用生产环境路径正则表达式 */
9
+ var APP_PROD_PATH_REG = /\/web\/|\/web-single\//;
10
+ /** 应用预览环境路径正则表达式 */
11
+ var APP_PREVIEW_PATH_REG = /\/web-render\//;
12
+ /** dev环境单应用路径正则表达式 */
13
+ var DEV_SINGLE_PATH_REG = /\/dev-single\//;
14
+ /** 测试环境单应用路径正则表达式 */
15
+ var TEST_SINGLE_PATH_REG = /\/test-single\//;
16
+ //#endregion
9
17
  export { APP_PREVIEW_PATH_REG, APP_PROD_PATH_REG, APP_RUN_PATH_REG, DEV_SINGLE_PATH_REG, HOST_REG, IP_REG, TEST_SINGLE_PATH_REG };
@@ -15,6 +15,8 @@ export declare class EnvironmentManager implements IEnvironmentManager {
15
15
  /** 域名访问模式标识 */
16
16
  private _isHostMode;
17
17
  constructor();
18
+ /**安卓混合开发模式下 */
19
+ get isAndroid(): boolean;
18
20
  /**
19
21
  * 是否为应用前端运行时
20
22
  */
@@ -14,6 +14,8 @@ export declare enum EnvironmentType {
14
14
  * 环境管理器接口
15
15
  */
16
16
  export interface IEnvironmentManager {
17
+ /** 是否为安卓混合模式下运行 */
18
+ readonly isAndroid: boolean;
17
19
  /** 是否为应用前端运行时 */
18
20
  readonly isAppRun: boolean;
19
21
  /** 是否为应用前端运行时生产环境 */
@@ -1,8 +1,15 @@
1
- var EnvironmentType = /* @__PURE__ */ ((EnvironmentType2) => {
2
- EnvironmentType2["DEV"] = "dev";
3
- EnvironmentType2["TEST"] = "test";
4
- EnvironmentType2["PROD"] = "prod";
5
- return EnvironmentType2;
6
- })(EnvironmentType || {});
7
-
1
+ //#region src/modules/env-manager/env-manager.interface.ts
2
+ /**
3
+ * 环境类型枚举
4
+ */
5
+ var EnvironmentType = /* @__PURE__ */ function(EnvironmentType) {
6
+ /** 开发环境 */
7
+ EnvironmentType["DEV"] = "dev";
8
+ /** 测试环境 */
9
+ EnvironmentType["TEST"] = "test";
10
+ /** 生产环境 */
11
+ EnvironmentType["PROD"] = "prod";
12
+ return EnvironmentType;
13
+ }({});
14
+ //#endregion
8
15
  export { EnvironmentType };