@das-fed/web 6.4.0-test.3.1 → 6.4.0-test.5.1

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 (38) hide show
  1. package/esm-map.json +2 -1
  2. package/index-BlN9vxIO.js +76 -0
  3. package/index-BlN9vxIO.js.gz +0 -0
  4. package/{packages/main-app-framework/index-D-KaGWK2.js → index-DFAevptD.js} +1 -1
  5. package/{index-D-p5feGf.js → index-DtaKXfS5.js} +2163 -1990
  6. package/index-DtaKXfS5.js.gz +0 -0
  7. package/index.js +20 -19
  8. package/package.json +6 -6
  9. package/packages/i18n/index.js +49 -36
  10. package/packages/i18n/index.js.gz +0 -0
  11. package/packages/layout/index.js +164 -168
  12. package/packages/layout/index.js.gz +0 -0
  13. package/packages/layout/style.css +1 -1
  14. package/packages/layout/style.css.gz +0 -0
  15. package/packages/main-app-framework/{index-C1k_cOnk.js → index-Bld_nBaQ.js} +1913 -1749
  16. package/packages/main-app-framework/index-Bld_nBaQ.js.gz +0 -0
  17. package/{index-BSt1lmGg.js → packages/main-app-framework/index-CumtCu7u.js} +1 -1
  18. package/packages/main-app-framework/index-Cyua9Pa1.js +76 -0
  19. package/packages/main-app-framework/index-Cyua9Pa1.js.gz +0 -0
  20. package/packages/main-app-framework/index.js +3 -2
  21. package/packages/main-app-framework/style.css +1 -1
  22. package/packages/main-app-framework/style.css.gz +0 -0
  23. package/packages/style/style.css +1 -1
  24. package/packages/style/style.css.gz +0 -0
  25. package/style.css +2 -2
  26. package/style.css.gz +0 -0
  27. package/types/i18n/index.d.ts +4 -3
  28. package/types/main-app-framework/constant/index.d.ts +1 -1
  29. package/types/main-app-framework/i18n/index.d.ts +528 -0
  30. package/types/main-app-framework/init-config/get-system-config/api.d.ts +2 -0
  31. package/i18n-collection/en.js +0 -93
  32. package/i18n-collection/zh-CN.js +0 -93
  33. package/index-BWjO8i-G.js +0 -75
  34. package/index-BWjO8i-G.js.gz +0 -0
  35. package/index-D-p5feGf.js.gz +0 -0
  36. package/packages/main-app-framework/index-C1k_cOnk.js.gz +0 -0
  37. package/packages/main-app-framework/index-Cd2KFU7P.js +0 -75
  38. package/packages/main-app-framework/index-Cd2KFU7P.js.gz +0 -0
