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