@das-fed/upf-utils 6.4.0-dev.184 → 6.4.0-dev.186

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 (83) hide show
  1. package/api-services/es5.js +1187 -1175
  2. package/api-services/i18n/index.js.gz +0 -0
  3. package/api-services/index.js +946 -928
  4. package/api-services/index.js.gz +0 -0
  5. package/api-services/modules/app-manage/index.js.gz +0 -0
  6. package/api-services/modules/authentication/es5.js +980 -968
  7. package/api-services/modules/authentication/index.js +804 -786
  8. package/api-services/modules/authentication/index.js.gz +0 -0
  9. package/api-services/modules/bems/es5.js +984 -996
  10. package/api-services/modules/bems/index.js +800 -818
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/es5.js +978 -969
  13. package/api-services/modules/contract/index.js +802 -788
  14. package/api-services/modules/contract/index.js.gz +0 -0
  15. package/api-services/modules/duty-manage/es5.js +799 -796
  16. package/api-services/modules/duty-manage/index.js +620 -616
  17. package/api-services/modules/duty-manage/index.js.gz +0 -0
  18. package/api-services/modules/enterpriseright/es5.js +801 -798
  19. package/api-services/modules/enterpriseright/index.js +621 -617
  20. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  21. package/api-services/modules/es5.js +1187 -1175
  22. package/api-services/modules/file/index.js.gz +0 -0
  23. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  24. package/api-services/modules/index.js +946 -928
  25. package/api-services/modules/index.js.gz +0 -0
  26. package/api-services/modules/iot/es5.js +974 -962
  27. package/api-services/modules/iot/index.js +798 -780
  28. package/api-services/modules/iot/index.js.gz +0 -0
  29. package/api-services/modules/justauth/index.js.gz +0 -0
  30. package/api-services/modules/knowledge/es5.js +980 -968
  31. package/api-services/modules/knowledge/index.js +804 -786
  32. package/api-services/modules/knowledge/index.js.gz +0 -0
  33. package/api-services/modules/link/es5.js +980 -968
  34. package/api-services/modules/link/index.js +804 -786
  35. package/api-services/modules/link/index.js.gz +0 -0
  36. package/api-services/modules/permission/index.js.gz +0 -0
  37. package/api-services/modules/platformManage/es5.js +972 -960
  38. package/api-services/modules/platformManage/index.js +795 -777
  39. package/api-services/modules/platformManage/index.js.gz +0 -0
  40. package/api-services/modules/portal/index.js.gz +0 -0
  41. package/api-services/modules/space-manage/es5.js +968 -980
  42. package/api-services/modules/space-manage/index.js +786 -804
  43. package/api-services/modules/space-manage/index.js.gz +0 -0
  44. package/api-services/modules/super-admin/index.js.gz +0 -0
  45. package/api-services/modules/supplier/es5.js +1002 -990
  46. package/api-services/modules/supplier/index.js +822 -804
  47. package/api-services/modules/supplier/index.js.gz +0 -0
  48. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  49. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  50. package/api-services/modules/tool/es5.js +980 -968
  51. package/api-services/modules/tool/index.js +804 -786
  52. package/api-services/modules/tool/index.js.gz +0 -0
  53. package/api-services/src/create-service/es5.js +796 -799
  54. package/api-services/src/create-service/index.js +616 -620
  55. package/api-services/src/create-service/index.js.gz +0 -0
  56. package/common-info/es5.js +147 -112
  57. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  58. package/common-info/index.d.ts +5 -1
  59. package/common-info/index.js +82 -56
  60. package/common-info/index.js.gz +0 -0
  61. package/common-info/set-personal-info/index.js.gz +0 -0
  62. package/common-info/type.d.ts +15 -0
  63. package/common-tools/extract-file-name/index.js.gz +0 -0
  64. package/common-tools/get-url-params/index.js.gz +0 -0
  65. package/common-tools/handle-data/es5.js +80 -111
  66. package/common-tools/handle-data/index.d.ts +0 -4
  67. package/common-tools/handle-data/index.js +71 -78
  68. package/common-tools/handle-data/index.js.gz +0 -0
  69. package/create-api-service/check-token/index.js.gz +0 -0
  70. package/create-api-service/index.js.gz +0 -0
  71. package/create-api-service/sso/index.js.gz +0 -0
  72. package/curring-http/index.js.gz +0 -0
  73. package/directive/auth/es5.js +47 -61
  74. package/directive/auth/index.js +41 -48
  75. package/directive/auth/index.js.gz +0 -0
  76. package/esm-map.json +3 -2
  77. package/hooks/use-get-auth/index.js.gz +0 -0
  78. package/nextTiken/index.js.gz +0 -0
  79. package/package.json +4 -4
  80. package/pinyin-first-character/index.js.gz +0 -0
  81. package/style/index.js.gz +0 -0
  82. package/use-low-code/index.js.gz +0 -0
  83. package/webSocket-service/index.js.gz +0 -0
