@das-fed/upf-web 6.4.0-dev.197 → 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/es5.js +5 -5
- package/esm-map.json +2 -1
- package/{index-ujn3LSBO.js → index-Cwnxjz4B.js} +38 -31
- package/index-Cwnxjz4B.js.gz +0 -0
- package/{index-XKjfW9pa.js → index-D7Yosv5R.js} +1 -1
- package/index-D7Yosv5R.js.gz +0 -0
- package/{index-C1EF_kgL.js → index-DN3L_UYL.js} +1 -1
- package/index.js +25 -24
- package/package.json +6 -6
- package/packages/i18n/es5.js +72 -66
- package/packages/i18n/index.js +39 -32
- package/packages/i18n/index.js.gz +0 -0
- package/types/i18n/index.d.ts +1 -0
- package/index-XKjfW9pa.js.gz +0 -0
- package/index-ujn3LSBO.js.gz +0 -0
package/esm-map.json
CHANGED
|
@@ -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
|
-
}
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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"],
|
|
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"],
|
|
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"]]),
|
|
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}`,
|
|
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
|
-
},
|
|
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-
|
|
13842
|
+
component: () => import("./index-D7Yosv5R.js")
|
|
13837
13843
|
},
|
|
13838
13844
|
{
|
|
13839
13845
|
path: An,
|
|
13840
|
-
component: () => import("./index-
|
|
13846
|
+
component: () => import("./index-DN3L_UYL.js")
|
|
13841
13847
|
}
|
|
13842
|
-
],
|
|
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
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13866
|
+
Sb as F,
|
|
13867
|
+
dA as G,
|
|
13868
|
+
De as H,
|
|
13863
13869
|
Cb as I,
|
|
13864
|
-
|
|
13865
|
-
|
|
13866
|
-
|
|
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
|
-
|
|
13880
|
+
Bb as f,
|
|
13874
13881
|
cn as g,
|
|
13875
|
-
|
|
13882
|
+
Tt as h,
|
|
13876
13883
|
Eb as i,
|
|
13877
|
-
|
|
13878
|
-
|
|
13884
|
+
Lt as j,
|
|
13885
|
+
gb as k,
|
|
13879
13886
|
NA as l,
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
|
|
13887
|
+
Mb as m,
|
|
13888
|
+
s9 as n,
|
|
13889
|
+
Wb as o,
|
|
13883
13890
|
te as p,
|
|
13884
|
-
|
|
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
|
-
|
|
13891
|
-
|
|
13892
|
-
|
|
13893
|
-
|
|
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-
|
|
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
|
package/index.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
3
|
+
s as DasMainAppLayout,
|
|
4
4
|
t as DasWebLayout,
|
|
5
5
|
n as DasWebMenu,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
r as DasWebNav,
|
|
7
|
+
i as DasWebTabs,
|
|
8
8
|
o as createDasWebApp,
|
|
9
9
|
u as currentLang,
|
|
10
10
|
m as currentTheme,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
l as
|
|
14
|
-
D as
|
|
15
|
-
L as
|
|
16
|
-
c as
|
|
17
|
-
b as
|
|
18
|
-
h as
|
|
19
|
-
A as
|
|
20
|
-
T as
|
|
21
|
-
y as
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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.
|
|
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.
|
|
8
|
-
"@das-fed/upf-utils": "6.4.0-dev.
|
|
9
|
-
"@das-fed/upf-web": "6.4.0-dev.
|
|
10
|
-
"@das-fed/upf-web-components": "6.4.0-dev.
|
|
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.
|
|
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",
|
package/packages/i18n/es5.js
CHANGED
|
@@ -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
|
|
11
|
+
var s = vue.reactive({}),
|
|
12
12
|
c = vue.reactive({}),
|
|
13
13
|
l = vue.reactive({}),
|
|
14
14
|
p = commonTools.getUrlParams(location.href, "uiCulture") || {},
|
|
15
|
-
|
|
16
|
-
m = vue.ref(
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
+
i = {};
|
|
28
28
|
for (var o in t) for (var n in t[o]) {
|
|
29
29
|
var _t$o$n;
|
|
30
|
-
|
|
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
|
-
|
|
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
|
|
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 = (
|
|
41
|
-
n && (l[n] || (l[n] = {}), l[n][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
|
-
|
|
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[
|
|
52
|
-
a &&
|
|
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
|
|
58
|
+
return function v(_x) {
|
|
59
59
|
return _ref.apply(this, arguments);
|
|
60
60
|
};
|
|
61
61
|
}(),
|
|
62
|
-
|
|
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
|
-
|
|
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 =
|
|
74
|
+
var r = b(location.pathname);
|
|
75
75
|
var e = (_l$framework = l.framework) !== null && _l$framework !== void 0 ? _l$framework : {},
|
|
76
|
-
|
|
77
|
-
o =
|
|
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,
|
|
84
|
-
n && (n = n.replace("$".concat(
|
|
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
|
-
|
|
89
|
-
|
|
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
|
|
93
|
+
return I.apply(void 0, [t].concat(a)).value;
|
|
94
94
|
},
|
|
95
|
-
|
|
95
|
+
N = function N(t) {
|
|
96
96
|
m.value = t, g();
|
|
97
97
|
},
|
|
98
|
-
|
|
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
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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 =
|
|
289
|
-
exports.
|
|
290
|
-
exports.
|
|
291
|
-
exports.
|
|
292
|
-
exports.
|
|
293
|
-
exports.
|
|
294
|
-
exports.
|
|
295
|
-
exports.
|
|
296
|
-
exports.
|
|
297
|
-
exports.
|
|
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;
|
package/packages/i18n/index.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { reactive as u, ref as
|
|
2
|
-
import { getUrlParams as
|
|
3
|
-
const
|
|
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
|
-
},
|
|
7
|
-
const r = a === "global", e = !r,
|
|
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
|
-
|
|
11
|
-
},
|
|
12
|
-
var
|
|
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 = (
|
|
17
|
-
n && (l[n] || (l[n] = {}), l[n][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
|
-
},
|
|
19
|
+
}, v = async (t) => {
|
|
20
20
|
g();
|
|
21
|
-
const a = window[
|
|
22
|
-
a &&
|
|
23
|
-
},
|
|
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
|
-
},
|
|
28
|
-
const r =
|
|
29
|
-
let e = l.framework ?? {},
|
|
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,
|
|
34
|
-
n && (n = n.replace(`$${
|
|
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
|
-
}),
|
|
36
|
+
}), I = A, R = (t, ...a) => I(t, ...a).value, N = (t) => {
|
|
37
37
|
m.value = t, g();
|
|
38
|
-
},
|
|
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
|
-
}
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
A as
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
N as
|
|
71
|
-
|
|
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
|
package/types/i18n/index.d.ts
CHANGED
|
@@ -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 };
|
package/index-XKjfW9pa.js.gz
DELETED
|
Binary file
|
package/index-ujn3LSBO.js.gz
DELETED
|
Binary file
|