@das-fed/utils 7.0.7-hot.9 → 7.0.8
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.js +541 -560
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +331 -350
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +331 -350
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +336 -355
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +331 -350
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +337 -356
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +843 -880
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +554 -573
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +331 -350
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +554 -573
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1094 -1117
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +413 -432
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +843 -880
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +331 -350
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +331 -350
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +830 -867
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +331 -350
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +843 -880
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +353 -372
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +333 -352
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +331 -350
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +331 -350
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +833 -834
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +842 -879
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/index.js +12 -13
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.d.ts +1 -1
- package/common-info/set-personal-info/index.js +237 -253
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +0 -2
- package/common-tools/extract-file-name/index.js +550 -566
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-url-params/index.d.ts +0 -7
- package/common-tools/get-url-params/index.js +38 -45
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/platform-tools/index.d.ts +1 -1
- package/common-tools/platform-tools/index.js +15 -22
- package/create-api-service/index.js +848 -849
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +2 -2
- package/create-api-service/sso/index.js +491 -511
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +566 -582
- package/curring-http/index.js.gz +0 -0
- package/esm-map.json +1 -2
- package/package.json +4 -4
- package/process-engine-info/index.js +7 -8
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/token-tools/index.js +8 -80
- package/vue/hooks/use-model-value/index.d.ts +1 -5
- package/token-tools/index.js.gz +0 -0
|
Binary file
|
|
@@ -38,13 +38,6 @@ export declare const objectToUrlparams: (params: any) => string;
|
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
40
|
export declare const addPathParamsToUrl: (url: string, pathParams: string[]) => any;
|
|
41
|
-
/**
|
|
42
|
-
* 给url拼接query参数
|
|
43
|
-
* @param url 路径
|
|
44
|
-
* @param params 参数,object
|
|
45
|
-
* @returns
|
|
46
|
-
*/
|
|
47
|
-
export declare function appendQueryParams(url: string, params: Record<string, any>): any;
|
|
48
41
|
/**
|
|
49
42
|
* 从URL中获取origin
|
|
50
43
|
* @param url url
|
|
@@ -1,70 +1,63 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = (n, s) => {
|
|
2
2
|
let e = window.location.search || "";
|
|
3
|
-
if (
|
|
4
|
-
const t =
|
|
5
|
-
t !== -1 ? e =
|
|
3
|
+
if (n && n !== location.href) {
|
|
4
|
+
const t = n.indexOf("?");
|
|
5
|
+
t !== -1 ? e = n.slice(t) : e = "";
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const r = new URLSearchParams(e);
|
|
8
8
|
if (s)
|
|
9
|
-
return
|
|
9
|
+
return r.get(s);
|
|
10
10
|
{
|
|
11
11
|
let t = {};
|
|
12
|
-
for (let [o,
|
|
13
|
-
t[o] =
|
|
12
|
+
for (let [o, l] of r.entries())
|
|
13
|
+
t[o] = l;
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
}, f = (
|
|
17
|
-
let e = "",
|
|
16
|
+
}, f = (n, s = {}) => {
|
|
17
|
+
let e = "", r = "";
|
|
18
18
|
const t = Object.keys(s);
|
|
19
|
-
return t && t.length && t.forEach((o,
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
}, h = (
|
|
23
|
-
const e = s || location.href,
|
|
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
24
|
if (!t || !t.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
|
|
25
|
-
let o = t.filter((
|
|
25
|
+
let o = t.filter((a) => !n.includes(a));
|
|
26
26
|
if (!o || !o.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
|
|
27
|
-
let
|
|
28
|
-
return o.forEach((
|
|
29
|
-
c === t.length - 1 ?
|
|
30
|
-
}), e.includes("?") ? e.split("?")[0] + `?${
|
|
31
|
-
}, u = (
|
|
32
|
-
const s = new URLSearchParams(
|
|
33
|
-
for (const [
|
|
34
|
-
e.hasOwnProperty(
|
|
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
|
-
}, g = (
|
|
36
|
+
}, g = (n) => {
|
|
37
37
|
let s = "";
|
|
38
|
-
const e = Object.keys(
|
|
39
|
-
return e && e.length && e.forEach((
|
|
40
|
-
t === e.length - 1 ? 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
41
|
}), s;
|
|
42
|
-
}, p = (
|
|
43
|
-
const e = new URL(
|
|
44
|
-
let { origin:
|
|
45
|
-
t === "/" && (t = ""), s.map((
|
|
46
|
-
const o = new URL(`${
|
|
47
|
-
return e.searchParams.forEach((
|
|
48
|
-
o.searchParams.append(
|
|
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
49
|
}), o.toString();
|
|
50
50
|
};
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
return Object.entries(s).forEach(([n, t]) => {
|
|
54
|
-
e.searchParams.set(n, t);
|
|
55
|
-
}), e.toString();
|
|
56
|
-
}
|
|
57
|
-
function $(r) {
|
|
58
|
-
const s = /^(https?:\/\/[^/]+)/, e = r.match(s);
|
|
51
|
+
function $(n) {
|
|
52
|
+
const s = /^(https?:\/\/[^/]+)/, e = n.match(s);
|
|
59
53
|
return e && e.length > 1 ? e[1] : null;
|
|
60
54
|
}
|
|
61
55
|
export {
|
|
62
56
|
p as addPathParamsToUrl,
|
|
63
|
-
m as appendQueryParams,
|
|
64
57
|
h as funcUrlDel,
|
|
65
58
|
f as getFullPath,
|
|
66
59
|
$ as getOriginFromUrl,
|
|
67
|
-
|
|
60
|
+
i as getUrlParams,
|
|
68
61
|
g as objectToUrlparams,
|
|
69
62
|
u as urlParamsToObject
|
|
70
63
|
};
|
|
Binary file
|
|
@@ -9,7 +9,7 @@ export declare const isRelativeOrSameDomain: (url: string) => boolean;
|
|
|
9
9
|
* @param url
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
|
-
export declare const setShowLayout: (url: string) =>
|
|
12
|
+
export declare const setShowLayout: (url: string) => string;
|
|
13
13
|
export declare const setShowWatermark: (url: string) => string;
|
|
14
14
|
/**
|
|
15
15
|
* url携带token
|
|
@@ -1,26 +1,19 @@
|
|
|
1
|
-
import { getToken as
|
|
2
|
-
const o = (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
return e.
|
|
13
|
-
}, s = (t) => {
|
|
14
|
-
if (!t) return "";
|
|
15
|
-
let e = "";
|
|
16
|
-
return o(t) && !t.includes("showWatermark=false") ? e = t.indexOf("?") !== -1 ? t + "&showWatermark=false" : t + "?showWatermark=false" : e = t, e;
|
|
17
|
-
}, i = (t) => {
|
|
18
|
-
const e = n();
|
|
19
|
-
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}`;
|
|
20
13
|
};
|
|
21
14
|
export {
|
|
22
15
|
o as isRelativeOrSameDomain,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
n as setShowLayout,
|
|
17
|
+
i as setShowWatermark,
|
|
18
|
+
r as withToken
|
|
26
19
|
};
|