@das-fed/upf-utils 6.4.0-dev.170 → 6.4.0-dev.172

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 (123) hide show
  1. package/api-services/es5.js +4661 -0
  2. package/api-services/i18n/es5.js +58 -0
  3. package/api-services/index.js +593 -611
  4. package/api-services/index.js.gz +0 -0
  5. package/api-services/modules/app-manage/index.js +847 -883
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/index.js +701 -715
  8. package/api-services/modules/authentication/index.js.gz +0 -0
  9. package/api-services/modules/bems/index.js +882 -882
  10. package/api-services/modules/bems/index.js.gz +0 -0
  11. package/api-services/modules/contract/index.js +880 -880
  12. package/api-services/modules/contract/index.js.gz +0 -0
  13. package/api-services/modules/duty-manage/index.js +473 -491
  14. package/api-services/modules/duty-manage/index.js.gz +0 -0
  15. package/api-services/modules/enterpriseright/index.js +490 -508
  16. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  17. package/api-services/modules/es5.js +4619 -0
  18. package/api-services/modules/file/index.js +942 -978
  19. package/api-services/modules/file/index.js.gz +0 -0
  20. package/api-services/modules/gateway-edge/index.js +701 -715
  21. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  22. package/api-services/modules/index.js +651 -669
  23. package/api-services/modules/index.js.gz +0 -0
  24. package/api-services/modules/iot/index.js +1104 -1140
  25. package/api-services/modules/iot/index.js.gz +0 -0
  26. package/api-services/modules/justauth/index.js +492 -510
  27. package/api-services/modules/justauth/index.js.gz +0 -0
  28. package/api-services/modules/knowledge/index.js +698 -712
  29. package/api-services/modules/knowledge/index.js.gz +0 -0
  30. package/api-services/modules/link/index.js +880 -880
  31. package/api-services/modules/link/index.js.gz +0 -0
  32. package/api-services/modules/permission/index.js +490 -508
  33. package/api-services/modules/permission/index.js.gz +0 -0
  34. package/api-services/modules/platformManage/index.js +463 -481
  35. package/api-services/modules/platformManage/index.js.gz +0 -0
  36. package/api-services/modules/portal/index.js +880 -880
  37. package/api-services/modules/portal/index.js.gz +0 -0
  38. package/api-services/modules/space-manage/index.js +487 -505
  39. package/api-services/modules/space-manage/index.js.gz +0 -0
  40. package/api-services/modules/super-admin/index.js +881 -881
  41. package/api-services/modules/super-admin/index.js.gz +0 -0
  42. package/api-services/modules/supplier/index.js +483 -501
  43. package/api-services/modules/supplier/index.js.gz +0 -0
  44. package/api-services/modules/supplychain-manage/index.js +490 -508
  45. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  46. package/api-services/modules/systemConfiguration/index.js +880 -880
  47. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  48. package/api-services/modules/tool/index.js +880 -880
  49. package/api-services/modules/tool/index.js.gz +0 -0
  50. package/api-services/src/create-service/index.js +865 -901
  51. package/api-services/src/create-service/index.js.gz +0 -0
  52. package/atob/es5.js +12 -0
  53. package/common-info/es5.js +219 -0
  54. package/common-info/getIframeUrl/es5.js +18 -0
  55. package/common-info/getInfoFromUrl/es5.js +94 -0
  56. package/common-info/index.js +18 -18
  57. package/common-info/index.js.gz +0 -0
  58. package/common-info/set-personal-info/es5.js +2212 -0
  59. package/common-info/set-personal-info/index.js +172 -189
  60. package/common-info/set-personal-info/index.js.gz +0 -0
  61. package/common-tools/arr-tools/es5.js +14 -0
  62. package/common-tools/calc-text-width/es5.js +10 -0
  63. package/common-tools/date-format/es5.js +20 -0
  64. package/common-tools/es5.js +128 -0
  65. package/common-tools/extract-file-name/es5.js +2213 -0
  66. package/common-tools/extract-file-name/index.js +138 -155
  67. package/common-tools/extract-file-name/index.js.gz +0 -0
  68. package/common-tools/get-file-extension/es5.js +7 -0
  69. package/common-tools/get-url-params/es5.js +109 -0
  70. package/common-tools/handle-data/es5.js +170 -0
  71. package/common-tools/handle-data/index.js +28 -28
  72. package/common-tools/handle-data/index.js.gz +0 -0
  73. package/common-tools/nest-tree-format/es5.js +58 -0
  74. package/common-tools/obj-tools/es5.js +15 -0
  75. package/common-tools/platform-tools/es5.js +24 -0
  76. package/common-tools/queue-promise/es5.js +15 -0
  77. package/common-tools/setHtmlMinWH/es5.js +8 -0
  78. package/common-tools/update-browser-title/es5.js +56 -0
  79. package/common-tools/update-fav-icon/es5.js +76 -0
  80. package/config/es5.js +17 -0
  81. package/create-api-service/check-token/es5.js +2307 -0
  82. package/create-api-service/check-token/index.js +158 -175
  83. package/create-api-service/check-token/index.js.gz +0 -0
  84. package/create-api-service/es5.js +3949 -0
  85. package/create-api-service/i18n/es5.js +38 -0
  86. package/create-api-service/index.js +503 -521
  87. package/create-api-service/index.js.gz +0 -0
  88. package/create-api-service/proxy-sso/es5.js +35 -0
  89. package/create-api-service/sso/es5.js +2823 -0
  90. package/create-api-service/sso/index.js +309 -327
  91. package/create-api-service/sso/index.js.gz +0 -0
  92. package/curring-http/es5.js +2915 -0
  93. package/curring-http/index.js +285 -303
  94. package/curring-http/index.js.gz +0 -0
  95. package/dimple-canvas/es5.js +15 -0
  96. package/directive/auth/es5.js +96 -0
  97. package/directive/clickOutside/es5.js +87 -0
  98. package/directive/es5.js +23 -0
  99. package/directive/hoverInside/es5.js +61 -0
  100. package/directive/utils/es5.js +38 -0
  101. package/dom-check-in/es5.js +13 -0
  102. package/dom-watcher/es5.js +15 -0
  103. package/hooks/use-get-auth/es5.js +201 -0
  104. package/hooks/use-get-auth/index.js +22 -22
  105. package/hooks/use-get-auth/index.js.gz +0 -0
  106. package/load-js/es5.js +15 -0
  107. package/nextTiken/es5.js +70 -0
  108. package/oss/es5.js +13 -0
  109. package/package.json +17 -4
  110. package/pinyin-first-character/es5.js +9313 -0
  111. package/pinyin-first-character/index.js +24 -24
  112. package/pinyin-first-character/index.js.gz +0 -0
  113. package/process-engine-info/es5.js +20 -0
  114. package/pure-image-src/es5.js +30 -0
  115. package/size-watcher/es5.js +35 -0
  116. package/style/es5.js +143 -0
  117. package/token-tools/es5.js +26 -0
  118. package/use-low-code/es5.js +117 -0
  119. package/use-low-code/index.js +2 -2
  120. package/use-low-code/index.js.gz +0 -0
  121. package/vue/es5.js +9 -0
  122. package/webSocket-service/es5.js +122 -0
  123. package/with-install/es5.js +8 -0
