@das-fed/upf-web 6.4.0-dev.196 → 6.4.0-dev.198

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.
package/esm-map.json CHANGED
@@ -28,5 +28,6 @@
28
28
  "layoutData": "/packages/layout/index",
29
29
  "setLangRule": "/packages/i18n/index",
30
30
  "customLangeData": "/packages/i18n/index",
31
- "loadLocale": "/packages/i18n/index"
31
+ "loadLocale": "/packages/i18n/index",
32
+ "getDateFormat": "/packages/i18n/index"
32
33
  }
@@ -153,7 +153,13 @@ const Nt = (e) => {
153
153
  "pt-PT": { ant: () => import("ant-design-vue/es/locale/pt_PT"), dayjs: () => import("dayjs/locale/pt") },
154
154
  "nl-NL": { ant: () => import("ant-design-vue/es/locale/nl_NL"), dayjs: () => import("dayjs/locale/nl") },
155
155
  "tr-TR": { ant: () => import("ant-design-vue/es/locale/tr_TR"), dayjs: () => import("dayjs/locale/tr") }
156
- }, Bb = async (e) => {
156
+ };
157
+ function Bb(e, A) {
158
+ var v;
159
+ const f = window.DATE_FORMAT_MAP;
160
+ return f && f[e] && f[e][A] ? f[e][A] : ((v = window.DATE_FORMAT_MAP[e]) == null ? void 0 : v[A]) || "YYYY-MM-DD";
161
+ }
162
+ const kb = async (e) => {
157
163
  const A = n3[e] || n3["zh-CN"];
158
164
  try {
159
165
  const f = await A.ant();
@@ -209,7 +215,7 @@ const r3 = (e, A) => {
209
215
  }
210
216
  const n = `${a9}-${Je.value}`;
211
217
  document.body.classList.contains(n) || document.body.classList.add(n);
212
- }, kb = async (e) => {
218
+ }, Qb = async (e) => {
213
219
  var v, n;
214
220
  const A = window[yt];
215
221
  A && r3(A, "global");
@@ -218,12 +224,12 @@ const r3 = (e, A) => {
218
224
  var P;
219
225
  f = Object.assign(f, ((P = r.theme) == null ? void 0 : P.glob) || {});
220
226
  }), Object.values(f).filter((r) => !!r).flat().map((r) => r3(r));
221
- }, Qb = (e) => {
227
+ }, Yb = (e) => {
222
228
  document.body.classList.add(`${a9}-light`), e === "light" && document.body.classList.remove(`${a9}-${Je.value}`), Je.value = e, document.body.classList.add(`${a9}-${Je.value}`);
223
229
  }, Et = (e) => vA(() => {
224
230
  var A, f, v, n;
225
231
  return ((f = (A = d9.value) == null ? void 0 : A[Je.value]) == null ? void 0 : f[e]) || ((n = (v = z9.value) == null ? void 0 : v[Je.value]) == null ? void 0 : n[e]) || e;
226
- }), Yb = (e) => `var(${e})`, Gb = Et, qA = de({
232
+ }), Gb = (e) => `var(${e})`, Ub = Et, qA = de({
227
233
  visible: !1,
228
234
  theme: "default",
229
235
  logo: "",
@@ -851,7 +857,7 @@ const r3 = (e, A) => {
851
857
  ]);
852
858
  };
853
859
  }
