@das-fed/upf-utils 6.4.0-dev.170 → 6.4.0-dev.172
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/es5.js +4661 -0
- package/api-services/i18n/es5.js +58 -0
- package/api-services/index.js +593 -611
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +847 -883
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +701 -715
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +882 -882
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +880 -880
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +473 -491
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +490 -508
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +4619 -0
- package/api-services/modules/file/index.js +942 -978
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +701 -715
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +651 -669
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1104 -1140
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +492 -510
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +698 -712
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +880 -880
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +490 -508
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +463 -481
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +880 -880
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +487 -505
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +881 -881
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +483 -501
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +490 -508
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +880 -880
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +880 -880
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +865 -901
- package/api-services/src/create-service/index.js.gz +0 -0
- package/atob/es5.js +12 -0
- package/common-info/es5.js +219 -0
- package/common-info/getIframeUrl/es5.js +18 -0
- package/common-info/getInfoFromUrl/es5.js +94 -0
- package/common-info/index.js +18 -18
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.js +2212 -0
- package/common-info/set-personal-info/index.js +172 -189
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/arr-tools/es5.js +14 -0
- package/common-tools/calc-text-width/es5.js +10 -0
- package/common-tools/date-format/es5.js +20 -0
- package/common-tools/es5.js +128 -0
- package/common-tools/extract-file-name/es5.js +2213 -0
- package/common-tools/extract-file-name/index.js +138 -155
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-file-extension/es5.js +7 -0
- package/common-tools/get-url-params/es5.js +109 -0
- package/common-tools/handle-data/es5.js +170 -0
- package/common-tools/handle-data/index.js +28 -28
- package/common-tools/handle-data/index.js.gz +0 -0
- package/common-tools/nest-tree-format/es5.js +58 -0
- package/common-tools/obj-tools/es5.js +15 -0
- package/common-tools/platform-tools/es5.js +24 -0
- package/common-tools/queue-promise/es5.js +15 -0
- package/common-tools/setHtmlMinWH/es5.js +8 -0
- package/common-tools/update-browser-title/es5.js +56 -0
- package/common-tools/update-fav-icon/es5.js +76 -0
- package/config/es5.js +17 -0
- package/create-api-service/check-token/es5.js +2307 -0
- package/create-api-service/check-token/index.js +158 -175
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/es5.js +3949 -0
- package/create-api-service/i18n/es5.js +38 -0
- package/create-api-service/index.js +503 -521
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/es5.js +35 -0
- package/create-api-service/sso/es5.js +2823 -0
- package/create-api-service/sso/index.js +309 -327
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/es5.js +2915 -0
- package/curring-http/index.js +285 -303
- package/curring-http/index.js.gz +0 -0
- package/dimple-canvas/es5.js +15 -0
- package/directive/auth/es5.js +96 -0
- package/directive/clickOutside/es5.js +87 -0
- package/directive/es5.js +23 -0
- package/directive/hoverInside/es5.js +61 -0
- package/directive/utils/es5.js +38 -0
- package/dom-check-in/es5.js +13 -0
- package/dom-watcher/es5.js +15 -0
- package/hooks/use-get-auth/es5.js +201 -0
- package/hooks/use-get-auth/index.js +22 -22
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/load-js/es5.js +15 -0
- package/nextTiken/es5.js +70 -0
- package/oss/es5.js +13 -0
- package/package.json +17 -4
- package/pinyin-first-character/es5.js +9313 -0
- package/pinyin-first-character/index.js +24 -24
- package/pinyin-first-character/index.js.gz +0 -0
- package/process-engine-info/es5.js +20 -0
- package/pure-image-src/es5.js +30 -0
- package/size-watcher/es5.js +35 -0
- package/style/es5.js +143 -0
- package/token-tools/es5.js +26 -0
- package/use-low-code/es5.js +117 -0
- package/use-low-code/index.js +2 -2
- package/use-low-code/index.js.gz +0 -0
- package/vue/es5.js +9 -0
- package/webSocket-service/es5.js +122 -0
- package/with-install/es5.js +8 -0
|
@@ -2,52 +2,52 @@ import { flatTree as w } from "@das-fed/upf-utils/common-tools";
|
|
|
2
2
|
import { projectNextTick as A } from "@das-fed/upf-utils/nextTiken";
|
|
3
3
|
import { vAuth as M } from "@das-fed/upf-utils/directive/auth";
|
|
4
4
|
import { portal as T, superadminPortal as y, enterpriseright as U } from "@das-fed/upf-utils/api-services/modules";
|
|
5
|
-
const
|
|
5
|
+
const B = T.get("/appcategory"), C = y.get("/appcategory"), L = U.get("/permissionset/user-portal-menu"), P = y.get("/user-menu"), v = () => {
|
|
6
6
|
const d = async (r, i = "enterpriseadmin") => {
|
|
7
7
|
let t = null, s = {};
|
|
8
|
-
await A(), i === "superadmin" ? t =
|
|
9
|
-
const [
|
|
10
|
-
if (
|
|
11
|
-
const f = l.map((
|
|
12
|
-
return r ? f.find((
|
|
8
|
+
await A(), i === "superadmin" ? t = C().run : (s = { userType: 1 }, t = B().run);
|
|
9
|
+
const [u, l] = await t(s);
|
|
10
|
+
if (u || !l || !l.length) return null;
|
|
11
|
+
const f = l.map((p) => p.apps).flat();
|
|
12
|
+
return r ? f.find((p) => p.code === r) : f;
|
|
13
13
|
}, g = async (r, i, t, s = "enterpriseadmin") => {
|
|
14
14
|
var c;
|
|
15
15
|
await A();
|
|
16
|
-
let
|
|
16
|
+
let u = null, l = {
|
|
17
17
|
code: r,
|
|
18
18
|
showBtn: !0
|
|
19
19
|
};
|
|
20
|
-
s === "superadmin" ?
|
|
21
|
-
const [f, e] = await
|
|
20
|
+
s === "superadmin" ? u = P().run : (l.userType = 1, u = L().run);
|
|
21
|
+
const [f, e] = await u(l);
|
|
22
22
|
if (f || !e || !e.length)
|
|
23
23
|
return i || t ? void 0 : [];
|
|
24
24
|
if (!i && !t) return e;
|
|
25
|
-
const
|
|
26
|
-
let
|
|
25
|
+
const p = e != null && e.length ? e.filter((n) => n.routeUrl) : [], m = e != null && e.length ? e.filter((n) => !n.routeUrl && n.children).map((n) => n.children).flat() : [], o = [...p, ...m];
|
|
26
|
+
let a;
|
|
27
27
|
if (i)
|
|
28
|
-
|
|
28
|
+
a = o.find((n) => n.code === i || n.originalCode === i);
|
|
29
29
|
else if (t) {
|
|
30
|
-
const n = t.replace(((c =
|
|
31
|
-
|
|
30
|
+
const n = t.replace(((c = o[0]) == null ? void 0 : c.applicationPath) ?? "", "").replace(/\/\//g, "/");
|
|
31
|
+
a = o.find((h) => h.routeUrl && h.routeUrl === n);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return a;
|
|
34
34
|
};
|
|
35
35
|
return {
|
|
36
36
|
getApplication: d,
|
|
37
37
|
getMenu: g,
|
|
38
38
|
getAuth: async (r, i = "enterpriseadmin") => {
|
|
39
|
-
var
|
|
40
|
-
const t = (r == null ? void 0 : r.applicationCode) ?? "", s = (r == null ? void 0 : r.menuCode) ?? "",
|
|
41
|
-
if (JSON.parse(sessionStorage.getItem("permission-btn") || "{}")[s]) return M(null, { applicationCode: t, menuCode: s, code:
|
|
39
|
+
var o;
|
|
40
|
+
const t = (r == null ? void 0 : r.applicationCode) ?? "", s = (r == null ? void 0 : r.menuCode) ?? "", u = (r == null ? void 0 : r.code) ?? "";
|
|
41
|
+
if (JSON.parse(sessionStorage.getItem("permission-btn") || "{}")[s]) return M(null, { applicationCode: t, menuCode: s, code: u });
|
|
42
42
|
if (!await d(t, i)) return !1;
|
|
43
43
|
const e = await g(t, s, i);
|
|
44
|
-
return !e || !(e != null && e.children) || !((
|
|
45
|
-
let c = (
|
|
46
|
-
return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c ===
|
|
44
|
+
return !e || !(e != null && e.children) || !((o = e.children) != null && o.length) ? !1 : !!w(e.children).find((a) => {
|
|
45
|
+
let c = (a == null ? void 0 : a.originalCode) ?? a.code;
|
|
46
|
+
return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c === u;
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
v as useGetAuth
|
|
53
53
|
};
|
|
Binary file
|
package/load-js/es5.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var config = require('@das-fed/upf-utils/config/es5');
|
|
4
|
+
var c = function c(t) {
|
|
5
|
+
var _config$getConfig = config.getConfig(),
|
|
6
|
+
i = _config$getConfig.baseURL,
|
|
7
|
+
_config$getConfig$pub = _config$getConfig.publicPath,
|
|
8
|
+
n = _config$getConfig$pub === void 0 ? "" : _config$getConfig$pub;
|
|
9
|
+
if (document.getElementById(t)) return;
|
|
10
|
+
var e = document.createElement("script");
|
|
11
|
+
return t.startsWith("/") && (t = "".concat(i, "/").concat(n, "/").concat(t)), t = t.replace(/\/\//g, "/").replace(/\/\//g, "/").replace("http:/", "http://").replace("https:/", "https://"), e.src = t, e.id = t, document.body.appendChild(e), new Promise(function (o, p) {
|
|
12
|
+
e.onload = o, e.onerror = p;
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
exports.loadJs = c;
|
package/nextTiken/es5.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var commonInfo = require('@das-fed/upf-utils/common-info/es5');
|
|
4
|
+
var k = function k() {
|
|
5
|
+
return new Promise(function (n) {
|
|
6
|
+
var _e = function e() {
|
|
7
|
+
var t = commonInfo.getToken();
|
|
8
|
+
if (t) return n(t);
|
|
9
|
+
setTimeout(function () {
|
|
10
|
+
return _e();
|
|
11
|
+
}, 50);
|
|
12
|
+
};
|
|
13
|
+
_e();
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
m = function m() {
|
|
17
|
+
return new Promise(function (n) {
|
|
18
|
+
var _e2 = function e() {
|
|
19
|
+
var t = commonInfo.getProjectInfo().id ? commonInfo.getProjectInfo().id : "";
|
|
20
|
+
if (t) return n(t);
|
|
21
|
+
setTimeout(function () {
|
|
22
|
+
return _e2();
|
|
23
|
+
}, 50);
|
|
24
|
+
};
|
|
25
|
+
_e2();
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
T = function T() {
|
|
29
|
+
return new Promise(function (n) {
|
|
30
|
+
var _e3 = function e() {
|
|
31
|
+
var t = commonInfo.getToken(),
|
|
32
|
+
o = commonInfo.getProjectInfo().id ? commonInfo.getProjectInfo().id : "";
|
|
33
|
+
if (t && o) return n(true);
|
|
34
|
+
setTimeout(function () {
|
|
35
|
+
return _e3();
|
|
36
|
+
}, 50);
|
|
37
|
+
};
|
|
38
|
+
_e3();
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
f = function f() {
|
|
42
|
+
return new Promise(function (n) {
|
|
43
|
+
var _e4 = function e() {
|
|
44
|
+
var t = commonInfo.getPersonalInfo();
|
|
45
|
+
if (t != null && t.id) return n(t);
|
|
46
|
+
setTimeout(function () {
|
|
47
|
+
return _e4();
|
|
48
|
+
}, 50);
|
|
49
|
+
};
|
|
50
|
+
_e4();
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
d = function d() {
|
|
54
|
+
return new Promise(function (n) {
|
|
55
|
+
var _e5 = function e() {
|
|
56
|
+
var o;
|
|
57
|
+
var t = commonInfo.getTenantInfo();
|
|
58
|
+
if ((o = t == null ? undefined : t.tenant) != null && o.id) return n(t);
|
|
59
|
+
setTimeout(function () {
|
|
60
|
+
return _e5();
|
|
61
|
+
}, 50);
|
|
62
|
+
};
|
|
63
|
+
_e5();
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
exports.projectNextTick = m;
|
|
67
|
+
exports.tenantInfoNextTick = d;
|
|
68
|
+
exports.tokenNextTick = T;
|
|
69
|
+
exports.tokenNextTick_1 = k;
|
|
70
|
+
exports.userInfoNextTick = f;
|
package/oss/es5.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var config = require('@das-fed/upf-utils/config/es5');
|
|
4
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
5
|
+
var n = function n(r) {
|
|
6
|
+
var t = r;
|
|
7
|
+
if (!t) return t;
|
|
8
|
+
t.startsWith("/") || (t = "/".concat(t)), new URL(t, typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('es5.js', document.baseURI).href);
|
|
9
|
+
var _config$getConfig = config.getConfig(),
|
|
10
|
+
e = _config$getConfig.baseURL;
|
|
11
|
+
return "".concat(e, "/oss/resource/front-end/auto-upload/pc").concat(t);
|
|
12
|
+
};
|
|
13
|
+
exports.oss = n;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/upf-utils",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.172",
|
|
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/upf-utils": "6.4.0-dev.
|
|
12
|
+
"@das-fed/upf-utils": "6.4.0-dev.172",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,8 +21,12 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@das-fed/upf-
|
|
24
|
+
"@babel/preset-env": "7.26.0",
|
|
25
|
+
"@das-fed/upf-cli": "6.4.0-dev.172",
|
|
26
|
+
"@das-fed/upf-web": "6.4.0-dev.172",
|
|
27
|
+
"@rollup/plugin-babel": "6.0.4",
|
|
28
|
+
"@rollup/plugin-commonjs": "^28.0.8",
|
|
29
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
26
30
|
"@types/js-cookie": "^3.0.6",
|
|
27
31
|
"@types/lodash-es": "^4.17.12",
|
|
28
32
|
"@types/qs": "^6.9.15",
|
|
@@ -36,6 +40,7 @@
|
|
|
36
40
|
"js-cookie": "^3.0.5",
|
|
37
41
|
"minimist": "^1.2.8",
|
|
38
42
|
"qs": "^6.11.2",
|
|
43
|
+
"rollup": "4.30.1",
|
|
39
44
|
"vite": "^5.1.6",
|
|
40
45
|
"vite-plugin-dts": "^3.7.3"
|
|
41
46
|
},
|
|
@@ -45,5 +50,13 @@
|
|
|
45
50
|
"publishConfig": {
|
|
46
51
|
"access": "public",
|
|
47
52
|
"registry": "https://registry.npmjs.org"
|
|
53
|
+
},
|
|
54
|
+
"exports": {
|
|
55
|
+
".": "./index.js",
|
|
56
|
+
"./package.json": "./package.json",
|
|
57
|
+
"./*": "./*/index.js",
|
|
58
|
+
"./*/*": "./*/*/index.js",
|
|
59
|
+
"./*/es5": "./*/es5.js",
|
|
60
|
+
"./*/*/es5": "./*/*/es5.js"
|
|
48
61
|
}
|
|
49
62
|
}
|