@das-fed/utils 6.3.0-beta.9 → 6.4.0-beta.10

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 (95) hide show
  1. package/api-services/index.d.ts +2 -2
  2. package/api-services/index.js +3070 -3
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/index.js +2786 -3
  5. package/api-services/modules/app-manage/index.js.gz +0 -0
  6. package/api-services/modules/authentication/index.js +2786 -3
  7. package/api-services/modules/authentication/index.js.gz +0 -0
  8. package/api-services/modules/bems/index.js +2789 -6
  9. package/api-services/modules/bems/index.js.gz +0 -0
  10. package/api-services/modules/contract/index.js +2786 -3
  11. package/api-services/modules/contract/index.js.gz +0 -0
  12. package/api-services/modules/duty-manage/index.js +2790 -7
  13. package/api-services/modules/duty-manage/index.js.gz +0 -0
  14. package/api-services/modules/enterpriseright/index.js +2786 -3
  15. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  16. package/api-services/modules/file/index.d.ts +1 -1
  17. package/api-services/modules/file/index.js +157 -428
  18. package/api-services/modules/file/index.js.gz +0 -0
  19. package/api-services/modules/gateway-edge/index.js +2786 -3
  20. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  21. package/api-services/modules/index.d.ts +21 -21
  22. package/api-services/modules/index.js +3069 -57
  23. package/api-services/modules/index.js.gz +0 -0
  24. package/api-services/modules/iot/index.js +2799 -16
  25. package/api-services/modules/iot/index.js.gz +0 -0
  26. package/api-services/modules/justauth/index.js +2787 -4
  27. package/api-services/modules/justauth/index.js.gz +0 -0
  28. package/api-services/modules/knowledge/index.js +2786 -3
  29. package/api-services/modules/knowledge/index.js.gz +0 -0
  30. package/api-services/modules/link/index.js +2786 -3
  31. package/api-services/modules/link/index.js.gz +0 -0
  32. package/api-services/modules/permission/index.js +2786 -3
  33. package/api-services/modules/permission/index.js.gz +0 -0
  34. package/api-services/modules/platformManage/index.js +2793 -10
  35. package/api-services/modules/platformManage/index.js.gz +0 -0
  36. package/api-services/modules/portal/index.js +2786 -3
  37. package/api-services/modules/portal/index.js.gz +0 -0
  38. package/api-services/modules/space-manage/index.js +2786 -3
  39. package/api-services/modules/space-manage/index.js.gz +0 -0
  40. package/api-services/modules/super-admin/index.js +2789 -6
  41. package/api-services/modules/super-admin/index.js.gz +0 -0
  42. package/api-services/modules/supplier/index.js +2788 -5
  43. package/api-services/modules/supplier/index.js.gz +0 -0
  44. package/api-services/modules/supplychain-manage/index.js +2786 -3
  45. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  46. package/api-services/modules/systemConfiguration/index.js +2786 -3
  47. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  48. package/api-services/modules/tool/index.js +2786 -3
  49. package/api-services/modules/tool/index.js.gz +0 -0
  50. package/api-services/src/create-service/index.d.ts +1 -1
  51. package/api-services/src/create-service/index.js +2786 -2
  52. package/api-services/src/create-service/index.js.gz +0 -0
  53. package/common-info/set-personal-info/index.js +575 -789
  54. package/common-info/set-personal-info/index.js.gz +0 -0
  55. package/common-tools/date-format/index.js +2 -1
  56. package/common-tools/get-url-params/index.d.ts +1 -1
  57. package/common-tools/get-url-params/index.js +49 -46
  58. package/common-tools/get-url-params/index.js.gz +0 -0
  59. package/common-tools/platform-tools/index.d.ts +2 -1
  60. package/common-tools/platform-tools/index.js +16 -11
  61. package/common-tools/update-fav-icon/index.js +15 -14
  62. package/create-api-service/index.js +1561 -2225
  63. package/create-api-service/index.js.gz +0 -0
  64. package/create-api-service/sso/index.js +691 -906
  65. package/create-api-service/sso/index.js.gz +0 -0
  66. package/curring-http/index.js +1114 -1328
  67. package/curring-http/index.js.gz +0 -0
  68. package/directive/auth/index.d.ts +8 -0
  69. package/directive/auth/index.js +62 -0
  70. package/directive/auth/index.js.gz +0 -0
  71. package/directive/clickOutside/index.d.ts +6 -0
  72. package/directive/clickOutside/index.js +27 -0
  73. package/directive/hoverInside/index.d.ts +6 -0
  74. package/directive/hoverInside/index.js +21 -0
  75. package/directive/utils/index.d.ts +7 -0
  76. package/directive/utils/index.js +7 -0
  77. package/esm-map.json +136 -5
  78. package/hooks/popup-manager/use-zindex/index.d.ts +3 -0
  79. package/hooks/popup-manager/use-zindex/index.js +9 -0
  80. package/hooks/use-get-auth/apis.d.ts +4 -0
  81. package/hooks/use-get-auth/index.d.ts +9 -0
  82. package/hooks/use-get-auth/index.js +53 -0
  83. package/hooks/use-get-auth/index.js.gz +0 -0
  84. package/package.json +5 -4
  85. package/pinyin-first-character/index.js +21049 -19959
  86. package/pinyin-first-character/index.js.gz +0 -0
  87. package/style/index.js +1 -1
  88. package/style/index.js.gz +0 -0
  89. package/token-tools/index.js +20 -20
  90. package/token-tools/index.js.gz +0 -0
  91. package/use-low-code/index.js +13 -13
  92. package/use-low-code/index.js.gz +0 -0
  93. package/use-low-code/style.css +1 -1
  94. package/vue/hooks/use-model-value/index.d.ts +5 -0
  95. package/vue/hooks/use-model-value/index.js +10 -0