Binary file
package/index.js CHANGED
@@ -1,31 +1,32 @@
1
- import { G as s, x as t, z as n, y as i, A as r, e as u, k as p, q as o, g, j as m, p as l, v as D, w as b, f as h, i as A, D as L, E as T, n as c, B as y, C as R, H as W, F as M, s as F, h as I, m as V, o as f, r as k, t as v } from "./index-D-p5feGf.js";
1
+ import { I as e, z as t, B as n, A as i, C as r, e as u, k as o, v as g, n as m, g as p, j as D, r as l, x as L, y as b, f as c, i as h, F as A, G as T, o as y, D as R, E as W, J as I, H as M, s as F, h as V, m as f, q as k, w as v, t as w } from "./index-DtaKXfS5.js";
2
2
  export {
3
- s as DasMainAppLayout,
3
+ e as DasMainAppLayout,
4
4
  t as DasWebLayout,
5
5
  n as DasWebMenu,
6
6
  i as DasWebNav,
7
7
  r as DasWebTabs,
8
8
  u as createDasWebApp,
9
- p as currentLang,
10
- o as currentTheme,
11
- g as getI18nRule,
12
- m as getLang,
9
+ o as currentLang,
10
+ g as currentTheme,
11
+ m as customLangeData,
12
+ p as getI18nRule,
13
+ D as getLang,
13
14
  l as getThemeRule,
14
- D as getVar,
15
+ L as getVar,
15
16
  b as getVarValue,
16
- h as i18n,
17
- A as initI18n,
18
- L as initMainApp,
17
+ c as i18n,
18
+ h as initI18n,
19
+ A as initMainApp,
19
20
  T as initMicroApp,
20
- c as initTheme,
21
- y as layout,
22
- R as layoutData,
23
- W as mainAppFramework,
21
+ y as initTheme,
22
+ R as layout,
23
+ W as layoutData,
24
+ I as mainAppFramework,
24
25
  M as microFrontend,
25
26
  F as setI18nRule,
26
- I as setLang,
27
- V as setLangRule,
28
- f as setTheme,
29
- k as setThemeRule,
30
- v as t
27
+ V as setLang,
28
+ f as setLangRule,
29
+ k as setTheme,
30
+ v as setThemeRule,
31
+ w as t
31
32
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@das-fed/web",
3
- "version": "6.4.0-test.3.1",
3
+ "version": "6.4.0-test.5.1",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@das-fed/ui": "6.4.0-test.3.1",
8
- "@das-fed/utils": "6.4.0-test.3.1",
9
- "@das-fed/web": "6.4.0-test.3.1",
10
- "@das-fed/web-components": "6.4.0-test.3.1",
7
+ "@das-fed/ui": "6.4.0-test.5.1",
8
+ "@das-fed/utils": "6.4.0-test.5.1",
9
+ "@das-fed/web": "6.4.0-test.5.1",
10
+ "@das-fed/web-components": "6.4.0-test.5.1",
11
11
  "@microsoft/signalr": "^8.0.7",
12
12
  "@vueuse/core": "^9.13.0",
13
13
  "animate.css": "^4.1.1",
@@ -18,7 +18,7 @@
18
18
  "vue-router": "^4.4.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@das-fed/cli": "6.4.0-test.3.1",
21
+ "@das-fed/cli": "6.4.0-test.5.1",
22
22
  "@types/lodash": "^4.14.194",
23
23
  "@types/lodash-es": "^4.17.12",
24
24
  "@vitejs/plugin-vue": "^5.1.0",
@@ -1,40 +1,53 @@
1
- import { reactive as u, ref as f, computed as b } from "vue";
2
- const a = u({}), i = u({}), c = f("zh-CN"), m = "dasI18n", g = (n, l) => {
3
- const t = l === "global", s = !t;
4
- for (const o in n)
5
- t && (i[o] = n[o]), s && (a[o] = n[o]);
6
- }, z = (n, l, t) => {
7
- const s = t === "global", o = !s;
8
- for (const e in n)
9
- s && (i[e][l] = n[e]), o && (a[e][l] = n[e]);
10
- }, C = async (n) => {
11
- var s, o;
12
- const l = window[m];
13
- l && g(l, "global");
14
- let t = Object.assign(((s = n == null ? void 0 : n.i18n) == null ? void 0 : s.glob) || {});
15
- (o = n == null ? void 0 : n.microApps) == null || o.map((e) => {
16
- var r;
17
- t = Object.assign(t, ((r = e.i18n) == null ? void 0 : r.glob) || {});
18
- }), Object.values(t).filter((e) => !!e).flat().map((e) => g(e));
19
- }, I = (n, ...l) => b(() => {
20
- let t = i[n] || a[n] || n;
1
+ import { reactive as f, ref as C, computed as L } from "vue";
2
+ const r = f({}), l = f({}), i = f({});
3
+ var m;
4
+ const h = (m = navigator.language) != null && m.toLowerCase().startsWith("zh") ? "zh-CN" : "en", g = C(h), D = "dasI18n", x = (n = {}, o) => {
5
+ const a = o === "global", s = !a, c = {};
6
+ for (const t in n)
7
+ for (const e in n[t])
8
+ c[e] || (c[e] = {}), c[e][t] = n[t][e] ?? "", a && (l[e] || (l[e] = {}), l[e][t] = c[e][t]), s && (r[e] || (r[e] = {}), r[e][t] = c[e][t]);
9
+ }, u = (n = {}, o) => {
10
+ var c;
11
+ const a = o === "global", s = !a;
12
+ for (const t in n)
13
+ if (a && !l[t] && (l[t] = n[t]), s) {
14
+ const e = (c = n[t]) != null && c._appCode ? n[t]._appCode.toLowerCase() : "";
15
+ e && (i[e] || (i[e] = {}), i[e][t] = n[t]), r[t] || (r[t] = n[t]);
16
+ }
17
+ }, N = async (n) => {
18
+ var s, c;
19
+ const o = window[D];
20
+ o && u(o, "global");
21
+ let a = Object.assign(((s = n == null ? void 0 : n.i18n) == null ? void 0 : s.glob) || {});
22
+ (c = n == null ? void 0 : n.microApps) == null || c.map((t) => {
23
+ var e;
24
+ a = Object.assign(a, ((e = t.i18n) == null ? void 0 : e.glob) || {});
25
+ }), Object.values(a).filter((t) => !!t).flat().map((t) => u(t));
26
+ }, w = (n) => {
27
+ let o = "";
28
+ const a = /\/([^\/]+)\/([^\/]+)\//, s = n.match(a);
29
+ return s && s.length >= 3 && (o = s[1] + "/" + s[2]), o ? o.toLowerCase() : "";
30
+ }, v = (n, ...o) => L(() => {
31
+ const a = w(location.pathname);
32
+ let s = i.framework ?? {}, c = i[a] ?? {}, t = l[n] || s[n] || c[n] || r[n] || n;
21
33
  if (t === n) return n;
22
34
  typeof t == "string" && (t = { "zh-CN": t });
23
- let s = t[c.value];
24
- return c.value === "zh-CN" && t["zh-cn"] && !t["zh-CN"] && (s = t["zh-cn"]), l.map((o, e) => {
25
- s = s.replace(`$${e}`, o);
26
- }), s;
27
- }), h = I, L = (n, ...l) => h(n, ...l).value, D = (n) => {
28
- c.value = n;
29
- }, N = () => c;
35
+ let e = t[g.value];
36
+ return g.value === "zh-CN" && t["zh-cn"] && !t["zh-CN"] && (e = t["zh-cn"]), o.map((b, p) => {
37
+ e = e.replace(`$${p}`, b);
38
+ }), e;
39
+ }), z = v, d = (n, ...o) => z(n, ...o).value, j = (n) => {
40
+ g.value = n;
41
+ }, G = () => g;
30
42
  export {
31
- c as currentLang,
32
- I as getI18nRule,
33
- N as getLang,
34
- h as i18n,
35
- C as initI18n,
36
- g as setI18nRule,
37
- D as setLang,
38
- z as setLangRule,
39
- L as t
43
+ g as currentLang,
44
+ r as customLangeData,
45
+ v as getI18nRule,
46
+ G as getLang,
47
+ z as i18n,
48
+ N as initI18n,
49
+ u as setI18nRule,
50
+ j as setLang,
51
+ x as setLangRule,
52
+ d as t
40
53
  };
Binary file