@@ -3,25 +3,24 @@
3
3
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
4
4
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
5
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
6
- var commonTools = require('@das-fed/upf-utils/common-tools/es5');
7
6
  var commonInfo = require('@das-fed/upf-utils/common-info/es5');
8
7
  var utils = require('@das-fed/upf-utils/directive/utils/es5');
9
- var A = function A(e, t) {
10
- if (!e || !t) return false;
11
- if (typeof t == "string") return !!e.find(function (s) {
12
- return s.code === t;
8
+ var m = function m(e, s) {
9
+ if (!e || !s) return false;
10
+ if (typeof s == "string") return !!e.find(function (r) {
11
+ return r.endsWith(s);
13
12
  });
14
13
  {
15
- var r = false;
16
- var _iterator = _createForOfIteratorHelper(t),
14
+ var t = false;
15
+ var _iterator = _createForOfIteratorHelper(s),
17
16
  _step;
18
17
  try {
19
18
  var _loop = function _loop() {
20
- var s = _step.value;
21
- if (e.find(function (a) {
22
- return a.code === s;
19
+ var r = _step.value;
20
+ if (e.find(function (i) {
21
+ return i.endsWith(r);
23
22
  })) {
24
- r = true;
23
+ t = true;
25
24
  return 1; // break
26
25
  }
27
26
  };
@@ -33,64 +32,51 @@ var A = function A(e, t) {
33
32
  } finally {
34
33
  _iterator.f();
35
34
  }
36
- return r;
35
+ return t;
37
36
  }
38
37
  },
39
- m = function m(e) {
40
- var _ref, _ref2, _ref3, _ref4;
41
- var n;
42
- var t = (_ref = e == null ? undefined : e.code) !== null && _ref !== void 0 ? _ref : "",
43
- r = (_ref2 = (_ref3 = e == null ? undefined : e.path) !== null && _ref3 !== void 0 ? _ref3 : location == null ? undefined : location.pathname) !== null && _ref2 !== void 0 ? _ref2 : "",
44
- s = (_ref4 = e == null ? undefined : e.applicationCode) !== null && _ref4 !== void 0 ? _ref4 : commonTools.getUrlParams(location.href, "app");
45
- var l = "";
46
- if (l = e != null && e.menuCode ? e.menuCode : commonTools.getUrlParams(location.href, "menu"), !l) {
47
- var _ref5;
48
- var c = (_ref5 = (n = commonInfo.getSubApps().currentSubApp) == null ? undefined : n.menus) !== null && _ref5 !== void 0 ? _ref5 : [];
49
- if (c && c.length) {
50
- var d = commonTools.flatTree(c).filter(function (f) {
51
- return f == null ? undefined : f.routeUrl;
52
- });
53
- if (d && d.length) {
54
- var _ref6;
55
- var f = d.find(function (u) {
56
- return u != null && u.applicationPath ? r == null ? undefined : r.includes("/" + u.applicationPath + u.routeUrl) : r == null ? undefined : r.includes(u.routeUrl);
57
- });
58
- f && (l = (_ref6 = f == null ? undefined : f.code) !== null && _ref6 !== void 0 ? _ref6 : "");
59
- }
38
+ n = function n(e) {
39
+ var _ref, _ref2;
40
+ var s = (_ref = e == null ? undefined : e.code) !== null && _ref !== void 0 ? _ref : "";
41
+ var t = (_ref2 = e == null ? undefined : e.menuCode) !== null && _ref2 !== void 0 ? _ref2 : "",
42
+ r = false;
43
+ if (s) {
44
+ var _commonInfo$getMenuIt;
45
+ var f = [];
46
+ if (!t) f = (_commonInfo$getMenuIt = commonInfo.getMenuItemInfo().authCodes) !== null && _commonInfo$getMenuIt !== void 0 ? _commonInfo$getMenuIt : [];else {
47
+ var i = commonInfo.getAuthobj()[t];
48
+ i && (r = i.some(function (l) {
49
+ return l.code === s;
50
+ }));
60
51
  }
61
- }
62
- var a = false;
63
- if (t) {
64
- var _commonInfo$getPageAu;
65
- var _c = (_commonInfo$getPageAu = commonInfo.getPageAuth(l, s)) !== null && _commonInfo$getPageAu !== void 0 ? _commonInfo$getPageAu : [];
66
- a = A(_c, t);
67
- } else a = !!commonInfo.getPageAuth(l, s);
68
- return a;
52
+ r = m(f, s);
53
+ } else t && (r = !!commonInfo.getAuthobj()[t]);
54
+ return r;
69
55
  },
70
- g = function g(e, t) {
71
- t === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
56
+ c = function c(e, s) {
57
+ s === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
72
58
  },
73
- b = function b(e, t) {
74
- t === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
59
+ h = function h(e, s) {
60
+ s === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
75
61
  },
76
- U = function U(e, t) {
77
- var _ref7;
78
- var r = (e ? t.value : t) || {};
79
- typeof r == "string" && (r = {
80
- code: r
62
+ A = function A(e, s) {
63
+ var _ref3;
64
+ var t = (e ? s.value : s) || {};
65
+ typeof t == "string" && (t = {
66
+ code: t
81
67
  });
82
- var s = (_ref7 = r == null ? undefined : r.type) !== null && _ref7 !== void 0 ? _ref7 : "hide",
83
- l = m(r);
84
- if (e) if (!t.oldValue) l || utils.getEl(e, r).then(function (a) {
85
- g(a, s);
68
+ var r = (_ref3 = t == null ? undefined : t.type) !== null && _ref3 !== void 0 ? _ref3 : "hide",
69
+ f = n(t);
70
+ if (e) if (!s.oldValue) f || utils.getEl(e, t).then(function (i) {
71
+ c(i, r);
86
72
  });else {
87
- var a = m(t.oldValue),
88
- n = l;
89
- if (a === n) return;
90
- utils.getEl(e, r).then(function (c) {
91
- n ? b(c, s) : g(c, s);
73
+ var i = n(s.oldValue),
74
+ l = f;
75
+ if (i === l) return;
76
+ utils.getEl(e, t).then(function (a) {
77
+ l ? h(a, r) : c(a, r);
92
78
  });
93
79
  }
94
- return l;
80
+ return f;
95
81
  };
96
- exports.vAuth = U;
82
+ exports.vAuth = A;
@@ -1,62 +1,55 @@
1
- import { getUrlParams as i, flatTree as P } from "@das-fed/upf-utils/common-tools";
2
- import { getSubApps as v, getPageAuth as o } from "@das-fed/upf-utils/common-info";
3
- import { getEl as h } from "@das-fed/upf-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/upf-utils/common-info";
2
+ import { getEl as u } from "@das-fed/upf-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
@@ -143,8 +143,9 @@
143
143
  "getFileExtension": "/common-tools/get-file-extension/index",
144
144
  "getLanguages": "/common-info/index",
145
145
  "handleI18nData": "/common-tools/handle-data/index",
146
- "handleGlobalI18n": "/common-tools/handle-data/index",
147
146
  "getToken": "/create-api-service/sso/index",
148
147
  "getValidAccessToken": "/create-api-service/check-token/index",
149
- "isCurrentLangInSysLang": "/common-tools/handle-data/index"
148
+ "isCurrentLangInSysLang": "/common-tools/handle-data/index",
149
+ "getMenuItemInfo": "/common-info/index",
150
+ "getAuthobj": "/common-info/index"
150
151
  }
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-utils",
3
- "version": "6.4.0-dev.184",
3
+ "version": "6.4.0-dev.186",
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/upf-utils": "6.4.0-dev.184",
12
+ "@das-fed/upf-utils": "6.4.0-dev.186",
13
13
  "@vue/shared": "^3.4.21",
14
14
  "@vueuse/core": "^9.6.0",
15
15
  "axios": "^1.6.7",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@babel/preset-env": "7.26.0",
25
- "@das-fed/upf-cli": "6.4.0-dev.184",
26
- "@das-fed/upf-web": "6.4.0-dev.184",
25
+ "@das-fed/upf-cli": "6.4.0-dev.186",
26
+ "@das-fed/upf-web": "6.4.0-dev.186",
27
27
  "@rollup/plugin-babel": "6.0.4",
28
28
  "@types/js-cookie": "^3.0.6",
29
29
  "@types/lodash-es": "^4.17.12",
Binary file
package/style/index.js.gz CHANGED
Binary file
Binary file
Binary file