@das-fed/upf-utils 6.4.0-dev.168 → 6.4.0-dev.170
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/api-services/modules/app-manage/index.js +836 -818
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +818 -836
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +818 -836
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +950 -932
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +818 -836
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +630 -634
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +818 -836
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +818 -836
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +836 -818
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +836 -818
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +820 -838
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +820 -838
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/common-tools/handle-data/index.d.ts +1 -2
- package/common-tools/handle-data/index.js +38 -70
- package/common-tools/handle-data/index.js.gz +0 -0
- package/esm-map.json +1 -2
- package/package.json +4 -4
|
Binary file
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* @returns
|
|
5
5
|
*/
|
|
6
6
|
export declare const isEmpty: (value: any) => boolean;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const getCurrentSysLang: {};
|
|
7
|
+
export declare const isCurrentLangInSysLang: (lang: string) => any;
|
|
9
8
|
/**
|
|
10
9
|
* 处理多语言在打包时的数据
|
|
11
10
|
* @param opt
|
|
@@ -1,71 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"ru-RU",
|
|
8
|
-
"sv-SE",
|
|
9
|
-
"fr-FR",
|
|
10
|
-
"de-DE",
|
|
11
|
-
"ar-SA",
|
|
12
|
-
"es-ES",
|
|
13
|
-
"it-IT",
|
|
14
|
-
"pt-PT",
|
|
15
|
-
"nl-NL",
|
|
16
|
-
"vi-VN",
|
|
17
|
-
"tr-TR"
|
|
18
|
-
], u = {
|
|
19
|
-
3: "zh-HK",
|
|
20
|
-
4: "zh-TW",
|
|
21
|
-
6: "ru-RU",
|
|
22
|
-
7: "sv-SE",
|
|
23
|
-
8: "fr-FR",
|
|
24
|
-
9: "de-DE",
|
|
25
|
-
10: "ar-SA",
|
|
26
|
-
11: "es-ES",
|
|
27
|
-
12: "it-IT",
|
|
28
|
-
13: "pt-PT",
|
|
29
|
-
14: "nl-NL",
|
|
30
|
-
15: "vi-VN",
|
|
31
|
-
16: "tr-TR"
|
|
32
|
-
}, w = (e) => {
|
|
33
|
-
const c = [...e, ...Object.values(u).filter((t) => e.includes(t))];
|
|
34
|
-
return p.filter((t) => c.includes(t) || Object.entries(u).some(
|
|
35
|
-
([a, s]) => e.includes(a) && t === s || e.includes(s) && t === s
|
|
36
|
-
));
|
|
37
|
-
}, b = ["zh-CN", "zh-MO", "en-US", "10"], g = async (e) => {
|
|
38
|
-
const c = e || {};
|
|
1
|
+
import { getConfig as k } from "@das-fed/upf-utils/config";
|
|
2
|
+
const w = (e) => e === null || typeof e > "u" || e === "", g = (e) => {
|
|
3
|
+
var t;
|
|
4
|
+
return (((t = k()) == null ? void 0 : t.systemLangList) || []).includes(e);
|
|
5
|
+
}, b = async (e) => {
|
|
6
|
+
const d = e || {};
|
|
39
7
|
let {
|
|
40
8
|
currentLang: t = "zh-CN",
|
|
41
9
|
baseUrl: a = "/",
|
|
42
|
-
appName:
|
|
43
|
-
isPullBack:
|
|
44
|
-
isDasUI:
|
|
10
|
+
appName: l = "jc",
|
|
11
|
+
isPullBack: p = !1,
|
|
12
|
+
isDasUI: y = !1,
|
|
45
13
|
urlObj: n = { frontEndUrl: "", backEndUrl: "", dasUiUrl: "" },
|
|
46
14
|
// 新增:当主地址加载失败时,用于针对失败项的本地回退地址
|
|
47
15
|
fallbackBaseUrl: r = ""
|
|
48
|
-
} =
|
|
49
|
-
(typeof t != "string" || !t) && (t = "zh-CN"), (typeof
|
|
50
|
-
const
|
|
16
|
+
} = d;
|
|
17
|
+
(typeof t != "string" || !t) && (t = "zh-CN"), (typeof l != "string" || !l) && (l = "jc"), typeof a != "string" && (a = "/"), a || (a = "/"), a.endsWith("/") || (a = a + "/"), typeof r != "string" && (r = ""), r && !r.endsWith("/") && (r = r + "/");
|
|
18
|
+
const s = {
|
|
51
19
|
frontEnd: null,
|
|
52
20
|
dasUiEnd: null,
|
|
53
21
|
backMsg: null
|
|
54
22
|
};
|
|
55
|
-
let
|
|
56
|
-
const
|
|
23
|
+
let f = !1;
|
|
24
|
+
const $ = async (o, i, E = "zh-CN", u = "资源") => {
|
|
57
25
|
try {
|
|
58
|
-
const
|
|
26
|
+
const c = await import(
|
|
59
27
|
/* @vite-ignore */
|
|
60
28
|
`${o}`
|
|
61
29
|
);
|
|
62
|
-
return (
|
|
30
|
+
return (c == null ? void 0 : c.default) ?? null;
|
|
63
31
|
} catch {
|
|
64
|
-
if (
|
|
32
|
+
if (i && g(E))
|
|
65
33
|
try {
|
|
66
34
|
const U = await import(
|
|
67
35
|
/* @vite-ignore */
|
|
68
|
-
`${
|
|
36
|
+
`${i}`
|
|
69
37
|
);
|
|
70
38
|
return (U == null ? void 0 : U.default) ?? null;
|
|
71
39
|
} catch {
|
|
@@ -73,32 +41,32 @@ const k = (e) => e === null || typeof e > "u" || e === "", p = [
|
|
|
73
41
|
return null;
|
|
74
42
|
}
|
|
75
43
|
};
|
|
76
|
-
{
|
|
77
|
-
const o = (n == null ? void 0 : n.frontEndUrl) || `${a}web-front-end/i18n/${
|
|
78
|
-
i
|
|
44
|
+
if (!y) {
|
|
45
|
+
const o = (n == null ? void 0 : n.frontEndUrl) || `${a}web-front-end/i18n/${l}_${t}.js`;
|
|
46
|
+
let i = !(n != null && n.frontEndUrl) && r ? `${r}web-front-end/i18n/${l}_${t}.js` : void 0;
|
|
47
|
+
s.frontEnd = await $(o, i, t, "前端业务语言资源"), s.frontEnd && (f = !0);
|
|
79
48
|
}
|
|
80
|
-
if (
|
|
81
|
-
const o = (n == null ? void 0 : n.backEndUrl) || `${a}web-back-end/i18n/${
|
|
82
|
-
i
|
|
49
|
+
if (p && s.frontEnd || n != null && n.backEndUrl) {
|
|
50
|
+
const o = (n == null ? void 0 : n.backEndUrl) || `${a}web-back-end/i18n/${l}_${t}.js`;
|
|
51
|
+
let i = !(n != null && n.backEndUrl) && r ? `${r}web-back-end/i18n/${l}_${t}.js` : void 0;
|
|
52
|
+
s.backMsg = await $(o, i, t, "后端语言资源"), s.backMsg && (f = !0);
|
|
83
53
|
}
|
|
84
|
-
if (
|
|
85
|
-
const o = (n == null ? void 0 : n.dasUiUrl) || `${a}web-front-end/i18n/dasui_${t}.js
|
|
86
|
-
i
|
|
54
|
+
if (y) {
|
|
55
|
+
const o = (n == null ? void 0 : n.dasUiUrl) || `${a}web-front-end/i18n/dasui_${t}.js`;
|
|
56
|
+
let i = !(n != null && n.dasUiUrl) && r ? `${r}web-front-end/i18n/dasui_${t}.js` : void 0;
|
|
57
|
+
s.dasUiEnd = await $(o, i, t, "UI组件库语言资源"), s.dasUiEnd && (f = !0);
|
|
87
58
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, z = async (e = "front-end") => {
|
|
92
|
-
let c = {}, a = await import(
|
|
59
|
+
return s;
|
|
60
|
+
}, m = async (e = "front-end") => {
|
|
61
|
+
let d = {}, a = await import(
|
|
93
62
|
/* @vite-ignore */
|
|
94
63
|
`/i18n/${e}/global.js`
|
|
95
64
|
);
|
|
96
|
-
return
|
|
65
|
+
return d = (a == null ? void 0 : a.default) || {}, d;
|
|
97
66
|
};
|
|
98
67
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
k as isEmpty
|
|
68
|
+
m as handleGlobalI18n,
|
|
69
|
+
b as handleI18nData,
|
|
70
|
+
g as isCurrentLangInSysLang,
|
|
71
|
+
w as isEmpty
|
|
104
72
|
};
|
|
Binary file
|
package/esm-map.json
CHANGED
|
@@ -146,6 +146,5 @@
|
|
|
146
146
|
"handleGlobalI18n": "/common-tools/handle-data/index",
|
|
147
147
|
"getToken": "/create-api-service/sso/index",
|
|
148
148
|
"getValidAccessToken": "/create-api-service/check-token/index",
|
|
149
|
-
"
|
|
150
|
-
"getCurrentSysLang": "/common-tools/handle-data/index"
|
|
149
|
+
"isCurrentLangInSysLang": "/common-tools/handle-data/index"
|
|
151
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/upf-utils",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.170",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@antv/x6": "^2.18.1",
|
|
12
|
-
"@das-fed/upf-utils": "6.4.0-dev.
|
|
12
|
+
"@das-fed/upf-utils": "6.4.0-dev.170",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@das-fed/upf-cli": "6.4.0-dev.
|
|
25
|
-
"@das-fed/upf-web": "6.4.0-dev.
|
|
24
|
+
"@das-fed/upf-cli": "6.4.0-dev.170",
|
|
25
|
+
"@das-fed/upf-web": "6.4.0-dev.170",
|
|
26
26
|
"@types/js-cookie": "^3.0.6",
|
|
27
27
|
"@types/lodash-es": "^4.17.12",
|
|
28
28
|
"@types/qs": "^6.9.15",
|