@das-fed/utils 6.4.0-test.3.2 → 6.4.0-test.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.
- package/api-services/i18n/index.d.ts +68 -0
- package/api-services/i18n/index.js +26 -0
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +1070 -1011
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +671 -642
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +671 -642
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +671 -642
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +671 -642
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +671 -642
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +671 -642
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +967 -932
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +671 -642
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1002 -967
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +672 -643
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +675 -646
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +668 -639
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +671 -642
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +671 -642
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +676 -647
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +671 -642
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +671 -642
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +669 -640
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +669 -640
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +671 -642
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +671 -642
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +671 -642
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +672 -643
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/index.d.ts +7 -1
- package/common-info/index.js +84 -51
- package/common-info/index.js.gz +0 -0
- package/common-info/type.d.ts +57 -2
- 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 +672 -643
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +55 -55
- package/create-api-service/sso/index.js.gz +0 -0
- package/dom-check-in/index.js +2 -2
- package/esm-map.json +3 -1
- package/package.json +4 -4
- package/token-tools/index.d.ts +6 -1
- package/token-tools/index.js +6 -6
- package/i18n-collection/en.js +0 -21
- package/i18n-collection/zh-CN.js +0 -21
|
Binary file
|
|
@@ -301,10 +301,10 @@ function Ue(e, t, n) {
|
|
|
301
301
|
return o = ft(o), !n && s ? "[" + o + "]" : o;
|
|
302
302
|
}).join(n ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function kn(e) {
|
|
305
305
|
return a.isArray(e) && !e.some(de);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const Cn = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
310
|
function se(e, t, n) {
|
|
@@ -333,18 +333,18 @@ function se(e, t, n) {
|
|
|
333
333
|
if (p && !h && typeof p == "object") {
|
|
334
334
|
if (a.endsWith(m, "{}"))
|
|
335
335
|
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
336
|
-
else if (a.isArray(p) &&
|
|
337
|
-
return m = ft(m), E.forEach(function(R,
|
|
336
|
+
else if (a.isArray(p) && kn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
|
|
337
|
+
return m = ft(m), E.forEach(function(R, k) {
|
|
338
338
|
!(a.isUndefined(R) || R === null) && t.append(
|
|
339
339
|
// eslint-disable-next-line no-nested-ternary
|
|
340
|
-
i === !0 ? Ue([m],
|
|
340
|
+
i === !0 ? Ue([m], k, s) : i === null ? m : m + "[]",
|
|
341
341
|
l(R)
|
|
342
342
|
);
|
|
343
343
|
}), !1;
|
|
344
344
|
}
|
|
345
345
|
return de(p) ? !0 : (t.append(Ue(h, m, s), l(p)), !1);
|
|
346
346
|
}
|
|
347
|
-
const d = [], w = Object.assign(
|
|
347
|
+
const d = [], w = Object.assign(Cn, {
|
|
348
348
|
defaultVisitor: u,
|
|
349
349
|
convertValue: l,
|
|
350
350
|
isVisitable: de
|
|
@@ -1069,16 +1069,16 @@ const bt = (e) => {
|
|
|
1069
1069
|
}, h.onerror = function() {
|
|
1070
1070
|
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1071
1071
|
}, h.ontimeout = function() {
|
|
1072
|
-
let
|
|
1072
|
+
let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1073
1073
|
const T = o.transitional || ht;
|
|
1074
|
-
o.timeoutErrorMessage && (
|
|
1075
|
-
|
|
1074
|
+
o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new y(
|
|
1075
|
+
k,
|
|
1076
1076
|
T.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1077
1077
|
e,
|
|
1078
1078
|
h
|
|
1079
1079
|
)), h = null;
|
|
1080
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(
|
|
1081
|
-
h.setRequestHeader(T,
|
|
1080
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(k, T) {
|
|
1081
|
+
h.setRequestHeader(T, k);
|
|
1082
1082
|
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), l && ([w, p] = ee(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = ee(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (u = (R) => {
|
|
1083
1083
|
h && (r(!R || R.type ? new j(null, e, h) : R), h.abort(), h = null);
|
|
1084
1084
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
@@ -1239,8 +1239,8 @@ const lr = async (e) => {
|
|
|
1239
1239
|
method: "POST",
|
|
1240
1240
|
body: r,
|
|
1241
1241
|
duplex: "half"
|
|
1242
|
-
}),
|
|
1243
|
-
if (a.isFormData(r) && (
|
|
1242
|
+
}), C;
|
|
1243
|
+
if (a.isFormData(r) && (C = T.headers.get("content-type")) && u.setContentType(C), T.body) {
|
|
1244
1244
|
const [N, K] = Fe(
|
|
1245
1245
|
h,
|
|
1246
1246
|
ee(Be(f))
|
|
@@ -1263,11 +1263,11 @@ const lr = async (e) => {
|
|
|
1263
1263
|
const R = he && (l === "stream" || l === "response");
|
|
1264
1264
|
if (he && (c || R && m)) {
|
|
1265
1265
|
const T = {};
|
|
1266
|
-
["status", "statusText", "headers"].forEach((
|
|
1267
|
-
T[
|
|
1266
|
+
["status", "statusText", "headers"].forEach((Ce) => {
|
|
1267
|
+
T[Ce] = S[Ce];
|
|
1268
1268
|
});
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1269
|
+
const C = a.toFiniteNumber(S.headers.get("content-length")), [N, K] = c && Fe(
|
|
1270
|
+
C,
|
|
1271
1271
|
ee(Be(c), !0)
|
|
1272
1272
|
) || [];
|
|
1273
1273
|
S = new Response(
|
|
@@ -1278,10 +1278,10 @@ const lr = async (e) => {
|
|
|
1278
1278
|
);
|
|
1279
1279
|
}
|
|
1280
1280
|
l = l || "text";
|
|
1281
|
-
let
|
|
1282
|
-
return !R && m && m(), await new Promise((T,
|
|
1283
|
-
wt(T,
|
|
1284
|
-
data:
|
|
1281
|
+
let k = await te[a.findKey(te, l) || "text"](S, e);
|
|
1282
|
+
return !R && m && m(), await new Promise((T, C) => {
|
|
1283
|
+
wt(T, C, {
|
|
1284
|
+
data: k,
|
|
1285
1285
|
headers: A.from(S.headers),
|
|
1286
1286
|
status: S.status,
|
|
1287
1287
|
statusText: S.statusText,
|
|
@@ -1775,7 +1775,7 @@ var gr = ge(wr, { path: "/" }), $e;
|
|
|
1775
1775
|
const At = typeof window < "u", br = (e) => typeof e == "string", Je = () => +Date.now(), be = () => {
|
|
1776
1776
|
};
|
|
1777
1777
|
At && (($e = window == null ? void 0 : window.navigator) != null && $e.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1778
|
-
function
|
|
1778
|
+
function ke(e) {
|
|
1779
1779
|
return typeof e == "function" ? e() : Ut(e);
|
|
1780
1780
|
}
|
|
1781
1781
|
function Er(e, t) {
|
|
@@ -1792,7 +1792,7 @@ function Sr(e, t = !0, n = !0, r = !1) {
|
|
|
1792
1792
|
s && (clearTimeout(s), s = void 0, c(), c = be);
|
|
1793
1793
|
};
|
|
1794
1794
|
return (d) => {
|
|
1795
|
-
const w =
|
|
1795
|
+
const w = ke(e), g = Date.now() - o, p = () => f = d();
|
|
1796
1796
|
return l(), w <= 0 ? (o = Date.now(), p()) : (g > w && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1797
1797
|
c = r ? h : m, s = setTimeout(() => {
|
|
1798
1798
|
o = Date.now(), i = !0, m(p()), l();
|
|
@@ -1808,7 +1808,7 @@ function Tr(e) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
function Or(e) {
|
|
1810
1810
|
var t;
|
|
1811
|
-
const n =
|
|
1811
|
+
const n = ke(e);
|
|
1812
1812
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1813
1813
|
}
|
|
1814
1814
|
const _t = At ? window : void 0;
|
|
@@ -1819,7 +1819,7 @@ function Ve(...e) {
|
|
|
1819
1819
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1820
1820
|
const s = [], i = () => {
|
|
1821
1821
|
s.forEach((u) => u()), s.length = 0;
|
|
1822
|
-
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Se(() => [Or(t),
|
|
1822
|
+
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Se(() => [Or(t), ke(o)], ([u, d]) => {
|
|
1823
1823
|
i(), u && s.push(...n.flatMap((w) => r.map((g) => c(u, w, g, d))));
|
|
1824
1824
|
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1825
1825
|
f(), i();
|
|
@@ -1855,9 +1855,9 @@ var Qe;
|
|
|
1855
1855
|
(function(e) {
|
|
1856
1856
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1857
1857
|
})(Qe || (Qe = {}));
|
|
1858
|
-
var
|
|
1858
|
+
var kr = Object.defineProperty, Ge = Object.getOwnPropertySymbols, Cr = Object.prototype.hasOwnProperty, Pr = Object.prototype.propertyIsEnumerable, Xe = (e, t, n) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Nr = (e, t) => {
|
|
1859
1859
|
for (var n in t || (t = {}))
|
|
1860
|
-
|
|
1860
|
+
Cr.call(t, n) && Xe(e, n, t[n]);
|
|
1861
1861
|
if (Ge)
|
|
1862
1862
|
for (var n of Ge(t))
|
|
1863
1863
|
Pr.call(t, n) && Xe(e, n, t[n]);
|
|
@@ -1909,7 +1909,7 @@ const xt = { triggerProxySso: "triggerProxySso" }, Lr = () => {
|
|
|
1909
1909
|
});
|
|
1910
1910
|
};
|
|
1911
1911
|
window.top !== window.self && Lr();
|
|
1912
|
-
let
|
|
1912
|
+
let kt = (e = 21) => {
|
|
1913
1913
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1914
1914
|
for (; e--; ) {
|
|
1915
1915
|
let r = n[e] & 63;
|
|
@@ -1917,14 +1917,14 @@ let Ct = (e = 21) => {
|
|
|
1917
1917
|
}
|
|
1918
1918
|
return t;
|
|
1919
1919
|
};
|
|
1920
|
-
const
|
|
1920
|
+
const Ct = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
1921
1921
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1922
1922
|
// 重定向到登录页
|
|
1923
1923
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1924
1924
|
// 清除登录信息
|
|
1925
1925
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1926
1926
|
// 通过code获取token
|
|
1927
|
-
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Re(), Fr = "/application", $ = location.origin + Fr,
|
|
1927
|
+
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Re(), Fr = "/application", $ = location.origin + Fr, F = {
|
|
1928
1928
|
response_type: "code",
|
|
1929
1929
|
scope: "sever",
|
|
1930
1930
|
client_id: "sys",
|
|
@@ -1936,7 +1936,7 @@ const kt = (e) => new URL(location.href).searchParams.get(e), F = {
|
|
|
1936
1936
|
window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(e));
|
|
1937
1937
|
else {
|
|
1938
1938
|
const t = ["code", "state", "kingdee_token", "redirect_url"];
|
|
1939
|
-
window.history.replaceState(
|
|
1939
|
+
window.history.replaceState({}, "", Ft(t));
|
|
1940
1940
|
}
|
|
1941
1941
|
}, Pt = Y(!1), Nt = (e) => {
|
|
1942
1942
|
if (e <= 0) return;
|
|
@@ -1950,27 +1950,27 @@ const kt = (e) => new URL(location.href).searchParams.get(e), F = {
|
|
|
1950
1950
|
};
|
|
1951
1951
|
localStorage.getItem("idelTime") && Nt(Number(localStorage.getItem("idelTime")));
|
|
1952
1952
|
const Ir = async () => {
|
|
1953
|
-
const e =
|
|
1953
|
+
const e = Ct("code") || "";
|
|
1954
1954
|
if (!e) return H();
|
|
1955
|
-
const { redirectUri: t } =
|
|
1955
|
+
const { redirectUri: t } = v().getData(), n = Ye(location.href, "kingdee_token") || "";
|
|
1956
1956
|
let r = {};
|
|
1957
1957
|
const o = {
|
|
1958
1958
|
grant_type: "authorization_code",
|
|
1959
1959
|
code: e,
|
|
1960
|
-
client_id:
|
|
1961
|
-
client_secret:
|
|
1960
|
+
client_id: F.client_id,
|
|
1961
|
+
client_secret: F.client_secret,
|
|
1962
1962
|
redirect_uri: t || $,
|
|
1963
1963
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1964
|
-
nonce:
|
|
1964
|
+
nonce: kt()
|
|
1965
1965
|
};
|
|
1966
1966
|
n && (sessionStorage.setItem("kingdee_token", n), o.redirect_uri = `${o.redirect_uri}?kingdee_token=${n}`);
|
|
1967
1967
|
try {
|
|
1968
|
-
await b.create().get(
|
|
1968
|
+
await b.create().get(B.token, { baseURL: Ze });
|
|
1969
1969
|
} catch {
|
|
1970
1970
|
}
|
|
1971
1971
|
try {
|
|
1972
1972
|
r = await b.create().post(
|
|
1973
|
-
|
|
1973
|
+
B.token,
|
|
1974
1974
|
{},
|
|
1975
1975
|
{
|
|
1976
1976
|
baseURL: Ze,
|
|
@@ -1987,15 +1987,15 @@ const Ir = async () => {
|
|
|
1987
1987
|
refreshToken: c,
|
|
1988
1988
|
info: r.data
|
|
1989
1989
|
};
|
|
1990
|
-
|
|
1990
|
+
v().save(l), await et(s);
|
|
1991
1991
|
const u = Number(f) - (/* @__PURE__ */ new Date()).getTime();
|
|
1992
1992
|
return u && u > 0 && (Nt(u), u && localStorage.setItem("idelTime", u.toString())), Br(), s;
|
|
1993
1993
|
} catch {
|
|
1994
|
-
return J({ ...
|
|
1994
|
+
return J({ ...F, redirect_uri: t || $ });
|
|
1995
1995
|
}
|
|
1996
1996
|
}, M = Y(!1), Wr = async (e) => {
|
|
1997
1997
|
if (e.public) return "";
|
|
1998
|
-
if (Pt.value) return J({ ...
|
|
1998
|
+
if (Pt.value) return J({ ...F, redirect_uri: $ });
|
|
1999
1999
|
if (M.value)
|
|
2000
2000
|
return await new Promise(async (o) => {
|
|
2001
2001
|
Se(
|
|
@@ -2008,13 +2008,13 @@ const Ir = async () => {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
);
|
|
2010
2010
|
});
|
|
2011
|
-
const { accessTokenExpiredAt: t } =
|
|
2011
|
+
const { accessTokenExpiredAt: t } = v().getData(), n = Ct("code") || "";
|
|
2012
2012
|
if ((!H() || t === 0) && !n)
|
|
2013
|
-
return J({ ...
|
|
2013
|
+
return J({ ...F, redirect_uri: $ });
|
|
2014
2014
|
let r = H();
|
|
2015
2015
|
M.value = !0;
|
|
2016
2016
|
try {
|
|
2017
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await jr(
|
|
2017
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await jr(F)), r = await Ir(), M.value = !1;
|
|
2018
2018
|
} catch {
|
|
2019
2019
|
M.value = !1;
|
|
2020
2020
|
}
|
|
@@ -2024,19 +2024,19 @@ const Ir = async () => {
|
|
|
2024
2024
|
const { baseURL: t, ssoLocale: n } = Re();
|
|
2025
2025
|
if (Ee) return Ee(e);
|
|
2026
2026
|
e.logout = "true", n && (e.locale = "locale");
|
|
2027
|
-
const r = Object.keys(e).filter((s) => s !== "client_secret").map((s) => `${s}=${e[s]}`).join("&"), o = `${t}${
|
|
2028
|
-
localStorage.
|
|
2027
|
+
const r = Object.keys(e).filter((s) => s !== "client_secret").map((s) => `${s}=${e[s]}`).join("&"), o = `${t}${B.oauth}?${r}`;
|
|
2028
|
+
localStorage.removeItem("idelTime"), sessionStorage.clear(), v().remove(), v().save({ redirectUri: e.redirect_uri }), b.create().get(B.logoutCurpage, { baseURL: t }), window.__isAutoCloseApp = !1, location.replace(o);
|
|
2029
2029
|
};
|
|
2030
2030
|
Dr(J);
|
|
2031
2031
|
const jr = async (e) => {
|
|
2032
|
-
const { baseURL: t } = Re(), { refreshToken: n, redirectUri: r } =
|
|
2032
|
+
const { baseURL: t } = Re(), { refreshToken: n, redirectUri: r } = v().getData();
|
|
2033
2033
|
try {
|
|
2034
|
-
await b.create().get(
|
|
2034
|
+
await b.create().get(B.token, { baseURL: t });
|
|
2035
2035
|
} catch {
|
|
2036
2036
|
}
|
|
2037
2037
|
try {
|
|
2038
2038
|
const o = await b.create().post(
|
|
2039
|
-
|
|
2039
|
+
B.token,
|
|
2040
2040
|
{},
|
|
2041
2041
|
{
|
|
2042
2042
|
baseURL: t,
|
|
@@ -2046,7 +2046,7 @@ const jr = async (e) => {
|
|
|
2046
2046
|
client_id: e.client_id,
|
|
2047
2047
|
client_secret: e.client_secret,
|
|
2048
2048
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2049
|
-
nonce:
|
|
2049
|
+
nonce: kt()
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
2052
|
), { access_token: s = "", expires_in: i = 0, refresh_token: c = "" } = o.data, f = {
|
|
@@ -2055,11 +2055,11 @@ const jr = async (e) => {
|
|
|
2055
2055
|
refreshToken: c,
|
|
2056
2056
|
info: o.data
|
|
2057
2057
|
};
|
|
2058
|
-
return
|
|
2058
|
+
return v().save(f), await et(s), s;
|
|
2059
2059
|
} catch {
|
|
2060
2060
|
return J({ ...e, redirect_uri: r || $ });
|
|
2061
2061
|
}
|
|
2062
|
-
},
|
|
2062
|
+
}, v = () => ({
|
|
2063
2063
|
getData: () => ({
|
|
2064
2064
|
accessToken: H(),
|
|
2065
2065
|
accessTokenExpiredAt: Q("accessTokenExpiredAt") ? Number(Q("accessTokenExpiredAt")) : "",
|
|
@@ -2081,11 +2081,11 @@ const jr = async (e) => {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
});
|
|
2083
2083
|
export {
|
|
2084
|
-
|
|
2084
|
+
Ct as getQuery,
|
|
2085
2085
|
Wr as getToken,
|
|
2086
2086
|
Ir as getTokenFromCode,
|
|
2087
|
-
|
|
2087
|
+
F as getTokenParams,
|
|
2088
2088
|
J as login,
|
|
2089
2089
|
$ as real_uri,
|
|
2090
|
-
|
|
2090
|
+
v as tokenStorage
|
|
2091
2091
|
};
|
|
Binary file
|
package/dom-check-in/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const d = (e) => {
|
|
2
2
|
const t = window.event;
|
|
3
|
-
let i = Number(t.clientX), n = Number(t.clientY), l = Number(e.getBoundingClientRect().left),
|
|
4
|
-
return i > l && i <
|
|
3
|
+
let i = Number(t.clientX), n = Number(t.clientY), l = Number(e.getBoundingClientRect().left), r = Number(l + e.clientWidth), c = Number(e.getBoundingClientRect().top), u = Number(c + e.clientHeight);
|
|
4
|
+
return i > l && i < r && n > c && n < u;
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
d as domCheckIn
|
package/esm-map.json
CHANGED
|
@@ -136,5 +136,7 @@
|
|
|
136
136
|
"useKonva": "/dimple-canvas/use-dimple-canvas/core/konva/index",
|
|
137
137
|
"setShowWatermark": "/common-tools/platform-tools/index",
|
|
138
138
|
"extractFilename": "/common-tools/extract-file-name/index",
|
|
139
|
-
"setBrowseTitle": "/common-tools/update-browser-title/index"
|
|
139
|
+
"setBrowseTitle": "/common-tools/update-browser-title/index",
|
|
140
|
+
"getPersonalConfig": "/common-info/index",
|
|
141
|
+
"getProjectMessage": "/common-info/index"
|
|
140
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "6.4.0-test.
|
|
3
|
+
"version": "6.4.0-test.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-test.
|
|
12
|
+
"@das-fed/utils": "6.4.0-test.6",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@das-fed/cli": "6.4.0-test.
|
|
25
|
-
"@das-fed/web": "6.4.0-test.
|
|
24
|
+
"@das-fed/cli": "6.4.0-test.6",
|
|
25
|
+
"@das-fed/web": "6.4.0-test.6",
|
|
26
26
|
"@types/js-cookie": "^3.0.6",
|
|
27
27
|
"@types/lodash-es": "^4.17.12",
|
|
28
28
|
"@types/qs": "^6.9.15",
|
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,7 +10,7 @@ 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
|
|
@@ -14,3 +18,4 @@ export declare const getAccessTokenInfo: (key: "accessTokenExpiredAt" | "refresh
|
|
|
14
18
|
*/
|
|
15
19
|
export declare const setAccessToken: (token: string, info?: any) => void;
|
|
16
20
|
export declare const removeAccessToken: () => void;
|
|
21
|
+
export {};
|
package/token-tools/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const o = "accessToken", r = "accessTokenExpiredAt", c = "refreshToken", s = "redirectUri", a = () => localStorage.getItem(o) ?? "",
|
|
2
|
-
localStorage.setItem(o,
|
|
3
|
-
},
|
|
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
4
|
localStorage.removeItem(o), localStorage.removeItem(r), localStorage.removeItem(c), localStorage.removeItem(s);
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
a as getAccessToken,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
n as getAccessTokenInfo,
|
|
9
|
+
g as removeAccessToken,
|
|
10
|
+
l as setAccessToken
|
|
11
11
|
};
|
package/i18n-collection/en.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
导入进度: "",
|
|
3
|
-
上传失败: "",
|
|
4
|
-
导入成功: "",
|
|
5
|
-
导出进度: "",
|
|
6
|
-
导出: "",
|
|
7
|
-
导入: "",
|
|
8
|
-
失败: "",
|
|
9
|
-
部分数据校验不通过: "",
|
|
10
|
-
请下载附件并修改: "",
|
|
11
|
-
重新导入: "",
|
|
12
|
-
成功: "",
|
|
13
|
-
部分: "",
|
|
14
|
-
参数校验错误: "",
|
|
15
|
-
接口地址未找到: "",
|
|
16
|
-
服务器内部错误: "",
|
|
17
|
-
解析错误: "",
|
|
18
|
-
网络异常: "",
|
|
19
|
-
请检查您的网络情况: "",
|
|
20
|
-
请求配置异常: "",
|
|
21
|
-
};
|
package/i18n-collection/zh-CN.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
导入进度: "导入进度",
|
|
3
|
-
上传失败: "上传失败",
|
|
4
|
-
导入成功: "导入成功",
|
|
5
|
-
导出进度: "导出进度",
|
|
6
|
-
导出: "导出",
|
|
7
|
-
导入: "导入",
|
|
8
|
-
失败: "失败",
|
|
9
|
-
部分数据校验不通过: "部分数据校验不通过",
|
|
10
|
-
请下载附件并修改: "请下载附件并修改",
|
|
11
|
-
重新导入: "重新导入",
|
|
12
|
-
成功: "成功",
|
|
13
|
-
部分: "部分",
|
|
14
|
-
参数校验错误: "参数校验错误",
|
|
15
|
-
接口地址未找到: "接口地址未找到",
|
|
16
|
-
服务器内部错误: "服务器内部错误",
|
|
17
|
-
解析错误: "解析错误",
|
|
18
|
-
网络异常: "网络异常",
|
|
19
|
-
请检查您的网络情况: "请检查您的网络情况",
|
|
20
|
-
请求配置异常: "请求配置异常",
|
|
21
|
-
};
|