@das-fed/upf-web 6.4.0-dev.232 → 6.4.0-dev.233

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 (40) hide show
  1. package/es5.js +626 -607
  2. package/front-end/i18n/front-end-page/dasweb_en-US.js +2 -2
  3. package/front-end/i18n/front-end-page/dasweb_zh-CN.js +2 -2
  4. package/front-end/i18n/front-end-page/dasweb_zh-MO.js +2 -2
  5. package/{index-wW15s_in.js → index-CNxj49VD.js} +1 -1
  6. package/{packages/main-app-framework/index-BSIXDWdJ.js → index-CUR2UuLR.js} +1 -1
  7. package/index-CUR2UuLR.js.gz +0 -0
  8. package/{index-BY6POt5_.js → index-DeaZJ_4F.js} +440 -439
  9. package/index-DeaZJ_4F.js.gz +0 -0
  10. package/index.js +1 -1
  11. package/package.json +5 -5
  12. package/packages/create-das-web-app/es5.js +49 -48
  13. package/packages/create-das-web-app/index.js +45 -44
  14. package/packages/create-das-web-app/index.js.gz +0 -0
  15. package/packages/i18n/es5.js +100 -82
  16. package/packages/i18n/index.js +62 -62
  17. package/packages/i18n/index.js.gz +0 -0
  18. package/packages/layout/es5.js +96 -96
  19. package/packages/layout/index.js +98 -98
  20. package/packages/layout/index.js.gz +0 -0
  21. package/packages/main-app-framework/es5.js +29 -29
  22. package/packages/main-app-framework/{index-C0K5zcvx.js → index-7BUmPh7i.js} +1 -1
  23. package/{index-CUJfUQFX.js → packages/main-app-framework/index-BP8gHC_g.js} +1 -1
  24. package/packages/main-app-framework/index-BP8gHC_g.js.gz +0 -0
  25. package/packages/main-app-framework/{index-y647qjnX.js → index-CUuJCTjN.js} +27 -27
  26. package/packages/main-app-framework/index-CUuJCTjN.js.gz +0 -0
  27. package/packages/main-app-framework/index.js +1 -1
  28. package/packages/main-app-framework/style.css +1 -1
  29. package/packages/main-app-framework/style.css.gz +0 -0
  30. package/packages/micro-frontend/es5.js +156 -156
  31. package/packages/micro-frontend/index.js +127 -127
  32. package/packages/micro-frontend/index.js.gz +0 -0
  33. package/style.css +1 -1
  34. package/style.css.gz +0 -0
  35. package/types/i18n/getMicroI18nData.d.ts +1 -1
  36. package/types/i18n/index.d.ts +1 -1
  37. package/index-BY6POt5_.js.gz +0 -0
  38. package/index-CUJfUQFX.js.gz +0 -0
  39. package/packages/main-app-framework/index-BSIXDWdJ.js.gz +0 -0
  40. package/packages/main-app-framework/index-y647qjnX.js.gz +0 -0
@@ -15,34 +15,50 @@ var i18nBridge = require('@das-fed/upf-utils/i18n-bridge');
15
15
  var config = require('@das-fed/upf-utils/config');