@@ -10,7 +10,8 @@ const a = (s, t = "yyyy-MM-dd HH:mm:ss") => {
10
10
  S: e.getMilliseconds()
11
11
  }, g = e.getFullYear().toString();
12
12
  g = g.length >= 4 ? g : "0000".substr(0, 4 - g.length) + g, /(y+)/.test(t) && (t = t.replace(RegExp.$1, (g + "").substr(4 - RegExp.$1.length)));
13
- for (var n in r) new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[n] : ("00" + r[n]).substr(("" + r[n]).length)));
13
+ for (var n in r)
14
+ new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[n] : ("00" + r[n]).substr(("" + r[n]).length)));
14
15
  return t;
15
16
  };
16
17
  export {
@@ -37,7 +37,7 @@ export declare const objectToUrlparams: (params: any) => string;
37
37
  * @param pathParams 参数,数组格式
38
38
  * @returns
39
39
  */
40
- export declare const addPathParamsToUrl: (url: string, pathParams: any[]) => string;
40
+ export declare const addPathParamsToUrl: (url: string, pathParams: string[]) => any;
41
41
  /**
42
42
  * 从URL中获取origin
43
43
  * @param url url
@@ -1,60 +1,63 @@
1
- const a = (r, n) => {
1
+ const i = (n, s) => {
2
2
  let e = window.location.search || "";
3
- if (r && r !== location.href) {
4
- const s = r.indexOf("?");
5
- s !== -1 ? e = r.slice(s) : e = "";
3
+ if (n && n !== location.href) {
4
+ const t = n.indexOf("?");
5
+ t !== -1 ? e = n.slice(t) : e = "";
6
6
  }
7
- const t = new URLSearchParams(e);
8
- if (n)
9
- return t.get(n);
7
+ const r = new URLSearchParams(e);
8
+ if (s)
9
+ return r.get(s);
10
10
  {
11
- let s = {};
12
- for (let [l, c] of t.entries())
13
- s[l] = c;
14
- return s;
11
+ let t = {};
12
+ for (let [o, l] of r.entries())
13
+ t[o] = l;
14
+ return t;
15
15
  }
16
- }, f = (r, n = {}) => {
17
- let e = "", t = "";
18
- const s = Object.keys(n);
19
- return s && s.length && s.forEach((l, c) => {
20
- c === s.length - 1 ? t += `${l}=${n[l]}` : t += `${l}=${n[l]}&`;
21
- }), t ? e = location.origin + r + `?${t}` : e = location.origin + r, e;
22
- }, h = (r, n) => {
23
- const e = n || location.href, t = a(e), s = Object.keys(t) || [];
24
- if (!s || !s.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
25
- let l = s.filter((i) => !r.includes(i));
26
- if (!l || !l.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
27
- let c = "";
28
- return l.forEach((i, o) => {
29
- o === s.length - 1 ? c += `${i}=${t[i]}` : c += `${i}=${t[i]}&`;
30
- }), e.includes("?") ? e.split("?")[0] + `?${c}` : e.split("&")[0] + `?${c}`;
31
- }, u = (r) => {
32
- const n = new URLSearchParams(r.split("?")[1]), e = {};
33
- for (const [t, s] of n)
34
- e.hasOwnProperty(t) ? Array.isArray(e[t]) ? e[t].push(s) : e[t] = [e[t], s] : e[t] = s;
16
+ }, f = (n, s = {}) => {
17
+ let e = "", r = "";
18
+ const t = Object.keys(s);
19
+ return t && t.length && t.forEach((o, l) => {
20
+ l === t.length - 1 ? r += `${o}=${s[o]}` : r += `${o}=${s[o]}&`;
21
+ }), r ? e = location.origin + n + `?${r}` : e = location.origin + n, e;
22
+ }, h = (n, s) => {
23
+ const e = s || location.href, r = i(e), t = Object.keys(r) || [];
24
+ if (!t || !t.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
25
+ let o = t.filter((a) => !n.includes(a));
26
+ if (!o || !o.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
27
+ let l = "";
28
+ return o.forEach((a, c) => {
29
+ c === t.length - 1 ? l += `${a}=${r[a]}` : l += `${a}=${r[a]}&`;
30
+ }), e.includes("?") ? e.split("?")[0] + `?${l}` : e.split("&")[0] + `?${l}`;
31
+ }, u = (n) => {
32
+ const s = new URLSearchParams(n.split("?")[1]), e = {};
33
+ for (const [r, t] of s)
34
+ e.hasOwnProperty(r) ? Array.isArray(e[r]) ? e[r].push(t) : e[r] = [e[r], t] : e[r] = t;
35
35
  return e;
36
- }, p = (r) => {
37
- let n = "";
38
- const e = Object.keys(r);
39
- return e && e.length && e.forEach((t, s) => {
40
- s === e.length - 1 ? n += `${t}=${r[t]}` : n += `${t}=${r[t]}&`;
41
- }), n;
42
- }, g = (r, n) => {
43
- let e = r, t = "";
44
- return r.includes("?") && (e = r.split("?")[0], t = "?" + r.split("?")[1]), Object.values(n).forEach((s) => {
45
- e += `/${s}`;
46
- }), e = e.replace(/\/\//g, "/"), t && (e = e + t), e;
36
+ }, g = (n) => {
37
+ let s = "";
38
+ const e = Object.keys(n);
39
+ return e && e.length && e.forEach((r, t) => {
40
+ t === e.length - 1 ? s += `${r}=${n[r]}` : s += `${r}=${n[r]}&`;
41
+ }), s;
42
+ }, p = (n, s) => {
43
+ const e = new URL(n, location.origin);
44
+ let { origin: r, pathname: t } = e;
45
+ t === "/" && (t = ""), s.map((l) => t += `/${l}`);
46
+ const o = new URL(`${r}${t}`);
47
+ return e.searchParams.forEach((l, a) => {
48
+ o.searchParams.append(a, l);
49
+ }), o.toString();
47
50
  };
48
- function $(r) {
49
- const n = /^(https?:\/\/[^/]+)/, e = r.match(n);
51
+ function $(n) {
52
+ const s = /^(https?:\/\/[^/]+)/, e = n.match(s);
50
53
  return e && e.length > 1 ? e[1] : null;
51
54
  }
52
55
  export {
53
- g as addPathParamsToUrl,
56
+ p as addPathParamsToUrl,
54
57
  h as funcUrlDel,
55
58
  f as getFullPath,
56
59
  $ as getOriginFromUrl,
57
- a as getUrlParams,
58
- p as objectToUrlparams,
60
+ i as getUrlParams,
61
+ g as objectToUrlparams,
59
62
  u as urlParamsToObject
60
63
  };
@@ -5,11 +5,12 @@
5
5
  */
6
6
  export declare const isRelativeOrSameDomain: (url: string) => boolean;
7
7
  /**
8
- * wei自动拼接上showLayout=false参数
8
+ * 自动拼接上showLayout=false参数
9
9
  * @param url
10
10
  * @returns
11
11
  */
12
12
  export declare const setShowLayout: (url: string) => string;
13
+ export declare const setShowWatermark: (url: string) => string;
13
14
  /**
14
15
  * url携带token
15
16
  * @param url
@@ -1,14 +1,19 @@
1
- import { getToken as o } from "@das-fed/utils/common-info";
2
- const n = (t) => !!(!t.startsWith("http") || t.startsWith(location.origin)), i = (t) => {
3
- if (!t) return "";
4
- let e = t;
5
- return n(t) && !t.includes("showLayout=false") && (e = t.indexOf("?") !== -1 ? t + "&showLayout=false" : t + "?showLayout=false"), e;
6
- }, a = (t) => {
7
- const e = o();
8
- return t.includes("?") ? `${t}&token=${e}` : `${t}?token=${e}`;
1
+ import { getToken as s } from "@das-fed/utils/common-info";
2
+ const o = (e) => !!(!e.startsWith("http") || e.startsWith(location.origin)), n = (e) => {
3
+ if (!e) return "";
4
+ let t = e;
5
+ return o(e) && !e.includes("showLayout=false") && (t = e.indexOf("?") !== -1 ? e + "&showLayout=false" : e + "?showLayout=false"), t;
6
+ }, i = (e) => {
7
+ if (!e) return "";
8
+ let t = "";
9
+ return o(e) && !e.includes("showWatermark=false") ? t = e.indexOf("?") !== -1 ? e + "&showWatermark=false" : e + "?showWatermark=false" : t = e, t;
10
+ }, r = (e) => {
11
+ const t = s();
12
+ return e.includes("?") ? `${e}&token=${t}` : `${e}?token=${t}`;
9
13
  };
10
14
  export {
11
- n as isRelativeOrSameDomain,
12
- i as setShowLayout,
13
- a as withToken
15
+ o as isRelativeOrSameDomain,
16
+ n as setShowLayout,
17
+ i as setShowWatermark,
18
+ r as withToken
14
19
  };
@@ -1,19 +1,20 @@
1
- import { getFavIcon as s } from "@das-fed/utils/common-info";
2
- import { pureImageSrc as l } from "@das-fed/utils/pure-image-src";
3
- import { systemConfiguration as m } from "@das-fed/utils/api-services/modules";
4
- const c = m.get("/visitor/appearance/with-default", (t) => (t.public = !0, t)), i = (t, o = "./logo.svg") => {
5
- const r = t || o;
1
+ import { getFavIcon as l } from "@das-fed/utils/common-info";
2
+ import { pureImageSrc as m } from "@das-fed/utils/pure-image-src";
3
+ import { systemConfiguration as c } from "@das-fed/utils/api-services";
4
+ const i = (o, r = "./logo.svg") => {
5
+ const t = o || r;
6
6
  let e = document.querySelector('link[rel*="icon"]');
7
- e ? e == null || e.setAttribute("href", r) : (e = document.createElement("link"), e.rel = "icon", e.type = "image/svg+xml", e.href = r, document.getElementsByTagName("head")[0].appendChild(e));
8
- }, f = async (t = "./logo.svg") => {
9
- let o = s();
10
- if (!o) {
11
- const [r, e] = await c().run();
12
- if (r) return;
13
- const { browserLogoImgHost: n = "", browserLogoImg: a = "" } = e;
14
- o = a ? n + l(a) : "";
7
+ e ? e == null || e.setAttribute("href", t) : (e = document.createElement("link"), e.rel = "icon", e.type = "image/svg+xml", e.href = t, document.getElementsByTagName("head")[0].appendChild(e));
8
+ }, f = async (o = "./logo.svg") => {
9
+ const r = c.get("/visitor/appearance/with-default", (e) => (e.public = !0, e));
10
+ let t = l();
11
+ if (!t) {
12
+ const [e, n] = await r().run();
13
+ if (e) return;
14
+ const { browserLogoImgHost: s = "", browserLogoImg: a = "" } = n || {};
15
+ t = a ? s + m(a) : "";
15
16
  }
16
- i(o, t);
17
+ i(t, o);
17
18
  };
18
19
  export {
19
20
  f as setDasHtmlIcon,