@gct-paas/core 0.1.6-dev.2 → 0.1.6-dev.20

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 (95) hide show
  1. package/dist/index.esm.min.js +2 -1
  2. package/dist/{redirect-index-Ck5Ddtcb.js → redirect-index-s_-u6jPX.js} +1 -0
  3. package/es/constants/core.d.ts +1 -0
  4. package/es/constants/core.mjs +27 -1
  5. package/es/constants/expression-type/modeCfg.mjs +6 -0
  6. package/es/constants/index.d.ts +1 -1
  7. package/es/create-app-vue.d.ts +1 -1
  8. package/es/create-app-vue.mjs +1 -1
  9. package/es/enums/app-designer/index.d.ts +29 -3
  10. package/es/enums/app-designer/index.mjs +33 -4
  11. package/es/enums/appEnum.d.ts +5 -1
  12. package/es/enums/appEnum.mjs +6 -1
  13. package/es/enums/authActionEnum.d.ts +5 -1
  14. package/es/enums/authActionEnum.mjs +4 -0
  15. package/es/enums/developer-center/integration.d.ts +6 -0
  16. package/es/enums/developer-center/integration.mjs +8 -1
  17. package/es/enums/expressionEnum.d.ts +4 -2
  18. package/es/enums/expressionEnum.mjs +2 -0
  19. package/es/enums/globalEnum.d.ts +47 -0
  20. package/es/enums/globalEnum.mjs +51 -1
  21. package/es/enums/index.d.ts +11 -0
  22. package/es/enums/index.mjs +13 -1
  23. package/es/enums/pageEnum.d.ts +2 -1
  24. package/es/enums/pageEnum.mjs +1 -0
  25. package/es/enums/process.d.ts +5 -0
  26. package/es/enums/process.mjs +9 -0
  27. package/es/enums/sizeEnum.d.ts +4 -0
  28. package/es/enums/sizeEnum.mjs +6 -1
  29. package/es/global/gct/gct.d.ts +15 -15
  30. package/es/global/gct/gct.mjs +4 -5
  31. package/es/hooks/index.d.ts +2 -0
  32. package/es/hooks/index.mjs +2 -0
  33. package/es/hooks/useDebouncePromise.d.ts +14 -0
  34. package/es/hooks/useDebouncePromise.mjs +56 -0
  35. package/es/hooks/useObserver.d.ts +13 -0
  36. package/es/hooks/useObserver.mjs +46 -0
  37. package/es/index.mjs +34 -18
  38. package/es/interface/i-action-item/i-action-item.d.ts +65 -0
  39. package/es/interface/i-app-context/i-app-context.d.ts +13 -0
  40. package/es/interface/i-dictionary/i-dictionary-item.d.ts +80 -0
  41. package/es/interface/i-kit-plugin-module/i-kit-plugin-module.d.ts +2 -2
  42. package/es/interface/i-pinia-action/i-global-actions.d.ts +3 -0
  43. package/es/interface/index.d.ts +2 -1
  44. package/es/interface/open-util/i-drawer-options/i-drawer-options.d.ts +298 -0
  45. package/es/interface/open-util/i-modal/i-modal.d.ts +14 -1
  46. package/es/interface/open-util/i-modal-data/i-modal-data.d.ts +3 -3
  47. package/es/interface/open-util/i-modal-options/i-modal-options.d.ts +2 -1
  48. package/es/interface/open-util/i-overlay-controller/i-overlay-controller.d.ts +9 -0
  49. package/es/interface/open-util/index.d.ts +1 -0
  50. package/es/locale/index.d.ts +2 -1
  51. package/es/modules/env-manager/env-manager.const.d.ts +2 -0
  52. package/es/modules/env-manager/env-manager.const.mjs +4 -2
  53. package/es/modules/env-manager/env-manager.d.ts +1 -13
  54. package/es/modules/env-manager/env-manager.interface.d.ts +6 -8
  55. package/es/modules/env-manager/env-manager.interface.mjs +2 -0
  56. package/es/modules/env-manager/env-manager.mjs +11 -26
  57. package/es/modules/env-manager/env-manager.util.d.ts +5 -0
  58. package/es/modules/env-manager/env-manager.util.mjs +11 -0
  59. package/es/modules/env-manager/index.d.ts +1 -0
  60. package/es/modules/env-manager/index.mjs +4 -0
  61. package/es/modules/platform-config/enums/login.enum.d.ts +3 -1
  62. package/es/modules/platform-config/enums/login.enum.mjs +2 -0
  63. package/es/modules/platform-config/store.d.ts +15 -15
  64. package/es/modules/platform-config/useDeploySetting.d.ts +1 -2
  65. package/es/modules/platform-config/useDeploySetting.mjs +6 -3
  66. package/es/modules/platform-config/useLoginSetting.d.ts +2 -2
  67. package/es/modules/platform-config/useLoginSetting.mjs +29 -31
  68. package/es/modules/platform-config/useOrgSetting.d.ts +2 -2
  69. package/es/modules/platform-config/useOrgSetting.mjs +4 -6
  70. package/es/modules/platform-config/useSecuritySetting.d.ts +2 -2
  71. package/es/modules/platform-config/useSecuritySetting.mjs +2 -3
  72. package/es/modules/platform-config/useWatermarkSetting.d.ts +5 -2
  73. package/es/modules/platform-config/useWatermarkSetting.mjs +2 -3
  74. package/es/modules/user-stores/store/tenant.store.d.ts +3 -5
  75. package/es/modules/user-stores/store/tenant.store.mjs +10 -12
  76. package/es/modules/user-stores/store/user.store.mjs +4 -4
  77. package/es/store/global-store.mjs +12 -4
  78. package/es/store/index.d.ts +1 -1
  79. package/es/store/session-store.d.ts +1 -0
  80. package/es/store/session-store.mjs +2 -1
  81. package/es/types/index.d.ts +13 -0
  82. package/es/utils/axios/interceptors.mjs +12 -0
  83. package/es/utils/deviceFingerprint.mjs +5 -1
  84. package/es/utils/i18n/index.mjs +1 -0
  85. package/es/utils/index.d.ts +3 -2
  86. package/es/utils/index.mjs +1 -0
  87. package/es/utils/namespace/namespace.mjs +1 -0
  88. package/es/utils/openUtil/modal/modal.d.ts +1 -1
  89. package/es/utils/openUtil/overlay-container/overlay-container.d.ts +1 -1
  90. package/es/utils/openUtil/overlay-container/overlay-container.mjs +28 -23
  91. package/es/utils/select-user-utils.d.ts +50 -0
  92. package/es/utils/select-user-utils.mjs +129 -0
  93. package/es/utils/tools/tools.d.ts +4 -2
  94. package/es/utils/tools/tools.mjs +20 -5
  95. package/package.json +3 -3
