@das-fed/web 6.4.0-dev.55.2 → 6.4.0-dev.55.21

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 (31) hide show
  1. package/{packages/main-app-framework/index-BCjUHPOB.js → index-BlN9vxIO.js} +1 -1
  2. package/index-BlN9vxIO.js.gz +0 -0
  3. package/{index-CBH-AKKo.js → index-DFAevptD.js} +1 -1
  4. package/{index-TIWfkC3W.js → index-DtaKXfS5.js} +833 -823
  5. package/index-DtaKXfS5.js.gz +0 -0
  6. package/index.js +1 -1
  7. package/package.json +6 -6
  8. package/packages/i18n/index.js +45 -45
  9. package/packages/i18n/index.js.gz +0 -0
  10. package/packages/layout/index.js +164 -168
  11. package/packages/layout/index.js.gz +0 -0
  12. package/packages/layout/style.css +1 -1
  13. package/packages/layout/style.css.gz +0 -0
  14. package/packages/main-app-framework/{index-Cx8AIMAF.js → index-Bld_nBaQ.js} +1076 -1062
  15. package/packages/main-app-framework/index-Bld_nBaQ.js.gz +0 -0
  16. package/packages/main-app-framework/{index-CsJoK0gc.js → index-CumtCu7u.js} +1 -1
  17. package/{index-YvyM8fd6.js → packages/main-app-framework/index-Cyua9Pa1.js} +1 -1
  18. package/packages/main-app-framework/index-Cyua9Pa1.js.gz +0 -0
  19. package/packages/main-app-framework/index.js +1 -1
  20. package/packages/main-app-framework/style.css +1 -1
  21. package/packages/main-app-framework/style.css.gz +0 -0
  22. package/packages/micro-frontend/index.js.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/main-app-framework/i18n/index.d.ts +105 -0
  28. package/index-TIWfkC3W.js.gz +0 -0
  29. package/index-YvyM8fd6.js.gz +0 -0
  30. package/packages/main-app-framework/index-BCjUHPOB.js.gz +0 -0
  31. package/packages/main-app-framework/index-Cx8AIMAF.js.gz +0 -0
Binary file
package/index.js CHANGED
@@ -1,4 +1,4 @@
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-TIWfkC3W.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
3
  e as DasMainAppLayout,
4
4
  t as DasWebLayout,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@das-fed/web",
3
- "version": "6.4.0-dev.55.2",
3
+ "version": "6.4.0-dev.55.21",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@das-fed/ui": "6.4.0-dev.55.2",
8
- "@das-fed/utils": "6.4.0-dev.55.2",
9
- "@das-fed/web": "6.4.0-dev.55.2",
10
- "@das-fed/web-components": "6.4.0-dev.55.2",
7
+ "@das-fed/ui": "6.4.0-dev.55.21",
8
+ "@das-fed/utils": "6.4.0-dev.55.21",
9
+ "@das-fed/web": "6.4.0-dev.55.21",
10
+ "@das-fed/web-components": "6.4.0-dev.55.21",
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-dev.55.2",
21
+ "@das-fed/cli": "6.4.0-dev.55.21",
22
22
  "@types/lodash": "^4.14.194",
23
23
  "@types/lodash-es": "^4.17.12",
24
24
  "@vitejs/plugin-vue": "^5.1.0",
@@ -1,53 +1,53 @@
1
- import { reactive as f, ref as p, computed as C } from "vue";
2
- const i = f({}), l = f({}), r = f({});
3
- var b;
4
- const L = (b = navigator.language) != null && b.toLowerCase().startsWith("zh") ? "zh-CN" : "en", g = p(L), h = "dasI18n", w = (t = {}, s) => {
5
- const a = s === "global", c = !a, o = {};
6
- for (const n in t)
7
- for (const e in t[n])
8
- o[e] || (o[e] = {}), o[e][n] = t[n][e] ?? "", a && (l[e] || (l[e] = {}), l[e][n] = o[e][n]), c && (i[e] || (i[e] = {}), i[e][n] = o[e][n]);
9
- }, u = (t = {}, s) => {
10
- var o;
11
- const a = s === "global", c = !a;
12
- for (const n in t)
13
- if (a && !l[n] && (l[n] = t[n]), c) {
14
- const e = (o = t[n]) != null && o._appCode ? t[n]._appCode.toLowerCase() : "";
15
- e && (r[e] || (r[e] = {}), r[e][n] = t[n]), i[n] || (i[n] = t[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
16
  }
17
- }, x = async (t) => {
18
- var c, o;
19
- const s = window[h];
20
- s && u(s, "global");
21
- let a = Object.assign(((c = t == null ? void 0 : t.i18n) == null ? void 0 : c.glob) || {});
22
- (o = t == null ? void 0 : t.microApps) == null || o.map((n) => {
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
23
  var e;
24
- a = Object.assign(a, ((e = n.i18n) == null ? void 0 : e.glob) || {});
25
- }), Object.values(a).filter((n) => !!n).flat().map((n) => u(n));
26
- }, D = (t) => {
27
- let s = "";
28
- const a = /\/([^\/]+)\/([^\/]+)\//, c = t.match(a);
29
- return c && c.length >= 3 && (s = c[1] + "/" + c[2]), s ? s.toLowerCase() : "";
30
- }, v = (t, ...s) => C(() => {
31
- const a = D(location.pathname);
32
- let c = r[a] ?? {}, o = l[t] || c[t] || i[t] || t;
33
- if (o === t) return t;
34
- typeof o == "string" && (o = { "zh-CN": o });
35
- let n = o[g.value];
36
- return g.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (n = o["zh-cn"]), s.map((e, m) => {
37
- n = n.replace(`$${m}`, e);
38
- }), n;
39
- }), z = v, N = (t, ...s) => z(t, ...s).value, d = (t) => {
40
- g.value = t;
41
- }, j = () => g;
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;
33
+ if (t === n) return n;
34
+ typeof t == "string" && (t = { "zh-CN": t });
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;
42
42
  export {
43
43
  g as currentLang,
44
- i as customLangeData,
44
+ r as customLangeData,
45
45
  v as getI18nRule,
46
- j as getLang,
46
+ G as getLang,
47
47
  z as i18n,
48
- x as initI18n,
48
+ N as initI18n,
49
49
  u as setI18nRule,
50
- d as setLang,
51
- w as setLangRule,
52
- N as t
50
+ j as setLang,
51
+ x as setLangRule,
52
+ d as t
53
53
  };
Binary file