@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.
- package/api-services/index.d.ts +2 -2
- package/api-services/index.js +3070 -3
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +2786 -3
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +2786 -3
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +2789 -6
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +2786 -3
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +2790 -7
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +2786 -3
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.d.ts +1 -1
- package/api-services/modules/file/index.js +157 -428
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +2786 -3
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.d.ts +21 -21
- package/api-services/modules/index.js +3069 -57
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +2799 -16
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +2787 -4
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +2786 -3
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +2786 -3
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +2786 -3
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +2793 -10
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +2786 -3
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +2786 -3
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +2789 -6
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +2788 -5
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +2786 -3
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +2786 -3
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +2786 -3
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.d.ts +1 -1
- package/api-services/src/create-service/index.js +2786 -2
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +575 -789
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/date-format/index.js +2 -1
- package/common-tools/get-url-params/index.d.ts +1 -1
- package/common-tools/get-url-params/index.js +49 -46
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/platform-tools/index.d.ts +2 -1
- package/common-tools/platform-tools/index.js +16 -11
- package/common-tools/update-fav-icon/index.js +15 -14
- package/create-api-service/index.js +1561 -2225
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +691 -906
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +1114 -1328
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/index.d.ts +8 -0
- package/directive/auth/index.js +62 -0
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/index.d.ts +6 -0
- package/directive/clickOutside/index.js +27 -0
- package/directive/hoverInside/index.d.ts +6 -0
- package/directive/hoverInside/index.js +21 -0
- package/directive/utils/index.d.ts +7 -0
- package/directive/utils/index.js +7 -0
- package/esm-map.json +136 -5
- package/hooks/popup-manager/use-zindex/index.d.ts +3 -0
- package/hooks/popup-manager/use-zindex/index.js +9 -0
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/index.d.ts +9 -0
- package/hooks/use-get-auth/index.js +53 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/package.json +5 -4
- package/pinyin-first-character/index.js +21049 -19959
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/token-tools/index.js +20 -20
- package/token-tools/index.js.gz +0 -0
- package/use-low-code/index.js +13 -13
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/style.css +1 -1
- package/vue/hooks/use-model-value/index.d.ts +5 -0
- package/vue/hooks/use-model-value/index.js +10 -0
|
Binary file
|
|
@@ -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)
|
|
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:
|
|
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
|
|
1
|
+
const i = (n, s) => {
|
|
2
2
|
let e = window.location.search || "";
|
|
3
|
-
if (
|
|
4
|
-
const
|
|
5
|
-
|
|
3
|
+
if (n && n !== location.href) {
|
|
4
|
+
const t = n.indexOf("?");
|
|
5
|
+
t !== -1 ? e = n.slice(t) : e = "";
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
7
|
+
const r = new URLSearchParams(e);
|
|
8
|
+
if (s)
|
|
9
|
+
return r.get(s);
|
|
10
10
|
{
|
|
11
|
-
let
|
|
12
|
-
for (let [
|
|
13
|
-
|
|
14
|
-
return
|
|
11
|
+
let t = {};
|
|
12
|
+
for (let [o, l] of r.entries())
|
|
13
|
+
t[o] = l;
|
|
14
|
+
return t;
|
|
15
15
|
}
|
|
16
|
-
}, f = (
|
|
17
|
-
let e = "",
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
}, h = (
|
|
23
|
-
const e =
|
|
24
|
-
if (!
|
|
25
|
-
let
|
|
26
|
-
if (!
|
|
27
|
-
let
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
}), e.includes("?") ? e.split("?")[0] + `?${
|
|
31
|
-
}, u = (
|
|
32
|
-
const
|
|
33
|
-
for (const [
|
|
34
|
-
e.hasOwnProperty(
|
|
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
|
-
},
|
|
37
|
-
let
|
|
38
|
-
const e = Object.keys(
|
|
39
|
-
return e && e.length && e.forEach((
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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 $(
|
|
49
|
-
const
|
|
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
|
-
|
|
56
|
+
p as addPathParamsToUrl,
|
|
54
57
|
h as funcUrlDel,
|
|
55
58
|
f as getFullPath,
|
|
56
59
|
$ as getOriginFromUrl,
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
i as getUrlParams,
|
|
61
|
+
g as objectToUrlparams,
|
|
59
62
|
u as urlParamsToObject
|
|
60
63
|
};
|
|
Binary file
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const isRelativeOrSameDomain: (url: string) => boolean;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
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
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
4
|
-
let
|
|
5
|
-
return
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
2
|
-
import { pureImageSrc as
|
|
3
|
-
import { systemConfiguration as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
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",
|
|
8
|
-
}, f = async (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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(
|
|
17
|
+
i(t, o);
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
20
|
f as setDasHtmlIcon,
|