@das-fed/upf-web 6.4.0-dev.218 → 6.4.0-dev.220

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
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as r } from "vue";
2
- import { _ as c } from "./index-CGxSVJwB.js";
2
+ import { _ as c } from "./index-Ce8elCTc.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-CGxSVJwB.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-Ce8elCTc.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.218",
3
+ "version": "6.4.0-dev.220",
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.218",
9
- "@das-fed/upf-utils": "6.4.0-dev.218",
10
- "@das-fed/upf-web": "6.4.0-dev.218",
11
- "@das-fed/upf-web-components": "6.4.0-dev.218",
8
+ "@das-fed/upf-ui": "6.4.0-dev.220",
9
+ "@das-fed/upf-utils": "6.4.0-dev.220",
10
+ "@das-fed/upf-web": "6.4.0-dev.220",
11
+ "@das-fed/upf-web-components": "6.4.0-dev.220",
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.218",
23
+ "@das-fed/upf-cli": "6.4.0-dev.220",
24
24
  "@types/crypto-js": "^4.2.2",
25
25
  "@types/lodash": "^4.14.194",
26
26
  "@types/lodash-es": "^4.17.12",
@@ -12,7 +12,8 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
12
12
  var vue = require('vue');
13
13
  var commonTools = require('@das-fed/upf-utils/common-tools');
14
14
  var config = require('@das-fed/upf-utils/config');
15
- var x = {
15
+ var i18nAdapter = require('@das-fed/upf-utils/create-api-service/i18n-adapter');
16
+ var G = {
16
17
  loaded: {},
17
18
  isLoaded: function isLoaded(t, e) {
18
19
  return !!(this.loaded[t] && this.loaded[t][e]);
@@ -24,14 +25,14 @@ var x = {
24
25
  this.loaded[t] && (delete this.loaded[t][e], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
25
26
  }
26
27
  },
27
- U = /*#__PURE__*/function () {
28
+ C = /*#__PURE__*/function () {
28
29
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(t, e) {
29
30
  var _ref2, _ref3, _ref4;
30
- var m, u, g, o, a, s, n, r, l, _t;
31
+ var m, p, g, o, a, s, n, r, d, _t;
31
32
  return _regenerator().w(function (_context) {
32
33
  while (1) switch (_context.p = _context.n) {
33
34
  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;
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;
35
36
  r = "/oss/resource/";
36
37
  _context.p = 1;
37
38
  _context.n = 2;
@@ -44,14 +45,14 @@ var x = {
44
45
  isDasUI: n
45
46
  });
46
47
  case 2:
47
- l = _context.v;
48
- if (!(!l || !(l != null && l.frontEnd))) {
48
+ d = _context.v;
49
+ if (!(!d || !(d != null && d.frontEnd))) {
49
50
  _context.n = 3;
50
51
  break;
51
52
  }
52
53
  throw new Error("Failed to fetch i18n data");
53
54
  case 3:
54
- return _context.a(2, l);
55
+ return _context.a(2, d);
55
56
  case 4:
56
57
  _context.p = 4;
57
58
  _t = _context.v;
@@ -61,21 +62,21 @@ var x = {
61
62
  }
62
63
  }, _callee, null, [[1, 4]]);
63
64
  }));
64
- return function U(_x, _x2) {
65
+ return function C(_x, _x2) {
65
66
  return _ref.apply(this, arguments);
66
67
  };
67
68
  }(),
68
- C = "language",
69
+ A = "language",
69
70
  i = vue.reactive({}),
70
71
  c = vue.reactive({}),
71
- d = vue.reactive({}),
72
+ f = vue.reactive({}),
72
73
  M = commonTools.getUrlParams(location.href, "lang") || "",
73
- O = M || window.localStorage.getItem(C) || window.navigator.language || "zh-CN",
74
- f = vue.ref(O),
75
- z = "dasI18n",
74
+ O = M || window.localStorage.getItem(A) || window.navigator.language || "zh-CN",
75
+ l = vue.ref(O),
76
+ v = "dasI18n",
76
77
  w = function w() {
77
78
  var t = document.documentElement;
78
- t && t.setAttribute("lang", f.value);
79
+ t && t.setAttribute("lang", l.value);
79
80
  },
80
81
  y = function y() {
81
82
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -88,7 +89,7 @@ var x = {
88
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]);
89
90
  }
90
91
  },
91
- A = function A() {
92
+ z = function z() {
92
93
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
93
94
  var e = arguments.length > 1 ? arguments[1] : undefined;
94
95
  var s;
@@ -96,24 +97,24 @@ var x = {
96
97
  a = !o;
97
98
  for (var n in t) if (o && !c[n] && (c[n] = t[n]), a) {
98
99
  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]);
100
+ r && (f[r] || (f[r] = {}), f[r][n] = t[n]), i[n] || (i[n] = t[n]);
100
101
  }
101
102
  },
102
- B = /*#__PURE__*/function () {
103
+ Y = /*#__PURE__*/function () {
103
104
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(t) {
104
105
  var e;
105
106
  return _regenerator().w(function (_context2) {
106
107
  while (1) switch (_context2.n) {
107
108
  case 0:
108
109
  w();
109
- e = window[z];
110
- e && A(e, "global");
110
+ e = window[v];
111
+ e && z(e, "global");
111
112
  case 1:
112
113
  return _context2.a(2);
113
114
  }
114
115
  }, _callee2);
115
116
  }));
116
- return function B(_x3) {
117
+ return function Y(_x3) {
117
118
  return _ref5.apply(this, arguments);
118
119
  };
119
120
  }(),
@@ -128,33 +129,39 @@ var x = {
128
129
  e[_key - 1] = arguments[_key];
129
130
  }
130
131
  return vue.computed(function () {
131
- var _d$framework, _d$o;
132
+ var _f$framework, _f$o;
132
133
  var o = R(location.pathname);
133
- var a = (_d$framework = d.framework) !== null && _d$framework !== void 0 ? _d$framework : {},
134
- s = (_d$o = d[o]) !== null && _d$o !== void 0 ? _d$o : {},
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 : {},
135
136
  n = i[t] || c[t] || a[t] || s[t] || t;
136
137
  if (n === t) return t;
137
138
  typeof n == "string" && (n = {
138
139
  "zh-CN": n
139
140
  });
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) {
142
- r && (r = r.replace("$".concat(u), m));
141
+ 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));
143
144
  }), r;
