@das-fed/upf-utils 6.4.0-dev.174 → 6.4.0-dev.176
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/es5.js +1187 -1175
- package/api-services/index.js +946 -928
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +968 -980
- package/api-services/modules/authentication/index.js +786 -804
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +802 -805
- package/api-services/modules/bems/index.js +620 -624
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +968 -980
- package/api-services/modules/contract/index.js +786 -804
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +980 -992
- package/api-services/modules/duty-manage/index.js +799 -817
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +968 -980
- package/api-services/modules/enterpriseright/index.js +786 -804
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/es5.js +1103 -1091
- package/api-services/modules/file/index.js +900 -882
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +962 -974
- package/api-services/modules/iot/index.js +780 -798
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +971 -980
- package/api-services/modules/justauth/index.js +789 -803
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +969 -978
- package/api-services/modules/knowledge/index.js +788 -802
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +968 -980
- package/api-services/modules/link/index.js +786 -804
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +960 -972
- package/api-services/modules/platformManage/index.js +777 -795
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +980 -968
- package/api-services/modules/space-manage/index.js +804 -786
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +996 -984
- package/api-services/modules/super-admin/index.js +817 -799
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +980 -968
- package/api-services/modules/supplychain-manage/index.js +804 -786
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +968 -980
- package/api-services/modules/systemConfiguration/index.js +786 -804
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +969 -978
- package/api-services/modules/tool/index.js +788 -802
- package/api-services/modules/tool/index.js.gz +0 -0
- package/common-tools/handle-data/es5.js +58 -57
- package/common-tools/handle-data/index.js +37 -36
- package/common-tools/handle-data/index.js.gz +0 -0
- package/create-api-service/es5.js +966 -978
- package/create-api-service/index.js +785 -803
- package/create-api-service/index.js.gz +0 -0
- package/package.json +4 -4
|
Binary file
|
|
@@ -7,37 +7,38 @@ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.
|
|
|
7
7
|
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); }); }; }
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
9
|
var config = require('@das-fed/upf-utils/config/es5');
|
|
10
|
-
var
|
|
10
|
+
var m = function m(r) {
|
|
11
11
|
return r === null || _typeof(r) > "u" || r === "";
|
|
12
12
|
},
|
|
13
|
-
|
|
13
|
+
w = function w(r) {
|
|
14
14
|
var t;
|
|
15
15
|
return (((t = config.getConfig()) == null ? undefined : t.systemLangList) || []).includes(r);
|
|
16
16
|
},
|
|
17
17
|
b = /*#__PURE__*/function () {
|
|
18
18
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(r) {
|
|
19
|
-
var
|
|
19
|
+
var o, _o$currentLang, t, _o$baseUrl, a, _o$appName, l, _o$isPullBack, u, _o$isDasUI, $, _o$urlObj, n, _o$fallbackBaseUrl, e, i, y, f, s, _f, _s, _f2, _s2;
|
|
20
20
|
return _regenerator().w(function (_context2) {
|
|
21
21
|
while (1) switch (_context2.n) {
|
|
22
22
|
case 0:
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
o = r || {};
|
|
24
|
+
_o$currentLang = o.currentLang, t = _o$currentLang === void 0 ? "zh-CN" : _o$currentLang, _o$baseUrl = o.baseUrl, a = _o$baseUrl === void 0 ? "/" : _o$baseUrl, _o$appName = o.appName, l = _o$appName === void 0 ? "jc" : _o$appName, _o$isPullBack = o.isPullBack, u = _o$isPullBack === void 0 ? false : _o$isPullBack, _o$isDasUI = o.isDasUI, $ = _o$isDasUI === void 0 ? false : _o$isDasUI, _o$urlObj = o.urlObj, n = _o$urlObj === void 0 ? {
|
|
25
25
|
frontEndUrl: "",
|
|
26
26
|
backEndUrl: "",
|
|
27
27
|
dasUiUrl: ""
|
|
28
|
-
} :
|
|
28
|
+
} : _o$urlObj, _o$fallbackBaseUrl = o.fallbackBaseUrl, e = _o$fallbackBaseUrl === void 0 ? "" : _o$fallbackBaseUrl;
|
|
29
29
|
(typeof t != "string" || !t) && (t = "zh-CN"), (typeof l != "string" || !l) && (l = "jc"), typeof a != "string" && (a = "/"), a || (a = "/"), a.endsWith("/") || (a = a + "/"), typeof e != "string" && (e = ""), e && !e.endsWith("/") && (e = e + "/");
|
|
30
|
-
|
|
30
|
+
i = {
|
|
31
31
|
frontEnd: null,
|
|
32
32
|
dasUiEnd: null,
|
|
33
33
|
backMsg: null
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(
|
|
37
|
-
var
|
|
35
|
+
y = /*#__PURE__*/function () {
|
|
36
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(f, s) {
|
|
37
|
+
var E,
|
|
38
38
|
g,
|
|
39
|
+
p,
|
|
39
40
|
_ref3,
|
|
40
|
-
|
|
41
|
+
d,
|
|
41
42
|
_ref4,
|
|
42
43
|
U,
|
|
43
44
|
_args = arguments,
|
|
@@ -46,36 +47,36 @@ var w = function w(r) {
|
|
|
46
47
|
return _regenerator().w(function (_context) {
|
|
47
48
|
while (1) switch (_context.p = _context.n) {
|
|
48
49
|
case 0:
|
|
49
|
-
|
|
50
|
+
E = _args.length > 2 && _args[2] !== undefined ? _args[2] : "zh-CN";
|
|
50
51
|
g = _args.length > 3 && _args[3] !== undefined ? _args[3] : "资源";
|
|
52
|
+
p = window.importShim ? function (d) {
|
|
53
|
+
return window.importShim(d);
|
|
54
|
+
} : function (d) {
|
|
55
|
+
return function (specifier) {
|
|
56
|
+
return new Promise(function (r) {
|
|
57
|
+
return r("".concat(specifier));
|
|
58
|
+
}).then(function (s) {
|
|
59
|
+
return _interopRequireWildcard(require(s));
|
|
60
|
+
});
|
|
61
|
+
}(/* @vite-ignore */
|
|
62
|
+
d);
|
|
63
|
+
};
|
|
51
64
|
_context.p = 1;
|
|
52
65
|
_context.n = 2;
|
|
53
|
-
return
|
|
54
|
-
return new Promise(function (r) {
|
|
55
|
-
return r(specifier);
|
|
56
|
-
}).then(function (s) {
|
|
57
|
-
return _interopRequireWildcard(require(s));
|
|
58
|
-
});
|
|
59
|
-
}(/* @vite-ignore */"".concat(d));
|
|
66
|
+
return p("".concat(f));
|
|
60
67
|
case 2:
|
|
61
|
-
|
|
62
|
-
return _context.a(2, (_ref3 =
|
|
68
|
+
d = _context.v;
|
|
69
|
+
return _context.a(2, (_ref3 = d == null ? void 0 : d["default"]) !== null && _ref3 !== void 0 ? _ref3 : null);
|
|
63
70
|
case 3:
|
|
64
71
|
_context.p = 3;
|
|
65
72
|
_t = _context.v;
|
|
66
|
-
if (!(
|
|
73
|
+
if (!(s && w(E))) {
|
|
67
74
|
_context.n = 7;
|
|
68
75
|
break;
|
|
69
76
|
}
|
|
70
77
|
_context.p = 4;
|
|
71
78
|
_context.n = 5;
|
|
72
|
-
return
|
|
73
|
-
return new Promise(function (r) {
|
|
74
|
-
return r(specifier);
|
|
75
|
-
}).then(function (s) {
|
|
76
|
-
return _interopRequireWildcard(require(s));
|
|
77
|
-
});
|
|
78
|
-
}(/* @vite-ignore */"".concat(i));
|
|
79
|
+
return p(/* @vite-ignore */"".concat(s));
|
|
79
80
|
case 5:
|
|
80
81
|
U = _context.v;
|
|
81
82
|
return _context.a(2, (_ref4 = U == null ? void 0 : U["default"]) !== null && _ref4 !== void 0 ? _ref4 : null);
|
|
@@ -87,47 +88,47 @@ var w = function w(r) {
|
|
|
87
88
|
}
|
|
88
89
|
}, _callee, null, [[4, 6], [1, 3]]);
|
|
89
90
|
}));
|
|
90
|
-
return function
|
|
91
|
+
return function y(_x2, _x3) {
|
|
91
92
|
return _ref2.apply(this, arguments);
|
|
92
93
|
};
|
|
93
94
|
}();
|
|
94
|
-
if (
|
|
95
|
+
if ($) {
|
|
95
96
|
_context2.n = 2;
|
|
96
97
|
break;
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
f = (n == null ? undefined : n.frontEndUrl) || "".concat(a, "web-front-end/i18n/").concat(l, "_").concat(t, ".js");
|
|
100
|
+
s = !(n != null && n.frontEndUrl) && e ? "".concat(e, "web-front-end/i18n/").concat(l, "_").concat(t, ".js") : undefined;
|
|
100
101
|
_context2.n = 1;
|
|
101
|
-
return
|
|
102
|
+
return y(f, s, t, "前端业务语言资源");
|
|
102
103
|
case 1:
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
i.frontEnd = _context2.v;
|
|
105
|
+
i.frontEnd && true;
|
|
105
106
|
case 2:
|
|
106
|
-
if (!(u &&
|
|
107
|
+
if (!(u && i.frontEnd || n != null && n.backEndUrl)) {
|
|
107
108
|
_context2.n = 4;
|
|
108
109
|
break;
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
_f = (n == null ? undefined : n.backEndUrl) || "".concat(a, "web-back-end/i18n/").concat(l, "_").concat(t, ".js");
|
|
112
|
+
_s = !(n != null && n.backEndUrl) && e ? "".concat(e, "web-back-end/i18n/").concat(l, "_").concat(t, ".js") : undefined;
|
|
112
113
|
_context2.n = 3;
|
|
113
|
-
return
|
|
114
|
+
return y(_f, _s, t, "后端语言资源");
|
|
114
115
|
case 3:
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
i.backMsg = _context2.v;
|
|
117
|
+
i.backMsg && true;
|
|
117
118
|
case 4:
|
|
118
|
-
if (
|
|
119
|
+
if (!$) {
|
|
119
120
|
_context2.n = 6;
|
|
120
121
|
break;
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
_f2 = (n == null ? undefined : n.dasUiUrl) || "".concat(a, "web-front-end/i18n/dasui_").concat(t, ".js");
|
|
124
|
+
_s2 = !(n != null && n.dasUiUrl) && e ? "".concat(e, "web-front-end/i18n/dasui_").concat(t, ".js") : undefined;
|
|
124
125
|
_context2.n = 5;
|
|
125
|
-
return
|
|
126
|
+
return y(_f2, _s2, t, "UI组件库语言资源");
|
|
126
127
|
case 5:
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
i.dasUiEnd = _context2.v;
|
|
129
|
+
i.dasUiEnd && true;
|
|
129
130
|
case 6:
|
|
130
|
-
return _context2.a(2,
|
|
131
|
+
return _context2.a(2, i);
|
|
131
132
|
}
|
|
132
133
|
}, _callee2);
|
|
133
134
|
}));
|
|
@@ -135,17 +136,17 @@ var w = function w(r) {
|
|
|
135
136
|
return _ref.apply(this, arguments);
|
|
136
137
|
};
|
|
137
138
|
}(),
|
|
138
|
-
|
|
139
|
+
L = /*#__PURE__*/function () {
|
|
139
140
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
140
141
|
var r,
|
|
141
|
-
|
|
142
|
+
o,
|
|
142
143
|
a,
|
|
143
144
|
_args3 = arguments;
|
|
144
145
|
return _regenerator().w(function (_context3) {
|
|
145
146
|
while (1) switch (_context3.n) {
|
|
146
147
|
case 0:
|
|
147
148
|
r = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : "front-end";
|
|
148
|
-
|
|
149
|
+
o = {};
|
|
149
150
|
_context3.n = 1;
|
|
150
151
|
return function (specifier) {
|
|
151
152
|
return new Promise(function (r) {
|
|
@@ -156,15 +157,15 @@ var w = function w(r) {
|
|
|
156
157
|
}(/* @vite-ignore */"/i18n/".concat(r, "/global.js"));
|
|
157
158
|
case 1:
|
|
158
159
|
a = _context3.v;
|
|
159
|
-
return _context3.a(2, (
|
|
160
|
+
return _context3.a(2, (o = (a == null ? undefined : a["default"]) || {}, o));
|
|
160
161
|
}
|
|
161
162
|
}, _callee3);
|
|
162
163
|
}));
|
|
163
|
-
return function
|
|
164
|
+
return function L() {
|
|
164
165
|
return _ref5.apply(this, arguments);
|
|
165
166
|
};
|
|
166
167
|
}();
|
|
167
|
-
exports.handleGlobalI18n =
|
|
168
|
+
exports.handleGlobalI18n = L;
|
|
168
169
|
exports.handleI18nData = b;
|
|
169
|
-
exports.isCurrentLangInSysLang =
|
|
170
|
-
exports.isEmpty =
|
|
170
|
+
exports.isCurrentLangInSysLang = w;
|
|
171
|
+
exports.isEmpty = m;
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
const
|
|
1
|
+
import { getConfig as k } from "@das-fed/upf-utils/config";
|
|
2
|
+
const m = (r) => r === null || typeof r > "u" || r === "", w = (r) => {
|
|
3
3
|
var t;
|
|
4
|
-
return (((t =
|
|
4
|
+
return (((t = k()) == null ? void 0 : t.systemLangList) || []).includes(r);
|
|
5
5
|
}, b = async (r) => {
|
|
6
|
-
const
|
|
6
|
+
const o = r || {};
|
|
7
7
|
let {
|
|
8
8
|
currentLang: t = "zh-CN",
|
|
9
9
|
baseUrl: a = "/",
|
|
10
10
|
appName: l = "jc",
|
|
11
11
|
isPullBack: u = !1,
|
|
12
|
-
isDasUI:
|
|
12
|
+
isDasUI: $ = !1,
|
|
13
13
|
urlObj: n = { frontEndUrl: "", backEndUrl: "", dasUiUrl: "" },
|
|
14
14
|
// 新增:当主地址加载失败时,用于针对失败项的本地回退地址
|
|
15
15
|
fallbackBaseUrl: e = ""
|
|
16
|
-
} =
|
|
16
|
+
} = o;
|
|
17
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 e != "string" && (e = ""), e && !e.endsWith("/") && (e = e + "/");
|
|
18
|
-
const
|
|
18
|
+
const i = {
|
|
19
19
|
frontEnd: null,
|
|
20
20
|
dasUiEnd: null,
|
|
21
21
|
backMsg: null
|
|
22
22
|
};
|
|
23
|
-
let
|
|
24
|
-
const
|
|
23
|
+
let c = !1;
|
|
24
|
+
const y = async (f, s, E = "zh-CN", g = "资源") => {
|
|
25
|
+
const p = window.importShim ? (d) => window.importShim(d) : (d) => import(
|
|
26
|
+
/* @vite-ignore */
|
|
27
|
+
d
|
|
28
|
+
);
|
|
25
29
|
try {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
`${d}`
|
|
29
|
-
);
|
|
30
|
-
return (c == null ? void 0 : c.default) ?? null;
|
|
30
|
+
const d = await p(`${f}`);
|
|
31
|
+
return (d == null ? void 0 : d.default) ?? null;
|
|
31
32
|
} catch {
|
|
32
|
-
if (
|
|
33
|
+
if (s && w(E))
|
|
33
34
|
try {
|
|
34
|
-
const U = await
|
|
35
|
+
const U = await p(
|
|
35
36
|
/* @vite-ignore */
|
|
36
|
-
`${
|
|
37
|
+
`${s}`
|
|
37
38
|
);
|
|
38
39
|
return (U == null ? void 0 : U.default) ?? null;
|
|
39
40
|
} catch {
|
|
@@ -41,32 +42,32 @@ const w = (r) => r === null || typeof r > "u" || r === "", k = (r) => {
|
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
46
|
-
let
|
|
47
|
-
|
|
45
|
+
if (!$) {
|
|
46
|
+
const f = (n == null ? void 0 : n.frontEndUrl) || `${a}web-front-end/i18n/${l}_${t}.js`;
|
|
47
|
+
let s = !(n != null && n.frontEndUrl) && e ? `${e}web-front-end/i18n/${l}_${t}.js` : void 0;
|
|
48
|
+
i.frontEnd = await y(f, s, t, "前端业务语言资源"), i.frontEnd && (c = !0);
|
|
48
49
|
}
|
|
49
|
-
if (u &&
|
|
50
|
-
const
|
|
51
|
-
let
|
|
52
|
-
|
|
50
|
+
if (u && i.frontEnd || n != null && n.backEndUrl) {
|
|
51
|
+
const f = (n == null ? void 0 : n.backEndUrl) || `${a}web-back-end/i18n/${l}_${t}.js`;
|
|
52
|
+
let s = !(n != null && n.backEndUrl) && e ? `${e}web-back-end/i18n/${l}_${t}.js` : void 0;
|
|
53
|
+
i.backMsg = await y(f, s, t, "后端语言资源"), i.backMsg && (c = !0);
|
|
53
54
|
}
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
|
|
55
|
+
if ($) {
|
|
56
|
+
const f = (n == null ? void 0 : n.dasUiUrl) || `${a}web-front-end/i18n/dasui_${t}.js`;
|
|
57
|
+
let s = !(n != null && n.dasUiUrl) && e ? `${e}web-front-end/i18n/dasui_${t}.js` : void 0;
|
|
58
|
+
i.dasUiEnd = await y(f, s, t, "UI组件库语言资源"), i.dasUiEnd && (c = !0);
|
|
58
59
|
}
|
|
59
|
-
return
|
|
60
|
-
},
|
|
61
|
-
let
|
|
60
|
+
return i;
|
|
61
|
+
}, L = async (r = "front-end") => {
|
|
62
|
+
let o = {}, a = await import(
|
|
62
63
|
/* @vite-ignore */
|
|
63
64
|
`/i18n/${r}/global.js`
|
|
64
65
|
);
|
|
65
|
-
return
|
|
66
|
+
return o = (a == null ? void 0 : a.default) || {}, o;
|
|
66
67
|
};
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
L as handleGlobalI18n,
|
|
69
70
|
b as handleI18nData,
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
w as isCurrentLangInSysLang,
|
|
72
|
+
m as isEmpty
|
|
72
73
|
};
|
|
Binary file
|