@das-fed/upf-utils 6.4.0-dev.166 → 6.4.0-dev.167

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 (33) hide show
  1. package/api-services/modules/authentication/index.js +818 -836
  2. package/api-services/modules/authentication/index.js.gz +0 -0
  3. package/api-services/modules/bems/index.js +821 -839
  4. package/api-services/modules/bems/index.js.gz +0 -0
  5. package/api-services/modules/contract/index.js +818 -836
  6. package/api-services/modules/contract/index.js.gz +0 -0
  7. package/api-services/modules/file/index.js +950 -932
  8. package/api-services/modules/file/index.js.gz +0 -0
  9. package/api-services/modules/gateway-edge/index.js +817 -831
  10. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  11. package/api-services/modules/index.js +953 -971
  12. package/api-services/modules/index.js.gz +0 -0
  13. package/api-services/modules/iot/index.js +1076 -1094
  14. package/api-services/modules/iot/index.js.gz +0 -0
  15. package/api-services/modules/knowledge/index.js +836 -818
  16. package/api-services/modules/knowledge/index.js.gz +0 -0
  17. package/api-services/modules/permission/index.js +818 -836
  18. package/api-services/modules/permission/index.js.gz +0 -0
  19. package/api-services/modules/portal/index.js +836 -818
  20. package/api-services/modules/portal/index.js.gz +0 -0
  21. package/api-services/modules/supplier/index.js +838 -820
  22. package/api-services/modules/supplier/index.js.gz +0 -0
  23. package/api-services/modules/supplychain-manage/index.js +818 -836
  24. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  25. package/api-services/modules/systemConfiguration/index.js +792 -806
  26. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  27. package/api-services/modules/tool/index.js +836 -818
  28. package/api-services/modules/tool/index.js.gz +0 -0
  29. package/common-tools/handle-data/index.js +54 -35
  30. package/common-tools/handle-data/index.js.gz +0 -0
  31. package/create-api-service/index.js +633 -629
  32. package/create-api-service/index.js.gz +0 -0
  33. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- const b = (n) => n === null || typeof n > "u" || n === "", U = [
1
+ const E = (e) => e === null || typeof e > "u" || e === "", u = [
2
2
  "zh-CN",
3
3
  "zh-TW",
4
4
  "zh-HK",
@@ -15,7 +15,7 @@ const b = (n) => n === null || typeof n > "u" || n === "", U = [
15
15
  "nl-NL",
16
16
  "vi-VN",
17
17
  "tr-TR"
18
- ], c = {
18
+ ], l = {
19
19
  3: "zh-HK",
20
20
  4: "zh-TW",
21
21
  6: "ru-RU",
@@ -29,49 +29,68 @@ const b = (n) => n === null || typeof n > "u" || n === "", U = [
29
29
  14: "nl-NL",
30
30
  15: "vi-VN",
31
31
  16: "tr-TR"
32
- }, p = (n) => {
33
- const t = [...n, ...Object.values(c).filter((e) => n.includes(e))];
34
- return U.filter((e) => t.includes(e) || Object.entries(c).some(
35
- ([s, a]) => n.includes(s) && e === a || n.includes(a) && e === a
32
+ }, h = (e) => {
33
+ const c = [...e, ...Object.values(l).filter((n) => e.includes(n))];
34
+ return u.filter((n) => c.includes(n) || Object.entries(l).some(
35
+ ([t, a]) => e.includes(t) && n === a || e.includes(a) && n === a
36
36
  ));
37
- }, $ = ["zh-CN", "zh-MO", "en-US", "10"], m = async (n) => {
37
+ }, p = ["zh-CN", "zh-MO", "en-US", "10"], y = async (e) => {
38
+ const c = e || {};
39
+ let {
40
+ currentLang: n = "zh-CN",
41
+ baseUrl: t = "/",
42
+ appName: a = "jc",
43
+ isPullBack: o = !1,
44
+ isDasUI: U = !1,
45
+ urlObj: r = { frontEndUrl: "", backEndUrl: "", dasUiUrl: "" }
46
+ } = c;
47
+ (typeof n != "string" || !n) && (n = "zh-CN"), (typeof a != "string" || !a) && (a = "jc"), typeof t != "string" && (t = "/"), t || (t = "/"), t.endsWith("/") || (t = t + "/");
48
+ const i = {
49
+ frontEnd: null,
50
+ dasUiEnd: null,
51
+ backMsg: null
52
+ };
53
+ let f = !1;
38
54
  try {
39
- let { currentLang: t = "zh-CN", baseUrl: e = "/", appName: s = "base", isPullBack: a = !1, urlObj: r = { frontEndUrl: "", backEndUrl: "" } } = n || {}, d = {
40
- frontEnd: null,
41
- backMsg: null
42
- }, u = (r == null ? void 0 : r.frontEndUrl) || `${e}web-front-end/i18n/${s}_${t}.js`, i = (r == null ? void 0 : r.backEndUrl) || `${e}web-back-end/i18n/${s}_${t}.js`;
43
- const f = await import(
55
+ const s = await import(
44
56
  /* @vite-ignore */
45
- `${u}`
57
+ `${(r == null ? void 0 : r.frontEndUrl) || `${t}web-front-end/i18n/${a}_${n}.js`}`
46
58
  );
47
- if (d.frontEnd = f.default || null, a || r != null && r.backEndUrl) {
48
- const l = await import(
59
+ i.frontEnd = (s == null ? void 0 : s.default) ?? null, i.frontEnd && (f = !0);
60
+ } catch {
61
+ }
62
+ if (o || r != null && r.backEndUrl)
63
+ try {
64
+ const s = await import(
49
65
  /* @vite-ignore */
50
- `${i}`
66
+ `${(r == null ? void 0 : r.backEndUrl) || `${t}web-back-end/i18n/${a}_${n}.js`}`
51
67
  );
52
- d.backMsg = l.default || null;
68
+ i.backMsg = (s == null ? void 0 : s.default) ?? null, i.backMsg && (f = !0);
69
+ } catch {
53
70
  }
54
- const E = /* @__PURE__ */ Object.assign({});
55
- let h = `/node_modules/@das-fed/upf-ui/dist/web-front-end/i18n/dasui_${t}.js`;
56
- const o = E[h] || null;
57
- if (o) {
58
- let l = await o();
59
- d.frontEnd = { ...d.frontEnd, ...l.default };
71
+ if (U)
72
+ try {
73
+ const s = await import(
74
+ /* @vite-ignore */
75
+ `${(r == null ? void 0 : r.dasUiUrl) || `${t}web-front-end/i18n/dasui_${n}.js`}`
76
+ );
77
+ i.dasUiEnd = (s == null ? void 0 : s.default) ?? null, i.dasUiEnd && (f = !0);
78
+ } catch {
60
79
  }
61
- return d;
62
- } catch {
63
- }
64
- }, S = async (n = "front-end") => {
65
- let t = {}, s = await import(
80
+ if (!f)
81
+ throw new Error("语言包加载失败");
82
+ return i;
83
+ }, $ = async (e = "front-end") => {
84
+ let c = {}, t = await import(
66
85
  /* @vite-ignore */
67
- `/i18n/${n}/global.js`
86
+ `/i18n/${e}/global.js`
68
87
  );
69
- return t = (s == null ? void 0 : s.default) || {}, t;
88
+ return c = (t == null ? void 0 : t.default) || {}, c;
70
89
  };
71
90
  export {
72
- $ as getCurrentSysLang,
73
- p as getSysLangArr,
74
- S as handleGlobalI18n,
75
- m as handleI18nData,
76
- b as isEmpty
91
+ p as getCurrentSysLang,
92
+ h as getSysLangArr,
93
+ $ as handleGlobalI18n,
94
+ y as handleI18nData,
95
+ E as isEmpty
77
96
  };