@das-fed/utils 6.4.0-hot.44 → 6.4.0-hot.45

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 (78) hide show
  1. package/api-services/i18n/index.js.gz +0 -0
  2. package/api-services/index.js +1504 -1820
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/index.js +1329 -1663
  5. package/api-services/modules/app-manage/index.js.gz +0 -0
  6. package/api-services/modules/authentication/index.js +1318 -1634
  7. package/api-services/modules/authentication/index.js.gz +0 -0
  8. package/api-services/modules/bems/index.js +1321 -1637
  9. package/api-services/modules/bems/index.js.gz +0 -0
  10. package/api-services/modules/contract/index.js +1311 -1623
  11. package/api-services/modules/contract/index.js.gz +0 -0
  12. package/api-services/modules/duty-manage/index.js +1339 -1673
  13. package/api-services/modules/duty-manage/index.js.gz +0 -0
  14. package/api-services/modules/enterpriseright/index.js +1318 -1634
  15. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  16. package/api-services/modules/file/index.js +1392 -1708
  17. package/api-services/modules/file/index.js.gz +0 -0
  18. package/api-services/modules/gateway-edge/index.js +1318 -1634
  19. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  20. package/api-services/modules/index.js +1536 -1852
  21. package/api-services/modules/index.js.gz +0 -0
  22. package/api-services/modules/iot/index.js +1363 -1661
  23. package/api-services/modules/iot/index.js.gz +0 -0
  24. package/api-services/modules/justauth/index.js +1332 -1630
  25. package/api-services/modules/justauth/index.js.gz +0 -0
  26. package/api-services/modules/knowledge/index.js +1339 -1655
  27. package/api-services/modules/knowledge/index.js.gz +0 -0
  28. package/api-services/modules/link/index.js +1328 -1626
  29. package/api-services/modules/link/index.js.gz +0 -0
  30. package/api-services/modules/permission/index.js +1318 -1634
  31. package/api-services/modules/permission/index.js.gz +0 -0
  32. package/api-services/modules/platformManage/index.js +1335 -1633
  33. package/api-services/modules/platformManage/index.js.gz +0 -0
  34. package/api-services/modules/portal/index.js +1328 -1626
  35. package/api-services/modules/portal/index.js.gz +0 -0
  36. package/api-services/modules/space-manage/index.js +1328 -1626
  37. package/api-services/modules/space-manage/index.js.gz +0 -0
  38. package/api-services/modules/super-admin/index.js +1334 -1632
  39. package/api-services/modules/super-admin/index.js.gz +0 -0
  40. package/api-services/modules/supplier/index.js +1338 -1654
  41. package/api-services/modules/supplier/index.js.gz +0 -0
  42. package/api-services/modules/supplychain-manage/index.js +1319 -1631
  43. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  44. package/api-services/modules/systemConfiguration/index.js +1325 -1623
  45. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  46. package/api-services/modules/tool/index.js +1339 -1655
  47. package/api-services/modules/tool/index.js.gz +0 -0
  48. package/api-services/src/create-service/index.js +1338 -1654
  49. package/api-services/src/create-service/index.js.gz +0 -0
  50. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  51. package/common-info/index.d.ts +5 -1
  52. package/common-info/index.js +84 -58
  53. package/common-info/index.js.gz +0 -0
  54. package/common-info/set-personal-info/index.js +593 -842
  55. package/common-info/set-personal-info/index.js.gz +0 -0
  56. package/common-info/type.d.ts +14 -0
  57. package/common-tools/extract-file-name/index.js +785 -1034
  58. package/common-tools/extract-file-name/index.js.gz +0 -0
  59. package/common-tools/get-url-params/index.js.gz +0 -0
  60. package/create-api-service/index.js +1348 -1646
  61. package/create-api-service/index.js.gz +0 -0
  62. package/create-api-service/sso/index.js +727 -976
  63. package/create-api-service/sso/index.js.gz +0 -0
  64. package/curring-http/index.js +1105 -1354
  65. package/curring-http/index.js.gz +0 -0
  66. package/directive/auth/index.js +41 -48
  67. package/directive/auth/index.js.gz +0 -0
  68. package/esm-map.json +3 -1
  69. package/hooks/use-get-auth/index.js.gz +0 -0
  70. package/nextTiken/index.js.gz +0 -0
  71. package/package.json +4 -4
  72. package/pinyin-first-character/index.js +21049 -19969
  73. package/pinyin-first-character/index.js.gz +0 -0
  74. package/style/index.js +2 -4
  75. package/style/index.js.gz +0 -0
  76. package/use-low-code/index.js.gz +0 -0
  77. package/vue/hooks/use-model-value/index.d.ts +5 -1
  78. package/webSocket-service/index.js.gz +0 -0
