@das-fed/upf-web 6.4.0-dev.153 → 6.4.0-dev.154
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/{index-C-0tJ-Hi.js → index-B-tcO4IU.js} +1 -1
- package/index-B-tcO4IU.js.gz +0 -0
- package/{index-B4ANVb9Q.js → index-DKVGTpe2.js} +1091 -1089
- package/index-DKVGTpe2.js.gz +0 -0
- package/{index-CeHC-OKX.js → index-cKNp7fKq.js} +1 -1
- package/index.js +1 -1
- package/package.json +6 -6
- package/packages/i18n/index.js +44 -42
- package/packages/i18n/index.js.gz +0 -0
- package/types/i18n/index.d.ts +2 -1
- package/index-B4ANVb9Q.js.gz +0 -0
- package/index-C-0tJ-Hi.js.gz +0 -0
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as e, A as t, C as n, B as i, D as r, e as u, m as o, w as m, o as p, f as g, k as D, v as l, y as L, z as b, h as c, i as h, G as A, H as T, q as y, E as R, F as W, K as I, I as M, s as F, j as V, n as f, r as k, x as v, t as w } from "./index-
|
|
1
|
+
import { J as e, A as t, C as n, B as i, D as r, e as u, m as o, w as m, o as p, f as g, k as D, v as l, y as L, z as b, h as c, i as h, G as A, H as T, q as y, E as R, F as W, K as I, I as M, s as F, j as V, n as f, r as k, x as v, t as w } from "./index-DKVGTpe2.js";
|
|
2
2
|
export {
|
|
3
3
|
e as DasMainAppLayout,
|
|
4
4
|
t as DasWebLayout,
|
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.154",
|
|
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.154",
|
|
8
|
+
"@das-fed/upf-utils": "6.4.0-dev.154",
|
|
9
|
+
"@das-fed/upf-web": "6.4.0-dev.154",
|
|
10
|
+
"@das-fed/upf-web-components": "6.4.0-dev.154",
|
|
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.154",
|
|
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/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
|
|
1
|
+
import { reactive as w, ref as _, computed as s } from "vue";
|
|
2
|
+
import { handleI18nData as l } from "@das-fed/upf-utils/common-tools/handle-data";
|
|
3
|
+
const c = {
|
|
3
4
|
// 按钮
|
|
4
5
|
详情: { "zh-CN": "详情", en: "Details", _appCode: "framework" },
|
|
5
6
|
下载: { "zh-CN": "下载", en: "Download", _appCode: "framework" },
|
|
@@ -119,57 +120,58 @@ const _ = {
|
|
|
119
120
|
删除失败: { "zh-CN": "删除失败", en: "Deleted Failed", _appCode: "framework" },
|
|
120
121
|
操作成功: { "zh-CN": "操作成功", en: "Operated Successfully", _appCode: "framework" },
|
|
121
122
|
操作失败: { "zh-CN": "操作失败", en: "Operated Failed", _appCode: "framework" }
|
|
122
|
-
}, d =
|
|
123
|
+
}, d = w({}), f = w({}), t = w({});
|
|
123
124
|
var N;
|
|
124
|
-
const
|
|
125
|
-
const
|
|
125
|
+
const u = (N = navigator.language) != null && N.toLowerCase().startsWith("zh") ? "zh-CN" : "en", m = _(u), g = "dasI18n", z = () => {
|
|
126
|
+
const e = document.documentElement;
|
|
127
|
+
e && e.setAttribute("lang", m.value);
|
|
128
|
+
}, P = (e = {}, r) => {
|
|
129
|
+
const n = r === "global", p = !n, C = {};
|
|
126
130
|
for (const o in e)
|
|
127
131
|
for (const a in e[o])
|
|
128
|
-
|
|
132
|
+
C[a] || (C[a] = {}), C[a][o] = e[o][a] ?? "", n && (f[a] || (f[a] = {}), f[a][o] = C[a][o]), p && (d[a] || (d[a] = {}), d[a][o] = C[a][o]);
|
|
129
133
|
}, h = (e = {}, r) => {
|
|
130
|
-
var
|
|
131
|
-
const
|
|
134
|
+
var C;
|
|
135
|
+
const n = r === "global", p = !n;
|
|
132
136
|
for (const o in e)
|
|
133
|
-
if (
|
|
134
|
-
const a = (
|
|
135
|
-
a && (
|
|
137
|
+
if (n && !f[o] && (f[o] = e[o]), p) {
|
|
138
|
+
const a = (C = e[o]) != null && C._appCode ? e[o]._appCode.toLowerCase() : "";
|
|
139
|
+
a && (t[a] || (t[a] = {}), t[a][o] = e[o]), d[o] || (d[o] = e[o]);
|
|
136
140
|
}
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
const r =
|
|
140
|
-
r && r
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}), Object.values(n).filter((a) => !!a).flat().map((a) => h(a));
|
|
148
|
-
}, u = (e) => {
|
|
141
|
+
}, L = async (e) => {
|
|
142
|
+
z();
|
|
143
|
+
const r = window[g];
|
|
144
|
+
r && h(r, "global"), h(c);
|
|
145
|
+
{
|
|
146
|
+
let n = await l({ pathname: "front-end" });
|
|
147
|
+
P(n);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
}, v = (e) => {
|
|
149
151
|
let r = "";
|
|
150
|
-
const
|
|
151
|
-
return
|
|
152
|
-
},
|
|
153
|
-
const
|
|
154
|
-
let
|
|
152
|
+
const n = /\/([^\/]+)\/([^\/]+)\//, p = e.match(n);
|
|
153
|
+
return p && p.length >= 3 && (r = p[1] + "/" + p[2]), r ? r.toLowerCase() : "";
|
|
154
|
+
}, R = (e, ...r) => s(() => {
|
|
155
|
+
const n = v(location.pathname);
|
|
156
|
+
let p = t.framework ?? {}, C = t[n] ?? {}, o = f[e] || p[e] || C[e] || d[e] || e;
|
|
155
157
|
if (o === e) return e;
|
|
156
158
|
typeof o == "string" && (o = { "zh-CN": o });
|
|
157
|
-
let a = o[
|
|
158
|
-
return
|
|
159
|
-
a && (a = a.replace(`$${
|
|
159
|
+
let a = o[m.value];
|
|
160
|
+
return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (a = o["zh-cn"]), r.map((i, k) => {
|
|
161
|
+
a && (a = a.replace(`$${k}`, i));
|
|
160
162
|
}), a;
|
|
161
|
-
}),
|
|
162
|
-
|
|
163
|
-
},
|
|
163
|
+
}), D = R, A = (e, ...r) => D(e, ...r).value, E = (e) => {
|
|
164
|
+
m.value = e, z();
|
|
165
|
+
}, I = () => m;
|
|
164
166
|
export {
|
|
165
|
-
|
|
167
|
+
m as currentLang,
|
|
166
168
|
d as customLangeData,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
R as getI18nRule,
|
|
170
|
+
I as getLang,
|
|
171
|
+
D as i18n,
|
|
172
|
+
L as initI18n,
|
|
171
173
|
h as setI18nRule,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
E as setLang,
|
|
175
|
+
P as setLangRule,
|
|
176
|
+
A as t
|
|
175
177
|
};
|
|
Binary file
|
package/types/i18n/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type langType = 'zh-CN' | 'en';
|
|
1
2
|
declare const customLangeData: any;
|
|
2
3
|
declare const currentLang: import('vue').Ref<any, any>;
|
|
3
4
|
declare const setLangRule: (data?: any, type?: "global" | "custom") => void;
|
|
@@ -18,6 +19,6 @@ declare const i18n: (key: string, ...args: any[]) => import('vue').ComputedRef<s
|
|
|
18
19
|
* @returns string
|
|
19
20
|
*/
|
|
20
21
|
declare const t: (key: string, ...args: any) => string;
|
|
21
|
-
declare const setLang: (lang:
|
|
22
|
+
declare const setLang: (lang: langType) => void;
|
|
22
23
|
declare const getLang: () => import('vue').Ref<any, any>;
|
|
23
24
|
export { initI18n, setI18nRule, getI18nRule, i18n, t, setLang, getLang, currentLang, setLangRule, customLangeData };
|
package/index-B4ANVb9Q.js.gz
DELETED
|
Binary file
|
package/index-C-0tJ-Hi.js.gz
DELETED
|
Binary file
|