@gct-paas/core 0.1.5-dev.3 → 0.1.5-dev.5
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 +1 -1
- package/es/enums/page-designer/widget.d.ts +2 -2
- package/es/global/gct/gct.d.ts +108 -107
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useFile.d.ts +4 -0
- package/es/hooks/useFile.mjs +22 -0
- package/es/index.mjs +3 -1
- package/es/interface/i-kit-plugin-module/i-kit-plugin-module.d.ts +23 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +3 -0
- package/es/interface/index.d.ts +1 -1
- package/es/locale/index.d.ts +3 -1
- package/es/locale/index.mjs +18 -3
- package/es/modules/platform-config/store.d.ts +106 -106
- package/es/modules/platform-config/useSecuritySetting.d.ts +1 -1
- package/es/modules/user-stores/store/tenant.store.d.ts +6 -8
- package/es/modules/user-stores/store/tenant.store.mjs +12 -14
- package/es/modules/user-stores/store/user.store.d.ts +7 -2
- package/es/modules/user-stores/store/user.store.mjs +15 -4
- package/es/modules/user-stores/types/tenant.d.ts +7 -1
- package/es/router/index.mjs +2 -2
- package/es/setup-app.mjs +4 -2
- package/es/store/global-store.mjs +3 -0
- package/es/store/index.d.ts +1 -0
- package/es/store/index.mjs +1 -0
- package/es/store/session-store.d.ts +7 -0
- package/es/store/session-store.mjs +7 -0
- package/es/store/storage-store.d.ts +2 -0
- package/es/store/storage-store.mjs +3 -2
- package/es/types/index.d.ts +0 -1
- package/es/utils/file/download.d.ts +1 -1
- package/es/utils/file/parser.d.ts +1 -1
- package/es/utils/kit-pkg-util/kit-pkg-util.d.ts +34 -13
- package/es/utils/kit-pkg-util/kit-pkg-util.mjs +51 -40
- package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +2 -2
- package/es/utils/tools/tools.d.ts +1 -1
- package/package.json +4 -4
- package/es/interface/i-kit-info/i-kit-info.d.ts +0 -20
|
@@ -184,11 +184,11 @@ export declare const ButtonGroupType: {
|
|
|
184
184
|
hasText: boolean;
|
|
185
185
|
})[];
|
|
186
186
|
ICON_TEXT: ({
|
|
187
|
+
danger?: undefined;
|
|
187
188
|
type: string;
|
|
188
189
|
label: string;
|
|
189
190
|
hasText: boolean;
|
|
190
191
|
hasIcon: boolean;
|
|
191
|
-
danger?: undefined;
|
|
192
192
|
} | {
|
|
193
193
|
type: string;
|
|
194
194
|
danger: boolean;
|
|
@@ -197,9 +197,9 @@ export declare const ButtonGroupType: {
|
|
|
197
197
|
hasIcon: boolean;
|
|
198
198
|
})[];
|
|
199
199
|
ICON: ({
|
|
200
|
+
danger?: undefined;
|
|
200
201
|
type: string;
|
|
201
202
|
hasIcon: boolean;
|
|
202
|
-
danger?: undefined;
|
|
203
203
|
} | {
|
|
204
204
|
type: string;
|
|
205
205
|
danger: boolean;
|
package/es/global/gct/gct.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { I18n } from 'vue-i18n';
|
|
2
2
|
import { ApiMap } from '@gct-paas/api';
|
|
3
|
+
import { GlobalStoreUtil } from '../../store';
|
|
3
4
|
import { IGlobalRegister, IMessageUtil, IOverlayController } from '../../interface';
|
|
4
5
|
import { DictionaryUtil } from '../../utils';
|
|
5
6
|
import { EnvironmentManager } from '../../modules/env-manager';
|
|
@@ -32,7 +33,7 @@ export declare class GctGlobal {
|
|
|
32
33
|
/**
|
|
33
34
|
* 全局 store 工具类
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
|
+
readonly storeUtil: GlobalStoreUtil;
|
|
36
37
|
/**
|
|
37
38
|
* 全局 store 实例
|
|
38
39
|
*/
|
|
@@ -42,39 +43,22 @@ export declare class GctGlobal {
|
|
|
42
43
|
*
|
|
43
44
|
*/
|
|
44
45
|
readonly platformStore: import('pinia').Store<"platform-config", Pick<{
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
47
|
+
setBasicSetting: (data: import('@gct-paas/api/platform').SysConfigResponse, transfer?: boolean) => void;
|
|
48
|
+
postBasicSetting: () => Promise<string>;
|
|
47
49
|
deploySetting: {
|
|
48
50
|
deployMode: import('../..').DeployModeEnum;
|
|
49
51
|
};
|
|
50
52
|
setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
51
53
|
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
transparent: number;
|
|
61
|
-
width: number;
|
|
62
|
-
height: number;
|
|
63
|
-
};
|
|
64
|
-
postWatermarkSetting: () => Promise<void>;
|
|
65
|
-
setWatermarkSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
66
|
-
themeSetting: import('../..').IThemeSetting;
|
|
67
|
-
setThemeSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
68
|
-
postThemeSetting: () => Promise<void>;
|
|
69
|
-
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
70
|
-
toggleMenuCollapsed: () => void;
|
|
71
|
-
menuCollapsedWidth: number;
|
|
72
|
-
menuWidthRange: number[];
|
|
73
|
-
themeColors: string[];
|
|
74
|
-
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
75
|
-
postSecuritySetting: () => Promise<void>;
|
|
76
|
-
setSecuritySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
77
|
-
getSignWay: () => "LOGIN" | "SIGN" | "DOMAIN";
|
|
54
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
55
|
+
postLoginSetting: () => Promise<void>;
|
|
56
|
+
setLoginSetting: (config: import('@gct-paas/api/platform').SysConfigResponse | undefined) => void;
|
|
57
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
58
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
59
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
60
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
61
|
+
loginModeConfig: Map<string, IObject>;
|
|
78
62
|
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
79
63
|
setOrgSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
80
64
|
postOrgSetting: () => Promise<void>;
|
|
@@ -101,27 +85,18 @@ export declare class GctGlobal {
|
|
|
101
85
|
label: string;
|
|
102
86
|
value: string;
|
|
103
87
|
}[]>;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
renderInit: () => Promise<void>;
|
|
117
|
-
}, "projectSetting" | "deploySetting" | "watermarkSetting" | "themeSetting" | "menuCollapsed" | "menuCollapsedWidth" | "menuWidthRange" | "themeColors" | "securitySetting" | "orgSetting" | "relationFields" | "relationFiledsCopy" | "loginSetting" | "loginModeAuthTypes" | "openIDOAuthAuthTypes" | "sysLoginSort" | "openIDOAuthAuthSort" | "loginModeConfig" | "basicSetting">, Pick<{
|
|
118
|
-
projectSetting: {};
|
|
119
|
-
setProjectConfig: (config: {}) => void;
|
|
120
|
-
deploySetting: {
|
|
121
|
-
deployMode: import('../..').DeployModeEnum;
|
|
122
|
-
};
|
|
123
|
-
setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
124
|
-
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
88
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
89
|
+
postSecuritySetting: () => Promise<void>;
|
|
90
|
+
setSecuritySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
91
|
+
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
92
|
+
themeSetting: import('../..').IThemeSetting;
|
|
93
|
+
setThemeSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
94
|
+
postThemeSetting: () => Promise<void>;
|
|
95
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
96
|
+
toggleMenuCollapsed: () => void;
|
|
97
|
+
menuCollapsedWidth: number;
|
|
98
|
+
menuWidthRange: number[];
|
|
99
|
+
themeColors: string[];
|
|
125
100
|
watermarkSetting: {
|
|
126
101
|
openWatermark: boolean;
|
|
127
102
|
watermarkContent: string;
|
|
@@ -136,18 +111,27 @@ export declare class GctGlobal {
|
|
|
136
111
|
};
|
|
137
112
|
postWatermarkSetting: () => Promise<void>;
|
|
138
113
|
setWatermarkSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
114
|
+
projectSetting: {};
|
|
115
|
+
setProjectConfig: (config: {}) => void;
|
|
116
|
+
init: () => Promise<void>;
|
|
117
|
+
renderInit: () => Promise<void>;
|
|
118
|
+
}, "basicSetting" | "deploySetting" | "loginModeAuthTypes" | "loginModeConfig" | "loginSetting" | "menuCollapsed" | "menuCollapsedWidth" | "menuWidthRange" | "openIDOAuthAuthSort" | "openIDOAuthAuthTypes" | "orgSetting" | "projectSetting" | "relationFields" | "relationFiledsCopy" | "securitySetting" | "sysLoginSort" | "themeColors" | "themeSetting" | "watermarkSetting">, Pick<{
|
|
119
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
120
|
+
setBasicSetting: (data: import('@gct-paas/api/platform').SysConfigResponse, transfer?: boolean) => void;
|
|
121
|
+
postBasicSetting: () => Promise<string>;
|
|
122
|
+
deploySetting: {
|
|
123
|
+
deployMode: import('../..').DeployModeEnum;
|
|
124
|
+
};
|
|
125
|
+
setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
126
|
+
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
127
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
128
|
+
postLoginSetting: () => Promise<void>;
|
|
129
|
+
setLoginSetting: (config: import('@gct-paas/api/platform').SysConfigResponse | undefined) => void;
|
|
130
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
131
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
132
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
133
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
134
|
+
loginModeConfig: Map<string, IObject>;
|
|
151
135
|
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
152
136
|
setOrgSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
153
137
|
postOrgSetting: () => Promise<void>;
|
|
@@ -174,27 +158,18 @@ export declare class GctGlobal {
|
|
|
174
158
|
label: string;
|
|
175
159
|
value: string;
|
|
176
160
|
}[]>;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
renderInit: () => Promise<void>;
|
|
190
|
-
}, "isIndependentApp">, Pick<{
|
|
191
|
-
projectSetting: {};
|
|
192
|
-
setProjectConfig: (config: {}) => void;
|
|
193
|
-
deploySetting: {
|
|
194
|
-
deployMode: import('../..').DeployModeEnum;
|
|
195
|
-
};
|
|
196
|
-
setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
197
|
-
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
161
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
162
|
+
postSecuritySetting: () => Promise<void>;
|
|
163
|
+
setSecuritySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
164
|
+
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
165
|
+
themeSetting: import('../..').IThemeSetting;
|
|
166
|
+
setThemeSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
167
|
+
postThemeSetting: () => Promise<void>;
|
|
168
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
169
|
+
toggleMenuCollapsed: () => void;
|
|
170
|
+
menuCollapsedWidth: number;
|
|
171
|
+
menuWidthRange: number[];
|
|
172
|
+
themeColors: string[];
|
|
198
173
|
watermarkSetting: {
|
|
199
174
|
openWatermark: boolean;
|
|
200
175
|
watermarkContent: string;
|
|
@@ -209,18 +184,27 @@ export declare class GctGlobal {
|
|
|
209
184
|
};
|
|
210
185
|
postWatermarkSetting: () => Promise<void>;
|
|
211
186
|
setWatermarkSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
187
|
+
projectSetting: {};
|
|
188
|
+
setProjectConfig: (config: {}) => void;
|
|
189
|
+
init: () => Promise<void>;
|
|
190
|
+
renderInit: () => Promise<void>;
|
|
191
|
+
}, "isIndependentApp">, Pick<{
|
|
192
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
193
|
+
setBasicSetting: (data: import('@gct-paas/api/platform').SysConfigResponse, transfer?: boolean) => void;
|
|
194
|
+
postBasicSetting: () => Promise<string>;
|
|
195
|
+
deploySetting: {
|
|
196
|
+
deployMode: import('../..').DeployModeEnum;
|
|
197
|
+
};
|
|
198
|
+
setDeploySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
199
|
+
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
200
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
201
|
+
postLoginSetting: () => Promise<void>;
|
|
202
|
+
setLoginSetting: (config: import('@gct-paas/api/platform').SysConfigResponse | undefined) => void;
|
|
203
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
204
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
205
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
206
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
207
|
+
loginModeConfig: Map<string, IObject>;
|
|
224
208
|
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
225
209
|
setOrgSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
226
210
|
postOrgSetting: () => Promise<void>;
|
|
@@ -247,20 +231,37 @@ export declare class GctGlobal {
|
|
|
247
231
|
label: string;
|
|
248
232
|
value: string;
|
|
249
233
|
}[]>;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
234
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
235
|
+
postSecuritySetting: () => Promise<void>;
|
|
236
|
+
setSecuritySetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
237
|
+
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
238
|
+
themeSetting: import('../..').IThemeSetting;
|
|
239
|
+
setThemeSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
240
|
+
postThemeSetting: () => Promise<void>;
|
|
241
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
242
|
+
toggleMenuCollapsed: () => void;
|
|
243
|
+
menuCollapsedWidth: number;
|
|
244
|
+
menuWidthRange: number[];
|
|
245
|
+
themeColors: string[];
|
|
246
|
+
watermarkSetting: {
|
|
247
|
+
openWatermark: boolean;
|
|
248
|
+
watermarkContent: string;
|
|
249
|
+
fontSize: number;
|
|
250
|
+
color: string;
|
|
251
|
+
verticalAlign: string;
|
|
252
|
+
textAlign: string;
|
|
253
|
+
text: string;
|
|
254
|
+
transparent: number;
|
|
255
|
+
width: number;
|
|
256
|
+
height: number;
|
|
257
|
+
};
|
|
258
|
+
postWatermarkSetting: () => Promise<void>;
|
|
259
|
+
setWatermarkSetting: (data: import('@gct-paas/api/platform').SysConfigResponse) => void;
|
|
260
|
+
projectSetting: {};
|
|
261
|
+
setProjectConfig: (config: {}) => void;
|
|
261
262
|
init: () => Promise<void>;
|
|
262
263
|
renderInit: () => Promise<void>;
|
|
263
|
-
}, "
|
|
264
|
+
}, "getSignWay" | "init" | "postBasicSetting" | "postLoginSetting" | "postOrgSetting" | "postSecuritySetting" | "postThemeSetting" | "postWatermarkSetting" | "renderInit" | "setBasicSetting" | "setDeploySetting" | "setLoginSetting" | "setOrgSetting" | "setProjectConfig" | "setSecuritySetting" | "setThemeSetting" | "setWatermarkSetting" | "toggleMenuCollapsed">>;
|
|
264
265
|
/**
|
|
265
266
|
* 全局 router 工具类
|
|
266
267
|
*/
|
package/es/hooks/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { useAppInst } from './use-app-inst/use-app-inst';
|
|
|
2
2
|
export { useModal } from './use-modal/use-modal';
|
|
3
3
|
export { useIFrameProps, useWuJieBus, useWuJieProps, } from './use-sub-app-utils/use-sub-app-utils';
|
|
4
4
|
export { copyTextToClipboard, isDef, useCopyToClipboard, } from './useCopyToClipboard';
|
|
5
|
+
export { transformUrl, fileUrlParser } from './useFile';
|
package/es/hooks/index.mjs
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VITE_MINIO_PATH } from "../constants/index.mjs";
|
|
2
|
+
//#region src/hooks/useFile.ts
|
|
3
|
+
var urlCacheMap = {};
|
|
4
|
+
function transformUrl(url, { random = true } = {}) {
|
|
5
|
+
if (!url) return "/404.png";
|
|
6
|
+
const url2 = `${VITE_MINIO_PATH}${url.startsWith("/") ? "" : "/"}${url}`;
|
|
7
|
+
if (!random) return url2;
|
|
8
|
+
if (urlCacheMap[url] && Date.now() - urlCacheMap[url].timestamp < 60 * 1e3) return `${url2}?${urlCacheMap[url].random}`;
|
|
9
|
+
if (Object.keys(urlCacheMap).length > 100) urlCacheMap = {};
|
|
10
|
+
const r = Math.random();
|
|
11
|
+
urlCacheMap[url] = {
|
|
12
|
+
random: r,
|
|
13
|
+
timestamp: Date.now()
|
|
14
|
+
};
|
|
15
|
+
return `${url2}?${r}`;
|
|
16
|
+
}
|
|
17
|
+
function fileUrlParser(url) {
|
|
18
|
+
if (!url) return url;
|
|
19
|
+
return `${VITE_MINIO_PATH}${url.startsWith("/") ? "" : "/"}${url}`;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { fileUrlParser, transformUrl };
|
package/es/index.mjs
CHANGED
|
@@ -81,6 +81,7 @@ import { WATERMARK_INIT_DATA } from "./modules/platform-config/constants/waterma
|
|
|
81
81
|
import { usePlatformConfigStore } from "./modules/platform-config/store.mjs";
|
|
82
82
|
import "./modules/platform-config/index.mjs";
|
|
83
83
|
import { globalRefStorage } from "./store/storage-store.mjs";
|
|
84
|
+
import { globalRefSession } from "./store/session-store.mjs";
|
|
84
85
|
import { GlobalStoreUtil } from "./store/index.mjs";
|
|
85
86
|
import { EnvironmentType } from "./modules/env-manager/env-manager.interface.mjs";
|
|
86
87
|
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";
|
|
@@ -98,6 +99,7 @@ import { useAppInst } from "./hooks/use-app-inst/use-app-inst.mjs";
|
|
|
98
99
|
import { useModal } from "./hooks/use-modal/use-modal.mjs";
|
|
99
100
|
import { useIFrameProps, useWuJieBus, useWuJieProps } from "./hooks/use-sub-app-utils/use-sub-app-utils.mjs";
|
|
100
101
|
import { copyTextToClipboard, isDef, useCopyToClipboard } from "./hooks/useCopyToClipboard.mjs";
|
|
102
|
+
import { fileUrlParser, transformUrl } from "./hooks/useFile.mjs";
|
|
101
103
|
import "./hooks/index.mjs";
|
|
102
104
|
import { ErrorStrategyFactory } from "./modules/error-handler/error-strategy.mjs";
|
|
103
105
|
import { ErrorHandler, setupErrorHandler } from "./modules/error-handler/index.mjs";
|
|
@@ -130,4 +132,4 @@ function onInit() {
|
|
|
130
132
|
}
|
|
131
133
|
onInit();
|
|
132
134
|
//#endregion
|
|
133
|
-
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, KitPkgUtil, 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, PluginPgkUtil, PluginStaticResource, Postion, PrintModeEnums, PrintResourceEnum, PrintTypeEnum, ProcessStatusEnum, ProgressTypeEnum, ProjectName, PropGroup, REDIRECT_NAME, 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, 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, createWhiteImageWithText, cssLoader, dataURLtoBlob, deepMerge, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, emitFieldSet, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getDeviceFingerprint, getLoginTypeOptions, getMobileBrowserFingerprint, getOperatorList, getPageIdentification, getTenant, getToken, getVueComponentByCode, globalRefStorage, 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 };
|
|
135
|
+
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, KitPkgUtil, 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, PluginPgkUtil, PluginStaticResource, Postion, PrintModeEnums, PrintResourceEnum, PrintTypeEnum, ProcessStatusEnum, ProgressTypeEnum, ProjectName, PropGroup, REDIRECT_NAME, 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, 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, createWhiteImageWithText, cssLoader, dataURLtoBlob, deepMerge, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, emitFieldSet, fileUrlParser, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getDeviceFingerprint, getLoginTypeOptions, getMobileBrowserFingerprint, getOperatorList, getPageIdentification, getTenant, getToken, getVueComponentByCode, globalRefSession, globalRefStorage, 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, transformUrl, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useCopyToClipboard, useIFrameProps, useModal, useNamespace, usePermissionStore, usePlatformConfigStore, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* kit 模块接口
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IPluginKitModule
|
|
7
|
+
*/
|
|
8
|
+
export interface IPluginKitModule {
|
|
9
|
+
/**
|
|
10
|
+
* 只在插件加载时调用一次,进行全局资源注册等操作
|
|
11
|
+
*
|
|
12
|
+
* @param {App} app
|
|
13
|
+
* @return {*} {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
setupApp(app: App): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* 每次创建独立的 Vue 应用实例时调用,进行组件注册等操作
|
|
18
|
+
*
|
|
19
|
+
* @param {App} app
|
|
20
|
+
* @return {*} {Promise<void>}
|
|
21
|
+
*/
|
|
22
|
+
createAppVue(app: App): Promise<void>;
|
|
23
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ProjectName } from '../../enums';
|
|
2
|
+
import { IAppContext } from '..';
|
|
2
3
|
/**
|
|
3
4
|
* 全局 store 动作
|
|
4
5
|
*
|
|
@@ -31,4 +32,6 @@ export interface IGlobalActions {
|
|
|
31
32
|
* 加载应用常量
|
|
32
33
|
*/
|
|
33
34
|
loadEmptySetting(): Promise<void>;
|
|
35
|
+
/**动态设置上下文 */
|
|
36
|
+
setContext(state: Partial<IAppContext>): Promise<void>;
|
|
34
37
|
}
|
package/es/interface/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { IFieldCodeChain } from './i-field-code-chain/i-field-code-chain';
|
|
|
6
6
|
export type { GlobalVar } from './i-global-var/i-global-var';
|
|
7
7
|
export type { IMobileHomeMenuItem } from './i-mobile-home-menu-item/i-mobile-home-menu-item';
|
|
8
8
|
export type { IStyleIMportMap } from './i-import-style-map/i-import-style-map';
|
|
9
|
-
export type {
|
|
9
|
+
export type { IPluginKitModule } from './i-kit-plugin-module/i-kit-plugin-module';
|
|
10
10
|
export type { IGlobalActions } from './i-pinia-action/i-global-actions';
|
|
11
11
|
export type { IGlobalGetters } from './i-pinia-getter/i-global-getters';
|
|
12
12
|
export type { IGlobalState, emptyDisplayType, } from './i-pinia-state/i-global-state';
|
package/es/locale/index.d.ts
CHANGED
|
@@ -8,12 +8,14 @@ export declare class LocaleUtil {
|
|
|
8
8
|
get locale(): string;
|
|
9
9
|
get enableLocaleList(): localeItem[];
|
|
10
10
|
changeLang(lang: string): Promise<void>;
|
|
11
|
+
/**只加载应用专用i18n JSON */
|
|
12
|
+
initAppJson(): Promise<void>;
|
|
11
13
|
init(): Promise<void>;
|
|
12
14
|
/**加载应用国际化json */
|
|
13
15
|
protected loadI18nJson(): Promise<void>;
|
|
14
16
|
/**加载语言列表 */
|
|
15
17
|
protected loadLocales(): Promise<void>;
|
|
16
|
-
protected loadMessages(url
|
|
18
|
+
protected loadMessages(url?: string, locale?: string): Promise<void>;
|
|
17
19
|
getMessageUrl(payload: {
|
|
18
20
|
locale: string;
|
|
19
21
|
} | {
|
package/es/locale/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { globalRefStorage } from "../store/storage-store.mjs";
|
|
2
2
|
import "../store/index.mjs";
|
|
3
3
|
import { createI18n } from "vue-i18n";
|
|
4
|
+
import { HttpUtil } from "@gct-paas/api";
|
|
4
5
|
//#region src/locale/index.ts
|
|
5
6
|
var LocaleUtil = class {
|
|
6
7
|
localeList = [];
|
|
@@ -25,6 +26,16 @@ var LocaleUtil = class {
|
|
|
25
26
|
globalRefStorage.value.lang = lang;
|
|
26
27
|
await this.loadI18nJson();
|
|
27
28
|
}
|
|
29
|
+
/**只加载应用专用i18n JSON */
|
|
30
|
+
async initAppJson() {
|
|
31
|
+
const app_platformUrl = this.getMessageUrl({
|
|
32
|
+
locale: this.locale,
|
|
33
|
+
app: _gct.store.context.aid,
|
|
34
|
+
env: _gct.env.getEnv(),
|
|
35
|
+
branch: _gct.store.context.bid
|
|
36
|
+
});
|
|
37
|
+
await this.loadMessages(app_platformUrl);
|
|
38
|
+
}
|
|
28
39
|
async init() {
|
|
29
40
|
await this.loadLocales();
|
|
30
41
|
await this.loadI18nJson();
|
|
@@ -32,12 +43,12 @@ var LocaleUtil = class {
|
|
|
32
43
|
/**加载应用国际化json */
|
|
33
44
|
async loadI18nJson() {
|
|
34
45
|
const platformUrl = this.getMessageUrl({ locale: this.locale });
|
|
35
|
-
const app_platformUrl = this.getMessageUrl({
|
|
46
|
+
const app_platformUrl = _gct.store.context.aid ? this.getMessageUrl({
|
|
36
47
|
locale: this.locale,
|
|
37
48
|
app: _gct.store.context.aid,
|
|
38
49
|
env: _gct.env.getEnv(),
|
|
39
50
|
branch: _gct.store.context.bid
|
|
40
|
-
});
|
|
51
|
+
}) : void 0;
|
|
41
52
|
await Promise.all([this.loadMessages(platformUrl), this.loadMessages(app_platformUrl)]);
|
|
42
53
|
}
|
|
43
54
|
/**加载语言列表 */
|
|
@@ -56,7 +67,11 @@ var LocaleUtil = class {
|
|
|
56
67
|
globalRefStorage.value.lang = (globalRefStorage.value.lang ?? defaultItem?.languageTag) || "zh-CN";
|
|
57
68
|
}
|
|
58
69
|
async loadMessages(url, locale = this.locale) {
|
|
59
|
-
|
|
70
|
+
if (!url) return;
|
|
71
|
+
const messages = (await HttpUtil.get(url, {}, {}, {}, {
|
|
72
|
+
headers: { "Content-Type": void 0 },
|
|
73
|
+
nativeData: true
|
|
74
|
+
})).split("\n").reduce((acc, item) => {
|
|
60
75
|
const [key, ...value] = item.split(":");
|
|
61
76
|
acc[key] = value.join(":");
|
|
62
77
|
return acc;
|