@das-fed/upf-utils 6.4.0-dev.161 → 6.4.0-dev.162

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 (53) hide show
  1. package/api-services/index.js +698 -694
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +835 -817
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +542 -542
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +821 -839
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +467 -471
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +542 -542
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +818 -836
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +944 -926
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +835 -817
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +551 -551
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +1076 -1094
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.js +836 -818
  24. package/api-services/modules/justauth/index.js.gz +0 -0
  25. package/api-services/modules/knowledge/index.js +818 -836
  26. package/api-services/modules/knowledge/index.js.gz +0 -0
  27. package/api-services/modules/link/index.js +542 -542
  28. package/api-services/modules/link/index.js.gz +0 -0
  29. package/api-services/modules/permission/index.js +835 -817
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/platformManage/index.js +818 -836
  32. package/api-services/modules/platformManage/index.js.gz +0 -0
  33. package/api-services/modules/portal/index.js +542 -542
  34. package/api-services/modules/portal/index.js.gz +0 -0
  35. package/api-services/modules/space-manage/index.js +467 -471
  36. package/api-services/modules/space-manage/index.js.gz +0 -0
  37. package/api-services/modules/super-admin/index.js +837 -819
  38. package/api-services/modules/super-admin/index.js.gz +0 -0
  39. package/api-services/modules/supplier/index.js +543 -543
  40. package/api-services/modules/supplier/index.js.gz +0 -0
  41. package/api-services/modules/supplychain-manage/index.js +832 -818
  42. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  43. package/api-services/modules/systemConfiguration/index.js +818 -836
  44. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  45. package/api-services/modules/tool/index.js +818 -836
  46. package/api-services/modules/tool/index.js.gz +0 -0
  47. package/api-services/src/create-service/index.js +542 -542
  48. package/api-services/src/create-service/index.js.gz +0 -0
  49. package/common-tools/handle-data/index.js +58 -53
  50. package/common-tools/handle-data/index.js.gz +0 -0
  51. package/create-api-service/index.js +542 -542
  52. package/create-api-service/index.js.gz +0 -0
  53. package/package.json +4 -4
@@ -1,65 +1,70 @@
1
- const y = (e) => e === null || typeof e > "u" || e === "", c = [
1
+ const E = (n) => n === null || typeof n > "u" || n === "", f = [
2
2
  "zh-CN",
3
3
  "zh-TW",
4
4
  "zh-HK",
5
- "en",
6
- "ja",
7
- "ko",
8
- "fr",
9
- "de",
10
- "es",
11
- "it",
12
- "pt",
13
- "ru",
14
- "ar",
15
- "hi",
16
- "nl",
17
- "tr",
18
- "vi",
19
- "sv",
20
- "pl",
21
- "th"
22
- ], u = (e) => c.filter((t) => e.includes(t)), f = ["zh-CN", "en", "ar"];
23
- async function h(e) {
5
+ "zh-MO",
6
+ "en-US",
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
+ ], d = {
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
+ }, h = (n) => {
33
+ const r = [...n, ...Object.values(d).filter((t) => n.includes(t))];
34
+ return f.filter((t) => r.includes(t) || Object.entries(d).some(
35
+ ([s, a]) => n.includes(s) && t === a || n.includes(a) && t === a
36
+ ));
37
+ }, U = ["zh-CN", "zh-MO", "en-US", "10"], b = async (n) => {
24
38
  try {
25
- const t = await fetch(e, { method: "HEAD" });
26
- if (t != null && t.ok) {
27
- const n = t.headers.get("content-type");
28
- return !!(n && n.includes("javascript"));
39
+ let { currentLang: r = "zh-CN", baseUrl: t = "/", appName: s = "base", isPullBack: a = !1, urlObj: e = { frontEndUrl: "", backEndUrl: "" } } = n || {}, l = {
40
+ frontEnd: null,
41
+ backMsg: null
42
+ }, o = (e == null ? void 0 : e.frontEndUrl) || `${t}web-front-end/i18n/${s}_${r}.js`, c = (e == null ? void 0 : e.backEndUrl) || `${t}web-back-end/i18n/${s}_${r}.js`;
43
+ const i = await import(
44
+ /* @vite-ignore */
45
+ `${o}`
46
+ );
47
+ if (l.frontEnd = i.default || null, a || e != null && e.backEndUrl) {
48
+ const u = await import(
49
+ /* @vite-ignore */
50
+ `${c}`
51
+ );
52
+ l.backMsg = u.default || null;
29
53
  }
30
- return !1;
54
+ return l;
31
55
  } catch {
32
- return !1;
33
56
  }
34
- }
35
- const p = async (e) => {
36
- try {
37
- let { pathname: t = "front-end", urlPrefix: n = "", langArr: r = ["zh-CN", "en"] } = e || {}, s = {}, i = u(f);
38
- for (let a of i)
39
- if (!s[a]) {
40
- let o = `${n}i18n/${t}/${a}.js`;
41
- if (!await h(o))
42
- continue;
43
- const l = await import(
44
- /* @vite-ignore */
45
- `${n}i18n/${t}/${a}.js`
46
- );
47
- s[a] = (l == null ? void 0 : l.default) || null;
48
- }
49
- return s;
50
- } catch {
51
- }
52
- }, g = async (e = "front-end") => {
53
- let t = {}, r = await import(
57
+ }, p = async (n = "front-end") => {
58
+ let r = {}, s = await import(
54
59
  /* @vite-ignore */
55
- `/i18n/${e}/global.js`
60
+ `/i18n/${n}/global.js`
56
61
  );
57
- return t = (r == null ? void 0 : r.default) || {}, t;
62
+ return r = (s == null ? void 0 : s.default) || {}, r;
58
63
  };
59
64
  export {
60
- f as getCurrentSysLang,
61
- u as getSysLangArr,
62
- g as handleGlobalI18n,
63
- p as handleI18nData,
64
- y as isEmpty
65
+ U as getCurrentSysLang,
66
+ h as getSysLangArr,
67
+ p as handleGlobalI18n,
68
+ b as handleI18nData,
69
+ E as isEmpty
65
70
  };