144
145
  });
145
146
  },
146
- v = k,
147
- F = function F(t) {
147
+ N = k,
148
+ S = function S(t) {
148
149
  for (var _len2 = arguments.length, e = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
149
150
  e[_key2 - 1] = arguments[_key2];
150
151
  }
151
- return v.apply(void 0, [t].concat(e)).value;
152
+ return N.apply(void 0, [t].concat(e)).value;
152
153
  },
153
- N = function N(t) {
154
- f.value = t, w();
155
- },
156
- G = function G() {
157
- return f;
154
+ P = function P(t) {
155
+ l.value = t, w();
156
+ };
157
+ i18nAdapter.setCreateApiServiceI18nAdapter({
158
+ t: S,
159
+ getLang: function getLang() {
160
+ return String(l.value || "");
161
+ }
162
+ });
163
+ var K = function K() {
164
+ return l;
158
165
  },
159
166
  E = {
160
167
  "en-US": {
@@ -314,12 +321,12 @@ var x = {
314
321
  }
315
322
  }
316
323
  };
317
- function Y(t, e) {
324
+ function $(t, e) {
318
325
  var a;
319
326
  var o = window.DATE_FORMAT_MAP;
320
327
  return o && o[t] && o[t][e] ? o[t][e] : ((a = window.DATE_FORMAT_MAP[t]) == null ? undefined : a[e]) || "YYYY-MM-DD";
321
328
  }
322
- var K = /*#__PURE__*/function () {
329
+ var H = /*#__PURE__*/function () {
323
330
  var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(t) {
324
331
  var e, o, _t2;
325
332
  return _regenerator().w(function (_context3) {
@@ -343,11 +350,11 @@ var K = /*#__PURE__*/function () {
343
350
  }
344
351
  }, _callee3, null, [[1, 4]]);
345
352
  }));
346
- return function K(_x4) {
353
+ return function H(_x4) {
347
354
  return _ref6.apply(this, arguments);
348
355
  };
349
356
  }(),
350
- $ = /*#__PURE__*/function () {
357
+ q = /*#__PURE__*/function () {
351
358
  var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
352
359
  var t,
353
360
  e,
@@ -361,12 +368,12 @@ var K = /*#__PURE__*/function () {
361
368
  e = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : "zh-CN";
362
369
  _context4.p = 1;
363
370
  _context4.n = 2;
364
- return U(t, e);
371
+ return C(t, e);
365
372
  case 2:
366
373
  o = _context4.v;
367
374
  o != null && o.frontEnd && _typeof(o.frontEnd) == "object" && Object.keys(o.frontEnd).length && t.forEach(function (a) {
368
375
  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);
376
+ }), o != null && o.dasUiEnd && _typeof(o.dasUiEnd) == "object" && Object.keys(o.dasUiEnd).length && y(_defineProperty({}, e, o.dasUiEnd)), P(e);
370
377
  _context4.n = 4;
371
378
  break;
372
379
  case 3:
@@ -377,22 +384,22 @@ var K = /*#__PURE__*/function () {
377
384
  }
378
385
  }, _callee4, null, [[1, 3]]);
379
386
  }));
