@das-fed/upf-utils 6.4.0-dev.183 → 6.4.0-dev.185
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 +946 -943
- package/api-services/index.js +704 -700
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +994 -984
- package/api-services/modules/bems/index.js +813 -799
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +991 -982
- package/api-services/modules/duty-manage/index.js +815 -801
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +980 -968
- package/api-services/modules/enterpriseright/index.js +804 -786
- 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/gateway-edge/es5.js +980 -968
- package/api-services/modules/gateway-edge/index.js +804 -786
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +974 -962
- package/api-services/modules/iot/index.js +798 -780
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +970 -982
- package/api-services/modules/justauth/index.js +787 -805
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +968 -980
- package/api-services/modules/knowledge/index.js +786 -804
- 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/permission/es5.js +801 -798
- package/api-services/modules/permission/index.js +621 -617
- package/api-services/modules/permission/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/super-admin/es5.js +984 -996
- package/api-services/modules/super-admin/index.js +799 -817
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1002 -990
- package/api-services/modules/supplier/index.js +822 -804
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +980 -968
- package/api-services/modules/systemConfiguration/index.js +804 -786
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +968 -980
- package/api-services/modules/tool/index.js +786 -804
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +966 -978
- package/api-services/src/create-service/index.js +785 -803
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-tools/handle-data/es5.js +179 -148
- package/common-tools/handle-data/index.d.ts +7 -4
- package/common-tools/handle-data/index.js +98 -83
- package/common-tools/handle-data/index.js.gz +0 -0
- package/esm-map.json +0 -1
- package/package.json +4 -4
|
Binary file
|
|
@@ -1,58 +1,62 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
6
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
5
7
|
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
6
8
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
7
9
|
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
10
|
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
11
|
var config = require('@das-fed/upf-utils/config/es5');
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
12
|
+
var m = /* @__PURE__ */new Map(),
|
|
13
|
+
E = /* @__PURE__ */new Map(),
|
|
14
|
+
M = 3e5,
|
|
15
|
+
F = function F(c) {
|
|
16
|
+
return c === null || _typeof(c) > "u" || c === "";
|
|
15
17
|
},
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
return (((
|
|
18
|
+
O = function O(c) {
|
|
19
|
+
var t;
|
|
20
|
+
return (((t = config.getConfig()) == null ? undefined : t.systemLangList) || ["zh-CN", "en-US", "zh-MO"]).includes(c);
|
|
19
21
|
},
|
|
20
|
-
|
|
21
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(
|
|
22
|
-
var
|
|
22
|
+
S = /*#__PURE__*/function () {
|
|
23
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(c) {
|
|
24
|
+
var U, _U$currentLang, t, _U$baseUrl, o, _U$appName, g, _U$isPullFrontEnd, _, _U$isPullBack, N, _U$isDasUI, x, _U$fallbackBaseUrl, r, f, d, k, a, _iterator, _step, s, h, $, u, _a, _iterator2, _step2, _s, _h, _$, _u, _a2, _s2, _t3, _t4;
|
|
23
25
|
return _regenerator().w(function (_context5) {
|
|
24
|
-
while (1) switch (_context5.n) {
|
|
26
|
+
while (1) switch (_context5.p = _context5.n) {
|
|
25
27
|
case 0:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
U = c || {};
|
|
29
|
+
_U$currentLang = U.currentLang, t = _U$currentLang === void 0 ? "zh-CN" : _U$currentLang, _U$baseUrl = U.baseUrl, o = _U$baseUrl === void 0 ? "/" : _U$baseUrl, _U$appName = U.appName, g = _U$appName === void 0 ? "jc" : _U$appName, _U$isPullFrontEnd = U.isPullFrontEnd, _ = _U$isPullFrontEnd === void 0 ? true : _U$isPullFrontEnd, _U$isPullBack = U.isPullBack, N = _U$isPullBack === void 0 ? false : _U$isPullBack, _U$isDasUI = U.isDasUI, x = _U$isDasUI === void 0 ? false : _U$isDasUI, _U$fallbackBaseUrl = U.fallbackBaseUrl, r = _U$fallbackBaseUrl === void 0 ? "" : _U$fallbackBaseUrl;
|
|
30
|
+
(typeof t != "string" || !t) && (t = "zh-CN");
|
|
31
|
+
f = [];
|
|
32
|
+
Array.isArray(g) ? (f = g.filter(function (a) {
|
|
33
|
+
return typeof a == "string" && a;
|
|
34
|
+
}), f.length === 0 && (f = ["jc"])) : typeof g == "string" && g ? f = [g] : f = ["jc"], typeof o != "string" && (o = "/"), o || (o = "/"), o.endsWith("/") || (o = o + "/"), typeof r != "string" && (r = ""), r && !r.endsWith("/") && (r = r + "/");
|
|
35
|
+
d = {
|
|
34
36
|
frontEnd: null,
|
|
37
|
+
// 统一格式:{ appName1: data1, appName2: data2, ... }
|
|
35
38
|
dasUiEnd: null,
|
|
36
39
|
backMsg: null
|
|
40
|
+
// 统一格式:{ appName1: data1, appName2: data2, ... }
|
|
37
41
|
};
|
|
38
|
-
|
|
39
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
k = /*#__PURE__*/function () {
|
|
43
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(a, s) {
|
|
44
|
+
var h,
|
|
45
|
+
$,
|
|
46
|
+
u,
|
|
47
|
+
C,
|
|
48
|
+
b,
|
|
49
|
+
j,
|
|
50
|
+
l,
|
|
47
51
|
_args4 = arguments;
|
|
48
52
|
return _regenerator().w(function (_context4) {
|
|
49
53
|
while (1) switch (_context4.n) {
|
|
50
54
|
case 0:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(
|
|
55
|
-
var
|
|
55
|
+
h = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : "zh-CN";
|
|
56
|
+
$ = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : "资源";
|
|
57
|
+
u = /*#__PURE__*/function () {
|
|
58
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(l) {
|
|
59
|
+
var n, _t, _t2;
|
|
56
60
|
return _regenerator().w(function (_context) {
|
|
57
61
|
while (1) switch (_context.p = _context.n) {
|
|
58
62
|
case 0:
|
|
@@ -62,12 +66,12 @@ var h = /* @__PURE__ */new Map(),
|
|
|
62
66
|
break;
|
|
63
67
|
}
|
|
64
68
|
_context.n = 1;
|
|
65
|
-
return window.fetch(
|
|
69
|
+
return window.fetch(l, {
|
|
66
70
|
cache: "no-cache"
|
|
67
71
|
});
|
|
68
72
|
case 1:
|
|
69
|
-
|
|
70
|
-
if (!(!
|
|
73
|
+
n = _context.v;
|
|
74
|
+
if (!(!n || !n.ok)) {
|
|
71
75
|
_context.n = 2;
|
|
72
76
|
break;
|
|
73
77
|
}
|
|
@@ -76,23 +80,23 @@ var h = /* @__PURE__ */new Map(),
|
|
|
76
80
|
break;
|
|
77
81
|
case 2:
|
|
78
82
|
_context.n = 3;
|
|
79
|
-
return
|
|
83
|
+
return n.text();
|
|
80
84
|
case 3:
|
|
81
85
|
_t = _context.v;
|
|
82
86
|
case 4:
|
|
83
87
|
return _context.a(2, _t);
|
|
84
88
|
case 5:
|
|
85
89
|
_context.n = 6;
|
|
86
|
-
return new Promise(function (
|
|
90
|
+
return new Promise(function (n) {
|
|
87
91
|
try {
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
},
|
|
92
|
+
var e = new XMLHttpRequest();
|
|
93
|
+
e.open("GET", l, !0), e.onreadystatechange = function () {
|
|
94
|
+
e.readyState === 4 && n(e.status >= 200 && e.status < 300 ? e.responseText : null);
|
|
95
|
+
}, e.onerror = function () {
|
|
96
|
+
n(null);
|
|
97
|
+
}, e.send();
|
|
94
98
|
} catch (_unused) {
|
|
95
|
-
|
|
99
|
+
n(null);
|
|
96
100
|
}
|
|
97
101
|
});
|
|
98
102
|
case 6:
|
|
@@ -109,197 +113,224 @@ var h = /* @__PURE__ */new Map(),
|
|
|
109
113
|
}
|
|
110
114
|
}, _callee, null, [[0, 8]]);
|
|
111
115
|
}));
|
|
112
|
-
return function
|
|
116
|
+
return function u(_x4) {
|
|
113
117
|
return _ref3.apply(this, arguments);
|
|
114
118
|
};
|
|
115
119
|
}();
|
|
116
|
-
|
|
117
|
-
var
|
|
120
|
+
C = function C(l) {
|
|
121
|
+
var n = (l || "").replace(/^\uFEFF/, "");
|
|
118
122
|
try {
|
|
119
|
-
var
|
|
120
|
-
if (/^export\s+default\s*\{[\s\S]*\}\s*;?$/m.test(
|
|
121
|
-
var i =
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
if (
|
|
123
|
+
var e = n.trim();
|
|
124
|
+
if (/^export\s+default\s*\{[\s\S]*\}\s*;?$/m.test(e)) {
|
|
125
|
+
var i = e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|\n)\s*\/\/.*(?=\n|$)/g, "$1");
|
|
126
|
+
var p = i.indexOf("{"),
|
|
127
|
+
y = i.lastIndexOf("}");
|
|
128
|
+
if (p !== -1 && y !== -1 && y > p) return i = i.slice(p, y + 1), i = i.replace(/,\s*([}\]])/g, "$1"), JSON.parse(i);
|
|
125
129
|
}
|
|
126
130
|
} catch (_unused3) {
|
|
127
131
|
return null;
|
|
128
132
|
}
|
|
129
133
|
};
|
|
130
|
-
|
|
131
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(
|
|
134
|
+
b = /*#__PURE__*/function () {
|
|
135
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(l) {
|
|
132
136
|
var _i$value;
|
|
133
|
-
var
|
|
137
|
+
var n, e, i, p;
|
|
134
138
|
return _regenerator().w(function (_context3) {
|
|
135
139
|
while (1) switch (_context3.p = _context3.n) {
|
|
136
140
|
case 0:
|
|
137
|
-
if (
|
|
141
|
+
if (l) {
|
|
138
142
|
_context3.n = 1;
|
|
139
143
|
break;
|
|
140
144
|
}
|
|
141
145
|
return _context3.a(2, null);
|
|
142
146
|
case 1:
|
|
143
|
-
|
|
144
|
-
if (!(i &&
|
|
147
|
+
n = l, e = Date.now(), i = E.get(n);
|
|
148
|
+
if (!(i && e - i.t <= M)) {
|
|
145
149
|
_context3.n = 2;
|
|
146
150
|
break;
|
|
147
151
|
}
|
|
148
152
|
return _context3.a(2, i.ok ? (_i$value = i.value) !== null && _i$value !== void 0 ? _i$value : null : null);
|
|
149
153
|
case 2:
|
|
150
|
-
if (!
|
|
154
|
+
if (!m.has(n)) {
|
|
151
155
|
_context3.n = 3;
|
|
152
156
|
break;
|
|
153
157
|
}
|
|
154
|
-
return _context3.a(2,
|
|
158
|
+
return _context3.a(2, m.get(n));
|
|
155
159
|
case 3:
|
|
156
|
-
|
|
157
|
-
var
|
|
160
|
+
p = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
161
|
+
var y, L;
|
|
158
162
|
return _regenerator().w(function (_context2) {
|
|
159
163
|
while (1) switch (_context2.n) {
|
|
160
164
|
case 0:
|
|
161
165
|
_context2.n = 1;
|
|
162
|
-
return
|
|
166
|
+
return u(n);
|
|
163
167
|
case 1:
|
|
164
|
-
|
|
165
|
-
if (
|
|
168
|
+
y = _context2.v;
|
|
169
|
+
if (y) {
|
|
166
170
|
_context2.n = 2;
|
|
167
171
|
break;
|
|
168
172
|
}
|
|
169
|
-
return _context2.a(2, (
|
|
173
|
+
return _context2.a(2, (E.set(n, {
|
|
170
174
|
ok: false,
|
|
171
175
|
value: null,
|
|
172
|
-
t:
|
|
176
|
+
t: e
|
|
173
177
|
}), null));
|
|
174
178
|
case 2:
|
|
175
|
-
|
|
176
|
-
return _context2.a(2, (
|
|
179
|
+
L = C(y);
|
|
180
|
+
return _context2.a(2, (E.set(n, {
|
|
177
181
|
ok: true,
|
|
178
|
-
value:
|
|
182
|
+
value: L,
|
|
179
183
|
t: Date.now()
|
|
180
|
-
}),
|
|
184
|
+
}), L !== null && L !== void 0 ? L : null));
|
|
181
185
|
}
|
|
182
186
|
}, _callee2);
|
|
183
187
|
}))();
|
|
184
|
-
|
|
188
|
+
m.set(n, p);
|
|
185
189
|
_context3.p = 4;
|
|
186
190
|
_context3.n = 5;
|
|
187
|
-
return
|
|
191
|
+
return p;
|
|
188
192
|
case 5:
|
|
189
193
|
return _context3.a(2, _context3.v);
|
|
190
194
|
case 6:
|
|
191
195
|
_context3.p = 6;
|
|
192
|
-
|
|
196
|
+
m["delete"](n);
|
|
193
197
|
return _context3.f(6);
|
|
194
198
|
case 7:
|
|
195
199
|
return _context3.a(2);
|
|
196
200
|
}
|
|
197
201
|
}, _callee3, null, [[4,, 6, 7]]);
|
|
198
202
|
}));
|
|
199
|
-
return function
|
|
203
|
+
return function b(_x5) {
|
|
200
204
|
return _ref4.apply(this, arguments);
|
|
201
205
|
};
|
|
202
206
|
}();
|
|
203
207
|
_context4.n = 1;
|
|
204
|
-
return
|
|
208
|
+
return b(a);
|
|
205
209
|
case 1:
|
|
206
|
-
|
|
207
|
-
if (!
|
|
210
|
+
j = _context4.v;
|
|
211
|
+
if (!j) {
|
|
208
212
|
_context4.n = 2;
|
|
209
213
|
break;
|
|
210
214
|
}
|
|
211
|
-
return _context4.a(2,
|
|
215
|
+
return _context4.a(2, j);
|
|
212
216
|
case 2:
|
|
213
|
-
if (!(
|
|
217
|
+
if (!(s && O(h))) {
|
|
214
218
|
_context4.n = 4;
|
|
215
219
|
break;
|
|
216
220
|
}
|
|
217
221
|
_context4.n = 3;
|
|
218
|
-
return
|
|
222
|
+
return b(s);
|
|
219
223
|
case 3:
|
|
220
|
-
|
|
221
|
-
if (!
|
|
224
|
+
l = _context4.v;
|
|
225
|
+
if (!l) {
|
|
222
226
|
_context4.n = 4;
|
|
223
227
|
break;
|
|
224
228
|
}
|
|
225
|
-
return _context4.a(2,
|
|
229
|
+
return _context4.a(2, l);
|
|
226
230
|
case 4:
|
|
227
231
|
return _context4.a(2, null);
|
|
228
232
|
}
|
|
229
233
|
}, _callee4);
|
|
230
234
|
}));
|
|
231
|
-
return function
|
|
235
|
+
return function k(_x2, _x3) {
|
|
232
236
|
return _ref2.apply(this, arguments);
|
|
233
237
|
};
|
|
234
|
-
}()
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return w(x, C, e, "前端业务语言资源");
|
|
238
|
-
case 1:
|
|
239
|
-
f.frontEnd = _context5.v;
|
|
240
|
-
f.frontEnd && true;
|
|
241
|
-
if (!(_ && f.frontEnd || n != null && n.backEndUrl)) {
|
|
242
|
-
_context5.n = 3;
|
|
238
|
+
}();
|
|
239
|
+
if (!_) {
|
|
240
|
+
_context5.n = 9;
|
|
243
241
|
break;
|
|
244
242
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
_context5.
|
|
248
|
-
|
|
243
|
+
a = {};
|
|
244
|
+
_iterator = _createForOfIteratorHelper(f);
|
|
245
|
+
_context5.p = 1;
|
|
246
|
+
_iterator.s();
|
|
249
247
|
case 2:
|
|
250
|
-
|
|
251
|
-
f.backMsg && true;
|
|
252
|
-
case 3:
|
|
253
|
-
if (!L) {
|
|
248
|
+
if ((_step = _iterator.n()).done) {
|
|
254
249
|
_context5.n = 5;
|
|
255
250
|
break;
|
|
256
251
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
252
|
+
s = _step.value;
|
|
253
|
+
h = "".concat(o, "front-end/i18n/front-end-page/").concat(s, "_").concat(t, ".js");
|
|
254
|
+
$ = r ? "".concat(r, "front-end/i18n/front-end-page/").concat(s, "_").concat(t, ".js") : undefined;
|
|
255
|
+
_context5.n = 3;
|
|
256
|
+
return k(h, $, t, "\u524D\u7AEF\u4E1A\u52A1\u8BED\u8A00\u8D44\u6E90(".concat(s, ")"));
|
|
257
|
+
case 3:
|
|
258
|
+
u = _context5.v;
|
|
259
|
+
u && (a[s] = u, true);
|
|
261
260
|
case 4:
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
_context5.n = 2;
|
|
262
|
+
break;
|
|
264
263
|
case 5:
|
|
265
|
-
|
|
264
|
+
_context5.n = 7;
|
|
265
|
+
break;
|
|
266
|
+
case 6:
|
|
267
|
+
_context5.p = 6;
|
|
268
|
+
_t3 = _context5.v;
|
|
269
|
+
_iterator.e(_t3);
|
|
270
|
+
case 7:
|
|
271
|
+
_context5.p = 7;
|
|
272
|
+
_iterator.f();
|
|
273
|
+
return _context5.f(7);
|
|
274
|
+
case 8:
|
|
275
|
+
Object.keys(a).length > 0 && (d.frontEnd = a);
|
|
276
|
+
case 9:
|
|
277
|
+
if (!N) {
|
|
278
|
+
_context5.n = 18;
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
_a = {};
|
|
282
|
+
_iterator2 = _createForOfIteratorHelper(f);
|
|
283
|
+
_context5.p = 10;
|
|
284
|
+
_iterator2.s();
|
|
285
|
+
case 11:
|
|
286
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
287
|
+
_context5.n = 14;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
_s = _step2.value;
|
|
291
|
+
_h = "".concat(o, "front-end/i18n/return-msg/").concat(_s, "_").concat(t, ".js");
|
|
292
|
+
_$ = r ? "".concat(r, "front-end/i18n/return-msg/").concat(_s, "_").concat(t, ".js") : undefined;
|
|
293
|
+
_context5.n = 12;
|
|
294
|
+
return k(_h, _$, t, "\u540E\u7AEF\u8BED\u8A00\u8D44\u6E90(".concat(_s, ")"));
|
|
295
|
+
case 12:
|
|
296
|
+
_u = _context5.v;
|
|
297
|
+
_u && (_a[_s] = _u, true);
|
|
298
|
+
case 13:
|
|
299
|
+
_context5.n = 11;
|
|
300
|
+
break;
|
|
301
|
+
case 14:
|
|
302
|
+
_context5.n = 16;
|
|
303
|
+
break;
|
|
304
|
+
case 15:
|
|
305
|
+
_context5.p = 15;
|
|
306
|
+
_t4 = _context5.v;
|
|
307
|
+
_iterator2.e(_t4);
|
|
308
|
+
case 16:
|
|
309
|
+
_context5.p = 16;
|
|
310
|
+
_iterator2.f();
|
|
311
|
+
return _context5.f(16);
|
|
312
|
+
case 17:
|
|
313
|
+
Object.keys(_a).length > 0 && (d.backMsg = _a);
|
|
314
|
+
case 18:
|
|
315
|
+
if (!x) {
|
|
316
|
+
_context5.n = 20;
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
_a2 = "".concat(o, "front-end/i18n/front-end-page/dasui_").concat(t, ".js"), _s2 = r ? "".concat(r, "front-end/i18n/front-end-page/dasui_").concat(t, ".js") : undefined;
|
|
320
|
+
_context5.n = 19;
|
|
321
|
+
return k(_a2, _s2, t, "UI组件库语言资源");
|
|
322
|
+
case 19:
|
|
323
|
+
d.dasUiEnd = _context5.v;
|
|
324
|
+
d.dasUiEnd && true;
|
|
325
|
+
case 20:
|
|
326
|
+
return _context5.a(2, d);
|
|
266
327
|
}
|
|
267
|
-
}, _callee5);
|
|
328
|
+
}, _callee5, null, [[10, 15, 16, 17], [1, 6, 7, 8]]);
|
|
268
329
|
}));
|
|
269
|
-
return function
|
|
330
|
+
return function S(_x) {
|
|
270
331
|
return _ref.apply(this, arguments);
|
|
271
332
|
};
|
|
272
|
-
}(),
|
|
273
|
-
P = /*#__PURE__*/function () {
|
|
274
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
275
|
-
var l,
|
|
276
|
-
y,
|
|
277
|
-
r,
|
|
278
|
-
_args6 = arguments;
|
|
279
|
-
return _regenerator().w(function (_context6) {
|
|
280
|
-
while (1) switch (_context6.n) {
|
|
281
|
-
case 0:
|
|
282
|
-
l = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : "front-end";
|
|
283
|
-
y = {};
|
|
284
|
-
_context6.n = 1;
|
|
285
|
-
return function (specifier) {
|
|
286
|
-
return new Promise(function (r) {
|
|
287
|
-
return r(specifier);
|
|
288
|
-
}).then(function (s) {
|
|
289
|
-
return _interopRequireWildcard(require(s));
|
|
290
|
-
});
|
|
291
|
-
}(/* @vite-ignore */"/i18n/".concat(l, "/global.js"));
|
|
292
|
-
case 1:
|
|
293
|
-
r = _context6.v;
|
|
294
|
-
return _context6.a(2, (y = (r == null ? undefined : r["default"]) || {}, y));
|
|
295
|
-
}
|
|
296
|
-
}, _callee6);
|
|
297
|
-
}));
|
|
298
|
-
return function P() {
|
|
299
|
-
return _ref6.apply(this, arguments);
|
|
300
|
-
};
|
|
301
333
|
}();
|
|
302
|
-
exports.
|
|
303
|
-
exports.
|
|
304
|
-
exports.
|
|
305
|
-
exports.isEmpty = b;
|
|
334
|
+
exports.handleI18nData = S;
|
|
335
|
+
exports.isCurrentLangInSysLang = O;
|
|
336
|
+
exports.isEmpty = F;
|
|
@@ -8,9 +8,12 @@ export declare const isCurrentLangInSysLang: (lang: string) => any;
|
|
|
8
8
|
/**
|
|
9
9
|
* 处理多语言在打包时的数据
|
|
10
10
|
* @param opt
|
|
11
|
+
* @param opt.currentLang - 当前语言,默认 'zh-CN'
|
|
12
|
+
* @param opt.baseUrl - 资源基础路径,默认 '/'
|
|
13
|
+
* @param opt.appName - 应用名称,支持 string 或 string[],默认 'jc'
|
|
14
|
+
* @param opt.isPullFrontEnd - 是否加载前端资源,默认 true
|
|
15
|
+
* @param opt.isPullBack - 是否加载后端资源,默认 false
|
|
16
|
+
* @param opt.isDasUI - 是否加载 DasUI 资源,默认 false
|
|
17
|
+
* @param opt.fallbackBaseUrl - 回退资源路径,默认 ''
|
|
11
18
|
*/
|
|
12
19
|
export declare const handleI18nData: (opt: any) => unknown;
|
|
13
|
-
/**
|
|
14
|
-
* 处理不同语言包中公共的全局变量
|
|
15
|
-
*/
|
|
16
|
-
export declare const handleGlobalI18n: (pathname?: string) => unknown;
|