@das-fed/utils 6.4.0-dev.5 → 6.4.0-dev.50
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/index.js +1703 -1802
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +1935 -2034
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +1935 -2034
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +1938 -2037
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +1935 -2034
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +1940 -2039
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +1935 -2034
- 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 +3249 -429
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +1935 -2034
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1840 -1939
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1949 -2048
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +1934 -2033
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +1936 -2035
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +1935 -2034
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +1935 -2034
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +1942 -2041
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +1935 -2034
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +1935 -2034
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +1940 -2039
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +1939 -2038
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +1935 -2034
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +1935 -2034
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +1935 -2034
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +1937 -2036
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.js +46 -38
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +837 -570
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +120 -104
- package/common-tools/extract-file-name/index.d.ts +1 -0
- package/common-tools/extract-file-name/index.js +1716 -0
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/index.d.ts +2 -0
- package/common-tools/index.js +2 -0
- package/common-tools/platform-tools/index.d.ts +2 -1
- package/common-tools/platform-tools/index.js +16 -11
- 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/index.js +1937 -2036
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +1193 -833
- 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/curring-http/type.d.ts +87 -87
- package/directive/auth/index.js.gz +0 -0
- package/esm-map.json +4 -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.js.gz +0 -0
- package/i18n-collection/en.js +21 -0
- package/i18n-collection/zh-CN.js +21 -0
- package/nextTiken/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/token-tools/index.d.ts +1 -6
- package/token-tools/index.js +8 -84
- package/use-low-code/index.js +11 -11
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/style.css +1 -1
- package/webSocket-service/index.js.gz +0 -0
- package/webSocket-service/type.d.ts +28 -28
- package/token-tools/index.js.gz +0 -0
|
Binary file
|
|
Binary file
|
package/common-info/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { getUrlParams as
|
|
3
|
-
import { getAccessToken as
|
|
4
|
-
import { getTokenFromQuery as
|
|
5
|
-
const S =
|
|
1
|
+
import { getConfig as p } from "@das-fed/utils/config";
|
|
2
|
+
import { getUrlParams as g } from "@das-fed/utils/common-tools";
|
|
3
|
+
import { getAccessToken as m } from "@das-fed/utils/token-tools";
|
|
4
|
+
import { getTokenFromQuery as f, getProjectInfoFromQuery as d } from "@das-fed/utils/common-info/getInfoFromUrl";
|
|
5
|
+
const S = m, J = () => {
|
|
6
6
|
var n;
|
|
7
7
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
8
8
|
return {
|
|
@@ -11,9 +11,9 @@ const S = I, C = () => {
|
|
|
11
11
|
flag: e.flag ?? null,
|
|
12
12
|
tenantId: ((n = e == null ? void 0 : e.tenant) == null ? void 0 : n.id) ?? ""
|
|
13
13
|
};
|
|
14
|
-
},
|
|
14
|
+
}, O = () => {
|
|
15
15
|
let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
16
|
-
const t =
|
|
16
|
+
const t = p();
|
|
17
17
|
return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
|
|
18
18
|
id: e.id ?? "",
|
|
19
19
|
name: e.name ?? "",
|
|
@@ -22,7 +22,7 @@ const S = I, C = () => {
|
|
|
22
22
|
email: e.email ?? "",
|
|
23
23
|
headPicture: e.headPicture ?? ""
|
|
24
24
|
};
|
|
25
|
-
},
|
|
25
|
+
}, P = () => {
|
|
26
26
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
27
27
|
return {
|
|
28
28
|
userId: e.id ?? "",
|
|
@@ -35,14 +35,21 @@ const S = I, C = () => {
|
|
|
35
35
|
};
|
|
36
36
|
}, b = () => {
|
|
37
37
|
let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
38
|
-
const t =
|
|
38
|
+
const t = p();
|
|
39
39
|
return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
|
|
40
40
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
41
|
-
|
|
41
|
+
code: (e == null ? void 0 : e.code) ?? 0,
|
|
42
42
|
name: (e == null ? void 0 : e.name) ?? "",
|
|
43
|
-
|
|
43
|
+
type: (e == null ? void 0 : e.type) ?? null,
|
|
44
|
+
parentId: (e == null ? void 0 : e.parentId) ?? "",
|
|
45
|
+
parentName: (e == null ? void 0 : e.parentName) ?? "",
|
|
46
|
+
parentType: (e == null ? void 0 : e.parentType) ?? null,
|
|
47
|
+
tenantId: (e == null ? void 0 : e.tenant) ?? "",
|
|
48
|
+
isParent: (e == null ? void 0 : e.isParent) ?? !1,
|
|
49
|
+
leaf: (e == null ? void 0 : e.leaf) ?? !1,
|
|
50
|
+
optional: (e == null ? void 0 : e.leaf) ?? !0
|
|
44
51
|
};
|
|
45
|
-
},
|
|
52
|
+
}, T = () => {
|
|
46
53
|
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
47
54
|
return {
|
|
48
55
|
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
@@ -53,32 +60,33 @@ const S = I, C = () => {
|
|
|
53
60
|
type: (e == null ? void 0 : e.type) ?? null
|
|
54
61
|
};
|
|
55
62
|
}, h = (e, t) => {
|
|
56
|
-
const n = "permission-btn", s =
|
|
57
|
-
if (!
|
|
58
|
-
const
|
|
63
|
+
const n = "permission-btn", s = I(), a = g(location.href, "app") || "", r = t || a || s.currentSubAppCode;
|
|
64
|
+
if (!r) return;
|
|
65
|
+
const o = g(location.href, "menu") || "", l = e || o || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
|
|
59
66
|
if (!c || JSON.stringify(c) === "{}") return;
|
|
60
|
-
const u = c[
|
|
61
|
-
return u && u.length ? u : c[
|
|
62
|
-
},
|
|
67
|
+
const u = c[r][l];
|
|
68
|
+
return u && u.length ? u : c[r]["origin-auth"] ? c[r]["origin-auth"][l] ?? [] : [];
|
|
69
|
+
}, M = (e, t) => h(e, t) ?? [], I = () => {
|
|
63
70
|
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
64
71
|
return {
|
|
65
72
|
appcategorys: e.appcategorys ?? [],
|
|
66
73
|
currentSubApp: e.currentSubApp ?? {},
|
|
67
74
|
currentSubAppCode: e.currentSubAppCode ?? "",
|
|
68
|
-
subAppList: e.subAppList ?? []
|
|
75
|
+
subAppList: e.subAppList ?? [],
|
|
76
|
+
menuCollapses: e.menuCollapses ?? []
|
|
69
77
|
};
|
|
70
78
|
}, j = (e, t = !1) => {
|
|
71
79
|
var s, a;
|
|
72
|
-
const n =
|
|
80
|
+
const n = I().subAppList;
|
|
73
81
|
if (e)
|
|
74
|
-
return t ? ((s = n == null ? void 0 : n.find((
|
|
82
|
+
return t ? ((s = n == null ? void 0 : n.find((r) => r.code === e)) == null ? void 0 : s.originalMenus) ?? [] : ((a = n == null ? void 0 : n.find((r) => r.code === e)) == null ? void 0 : a.menus) ?? [];
|
|
75
83
|
{
|
|
76
|
-
let
|
|
77
|
-
return t ? n == null || n.forEach((
|
|
78
|
-
o
|
|
79
|
-
}) : n == null || n.forEach((
|
|
80
|
-
o
|
|
81
|
-
}),
|
|
84
|
+
let r = {};
|
|
85
|
+
return t ? n == null || n.forEach((o) => {
|
|
86
|
+
r[o.code] = o.originalMenus ?? [];
|
|
87
|
+
}) : n == null || n.forEach((o) => {
|
|
88
|
+
r[o.code] = o.menus ?? [];
|
|
89
|
+
}), r;
|
|
82
90
|
}
|
|
83
91
|
}, v = () => {
|
|
84
92
|
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
@@ -89,27 +97,27 @@ const S = I, C = () => {
|
|
|
89
97
|
preTab: e.preTab ?? {}
|
|
90
98
|
};
|
|
91
99
|
}, U = () => {
|
|
92
|
-
const e =
|
|
100
|
+
const e = p(), t = sessionStorage.getItem("minioAddress");
|
|
93
101
|
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
94
102
|
}, k = () => ({
|
|
95
103
|
instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
|
|
96
|
-
}), E = () => localStorage.getItem("fav-icon") || "";
|
|
97
|
-
S() ||
|
|
98
|
-
var
|
|
99
|
-
(
|
|
104
|
+
}), E = () => localStorage.getItem("fav-icon") || "./logo.svg";
|
|
105
|
+
S() || f();
|
|
106
|
+
var i;
|
|
107
|
+
(i = b()) != null && i.id || d();
|
|
100
108
|
export {
|
|
101
109
|
E as getFavIcon,
|
|
102
|
-
|
|
110
|
+
T as getHomeInfo,
|
|
103
111
|
k as getInstanceInfo,
|
|
104
112
|
j as getMenus,
|
|
105
113
|
U as getMinioAddress,
|
|
106
114
|
h as getPageAuth,
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
M as getPageAuthBtn,
|
|
116
|
+
O as getPersonalInfo,
|
|
109
117
|
b as getProjectInfo,
|
|
110
|
-
|
|
118
|
+
I as getSubApps,
|
|
111
119
|
v as getTabInfo,
|
|
112
|
-
|
|
120
|
+
P as getTenantInfo,
|
|
113
121
|
S as getToken,
|
|
114
|
-
|
|
122
|
+
J as getUserInfo
|
|
115
123
|
};
|
package/common-info/index.js.gz
CHANGED
|
Binary file
|