@das-fed/web 7.1.0-seres.3 → 7.1.0-seres.30

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.
Binary file
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { J as e, A as t, C as n, B as i, D as r, e as u, m as o, w as m, o as p, f as g, k as D, v as l, y as L, z as b, h as c, i as h, G as A, H as T, q as y, E as R, F as W, K as I, I as M, s as F, j as V, n as f, r as k, x as v, t as w } from "./index-B2tm6y5q.js";
1
+ import { J as e, A as t, C as n, B as i, D as r, e as u, m as o, w as m, o as p, f as g, k as D, v as l, y as L, z as b, h as c, i as h, G as A, H as T, q as y, E as R, F as W, K as I, I as M, s as F, j as V, n as f, r as k, x as v, t as w } from "./index-I3StfGJq.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": "7.1.0-seres.3",
3
+ "version": "7.1.0-seres.30",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@das-fed/ui": "7.1.0-seres.3",
8
- "@das-fed/utils": "7.1.0-seres.3",
9
- "@das-fed/web": "7.1.0-seres.3",
10
- "@das-fed/web-components": "7.1.0-seres.3",
7
+ "@das-fed/ui": "7.1.0-seres.30",
8
+ "@das-fed/utils": "7.1.0-seres.30",
9
+ "@das-fed/web": "7.1.0-seres.30",
10
+ "@das-fed/web-components": "7.1.0-seres.30",
11
11
  "@microsoft/signalr": "^8.0.7",
12
12
  "@vueuse/core": "^9.13.0",
13
13
  "animate.css": "^4.1.1",
@@ -19,7 +19,7 @@
19
19
  "vue-router": "^4.4.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@das-fed/cli": "7.1.0-seres.3",
22
+ "@das-fed/cli": "7.1.0-seres.30",
23
23
  "@types/crypto-js": "^4.2.2",
24
24
  "@types/lodash": "^4.14.194",
25
25
  "@types/lodash-es": "^4.17.12",