380
- return function $() {
387
+ return function q() {
381
388
  return _ref7.apply(this, arguments);
382
389
  };
383
390
  }();
384
- exports.currentLang = f;
391
+ exports.currentLang = l;
385
392
  exports.customLangeData = i;
386
- exports.getDateFormat = Y;
393
+ exports.getDateFormat = $;
387
394
  exports.getI18nRule = k;
388
- exports.getLang = G;
389
- exports.i18n = v;
390
- exports.initI18n = B;
391
- exports.languageKey = C;
392
- exports.loadLocale = K;
393
- exports.microI18nStore = x;
394
- exports.registerMicroI18nData = $;
395
- exports.setI18nRule = A;
396
- exports.setLang = N;
395
+ exports.getLang = K;
396
+ exports.i18n = N;
397
+ exports.initI18n = Y;
398
+ exports.languageKey = A;
399
+ exports.loadLocale = H;
400
+ exports.microI18nStore = G;
401
+ exports.registerMicroI18nData = q;
402
+ exports.setI18nRule = z;
403
+ exports.setLang = P;
397
404
  exports.setLangRule = y;
398
- exports.t = F;
405
+ exports.t = S;
@@ -1,7 +1,8 @@
1
- import { reactive as p, ref as b, computed as j } from "vue";
1
+ import { reactive as u, ref as b, computed as j } from "vue";
2
2
  import { handleI18nData as I, getUrlParams as L } from "@das-fed/upf-utils/common-tools";
3
3
  import { getConfig as D } from "@das-fed/upf-utils/config";