@@ -9,18 +9,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
9
9
  deploySetting: {
10
10
  deployMode: import('./enums').DeployModeEnum;
11
11
  };
12
- setDeploySetting: (data: SysConfigResponse) => void;
12
+ setDeploySetting: (data: IObject | undefined) => void;
13
13
  isIndependentApp: import('vue').ComputedRef<boolean>;
14
14
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
15
15
  postLoginSetting: () => Promise<void>;
16
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
16
+ setLoginSetting: (config: IObject | undefined) => void;
17
17
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
18
18
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
19
19
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
20
20
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
21
21
  loginModeConfig: Map<string, IObject>;
22
22
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
23
- setOrgSetting: (data: SysConfigResponse) => void;
23
+ setOrgSetting: (data: IObject) => void;
24
24
  postOrgSetting: () => Promise<void>;
25
25
  relationFields: import('vue').Ref<{
26
26
  label: string;
@@ -47,7 +47,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
47
47
  }[]>;
48
48
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
49
49
  postSecuritySetting: () => Promise<void>;
50
- setSecuritySetting: (data: SysConfigResponse) => void;
50
+ setSecuritySetting: (data: IObject | undefined) => void;
51
51
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
52
52
  themeSetting: import('./interfaces').IThemeSetting;
53
53
  setThemeSetting: (data: SysConfigResponse) => void;
@@ -70,7 +70,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
70
70
  height: number;
71
71
  };
72
72
  postWatermarkSetting: () => Promise<void>;
73
- setWatermarkSetting: (data: SysConfigResponse) => void;
73
+ setWatermarkSetting: (data: IObject | undefined) => void;
74
74
  projectSetting: {};
75
75
  setProjectConfig: (config: {}) => void;
76
76
  init: () => Promise<void>;
@@ -82,18 +82,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
82
82
  deploySetting: {
83
83
  deployMode: import('./enums').DeployModeEnum;
84
84
  };
85
- setDeploySetting: (data: SysConfigResponse) => void;
85
+ setDeploySetting: (data: IObject | undefined) => void;
86
86
  isIndependentApp: import('vue').ComputedRef<boolean>;
87
87
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
88
88
  postLoginSetting: () => Promise<void>;
89
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
89
+ setLoginSetting: (config: IObject | undefined) => void;
90
90
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
91
91
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
92
92
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
93
93
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
94
94
  loginModeConfig: Map<string, IObject>;