854
- }), Ub = /* @__PURE__ */ ZA(fP, [["__scopeId", "data-v-cc197012"]]), vP = ["theme", "modelValue", "logoUrl", "config", "innerPagesConfig", "searchConfig", "projectTreeConfig", "userInfoConfig"], Jb = /* @__PURE__ */ aA({
860
+ }), Jb = /* @__PURE__ */ ZA(fP, [["__scopeId", "data-v-cc197012"]]), vP = ["theme", "modelValue", "logoUrl", "config", "innerPagesConfig", "searchConfig", "projectTreeConfig", "userInfoConfig"], hb = /* @__PURE__ */ aA({
855
861
  __name: "das-web-nav",
856
862
  setup(e) {
857
863
  const { nav: A } = De, f = vA(() => A.theme), v = vA(() => A.logo || ""), n = vA(() => A.activeItem || ""), r = vA(() => (A.items || []).filter((x) => x.fixed)), P = vA(() => (A.items || []).filter((x) => !x.fixed)), u = vA(() => {
@@ -931,7 +937,7 @@ const r3 = (e, A) => {
931
937
  "on:openAI": V
932
938
  }, null, 40, vP));
933
939
  }
934
- }), nP = ["theme", "modelValue", "data", "collapse", "fixedTopMenu", "subMenuAttrs"], hb = /* @__PURE__ */ aA({
940
+ }), nP = ["theme", "modelValue", "data", "collapse", "fixedTopMenu", "subMenuAttrs"], Fb = /* @__PURE__ */ aA({
935
941
  __name: "das-web-menu",
936
942
  props: {
937
943
  menuAttr: {}
@@ -956,7 +962,7 @@ const r3 = (e, A) => {
956
962
  "on:toggleCollapse": p
957
963
  }), null, 16, nP)) : $("v-if", !0);
958
964
  }