Binary file
@@ -1,62 +1,55 @@
1
- import { getUrlParams as i, flatTree as P } from "@das-fed/utils/common-tools";
2
- import { getSubApps as v, getPageAuth as o } from "@das-fed/utils/common-info";
3
- import { getEl as h } from "@das-fed/utils/directive/utils";
4
- const A = (e, t) => {
5
- if (!e || !t) return !1;
6
- if (typeof t == "string")
7
- return !!e.find((s) => s.code === t);
1
+ import { getMenuItemInfo as o, getAuthobj as d } from "@das-fed/utils/common-info";
2
+ import { getEl as u } from "@das-fed/utils/directive/utils";
3
+ const m = (e, s) => {
4
+ if (!e || !s) return !1;
5
+ if (typeof s == "string")
6
+ return !!e.find((r) => r.endsWith(s));
8
7
  {
9
- let r = !1;
10
- for (let s of t)
11
- if (e.find((a) => a.code === s)) {
12
- r = !0;
8
+ let t = !1;
9
+ for (let r of s)
10
+ if (e.find((i) => i.endsWith(r))) {
11
+ t = !0;
13
12
  break;
14
13
  }
15
- return r;
14
+ return t;
16
15
  }
17
- }, m = (e) => {
18
- var n;
19
- const t = (e == null ? void 0 : e.code) ?? "", r = (e == null ? void 0 : e.path) ?? (location == null ? void 0 : location.pathname) ?? "", s = (e == null ? void 0 : e.applicationCode) ?? i(location.href, "app");
20
- let l = "";
21
- if (l = e != null && e.menuCode ? e.menuCode : i(location.href, "menu"), !l) {
22
- const c = ((n = v().currentSubApp) == null ? void 0 : n.menus) ?? [];
23
- if (c && c.length) {
24
- const d = P(c).filter((f) => f == null ? void 0 : f.routeUrl);
25
- if (d && d.length) {
26
- const f = d.find((u) => u != null && u.applicationPath ? r == null ? void 0 : r.includes("/" + u.applicationPath + u.routeUrl) : r == null ? void 0 : r.includes(u.routeUrl));
27
- f && (l = (f == null ? void 0 : f.code) ?? "");
28
- }
16
+ }, n = (e) => {
17
+ const s = (e == null ? void 0 : e.code) ?? "";
18
+ let t = (e == null ? void 0 : e.menuCode) ?? "", r = !1;
19
+ if (s) {
20
+ let f = [];
21
+ if (!t)
22
+ f = o().authCodes ?? [];
23
+ else {
24
+ const i = d()[t];
25
+ i && (r = i.some((l) => l.code === s));
29
26
  }
30
- }
31
- let a = !1;
32
- if (t) {
33
- const c = o(l, s) ?? [];
34
- a = A(c, t);
27
+ r = m(f, s);
35
28
  } else
36
- a = !!o(l, s);
37
- return a;
38
- }, g = (e, t) => {
39
- t === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
40
- }, b = (e, t) => {
41
- t === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
42
- }, U = (e, t) => {
43
- let r = (e ? t.value : t) || {};
44
- typeof r == "string" && (r = { code: r });
45
- const s = (r == null ? void 0 : r.type) ?? "hide", l = m(r);
29
+ t && (r = !!d()[t]);
30
+ return r;
31
+ }, c = (e, s) => {
32
+ s === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
33
+ }, h = (e, s) => {
34
+ s === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
35
+ }, A = (e, s) => {
36
+ let t = (e ? s.value : s) || {};
37
+ typeof t == "string" && (t = { code: t });
38
+ const r = (t == null ? void 0 : t.type) ?? "hide", f = n(t);
46
39
  if (e)
47
- if (!t.oldValue)
48
- l || h(e, r).then((a) => {
49
- g(a, s);
40
+ if (!s.oldValue)
41
+ f || u(e, t).then((i) => {
42
+ c(i, r);
50
43
  });
51
44
  else {
52
- const a = m(t.oldValue), n = l;
53
- if (a === n) return;
54
- h(e, r).then((c) => {
55
- n ? b(c, s) : g(c, s);
45
+ const i = n(s.oldValue), l = f;
46
+ if (i === l) return;
47
+ u(e, t).then((a) => {
48
+ l ? h(a, r) : c(a, r);
56
49
  });
57
50
  }
58
- return l;
51
+ return f;
59
52
  };
60
53
  export {
61
- U as vAuth
54
+ A as vAuth
62
55
  };
Binary file
package/esm-map.json CHANGED
@@ -142,5 +142,7 @@
142
142
  "analyApi": "/api-services/modules/iot/index",
143
143
  "calcTextWidth": "/common-tools/calc-text-width/index",
144
144
  "getFileExtension": "/common-tools/get-file-extension/index",
145
- "getLanguages": "/common-info/index"
145
+ "getLanguages": "/common-info/index",
146
+ "getMenuItemInfo": "/common-info/index",
147
+ "getAuthobj": "/common-info/index"
146
148
  }
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/utils",
3
- "version": "6.4.0-hot.44",
3
+ "version": "6.4.0-hot.45",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -9,7 +9,7 @@
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
11
  "@antv/x6": "^2.18.1",
12
- "@das-fed/utils": "6.4.0-hot.44",
12
+ "@das-fed/utils": "6.4.0-hot.45",
13
13
  "@vue/shared": "^3.4.21",
14
14
  "@vueuse/core": "^9.6.0",
15
15
  "axios": "^1.6.7",
@@ -21,8 +21,8 @@
21
21
  "vue": "^3.4.21"
22
22
  },
23
23
  "devDependencies": {
24
- "@das-fed/cli": "6.4.0-hot.44",
25
- "@das-fed/web": "6.4.0-hot.44",
24
+ "@das-fed/cli": "6.4.0-hot.45",
25
+ "@das-fed/web": "6.4.0-hot.45",
26
26
  "@types/js-cookie": "^3.0.6",
27
27
  "@types/lodash-es": "^4.17.12",
28
28
  "@types/qs": "^6.9.15",