95
95
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
96
- setOrgSetting: (data: SysConfigResponse) => void;
96
+ setOrgSetting: (data: IObject) => void;
97
97
  postOrgSetting: () => Promise<void>;
98
98
  relationFields: import('vue').Ref<{
99
99
  label: string;
@@ -120,7 +120,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
120
120
  }[]>;
121
121
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
122
122
  postSecuritySetting: () => Promise<void>;
123
- setSecuritySetting: (data: SysConfigResponse) => void;
123
+ setSecuritySetting: (data: IObject | undefined) => void;
124
124
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
125
125
  themeSetting: import('./interfaces').IThemeSetting;
126
126
  setThemeSetting: (data: SysConfigResponse) => void;
@@ -143,7 +143,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
143
143
  height: number;
144
144
  };
145
145
  postWatermarkSetting: () => Promise<void>;
146
- setWatermarkSetting: (data: SysConfigResponse) => void;
146
+ setWatermarkSetting: (data: IObject | undefined) => void;
147
147
  projectSetting: {};
148
148
  setProjectConfig: (config: {}) => void;
149
149
  init: () => Promise<void>;
@@ -155,18 +155,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
155
155
  deploySetting: {
156
156
  deployMode: import('./enums').DeployModeEnum;
157
157
  };
158
- setDeploySetting: (data: SysConfigResponse) => void;
158
+ setDeploySetting: (data: IObject | undefined) => void;
159
159
  isIndependentApp: import('vue').ComputedRef<boolean>;
160
160
  loginSetting: import('@gct-paas/api/platform').AuthConfig;
161
161
  postLoginSetting: () => Promise<void>;
162
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
162
+ setLoginSetting: (config: IObject | undefined) => void;
163
163
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
164
164
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
165
165
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
166
166
  openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
167
167
  loginModeConfig: Map<string, IObject>;
168
168
  orgSetting: import('@gct-paas/api/platform').OrgConfig;
169
- setOrgSetting: (data: SysConfigResponse) => void;
169
+ setOrgSetting: (data: IObject) => void;
170
170
  postOrgSetting: () => Promise<void>;
171
171
  relationFields: import('vue').Ref<{
172
172
  label: string;
@@ -193,7 +193,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
193
193
  }[]>;
194
194
  securitySetting: import('@gct-paas/api/platform').SecurityConfig;
195
195
  postSecuritySetting: () => Promise<void>;
196
- setSecuritySetting: (data: SysConfigResponse) => void;
196
+ setSecuritySetting: (data: IObject | undefined) => void;
197
197
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
198
198
  themeSetting: import('./interfaces').IThemeSetting;
199
199
  setThemeSetting: (data: SysConfigResponse) => void;
@@ -216,7 +216,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
216
216
  height: number;
217
217
  };
218
218
  postWatermarkSetting: () => Promise<void>;
219
- setWatermarkSetting: (data: SysConfigResponse) => void;
219
+ setWatermarkSetting: (data: IObject | undefined) => void;
220
220
  projectSetting: {};
221
221
  setProjectConfig: (config: {}) => void;
222
222
  init: () => Promise<void>;
@@ -1,10 +1,9 @@
1
- import { SysConfigResponse } from '@gct-paas/api/platform';
2
1
  import { DeployModeEnum } from './enums/deploy.enum';
3
2
  /**
4
3
  * 设置部署配置信息
5
4
  * @param data - 系统配置响应数据
6
5
  */
7
- declare function setDeploySetting(data: SysConfigResponse): void;
6
+ declare function setDeploySetting(data: IObject | undefined): void;
8
7
  /**
9
8
  * 部署设置 Composable 函数
10
9
  * @returns 返回部署设置相关的响应式数据和方法
@@ -1,6 +1,10 @@
1
1
  import { DeployModeEnum } from "./enums/deploy.enum.mjs";
2
2
  import { computed, reactive } from "vue";
3
3
  //#region src/modules/platform-config/useDeploySetting.ts
4
+ /**
5
+ * 部署设置 Composable
6
+ * 用于管理应用的部署模式配置
7
+ */
4
8
  /** 部署设置响应式对象 */
5
9
  var deploySetting = reactive({ deployMode: DeployModeEnum.STANDARD });
6
10
  /** 是否为独立应用部署模式的计算属性 */
