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

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 +1820 -1504
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/index.js +1663 -1329
  5. package/api-services/modules/app-manage/index.js.gz +0 -0
  6. package/api-services/modules/authentication/index.js +1626 -1328
  7. package/api-services/modules/authentication/index.js.gz +0 -0
  8. package/api-services/modules/bems/index.js +1637 -1321
  9. package/api-services/modules/bems/index.js.gz +0 -0
  10. package/api-services/modules/contract/index.js +1662 -1332
  11. package/api-services/modules/contract/index.js.gz +0 -0
  12. package/api-services/modules/duty-manage/index.js +1673 -1339
  13. package/api-services/modules/duty-manage/index.js.gz +0 -0
  14. package/api-services/modules/enterpriseright/index.js +1634 -1318
  15. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  16. package/api-services/modules/file/index.js +1752 -1418
  17. package/api-services/modules/file/index.js.gz +0 -0
  18. package/api-services/modules/gateway-edge/index.js +1626 -1328
  19. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  20. package/api-services/modules/index.js +1852 -1536
  21. package/api-services/modules/index.js.gz +0 -0
  22. package/api-services/modules/iot/index.js +1674 -1358
  23. package/api-services/modules/iot/index.js.gz +0 -0
  24. package/api-services/modules/justauth/index.js +1630 -1332
  25. package/api-services/modules/justauth/index.js.gz +0 -0
  26. package/api-services/modules/knowledge/index.js +1655 -1339
  27. package/api-services/modules/knowledge/index.js.gz +0 -0
  28. package/api-services/modules/link/index.js +1634 -1318
  29. package/api-services/modules/link/index.js.gz +0 -0
  30. package/api-services/modules/permission/index.js +1634 -1318
  31. package/api-services/modules/permission/index.js.gz +0 -0
  32. package/api-services/modules/platformManage/index.js +1633 -1335
  33. package/api-services/modules/platformManage/index.js.gz +0 -0
  34. package/api-services/modules/portal/index.js +1634 -1318
  35. package/api-services/modules/portal/index.js.gz +0 -0
  36. package/api-services/modules/space-manage/index.js +1634 -1318
  37. package/api-services/modules/space-manage/index.js.gz +0 -0
  38. package/api-services/modules/super-admin/index.js +1642 -1326
  39. package/api-services/modules/super-admin/index.js.gz +0 -0
  40. package/api-services/modules/supplier/index.js +1649 -1347
  41. package/api-services/modules/supplier/index.js.gz +0 -0
  42. package/api-services/modules/supplychain-manage/index.js +1634 -1318
  43. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  44. package/api-services/modules/systemConfiguration/index.js +1623 -1325
  45. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  46. package/api-services/modules/tool/index.js +1647 -1349
  47. package/api-services/modules/tool/index.js.gz +0 -0
  48. package/api-services/src/create-service/index.js +1646 -1348
  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 +1 -5
  52. package/common-info/index.js +58 -84
  53. package/common-info/index.js.gz +0 -0
  54. package/common-info/set-personal-info/index.js +842 -593
  55. package/common-info/set-personal-info/index.js.gz +0 -0
  56. package/common-info/type.d.ts +0 -14
  57. package/common-tools/extract-file-name/index.js +1034 -785
  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 +1646 -1348
  61. package/create-api-service/index.js.gz +0 -0
  62. package/create-api-service/sso/index.js +976 -727
  63. package/create-api-service/sso/index.js.gz +0 -0
  64. package/curring-http/index.js +1354 -1105
  65. package/curring-http/index.js.gz +0 -0
  66. package/directive/auth/index.js +48 -41
  67. package/directive/auth/index.js.gz +0 -0
  68. package/esm-map.json +1 -3
  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 +19799 -20879
  73. package/pinyin-first-character/index.js.gz +0 -0
  74. package/style/index.js +4 -2
  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 +1 -5
  78. package/webSocket-service/index.js.gz +0 -0
Binary file
@@ -1,55 +1,62 @@
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));
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);
7
8
  {
8
- let t = !1;
9
- for (let r of s)
10
- if (e.find((i) => i.endsWith(r))) {
11
- t = !0;
9
+ let r = !1;
10
+ for (let s of t)
11
+ if (e.find((a) => a.code === s)) {
12
+ r = !0;
12
13
  break;
13
14
  }
14
- return t;
15
+ return r;
15
16
  }
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));
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
+ }
26
29
  }
27
- r = m(f, s);
30
+ }
31
+ let a = !1;
32
+ if (t) {
33
+ const c = o(l, s) ?? [];
34
+ a = A(c, t);
28
35
  } else
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);
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);
39
46
  if (e)
40
- if (!s.oldValue)
41
- f || u(e, t).then((i) => {
42
- c(i, r);
47
+ if (!t.oldValue)
48
+ l || h(e, r).then((a) => {
49
+ g(a, s);
43
50
  });
44
51
  else {
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);
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);
49
56
  });
50
57
  }
51
- return f;
58
+ return l;
52
59
  };
53
60
  export {
54
- A as vAuth
61
+ U as vAuth
55
62
  };
Binary file
package/esm-map.json CHANGED
@@ -142,7 +142,5 @@
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",
146
- "getMenuItemInfo": "/common-info/index",
147
- "getAuthobj": "/common-info/index"
145
+ "getLanguages": "/common-info/index"
148
146
  }
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.45",
3
+ "version": "6.4.0-hot.47",
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.45",
12
+ "@das-fed/utils": "6.4.0-hot.47",
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.45",
25
- "@das-fed/web": "6.4.0-hot.45",
24
+ "@das-fed/cli": "6.4.0-hot.47",
25
+ "@das-fed/web": "6.4.0-hot.47",
26
26
  "@types/js-cookie": "^3.0.6",
27
27
  "@types/lodash-es": "^4.17.12",
28
28
  "@types/qs": "^6.9.15",