@das-fed/utils 6.4.0-hot.4 → 6.4.0-hot.6
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.
|
@@ -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,
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return {
|
|
8
|
-
initialZIndex: r,
|
|
9
|
-
currentZIndex: x,
|
|
10
|
-
nextZIndex: () => (c.value++, x.value)
|
|
11
|
-
};
|
|
12
|
-
}, o = v(), f = () => {
|
|
13
|
-
const n = e(() => o.initialZIndex.value), t = e(() => o.currentZIndex.value);
|
|
14
|
-
return {
|
|
15
|
-
initialZIndex: n,
|
|
16
|
-
currentZIndex: t,
|
|
17
|
-
nextZIndex: () => o.nextZIndex()
|
|
18
|
-
};
|
|
19
|
-
};
|
|
1
|
+
const n = () => [...document.body.querySelectorAll("*")].reduce(
|
|
2
|
+
(e, t) => Math.max(e, +window.getComputedStyle(t).zIndex || 0),
|
|
3
|
+
0
|
|
4
|
+
), d = () => ({
|
|
5
|
+
nextZIndex: () => n() + 1
|
|
6
|
+
});
|
|
20
7
|
export {
|
|
21
|
-
|
|
8
|
+
d as useZIndex
|
|
22
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "6.4.0-hot.
|
|
3
|
+
"version": "6.4.0-hot.6",
|
|
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/utils": "6.4.0-hot.
|
|
12
|
+
"@das-fed/utils": "6.4.0-hot.6",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@das-fed/cli": "6.4.0-hot.
|
|
24
|
+
"@das-fed/cli": "6.4.0-hot.6",
|
|
25
25
|
"@types/js-cookie": "^3.0.6",
|
|
26
26
|
"@types/lodash-es": "^4.17.12",
|
|
27
27
|
"@types/qs": "^6.9.15",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
30
30
|
"ant-design-vue": "3.2.20",
|
|
31
31
|
"consola": "^3.2.3",
|
|
32
|
-
"element-plus": "2.4.2",
|
|
33
32
|
"execa": "^9.3.0",
|
|
34
33
|
"fast-glob": "^3.3.2",
|
|
35
34
|
"fs-extra": "^11.2.0",
|
package/token-tools/index.js
CHANGED
|
@@ -7,7 +7,7 @@ function d(e) {
|
|
|
7
7
|
}
|
|
8
8
|
return e;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
10
|
+
var l = {
|
|
11
11
|
read: function(e) {
|
|
12
12
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
13
13
|
},
|
|
@@ -19,22 +19,22 @@ var m = {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
function u(e, o) {
|
|
22
|
-
function f(n,
|
|
22
|
+
function f(n, i, r) {
|
|
23
23
|
if (!(typeof document > "u")) {
|
|
24
24
|
r = d({}, o, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
25
|
-
var
|
|
26
|
-
for (var
|
|
27
|
-
r[
|
|
28
|
-
return document.cookie = n + "=" + e.write(
|
|
25
|
+
var c = "";
|
|
26
|
+
for (var s in r)
|
|
27
|
+
r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
|
|
28
|
+
return document.cookie = n + "=" + e.write(i, n) + c;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
function p(n) {
|
|
32
32
|
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
33
|
-
for (var
|
|
34
|
-
var
|
|
33
|
+
for (var i = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < i.length; c++) {
|
|
34
|
+
var s = i[c].split("="), h = s.slice(1).join("=");
|
|
35
35
|
try {
|
|
36
|
-
var v = decodeURIComponent(
|
|
37
|
-
if (r[v] = e.read(
|
|
36
|
+
var v = decodeURIComponent(s[0]);
|
|
37
|
+
if (r[v] = e.read(h, v), n === v)
|
|
38
38
|
break;
|
|
39
39
|
} catch {
|
|
40
40
|
}
|
|
@@ -46,11 +46,11 @@ function u(e, o) {
|
|
|
46
46
|
{
|
|
47
47
|
set: f,
|
|
48
48
|
get: p,
|
|
49
|
-
remove: function(n,
|
|
49
|
+
remove: function(n, i) {
|
|
50
50
|
f(
|
|
51
51
|
n,
|
|
52
52
|
"",
|
|
53
|
-
d({},
|
|
53
|
+
d({}, i, {
|
|
54
54
|
expires: -1
|
|
55
55
|
})
|
|
56
56
|
);
|
|
@@ -68,18 +68,18 @@ function u(e, o) {
|
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
var
|
|
72
|
-
const
|
|
73
|
-
|
|
71
|
+
var t = u(l, { path: "/" });
|
|
72
|
+
const g = "accessToken", a = "accessTokenExpiredAt", k = "refreshToken", m = "redirectUri", T = () => t.get(g) || sessionStorage.getItem(g) || "", x = (e) => t.get(e) || sessionStorage.getItem(e) || "", A = (e, o = {}) => {
|
|
73
|
+
t.set(g, e), t.set(a, o.accessTokenExpiredAt ?? "0"), t.set(k, o.refreshToken ?? ""), o.redirectUri && t.set(m, o.redirectUri);
|
|
74
74
|
}, U = () => {
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
const e =
|
|
75
|
+
t.remove(g), t.remove(a), t.remove(k), t.remove(m);
|
|
76
|
+
}, I = () => {
|
|
77
|
+
const e = t.get();
|
|
78
78
|
for (const o in e)
|
|
79
|
-
e.hasOwnProperty(o) &&
|
|
79
|
+
e.hasOwnProperty(o) && t.remove(o);
|
|
80
80
|
};
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
I as clearAllCookies,
|
|
83
83
|
T as getAccessToken,
|
|
84
84
|
x as getAccessTokenInfo,
|
|
85
85
|
U as removeAccessToken,
|
package/token-tools/index.js.gz
CHANGED
|
Binary file
|