@@ -12,10 +16,9 @@ var isIndependentApp = computed(() => {
12
16
  * @param data - 系统配置响应数据
13
17
  */
14
18
  function setDeploySetting(data) {
15
- const { value } = data;
16
- if (!value) return;
19
+ if (!data || !data.id) return;
17
20
  try {
18
- Object.assign(deploySetting, JSON.parse(value));
21
+ Object.assign(deploySetting, data);
19
22
  } catch (err) {
20
23
  console.warn(err);
21
24
  }
@@ -1,4 +1,4 @@
1
- import { AuthConfig, SysConfigResponse } from '@gct-paas/api/platform';
1
+ import { AuthConfig } from '@gct-paas/api/platform';
2
2
  /**
3
3
  * 登录设置 Composable 函数
4
4
  * @returns 返回登录设置相关的响应式数据和方法
@@ -6,7 +6,7 @@ import { AuthConfig, SysConfigResponse } from '@gct-paas/api/platform';
6
6
  export declare function useLoginSetting(): {
7
7
  loginSetting: AuthConfig;
8
8
  postLoginSetting: () => Promise<void>;
9
- setLoginSetting: (config: SysConfigResponse | undefined) => void;
9
+ setLoginSetting: (config: IObject | undefined) => void;
10
10
  loginModeAuthTypes: import('vue').Ref<string[], string[]>;
11
11
  openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
12
12
  sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
@@ -106,39 +106,37 @@ function useLoginSetting() {
106
106
  * @param config - 系统配置响应数据
107
107
  */
108
108
  const setLoginSetting = (config) => {
109
- if (config && config.value) {
110
- const value = JSON.parse(config.value);
111
- for (const k in value) if (k in loginSetting) loginSetting[k] = value[k];
112
- if (has(value, "sortJson") && !isEmpty(value.sortJson)) {
113
- const sortObj = JSON.parse(value.sortJson);
114
- if (has(sortObj, LoginSortTypeEnum.SYSTEM)) sysLoginSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.SYSTEM]);
115
- if (has(sortObj, LoginSortTypeEnum.THIRD_PARTY)) openIDOAuthAuthSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.THIRD_PARTY]);
116
- }
117
- loginSetting.loginModeConfigs?.forEach((item) => {
118
- loginModeConfig.set(item.authType, {
119
- ...item,
120
- enabled: 0
121
- });
109
+ if (!config || !config.id) return;
110
+ for (const k in config) if (k in loginSetting) loginSetting[k] = config[k];
111
+ if (has(config, "sortJson") && !isEmpty(config.sortJson)) {
112
+ const sortObj = JSON.parse(config.sortJson);
113
+ if (has(sortObj, LoginSortTypeEnum.SYSTEM)) sysLoginSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.SYSTEM]);
114
+ if (has(sortObj, LoginSortTypeEnum.THIRD_PARTY)) openIDOAuthAuthSort.value = getLoginTypeOptions(sortObj[LoginSortTypeEnum.THIRD_PARTY]);
115
+ }
116
+ loginSetting.loginModeConfigs?.forEach((item) => {
117
+ loginModeConfig.set(item.authType, {
118
+ ...item,
119
+ enabled: 0
122
120
  });
123
- const loginModeConfigs = loginSetting.loginModeConfigs?.filter((item) => {
124
- return item.enabled;
125
- }).map((i) => {
126
- return i.authType;
127
- }) || [];
128
- loginModeConfigs.push(LoginTypeEnum.ACCOUNT);
129
- loginModeAuthTypes.value = [...new Set(loginModeConfigs)];
130
- loginSetting.openIDOAuthConfigs?.forEach((item) => {
131
- loginModeConfig.set(item.authType, {
132
- ...item,
133
- enabled: 0
134
- });
121
+ });
122
+ const loginModeConfigs = loginSetting.loginModeConfigs?.filter((item) => {
123
+ return item.enabled;
124
+ }).map((i) => {
125
+ return i.authType;
126
+ }) || [];
127
+ loginModeConfigs.push(LoginTypeEnum.ACCOUNT);
128
+ loginModeAuthTypes.value = [...new Set(loginModeConfigs)];
129
+ loginSetting.openIDOAuthConfigs?.forEach((item) => {
130
+ loginModeConfig.set(item.authType, {
131
+ ...item,
132
+ enabled: 0
135
133
  });
136
- openIDOAuthAuthTypes.value = loginSetting.openIDOAuthConfigs?.filter((item) => {
137
- return item.enabled;
138
- }).map((i) => {
139
- return i.authType;
140
- }) || [];
141
- }
134
+ });
135
+ openIDOAuthAuthTypes.value = loginSetting.openIDOAuthConfigs?.filter((item) => {
136
+ return item.enabled;
137
+ }).map((i) => {
138
+ return i.authType;
139
+ }) || [];
142
140
  };
143
141
  return {
144
142
  loginSetting,
@@ -1,4 +1,4 @@
1
- import { OrgConfig, SysConfigResponse } from '@gct-paas/api/platform';
1
+ import { OrgConfig } from '@gct-paas/api/platform';
2
2
  /**
3
3
  * 组织设置 Composable 函数
4
4
  * @param isPlatform - 是否为平台模式,默认为 true
@@ -6,7 +6,7 @@ import { OrgConfig, SysConfigResponse } from '@gct-paas/api/platform';
6
6
  */
7
7
  export declare function useOrgSetting(isPlatform?: boolean): {
8
8
  orgSetting: OrgConfig;
9
- setOrgSetting: (data: SysConfigResponse) => void;
9
+ setOrgSetting: (data: IObject) => void;
10
10
  postOrgSetting: () => Promise<void>;
11
11
  relationFields: import('vue').Ref<{
12
12
  label: string;
@@ -38,19 +38,17 @@ function useOrgSetting(isPlatform = true) {
38
38
  * @param data - 系统配置响应数据
39
39
  */
40
40
  function setOrgSetting(data) {
41
- const { value } = data;
42
- if (!value) return;
41
+ if (!data || !data.id) return;
43
42
  try {
44
- const setting = JSON.parse(value);
45
- for (const key in setting) if (key == "supportLoginFields") setting["supportLoginFields"] = setting["supportLoginFields"].filter((i) => i !== "username_");
46
- Object.assign(orgSetting, setting);
43
+ for (const key in data) if (key == "supportLoginFields") data["supportLoginFields"] = data["supportLoginFields"].filter((i) => i !== "username_");
44
+ Object.assign(orgSetting, data);
47
45
  if (orgSetting.extFieldConfigs && orgSetting.extFieldConfigs.length) orgSetting.extFieldConfigs.forEach((element) => {
48
46
  relationFields.value = relationFields.value.filter((i) => {
49
47
  if (i.value == element.relationField) relationFiledsCopy.value.push(i);
50
48
  return i.value !== element.relationField;
51
49
  });
52
50
  });
53
- orgSetting.extFieldConfigs = JSON.parse(JSON.stringify(setting.extFieldConfigs));
51
+ orgSetting.extFieldConfigs = JSON.parse(JSON.stringify(data.extFieldConfigs));
54
52
  } catch (err) {
55
53
  console.warn(err);
56
54
  }
@@ -1,4 +1,4 @@
1
- import { SecurityConfig, SysConfigResponse } from '@gct-paas/api/platform';
1
+ import { SecurityConfig } from '@gct-paas/api/platform';
2
2
  /**
3
3
  * 安全设置 Composable 函数
4
4
  * @param isPlatform - 是否为平台模式,默认为 true
@@ -7,6 +7,6 @@ import { SecurityConfig, SysConfigResponse } from '@gct-paas/api/platform';
7
7
  export declare function useSecuritySetting(isPlatform?: boolean): {
8
8
  securitySetting: SecurityConfig;
9
9
  postSecuritySetting: () => Promise<void>;
10
- setSecuritySetting: (data: SysConfigResponse) => void;
10
+ setSecuritySetting: (data: IObject | undefined) => void;
11
11
  getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
12
12
  };
@@ -54,10 +54,9 @@ function useSecuritySetting(isPlatform = true) {
54
54
  * @param data - 系统配置响应数据
55
55
  */
56
56
  function setSecuritySetting(data) {
57
- const { value } = data;
58
- if (!value) return;
57
+ if (!data || !data.id) return;
59
58
  try {
60
- Object.assign(securitySetting, JSON.parse(value));
59
+ Object.assign(securitySetting, data);
61
60
  } catch (err) {
62
61
  console.warn(err);
63
62
  }
@@ -1,4 +1,7 @@
1
- import { SysConfigResponse } from '@gct-paas/api/platform';
1
+ /**
2
+ * 水印设置 Composable
3
+ * 用于管理平台的水印配置
4
+ */
2
5
  /**
3
6
  * 水印设置 Composable 函数
4
7
  * @returns 返回水印设置相关的响应式数据和方法
@@ -17,5 +20,5 @@ export declare function useWatermarkSetting(): {
17
20
  height: number;
18
21
  };
19
22
  postWatermarkSetting: () => Promise<void>;
20
- setWatermarkSetting: (data: SysConfigResponse) => void;
23
+ setWatermarkSetting: (data: IObject | undefined) => void;
21
24
  };
@@ -22,10 +22,9 @@ function useWatermarkSetting() {
22
22
  * @param data - 系统配置响应数据
23
23
  */
24
24
  function setWatermarkSetting(data) {
25
- const { value } = data;
26
- if (!value) return;
25
+ if (!data || !data.id) return;
27
26
  try {
28
- Object.assign(watermarkSetting, JSON.parse(value));
27
+ Object.assign(watermarkSetting, data);
29
28
  } catch (err) {
30
29
  console.warn(err);
31
30
  }
@@ -1,7 +1,5 @@
1
1
  import { UserOfTenantDTO } from '@gct-paas/api/platform';
2
2
  import { tenantState } from '../types/tenant';
3
- export declare const useTenantStore: import('pinia').StoreDefinition<"tenant", tenantState, {
4
- getTenantUserInfoAction(state: {
5
- tenantUserInfo: Record<string, UserOfTenantDTO>;
6
- } & import('pinia').PiniaCustomStateProperties<tenantState>): () => Promise<UserOfTenantDTO>;
7
- }, {}>;
3
+ export declare const useTenantStore: import('pinia').StoreDefinition<"tenant", tenantState, {}, {
4
+ getTenantUserInfoAction(): Promise<UserOfTenantDTO>;
5
+ }>;
@@ -1,20 +1,18 @@
1
- import { getTenant } from "../../../utils/tools/tools.mjs";
1
+ import { tenantRef } from "../../../utils/tools/tools.mjs";
2
2
  import "../../../utils/index.mjs";
3
3
  import { defineStore } from "pinia";
4
4
  //#region src/modules/user-stores/store/tenant.store.ts
5
5
  var useTenantStore = defineStore("tenant", {
6
6
  state: () => ({ tenantUserInfo: {} }),
7
- getters: { getTenantUserInfoAction(state) {
8
- return async () => {
9
- const tenantId = getTenant();
10
- if (!tenantId) return Promise.reject(null);
11
- if (state.tenantUserInfo[tenantId]) return state.tenantUserInfo[tenantId];
12
- const info = await _api.platform.tenant.getUserInfo();
13
- state.tenantUserInfo[tenantId] = info;
14
- return info;
15
- };
16
- } },
17
- actions: {}
7
+ getters: {},
8
+ actions: { async getTenantUserInfoAction() {
9
+ const tenantId = tenantRef.value;
10
+ if (!tenantId) return Promise.reject(null);
11
+ if (this.tenantUserInfo[tenantId]) return this.tenantUserInfo[tenantId];
12
+ const info = await _api.platform.tenant.getUserInfo();
13
+ this.tenantUserInfo[tenantId] = info;
14
+ return info;
15
+ } }
18
16
  });
19
17
  //#endregion
20
18
  export { useTenantStore };
@@ -1,4 +1,4 @@
1
- import { getTenant, getToken, setToken } from "../../../utils/tools/tools.mjs";
1
+ import { getToken, setToken, tenantRef } from "../../../utils/tools/tools.mjs";
2
2
  import { sha256 } from "../../../utils/uuid/uuid.mjs";
3
3
  import { getDeviceFingerprint, getPageIdentification } from "../../../utils/deviceFingerprint.mjs";
4
4
  import "../../../utils/index.mjs";
@@ -23,7 +23,7 @@ var useUserStore = defineStore("user", {
23
23
  },
24
24
  /**用户信息下的租户信息 */
25
25
  getTenantInfo(state) {
26
- return state.userInfo?.tenantList?.find((i) => i.id === getTenant());
26
+ return state.userInfo?.tenantList?.find((i) => i.id === tenantRef.value);
27
27
  }
28
28
  },
29
29
  actions: {
@@ -38,7 +38,7 @@ var useUserStore = defineStore("user", {
38
38
  }
39
39
  },
40
40
  async getUserInfoAction(Token) {
41
- if (!getToken && !Token) return null;
41
+ if (!getToken() && !Token) return null;
42
42
  const info = await _api.platform.user.getInfo({ headers: { Token } });
43
43
  this.setUserInfo(info);
44
44
  this.userPermissions = (info?.platformManagerPermissions ?? []).reduce((map, item) => {
@@ -51,7 +51,7 @@ var useUserStore = defineStore("user", {
51
51
  async afterLoginSingleApp() {},
52
52
  /**登录后逻辑 */
53
53
  async afterLoginAction() {
54
- if (!getToken) return null;
54
+ if (!getToken()) return null;
55
55
  },
56
56
  /**退出登录 接口*/
57
57
  async submitLoginOut() {
@@ -4,6 +4,7 @@ import { GlobalPiniaState } from "../state/global-pinia-state/global-pinia-state
4
4
  import "../state/index.mjs";
5
5
  import { parseMatrixParams } from "../utils/tools/tools.mjs";
6
6
  import "../utils/index.mjs";
7
+ import { normalizeEnv } from "../modules/env-manager/env-manager.util.mjs";
7
8
  import { defineStore } from "pinia";
8
9
  //#region src/store/global-store.ts
9
10
  var useGlobalStore = defineStore("global-store", {
@@ -32,8 +33,9 @@ var useGlobalStore = defineStore("global-store", {
32
33
  const paramStr = location.pathname.split("/")[2];
33
34
  if (paramStr) {
34
35
  const params = parseMatrixParams(paramStr);
35
- if (params) this.context = params;
36
+ if (params && Object.keys(params).length) Object.assign(this.context, params);
36
37
  }
38
+ this.context.env = normalizeEnv(this.context.env);
37
39
  },
38
40
  async loadAppInfo() {
39
41
  const res = await _api.apaas.designerCommon.getGetApp();
@@ -41,12 +43,18 @@ var useGlobalStore = defineStore("global-store", {
41
43
  },
42
44
  /**加載运行时全局常量显示 */
43
45
  async loadEmptySetting() {
44
- const { value } = await _gct.api.apaas.basicConfig.getDetail({ configEnum: PlatformSettingEnum.GLOBAL });
45
- if (!value) return;
46
- Object.assign(this.globalSetting, JSON.parse(value));
46
+ const res = await _gct.api.apaas.basicConfig.getDetail({ configEnum: PlatformSettingEnum.GLOBAL });
47
+ if (!res?.value) return;
48
+ Object.assign(this.globalSetting, JSON.parse(res.value));
47
49
  },
48
50
  setProjectName(name) {
49
51
  this.projectName = name;
52
+ },
53
+ updateUserInfo(data) {
54
+ this.userInfo = {
55
+ ...this.userInfo,
56
+ ...data
57
+ };
50
58
  }
51
59
  }
52
60
  });
@@ -1,7 +1,7 @@
1
1
  import { IGlobalStore } from './global-store';
2
2
  import { IPlatformConfigStore } from '../modules/platform-config';
3
3
  export { globalRefStorage } from './storage-store';
4
- export { globalRefSession } from './session-store';
4
+ export { globalRefSession, ENV } from './session-store';
5
5
  /**
6
6
  * 全局的状态管理工具类
7
7
  *
@@ -5,3 +5,4 @@ export declare const globalRefSession: import('@vueuse/core').RemovableRef<{
5
5
  /**登录登出标识 */
6
6
  currentPlatOrAppId: string;
7
7
  }>;
8
+ export declare const ENV: import('@vueuse/core').RemovableRef<string>;
@@ -5,5 +5,6 @@ import { useSessionStorage } from "@vueuse/core";
5
5
  var globalRefSession = useSessionStorage("GCT_GLOBAL_SESSION:PAAS", {
6
6
  /**登录登出标识 */
7
7
  currentPlatOrAppId: "" });
8
+ var ENV = useSessionStorage("ENV", "");
8
9
  //#endregion
9
- export { globalRefSession };
10
+ export { ENV, globalRefSession };
@@ -2,6 +2,7 @@
2
2
  import '@gct-paas/api/global-type';
3
3
  import 'systemjs';
4
4
  import 'vite/types/importMeta.d.ts';
5
+ import type { Composer } from 'vue-i18n';
5
6
  import type { GctGlobal } from '../global';
6
7
  import type { ApiManage as APaasApiManage } from '@gct-paas/api/apaas';
7
8
  import type { ApiManage as PlatformApiManage } from '@gct-paas/api/platform';
@@ -49,6 +50,12 @@ declare global {
49
50
  * @type {GlobalApi}
50
51
  */
51
52
  _api: GlobalApi;
53
+ /**
54
+ * 多语言转换函数
55
+ *
56
+ * @type {Composer['t']}
57
+ */
58
+ $t: Composer['t'];
52
59
  /**
53
60
  * wujie 微前端对象,当作为微前端子应用运行时可用
54
61
  *
@@ -61,6 +68,12 @@ declare global {
61
68
  * @type {ModuleFederation}
62
69
  */
63
70
  // _mf: ModuleFederation;
71
+ /**
72
+ * 安卓混合开发模式标识,由原生层注入,值为 true 时表示在安卓混合开发模式下运行
73
+ *
74
+ * @type {boolean}
75
+ */
76
+ __GCT_ANDROID__?: boolean;
64
77
  }
65
78
 
66
79
  interface ImportMetaEnv {
@@ -20,6 +20,18 @@ function interceptors(axios) {
20
20
  });
21
21
  return config;
22
22
  });
23
+ axios.interceptors.response.use((response) => {
24
+ if (response.data.code === 200) return response;
25
+ else {
26
+ const { errorMessageMode } = response.config || {};
27
+ const { subMessage, message, subCode } = response.data;
28
+ if (errorMessageMode === "none" || subCode === "sys.plat.api.pass.failure.over.max_times") console.error(response.data);
29
+ else if (subMessage || message) _gct.message.error(subMessage || message);
30
+ }
31
+ return response;
32
+ }, (err) => {
33
+ return Promise.reject(err);
34
+ });
23
35
  }
24
36
  //#endregion
25
37
  export { interceptors };
@@ -70,6 +70,10 @@ async function getDeviceFingerprint() {
70
70
  if (isWeb) localStorage.setItem(FINGERPRINT_KEY, visitorId);
71
71
  return `${name}/${visitorId}`;
72
72
  }
73
+ /** web 端指纹(语义兼容) */
74
+ function getBrowserFingerprint() {
75
+ return getDeviceFingerprint();
76
+ }
73
77
  /** mobile 端指纹(语义兼容) */
74
78
  function getMobileBrowserFingerprint() {
75
79
  return getDeviceFingerprint();
@@ -84,4 +88,4 @@ function getPageIdentification() {
84
88
  return pageTag;
85
89
  }
86
90
  //#endregion
87
- export { getDeviceFingerprint, getMobileBrowserFingerprint, getPageIdentification };
91
+ export { getBrowserFingerprint, getDeviceFingerprint, getMobileBrowserFingerprint, getPageIdentification };
@@ -15,5 +15,6 @@ var t = (...args) => {
15
15
  if (!key || typeof key !== "string" || key.trim() === "") return "";
16
16
  return _gct.i18n.global.t(...args);
17
17
  };
18
+ window.$t = t;
18
19
  //#endregion
19
20
  export { t };
@@ -13,11 +13,11 @@ export * from './openUtil';
13
13
  export { KitPkgUtil } from './kit-pkg-util/kit-pkg-util';
14
14
  export { PluginPgkUtil, type IModuleMap, type LoadPluginResult, } from './plugin-pkg-util/plugin-pkg-util';
15
15
  export { PluginStaticResource } from './plugin-static-resource/plugin-static-resource';
16
- export { getToken, setToken, getTenant, isMobile, setTenant, deepMerge, stringifyMatrixParams, parseMatrixParams, createWhiteImageWithText, } from './tools/tools';
16
+ export { getToken, setToken, getTenant, tenantRef, isMobile, setTenant, deepMerge, stringifyMatrixParams, parseMatrixParams, createWhiteImageWithText, } from './tools/tools';
17
17
  export * from './uuid/uuid';
18
18
  export * from './value-helper/value-helper';
19
19
  export { interceptors } from './axios/interceptors';
20
- export { getDeviceFingerprint, getPageIdentification, getMobileBrowserFingerprint, } from './deviceFingerprint';
20
+ export { getDeviceFingerprint, getPageIdentification, getMobileBrowserFingerprint, getBrowserFingerprint, } from './deviceFingerprint';
21
21
  export { TreeHelper } from './treeHelper/treeHelper';
22
22
  export * from './style';
23
23
  export * from './util';
@@ -34,3 +34,4 @@ export { scriptLoader, type IScriptOptions, } from './script-loader/script-loade
34
34
  export { permission } from './permission';
35
35
  export { getVueComponentByCode } from './vue-component-code';
36
36
  export * from './data-prems/const';
37
+ export * from './select-user-utils';
@@ -37,3 +37,4 @@ import "./script-loader/script-loader.mjs";
37
37
  import "./permission.mjs";
38
38
  import "./vue-component-code.mjs";
39
39
  import "./data-prems/const.mjs";
40
+ import "./select-user-utils.mjs";
@@ -30,6 +30,7 @@ function _bem(namespace, block, blockSuffix, element, modifier) {
30
30
  * @class Namespace
31
31
  */
32
32
  var Namespace = class {
33
+ block;
33
34
  /**
34
35
  * 命名空间
35
36
  *
@@ -25,7 +25,7 @@ export declare class Modal implements IModal {
25
25
  shouldDismiss: AsyncSeriesHook<[], {
26
26
  allowClose?: boolean;
27
27
  }>;
28
- beforeDismiss: AsyncSeriesHook<[], IModalData>;
28
+ beforeDismiss: AsyncSeriesHook<[], IModalData<IData>>;
29
29
  };
30
30
  ok?: () => Promise<IModalData | null>;
31
31
  setOptions?: (options: object) => void;
@@ -61,7 +61,7 @@ export declare class OverlayContainer<O> implements IOverlayContainer {
61
61
  * @param {O} [opts]
62
62
  */
63
63
  constructor(component: unknown, render: (...args: any[]) => VNode, opts?: O | undefined);
64
- static createVueApp(rootComponent: Component, rootProps?: IData): Promise<App<Element>>;
64
+ static createVueApp(rootComponent: Component, rootProps?: IData): App<Element>;
65
65
  /**
66
66
  * 初始化飘窗
67
67
  *