@das-fed/web 7.0.5-beta.8 → 7.0.5-beta.8.2
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/index.js +7 -32
- package/package.json +9 -7
- package/packages/create-das-web-app/index.js +1 -58
- package/packages/create-das-web-app/runtime.js +71 -0
- package/packages/create-das-web-app/runtime.js.gz +0 -0
- package/packages/i18n/index.js +1 -175
- package/packages/i18n/runtime.js +175 -0
- package/packages/layout/index.js +2 -785
- package/packages/layout/runtime.js +784 -0
- package/packages/layout/runtime.js.gz +0 -0
- package/packages/layout/style.css +1 -1
- package/packages/layout/style.css.gz +0 -0
- package/packages/main-app-framework/assets/black-logo-B-Qipuvf.png +0 -0
- package/packages/main-app-framework/assets/cjb-CTZzysmN.png +0 -0
- package/packages/main-app-framework/assets/cjb-preview-Cz6ZEp0h.png +0 -0
- package/packages/main-app-framework/assets/cjb-preview-DWYaDhQb.png +0 -0
- package/packages/main-app-framework/assets/default-DOjV2jIm.png +0 -0
- package/packages/main-app-framework/assets/default-preview-DEfMZxi2.png +0 -0
- package/packages/main-app-framework/assets/default-preview-HZjPO_Oz.png +0 -0
- package/packages/main-app-framework/assets/dkh-DkyUTuR0.png +0 -0
- package/packages/main-app-framework/assets/dkh-preview-DQZDuJfb.png +0 -0
- package/packages/main-app-framework/assets/dkh-preview-SJ0YoU2z.png +0 -0
- package/packages/main-app-framework/assets/feedback-QNGIKgWm.png +0 -0
- package/packages/main-app-framework/assets/hengxian-CyCsW-Hu.png +0 -0
- package/packages/main-app-framework/assets/kjl-DozNzlyC.png +0 -0
- package/packages/main-app-framework/assets/kjl-preview-CCoSuYDK.png +0 -0
- package/packages/main-app-framework/assets/kjl-preview-xHIEscys.png +0 -0
- package/packages/main-app-framework/assets/noIconurl-7L4lHbul.png +0 -0
- package/packages/main-app-framework/assets/qianru-Bsf1Lhh2.png +0 -0
- package/packages/main-app-framework/assets/setected-tvECHVG9.svg +31 -0
- package/packages/main-app-framework/assets/ssl-XnQ4A9bQ.png +0 -0
- package/packages/main-app-framework/assets/ssl-preview-C4BD2d61.png +0 -0
- package/packages/main-app-framework/assets/ssl-preview-DI5pA3Df.png +0 -0
- package/packages/main-app-framework/assets/unselected-C4QVkFPL.svg +39 -0
- package/packages/main-app-framework/assets/white-logo-D7bqAkJL.png +0 -0
- package/{index-VFHeVlbQ.js → packages/main-app-framework/index-CbPnzzxg.js} +1 -1
- package/packages/main-app-framework/index-DBZ2IMHx.js +16887 -0
- package/packages/main-app-framework/index-DBZ2IMHx.js.gz +0 -0
- package/packages/main-app-framework/{index-9Btqmzxh.js → index-v2jIZW8u.js} +1 -1
- package/packages/main-app-framework/index-v2jIZW8u.js.gz +0 -0
- package/packages/main-app-framework/index.js +2 -7
- package/packages/main-app-framework/runtime.js +6 -0
- package/packages/main-app-framework/style.css +1 -1
- package/packages/main-app-framework/style.css.gz +0 -0
- package/packages/micro-frontend/index.js +2 -848
- package/packages/micro-frontend/runtime.js +847 -0
- package/packages/micro-frontend/runtime.js.gz +0 -0
- package/packages/style/index.js +3 -5
- package/packages/style/runtime.js +4 -0
- package/packages/theme/index.js +2 -75
- package/packages/theme/runtime.js +75 -0
- package/types/create-das-web-app/get-web-config.d.ts +1 -0
- package/types/main-app-framework/business/video-link/open.d.ts +1 -0
- package/types/main-app-framework/i18n/index.d.ts +10 -0
- package/types/main-app-framework/init-platform/api.d.ts +1 -0
- package/types/main-app-framework/init-sso/useTokenRefresh.d.ts +9 -0
- package/types/main-app-framework/project-custom/jiangling/auth-recovery.d.ts +5 -0
- package/types/main-app-framework/project-custom/jiangling/sso-api.d.ts +49 -0
- package/types/main-app-framework/project-custom/jiangling/use-sso.d.ts +11 -0
- package/types/main-app-framework/project-custom/jiangling/utils.d.ts +3 -0
- package/types/main-app-framework/utils/src/set-common-info.d.ts +11 -11
- package/index-3qGmnX0K.js +0 -18065
- package/index-3qGmnX0K.js.gz +0 -0
- package/index-Cg1zDISe.js +0 -88
- package/index-Cg1zDISe.js.gz +0 -0
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/layout/index.js.gz +0 -0
- package/packages/main-app-framework/index-9Btqmzxh.js.gz +0 -0
- package/packages/main-app-framework/index-BTkL8vcq.js +0 -16573
- package/packages/main-app-framework/index-BTkL8vcq.js.gz +0 -0
- package/packages/main-app-framework/index-DjY3P4GQ.js +0 -10
- package/packages/micro-frontend/index.js.gz +0 -0
- package/style.css +0 -7
- package/style.css.gz +0 -0
- /package/packages/i18n/{index.js.gz → runtime.js.gz} +0 -0
- /package/packages/theme/{index.js.gz → runtime.js.gz} +0 -0
|
Binary file
|
package/packages/style/index.js
CHANGED
package/packages/theme/index.js
CHANGED
|
@@ -1,75 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
light: {},
|
|
4
|
-
dark: {}
|
|
5
|
-
}), u = h({
|
|
6
|
-
light: {},
|
|
7
|
-
dark: {}
|
|
8
|
-
}), v = "dasTheme", r = "das-theme", y = (t) => {
|
|
9
|
-
let e = {
|
|
10
|
-
light: {},
|
|
11
|
-
dark: {}
|
|
12
|
-
};
|
|
13
|
-
if (!t) return e;
|
|
14
|
-
const { light: l = {}, dark: n = {}, base: a = {}, ...s } = t || {};
|
|
15
|
-
e.light = { ...l, ...a }, e.dark = n || {};
|
|
16
|
-
for (const o in s) {
|
|
17
|
-
const c = s[o];
|
|
18
|
-
if (typeof c == "string" && (e.light[o] = c), typeof c == "object")
|
|
19
|
-
for (const m in c)
|
|
20
|
-
e[m] || (e[m] = {}), e[m][o] || (e[m][o] = {}), e[m][o] = c[m];
|
|
21
|
-
}
|
|
22
|
-
return e;
|
|
23
|
-
};
|
|
24
|
-
function T(t) {
|
|
25
|
-
const e = "das-global-theme", l = "das-custom-theme";
|
|
26
|
-
if (!document.getElementById(l)) {
|
|
27
|
-
const a = document.createElement("style");
|
|
28
|
-
a.appendChild(document.createTextNode("")), a.setAttribute("id", l), document.head.appendChild(a);
|
|
29
|
-
}
|
|
30
|
-
if (!document.getElementById(e)) {
|
|
31
|
-
const a = document.createElement("style");
|
|
32
|
-
a.appendChild(document.createTextNode("")), a.setAttribute("id", e), document.head.appendChild(a);
|
|
33
|
-
}
|
|
34
|
-
t || (t = "custom");
|
|
35
|
-
let n = document.getElementById(l);
|
|
36
|
-
return t === "global" && (n = document.getElementById(e)), n.sheet;
|
|
37
|
-
}
|
|
38
|
-
const g = (t, e) => {
|
|
39
|
-
e || (e = "custom");
|
|
40
|
-
const l = T(e), n = y(t);
|
|
41
|
-
for (const s in n) {
|
|
42
|
-
const o = n[s];
|
|
43
|
-
for (const c in o) {
|
|
44
|
-
const m = o[c], f = `${r}-${s}`;
|
|
45
|
-
l.insertRule(`.${f} { ${c}:${m} } `, l.cssRules.length);
|
|
46
|
-
}
|
|
47
|
-
e === "global" && (u.value[s] || (u.value[s] = {}), u.value[s] = { ...u.value[s], ...o }), e === "custom" && (i.value[s] || (i.value[s] = {}), i.value[s] = { ...i.value[s], ...o });
|
|
48
|
-
}
|
|
49
|
-
const a = `${r}-${d.value}`;
|
|
50
|
-
document.body.classList.contains(a) || document.body.classList.add(a);
|
|
51
|
-
}, D = async (t) => {
|
|
52
|
-
var n, a;
|
|
53
|
-
const e = window[v];
|
|
54
|
-
e && g(e, "global");
|
|
55
|
-
let l = Object.assign(((n = t == null ? void 0 : t.theme) == null ? void 0 : n.glob) || {});
|
|
56
|
-
(a = t == null ? void 0 : t.microApps) == null || a.map((s) => {
|
|
57
|
-
var o;
|
|
58
|
-
l = Object.assign(l, ((o = s.theme) == null ? void 0 : o.glob) || {});
|
|
59
|
-
}), Object.values(l).filter((s) => !!s).flat().map((s) => g(s));
|
|
60
|
-
}, C = (t) => {
|
|
61
|
-
document.body.classList.add(`${r}-light`), t === "light" && document.body.classList.remove(`${r}-${d.value}`), d.value = t, document.body.classList.add(`${r}-${d.value}`);
|
|
62
|
-
}, $ = (t) => b(() => {
|
|
63
|
-
var e, l, n, a;
|
|
64
|
-
return ((l = (e = u.value) == null ? void 0 : e[d.value]) == null ? void 0 : l[t]) || ((a = (n = i.value) == null ? void 0 : n[d.value]) == null ? void 0 : a[t]) || t;
|
|
65
|
-
}), E = (t) => `var(${t})`, R = $, x = {};
|
|
66
|
-
export {
|
|
67
|
-
d as currentTheme,
|
|
68
|
-
x as default,
|
|
69
|
-
$ as getThemeRule,
|
|
70
|
-
E as getVar,
|
|
71
|
-
R as getVarValue,
|
|
72
|
-
D as initTheme,
|
|
73
|
-
C as setTheme,
|
|
74
|
-
g as setThemeRule
|
|
75
|
-
};
|
|
1
|
+
export * from './runtime.js'
|
|
2
|
+
export { default } from './runtime.js'
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ref as h, computed as b } from "vue";
|
|
2
|
+
const d = h("light"), i = h({
|
|
3
|
+
light: {},
|
|
4
|
+
dark: {}
|
|
5
|
+
}), u = h({
|
|
6
|
+
light: {},
|
|
7
|
+
dark: {}
|
|
8
|
+
}), v = "dasTheme", r = "das-theme", y = (t) => {
|
|
9
|
+
let e = {
|
|
10
|
+
light: {},
|
|
11
|
+
dark: {}
|
|
12
|
+
};
|
|
13
|
+
if (!t) return e;
|
|
14
|
+
const { light: l = {}, dark: n = {}, base: a = {}, ...s } = t || {};
|
|
15
|
+
e.light = { ...l, ...a }, e.dark = n || {};
|
|
16
|
+
for (const o in s) {
|
|
17
|
+
const c = s[o];
|
|
18
|
+
if (typeof c == "string" && (e.light[o] = c), typeof c == "object")
|
|
19
|
+
for (const m in c)
|
|
20
|
+
e[m] || (e[m] = {}), e[m][o] || (e[m][o] = {}), e[m][o] = c[m];
|
|
21
|
+
}
|
|
22
|
+
return e;
|
|
23
|
+
};
|
|
24
|
+
function T(t) {
|
|
25
|
+
const e = "das-global-theme", l = "das-custom-theme";
|
|
26
|
+
if (!document.getElementById(l)) {
|
|
27
|
+
const a = document.createElement("style");
|
|
28
|
+
a.appendChild(document.createTextNode("")), a.setAttribute("id", l), document.head.appendChild(a);
|
|
29
|
+
}
|
|
30
|
+
if (!document.getElementById(e)) {
|
|
31
|
+
const a = document.createElement("style");
|
|
32
|
+
a.appendChild(document.createTextNode("")), a.setAttribute("id", e), document.head.appendChild(a);
|
|
33
|
+
}
|
|
34
|
+
t || (t = "custom");
|
|
35
|
+
let n = document.getElementById(l);
|
|
36
|
+
return t === "global" && (n = document.getElementById(e)), n.sheet;
|
|
37
|
+
}
|
|
38
|
+
const g = (t, e) => {
|
|
39
|
+
e || (e = "custom");
|
|
40
|
+
const l = T(e), n = y(t);
|
|
41
|
+
for (const s in n) {
|
|
42
|
+
const o = n[s];
|
|
43
|
+
for (const c in o) {
|
|
44
|
+
const m = o[c], f = `${r}-${s}`;
|
|
45
|
+
l.insertRule(`.${f} { ${c}:${m} } `, l.cssRules.length);
|
|
46
|
+
}
|
|
47
|
+
e === "global" && (u.value[s] || (u.value[s] = {}), u.value[s] = { ...u.value[s], ...o }), e === "custom" && (i.value[s] || (i.value[s] = {}), i.value[s] = { ...i.value[s], ...o });
|
|
48
|
+
}
|
|
49
|
+
const a = `${r}-${d.value}`;
|
|
50
|
+
document.body.classList.contains(a) || document.body.classList.add(a);
|
|
51
|
+
}, D = async (t) => {
|
|
52
|
+
var n, a;
|
|
53
|
+
const e = window[v];
|
|
54
|
+
e && g(e, "global");
|
|
55
|
+
let l = Object.assign(((n = t == null ? void 0 : t.theme) == null ? void 0 : n.glob) || {});
|
|
56
|
+
(a = t == null ? void 0 : t.microApps) == null || a.map((s) => {
|
|
57
|
+
var o;
|
|
58
|
+
l = Object.assign(l, ((o = s.theme) == null ? void 0 : o.glob) || {});
|
|
59
|
+
}), Object.values(l).filter((s) => !!s).flat().map((s) => g(s));
|
|
60
|
+
}, C = (t) => {
|
|
61
|
+
document.body.classList.add(`${r}-light`), t === "light" && document.body.classList.remove(`${r}-${d.value}`), d.value = t, document.body.classList.add(`${r}-${d.value}`);
|
|
62
|
+
}, $ = (t) => b(() => {
|
|
63
|
+
var e, l, n, a;
|
|
64
|
+
return ((l = (e = u.value) == null ? void 0 : e[d.value]) == null ? void 0 : l[t]) || ((a = (n = i.value) == null ? void 0 : n[d.value]) == null ? void 0 : a[t]) || t;
|
|
65
|
+
}), E = (t) => `var(${t})`, R = $, x = {};
|
|
66
|
+
export {
|
|
67
|
+
d as currentTheme,
|
|
68
|
+
x as default,
|
|
69
|
+
$ as getThemeRule,
|
|
70
|
+
E as getVar,
|
|
71
|
+
R as getVarValue,
|
|
72
|
+
D as initTheme,
|
|
73
|
+
C as setTheme,
|
|
74
|
+
g as setThemeRule
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getWebConfig: () => any;
|
|
@@ -519,6 +519,11 @@ declare const _default: {
|
|
|
519
519
|
en: string;
|
|
520
520
|
_appCode: string;
|
|
521
521
|
};
|
|
522
|
+
常用应用设置: {
|
|
523
|
+
'zh-CN': string;
|
|
524
|
+
en: string;
|
|
525
|
+
_appCode: string;
|
|
526
|
+
};
|
|
522
527
|
还原: {
|
|
523
528
|
'zh-CN': string;
|
|
524
529
|
en: string;
|
|
@@ -554,5 +559,10 @@ declare const _default: {
|
|
|
554
559
|
en: string;
|
|
555
560
|
_appCode: string;
|
|
556
561
|
};
|
|
562
|
+
'\u60A8\u5DF2\u5207\u6362\u7528\u6237\uFF0C\u5F53\u524D\u9875\u9762\u5DF2\u5931\u6548!': {
|
|
563
|
+
'zh-CN': string;
|
|
564
|
+
en: string;
|
|
565
|
+
_appCode: string;
|
|
566
|
+
};
|
|
557
567
|
};
|
|
558
568
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
/** 获取登录信息 */
|
|
2
2
|
export declare const getLoginHistory: (payload?: any, payloadConfig?: import('@das-fed/utils/curring-http/type').CurringConfig) => import('@das-fed/utils/curring-http/type').CurringRes;
|
|
3
|
+
export declare const getSsoParam: (payload?: any, payloadConfig?: import('@das-fed/utils/curring-http/type').CurringConfig) => import('@das-fed/utils/curring-http/type').CurringRes;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** 江铃切换用户或续签时返回的平台 Token。 */
|
|
2
|
+
export interface JianglingSsoToken {
|
|
3
|
+
access_token?: string;
|
|
4
|
+
token_type?: string;
|
|
5
|
+
refresh_token?: string;
|
|
6
|
+
expires_in?: number;
|
|
7
|
+
sub?: string;
|
|
8
|
+
flag?: number;
|
|
9
|
+
tenant?: string;
|
|
10
|
+
jti?: string;
|
|
11
|
+
server?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
scope?: string;
|
|
14
|
+
third_token?: string;
|
|
15
|
+
exp?: string | number;
|
|
16
|
+
refresh_exp?: string | number;
|
|
17
|
+
redirectUrl?: string;
|
|
18
|
+
}
|
|
19
|
+
/** 江铃 IAM 登录状态响应。 */
|
|
20
|
+
export interface JianglingSsoStatusResponse {
|
|
21
|
+
status?: 'normal' | 'logout' | 'expired' | 'platform_token_expired' | 'switch_user';
|
|
22
|
+
token?: JianglingSsoToken;
|
|
23
|
+
}
|
|
24
|
+
/** 保存平台 Token 时的可选配置。 */
|
|
25
|
+
interface SavePlatformTokenOptions {
|
|
26
|
+
/** 续签响应缺少 refresh_token 时,是否保留当前刷新令牌。 */
|
|
27
|
+
preserveRefreshToken?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 江铃 IAM 登录状态接口。
|
|
31
|
+
* 该接口用于恢复 401,必须绕过平台鉴权和自身恢复逻辑,防止递归调用。
|
|
32
|
+
*/
|
|
33
|
+
export declare const getSsoStatus: (payload?: any, payloadConfig?: import('@das-fed/utils/curring-http/type').CurringConfig) => import('@das-fed/utils/curring-http/type').CurringRes;
|
|
34
|
+
/**
|
|
35
|
+
* 获取江铃 IAM 状态检查参数。
|
|
36
|
+
* @returns IAM Token 与当前平台 Token
|
|
37
|
+
*/
|
|
38
|
+
export declare const getSsoStatusPayload: () => {
|
|
39
|
+
ssoToken: string | undefined;
|
|
40
|
+
platformToken: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 保存江铃 IAM 返回的平台 Token。
|
|
44
|
+
* @param token 接口返回的平台 Token
|
|
45
|
+
* @param options 保存策略
|
|
46
|
+
* @returns 保存成功后的访问令牌;数据无效时返回空字符串
|
|
47
|
+
*/
|
|
48
|
+
export declare const savePlatformToken: (token?: JianglingSsoToken, options?: SavePlatformTokenOptions) => string;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 江铃 SSO 登录状态轮询 Hook。
|
|
3
|
+
* 挂载后立即检查一次,并每隔 5 秒重新获取登录状态。
|
|
4
|
+
*/
|
|
5
|
+
export declare const useSso: () => {
|
|
6
|
+
loading: import('vue').Ref<boolean, boolean>;
|
|
7
|
+
error: import('vue').Ref<any, any>;
|
|
8
|
+
checkSsoStatus: () => any;
|
|
9
|
+
start: () => void;
|
|
10
|
+
stop: () => void;
|
|
11
|
+
};
|
|
@@ -18,17 +18,13 @@ export declare const setProjectInfo: (data: any) => void;
|
|
|
18
18
|
export declare const setProjectMessage: (data?: any) => void;
|
|
19
19
|
/** 清除项目数据 */
|
|
20
20
|
export declare const clearProjectInfo: () => void;
|
|
21
|
-
/**
|
|
21
|
+
/** 存储标签页信息,如果传入对象則進行該項替換 */
|
|
22
22
|
export declare const setTabs: (options: any[]) => void;
|
|
23
|
-
/** 清除标签页信息 */
|
|
24
|
-
export declare const clearTabs: () => void;
|
|
25
23
|
/**
|
|
26
24
|
* 存储应用数据
|
|
27
25
|
* @param options
|
|
28
26
|
*/
|
|
29
27
|
export declare const setSubApps: (options: any[]) => void;
|
|
30
|
-
/** 清除应用数据 */
|
|
31
|
-
export declare const clearSubApps: () => void;
|
|
32
28
|
/** 设置应用当前选中菜单 */
|
|
33
29
|
export declare const setSubAppsCurrentMenuCode: (value: string) => void;
|
|
34
30
|
/**
|
|
@@ -38,8 +34,6 @@ export declare const setSubAppsCurrentMenuCode: (value: string) => void;
|
|
|
38
34
|
* @returns
|
|
39
35
|
*/
|
|
40
36
|
export declare const setPermissionBtns: (data: any[], code: string) => any;
|
|
41
|
-
/** 清除菜单数据 */
|
|
42
|
-
export declare const clearPermissionBtns: () => void;
|
|
43
37
|
/**
|
|
44
38
|
* 存储面包屑显示、隐藏数据
|
|
45
39
|
* @param flatMenuList 拍平的菜单list
|
|
@@ -47,8 +41,6 @@ export declare const clearPermissionBtns: () => void;
|
|
|
47
41
|
* @returns
|
|
48
42
|
*/
|
|
49
43
|
export declare const setBreadcrumb: (flatMenuList: any[], code: string) => any;
|
|
50
|
-
/** 清除面包屑数据 */
|
|
51
|
-
export declare const clearBreadcrumb: () => void;
|
|
52
44
|
/**
|
|
53
45
|
* 存储页签风格数据
|
|
54
46
|
* @param flatMenuList 拍平的菜单list
|
|
@@ -56,11 +48,19 @@ export declare const clearBreadcrumb: () => void;
|
|
|
56
48
|
* @returns
|
|
57
49
|
*/
|
|
58
50
|
export declare const setTabStyle: (flatMenuList: any[], code: string) => any;
|
|
59
|
-
/** 清除页签风格数据 */
|
|
60
|
-
export declare const clearTabStyle: () => void;
|
|
61
51
|
/** 存储设备实例数据 */
|
|
62
52
|
export declare const setInstanceInfo: (data: {
|
|
63
53
|
instanceInfo: any;
|
|
64
54
|
}) => void;
|
|
55
|
+
/** 清除页签风格数据 */
|
|
56
|
+
export declare const clearTabStyle: () => void;
|
|
57
|
+
/** 清除面包屑数据 */
|
|
58
|
+
export declare const clearBreadcrumb: () => void;
|
|
59
|
+
/** 清除标签页信息 */
|
|
60
|
+
export declare const clearTabs: () => void;
|
|
61
|
+
/** 清除应用数据 */
|
|
62
|
+
export declare const clearSubApps: () => void;
|
|
63
|
+
/** 清除菜单数据 */
|
|
64
|
+
export declare const clearPermissionBtns: () => void;
|
|
65
65
|
/** 关闭所有应用:清除所有portal数据 */
|
|
66
66
|
export declare const clearPortal: () => void;
|