16
16
  var G = {
17
17
  loaded: {},
18
- isLoaded: function isLoaded(t, e) {
19
- return !!(this.loaded[t] && this.loaded[t][e]);
18
+ isLoaded: function isLoaded(t, o) {
19
+ return !!(this.loaded[t] && this.loaded[t][o]);
20
20
  },
21
- markLoaded: function markLoaded(t, e) {
22
- this.loaded[t] || (this.loaded[t] = {}), this.loaded[t][e] = true;
21
+ markLoaded: function markLoaded(t, o) {
22
+ this.loaded[t] || (this.loaded[t] = {}), this.loaded[t][o] = true;
23
23
  },
24
- markUnloaded: function markUnloaded(t, e) {
25
- this.loaded[t] && (delete this.loaded[t][e], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
24
+ markUnloaded: function markUnloaded(t, o) {
25
+ this.loaded[t] && (delete this.loaded[t][o], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
26
26
  }
27
27
  },
28
- C = /*#__PURE__*/function () {
29
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(t, e) {
28
+ z = /*#__PURE__*/function () {
29
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
30
30
  var _ref2, _ref3, _ref4;
31
- var m, p, g, o, a, s, n, r, d, _t;
31
+ var t,
32
+ o,
33
+ a,
34
+ m,
35
+ g,
36
+ h,
37
+ e,
38
+ s,
39
+ n,
40
+ r,
41
+ p,
42
+ d,
43
+ _args = arguments,
44
+ _t;
32
45
  return _regenerator().w(function (_context) {
33
46
  while (1) switch (_context.p = _context.n) {
34
47
  case 0:
35
- o = config.getConfig() || {}, a = (_ref2 = (m = o.i18n) == null ? undefined : m.fromOss) !== null && _ref2 !== void 0 ? _ref2 : true, s = (_ref3 = (p = o.i18n) == null ? undefined : p.isPullBack) !== null && _ref3 !== void 0 ? _ref3 : false, n = (_ref4 = (g = o.i18n) == null ? undefined : g.isDasUI) !== null && _ref4 !== void 0 ? _ref4 : true;
36
- r = "/oss/resource/";
48
+ t = _args.length > 0 && _args[0] !== undefined ? _args[0] : [];
49
+ o = _args.length > 1 && _args[1] !== undefined ? _args[1] : "zh-CN";
50
+ a = _args.length > 2 ? _args[2] : undefined;
51
+ e = config.getConfig() || {}, s = (_ref2 = (m = e.i18n) == null ? undefined : m.fromOss) !== null && _ref2 !== void 0 ? _ref2 : true, n = (_ref3 = (g = e.i18n) == null ? undefined : g.isPullBack) !== null && _ref3 !== void 0 ? _ref3 : false, r = (_ref4 = (h = e.i18n) == null ? undefined : h.isDasUI) !== null && _ref4 !== void 0 ? _ref4 : true;
52
+ p = "/oss/resource/";
37
53
  _context.p = 1;
38
54
  _context.n = 2;
39
55
  return commonTools.handleI18nData({
40
- baseUrl: a ? r : "/",
41
- currentLang: e,
56
+ baseUrl: s ? p : a,
57
+ currentLang: o,
42
58
  appName: t,
43
- isPullBack: s,
44
- fallbackBaseUrl: "/",
45
- isDasUI: n
59
+ isPullBack: n,
60
+ fallbackBaseUrl: a,
61
+ isDasUI: r
46
62
  });
47
63
  case 2:
48
64
  d = _context.v;
@@ -62,7 +78,7 @@ var G = {
62
78
  }
63
79
  }, _callee, null, [[1, 4]]);
64
80
  }));
65
- return function C(_x, _x2) {
81
+ return function z() {
66
82
  return _ref.apply(this, arguments);
67
83
  };
68
84
  }(),
@@ -71,97 +87,97 @@ var G = {
71
87
  c = vue.reactive({}),
72
88
  f = vue.reactive({}),
73
89
  O = commonTools.getUrlParams(location.href, "lang") || "",
74
- z = O || window.localStorage.getItem(M) || window.navigator.language || "zh-CN",
75
- l = vue.ref(z),
76
- A = "dasI18n",
77
- w = function w() {
90
+ A = O || window.localStorage.getItem(M) || window.navigator.language || "zh-CN",
91
+ l = vue.ref(A),
92
+ N = "dasI18n",
93
+ j = function j() {
78
94
  var t = document.documentElement;
79
95
  t && t.setAttribute("lang", l.value);
80
96
  },
81
- y = function y() {
97
+ E = function E() {
82
98
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
83
- var e = arguments.length > 1 ? arguments[1] : undefined;
84
- var o = e === "global",
85
- a = !o,
99
+ var o = arguments.length > 1 ? arguments[1] : undefined;
100
+ var a = o === "global",
101
+ e = !a,
86
102
  s = {};
87
103
  for (var n in t) for (var r in t[n]) {
88
104
  var _t$n$r;
89
- 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]);
105
+ s[r] || (s[r] = {}), s[r][n] = (_t$n$r = t[n][r]) !== null && _t$n$r !== void 0 ? _t$n$r : "", a && (c[r] || (c[r] = {}), c[r][n] = s[r][n]), e && (i[r] || (i[r] = {}), i[r][n] = s[r][n]);
90
106
  }
91
107
  },
92
108
  R = function R() {
93
109
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
94
- var e = arguments.length > 1 ? arguments[1] : undefined;
110
+ var o = arguments.length > 1 ? arguments[1] : undefined;
95
111
  var s;
96
- var o = e === "global",
97
- a = !o;
98
- for (var n in t) if (o && !c[n] && (c[n] = t[n]), a) {
112
+ var a = o === "global",
113
+ e = !a;
114
+ for (var n in t) if (a && !c[n] && (c[n] = t[n]), e) {
99
115
  var r = (s = t[n]) != null && s._appCode ? t[n]._appCode.toLowerCase() : "";
100
116
  r && (f[r] || (f[r] = {}), f[r][n] = t[n]), i[n] || (i[n] = t[n]);
101
117
  }
102
118
  },
103
119
  Y = /*#__PURE__*/function () {
104
120
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(t) {
105
- var e;
121
+ var o;
106
122
  return _regenerator().w(function (_context2) {
107
123
  while (1) switch (_context2.n) {
108
124
  case 0:
109
- w();
110
- e = window[A];
111
- e && R(e, "global");
125
+ j();
126
+ o = window[N];
127
+ o && R(o, "global");
112
128
  case 1:
113
129
  return _context2.a(2);
114
130
  }
115
131
  }, _callee2);
116
132
  }));
117
- return function Y(_x3) {
133
+ return function Y(_x) {
118
134
  return _ref5.apply(this, arguments);
119
135
  };
120
136
  }(),
121
- k = function k(t) {
122
- var e = "";
123
- var o = /\/([^\/]+)\/([^\/]+)\//,
124
- a = t.match(o);
125
- return a && a.length >= 3 && (e = a[1] + "/" + a[2]), e ? e.toLowerCase() : "";
126
- },
127
137
  v = function v(t) {
128
- for (var _len = arguments.length, e = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
129
- e[_key - 1] = arguments[_key];
138
+ var o = "";
139
+ var a = /\/([^\/]+)\/([^\/]+)\//,
140
+ e = t.match(a);
141
+ return e && e.length >= 3 && (o = e[1] + "/" + e[2]), o ? o.toLowerCase() : "";
142
+ },
143
+ P = function P(t) {
144
+ for (var _len = arguments.length, o = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
145
+ o[_key - 1] = arguments[_key];
130
146
  }
131
147
  return vue.computed(function () {
132
- var _f$framework, _f$o;
133
- var o = k(location.pathname);
134
- var a = (_f$framework = f.framework) !== null && _f$framework !== void 0 ? _f$framework : {},
135
- s = (_f$o = f[o]) !== null && _f$o !== void 0 ? _f$o : {},
136
- n = i[t] || c[t] || a[t] || s[t] || t;
148
+ var _f$framework, _f$a;
149
+ var a = v(location.pathname);
150
+ var e = (_f$framework = f.framework) !== null && _f$framework !== void 0 ? _f$framework : {},
151
+ s = (_f$a = f[a]) !== null && _f$a !== void 0 ? _f$a : {},
152
+ n = i[t] || c[t] || e[t] || s[t] || t;
137
153
  if (n === t) return t;
138
154
  typeof n == "string" && (n = {
139
155
  "zh-CN": n
140
156
  });
141
157
  var r = n[l.value];
142
- return l.value === "zh-CN" && n["zh-cn"] && !n["zh-CN"] && (r = n["zh-cn"]), e.map(function (m, p) {
143
- r && (r = r.replace("$".concat(p), m));
158
+ return l.value === "zh-CN" && n["zh-cn"] && !n["zh-CN"] && (r = n["zh-cn"]), o.map(function (p, m) {
159
+ r && (r = r.replace("$".concat(m), p));
144
160
  }), r;
145
161
  });
146
162
  },
147
- N = v,
148
- P = function P(t) {
149
- for (var _len2 = arguments.length, e = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
150
- e[_key2 - 1] = arguments[_key2];
163
+ T = P,
164
+ _ = function _(t) {
165
+ for (var _len2 = arguments.length, o = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
166
+ o[_key2 - 1] = arguments[_key2];
151
167
  }
152
- return N.apply(void 0, [t].concat(e)).value;
168
+ return T.apply(void 0, [t].concat(o)).value;
153
169
  };
154
170
  i18nBridge.setI18nBridge({
155
- t: P,
171
+ t: _,
156
172
  currentLang: l
157
173
  });
158
- var T = function T(t) {
159
- l.value = t, w();
174
+ var k = function k(t) {
175
+ l.value = t, j();
160
176
  },
161
177
  K = function K() {
162
178
  return l;
163
179
  },
164
- E = {
180
+ w = {
165
181
  "en-US": {
166
182
  ant: function ant() {
167
183
  return Promise.resolve().then(function () {
@@ -319,27 +335,27 @@ var T = function T(t) {
319
335
  }
320
336
  }
321
337
  };
322
- function $(t, e) {
323
- var a;
324
- var o = window.DATE_FORMAT_MAP;
325
- return o && o[t] && o[t][e] ? o[t][e] : ((a = window.DATE_FORMAT_MAP[t]) == null ? undefined : a[e]) || "YYYY-MM-DD";
338
+ function $(t, o) {
339
+ var e;
340
+ var a = window.DATE_FORMAT_MAP;
341
+ return a && a[t] && a[t][o] ? a[t][o] : ((e = window.DATE_FORMAT_MAP[t]) == null ? undefined : e[o]) || "YYYY-MM-DD";
326
342
  }
327
343
  var H = /*#__PURE__*/function () {
328
344
  var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(t) {
329
- var e, o, _t2;
345
+ var o, a, _t2;
330
346
  return _regenerator().w(function (_context3) {
331
347
  while (1) switch (_context3.p = _context3.n) {
332
348
  case 0:
333
- e = E[t] || E["zh-CN"];
349
+ o = w[t] || w["zh-CN"];
334
350
  _context3.p = 1;
335
351
  _context3.n = 2;
336
- return e.ant();
352
+ return o.ant();
337
353
  case 2:
338
- o = _context3.v;
354
+ a = _context3.v;
339
355
  _context3.n = 3;
340
- return e.dayjs();
356
+ return o.dayjs();
341
357
  case 3:
342
- return _context3.a(2, o["default"]);
358
+ return _context3.a(2, a["default"]);
343
359
  case 4:
344
360
  _context3.p = 4;
345
361
  _t2 = _context3.v;
@@ -348,30 +364,32 @@ var H = /*#__PURE__*/function () {
348
364
  }
349
365
  }, _callee3, null, [[1, 4]]);
350
366
  }));
351
- return function H(_x4) {
367
+ return function H(_x2) {
352
368
  return _ref6.apply(this, arguments);
353
369
  };
354
370
  }(),
355
371
  q = /*#__PURE__*/function () {
356
372
  var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
357
373
  var t,
358
- e,
359
374
  o,
375
+ a,
376
+ e,
360
377
  _args4 = arguments,
361
378
  _t3;
362
379
  return _regenerator().w(function (_context4) {
363
380
  while (1) switch (_context4.p = _context4.n) {
364
381
  case 0:
365
382
  t = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : [];
366
- e = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : "zh-CN";
383
+ o = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : "zh-CN";
384
+ a = _args4.length > 2 ? _args4[2] : undefined;
367
385
  _context4.p = 1;
368
386
  _context4.n = 2;
369
- return C(t, e);
387
+ return z(t, o, a);
370
388
  case 2:
371
- o = _context4.v;
372
- o != null && o.frontEnd && _typeof(o.frontEnd) == "object" && Object.keys(o.frontEnd).length && t.forEach(function (a) {
373
- o.frontEnd[a] && _typeof(o.frontEnd[a]) == "object" && Object.keys(o.frontEnd[a]).length && y(_defineProperty({}, e, o.frontEnd[a]));
374
- }), o != null && o.dasUiEnd && _typeof(o.dasUiEnd) == "object" && Object.keys(o.dasUiEnd).length && y(_defineProperty({}, e, o.dasUiEnd)), T(e);
389
+ e = _context4.v;
390
+ e != null && e.frontEnd && _typeof(e.frontEnd) == "object" && Object.keys(e.frontEnd).length && t.forEach(function (s) {
391
+ e.frontEnd[s] && _typeof(e.frontEnd[s]) == "object" && Object.keys(e.frontEnd[s]).length && E(_defineProperty({}, o, e.frontEnd[s]));
392
+ }), e != null && e.dasUiEnd && _typeof(e.dasUiEnd) == "object" && Object.keys(e.dasUiEnd).length && E(_defineProperty({}, o, e.dasUiEnd)), k(o);
375
393
  _context4.n = 4;
376
394
  break;
377
395
  case 3:
@@ -389,15 +407,15 @@ var H = /*#__PURE__*/function () {
389
407
  exports.currentLang = l;
390
408
  exports.customLangeData = i;
391
409
  exports.getDateFormat = $;
392
- exports.getI18nRule = v;
410
+ exports.getI18nRule = P;
393
411
  exports.getLang = K;
394
- exports.i18n = N;
412
+ exports.i18n = T;
395
413
  exports.initI18n = Y;
396
414
  exports.languageKey = M;
397
415
  exports.loadLocale = H;
398
416
  exports.microI18nStore = G;
399
417
  exports.registerMicroI18nData = q;
400
418
  exports.setI18nRule = R;
401
- exports.setLang = T;
402
- exports.setLangRule = y;
403
- exports.t = P;
419
+ exports.setLang = k;
420
+ exports.setLangRule = E;
421
+ exports.t = _;
@@ -1,75 +1,75 @@
1
- import { reactive as u, ref as b, computed as j } from "vue";
2
- import { handleI18nData as I, getUrlParams as L } from "@das-fed/upf-utils/common-tools";
3
- import { setI18nBridge as D } from "@das-fed/upf-utils/i18n-bridge";
1
+ import { reactive as u, ref as b, computed as I } from "vue";
2
+ import { handleI18nData as L, getUrlParams as D } from "@das-fed/upf-utils/common-tools";
3
+ import { setI18nBridge as C } from "@das-fed/upf-utils/i18n-bridge";
4
4
  import { getConfig as U } from "@das-fed/upf-utils/config";
5
5
  const G = {
6
6
  loaded: {},
7
- isLoaded(t, e) {
8
- return !!(this.loaded[t] && this.loaded[t][e]);
7
+ isLoaded(t, o) {
8
+ return !!(this.loaded[t] && this.loaded[t][o]);
9
9
  },
10
- markLoaded(t, e) {
11
- this.loaded[t] || (this.loaded[t] = {}), this.loaded[t][e] = !0;
10
+ markLoaded(t, o) {
11
+ this.loaded[t] || (this.loaded[t] = {}), this.loaded[t][o] = !0;
12
12
  },
13
- markUnloaded(t, e) {
14
- this.loaded[t] && (delete this.loaded[t][e], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
13
+ markUnloaded(t, o) {
14
+ this.loaded[t] && (delete this.loaded[t][o], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
15
15
  }
16
- }, C = async (t, e) => {
17
- var m, p, g;
18
- const o = U() || {}, a = ((m = o.i18n) == null ? void 0 : m.fromOss) ?? !0, s = ((p = o.i18n) == null ? void 0 : p.isPullBack) ?? !1, n = ((g = o.i18n) == null ? void 0 : g.isDasUI) ?? !0;
19
- let r = "/oss/resource/";
16
+ }, z = async (t = [], o = "zh-CN", a) => {
17
+ var m, g, h;
18
+ const e = U() || {}, s = ((m = e.i18n) == null ? void 0 : m.fromOss) ?? !0, n = ((g = e.i18n) == null ? void 0 : g.isPullBack) ?? !1, r = ((h = e.i18n) == null ? void 0 : h.isDasUI) ?? !0;
19
+ let p = "/oss/resource/";
20
20
  try {
21
- const d = await I({
22
- baseUrl: a ? r : "/",
23
- currentLang: e,
21
+ const d = await L({
22
+ baseUrl: s ? p : a,
23
+ currentLang: o,
24
24
  appName: t,
25
- isPullBack: s,
26
- fallbackBaseUrl: "/",
27
- isDasUI: n
25
+ isPullBack: n,
26
+ fallbackBaseUrl: a,
27
+ isDasUI: r
28
28
  });
29
29
  if (!d || !(d != null && d.frontEnd))
30
30
  throw new Error("Failed to fetch i18n data");
31
31
  return d;
32
- } catch (h) {
33
- throw new Error(`registerResources error: ${h}`);
32
+ } catch (y) {
33
+ throw new Error(`registerResources error: ${y}`);
34
34
  }
35
- }, M = "language", i = u({}), c = u({}), f = u({}), O = L(location.href, "lang") || "", z = O || window.localStorage.getItem(M) || window.navigator.language || "zh-CN", l = b(z), A = "dasI18n", w = () => {
35
+ }, M = "language", i = u({}), c = u({}), f = u({}), O = D(location.href, "lang") || "", A = O || window.localStorage.getItem(M) || window.navigator.language || "zh-CN", l = b(A), N = "dasI18n", j = () => {
36
36
  const t = document.documentElement;
37
37
  t && t.setAttribute("lang", l.value);
38
- }, y = (t = {}, e) => {
39
- const o = e === "global", a = !o, s = {};
38
+ }, E = (t = {}, o) => {
39
+ const a = o === "global", e = !a, s = {};
40
40
  for (const n in t)
41
41
  for (const r in t[n])
42
- s[r] || (s[r] = {}), s[r][n] = 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]);
43
- }, R = (t = {}, e) => {
42
+ s[r] || (s[r] = {}), s[r][n] = t[n][r] ?? "", a && (c[r] || (c[r] = {}), c[r][n] = s[r][n]), e && (i[r] || (i[r] = {}), i[r][n] = s[r][n]);
43
+ }, R = (t = {}, o) => {
44
44
  var s;
45
- const o = e === "global", a = !o;
45
+ const a = o === "global", e = !a;
46
46
  for (const n in t)
47
- if (o && !c[n] && (c[n] = t[n]), a) {
47
+ if (a && !c[n] && (c[n] = t[n]), e) {
48
48
  const r = (s = t[n]) != null && s._appCode ? t[n]._appCode.toLowerCase() : "";
49
49
  r && (f[r] || (f[r] = {}), f[r][n] = t[n]), i[n] || (i[n] = t[n]);
50
50
  }
51
51
  }, Y = async (t) => {
52
- w();
53
- const e = window[A];
54
- e && R(e, "global");
55
- }, k = (t) => {
56
- let e = "";
57
- const o = /\/([^\/]+)\/([^\/]+)\//, a = t.match(o);
58
- return a && a.length >= 3 && (e = a[1] + "/" + a[2]), e ? e.toLowerCase() : "";
59
- }, v = (t, ...e) => j(() => {
60
- const o = k(location.pathname);
61
- let a = f.framework ?? {}, s = f[o] ?? {}, n = i[t] || c[t] || a[t] || s[t] || t;
52
+ j();
53
+ const o = window[N];
54
+ o && R(o, "global");
55
+ }, v = (t) => {
56
+ let o = "";
57
+ const a = /\/([^\/]+)\/([^\/]+)\//, e = t.match(a);
58
+ return e && e.length >= 3 && (o = e[1] + "/" + e[2]), o ? o.toLowerCase() : "";
59
+ }, P = (t, ...o) => I(() => {
60
+ const a = v(location.pathname);
61
+ let e = f.framework ?? {}, s = f[a] ?? {}, n = i[t] || c[t] || e[t] || s[t] || t;
62
62
  if (n === t) return t;
63
63
  typeof n == "string" && (n = { "zh-CN": n });
64
64
  let r = n[l.value];
65
- return l.value === "zh-CN" && n["zh-cn"] && !n["zh-CN"] && (r = n["zh-cn"]), e.map((m, p) => {
66
- r && (r = r.replace(`$${p}`, m));
65
+ return l.value === "zh-CN" && n["zh-cn"] && !n["zh-CN"] && (r = n["zh-cn"]), o.map((p, m) => {
66
+ r && (r = r.replace(`$${m}`, p));
67
67
  }), r;
68
- }), N = v, P = (t, ...e) => N(t, ...e).value;
69
- D({ t: P, currentLang: l });
70
- const T = (t) => {
71
- l.value = t, w();
72
- }, K = () => l, E = {
68
+ }), T = P, _ = (t, ...o) => T(t, ...o).value;
69
+ C({ t: _, currentLang: l });
70
+ const k = (t) => {
71
+ l.value = t, j();
72
+ }, K = () => l, w = {
73
73
  "en-US": { ant: () => import("ant-design-vue/es/locale/en_US"), dayjs: () => import("dayjs/locale/en") },
74
74
  "zh-CN": { ant: () => import("ant-design-vue/es/locale/zh_CN"), dayjs: () => import("dayjs/locale/zh-cn") },
75
75
  "zh-MO": { ant: () => import("ant-design-vue/es/locale/zh_TW"), dayjs: () => import("dayjs/locale/zh-tw") },
@@ -84,24 +84,24 @@ const T = (t) => {
84
84
  "nl-NL": { ant: () => import("ant-design-vue/es/locale/nl_NL"), dayjs: () => import("dayjs/locale/nl") },
85
85
  "tr-TR": { ant: () => import("ant-design-vue/es/locale/tr_TR"), dayjs: () => import("dayjs/locale/tr") }
86
86
  };
87
- function $(t, e) {
88
- var a;
89
- const o = window.DATE_FORMAT_MAP;
90
- return o && o[t] && o[t][e] ? o[t][e] : ((a = window.DATE_FORMAT_MAP[t]) == null ? void 0 : a[e]) || "YYYY-MM-DD";
87
+ function $(t, o) {
88
+ var e;
89
+ const a = window.DATE_FORMAT_MAP;
90
+ return a && a[t] && a[t][o] ? a[t][o] : ((e = window.DATE_FORMAT_MAP[t]) == null ? void 0 : e[o]) || "YYYY-MM-DD";
91
91
  }
92
92
  const H = async (t) => {
93
- const e = E[t] || E["zh-CN"];
93
+ const o = w[t] || w["zh-CN"];
94
94
  try {
95
- const o = await e.ant();
96
- return await e.dayjs(), o.default;
95
+ const a = await o.ant();
96
+ return await o.dayjs(), a.default;
97
97
  } catch {
98
98
  }
99
- }, q = async (t = [], e = "zh-CN") => {
99
+ }, q = async (t = [], o = "zh-CN", a) => {
100
100
  try {
101
- const o = await C(t, e);
102
- o != null && o.frontEnd && typeof o.frontEnd == "object" && Object.keys(o.frontEnd).length && t.forEach((a) => {
103
- o.frontEnd[a] && typeof o.frontEnd[a] == "object" && Object.keys(o.frontEnd[a]).length && y({ [e]: o.frontEnd[a] });
104
- }), o != null && o.dasUiEnd && typeof o.dasUiEnd == "object" && Object.keys(o.dasUiEnd).length && y({ [e]: o.dasUiEnd }), T(e);
101
+ const e = await z(t, o, a);
102
+ e != null && e.frontEnd && typeof e.frontEnd == "object" && Object.keys(e.frontEnd).length && t.forEach((s) => {
103
+ e.frontEnd[s] && typeof e.frontEnd[s] == "object" && Object.keys(e.frontEnd[s]).length && E({ [o]: e.frontEnd[s] });
104
+ }), e != null && e.dasUiEnd && typeof e.dasUiEnd == "object" && Object.keys(e.dasUiEnd).length && E({ [o]: e.dasUiEnd }), k(o);
105
105
  } catch {
106
106
  }
107
107
  };
@@ -109,16 +109,16 @@ export {
109
109
  l as currentLang,
110
110
  i as customLangeData,
111
111
  $ as getDateFormat,
112
- v as getI18nRule,
112
+ P as getI18nRule,
113
113
  K as getLang,
114
- N as i18n,
114
+ T as i18n,
115
115
  Y as initI18n,
116
116
  M as languageKey,
117
117
  H as loadLocale,
118
118
  G as microI18nStore,
119
119
  q as registerMicroI18nData,
120
120
  R as setI18nRule,
121
- T as setLang,
122
- y as setLangRule,
123
- P as t
121
+ k as setLang,
122
+ E as setLangRule,
123
+ _ as t
124
124
  };
Binary file