@@ -18867,11 +18867,11 @@ const Z = nn(), gn = Object.keys(Z).map((n) => ({
18867
18867
  }, un = Object.keys(O);
18868
18868
  function sn(n, i, g) {
18869
18869
  if (un.indexOf(n) === -1)
18870
- return r(n);
18871
- if (i === g && i && r(i) !== i)
18872
- return f(r(n));
18870
+ return e(n);
18871
+ if (i === g && i && e(i) !== i)
18872
+ return f(e(n));
18873
18873
  if (g && !hn[n].includes(g)) {
18874
- const h = r(g);
18874
+ const h = e(g);
18875
18875
  if (h !== g) {
18876
18876
  const u = m(h), s = O[n];
18877
18877
  for (let z in s)
@@ -18889,7 +18889,7 @@ function on(n, i) {
18889
18889
  return !i || !x.get(i) ? "tóng" : x.get(i).split(" ")[0];
18890
18890
  }
18891
18891
  function C(n, i, g) {
18892
- return on(n, i) || zn(n, i) || sn(n, i, g) || r(n);
18892
+ return on(n, i) || zn(n, i) || sn(n, i, g) || e(n);
18893
18893
  }
18894
18894
  const a = {
18895
18895
  南宫: "nán gōng",
@@ -23491,7 +23491,7 @@ const a = {
23491
23491
  length: 4,
23492
23492
  priority: j.Normal,
23493
23493
  dict: Symbol("dict4")
23494
- })), v = {
23494
+ })), _ = {
23495
23495
  巴尔干半岛: "bā ěr gàn bàn dǎo",
23496
23496
  巴尔喀什湖: "bā ěr kā shí hú",
23497
23497
  不幸而言中: "bú xìng ér yán zhòng",
@@ -23507,15 +23507,15 @@ const a = {
23507
23507
  亚得里亚海: "yà dé lǐ yà hǎi",
23508
23508
  眼不见为净: "yǎn bú jiàn wéi jìng",
23509
23509
  竹筒倒豆子: "zhú tǒng dào dòu zi"
23510
- }, jn = Object.keys(v).map((n) => ({
23510
+ }, jn = Object.keys(_).map((n) => ({
23511
23511
  zh: n,
23512
- pinyin: v[n],
23512
+ pinyin: _[n],
23513
23513
  probability: 2e-8,
23514
23514
  length: 5,
23515
23515
  priority: j.Normal,
23516
23516
  dict: Symbol("dict5")
23517
23517
  }));
23518
- function _(n, i) {
23518
+ function v(n, i) {
23519
23519
  return n && (n.decimal < i.decimal || n.decimal === i.decimal && n.probability > i.probability) ? n : i;
23520
23520
  }
23521
23521
  function E(n) {
@@ -23536,14 +23536,14 @@ function xn(n, i) {
23536
23536
  patterns: z.patterns,
23537
23537
  concatPattern: u
23538
23538
  };
23539
- E(y), g[l] = _(g[l], y), u = n[--h];
23539
+ E(y), g[l] = v(g[l], y), u = n[--h];
23540
23540
  }
23541
23541
  const o = {
23542
23542
  probability: 1e-13 * z.probability,
23543
23543
  decimal: 0,
23544
23544
  patterns: z.patterns
23545
23545
  };
23546
- E(o), g[s] = _(g[s], o), g[s].concatPattern && (g[s].patterns = g[s].patterns.concat(g[s].concatPattern), g[s].concatPattern = void 0, delete g[s + 1]);
23546
+ E(o), g[s] = v(g[s], o), g[s].concatPattern && (g[s].patterns = g[s].patterns.concat(g[s].concatPattern), g[s].concatPattern = void 0, delete g[s + 1]);
23547
23547
  }
23548
23548
  return g[0].patterns.reverse();
23549
23549
  }
@@ -23553,7 +23553,7 @@ function A(n, i) {
23553
23553
  function bn(n) {
23554
23554
  return n.priority === j.Custom ? -(n.length * n.length * 1e5) : n.priority === j.Surname ? -(n.length * n.length * 100) : 1;
23555
23555
  }
23556
- function rn(n, i) {
23556
+ function en(n, i) {
23557
23557
  const g = [];
23558
23558
  let h = n.length - 1, u = n[h];
23559
23559
  for (let s = i - 1; s >= 0; s--) {
@@ -23574,7 +23574,7 @@ function rn(n, i) {
23574
23574
  }
23575
23575
  return g[0].patterns.reverse();
23576
23576
  }
23577
- function en(n, i) {
23577
+ function rn(n, i) {
23578
23578
  return !(i.index + i.length <= n.index || i.priority > n.priority || i.priority === n.priority && i.length > n.length);
23579
23579
  }
23580
23580
  function wn(n) {
@@ -23582,7 +23582,7 @@ function wn(n) {
23582
23582
  for (let g = n.length - 1; g >= 0; ) {
23583
23583
  const { index: h } = n[g];
23584
23584
  let u = g - 1;
23585
- for (; u >= 0 && en(n[g], n[u]); )
23585
+ for (; u >= 0 && rn(n[g], n[u]); )
23586
23586
  u--;
23587
23587
  (u < 0 || n[u].index + n[u].length <= h) && i.push(n[g]), g = u;
23588
23588
  }
@@ -23684,7 +23684,7 @@ class qn {
23684
23684
  }
23685
23685
  search(i, g, h = 2) {
23686
23686
  const u = this.match(i, g);
23687
- return h === 1 ? wn(u) : h === 3 ? rn(u, d(i)) : xn(u, d(i));
23687
+ return h === 1 ? wn(u) : h === 3 ? en(u, d(i)) : xn(u, d(i));
23688
23688
  }
23689
23689
  }
23690
23690
  const fn = [
@@ -23696,7 +23696,7 @@ const fn = [
23696
23696
  ...yn
23697
23697
  ], U = new qn();
23698
23698
  U.build(fn);
23699
- const mn = new F(), pn = () => mn, r = (n) => {
23699
+ const mn = new F(), pn = () => mn, e = (n) => {
23700
23700
  const i = x.get(n);
23701
23701
  return i ? i.split(" ")[0] : n;
23702
23702
  }, an = (n, i, g, h) => {
@@ -23780,7 +23780,7 @@ const mn = new F(), pn = () => mn, r = (n) => {
23780
23780
  initial: g.join(" ")
23781
23781
  // 声母
23782
23782
  };
23783
- }, e = (n) => {
23783
+ }, r = (n) => {
23784
23784
  const { final: i } = q(n);
23785
23785
  let g = "", h = "", u = "";
23786
23786
  return Y.indexOf(f(i)) !== -1 ? (g = i[0], h = i[1], u = i.slice(2)) : (h = i[0] || "", u = i.slice(1) || ""), { head: g, body: h, tail: u };
@@ -23841,17 +23841,17 @@ const Dn = (n, i) => {
23841
23841
  break;
23842
23842
  case "finalHead":
23843
23843
  n.forEach((g) => {
23844
- g.result = g.isZh ? e(g.result).head : "";
23844
+ g.result = g.isZh ? r(g.result).head : "";
23845
23845
  });
23846
23846
  break;
23847
23847
  case "finalBody":
23848
23848
  n.forEach((g) => {
23849
- g.result = g.isZh ? e(g.result).body : "";
23849
+ g.result = g.isZh ? r(g.result).body : "";
23850
23850
  });
23851
23851
  break;
23852
23852
  case "finalTail":
23853
23853
  n.forEach((g) => {
23854
- g.result = g.isZh ? e(g.result).tail : "";
23854
+ g.result = g.isZh ? r(g.result).tail : "";
23855
23855
  });
23856
23856
  break;
23857
23857
  }
@@ -23884,7 +23884,7 @@ const Dn = (n, i) => {
23884
23884
  });
23885
23885
  }
23886
23886
  return i.type === "array" ? n.map((h) => h.result) : i.type === "all" ? n.map((h) => {
23887
- const u = h.isZh ? h.result : "", { initial: s, final: z } = q(u), { head: o, body: l, tail: y } = e(u);
23887
+ const u = h.isZh ? h.result : "", { initial: s, final: z } = q(u), { head: o, body: l, tail: y } = r(u);
23888
23888
  let c = [];
23889
23889
  return u !== "" && (c = [u].concat(W(h.origin, i.surname).filter((t) => t !== u))), {
23890
23890
  origin: h.origin,
@@ -23917,7 +23917,7 @@ const Dn = (n, i) => {
23917
23917
  toneSandhi: !0,
23918
23918
  segmentit: 2
23919
23919
  };
23920
- function vn(n, i) {
23920
+ function _n(n, i) {
23921
23921
  if (i = Object.assign(Object.assign({}, Nn), i || {}), !Sn(n))
23922
23922
  return n;
23923
23923
  if (n === "")
@@ -23931,12 +23931,12 @@ var k;
23931
23931
  n[n.AllSegment = 1] = "AllSegment", n[n.AllArray = 2] = "AllArray", n[n.AllString = 3] = "AllString", n[n.PinyinSegment = 4] = "PinyinSegment", n[n.PinyinArray = 5] = "PinyinArray", n[n.PinyinString = 6] = "PinyinString", n[n.ZhSegment = 7] = "ZhSegment", n[n.ZhArray = 8] = "ZhArray", n[n.ZhString = 9] = "ZhString";
23932
23932
  })(k || (k = {}));
23933
23933
  k.AllSegment;
23934
- const _n = (n) => vn(n, {
23934
+ const vn = (n) => _n(n, {
23935
23935
  pattern: "first",
23936
23936
  toneType: "none",
23937
23937
  type: "string",
23938
23938
  separator: ""
23939
23939
  });
23940
23940
  export {
23941
- _n as getPinyinFirstCharacter
23941
+ vn as getPinyinFirstCharacter
23942
23942
  };
Binary file
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var s = function s(e) {
4
+ sessionStorage.setItem("hotentToken", e.accessToken || ""), sessionStorage.setItem("currentUser", JSON.stringify({
5
+ token: e.accessToken || ""
6
+ }));
7
+ },
8
+ o = function o() {
9
+ sessionStorage.removeItem("hotentToken"), sessionStorage.removeItem("currentUser");
10
+ },
11
+ t = function t(e) {
12
+ sessionStorage.setItem("project", e);
13
+ },
14
+ n = function n() {
15
+ sessionStorage.removeItem("project");
16
+ };
17
+ exports.removeProcessEngineProject = n;
18
+ exports.removeProcessEngineToken = o;
19
+ exports.setProcessEngineProject = t;
20
+ exports.setProcessEngineToken = s;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var e = "oss",
4
+ c = function c(n) {
5
+ return n.indexOf("/".concat(e, "/")) === 0 ? n : null;
6
+ },
7
+ l = function l(n) {
8
+ return n.indexOf("/") === 0 ? "/".concat(e).concat(n) : null;
9
+ },
10
+ a = function a(n) {
11
+ return n.indexOf("".concat(e, "/")) === 0 ? "/".concat(n) : null;
12
+ },
13
+ d = function d(n) {
14
+ return "/".concat(e, "/").concat(n);
15
+ },
16
+ o = function o() {
17
+ for (var _len = arguments.length, n = new Array(_len), _key = 0; _key < _len; _key++) {
18
+ n[_key] = arguments[_key];
19
+ }
20
+ return function (t) {
21
+ return n.reduce(function (r, u) {
22
+ return r !== null ? r : u(t);
23
+ }, null);
24
+ };
25
+ },
26
+ i = o(c, l, a, d),
27
+ s = function s(n) {
28
+ return n ? i(n) : "";
29
+ };
30
+ exports.pureImageSrc = s;
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var i = function i(e, t) {
5
+ var n = t || document.documentElement,
6
+ o = new ResizeObserver(function (c) {
7
+ var s = c[0];
8
+ e(s.contentRect);
9
+ });
10
+ return t !== null && o.observe(n), o;
11
+ },
12
+ h = function h() {
13
+ var e = vue.ref(null),
14
+ t = vue.ref({
15
+ bottom: 0,
16
+ height: 0,
17
+ left: 0,
18
+ right: 0,
19
+ top: 0,
20
+ width: 0,
21
+ x: 0,
22
+ y: 0,
23
+ toJSON: function toJSON() {}
24
+ });
25
+ return vue.onMounted(function () {
26
+ i(function (n) {
27
+ t.value = n;
28
+ }, e.value), e.value;
29
+ }), {
30
+ el: e,
31
+ rect: t
32
+ };
33
+ };
34
+ exports.SizeWatcher = i;
35
+ exports.useSizeWatcher = h;
package/style/es5.js ADDED
@@ -0,0 +1,143 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @vue/shared v3.5.17
5
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
+ * @license MIT
7
+ **/
8
+ 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; } } }; }
9
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
10
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
+ 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; } }
12
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
13
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
14
+ 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; }
15
+ process.env.NODE_ENV !== "production" && Object.freeze({});
16
+ process.env.NODE_ENV !== "production" && Object.freeze([]);
17
+ var u = function u(t) {
18
+ var e = /* @__PURE__ */Object.create(null);
19
+ return function (r) {
20
+ return e[r] || (e[r] = t(r));
21
+ };
22
+ },
23
+ m = /-(\w)/g,
24
+ p = u(function (t) {
25
+ return t.replace(m, function (e, r) {
26
+ return r ? r.toUpperCase() : "";
27
+ });
28
+ }),
29
+ a = function a() {
30
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
31
+ return t.split(" ").filter(function (e) {
32
+ return !!e.trim();
33
+ });
34
+ },
35
+ h = function h(t, e) {
36
+ if (!t || !e) return false;
37
+ if (e.includes(" ")) throw new Error("className should not contain space.");
38
+ return t.classList.contains(e);
39
+ },
40
+ y = function y(t, e) {
41
+ var _t$classList;
42
+ !t || !e.trim() || (_t$classList = t.classList).add.apply(_t$classList, _toConsumableArray(a(e)));
43
+ },
44
+ g = function g(t, e) {
45
+ var _t$classList2;
46
+ !t || !e.trim() || (_t$classList2 = t.classList).remove.apply(_t$classList2, _toConsumableArray(a(e)));
47
+ },
48
+ N = function N(t, e) {
49
+ if (!t || !e) return "";
50
+ var r = p(e);
51
+ r === "float" && (r = "cssFloat");
52
+ try {
53
+ var n = t.style[r];
54
+ if (n) return n;
55
+ var s = window == null ? void 0 : window.getComputedStyle(t, "");
56
+ return s ? s[r] : "";
57
+ } catch (_unused) {
58
+ return t.style[r];
59
+ }
60
+ },
61
+ d = function d() {
62
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
63
+ return Object.keys(t).map(function (e) {
64
+ return "".concat(e, ":").concat(t[e] !== "" ? t[e] : '""');
65
+ }).join(";");
66
+ },
67
+ E = function E(t, e) {
68
+ if (!document.getElementById(t)) return new Promise(function (r, n) {
69
+ var s = document.createElement("style");
70
+ s.rel = "text/css", s.id = t;
71
+ var _iterator = _createForOfIteratorHelper(e),
72
+ _step;
73
+ try {
74
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
75
+ var i = _step.value;
76
+ s.appendChild(document.createTextNode("".concat(i.className, "{").concat(d(i.style), "}")));
77
+ }
78
+ } catch (err) {
79
+ _iterator.e(err);
80
+ } finally {
81
+ _iterator.f();
82
+ }
83
+ document.getElementsByTagName("head")[0].appendChild(s), s.onload = function () {
84
+ return r("load success");
85
+ }, s.onerror = function () {
86
+ return n("load error");
87
+ };
88
+ });
89
+ },
90
+ S = function S(t, e) {
91
+ var r = document.getElementById(t);
92
+ if (r) {
93
+ r.innerHTML = "";
94
+ var _iterator2 = _createForOfIteratorHelper(e),
95
+ _step2;
96
+ try {
97
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
98
+ var n = _step2.value;
99
+ r.appendChild(document.createTextNode("".concat(n.className, "{").concat(d(n.style), "}")));
100
+ }
101
+ } catch (err) {
102
+ _iterator2.e(err);
103
+ } finally {
104
+ _iterator2.f();
105
+ }
106
+ }
107
+ },
108
+ l = function l(t) {
109
+ return Number(t.toString().replace("px", ""));
110
+ },
111
+ o = function o(t, e, r) {
112
+ e = l(e), r = l(r);
113
+ var n;
114
+ return t === "add" && (n = e + r), t === "subtract" && (n = e - r), t === "multiply" && (n = e * r), t === "divide" && (n = e / r), e = null, r = null, n;
115
+ },
116
+ _c = function c(t) {
117
+ return {
118
+ add: function add(e) {
119
+ return _c(o("add", t, e));
120
+ },
121
+ subtract: function subtract(e) {
122
+ return _c(o("subtract", t, e));
123
+ },
124
+ multiply: function multiply(e) {
125
+ return _c(o("multiply", t, e));
126
+ },
127
+ divide: function divide(e) {
128
+ return _c(o("divide", t, e));
129
+ },
130
+ res: function res() {
131
+ var e = t + "px";
132
+ return t = null, e;
133
+ }
134
+ };
135
+ };
136
+ exports.addClass = y;
137
+ exports.createStyle = E;
138
+ exports.curringMath = _c;
139
+ exports.getCSS = d;
140
+ exports.getStyle = N;
141
+ exports.hasClass = h;
142
+ exports.removeClass = g;
143
+ exports.updateStyle = S;
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var o = "accessToken",
4
+ r = "accessTokenExpiredAt",
5
+ c = "refreshToken",
6
+ s = "redirectUri",
7
+ a = function a() {
8
+ var _ref, _localStorage$getItem;
9
+ return (_ref = (_localStorage$getItem = localStorage.getItem(o)) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : sessionStorage.getItem(o)) !== null && _ref !== void 0 ? _ref : "";
10
+ },
11
+ n = function n(e) {
12
+ var _ref2, _localStorage$getItem2;
13
+ return (_ref2 = (_localStorage$getItem2 = localStorage.getItem(e)) !== null && _localStorage$getItem2 !== void 0 ? _localStorage$getItem2 : sessionStorage.getItem(e)) !== null && _ref2 !== void 0 ? _ref2 : "";
14
+ },
15
+ l = function l(e) {
16
+ var _t$accessTokenExpired, _t$refreshToken;
17
+ var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
18
+ localStorage.setItem(o, e), localStorage.setItem(r, (_t$accessTokenExpired = t.accessTokenExpiredAt) !== null && _t$accessTokenExpired !== void 0 ? _t$accessTokenExpired : "0"), localStorage.setItem(c, (_t$refreshToken = t.refreshToken) !== null && _t$refreshToken !== void 0 ? _t$refreshToken : ""), t.redirectUri && localStorage.setItem(s, t.redirectUri);
19
+ },
20
+ g = function g() {
21
+ localStorage.removeItem(o), localStorage.removeItem(r), localStorage.removeItem(c), localStorage.removeItem(s);
22
+ };
23
+ exports.getAccessToken = a;
24
+ exports.getAccessTokenInfo = n;
25
+ exports.removeAccessToken = g;
26
+ exports.setAccessToken = l;
@@ -0,0 +1,117 @@
1
+ 'use strict';
2
+
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
+ 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; } } }; }
8
+ 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; } }
9
+ 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; }
10
+ var vue = require('vue');
11
+ var x = ["src"],
12
+ b = /* @__PURE__ */vue.defineComponent({
13
+ __name: "low-code-iframe",
14
+ props: {
15
+ app: {},
16
+ query: {},
17
+ iframeLoading: {
18
+ type: Boolean
19
+ }
20
+ },
21
+ emits: ["emit-change", "update:iframeLoading"],
22
+ setup: function setup(n, _ref) {
23
+ var c = _ref.expose,
24
+ s = _ref.emit;
25
+ var a = n,
26
+ r = vue.computed(function () {
27
+ if (!a.app) return;
28
+ var e = "";
29
+ var o = "";
30
+ var t = a.query || {};
31
+ return a.app && (t.app = a.app), e = "".concat(o, "/api/node-low-code/v1/visitor/views/index?").concat(new URLSearchParams(t).toString()), e;
32
+ }),
33
+ l = s,
34
+ d = vue.computed({
35
+ get: function get() {
36
+ return a.iframeLoading;
37
+ },
38
+ set: function set(e) {
39
+ return l("update:iframeLoading", e);
40
+ }
41
+ }),
42
+ p = function p(e) {
43
+ var _ref2 = e.data || {},
44
+ _ref2$emitName = _ref2.emitName,
45
+ o = _ref2$emitName === void 0 ? "" : _ref2$emitName,
46
+ _ref2$emitData = _ref2.emitData,
47
+ t = _ref2$emitData === void 0 ? {} : _ref2$emitData;
48
+ o === "app-mounted" ? d.value = false : l("emit-change", o, t);
49
+ };
50
+ vue.onMounted(function () {
51
+ window.addEventListener("message", p, false);
52
+ }), vue.onBeforeUnmount(function () {
53
+ window.removeEventListener("message", p, false);
54
+ });
55
+ var i = vue.ref(null),
56
+ m = function m(e) {
57
+ var o;
58
+ d.value || (o = i.value) != null && o.contentWindow && i.value.contentWindow.postMessage(e);
59
+ };
60
+ c({
61
+ onActivated: function onActivated() {
62
+ m({
63
+ type: "onActivated"
64
+ });
65
+ },
66
+ onDeactivated: function onDeactivated() {
67
+ m({
68
+ type: "onDeactivated"
69
+ });
70
+ }
71
+ });
72
+ var w = function w() {
73
+ var o, t, f;
74
+ var _URL = new URL(r.value || "", location.origin),
75
+ e = _URL.origin;
76
+ e && ((f = (t = (o = i.value) == null ? undefined : o.contentWindow) == null ? undefined : t.postMessage) == null || f.call(t, {
77
+ type: "setProxSsoStatus",
78
+ data: {
79
+ visible: true,
80
+ parentHref: location.href
81
+ }
82
+ }, e));
83
+ };
84
+ return function (e, o) {
85
+ return vue.openBlock(), vue.createElementBlock("iframe", {
86
+ "class": "low-code-iframe",
87
+ id: "low-code-iframe",
88
+ src: r.value,
89
+ frameborder: "0",
90
+ sandbox: "allow-same-origin allow-scripts allow-forms allow-modals allow-popups allow-downloads allow-top-navigation",
91
+ ref_key: "lowCodeRef",
92
+ ref: i,
93
+ onLoad: w
94
+ }, null, 40, x);
95
+ };
96
+ }
97
+ }),
98
+ C = function C(n, c) {
99
+ var s = n.__vccOpts || n;
100
+ var _iterator = _createForOfIteratorHelper(c),
101
+ _step;
102
+ try {
103
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
104
+ var _step$value = _slicedToArray(_step.value, 2),
105
+ a = _step$value[0],
106
+ r = _step$value[1];
107
+ s[a] = r;
108
+ }
109
+ } catch (err) {
110
+ _iterator.e(err);
111
+ } finally {
112
+ _iterator.f();
113
+ }
114
+ return s;
115
+ },
116
+ B = /* @__PURE__ */C(b, [["__scopeId", "data-v-c5870bec"]]);
117
+ exports.LowCode = B;
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, createElementBlock as y, openBlock as h } from "vue";
1
+ import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, openBlock as y, createElementBlock as h } from "vue";
2
2
  const x = ["src"], b = /* @__PURE__ */ v({
3
3
  __name: "low-code-iframe",
4
4
  props: {
@@ -47,7 +47,7 @@ const x = ["src"], b = /* @__PURE__ */ v({
47
47
  e
48
48
  ));
49
49
  };
50
- return (e, o) => (h(), y("iframe", {
50
+ return (e, o) => (y(), h("iframe", {
51
51
  class: "low-code-iframe",
52
52
  id: "low-code-iframe",
53
53
  src: r.value,
Binary file
package/vue/es5.js ADDED
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var useModelValue = require('@das-fed/upf-utils/vue/hooks/use-model-value/es5');
4
+ Object.defineProperty(exports, "useModelValue", {
5
+ enumerable: true,
6
+ get: function get() {
7
+ return useModelValue.useModelValue;
8
+ }
9
+ });