@das-fed/utils 6.4.0-hot.9.1 → 6.4.0-test.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/i18n/index.d.ts +63 -0
- package/api-services/i18n/index.js +25 -0
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +1773 -1388
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +1961 -1606
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +1961 -1606
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +1963 -1608
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +1961 -1606
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +1963 -1608
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +1961 -1606
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.d.ts +1 -0
- package/api-services/modules/file/index.js +3292 -154
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +1961 -1606
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1743 -1381
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.d.ts +1 -0
- package/api-services/modules/iot/index.js +1974 -1618
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +1961 -1606
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +1961 -1606
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +1961 -1606
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +1961 -1606
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +1967 -1612
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +1961 -1606
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +1961 -1606
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +1974 -1619
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +1962 -1607
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +1961 -1606
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +1961 -1606
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +1961 -1606
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +1960 -1605
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/index.d.ts +9 -3
- package/common-info/index.js +110 -55
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +850 -579
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +116 -6
- package/common-tools/extract-file-name/index.js +922 -655
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/index.d.ts +1 -0
- package/common-tools/index.js +1 -0
- package/common-tools/update-browser-title/index.d.ts +1 -0
- package/common-tools/update-browser-title/index.js +12 -0
- package/create-api-service/i18n/index.d.ts +33 -0
- package/create-api-service/i18n/index.js +15 -0
- package/create-api-service/index.js +1960 -1605
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +0 -2
- package/create-api-service/sso/index.js +1198 -835
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +1364 -1097
- package/curring-http/index.js.gz +0 -0
- package/dom-check-in/index.js +2 -2
- package/esm-map.json +5 -2
- package/package.json +4 -3
- package/pinyin-first-character/index.js +19799 -20879
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +4 -2
- package/style/index.js.gz +0 -0
- package/token-tools/index.d.ts +6 -6
- package/token-tools/index.js +8 -84
- package/token-tools/index.js.gz +0 -0
|
Binary file
|
package/style/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.
|
|
2
|
+
* @vue/shared v3.5.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -8,7 +8,9 @@ process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
|
8
8
|
const u = (t) => {
|
|
9
9
|
const e = /* @__PURE__ */ Object.create(null);
|
|
10
10
|
return (r) => e[r] || (e[r] = t(r));
|
|
11
|
-
}, m = /-(\w)/g, p = u(
|
|
11
|
+
}, m = /-(\w)/g, p = u(
|
|
12
|
+
(t) => t.replace(m, (e, r) => r ? r.toUpperCase() : "")
|
|
13
|
+
), a = (t = "") => t.split(" ").filter((e) => !!e.trim()), h = (t, e) => {
|
|
12
14
|
if (!t || !e) return !1;
|
|
13
15
|
if (e.includes(" ")) throw new Error("className should not contain space.");
|
|
14
16
|
return t.classList.contains(e);
|
package/style/index.js.gz
CHANGED
|
Binary file
|
package/token-tools/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
declare const accessTokenExpiredAtKey = "accessTokenExpiredAt";
|
|
2
|
+
declare const refreshTokenKey = "refreshToken";
|
|
3
|
+
declare const redirectUriKey = "redirectUri";
|
|
4
|
+
declare const accessTokenInfoKey = "tokenInfo";
|
|
1
5
|
/**
|
|
2
6
|
* 获取token
|
|
3
7
|
* @returns token
|
|
@@ -6,16 +10,12 @@ export declare const getAccessToken: () => string;
|
|
|
6
10
|
/**
|
|
7
11
|
* 获取tokenInfo相关信息
|
|
8
12
|
*/
|
|
9
|
-
export declare const getAccessTokenInfo: (key:
|
|
13
|
+
export declare const getAccessTokenInfo: (key: typeof accessTokenExpiredAtKey | typeof refreshTokenKey | typeof redirectUriKey | typeof accessTokenInfoKey) => any;
|
|
10
14
|
/**
|
|
11
15
|
* 存入token、tokenInfo
|
|
12
16
|
* @param token
|
|
13
17
|
* @param info
|
|
14
18
|
*/
|
|
15
19
|
export declare const setAccessToken: (token: string, info?: any) => void;
|
|
16
|
-
/**
|
|
17
|
-
* 删除token、tokenInfo
|
|
18
|
-
*/
|
|
19
20
|
export declare const removeAccessToken: () => void;
|
|
20
|
-
|
|
21
|
-
export declare const clearAllCookies: () => void;
|
|
21
|
+
export {};
|
package/token-tools/index.js
CHANGED
|
@@ -1,87 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
for (var p in f)
|
|
6
|
-
e[p] = f[p];
|
|
7
|
-
}
|
|
8
|
-
return e;
|
|
9
|
-
}
|
|
10
|
-
var l = {
|
|
11
|
-
read: function(e) {
|
|
12
|
-
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
13
|
-
},
|
|
14
|
-
write: function(e) {
|
|
15
|
-
return encodeURIComponent(e).replace(
|
|
16
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
17
|
-
decodeURIComponent
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
function u(e, o) {
|
|
22
|
-
function f(n, i, r) {
|
|
23
|
-
if (!(typeof document > "u")) {
|
|
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 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
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function p(n) {
|
|
32
|
-
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
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
|
-
try {
|
|
36
|
-
var v = decodeURIComponent(s[0]);
|
|
37
|
-
if (r[v] = e.read(h, v), n === v)
|
|
38
|
-
break;
|
|
39
|
-
} catch {
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return n ? r[n] : r;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return Object.create(
|
|
46
|
-
{
|
|
47
|
-
set: f,
|
|
48
|
-
get: p,
|
|
49
|
-
remove: function(n, i) {
|
|
50
|
-
f(
|
|
51
|
-
n,
|
|
52
|
-
"",
|
|
53
|
-
d({}, i, {
|
|
54
|
-
expires: -1
|
|
55
|
-
})
|
|
56
|
-
);
|
|
57
|
-
},
|
|
58
|
-
withAttributes: function(n) {
|
|
59
|
-
return u(this.converter, d({}, this.attributes, n));
|
|
60
|
-
},
|
|
61
|
-
withConverter: function(n) {
|
|
62
|
-
return u(d({}, this.converter, n), this.attributes);
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
attributes: { value: Object.freeze(o) },
|
|
67
|
-
converter: { value: Object.freeze(e) }
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
}
|
|
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
|
-
}, U = () => {
|
|
75
|
-
t.remove(g), t.remove(a), t.remove(k), t.remove(m);
|
|
76
|
-
}, I = () => {
|
|
77
|
-
const e = t.get();
|
|
78
|
-
for (const o in e)
|
|
79
|
-
e.hasOwnProperty(o) && t.remove(o);
|
|
1
|
+
const o = "accessToken", r = "accessTokenExpiredAt", c = "refreshToken", s = "redirectUri", a = () => localStorage.getItem(o) ?? sessionStorage.getItem(o) ?? "", n = (e) => localStorage.getItem(e) ?? sessionStorage.getItem(e) ?? "", l = (e, t = {}) => {
|
|
2
|
+
localStorage.setItem(o, e), localStorage.setItem(r, t.accessTokenExpiredAt ?? "0"), localStorage.setItem(c, t.refreshToken ?? ""), t.redirectUri && localStorage.setItem(s, t.redirectUri);
|
|
3
|
+
}, g = () => {
|
|
4
|
+
localStorage.removeItem(o), localStorage.removeItem(r), localStorage.removeItem(c), localStorage.removeItem(s);
|
|
80
5
|
};
|
|
81
6
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
A as setAccessToken
|
|
7
|
+
a as getAccessToken,
|
|
8
|
+
n as getAccessTokenInfo,
|
|
9
|
+
g as removeAccessToken,
|
|
10
|
+
l as setAccessToken
|
|
87
11
|
};
|
package/token-tools/index.js.gz
DELETED
|
Binary file
|