4
- const x = {
4
+ import { setCreateApiServiceI18nAdapter as U } from "@das-fed/upf-utils/create-api-service/i18n-adapter";
5
+ const G = {
5
6
  loaded: {},
6
7
  isLoaded(t, e) {
7
8
  return !!(this.loaded[t] && this.loaded[t][e]);
@@ -12,12 +13,12 @@ const x = {
12
13
  markUnloaded(t, e) {
13
14
  this.loaded[t] && (delete this.loaded[t][e], Object.keys(this.loaded[t]).length === 0 && delete this.loaded[t]);
14
15
  }
15
- }, U = async (t, e) => {
16
- var m, u, g;
17
- const o = D() || {}, a = ((m = o.i18n) == null ? void 0 : m.fromOss) ?? !0, s = ((u = o.i18n) == null ? void 0 : u.isPullBack) ?? !1, n = ((g = o.i18n) == null ? void 0 : g.isDasUI) ?? !0;
16
+ }, C = async (t, e) => {
17
+ var m, p, g;
18
+ const o = D() || {}, 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;
18
19
  let r = "/oss/resource/";
19
20
  try {
20
- const l = await I({
21
+ const d = await I({
21
22
  baseUrl: a ? r : "/",
22
23
  currentLang: e,
23
24
  appName: t,
@@ -25,48 +26,50 @@ const x = {
25
26
  fallbackBaseUrl: "/",
26
27
  isDasUI: n
27
28
  });
28
- if (!l || !(l != null && l.frontEnd))
29
+ if (!d || !(d != null && d.frontEnd))
29
30
  throw new Error("Failed to fetch i18n data");
30
- return l;
31
+ return d;
31
32
  } catch (h) {
32
33
  throw new Error(`registerResources error: ${h}`);
33
34
  }
34
- }, C = "language", i = p({}), c = p({}), d = p({}), M = L(location.href, "lang") || "", O = M || window.localStorage.getItem(C) || window.navigator.language || "zh-CN", f = b(O), z = "dasI18n", w = () => {
35
+ }, A = "language", i = u({}), c = u({}), f = u({}), M = L(location.href, "lang") || "", O = M || window.localStorage.getItem(A) || window.navigator.language || "zh-CN", l = b(O), v = "dasI18n", w = () => {
35
36
  const t = document.documentElement;
36
- t && t.setAttribute("lang", f.value);
37
+ t && t.setAttribute("lang", l.value);
37
38
  }, y = (t = {}, e) => {
38
39
  const o = e === "global", a = !o, s = {};
39
40
  for (const n in t)
40
41
  for (const r in t[n])
41
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]);
42
- }, A = (t = {}, e) => {
43
+ }, z = (t = {}, e) => {
43
44
  var s;
44
45
  const o = e === "global", a = !o;
45
46
  for (const n in t)
46
47
  if (o && !c[n] && (c[n] = t[n]), a) {
47
48
  const r = (s = t[n]) != null && s._appCode ? t[n]._appCode.toLowerCase() : "";
48
- r && (d[r] || (d[r] = {}), d[r][n] = t[n]), i[n] || (i[n] = t[n]);
49
+ r && (f[r] || (f[r] = {}), f[r][n] = t[n]), i[n] || (i[n] = t[n]);
49
50
  }
50
- }, B = async (t) => {
51
+ }, Y = async (t) => {
51
52
  w();
52
- const e = window[z];
53
- e && A(e, "global");
53
+ const e = window[v];
54
+ e && z(e, "global");
54
55
  }, R = (t) => {
55
56
  let e = "";
56
57
  const o = /\/([^\/]+)\/([^\/]+)\//, a = t.match(o);
57
58
  return a && a.length >= 3 && (e = a[1] + "/" + a[2]), e ? e.toLowerCase() : "";
58
59
  }, k = (t, ...e) => j(() => {
59
60
  const o = R(location.pathname);
60
- let a = d.framework ?? {}, s = d[o] ?? {}, n = i[t] || c[t] || a[t] || s[t] || t;
61
+ let a = f.framework ?? {}, s = f[o] ?? {}, n = i[t] || c[t] || a[t] || s[t] || t;
61
62
  if (n === t) return t;
62
63
  typeof n == "string" && (n = { "zh-CN": n });
63
- let r = n[f.value];
64
- return f.value === "zh-CN" && n["zh-cn"] && !n["zh-CN"] && (r = n["zh-cn"]), e.map((m, u) => {
65
- r && (r = r.replace(`$${u}`, m));
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));
66
67
  }), r;
67
- }), v = k, F = (t, ...e) => v(t, ...e).value, N = (t) => {
68
- f.value = t, w();
69
- }, G = () => f, E = {
68
+ }), N = k, S = (t, ...e) => N(t, ...e).value, P = (t) => {
69
+ l.value = t, w();
70
+ };
71
+ U({ t: S, getLang: () => String(l.value || "") });
72
+ const K = () => l, E = {
70
73
  "en-US": { ant: () => import("ant-design-vue/es/locale/en_US"), dayjs: () => import("dayjs/locale/en") },
71
74
  "zh-CN": { ant: () => import("ant-design-vue/es/locale/zh_CN"), dayjs: () => import("dayjs/locale/zh-cn") },
72
75
  "zh-MO": { ant: () => import("ant-design-vue/es/locale/zh_TW"), dayjs: () => import("dayjs/locale/zh-tw") },
@@ -81,41 +84,41 @@ const x = {
81
84
  "nl-NL": { ant: () => import("ant-design-vue/es/locale/nl_NL"), dayjs: () => import("dayjs/locale/nl") },
82
85
  "tr-TR": { ant: () => import("ant-design-vue/es/locale/tr_TR"), dayjs: () => import("dayjs/locale/tr") }
83
86
  };
84
- function Y(t, e) {
87
+ function $(t, e) {
85
88
  var a;
86
89
  const o = window.DATE_FORMAT_MAP;
87
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";
88
91
  }
89
- const K = async (t) => {
92
+ const H = async (t) => {
90
93
  const e = E[t] || E["zh-CN"];
91
94
  try {
92
95
  const o = await e.ant();
93
96
  return await e.dayjs(), o.default;
94
97
  } catch {
95
98
  }
96
- }, $ = async (t = [], e = "zh-CN") => {
99
+ }, q = async (t = [], e = "zh-CN") => {
97
100
  try {
98
- const o = await U(t, e);
101
+ const o = await C(t, e);
99
102
  o != null && o.frontEnd && typeof o.frontEnd == "object" && Object.keys(o.frontEnd).length && t.forEach((a) => {
100
103
  o.frontEnd[a] && typeof o.frontEnd[a] == "object" && Object.keys(o.frontEnd[a]).length && y({ [e]: o.frontEnd[a] });
101
- }), o != null && o.dasUiEnd && typeof o.dasUiEnd == "object" && Object.keys(o.dasUiEnd).length && y({ [e]: o.dasUiEnd }), N(e);
104
+ }), o != null && o.dasUiEnd && typeof o.dasUiEnd == "object" && Object.keys(o.dasUiEnd).length && y({ [e]: o.dasUiEnd }), P(e);
102
105
  } catch {
103
106
  }
104
107
  };
105
108
  export {
106
- f as currentLang,
109
+ l as currentLang,
107
110
  i as customLangeData,
108
- Y as getDateFormat,
111
+ $ as getDateFormat,
109
112
  k as getI18nRule,
110
- G as getLang,
111
- v as i18n,
112
- B as initI18n,
113
- C as languageKey,
114
- K as loadLocale,
115
- x as microI18nStore,
116
- $ as registerMicroI18nData,
117
- A as setI18nRule,
118
- N as setLang,
113
+ K as getLang,
114
+ N as i18n,
115
+ Y as initI18n,
116
+ A as languageKey,
117
+ H as loadLocale,
118
+ G as microI18nStore,
119
+ q as registerMicroI18nData,
120
+ z as setI18nRule,
121
+ P as setLang,
119
122
  y as setLangRule,
120
- F as t
123
+ S as t
121
124
  };
Binary file