@das-fed/utils 6.4.0-dev.55.2 → 6.4.0-dev.55.21
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 +13 -0
- package/api-services/i18n/index.js +18 -13
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +852 -837
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +341 -337
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +341 -337
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +339 -335
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +341 -337
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +341 -337
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +341 -337
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +683 -673
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +341 -337
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +736 -726
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +349 -345
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +339 -335
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +312 -308
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +312 -308
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +341 -337
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +339 -335
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +341 -337
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +341 -337
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +338 -334
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +340 -336
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +341 -337
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +341 -337
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +341 -337
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +309 -305
- package/api-services/src/create-service/index.js.gz +0 -0
- package/create-api-service/i18n/index.d.ts +6 -0
- package/create-api-service/i18n/index.js +9 -8
- package/create-api-service/index.js +309 -305
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +35 -35
- package/create-api-service/sso/index.js.gz +0 -0
- package/package.json +4 -4
|
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,7 +1917,7 @@ 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",
|
|
@@ -1936,7 +1936,7 @@ const kt = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
|
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,7 +1950,7 @@ const kt = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
|
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
1955
|
const { redirectUri: t } = v().getData(), n = Ye(location.href, "kingdee_token") || "";
|
|
1956
1956
|
let r = {};
|
|
@@ -1961,7 +1961,7 @@ const Ir = async () => {
|
|
|
1961
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 {
|
|
@@ -2008,7 +2008,7 @@ const Ir = async () => {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
);
|
|
2010
2010
|
});
|
|
2011
|
-
const { accessTokenExpiredAt: t } = v().getData(), n =
|
|
2011
|
+
const { accessTokenExpiredAt: t } = v().getData(), n = Ct("code") || "";
|
|
2012
2012
|
if ((!H() || t === 0) && !n)
|
|
2013
2013
|
return J({ ...F, redirect_uri: $ });
|
|
2014
2014
|
let r = H();
|
|
@@ -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 = {
|
|
@@ -2081,7 +2081,7 @@ 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,
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "6.4.0-dev.55.
|
|
3
|
+
"version": "6.4.0-dev.55.21",
|
|
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-dev.55.
|
|
12
|
+
"@das-fed/utils": "6.4.0-dev.55.21",
|
|
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-dev.55.
|
|
25
|
-
"@das-fed/web": "6.4.0-dev.55.
|
|
24
|
+
"@das-fed/cli": "6.4.0-dev.55.21",
|
|
25
|
+
"@das-fed/web": "6.4.0-dev.55.21",
|
|
26
26
|
"@types/js-cookie": "^3.0.6",
|
|
27
27
|
"@types/lodash-es": "^4.17.12",
|
|
28
28
|
"@types/qs": "^6.9.15",
|