@das-fed/utils 6.4.0-dev.13 → 6.4.0-dev.131
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 +53 -0
- package/api-services/i18n/index.js +27 -0
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +2158 -1651
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +2287 -1810
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +2287 -1810
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +2278 -1815
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +2287 -1810
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +2278 -1801
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +2270 -1811
- 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 +3427 -158
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +2287 -1810
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +2132 -1650
- 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 +2283 -1823
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +2275 -1798
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +2287 -1810
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +2287 -1810
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +2270 -1811
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +2294 -1817
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +2274 -1797
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +2287 -1810
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +2277 -1800
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +2276 -1799
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +2274 -1797
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +2287 -1810
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +2287 -1810
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +2260 -1797
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/index.d.ts +11 -3
- package/common-info/index.js +113 -56
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +865 -592
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +128 -12
- package/common-tools/calc-text-width/index.d.ts +1 -0
- package/common-tools/calc-text-width/index.js +10 -0
- package/common-tools/extract-file-name/index.d.ts +1 -0
- package/common-tools/extract-file-name/index.js +1715 -0
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-file-extension/index.d.ts +6 -0
- package/common-tools/get-file-extension/index.js +7 -0
- package/common-tools/get-url-params/index.d.ts +1 -1
- package/common-tools/index.d.ts +4 -0
- package/common-tools/index.js +4 -0
- package/common-tools/nest-tree-format/index.d.ts +1 -1
- package/common-tools/nest-tree-format/index.js +15 -15
- package/common-tools/setHtmlMinWH/index.js +4 -8
- package/common-tools/update-browser-title/index.d.ts +1 -0
- package/common-tools/update-browser-title/index.js +12 -0
- package/common-tools/update-fav-icon/index.js +15 -14
- package/create-api-service/i18n/index.d.ts +33 -0
- package/create-api-service/i18n/index.js +15 -0
- package/create-api-service/index.d.ts +3 -1
- package/create-api-service/index.js +2273 -1796
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +1 -3
- package/create-api-service/sso/index.js +1217 -847
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +1355 -1088
- package/curring-http/index.js.gz +0 -0
- package/directive/hoverInside/index.d.ts +1 -1
- package/dom-check-in/index.js +2 -2
- package/dom-watcher/index.d.ts +1 -1
- package/esm-map.json +9 -2
- package/hooks/popup-manager/use-zindex/index.d.ts +0 -2
- package/hooks/popup-manager/use-zindex/index.js +7 -20
- package/hooks/use-get-auth/index.d.ts +1 -1
- package/hooks/use-get-auth/index.js +30 -30
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/package.json +4 -4
- package/pinyin-first-character/index.js +19804 -20879
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +4 -2
- package/style/index.js.gz +0 -0
- package/style/math.d.ts +4 -4
- package/token-tools/index.d.ts +6 -6
- package/token-tools/index.js +8 -84
- package/use-low-code/index.js +6 -6
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/style.css +1 -1
- package/token-tools/index.js.gz +0 -0
package/curring-http/index.js.gz
CHANGED
|
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/dom-watcher/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface Config {
|
|
|
5
5
|
attributes?: boolean;
|
|
6
6
|
/** 要监视的特定属性名称的数组,如果未包含此属性,则对所有属性的更改都会触发变动通知; */
|
|
7
7
|
attributeFilter?: any[];
|
|
8
|
-
/**
|
|
8
|
+
/** 在attributes属性已经设为true的前提下, 将发生变化的属性节点之前的属性值记录下来(记录在MutationRecord对象的oldValue属性中); */
|
|
9
9
|
attributeOldValue?: boolean;
|
|
10
10
|
/** 在characterData属性已经设为true的前提下,将发生变化characterData节点之前的文本内容记录下来(记录在MutationRecord对象的oldValue属性中); */
|
|
11
11
|
characterDataOldValue?: boolean;
|
package/esm-map.json
CHANGED
|
@@ -112,7 +112,6 @@
|
|
|
112
112
|
"getAccessTokenInfo": "/token-tools/index",
|
|
113
113
|
"setAccessToken": "/token-tools/index",
|
|
114
114
|
"removeAccessToken": "/token-tools/index",
|
|
115
|
-
"clearAllCookies": "/token-tools/index",
|
|
116
115
|
"socketService": "/webSocket-service/index",
|
|
117
116
|
"getTokenFromQuery": "/common-info/getInfoFromUrl/index",
|
|
118
117
|
"getProjectInfoFromQuery": "/common-info/getInfoFromUrl/index",
|
|
@@ -135,5 +134,13 @@
|
|
|
135
134
|
"useAntvX6": "/dimple-canvas/use-dimple-canvas/core/antv-x6/index",
|
|
136
135
|
"addObject": "/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index",
|
|
137
136
|
"useKonva": "/dimple-canvas/use-dimple-canvas/core/konva/index",
|
|
138
|
-
"setShowWatermark": "/common-tools/platform-tools/index"
|
|
137
|
+
"setShowWatermark": "/common-tools/platform-tools/index",
|
|
138
|
+
"extractFilename": "/common-tools/extract-file-name/index",
|
|
139
|
+
"setBrowseTitle": "/common-tools/update-browser-title/index",
|
|
140
|
+
"getPersonalConfig": "/common-info/index",
|
|
141
|
+
"getProjectMessage": "/common-info/index",
|
|
142
|
+
"analyApi": "/api-services/modules/iot/index",
|
|
143
|
+
"calcTextWidth": "/common-tools/calc-text-width/index",
|
|
144
|
+
"getFileExtension": "/common-tools/get-file-extension/index",
|
|
145
|
+
"getLanguages": "/common-info/index"
|
|
139
146
|
}
|
|
@@ -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
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const useGetAuth: () => {
|
|
2
2
|
getApplication: (code?: string, appName?: "superadmin" | "enterpriseadmin") => unknown;
|
|
3
|
-
getMenu: (code: string, menuCode?: string, path?: string, appName?: "superadmin" | "enterpriseadmin") => unknown;
|
|
3
|
+
getMenu: (code: string, menuCode?: string | null, path?: string | null, appName?: "superadmin" | "enterpriseadmin", ignorePath?: boolean) => unknown;
|
|
4
4
|
getAuth: (options: {
|
|
5
5
|
applicationCode: string;
|
|
6
6
|
menuCode: string;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { flatTree as
|
|
2
|
-
import { projectNextTick as
|
|
3
|
-
import { vAuth as
|
|
4
|
-
import { portal as
|
|
5
|
-
const
|
|
1
|
+
import { flatTree as M } from "@das-fed/utils/common-tools";
|
|
2
|
+
import { projectNextTick as y } from "@das-fed/utils/nextTiken";
|
|
3
|
+
import { vAuth as T } from "@das-fed/utils/directive/auth";
|
|
4
|
+
import { portal as U, superadminPortal as w, enterpriseright as v } from "@das-fed/utils/api-services/modules";
|
|
5
|
+
const B = U.get("/appcategory"), C = w.get("/appcategory"), L = v.get("/permissionset/user-portal-menu"), P = w.get("/user-menu"), G = () => {
|
|
6
6
|
const d = async (r, i = "enterpriseadmin") => {
|
|
7
7
|
let t = null, s = {};
|
|
8
|
-
await
|
|
9
|
-
const [
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
return r ?
|
|
13
|
-
}, g = async (r, i, t, s = "enterpriseadmin") => {
|
|
14
|
-
var
|
|
15
|
-
await
|
|
16
|
-
let
|
|
8
|
+
await y(), i === "superadmin" ? t = C().run : (s = { userType: 1 }, t = B().run);
|
|
9
|
+
const [o, l] = await t(s);
|
|
10
|
+
if (o || !l || !l.length) return null;
|
|
11
|
+
const p = l.map((e) => e.apps).flat();
|
|
12
|
+
return r ? p.find((e) => e.code === r) : p;
|
|
13
|
+
}, g = async (r, i, t, s = "enterpriseadmin", o = !1) => {
|
|
14
|
+
var h;
|
|
15
|
+
await y();
|
|
16
|
+
let l = null, p = {
|
|
17
17
|
code: r,
|
|
18
18
|
showBtn: !0
|
|
19
19
|
};
|
|
20
|
-
s === "superadmin" ?
|
|
21
|
-
const [
|
|
22
|
-
if (
|
|
20
|
+
s === "superadmin" ? l = P().run : (p.userType = 1, l = L().run);
|
|
21
|
+
const [a, e] = await l(p);
|
|
22
|
+
if (a || !e || !e.length)
|
|
23
23
|
return i || t ? void 0 : [];
|
|
24
24
|
if (!i && !t) return e;
|
|
25
|
-
const
|
|
26
|
-
let
|
|
25
|
+
const m = e != null && e.length ? o ? e : e.filter((n) => n.routeUrl) : [], f = e != null && e.length ? e.filter((n) => !n.routeUrl && n.children).map((n) => n.children).flat() : [], u = [...m, ...f];
|
|
26
|
+
let c;
|
|
27
27
|
if (i)
|
|
28
|
-
|
|
28
|
+
c = u.find((n) => n.code === i || n.originalCode === i);
|
|
29
29
|
else if (t) {
|
|
30
|
-
const n = t.replace(((
|
|
31
|
-
|
|
30
|
+
const n = t.replace(((h = u[0]) == null ? void 0 : h.applicationPath) ?? "", "").replace(/\/\//g, "/");
|
|
31
|
+
c = u.find((A) => A.routeUrl && A.routeUrl === n);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return c;
|
|
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
|
|
39
|
+
var f;
|
|
40
|
+
const t = (r == null ? void 0 : r.applicationCode) ?? "", s = (r == null ? void 0 : r.menuCode) ?? "", o = (r == null ? void 0 : r.code) ?? "";
|
|
41
|
+
if (JSON.parse(sessionStorage.getItem("permission-btn") || "{}")[s]) return T(null, { applicationCode: t, menuCode: s, code: o });
|
|
42
42
|
if (!await d(t, i)) return !1;
|
|
43
|
-
const
|
|
44
|
-
return !
|
|
43
|
+
const a = await g(t, s, i);
|
|
44
|
+
return !a || !(a != null && a.children) || !((f = a.children) != null && f.length) ? !1 : !!M(a.children).find((u) => {
|
|
45
45
|
let c = (u == null ? void 0 : u.originalCode) ?? u.code;
|
|
46
|
-
return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c ===
|
|
46
|
+
return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c === o;
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
G as useGetAuth
|
|
53
53
|
};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.131",
|
|
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.
|
|
12
|
+
"@das-fed/utils": "6.4.0-dev.131",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@das-fed/cli": "6.4.0-dev.
|
|
24
|
+
"@das-fed/cli": "6.4.0-dev.131",
|
|
25
|
+
"@das-fed/web": "6.4.0-dev.131",
|
|
25
26
|
"@types/js-cookie": "^3.0.6",
|
|
26
27
|
"@types/lodash-es": "^4.17.12",
|
|
27
28
|
"@types/qs": "^6.9.15",
|
|
@@ -29,7 +30,6 @@
|
|
|
29
30
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
30
31
|
"ant-design-vue": "3.2.20",
|
|
31
32
|
"consola": "^3.2.3",
|
|
32
|
-
"element-plus": "2.4.2",
|
|
33
33
|
"execa": "^9.3.0",
|
|
34
34
|
"fast-glob": "^3.3.2",
|
|
35
35
|
"fs-extra": "^11.2.0",
|