@gct-paas/core 0.1.4-dev.12 → 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.
- package/dist/index.esm.min.js +1684 -18841
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.mjs +1 -0
- package/es/constants/page-designer/regex.d.ts +2 -0
- package/es/constants/page-designer/regex.mjs +5 -0
- package/es/enums/index.mjs +1 -0
- package/es/enums/page-designer/index.d.ts +1 -0
- package/es/enums/page-designer/index.mjs +1 -0
- package/es/enums/page-designer/layout.d.ts +12 -0
- package/es/enums/page-designer/layout.mjs +17 -0
- package/es/index.mjs +5 -2
- package/es/interface/i-pinia-state/i-global-state.d.ts +0 -11
- package/es/locale/index.mjs +15 -8
- package/es/modules/env-manager/env-manager.d.ts +2 -0
- package/es/modules/env-manager/env-manager.interface.d.ts +2 -0
- package/es/modules/env-manager/env-manager.mjs +5 -1
- package/es/state/global-pinia-state/global-pinia-state.d.ts +0 -6
- package/es/state/global-pinia-state/global-pinia-state.mjs +0 -6
- package/es/utils/css-loader/css-loader.d.ts +36 -0
- package/es/utils/css-loader/css-loader.mjs +82 -0
- package/es/utils/deviceFingerprint.mjs +6 -3
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.mjs +1 -0
- package/es/utils/uuid/uuid.d.ts +2 -1
- package/es/utils/uuid/uuid.mjs +1 -4
- package/package.json +7 -15
package/es/constants/index.d.ts
CHANGED
|
@@ -20,3 +20,4 @@ export { FormContainerType } from './form-container-type/form-container-type';
|
|
|
20
20
|
export { DefaultDateTypeConst } from './default-date-type/default-date-type';
|
|
21
21
|
export { CoreConst } from './core';
|
|
22
22
|
export { ModelTypeOptions } from './page-designer/model';
|
|
23
|
+
export * from './page-designer/regex';
|
package/es/constants/index.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import "./form-container-type/form-container-type.mjs";
|
|
|
10
10
|
import "./default-date-type/default-date-type.mjs";
|
|
11
11
|
import "./core.mjs";
|
|
12
12
|
import "./page-designer/model.mjs";
|
|
13
|
+
import "./page-designer/regex.mjs";
|
|
13
14
|
//#region src/constants/index.ts
|
|
14
15
|
/**
|
|
15
16
|
* 默认样式命名空间名称
|
package/es/enums/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import "./page-designer/panel.mjs";
|
|
|
4
4
|
import "./page-designer/toolkit.mjs";
|
|
5
5
|
import "./page-designer/widget.mjs";
|
|
6
6
|
import "./page-designer/designer.mjs";
|
|
7
|
+
import "./page-designer/layout.mjs";
|
|
7
8
|
import "./page-designer/index.mjs";
|
|
8
9
|
import "./developer-center/integration.mjs";
|
|
9
10
|
import "./appStateEnum.mjs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/enums/page-designer/layout.ts
|
|
2
|
+
var FormDesignEnum = /* @__PURE__ */ function(FormDesignEnum) {
|
|
3
|
+
/**在线表单 */
|
|
4
|
+
FormDesignEnum["ONLINE_FORM"] = "online_form_module";
|
|
5
|
+
/**eDHR */
|
|
6
|
+
FormDesignEnum["EDHR"] = "edhr_module";
|
|
7
|
+
return FormDesignEnum;
|
|
8
|
+
}({});
|
|
9
|
+
var PrintTypeEnum = /* @__PURE__ */ function(PrintTypeEnum) {
|
|
10
|
+
/** 标签 */
|
|
11
|
+
PrintTypeEnum["LABEL"] = "label_module";
|
|
12
|
+
/** 单据 */
|
|
13
|
+
PrintTypeEnum["RECEIPT"] = "document_module";
|
|
14
|
+
return PrintTypeEnum;
|
|
15
|
+
}({});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { FormDesignEnum, PrintTypeEnum };
|
package/es/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { ASSIGNMENTSTRATEGY_ENUM, BorderStyle, COLUMNS_TYPE, Dependency_ENUM, Di
|
|
|
4
4
|
import { ToolkitEnum } from "./enums/page-designer/toolkit.mjs";
|
|
5
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
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";
|
|
7
8
|
import { PrintResourceEnum } from "./enums/developer-center/integration.mjs";
|
|
8
9
|
import { AppPublishStateEnum } from "./enums/appStateEnum.mjs";
|
|
9
10
|
import { BasicAction, CustomAction, DefaultActions, PlatformSettingActions } from "./enums/authActionEnum.mjs";
|
|
@@ -21,6 +22,7 @@ import { BpmnNodeTypeEnum, ButtonTypeEnum, ExamineAndApproveStateEnum, OpinionTy
|
|
|
21
22
|
import { PluginModeEnum } from "./enums/plugin-enum.mjs";
|
|
22
23
|
import { DataSetReturnTypeEnum, EntityFormulaReturnTypeEnum, ExpressionModeEnum, ExpressionTabEnum, IdentifierAddon, OperatorTypeEnum, ReturnTypeEnum, VarTypeEnum, zeroWidthSpace } from "./enums/expressionEnum.mjs";
|
|
23
24
|
import { GctMqttTopsEnum, GlobalParamEnum } from "./enums/index.mjs";
|
|
25
|
+
import { cssLoader } from "./utils/css-loader/css-loader.mjs";
|
|
24
26
|
import { gctMemoizeAsync } from "./utils/cache-adapter/cache-adapter.mjs";
|
|
25
27
|
import { DictionaryUtil } from "./utils/dictionary/dictionary.mjs";
|
|
26
28
|
import { t } from "./utils/i18n/index.mjs";
|
|
@@ -42,6 +44,7 @@ import { FormContainerType } from "./constants/form-container-type/form-containe
|
|
|
42
44
|
import { DefaultDateTypeConst } from "./constants/default-date-type/default-date-type.mjs";
|
|
43
45
|
import { CoreConst } from "./constants/core.mjs";
|
|
44
46
|
import { ModelTypeOptions } from "./constants/page-designer/model.mjs";
|
|
47
|
+
import { timeReg, urlReg } from "./constants/page-designer/regex.mjs";
|
|
45
48
|
import { APP_INST, PLUGIN_BASE_URL, STYLE_NAMESPACE_TAG, VITE_MINIO_PATH } from "./constants/index.mjs";
|
|
46
49
|
import { Namespace, useNamespace } from "./utils/namespace/namespace.mjs";
|
|
47
50
|
import { Modal } from "./utils/openUtil/modal/modal.mjs";
|
|
@@ -51,7 +54,7 @@ import { deepMerge, getTenant, getTimezone, getToken, isMobile, parseMatrixParam
|
|
|
51
54
|
import { buildShortUUID, buildUUID, sha256, uuid2 } from "./utils/uuid/uuid.mjs";
|
|
52
55
|
import { afterFieldSet, afterValueSet, cacheFnReturn, computedEx, emitFieldSet, parseValueUnit } from "./utils/value-helper/value-helper.mjs";
|
|
53
56
|
import { interceptors } from "./utils/axios/interceptors.mjs";
|
|
54
|
-
import { getDeviceFingerprint, getPageIdentification } from "./utils/deviceFingerprint.mjs";
|
|
57
|
+
import { getDeviceFingerprint, getMobileBrowserFingerprint, getPageIdentification } from "./utils/deviceFingerprint.mjs";
|
|
55
58
|
import { TreeHelper } from "./utils/treeHelper/treeHelper.mjs";
|
|
56
59
|
import { calcFontStyle, calcStyle } from "./utils/style/index.mjs";
|
|
57
60
|
import { genUrl, openWindow } from "./utils/util.mjs";
|
|
@@ -122,4 +125,4 @@ function onInit() {
|
|
|
122
125
|
}
|
|
123
126
|
onInit();
|
|
124
127
|
//#endregion
|
|
125
|
-
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, 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, 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, dataURLtoBlob, deepMerge, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, emitFieldSet, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getDeviceFingerprint, getLoginTypeOptions, 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, transformBindCmp2CmpType, typeParser, uploaderFiles, urlToBase64, useAppInst, useCopyToClipboard, useIFrameProps, useModal, useNamespace, usePermissionStore, usePlatformConfigStore, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
|
|
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
|
*
|
package/es/locale/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createI18n } from "vue-i18n";
|
|
2
|
+
import { HttpUtil } from "@gct-paas/api";
|
|
2
3
|
//#region src/locale/index.ts
|
|
3
4
|
var LocaleUtil = class {
|
|
4
5
|
i18n = createI18n({
|
|
@@ -20,16 +21,22 @@ var LocaleUtil = class {
|
|
|
20
21
|
await this.loadMessages(platformUrl);
|
|
21
22
|
}
|
|
22
23
|
async loadLocales() {
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
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
|
+
}
|
|
25
29
|
}
|
|
26
30
|
async loadMessages(url, locale = this.locale) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
}
|
|
33
40
|
}
|
|
34
41
|
getMessageUrl(payload) {
|
|
35
42
|
if ("app" in payload) {
|
|
@@ -19,6 +19,10 @@ var EnvironmentManager = class {
|
|
|
19
19
|
this._platformOrigin = location.origin || "";
|
|
20
20
|
this._isHostMode = HOST_REG.test(this._platformOrigin);
|
|
21
21
|
}
|
|
22
|
+
/**安卓混合开发模式下 */
|
|
23
|
+
get isAndroid() {
|
|
24
|
+
return window.location.origin === "file://";
|
|
25
|
+
}
|
|
22
26
|
/**
|
|
23
27
|
* 是否为应用前端运行时
|
|
24
28
|
*/
|
|
@@ -97,7 +101,7 @@ var EnvironmentManager = class {
|
|
|
97
101
|
*/
|
|
98
102
|
getEnv() {
|
|
99
103
|
if (this.isTestEnv) return EnvironmentType.TEST;
|
|
100
|
-
else if (this.isAppProd) return EnvironmentType.PROD;
|
|
104
|
+
else if (this.isAppProd || this.isAndroid) return EnvironmentType.PROD;
|
|
101
105
|
else return EnvironmentType.DEV;
|
|
102
106
|
}
|
|
103
107
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS 动态加载工具类
|
|
3
|
+
*
|
|
4
|
+
* 从 CDN 动态加载 CSS 文件,具备以下特性:
|
|
5
|
+
* - 已成功加载的路径永久缓存,避免重复插入 link 标签
|
|
6
|
+
* - 同一时刻对同一路径的多次调用共享同一个 Promise(请求去重)
|
|
7
|
+
* - 加载失败不写入缓存,允许下次重试
|
|
8
|
+
* - 加载前检查 DOM 中是否已存在相同 href 的 link 标签
|
|
9
|
+
*
|
|
10
|
+
* @author chitanda
|
|
11
|
+
* @date 2026-03-16
|
|
12
|
+
* @class CssLoader
|
|
13
|
+
*/
|
|
14
|
+
declare class CssLoader {
|
|
15
|
+
/** 已成功加载的 CSS URL 集合(永久缓存) */
|
|
16
|
+
private _loadedSet;
|
|
17
|
+
/** 正在加载中的 CSS URL 对应的 Promise(用于请求去重) */
|
|
18
|
+
private _pendingMap;
|
|
19
|
+
/**
|
|
20
|
+
* 动态加载单个 CSS 文件
|
|
21
|
+
*
|
|
22
|
+
* @param {string} url CSS 文件的完整 URL
|
|
23
|
+
* @returns {Promise<void>} 加载完成后 resolve;加载失败则 reject
|
|
24
|
+
*/
|
|
25
|
+
load(url: string): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* 并发加载多个 CSS 文件
|
|
28
|
+
*
|
|
29
|
+
* @param {string[]} urls CSS 文件 URL 列表
|
|
30
|
+
* @returns {Promise<void>} 所有文件均加载完成后 resolve;任一失败则 reject
|
|
31
|
+
*/
|
|
32
|
+
loadBatch(urls: string[]): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
/** CSS 动态加载工具单例 */
|
|
35
|
+
export declare const cssLoader: CssLoader;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//#region src/utils/css-loader/css-loader.ts
|
|
2
|
+
/**
|
|
3
|
+
* CSS 动态加载工具类
|
|
4
|
+
*
|
|
5
|
+
* 从 CDN 动态加载 CSS 文件,具备以下特性:
|
|
6
|
+
* - 已成功加载的路径永久缓存,避免重复插入 link 标签
|
|
7
|
+
* - 同一时刻对同一路径的多次调用共享同一个 Promise(请求去重)
|
|
8
|
+
* - 加载失败不写入缓存,允许下次重试
|
|
9
|
+
* - 加载前检查 DOM 中是否已存在相同 href 的 link 标签
|
|
10
|
+
*
|
|
11
|
+
* @author chitanda
|
|
12
|
+
* @date 2026-03-16
|
|
13
|
+
* @class CssLoader
|
|
14
|
+
*/
|
|
15
|
+
var CssLoader = class {
|
|
16
|
+
/** 已成功加载的 CSS URL 集合(永久缓存) */
|
|
17
|
+
_loadedSet = /* @__PURE__ */ new Set();
|
|
18
|
+
/** 正在加载中的 CSS URL 对应的 Promise(用于请求去重) */
|
|
19
|
+
_pendingMap = /* @__PURE__ */ new Map();
|
|
20
|
+
/**
|
|
21
|
+
* 动态加载单个 CSS 文件
|
|
22
|
+
*
|
|
23
|
+
* @param {string} url CSS 文件的完整 URL
|
|
24
|
+
* @returns {Promise<void>} 加载完成后 resolve;加载失败则 reject
|
|
25
|
+
*/
|
|
26
|
+
load(url) {
|
|
27
|
+
if (this._loadedSet.has(url)) return Promise.resolve();
|
|
28
|
+
if (this._pendingMap.has(url)) return this._pendingMap.get(url);
|
|
29
|
+
if (typeof document !== "undefined") {
|
|
30
|
+
if (document.querySelector(`link[rel="stylesheet"][href="${CSS.escape ? CSS.escape(url) : url}"]`)) {
|
|
31
|
+
this._loadedSet.add(url);
|
|
32
|
+
return Promise.resolve();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const promise = new Promise((resolve, reject) => {
|
|
36
|
+
if (typeof document === "undefined") {
|
|
37
|
+
reject(/* @__PURE__ */ new Error(`[CssLoader] 当前环境不支持 DOM,无法加载 CSS: ${url}`));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const link = document.createElement("link");
|
|
41
|
+
link.rel = "stylesheet";
|
|
42
|
+
link.type = "text/css";
|
|
43
|
+
link.href = url;
|
|
44
|
+
/** 加载成功回调 */
|
|
45
|
+
const onLoad = () => {
|
|
46
|
+
cleanup();
|
|
47
|
+
this._loadedSet.add(url);
|
|
48
|
+
this._pendingMap.delete(url);
|
|
49
|
+
resolve();
|
|
50
|
+
};
|
|
51
|
+
/** 加载失败回调 */
|
|
52
|
+
const onError = () => {
|
|
53
|
+
cleanup();
|
|
54
|
+
this._pendingMap.delete(url);
|
|
55
|
+
reject(/* @__PURE__ */ new Error(`[CssLoader] CSS 文件加载失败: ${url}`));
|
|
56
|
+
};
|
|
57
|
+
/** 移除事件监听,防止内存泄漏 */
|
|
58
|
+
const cleanup = () => {
|
|
59
|
+
link.removeEventListener("load", onLoad);
|
|
60
|
+
link.removeEventListener("error", onError);
|
|
61
|
+
};
|
|
62
|
+
link.addEventListener("load", onLoad);
|
|
63
|
+
link.addEventListener("error", onError);
|
|
64
|
+
document.head.appendChild(link);
|
|
65
|
+
});
|
|
66
|
+
this._pendingMap.set(url, promise);
|
|
67
|
+
return promise;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* 并发加载多个 CSS 文件
|
|
71
|
+
*
|
|
72
|
+
* @param {string[]} urls CSS 文件 URL 列表
|
|
73
|
+
* @returns {Promise<void>} 所有文件均加载完成后 resolve;任一失败则 reject
|
|
74
|
+
*/
|
|
75
|
+
async loadBatch(urls) {
|
|
76
|
+
await Promise.all(urls.map((url) => this.load(url)));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
/** CSS 动态加载工具单例 */
|
|
80
|
+
var cssLoader = new CssLoader();
|
|
81
|
+
//#endregion
|
|
82
|
+
export { cssLoader };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import FingerprintJS from "@fingerprintjs/fingerprintjs";
|
|
2
1
|
//#region src/utils/deviceFingerprint.ts
|
|
3
2
|
/** 指纹缓存 key */
|
|
4
3
|
var FINGERPRINT_KEY = "FINGERPRINT";
|
|
@@ -56,7 +55,7 @@ function getClientPlatform() {
|
|
|
56
55
|
}
|
|
57
56
|
/** 获取浏览器指纹对象 */
|
|
58
57
|
async function getFingerprint() {
|
|
59
|
-
return (await
|
|
58
|
+
return (await (await import("@fingerprintjs/fingerprintjs")).load()).get();
|
|
60
59
|
}
|
|
61
60
|
/** 获取设备指纹标识(统一入口) */
|
|
62
61
|
async function getDeviceFingerprint() {
|
|
@@ -71,6 +70,10 @@ async function getDeviceFingerprint() {
|
|
|
71
70
|
if (isWeb) localStorage.setItem(FINGERPRINT_KEY, visitorId);
|
|
72
71
|
return `${name}/${visitorId}`;
|
|
73
72
|
}
|
|
73
|
+
/** mobile 端指纹(语义兼容) */
|
|
74
|
+
function getMobileBrowserFingerprint() {
|
|
75
|
+
return getDeviceFingerprint();
|
|
76
|
+
}
|
|
74
77
|
/** 页签唯一标识 */
|
|
75
78
|
function getPageIdentification() {
|
|
76
79
|
let pageTag = sessionStorage.getItem("currentPageTag");
|
|
@@ -81,4 +84,4 @@ function getPageIdentification() {
|
|
|
81
84
|
return pageTag;
|
|
82
85
|
}
|
|
83
86
|
//#endregion
|
|
84
|
-
export { getDeviceFingerprint, getPageIdentification };
|
|
87
|
+
export { getDeviceFingerprint, getMobileBrowserFingerprint, getPageIdentification };
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { cssLoader } from './css-loader/css-loader';
|
|
1
2
|
export { gctMemoizeAsync } from './cache-adapter/cache-adapter';
|
|
2
3
|
export { DictionaryUtil } from './dictionary/dictionary';
|
|
3
4
|
export { t } from './i18n';
|
|
@@ -14,7 +15,7 @@ export { getToken, setToken, getTenant, getTimezone, isMobile, setTenant, deepMe
|
|
|
14
15
|
export * from './uuid/uuid';
|
|
15
16
|
export * from './value-helper/value-helper';
|
|
16
17
|
export { interceptors } from './axios/interceptors';
|
|
17
|
-
export { getDeviceFingerprint, getPageIdentification, } from './deviceFingerprint';
|
|
18
|
+
export { getDeviceFingerprint, getPageIdentification, getMobileBrowserFingerprint, } from './deviceFingerprint';
|
|
18
19
|
export { TreeHelper } from './treeHelper/treeHelper';
|
|
19
20
|
export * from './style';
|
|
20
21
|
export * from './util';
|
package/es/utils/index.mjs
CHANGED
package/es/utils/uuid/uuid.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { sha256 } from 'js-sha256';
|
|
1
2
|
export declare function buildUUID(): string;
|
|
2
3
|
export declare function buildShortUUID(prefix?: string): string;
|
|
3
4
|
export declare const uuid2: (len: number, radix?: number) => string;
|
|
4
|
-
export
|
|
5
|
+
export { sha256 };
|
package/es/utils/uuid/uuid.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { sha256 } from "js-sha256";
|
|
2
2
|
//#region src/utils/uuid/uuid.ts
|
|
3
3
|
var hexList = [];
|
|
4
4
|
for (let i = 0; i <= 15; i++) hexList[i] = i.toString(16);
|
|
@@ -34,8 +34,5 @@ var uuid2 = (len, radix) => {
|
|
|
34
34
|
}
|
|
35
35
|
return uuid.join("");
|
|
36
36
|
};
|
|
37
|
-
function sha256(password) {
|
|
38
|
-
return CryptoJS.SHA256(password).toString(CryptoJS.enc.Hex);
|
|
39
|
-
}
|
|
40
37
|
//#endregion
|
|
41
38
|
export { buildShortUUID, buildUUID, sha256, uuid2 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/core",
|
|
3
|
-
"version": "0.1.4-dev.
|
|
3
|
+
"version": "0.1.4-dev.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台核心包",
|
|
6
6
|
"main": "dist/index.min.cjs",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"@vueuse/core": "^14.1.0",
|
|
54
54
|
"async-validator": "^4.2.5",
|
|
55
55
|
"axios": "^1.13.2",
|
|
56
|
-
"crypto-js": "^4.2.0",
|
|
57
56
|
"dayjs": "^1.11.19",
|
|
58
57
|
"js-sha256": "^0.11.1",
|
|
59
58
|
"lodash-es": "^4.17.23",
|
|
@@ -62,28 +61,21 @@
|
|
|
62
61
|
"overlayscrollbars": "^2.14.0",
|
|
63
62
|
"path-browserify": "^1.0.1",
|
|
64
63
|
"pinia": "^3.0.4",
|
|
65
|
-
"qs": "^6.
|
|
64
|
+
"qs": "^6.15.0",
|
|
66
65
|
"qx-util": "^0.4.8",
|
|
67
|
-
"
|
|
68
|
-
"vue": "
|
|
69
|
-
"vue-i18n": "11.2.8",
|
|
66
|
+
"vue": "^3.5.30",
|
|
67
|
+
"vue-i18n": "11.3.0",
|
|
70
68
|
"vue-router": "^4.6.4",
|
|
71
69
|
"wujie": "^1.0.29"
|
|
72
70
|
},
|
|
73
71
|
"devDependencies": {
|
|
74
|
-
"@gct-paas/build": "^0.1.6-dev.
|
|
75
|
-
"@types/crypto-js": "^4.2.2",
|
|
72
|
+
"@gct-paas/build": "^0.1.6-dev.4",
|
|
76
73
|
"@types/lodash-es": "^4.17.12",
|
|
77
74
|
"@types/path-browserify": "^1.0.3",
|
|
78
75
|
"@types/qs": "^6.15.0",
|
|
79
|
-
"@vitest/browser": "^4.1.0",
|
|
80
|
-
"@vitest/coverage-istanbul": "^4.1.0",
|
|
81
|
-
"@vitest/coverage-v8": "^4.1.0",
|
|
82
|
-
"@vitest/ui": "^4.1.0",
|
|
83
76
|
"@vue/test-utils": "^2.4.6",
|
|
84
77
|
"fs-extra": "^11.3.3",
|
|
85
|
-
"playwright": "^1.58.0"
|
|
86
|
-
"vitest": "^4.1.0"
|
|
78
|
+
"playwright": "^1.58.0"
|
|
87
79
|
},
|
|
88
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "730343d424ac98e1cd00b6f4cddf8a9823a48357"
|
|
89
81
|
}
|