959
- }), rP = ["theme", "modelValue", "options"], Fb = /* @__PURE__ */ aA({
965
+ }), rP = ["theme", "modelValue", "options"], Sb = /* @__PURE__ */ aA({
960
966
  __name: "das-web-tabs",
961
967
  props: {
962
968
  tabsAttr: {}
@@ -1434,7 +1440,7 @@ const VP = ["src", "entry", "name"], NP = /* @__PURE__ */ aA({
1434
1440
  /* NEED_PATCH */
1435
1441
  ));
1436
1442
  }
1437
- }), oP = /* @__PURE__ */ ZA(jP, [["__scopeId", "data-v-3abdb1e9"]]), Sb = /* @__PURE__ */ aA({
1443
+ }), oP = /* @__PURE__ */ ZA(jP, [["__scopeId", "data-v-3abdb1e9"]]), Kb = /* @__PURE__ */ aA({
1438
1444
  __name: "das-main-app-layout",
1439
1445
  props: {
1440
1446
  transitionConfig: { default: () => {
@@ -1487,7 +1493,7 @@ const VP = ["src", "entry", "name"], NP = /* @__PURE__ */ aA({
1487
1493
  }, 300);
1488
1494
  }), (A, f) => null;
1489
1495
  }
1490
- }), ZP = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((f) => e.startsWith(f)) ? e : `/${e}`, Kb = (e, A) => {
1496
+ }), ZP = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((f) => e.startsWith(f)) ? e : `/${e}`, Cb = (e, A) => {
1491
1497
  if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
1492
1498
  window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (z3.value = e.microAppRouterPrefix), yA.value = (e.microApps || []).filter((n) => !!n.name).map((n) => ({ ...n, entry: ZP(n.entry || n.name) })), A == null || A.addRoute({
1493
1499
  name: "das-micro-app",
@@ -1512,7 +1518,7 @@ const VP = ["src", "entry", "name"], NP = /* @__PURE__ */ aA({
1512
1518
  const { cmd: r, isAutoCloseApp: P } = n.data || {};
1513
1519
  r === "reload" && (P !== void 0 && (window.__isAutoCloseApp = P), location.reload());
1514
1520
  });
1515
- }, Cb = (e, A) => {
1521
+ }, _b = (e, A) => {
1516
1522
  if (!(e != null && e.microAppName)) return;
1517
1523
  window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
1518
1524
  const f = "das-micro-app-ghost";
@@ -13833,13 +13839,13 @@ T("@das-fed/upf-web");
13833
13839
  const oc = [
13834
13840
  {
13835
13841
  path: _A,
13836
- component: () => import("./index-XKjfW9pa.js")
13842
+ component: () => import("./index-D7Yosv5R.js")
13837
13843
  },
13838
13844
  {
13839
13845
  path: An,
13840
- component: () => import("./index-C1EF_kgL.js")
13846
+ component: () => import("./index-DN3L_UYL.js")
13841
13847
  }
13842
- ], $b = {
13848
+ ], Aa = {
13843
13849
  routes: oc,
13844
13850
  Layout: Rc,
13845
13851
  data: {
@@ -13857,38 +13863,39 @@ export {
13857
13863
  Jb as C,
13858
13864
  hb as D,
13859
13865
  Fb as E,
13860
- dA as F,
13861
- De as G,
13862
- Kb as H,
13866
+ Sb as F,
13867
+ dA as G,
13868
+ De as H,
13863
13869
  Cb as I,
13864
- xA as J,
13865
- Sb as K,
13866
- $b as L,
13870
+ _b as J,
13871
+ xA as K,
13872
+ Kb as L,
13873
+ Aa as M,
13867
13874
  ZA as _,
13868
13875
  c7 as a,
13869
13876
  lv as b,
13870
13877
  Ce as c,
13871
13878
  t7 as d,
13872
13879
  wb as e,
13873
- Tt as f,
13880
+ Bb as f,
13874
13881
  cn as g,
13875
- Lt as h,
13882
+ Tt as h,
13876
13883
  Eb as i,
13877
- gb as j,
13878
- Mb as k,
13884
+ Lt as j,
13885
+ gb as k,
13879
13886
  NA as l,
13880
- s9 as m,
13881
- Wb as n,
13882
- Ge as o,
13887
+ Mb as m,
13888
+ s9 as n,
13889
+ Wb as o,
13883
13890
  te as p,
13884
- Bb as q,
13891
+ Ge as q,
13885
13892
  kb as r,
13886
13893
  ot as s,
13887
13894
  Ib as t,
13888
13895
  Ee as u,
13889
13896
  Qb as v,
13890
- Et as w,
13891
- Je as x,
13892
- r3 as y,
13893
- Yb as z
13897
+ Yb as w,
13898
+ Et as x,
13899
+ Je as y,
13900
+ r3 as z
13894
13901
  };
Binary file
@@ -6,7 +6,7 @@ import { DasSpin as x } from "@das-fed/upf-ui/packages/components/spin/index";
6
6
  import { getTabInfo as T } from "@das-fed/upf-utils/common-info";
7
7
  import { setShowLayout as b } from "@das-fed/upf-utils/common-tools";
8
8
  import { createService as E } from "@das-fed/upf-utils/create-api-service";
9
- import { u as L, p as P, a as u, c as f, b as q, l as B, g as K, d as M } from "./index-ujn3LSBO.js";
9
+ import { u as L, p as P, a as u, c as f, b as q, l as B, g as K, d as M } from "./index-Cwnxjz4B.js";
10
10
  const N = "v1", O = E(`/api/justauth/client/${N}`), V = O.get("/visitor/kingdee/auth/user/auth_code"), z = /* @__PURE__ */ k({
11
11
  __name: "index",
12
12
  setup(F) {
Binary file
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as r } from "vue";
2
- import { _ as c } from "./index-ujn3LSBO.js";
2
+ import { _ as c } from "./index-Cwnxjz4B.js";
3
3
  const o = {};
4
4
  function t(n, _) {
5
5
  return e(), r("div");
package/index.js CHANGED
@@ -1,33 +1,34 @@
1
- import { K as e, B as t, D as n, C as i, E as r, e as o, m as u, x as m, o as p, f as g, k as l, w as D, z as L, A as c, h as b, i as h, H as A, I as T, r as y, F as R, G as W, q as I, L as M, J as F, s as V, j as d, n as f, v as k, y as v, t as w } from "./index-ujn3LSBO.js";
1
+ import { L as s, C as t, E as n, D as r, F as i, e as o, n as u, y as m, q as g, f as p, h as l, m as D, x as L, A as c, B as b, j as h, i as A, I as T, J as y, v as M, G as R, H as W, r as F, M as I, K as V, s as d, k as f, o as k, w as v, z as w, t as x } from "./index-Cwnxjz4B.js";
2
2
  export {
3
- e as DasMainAppLayout,
3
+ s as DasMainAppLayout,
4
4
  t as DasWebLayout,
5
5
  n as DasWebMenu,
6
- i as DasWebNav,
7
- r as DasWebTabs,
6
+ r as DasWebNav,
7
+ i as DasWebTabs,
8
8
  o as createDasWebApp,
9
9
  u as currentLang,
10
10
  m as currentTheme,
11
- p as customLangeData,
12
- g as getI18nRule,
13
- l as getLang,
14
- D as getThemeRule,
15
- L as getVar,
16
- c as getVarValue,
17
- b as i18n,
18
- h as initI18n,
19
- A as initMainApp,
20
- T as initMicroApp,
21
- y as initTheme,
11
+ g as customLangeData,
12
+ p as getDateFormat,
13
+ l as getI18nRule,
14
+ D as getLang,
15
+ L as getThemeRule,
16
+ c as getVar,
17
+ b as getVarValue,
18
+ h as i18n,
19
+ A as initI18n,
20
+ T as initMainApp,
21
+ y as initMicroApp,
22
+ M as initTheme,
22
23
  R as layout,
23
24
  W as layoutData,
24
- I as loadLocale,
25
- M as mainAppFramework,
26
- F as microFrontend,
27
- V as setI18nRule,
28
- d as setLang,
29
- f as setLangRule,
30
- k as setTheme,
31
- v as setThemeRule,
32
- w as t
25
+ F as loadLocale,
26
+ I as mainAppFramework,
27
+ V as microFrontend,
28
+ d as setI18nRule,
29
+ f as setLang,
30
+ k as setLangRule,
31
+ v as setTheme,
32
+ w as setThemeRule,
33
+ x as t
33
34
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@das-fed/upf-web",
3
- "version": "6.4.0-dev.196",
3
+ "version": "6.4.0-dev.198",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@das-fed/upf-ui": "6.4.0-dev.196",
8
- "@das-fed/upf-utils": "6.4.0-dev.196",
9
- "@das-fed/upf-web": "6.4.0-dev.196",
10
- "@das-fed/upf-web-components": "6.4.0-dev.196",
7
+ "@das-fed/upf-ui": "6.4.0-dev.198",
8
+ "@das-fed/upf-utils": "6.4.0-dev.198",
9
+ "@das-fed/upf-web": "6.4.0-dev.198",
10
+ "@das-fed/upf-web-components": "6.4.0-dev.198",
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/upf-cli": "6.4.0-dev.196",
22
+ "@das-fed/upf-cli": "6.4.0-dev.198",
23
23
  "@types/crypto-js": "^4.2.2",
24
24
  "@types/lodash": "^4.14.194",
25
25
  "@types/lodash-es": "^4.17.12",
@@ -8,94 +8,94 @@ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.
8
8
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
9
9
  var vue = require('vue');
10
10
  var commonTools = require('@das-fed/upf-utils/common-tools');
11
- var i = vue.reactive({}),
11
+ var s = vue.reactive({}),
12
12
  c = vue.reactive({}),
13
13
  l = vue.reactive({}),
14
14
  p = commonTools.getUrlParams(location.href, "uiCulture") || {},
15
- y = (p == null ? undefined : p.uiCulture) || window.localStorage.getItem("language") || window.navigator.language || "zh-CN",
16
- m = vue.ref(y),
17
- w = "dasI18n",
15
+ j = (p == null ? undefined : p.uiCulture) || window.localStorage.getItem("language") || window.navigator.language || "zh-CN",
16
+ m = vue.ref(j),
17
+ D = "dasI18n",
18
18
  g = function g() {
19
19
  var t = document.documentElement;
20
20
  t && t.setAttribute("lang", m.value);
21
21
  },
22
- N = function N() {
22
+ M = function M() {
23
23
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
24
24
  var a = arguments.length > 1 ? arguments[1] : undefined;
25
25
  var r = a === "global",
26
26
  e = !r,
27
- s = {};
27
+ i = {};
28
28
  for (var o in t) for (var n in t[o]) {
29
29
  var _t$o$n;
30
- s[n] || (s[n] = {}), s[n][o] = (_t$o$n = t[o][n]) !== null && _t$o$n !== void 0 ? _t$o$n : "", r && (c[n] || (c[n] = {}), c[n][o] = s[n][o]), e && (i[n] || (i[n] = {}), i[n][o] = s[n][o]);
30
+ i[n] || (i[n] = {}), i[n][o] = (_t$o$n = t[o][n]) !== null && _t$o$n !== void 0 ? _t$o$n : "", r && (c[n] || (c[n] = {}), c[n][o] = i[n][o]), e && (s[n] || (s[n] = {}), s[n][o] = i[n][o]);
31
31
  }
32
32
  },
33
- b = function b() {
33
+ y = function y() {
34
34
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35
35
  var a = arguments.length > 1 ? arguments[1] : undefined;
36
- var s;
36
+ var i;
37
37
  var r = a === "global",
38
38
  e = !r;
39
39
  for (var o in t) if (r && !c[o] && (c[o] = t[o]), e) {
40
- var n = (s = t[o]) != null && s._appCode ? t[o]._appCode.toLowerCase() : "";
41
- n && (l[n] || (l[n] = {}), l[n][o] = t[o]), i[o] || (i[o] = t[o]);
40
+ var n = (i = t[o]) != null && i._appCode ? t[o]._appCode.toLowerCase() : "";
41
+ n && (l[n] || (l[n] = {}), l[n][o] = t[o]), s[o] || (s[o] = t[o]);
42
42
  }
43
43
  },
44
- R = /*#__PURE__*/function () {
44
+ v = /*#__PURE__*/function () {
45
45
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(t) {
46
46
  var a;
47
47
  return _regenerator().w(function (_context) {
48
48
  while (1) switch (_context.n) {
49
49
  case 0:
50
50
  g();
51
- a = window[w];
52
- a && b(a, "global");
51
+ a = window[D];
52
+ a && y(a, "global");
53
53
  case 1:
54
54
  return _context.a(2);
55
55
  }
56
56
  }, _callee);
57
57
  }));
58
- return function R(_x) {
58
+ return function v(_x) {
59
59
  return _ref.apply(this, arguments);
60
60
  };
61
61
  }(),
62
- I = function I(t) {
62
+ b = function b(t) {
63
63
  var a = "";
64
64
  var r = /\/([^\/]+)\/([^\/]+)\//,
65
65
  e = t.match(r);
66
66
  return e && e.length >= 3 && (a = e[1] + "/" + e[2]), a ? a.toLowerCase() : "";
67
67
  },
68
- z = function z(t) {
68
+ A = function A(t) {
69
69
  for (var _len = arguments.length, a = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
70
70
  a[_key - 1] = arguments[_key];
71
71
  }
72
72
  return vue.computed(function () {
73
73
  var _l$framework, _l$r;
74
- var r = I(location.pathname);
74
+ var r = b(location.pathname);
75
75
  var e = (_l$framework = l.framework) !== null && _l$framework !== void 0 ? _l$framework : {},
76
- s = (_l$r = l[r]) !== null && _l$r !== void 0 ? _l$r : {},
77
- o = i[t] || c[t] || e[t] || s[t] || t;
76
+ i = (_l$r = l[r]) !== null && _l$r !== void 0 ? _l$r : {},
77
+ o = s[t] || c[t] || e[t] || i[t] || t;
78
78
  if (o === t) return t;
79
79
  typeof o == "string" && (o = {
80
80
  "zh-CN": o
81
81
  });
82
82
  var n = o[m.value];
83
- return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (n = o["zh-cn"]), a.map(function (d, C) {
84
- n && (n = n.replace("$".concat(C), d));
83
+ return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (n = o["zh-cn"]), a.map(function (d, w) {
84
+ n && (n = n.replace("$".concat(w), d));
85
85
  }), n;
86
86
  });
87
87
  },
88
- D = z,
89
- x = function x(t) {
88
+ I = A,
89
+ R = function R(t) {
90
90
  for (var _len2 = arguments.length, a = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
91
91
  a[_key2 - 1] = arguments[_key2];
92
92
  }
93
- return D.apply(void 0, [t].concat(a)).value;
93
+ return I.apply(void 0, [t].concat(a)).value;
94
94
  },
95
- S = function S(t) {
95
+ N = function N(t) {
96
96
  m.value = t, g();
97
97
  },
98
- A = function A() {
98
+ _ = function _() {
99
99
  return m;
100
100
  },
101
101
  f = {
@@ -255,43 +255,49 @@ var i = vue.reactive({}),
255
255
  });
256
256
  }
257
257
  }
258
- },
259
- G = /*#__PURE__*/function () {
260
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(t) {
261
- var a, r, _t;
262
- return _regenerator().w(function (_context2) {
263
- while (1) switch (_context2.p = _context2.n) {
264
- case 0:
265
- a = f[t] || f["zh-CN"];
266
- _context2.p = 1;
267
- _context2.n = 2;
268
- return a.ant();
269
- case 2:
270
- r = _context2.v;
271
- _context2.n = 3;
272
- return a.dayjs();
273
- case 3:
274
- return _context2.a(2, r["default"]);
275
- case 4:
276
- _context2.p = 4;
277
- _t = _context2.v;
278
- case 5:
279
- return _context2.a(2);
280
- }
281
- }, _callee2, null, [[1, 4]]);
282
- }));
283
- return function G(_x2) {
284
- return _ref2.apply(this, arguments);
285
- };
286
- }();
258
+ };
259
+ function T(t, a) {
260
+ var e;
261
+ var r = window.DATE_FORMAT_MAP;
262
+ return r && r[t] && r[t][a] ? r[t][a] : ((e = window.DATE_FORMAT_MAP[t]) == null ? undefined : e[a]) || "YYYY-MM-DD";
263
+ }
264
+ var x = /*#__PURE__*/function () {
265
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(t) {
266
+ var a, r, _t;
267
+ return _regenerator().w(function (_context2) {
268
+ while (1) switch (_context2.p = _context2.n) {
269
+ case 0:
270
+ a = f[t] || f["zh-CN"];
271
+ _context2.p = 1;
272
+ _context2.n = 2;
273
+ return a.ant();
274
+ case 2:
275
+ r = _context2.v;
276
+ _context2.n = 3;
277
+ return a.dayjs();
278
+ case 3:
279
+ return _context2.a(2, r["default"]);
280
+ case 4:
281
+ _context2.p = 4;
282
+ _t = _context2.v;
283
+ case 5:
284
+ return _context2.a(2);
285
+ }
286
+ }, _callee2, null, [[1, 4]]);
287
+ }));
288
+ return function x(_x2) {
289
+ return _ref2.apply(this, arguments);
290
+ };
291
+ }();
287
292
  exports.currentLang = m;
288
- exports.customLangeData = i;
289
- exports.getI18nRule = z;
290
- exports.getLang = A;
291
- exports.i18n = D;
292
- exports.initI18n = R;
293
- exports.loadLocale = G;
294
- exports.setI18nRule = b;
295
- exports.setLang = S;
296
- exports.setLangRule = N;
297
- exports.t = x;
293
+ exports.customLangeData = s;
294
+ exports.getDateFormat = T;
295
+ exports.getI18nRule = A;
296
+ exports.getLang = _;
297
+ exports.i18n = I;
298
+ exports.initI18n = v;
299
+ exports.loadLocale = x;
300
+ exports.setI18nRule = y;
301
+ exports.setLang = N;
302
+ exports.setLangRule = M;
303
+ exports.t = R;
@@ -1,41 +1,41 @@
1
- import { reactive as u, ref as L, computed as h } from "vue";
2
- import { getUrlParams as j } from "@das-fed/upf-utils/common-tools";
3
- const i = u({}), c = u({}), l = u({}), p = j(location.href, "uiCulture") || {}, y = (p == null ? void 0 : p.uiCulture) || window.localStorage.getItem("language") || window.navigator.language || "zh-CN", m = L(y), w = "dasI18n", g = () => {
1
+ import { reactive as u, ref as C, computed as L } from "vue";
2
+ import { getUrlParams as h } from "@das-fed/upf-utils/common-tools";
3
+ const s = u({}), c = u({}), l = u({}), p = h(location.href, "uiCulture") || {}, j = (p == null ? void 0 : p.uiCulture) || window.localStorage.getItem("language") || window.navigator.language || "zh-CN", m = C(j), D = "dasI18n", g = () => {
4
4
  const t = document.documentElement;
5
5
  t && t.setAttribute("lang", m.value);
6
- }, N = (t = {}, a) => {
7
- const r = a === "global", e = !r, s = {};
6
+ }, M = (t = {}, a) => {
7
+ const r = a === "global", e = !r, i = {};
8
8
  for (const o in t)
9
9
  for (const n in t[o])
10
- s[n] || (s[n] = {}), s[n][o] = t[o][n] ?? "", r && (c[n] || (c[n] = {}), c[n][o] = s[n][o]), e && (i[n] || (i[n] = {}), i[n][o] = s[n][o]);
11
- }, b = (t = {}, a) => {
12
- var s;
10
+ i[n] || (i[n] = {}), i[n][o] = t[o][n] ?? "", r && (c[n] || (c[n] = {}), c[n][o] = i[n][o]), e && (s[n] || (s[n] = {}), s[n][o] = i[n][o]);
11
+ }, y = (t = {}, a) => {
12
+ var i;
13
13
  const r = a === "global", e = !r;
14
14
  for (const o in t)
15
15
  if (r && !c[o] && (c[o] = t[o]), e) {
16
- const n = (s = t[o]) != null && s._appCode ? t[o]._appCode.toLowerCase() : "";
17
- n && (l[n] || (l[n] = {}), l[n][o] = t[o]), i[o] || (i[o] = t[o]);
16
+ const n = (i = t[o]) != null && i._appCode ? t[o]._appCode.toLowerCase() : "";
17
+ n && (l[n] || (l[n] = {}), l[n][o] = t[o]), s[o] || (s[o] = t[o]);
18
18
  }
19
- }, R = async (t) => {
19
+ }, v = async (t) => {
20
20
  g();
21
- const a = window[w];
22
- a && b(a, "global");
23
- }, I = (t) => {
21
+ const a = window[D];
22
+ a && y(a, "global");
23
+ }, b = (t) => {
24
24
  let a = "";
25
25
  const r = /\/([^\/]+)\/([^\/]+)\//, e = t.match(r);
26
26
  return e && e.length >= 3 && (a = e[1] + "/" + e[2]), a ? a.toLowerCase() : "";
27
- }, z = (t, ...a) => h(() => {
28
- const r = I(location.pathname);
29
- let e = l.framework ?? {}, s = l[r] ?? {}, o = i[t] || c[t] || e[t] || s[t] || t;
27
+ }, A = (t, ...a) => L(() => {
28
+ const r = b(location.pathname);
29
+ let e = l.framework ?? {}, i = l[r] ?? {}, o = s[t] || c[t] || e[t] || i[t] || t;
30
30
  if (o === t) return t;
31
31
  typeof o == "string" && (o = { "zh-CN": o });
32
32
  let n = o[m.value];
33
- return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (n = o["zh-cn"]), a.map((d, C) => {
34
- n && (n = n.replace(`$${C}`, d));
33
+ return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (n = o["zh-cn"]), a.map((d, w) => {
34
+ n && (n = n.replace(`$${w}`, d));
35
35
  }), n;
36
- }), D = z, x = (t, ...a) => D(t, ...a).value, S = (t) => {
36
+ }), I = A, R = (t, ...a) => I(t, ...a).value, N = (t) => {
37
37
  m.value = t, g();
38
- }, A = () => m, f = {
38
+ }, _ = () => m, f = {
39
39
  "en-US": { ant: () => import("ant-design-vue/es/locale/en_US"), dayjs: () => import("dayjs/locale/en") },
40
40
  "zh-CN": { ant: () => import("ant-design-vue/es/locale/zh_CN"), dayjs: () => import("dayjs/locale/zh-cn") },
41
41
  "zh-MO": { ant: () => import("ant-design-vue/es/locale/zh_TW"), dayjs: () => import("dayjs/locale/zh-tw") },
@@ -49,7 +49,13 @@ const i = u({}), c = u({}), l = u({}), p = j(location.href, "uiCulture") || {},
49
49
  "pt-PT": { ant: () => import("ant-design-vue/es/locale/pt_PT"), dayjs: () => import("dayjs/locale/pt") },
50
50
  "nl-NL": { ant: () => import("ant-design-vue/es/locale/nl_NL"), dayjs: () => import("dayjs/locale/nl") },
51
51
  "tr-TR": { ant: () => import("ant-design-vue/es/locale/tr_TR"), dayjs: () => import("dayjs/locale/tr") }
52
- }, G = async (t) => {
52
+ };
53
+ function T(t, a) {
54
+ var e;
55
+ const r = window.DATE_FORMAT_MAP;
56
+ return r && r[t] && r[t][a] ? r[t][a] : ((e = window.DATE_FORMAT_MAP[t]) == null ? void 0 : e[a]) || "YYYY-MM-DD";
57
+ }
58
+ const x = async (t) => {
53
59
  const a = f[t] || f["zh-CN"];
54
60
  try {
55
61
  const r = await a.ant();
@@ -59,14 +65,15 @@ const i = u({}), c = u({}), l = u({}), p = j(location.href, "uiCulture") || {},
59
65
  };
60
66
  export {
61
67
  m as currentLang,
62
- i as customLangeData,
63
- z as getI18nRule,
64
- A as getLang,
65
- D as i18n,
66
- R as initI18n,
67
- G as loadLocale,
68
- b as setI18nRule,
69
- S as setLang,
70
- N as setLangRule,
71
- x as t
68
+ s as customLangeData,
69
+ T as getDateFormat,
70
+ A as getI18nRule,
71
+ _ as getLang,
72
+ I as i18n,
73
+ v as initI18n,
74
+ x as loadLocale,
75
+ y as setI18nRule,
76
+ N as setLang,
77
+ M as setLangRule,
78
+ R as t
72
79
  };
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/style.css.gz CHANGED
Binary file
@@ -21,5 +21,6 @@ declare const i18n: (key: string, ...args: any[]) => import('vue').ComputedRef<s
21
21
  declare const t: (key: string, ...args: any) => string;
22
22
  declare const setLang: (lang: langType) => void;
23
23
  declare const getLang: () => import('vue').Ref<any, any>;
24
+ export declare function getDateFormat(type: 'month' | 'date' | 'datetime' | 'time', lang: string): string;
24
25
  declare const loadLocale: (lang: string) => unknown;
25
26
  export { initI18n, setI18nRule, getI18nRule, i18n, t, setLang, getLang, currentLang, setLangRule, customLangeData, loadLocale };
Binary file
Binary file