@das-fed/upf-web 6.4.0-dev.215 → 6.4.0-dev.216

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
@@ -6,7 +6,7 @@ import { DasSpin as E } from "@das-fed/upf-ui/packages/components/spin/index";
6
6
  import { getTabInfo as L } from "@das-fed/upf-utils/common-info";
7
7
  import { setShowLayout as P } from "@das-fed/upf-utils/common-tools";
8
8
  import { createService as b } from "@das-fed/upf-utils/create-api-service";
9
- import { u as q, p as B, c as h, l as K, g as M, a as N } from "./index-DXKNRm6u.js";
9
+ import { u as q, p as B, c as h, l as K, g as M, a as N } from "./index-BmGy3aNh.js";
10
10
  const O = d(!1), c = d([]);
11
11
  p(() => {
12
12
  var l;
Binary file
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as r } from "vue";
2
- import { _ as c } from "./index-DXKNRm6u.js";
2
+ import { _ as c } from "./index-BmGy3aNh.js";
3
3
  const o = {};
4
4
  function t(n, _) {
5
5
  return e(), r("div");
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { M as s, D as t, F as n, E as r, G as i, b as o, m as u, z as g, o as m, d as l, f as p, k as D, y as c, B as L, C as b, h, i as y, J as A, K as I, w as M, e as T, H as R, I as W, q as F, N as d, L as V, r as f, v as k, s as v, j as w, n as x, x as K, A as N, t as j } from "./index-4esj4s-W.js";
1
+ import { M as s, D as t, F as n, E as r, G as i, b as o, m as u, z as g, o as m, d as l, f as p, k as D, y as c, B as L, C as b, h, i as y, J as A, K as I, w as M, e as T, H as R, I as W, q as F, N as d, L as V, r as f, v as k, s as v, j as w, n as x, x as K, A as N, t as j } from "./index-BmGy3aNh.js";
2
2
  export {
3
3
  s as DasMainAppLayout,
4
4
  t as DasWebLayout,
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@das-fed/upf-web",
3
- "version": "6.4.0-dev.215",
3
+ "version": "6.4.0-dev.216",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
7
  "@das-fed/mframe": "0.0.41",
8
- "@das-fed/upf-ui": "6.4.0-dev.215",
9
- "@das-fed/upf-utils": "6.4.0-dev.215",
10
- "@das-fed/upf-web": "6.4.0-dev.215",
11
- "@das-fed/upf-web-components": "6.4.0-dev.215",
8
+ "@das-fed/upf-ui": "6.4.0-dev.216",
9
+ "@das-fed/upf-utils": "6.4.0-dev.216",
10
+ "@das-fed/upf-web": "6.4.0-dev.216",
11
+ "@das-fed/upf-web-components": "6.4.0-dev.216",
12
12
  "@microsoft/signalr": "^8.0.7",
13
13
  "@vueuse/core": "^9.13.0",
14
14
  "animate.css": "^4.1.1",
@@ -20,7 +20,7 @@
20
20
  "vue-router": "^4.4.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@das-fed/upf-cli": "6.4.0-dev.215",
23
+ "@das-fed/upf-cli": "6.4.0-dev.216",
24
24
  "@types/crypto-js": "^4.2.2",
25
25
  "@types/lodash": "^4.14.194",
26
26
  "@types/lodash-es": "^4.17.12",
@@ -25,14 +25,14 @@ var vue = require('vue');
25
25
  var index = require('@das-fed/upf-web/packages/theme/index/es5');
26
26
  var index$1 = require('@das-fed/upf-web/packages/layout/index/es5');
27
27
  var pinia = require('pinia');
28
- var D = require('pinia-plugin-persistedstate');
28
+ var M = require('pinia-plugin-persistedstate');
29
29
  var vueRouter = require('vue-router');
30
30
  var index$2 = require('@das-fed/upf-web/packages/i18n/index/es5');
31
- var I = {
31
+ var q = {
32
32
  install: function install(e, u) {
33
33
  var l;
34
- var f = (l = u == null ? undefined : u.plugins) == null ? undefined : l.glob;
35
- f && Object.values(f).sort(function (t, c) {
34
+ var i = (l = u == null ? undefined : u.plugins) == null ? undefined : l.glob;
35
+ i && Object.values(i).sort(function (t, c) {
36
36
  var _t$index, _c$index;
37
37
  return ((_t$index = t.index) !== null && _t$index !== void 0 ? _t$index : 0) - ((_c$index = c.index) !== null && _c$index !== void 0 ? _c$index : 0);
38
38
  }).filter(function (t) {
@@ -43,12 +43,12 @@ var I = {
43
43
  }
44
44
  },
45
45
  b = pinia.createPinia();
46
- b.use(D);
47
- var q = function q(e) {
46
+ b.use(M);
47
+ var z = function z(e) {
48
48
  var _ref;
49
- var y, R, v, k, x;
50
- var u = (_ref = (y = e == null ? undefined : e.router) == null ? undefined : y.routerBase) !== null && _ref !== void 0 ? _ref : "/",
51
- f = ((R = e == null ? undefined : e.router) == null ? undefined : R.options) || {};
49
+ var R, y, v, k, $;
50
+ var u = (_ref = (R = e == null ? undefined : e.router) == null ? undefined : R.routerBase) !== null && _ref !== void 0 ? _ref : "/",
51
+ i = ((y = e == null ? undefined : e.router) == null ? undefined : y.options) || {};
52
52
  var l = Object.assign(((v = e == null ? undefined : e.router) == null ? undefined : v.glob) || {});
53
53
  var t = Object.values(l).filter(function (n) {
54
54
  return !!n;
@@ -61,9 +61,9 @@ var q = function q(e) {
61
61
  var g;
62
62
  var a = Object.values(((g = n.router) == null ? undefined : g.glob) || {}).filter(function (r) {
63
63
  return !!r;
64
- }).flat().sort(function (r, p) {
65
- var _r$index, _p$index;
66
- return ((_r$index = r.index) !== null && _r$index !== void 0 ? _r$index : 0) - ((_p$index = p.index) !== null && _p$index !== void 0 ? _p$index : 0);
64
+ }).flat().sort(function (r, h) {
65
+ var _r$index, _h$index;
66
+ return ((_r$index = r.index) !== null && _r$index !== void 0 ? _r$index : 0) - ((_h$index = h.index) !== null && _h$index !== void 0 ? _h$index : 0);
67
67
  });
68
68
  c.push.apply(c, _toConsumableArray(a.map(function (r) {
69
69
  return _objectSpread(_objectSpread({}, r), {}, {
@@ -87,14 +87,14 @@ var q = function q(e) {
87
87
  };
88
88
  })));
89
89
  });
90
- var i = ((x = e == null ? undefined : e.router) == null ? undefined : x.routers) || [],
91
- d = [].concat(_toConsumableArray(A(t, e)), _toConsumableArray(A(i, e)), _toConsumableArray(A(c, e))),
90
+ var m = (($ = e == null ? undefined : e.router) == null ? undefined : $.routers) || [],
91
+ d = [].concat(_toConsumableArray(A(t, e)), _toConsumableArray(A(m, e)), _toConsumableArray(A(c, e))),
92
92
  w = vueRouter.createRouter(_objectSpread({
93
93
  history: vueRouter.createWebHistory(u),
94
94
  routes: d
95
- }, f)),
96
- h = index$2.microI18nStore;
97
- if (Array.isArray(e == null ? undefined : e.microApps) && e.microApps.length && h) {
95
+ }, i)),
96
+ p = index$2.microI18nStore;
97
+ if (Array.isArray(e == null ? undefined : e.microApps) && e.microApps.length && p) {
98
98
  var n = /* @__PURE__ */new Map();
99
99
  var _iterator = _createForOfIteratorHelper(e.microApps),
100
100
  _step;
@@ -110,12 +110,12 @@ var q = function q(e) {
110
110
  }
111
111
  w.beforeEach(/*#__PURE__*/function () {
112
112
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(a, g, r) {
113
- var p, m, $, _iterator2, _step2, _step2$value, o, s, L, _t, _t2, _t3;
113
+ var h, s, x, _iterator2, _step2, _step2$value, o, f, L, _t, _t2, _t3;
114
114
  return _regenerator().w(function (_context) {
115
115
  while (1) switch (_context.p = _context.n) {
116
116
  case 0:
117
117
  _context.p = 0;
118
- m = ((p = a.query) == null ? void 0 : p.lang) || window.localStorage.getItem(index$2.languageKey) || window.navigator.language || "zh-CN", $ = a.path || "";
118
+ s = ((h = a.query) == null ? void 0 : h.lang) || window.localStorage.getItem(index$2.languageKey) || window.navigator.language || "zh-CN", x = a.path || "";
119
119
  _iterator2 = _createForOfIteratorHelper(n.entries());
120
120
  _context.p = 1;
121
121
  _iterator2.s();
@@ -124,31 +124,31 @@ var q = function q(e) {
124
124
  _context.n = 10;
125
125
  break;
126
126
  }
127
- _step2$value = _slicedToArray(_step2.value, 2), o = _step2$value[0], s = _step2$value[1];
128
- if (!(!o || !$.toLowerCase().startsWith("/".concat(o.toLowerCase())))) {
127
+ _step2$value = _slicedToArray(_step2.value, 2), o = _step2$value[0], f = _step2$value[1];
128
+ if (!(!o || !x.toLowerCase().startsWith("/".concat(o.toLowerCase())))) {
129
129
  _context.n = 3;
130
130
  break;
131
131
  }
132
132
  return _context.a(3, 9);
133
133
  case 3:
134
- if (!(h.isLoaded(m, o) || !s || !(s != null && s.length))) {
134
+ if (!(p.isLoaded(s, o) || !f || !(f != null && f.length))) {
135
135
  _context.n = 4;
136
136
  break;
137
137
  }
138
138
  return _context.a(3, 10);
139
139
  case 4:
140
- L = typeof s == "string" ? [s] : s;
141
- h.markLoaded(m, o);
140
+ L = typeof f == "string" ? [f] : f;
141
+ p.markLoaded(s, o);
142
142
  _context.p = 5;
143
143
  _context.n = 6;
144
- return index$2.registerMicroI18nData(L, m);
144
+ return index$2.registerMicroI18nData(L, s);
145
145
  case 6:
146
146
  _context.n = 8;
147
147
  break;
148
148
  case 7:
149
149
  _context.p = 7;
150
150
  _t = _context.v;
151
- h.markUnloaded(m, o);
151
+ p.markUnloaded(s, o), console.error("[initRouter] load micro app i18n failed for ".concat(o, ":"), _t);
152
152
  case 8:
153
153
  return _context.a(3, 10);
154
154
  case 9:
@@ -171,6 +171,7 @@ var q = function q(e) {
171
171
  case 14:
172
172
  _context.p = 14;
173
173
  _t3 = _context.v;
174
+ console.error("[initRouter] microApps i18n beforeEach handler error:", _t3);
174
175
  case 15:
175
176
  _context.p = 15;
176
177
  r();
@@ -190,10 +191,10 @@ var q = function q(e) {
190
191
  };
191
192
  },
192
193
  A = function A(e, u) {
193
- return e.map(function (f) {
194
+ return e.map(function (i) {
194
195
  var _ref3, _l$keepAlive;
195
- var l = f.meta || {};
196
- return l.keepAlive = (_ref3 = (_l$keepAlive = l.keepAlive) !== null && _l$keepAlive !== void 0 ? _l$keepAlive : u == null ? undefined : u.keepAlive) !== null && _ref3 !== void 0 ? _ref3 : true, _objectSpread(_objectSpread({}, f), {}, {
196
+ var l = i.meta || {};
197
+ return l.keepAlive = (_ref3 = (_l$keepAlive = l.keepAlive) !== null && _l$keepAlive !== void 0 ? _l$keepAlive : u == null ? undefined : u.keepAlive) !== null && _ref3 !== void 0 ? _ref3 : true, _objectSpread(_objectSpread({}, i), {}, {
197
198
  meta: l
198
199
  });
199
200
  });
@@ -206,16 +207,16 @@ var q = function q(e) {
206
207
  u.value = false;
207
208
  });
208
209
  var _ref4 = (e == null ? undefined : e.root) || {},
209
- f = _ref4.container,
210
+ i = _ref4.container,
210
211
  l = _ref4.component,
211
212
  t = _ref4.props,
212
213
  c = vue.createApp(l || index$1.DasWebLayout, t);
213
- c.use(I, e), c.use(b);
214
- var _q = q(e),
215
- i = _q.router;
216
- return c.use(i), c.mount(f || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = i), {
214
+ c.use(q, e), c.use(b);
215
+ var _z = z(e),
216
+ m = _z.router;
217
+ return c.use(m), c.mount(i || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = m), {
217
218
  app: c,
218
- router: i,
219
+ router: m,
219
220
  loading: u,
220
221
  store: b
221
222
  };
@@ -1,28 +1,28 @@
1
- import { ref as N, createApp as W } from "vue";
2
- import { initTheme as O } from "@das-fed/upf-web/packages/theme/index";
3
- import { DasWebLayout as P } from "@das-fed/upf-web/packages/layout/index";
4
- import { createPinia as j } from "pinia";
5
- import D from "pinia-plugin-persistedstate";
6
- import { createRouter as M, createWebHistory as C } from "vue-router";
7
- import { languageKey as S, registerMicroI18nData as B, microI18nStore as E } from "@das-fed/upf-web/packages/i18n/index";
8
- const I = {
1
+ import { ref as W, createApp as O } from "vue";
2
+ import { initTheme as P } from "@das-fed/upf-web/packages/theme/index";
3
+ import { DasWebLayout as j } from "@das-fed/upf-web/packages/layout/index";
4
+ import { createPinia as D } from "pinia";
5
+ import M from "pinia-plugin-persistedstate";
6
+ import { createRouter as C, createWebHistory as E } from "vue-router";
7
+ import { languageKey as S, registerMicroI18nData as B, microI18nStore as I } from "@das-fed/upf-web/packages/i18n/index";
8
+ const q = {
9
9
  install: (e, u) => {
10
10
  var l;
11
- const f = (l = u == null ? void 0 : u.plugins) == null ? void 0 : l.glob;
12
- f && Object.values(f).sort((t, c) => (t.index ?? 0) - (c.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
11
+ const i = (l = u == null ? void 0 : u.plugins) == null ? void 0 : l.glob;
12
+ i && Object.values(i).sort((t, c) => (t.index ?? 0) - (c.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
13
13
  t.default && t.default.install && e.use(t.default, u), t.install && e.use(t, u);
14
14
  });
15
15
  }
16
- }, b = j();
17
- b.use(D);
18
- const q = (e) => {
19
- var y, R, v, k, x;
20
- const u = ((y = e == null ? void 0 : e.router) == null ? void 0 : y.routerBase) ?? "/", f = ((R = e == null ? void 0 : e.router) == null ? void 0 : R.options) || {};
16
+ }, b = D();
17
+ b.use(M);
18
+ const z = (e) => {
19
+ var R, y, v, k, $;
20
+ const u = ((R = e == null ? void 0 : e.router) == null ? void 0 : R.routerBase) ?? "/", i = ((y = e == null ? void 0 : e.router) == null ? void 0 : y.options) || {};
21
21
  let l = Object.assign(((v = e == null ? void 0 : e.router) == null ? void 0 : v.glob) || {});
22
22
  const t = Object.values(l).filter((n) => !!n).flat().sort((n, a) => (n.index ?? 0) - (a.index ?? 0)), c = [];
23
23
  (k = e == null ? void 0 : e.microApps) == null || k.map((n) => {
24
24
  var g;
25
- const a = Object.values(((g = n.router) == null ? void 0 : g.glob) || {}).filter((r) => !!r).flat().sort((r, p) => (r.index ?? 0) - (p.index ?? 0));
25
+ const a = Object.values(((g = n.router) == null ? void 0 : g.glob) || {}).filter((r) => !!r).flat().sort((r, h) => (r.index ?? 0) - (h.index ?? 0));
26
26
  c.push(
27
27
  ...a.map((r) => ({ ...r, path: `/${n.microAppName}${r.path}` }))
28
28
  ), c.push(
@@ -33,52 +33,53 @@ const q = (e) => {
33
33
  }))
34
34
  );
35
35
  });
36
- const i = ((x = e == null ? void 0 : e.router) == null ? void 0 : x.routers) || [], d = [
36
+ const m = (($ = e == null ? void 0 : e.router) == null ? void 0 : $.routers) || [], d = [
37
37
  ...A(t, e),
38
- ...A(i, e),
38
+ ...A(m, e),
39
39
  ...A(c, e)
40
- ], w = M({ history: C(u), routes: d, ...f }), h = E;
41
- if (Array.isArray(e == null ? void 0 : e.microApps) && e.microApps.length && h) {
40
+ ], w = C({ history: E(u), routes: d, ...i }), p = I;
41
+ if (Array.isArray(e == null ? void 0 : e.microApps) && e.microApps.length && p) {
42
42
  const n = /* @__PURE__ */ new Map();
43
43
  for (const a of e.microApps)
44
44
  a != null && a.microAppName && (a != null && a.i18n) && n.set(a.microAppName, a.i18n);
45
45
  w.beforeEach(async (a, g, r) => {
46
- var p;
46
+ var h;
47
47
  try {
48
- const m = ((p = a.query) == null ? void 0 : p.lang) || window.localStorage.getItem(S) || window.navigator.language || "zh-CN", $ = a.path || "";
49
- for (const [o, s] of n.entries()) {
50
- if (!o || !$.toLowerCase().startsWith(`/${o.toLowerCase()}`)) continue;
51
- if (h.isLoaded(m, o) || !s || !(s != null && s.length)) break;
52
- const L = typeof s == "string" ? [s] : s;
53
- h.markLoaded(m, o);
48
+ const s = ((h = a.query) == null ? void 0 : h.lang) || window.localStorage.getItem(S) || window.navigator.language || "zh-CN", x = a.path || "";
49
+ for (const [o, f] of n.entries()) {
50
+ if (!o || !x.toLowerCase().startsWith(`/${o.toLowerCase()}`)) continue;
51
+ if (p.isLoaded(s, o) || !f || !(f != null && f.length)) break;
52
+ const L = typeof f == "string" ? [f] : f;
53
+ p.markLoaded(s, o);
54
54
  try {
55
- await B(L, m);
56
- } catch {
57
- h.markUnloaded(m, o);
55
+ await B(L, s);
56
+ } catch (N) {
57
+ p.markUnloaded(s, o), console.error(`[initRouter] load micro app i18n failed for ${o}:`, N);
58
58
  }
59
59
  break;
60
60
  }
61
- } catch {
61
+ } catch (s) {
62
+ console.error("[initRouter] microApps i18n beforeEach handler error:", s);
62
63
  } finally {
63
64
  r();
64
65
  }
65
66
  });
66
67
  }
67
68
  return { router: w };
68
- }, A = (e, u) => e.map((f) => {
69
- const l = f.meta || {};
70
- return l.keepAlive = l.keepAlive ?? (u == null ? void 0 : u.keepAlive) ?? !0, { ...f, meta: l };
69
+ }, A = (e, u) => e.map((i) => {
70
+ const l = i.meta || {};
71
+ return l.keepAlive = l.keepAlive ?? (u == null ? void 0 : u.keepAlive) ?? !0, { ...i, meta: l };
71
72
  }), Q = (e) => {
72
73
  var d;
73
74
  e || (e = {});
74
- const u = N(!0);
75
- Promise.all([O(e)]).then(() => {
75
+ const u = W(!0);
76
+ Promise.all([P(e)]).then(() => {
76
77
  u.value = !1;
77
78
  });
78
- const { container: f, component: l, props: t } = (e == null ? void 0 : e.root) || {}, c = W(l || P, t);
79
- c.use(I, e), c.use(b);
80
- const { router: i } = q(e);
81
- return c.use(i), c.mount(f || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = i), { app: c, router: i, loading: u, store: b };
79
+ const { container: i, component: l, props: t } = (e == null ? void 0 : e.root) || {}, c = O(l || j, t);
80
+ c.use(q, e), c.use(b);
81
+ const { router: m } = z(e);
82
+ return c.use(m), c.mount(i || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = m), { app: c, router: m, loading: u, store: b };
82
83
  };
83
84
  export {
84
85
  Q as createDasWebApp
@@ -14,34 +14,34 @@ var commonTools = require('@das-fed/upf-utils/common-tools');
14
14
  var config = require('@das-fed/upf-utils/config');
15
15
  var x = {
16
16
  loaded: {},
17
- isLoaded: function isLoaded(t, e) {
18
- return !!(this.loaded[t] && this.loaded[t][e]);
17
+ isLoaded: function isLoaded(t, n) {
18
+ return !!(this.loaded[t] && this.loaded[t][n]);
19
19
  },
20
- markLoaded: function markLoaded(t, e) {
21
- this.loaded[t] || (this.loaded[t] = {}), this.loaded[t][e] = true;
20
+ markLoaded: function markLoaded(t, n) {
21
+ this.loaded[t] || (this.loaded[t] = {}), this.loaded[t][n] = true;
22
22
  },
23
- markUnloaded: function markUnloaded(t, e) {
24
- this.loaded[t] && (delete this.loaded[t][e], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
23
+ markUnloaded: function markUnloaded(t, n) {
24
+ this.loaded[t] && (delete this.loaded[t][n], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
25
25
  }
26
26
  },
27
27
  U = /*#__PURE__*/function () {
28
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(t, e) {
28
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(t, n) {
29
29
  var _ref2, _ref3, _ref4;
30
- var m, u, g, o, a, s, n, r, l, _t;
30
+ var m, u, g, o, a, s, e, r, l, _t;
31
31
  return _regenerator().w(function (_context) {
32
32
  while (1) switch (_context.p = _context.n) {
33
33
  case 0:
34
- o = config.getConfig() || {}, a = (_ref2 = (m = o.i18n) == null ? undefined : m.fromOss) !== null && _ref2 !== void 0 ? _ref2 : true, s = (_ref3 = (u = o.i18n) == null ? undefined : u.isPullBack) !== null && _ref3 !== void 0 ? _ref3 : false, n = (_ref4 = (g = o.i18n) == null ? undefined : g.isDasUI) !== null && _ref4 !== void 0 ? _ref4 : true;
34
+ o = config.getConfig() || {}, a = (_ref2 = (m = o.i18n) == null ? undefined : m.fromOss) !== null && _ref2 !== void 0 ? _ref2 : true, s = (_ref3 = (u = o.i18n) == null ? undefined : u.isPullBack) !== null && _ref3 !== void 0 ? _ref3 : false, e = (_ref4 = (g = o.i18n) == null ? undefined : g.isDasUI) !== null && _ref4 !== void 0 ? _ref4 : true;
35
35
  r = "/oss/resource/";
36
36
  _context.p = 1;
37
37
  _context.n = 2;
38
38
  return commonTools.handleI18nData({
39
39
  baseUrl: a ? r : "/",
40
- currentLang: e,
40
+ currentLang: n,
41
41
  appName: t,
42
42
  isPullBack: s,
43
43
  fallbackBaseUrl: "/",
44
- isDasUI: n
44
+ isDasUI: e
45
45
  });
46
46
  case 2:
47
47
  l = _context.v;
@@ -73,41 +73,41 @@ var x = {
73
73
  O = M || window.localStorage.getItem(C) || window.navigator.language || "zh-CN",
74
74
  f = vue.ref(O),
75
75
  z = "dasI18n",
76
- w = function w() {
76
+ E = function E() {
77
77
  var t = document.documentElement;
78
78
  t && t.setAttribute("lang", f.value);
79
79
  },
80
- y = function y() {
80
+ w = function w() {
81
81
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
82
- var e = arguments.length > 1 ? arguments[1] : undefined;
83
- var o = e === "global",
82
+ var n = arguments.length > 1 ? arguments[1] : undefined;
83
+ var o = n === "global",
84
84
  a = !o,
85
85
  s = {};
86
- for (var n in t) for (var r in t[n]) {
87
- var _t$n$r;
88
- s[r] || (s[r] = {}), s[r][n] = (_t$n$r = t[n][r]) !== null && _t$n$r !== void 0 ? _t$n$r : "", o && (c[r] || (c[r] = {}), c[r][n] = s[r][n]), a && (i[r] || (i[r] = {}), i[r][n] = s[r][n]);
86
+ for (var e in t) for (var r in t[e]) {
87
+ var _t$e$r;
88
+ s[r] || (s[r] = {}), s[r][e] = (_t$e$r = t[e][r]) !== null && _t$e$r !== void 0 ? _t$e$r : "", o && (c[r] || (c[r] = {}), c[r][e] = s[r][e]), a && (i[r] || (i[r] = {}), i[r][e] = s[r][e]);
89
89
  }
90
90
  },
91
91
  A = function A() {
92
92
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
93
- var e = arguments.length > 1 ? arguments[1] : undefined;
93
+ var n = arguments.length > 1 ? arguments[1] : undefined;
94
94
  var s;
95
- var o = e === "global",
95
+ var o = n === "global",
96
96
  a = !o;
97
- for (var n in t) if (o && !c[n] && (c[n] = t[n]), a) {
98
- var r = (s = t[n]) != null && s._appCode ? t[n]._appCode.toLowerCase() : "";
99
- r && (d[r] || (d[r] = {}), d[r][n] = t[n]), i[n] || (i[n] = t[n]);
97
+ for (var e in t) if (o && !c[e] && (c[e] = t[e]), a) {
98
+ var r = (s = t[e]) != null && s._appCode ? t[e]._appCode.toLowerCase() : "";
99
+ r && (d[r] || (d[r] = {}), d[r][e] = t[e]), i[e] || (i[e] = t[e]);
100
100
  }
101
101
  },
102
102
  B = /*#__PURE__*/function () {
103
103
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(t) {
104
- var e;
104
+ var n;
105
105
  return _regenerator().w(function (_context2) {
106
106
  while (1) switch (_context2.n) {
107
107
  case 0:
108
- w();
109
- e = window[z];
110
- e && A(e, "global");
108
+ E();
109
+ n = window[z];
110
+ n && A(n, "global");
111
111
  case 1:
112
112
  return _context2.a(2);
113
113
  }
@@ -117,46 +117,46 @@ var x = {
117
117
  return _ref5.apply(this, arguments);
118
118
  };
119
119
  }(),
120
- R = function R(t) {
121
- var e = "";
120
+ N = function N(t) {
121
+ var n = "";
122
122
  var o = /\/([^\/]+)\/([^\/]+)\//,
123
123
  a = t.match(o);
124
- return a && a.length >= 3 && (e = a[1] + "/" + a[2]), e ? e.toLowerCase() : "";
124
+ return a && a.length >= 3 && (n = a[1] + "/" + a[2]), n ? n.toLowerCase() : "";
125
125
  },
126
- k = function k(t) {
127
- for (var _len = arguments.length, e = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
128
- e[_key - 1] = arguments[_key];
126
+ R = function R(t) {
127
+ for (var _len = arguments.length, n = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
128
+ n[_key - 1] = arguments[_key];
129
129
  }
130
130
  return vue.computed(function () {
131
131
  var _d$framework, _d$o;
132
- var o = R(location.pathname);
132
+ var o = N(location.pathname);
133
133
  var a = (_d$framework = d.framework) !== null && _d$framework !== void 0 ? _d$framework : {},
134
134
  s = (_d$o = d[o]) !== null && _d$o !== void 0 ? _d$o : {},
135
- n = i[t] || c[t] || a[t] || s[t] || t;
136
- if (n === t) return t;
137
- typeof n == "string" && (n = {
138
- "zh-CN": n
135
+ e = i[t] || c[t] || a[t] || s[t] || t;
136
+ if (e === t) return t;
137
+ typeof e == "string" && (e = {
138
+ "zh-CN": e
139
139
  });
140
- var r = n[f.value];
141
- return f.value === "zh-CN" && n["zh-cn"] && !n["zh-CN"] && (r = n["zh-cn"]), e.map(function (m, u) {
140
+ var r = e[f.value];
141
+ return f.value === "zh-CN" && e["zh-cn"] && !e["zh-CN"] && (r = e["zh-cn"]), n.map(function (m, u) {
142
142
  r && (r = r.replace("$".concat(u), m));
143
143
  }), r;
144
144
  });
145
145
  },
146
- v = k,
146
+ k = R,
147
147
  F = function F(t) {
148
- for (var _len2 = arguments.length, e = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
149
- e[_key2 - 1] = arguments[_key2];
148
+ for (var _len2 = arguments.length, n = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
149
+ n[_key2 - 1] = arguments[_key2];
150
150
  }
151
- return v.apply(void 0, [t].concat(e)).value;
151
+ return k.apply(void 0, [t].concat(n)).value;
152
152
  },
153
- N = function N(t) {
154
- f.value = t, w();
153
+ v = function v(t) {
154
+ f.value = t, E();
155
155
  },
156
- G = function G() {
156
+ $ = function $() {
157
157
  return f;
158
158
  },
159
- E = {
159
+ y = {
160
160
  "en-US": {
161
161
  ant: function ant() {
162
162
  return Promise.resolve().then(function () {
@@ -314,43 +314,44 @@ var x = {
314
314
  }
315
315
  }
316
316
  };
317
- function Y(t, e) {
317
+ function G(t, n) {
318
318
  var a;
319
319
  var o = window.DATE_FORMAT_MAP;
320
- return o && o[t] && o[t][e] ? o[t][e] : ((a = window.DATE_FORMAT_MAP[t]) == null ? undefined : a[e]) || "YYYY-MM-DD";
320
+ return o && o[t] && o[t][n] ? o[t][n] : ((a = window.DATE_FORMAT_MAP[t]) == null ? undefined : a[n]) || "YYYY-MM-DD";
321
321
  }
322
- var K = /*#__PURE__*/function () {
322
+ var Y = /*#__PURE__*/function () {
323
323
  var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(t) {
324
- var e, o, _t2;
324
+ var n, o, _t2;
325
325
  return _regenerator().w(function (_context3) {
326
326
  while (1) switch (_context3.p = _context3.n) {
327
327
  case 0:
328
- e = E[t] || E["zh-CN"];
328
+ n = y[t] || y["zh-CN"];
329
329
  _context3.p = 1;
330
330
  _context3.n = 2;
331
- return e.ant();
331
+ return n.ant();
332
332
  case 2:
333
333
  o = _context3.v;
334
334
  _context3.n = 3;
335
- return e.dayjs();
335
+ return n.dayjs();
336
336
  case 3:
337
337
  return _context3.a(2, o["default"]);
338
338
  case 4:
339
339
  _context3.p = 4;
340
340
  _t2 = _context3.v;
341
+ console.warn("\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8BED\u8A00\u5305: ".concat(_t2));
341
342
  case 5:
342
343
  return _context3.a(2);
343
344
  }
344
345
  }, _callee3, null, [[1, 4]]);
345
346
  }));
346
- return function K(_x4) {
347
+ return function Y(_x4) {
347
348
  return _ref6.apply(this, arguments);
348
349
  };
349
350
  }(),
350
- $ = /*#__PURE__*/function () {
351
+ K = /*#__PURE__*/function () {
351
352
  var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
352
353
  var t,
353
- e,
354
+ n,
354
355
  o,
355
356
  _args4 = arguments,
356
357
  _t3;
@@ -358,41 +359,42 @@ var K = /*#__PURE__*/function () {
358
359
  while (1) switch (_context4.p = _context4.n) {
359
360
  case 0:
360
361
  t = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : [];
361
- e = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : "zh-CN";
362
+ n = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : "zh-CN";
362
363
  _context4.p = 1;
363
364
  _context4.n = 2;
364
- return U(t, e);
365
+ return U(t, n);
365
366
  case 2:
366
367
  o = _context4.v;
367
368
  o != null && o.frontEnd && _typeof(o.frontEnd) == "object" && Object.keys(o.frontEnd).length && t.forEach(function (a) {
368
- o.frontEnd[a] && _typeof(o.frontEnd[a]) == "object" && Object.keys(o.frontEnd[a]).length && y(_defineProperty({}, e, o.frontEnd[a]));
369
- }), o != null && o.dasUiEnd && _typeof(o.dasUiEnd) == "object" && Object.keys(o.dasUiEnd).length && y(_defineProperty({}, e, o.dasUiEnd)), N(e);
369
+ o.frontEnd[a] && _typeof(o.frontEnd[a]) == "object" && Object.keys(o.frontEnd[a]).length ? w(_defineProperty({}, n, o.frontEnd[a])) : console.warn("No front-end i18n data found for app: ".concat(a));
370
+ }), o != null && o.dasUiEnd && _typeof(o.dasUiEnd) == "object" && Object.keys(o.dasUiEnd).length && w(_defineProperty({}, n, o.dasUiEnd)), v(n);
370
371
  _context4.n = 4;
371
372
  break;
372
373
  case 3:
373
374
  _context4.p = 3;
374
375
  _t3 = _context4.v;
376
+ console.error("registerMicroI18nData error:", _t3);
375
377
  case 4:
376
378
  return _context4.a(2);
377
379
  }
378
380
  }, _callee4, null, [[1, 3]]);
379
381
  }));
380
- return function $() {
382
+ return function K() {
381
383
  return _ref7.apply(this, arguments);
382
384
  };
383
385
  }();
384
386
  exports.currentLang = f;
385
387
  exports.customLangeData = i;
386
- exports.getDateFormat = Y;
387
- exports.getI18nRule = k;
388
- exports.getLang = G;
389
- exports.i18n = v;
388
+ exports.getDateFormat = G;
389
+ exports.getI18nRule = R;
390
+ exports.getLang = $;
391
+ exports.i18n = k;
390
392
  exports.initI18n = B;
391
393
  exports.languageKey = C;
392
- exports.loadLocale = K;
394
+ exports.loadLocale = Y;
393
395
  exports.microI18nStore = x;
394
- exports.registerMicroI18nData = $;
396
+ exports.registerMicroI18nData = K;
395
397
  exports.setI18nRule = A;
396
- exports.setLang = N;
397
- exports.setLangRule = y;
398
+ exports.setLang = v;
399
+ exports.setLangRule = w;
398
400
  exports.t = F;