@das-fed/web 7.0.5-beta.8.2 → 7.0.5-beta.9

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 (45) hide show
  1. package/{packages/main-app-framework/index-CbPnzzxg.js → index-Co-HORmb.js} +1 -1
  2. package/index-DII2s5jN.js +18216 -0
  3. package/index-DII2s5jN.js.gz +0 -0
  4. package/{packages/main-app-framework/index-v2jIZW8u.js → index-DM0W6wXZ.js} +1 -1
  5. package/index-DM0W6wXZ.js.gz +0 -0
  6. package/index.js +32 -7
  7. package/package.json +9 -7
  8. package/packages/create-das-web-app/index.js +58 -1
  9. package/packages/create-das-web-app/index.js.gz +0 -0
  10. package/packages/i18n/index.js +175 -1
  11. package/packages/layout/index.js +785 -2
  12. package/packages/layout/index.js.gz +0 -0
  13. package/packages/main-app-framework/index-KrpfKz6n.js +88 -0
  14. package/packages/main-app-framework/index-KrpfKz6n.js.gz +0 -0
  15. package/packages/main-app-framework/{index-DBZ2IMHx.js → index-TlWCq0Vp.js} +4141 -4304
  16. package/packages/main-app-framework/index-TlWCq0Vp.js.gz +0 -0
  17. package/packages/main-app-framework/index-mcZhp5kH.js +10 -0
  18. package/packages/main-app-framework/index.js +7 -2
  19. package/packages/main-app-framework/style.css +1 -1
  20. package/packages/main-app-framework/style.css.gz +0 -0
  21. package/packages/micro-frontend/index.js +848 -2
  22. package/packages/micro-frontend/index.js.gz +0 -0
  23. package/packages/style/index.js +5 -3
  24. package/packages/theme/index.js +75 -2
  25. package/style.css +7 -0
  26. package/style.css.gz +0 -0
  27. package/packages/create-das-web-app/runtime.js +0 -71
  28. package/packages/create-das-web-app/runtime.js.gz +0 -0
  29. package/packages/i18n/runtime.js +0 -175
  30. package/packages/layout/runtime.js +0 -784
  31. package/packages/layout/runtime.js.gz +0 -0
  32. package/packages/main-app-framework/index-DBZ2IMHx.js.gz +0 -0
  33. package/packages/main-app-framework/index-v2jIZW8u.js.gz +0 -0
  34. package/packages/main-app-framework/runtime.js +0 -6
  35. package/packages/micro-frontend/runtime.js +0 -847
  36. package/packages/micro-frontend/runtime.js.gz +0 -0
  37. package/packages/style/runtime.js +0 -4
  38. package/packages/theme/runtime.js +0 -75
  39. package/types/create-das-web-app/get-web-config.d.ts +0 -1
  40. package/types/main-app-framework/project-custom/jiangling/auth-recovery.d.ts +0 -5
  41. package/types/main-app-framework/project-custom/jiangling/sso-api.d.ts +0 -49
  42. package/types/main-app-framework/project-custom/jiangling/use-sso.d.ts +0 -11
  43. package/types/main-app-framework/project-custom/jiangling/utils.d.ts +0 -3
  44. /package/packages/i18n/{runtime.js.gz → index.js.gz} +0 -0
  45. /package/packages/theme/{runtime.js.gz → index.js.gz} +0 -0
@@ -1,4 +0,0 @@
1
- const e = {};
2
- export {
3
- e as default
4
- };
@@ -1,75 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export declare const getWebConfig: () => any;
@@ -1,5 +0,0 @@
1
- /**
2
- * 注册江铃 IAM 的 401 恢复处理器。
3
- * 注册动作保持幂等,避免布局重复挂载时重复覆盖全局处理器。
4
- */
5
- export declare const registerJianglingUnauthorizedRecovery: () => void;
@@ -1,49 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
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
- };
@@ -1,3 +0,0 @@
1
- /** 是否江铃IAM登录 */
2
- export declare const isIAM: () => boolean;
3
- export declare const getSsoToken: () => string | undefined;
File without changes
File without changes