@@ -1,11 +1,11 @@
1
- import { ref as v, createApp as x } from "vue";
2
- import { initTheme as O } from "@das-fed/web/packages/theme/index";
3
- import { initI18n as P } from "@das-fed/web/packages/i18n/index";
4
- import { DasWebLayout as W } from "@das-fed/web/packages/layout/index";
5
- import { createPinia as $ } from "pinia";
6
- import j from "pinia-plugin-persistedstate";
7
- import { createRouter as k, createWebHistory as y } from "vue-router";
8
- const D = {
1
+ import { ref as x, createApp as O } from "vue";
2
+ import { initTheme as P } from "@das-fed/web/packages/theme/index";
3
+ import { initI18n as W } from "@das-fed/web/packages/i18n/index";
4
+ import { DasWebLayout as $ } from "@das-fed/web/packages/layout/index";
5
+ import { createPinia as j } from "pinia";
6
+ import k from "pinia-plugin-persistedstate";
7
+ import { createRouter as y, createWebHistory as D } from "vue-router";
8
+ const N = {
9
9
  install: (e, a) => {
10
10
  var l;
11
11
  const c = (l = a == null ? void 0 : a.plugins) == null ? void 0 : l.glob;
@@ -13,45 +13,45 @@ const D = {
13
13
  t.default && t.default.install && e.use(t.default, a), t.install && e.use(t, a);
14
14
  });
15
15
  }
16
- }, i = $();
17
- i.use(j);
18
- const N = (e) => {
19
- var h, b, g, A, p;
20
- const a = ((h = e == null ? void 0 : e.router) == null ? void 0 : h.routerBase) ?? "/", c = ((b = e == null ? void 0 : e.router) == null ? void 0 : b.options) || {};
21
- let l = Object.assign(((g = e == null ? void 0 : e.router) == null ? void 0 : g.glob) || {});
22
- const t = Object.values(l).filter((s) => !!s).flat().sort((s, m) => (s.index ?? 0) - (m.index ?? 0)), u = [];
23
- (A = e == null ? void 0 : e.microApps) == null || A.map((s) => {
24
- var R;
25
- const m = Object.values(((R = s.router) == null ? void 0 : R.glob) || {}).filter((r) => !!r).flat().sort((r, o) => (r.index ?? 0) - (o.index ?? 0));
16
+ }, d = j();
17
+ d.use(k);
18
+ const B = (e) => {
19
+ var i, h, b, A, g;
20
+ const a = ((i = e == null ? void 0 : e.router) == null ? void 0 : i.routerBase) ?? "/", c = ((h = e == null ? void 0 : e.router) == null ? void 0 : h.options) || {};
21
+ let l = Object.assign(((b = e == null ? void 0 : e.router) == null ? void 0 : b.glob) || {});
22
+ const t = Object.values(l).filter((f) => !!f).flat().sort((f, m) => (f.index ?? 0) - (m.index ?? 0)), u = [];
23
+ (A = e == null ? void 0 : e.microApps) == null || A.map((f) => {
24
+ var p;
25
+ const m = Object.values(((p = f.router) == null ? void 0 : p.glob) || {}).filter((r) => !!r).flat().sort((r, v) => (r.index ?? 0) - (v.index ?? 0));
26
26
  u.push(
27
- ...m.map((r) => ({ ...r, path: `/${s.microAppName}${r.path}` }))
27
+ ...m.map((r) => ({ ...r, path: `/${f.microAppName}${r.path}` }))
28
28
  ), u.push(
29
29
  ...m.filter((r) => !!r.path).filter((r) => r.path !== "").filter((r) => r.path !== "/").filter((r) => !r.path.startsWith(`/${r.microAppName}`)).map((r) => ({
30
30
  path: r.path,
31
- redirect: `/${s.microAppName}${r.path}`,
31
+ redirect: `/${f.microAppName}${r.path}`,
32
32
  meta: { ...r.meta || {}, isMicroAppRouteRedirect: !0 }
33
33
  }))
34
34
  );
35
- }), console.log("microAppRoutes====", u);
36
- const f = ((p = e == null ? void 0 : e.router) == null ? void 0 : p.routers) || [], d = [
35
+ });
36
+ const s = ((g = e == null ? void 0 : e.router) == null ? void 0 : g.routers) || [], R = [
37
37
  ...n(t, e),
38
- ...n(f, e),
38
+ ...n(s, e),
39
39
  ...n(u, e)
40
40
  ];
41
- return console.log("routes====", d), { router: k({ history: y(a), routes: d, ...c }) };
41
+ return { router: y({ history: D(a), routes: R, ...c }) };
42
42
  }, n = (e, a) => e.map((c) => {
43
43
  const l = c.meta || {};
44
44
  return l.keepAlive = l.keepAlive ?? (a == null ? void 0 : a.keepAlive) ?? !0, { ...c, meta: l };
45
45
  }), w = (e) => {
46
46
  e || (e = {});
47
- const a = v(!0);
48
- Promise.all([O(e), P(e)]).then(() => {
47
+ const a = x(!0);
48
+ Promise.all([P(e), W(e)]).then(() => {
49
49
  a.value = !1;
50
50
  });
51
- const { container: c, component: l, props: t } = (e == null ? void 0 : e.root) || {}, u = x(l || W, t);
52
- u.use(D, e), u.use(i);
53
- const { router: f } = N(e);
54
- return u.use(f), u.mount(c || "#app"), { app: u, router: f, loading: a, store: i };
51
+ const { container: c, component: l, props: t } = (e == null ? void 0 : e.root) || {}, u = O(l || $, t);
52
+ u.use(N, e), u.use(d);
53
+ const { router: s } = B(e);
54
+ return u.use(s), u.mount(c || "#app"), { app: u, router: s, loading: a, store: d };
55
55
  };
56
56
  export {
57
57
  w as createDasWebApp
@@ -1,4 +1,4 @@
1
- import { reactive as s, ref as z, computed as k } from "vue";
1
+ import { reactive as h, ref as z, computed as k } from "vue";
2
2
  const _ = {
3
3
  // 按钮
4
4
  详情: { "zh-CN": "详情", en: "Details", _appCode: "framework" },
@@ -119,57 +119,55 @@ const _ = {
119
119
  删除失败: { "zh-CN": "删除失败", en: "Deleted Failed", _appCode: "framework" },
120
120
  操作成功: { "zh-CN": "操作成功", en: "Operated Successfully", _appCode: "framework" },
121
121
  操作失败: { "zh-CN": "操作失败", en: "Operated Failed", _appCode: "framework" }
122
- }, d = s({}), f = s({}), t = s({});
122
+ }, d = h({}), f = h({}), m = h({});
123
123
  var i;
124
- const l = sessionStorage.getItem("currentLang") ? sessionStorage.getItem("currentLang") : (i = navigator.language) != null && i.toLowerCase().startsWith("zh") ? "zh-CN" : "en", m = z(l), c = "dasI18n", b = (e = {}, r) => {
125
- const C = r === "global", n = !C, p = {};
126
- for (const o in e)
127
- for (const a in e[o])
128
- p[a] || (p[a] = {}), p[a][o] = e[o][a] ?? "", C && (f[a] || (f[a] = {}), f[a][o] = p[a][o]), n && (d[a] || (d[a] = {}), d[a][o] = p[a][o]);
129
- }, h = (e = {}, r) => {
130
- var p;
131
- const C = r === "global", n = !C;
132
- for (const o in e)
133
- if (C && !f[o] && (f[o] = e[o]), n) {
134
- const a = (p = e[o]) != null && p._appCode ? e[o]._appCode.toLowerCase() : "";
135
- a && (t[a] || (t[a] = {}), t[a][o] = e[o]), d[o] || (d[o] = e[o]);
124
+ const l = sessionStorage.getItem("currentLang") ? sessionStorage.getItem("currentLang") : (i = navigator.language) != null && i.toLowerCase().startsWith("zh") ? "zh-CN" : "en", t = z(l), c = "dasI18n", S = (o = {}, r) => {
125
+ const p = r === "global", C = !p, n = {};
126
+ for (const e in o)
127
+ for (const a in o[e])
128
+ n[a] || (n[a] = {}), n[a][e] = o[e][a] ?? "", p && (f[a] || (f[a] = {}), f[a][e] = n[a][e]), C && (d[a] || (d[a] = {}), d[a][e] = n[a][e]);
129
+ }, w = (o = {}, r) => {
130
+ var n;
131
+ const p = r === "global", C = !p;
132
+ for (const e in o)
133
+ if (p && !f[e] && (f[e] = o[e]), C) {
134
+ const a = (n = o[e]) != null && n._appCode ? o[e]._appCode.toLowerCase() : "";
135
+ a && (m[a] || (m[a] = {}), m[a][e] = o[e]), d[e] || (d[e] = o[e]);
136
136
  }
137
- }, S = async (e) => {
138
- var p, o;
137
+ }, b = async (o) => {
138
+ var n;
139
139
  const r = document.documentElement;
140
- r && r.setAttribute("lang", m.value);
141
- const C = window[c];
142
- C && h(C, "global"), h(_);
143
- let n = Object.assign(((p = e == null ? void 0 : e.i18n) == null ? void 0 : p.glob) || {});
144
- (o = e == null ? void 0 : e.microApps) == null || o.map((a) => {
145
- var w;
146
- n = Object.assign(n, ((w = a.i18n) == null ? void 0 : w.glob) || {});
147
- }), Object.values(n).filter((a) => !!a).flat().map((a) => h(a));
148
- }, u = (e) => {
140
+ r && r.setAttribute("lang", t.value);
141
+ const p = window[c];
142
+ p && w(p, "global"), w(_), [(n = o == null ? void 0 : o.i18n) == null ? void 0 : n.glob, ...((o == null ? void 0 : o.microApps) ?? []).map((e) => {
143
+ var a;
144
+ return (a = e.i18n) == null ? void 0 : a.glob;
145
+ })].flatMap((e) => Object.values(e ?? {})).filter(Boolean).flat().forEach((e) => w(e));
146
+ }, u = (o) => {
149
147
  let r = "";
150
- const C = /\/([^\/]+)\/([^\/]+)\//, n = e.match(C);
151
- return n && n.length >= 3 && (r = n[1] + "/" + n[2]), r ? r.toLowerCase() : "";
152
- }, g = (e, ...r) => k(() => {
153
- const C = u(location.pathname);
154
- let n = t.framework ?? {}, p = t[C] ?? {}, o = f[e] || n[e] || p[e] || d[e] || e;
155
- if (o === e) return e;
156
- typeof o == "string" && (o = { "zh-CN": o });
157
- let a = o[m.value];
158
- return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (a = o["zh-cn"]), r.map((w, N) => {
159
- a && (a = a.replace(`$${N}`, w));
148
+ const p = /\/([^\/]+)\/([^\/]+)\//, C = o.match(p);
149
+ return C && C.length >= 3 && (r = C[1] + "/" + C[2]), r ? r.toLowerCase() : "";
150
+ }, g = (o, ...r) => k(() => {
151
+ const p = u(location.pathname);
152
+ let C = m.framework ?? {}, n = m[p] ?? {}, e = f[o] || C[o] || n[o] || d[o] || o;
153
+ if (e === o) return o;
154
+ typeof e == "string" && (e = { "zh-CN": e });
155
+ let a = e[t.value];
156
+ return t.value === "zh-CN" && e["zh-cn"] && !e["zh-CN"] && (a = e["zh-cn"]), r.map((s, N) => {
157
+ a && (a = a.replace(`$${N}`, s));
160
158
  }), a;
161
- }), P = g, R = (e, ...r) => P(e, ...r).value, D = (e) => {
162
- sessionStorage.setItem("currentLang", e), m.value = e;
163
- }, L = () => m;
159
+ }), P = g, R = (o, ...r) => P(o, ...r).value, D = (o) => {
160
+ sessionStorage.setItem("currentLang", o), t.value = o;
161
+ }, L = () => t;
164
162
  export {
165
- m as currentLang,
163
+ t as currentLang,
166
164
  d as customLangeData,
167
165
  g as getI18nRule,
168
166
  L as getLang,
169
167
  P as i18n,
170
- S as initI18n,
171
- h as setI18nRule,
168
+ b as initI18n,
169
+ w as setI18nRule,
172
170
  D as setLang,
173
- b as setLangRule,
171
+ S as setLangRule,
174
172
  R as t
175
173
  };
Binary file