@das-fed/upf-utils 6.4.0-dev.222 → 6.4.0-dev.224
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 +1759 -1835
- package/api-services/index.js +1351 -1419
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +2031 -2095
- package/api-services/modules/app-manage/index.js +1673 -1723
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +2128 -2204
- package/api-services/modules/authentication/index.js +1740 -1808
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +2239 -2303
- package/api-services/modules/bems/index.js +1851 -1901
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +2232 -2296
- package/api-services/modules/contract/index.js +1850 -1900
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +2032 -2096
- package/api-services/modules/duty-manage/index.js +1674 -1724
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +2128 -2204
- package/api-services/modules/enterpriseright/index.js +1744 -1812
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1864 -1950
- package/api-services/modules/file/es5.js +1728 -1804
- package/api-services/modules/file/index.js +1338 -1406
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +2128 -2204
- package/api-services/modules/gateway-edge/index.js +1744 -1812
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1377 -1459
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +2053 -2117
- package/api-services/modules/iot/index.js +1684 -1734
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +2232 -2296
- package/api-services/modules/justauth/index.js +1849 -1899
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +2132 -2208
- package/api-services/modules/knowledge/index.js +1743 -1811
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +2232 -2296
- package/api-services/modules/link/index.js +1850 -1900
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +2128 -2204
- package/api-services/modules/permission/index.js +1744 -1812
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +2046 -2110
- package/api-services/modules/platformManage/index.js +1678 -1728
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +2232 -2296
- package/api-services/modules/portal/index.js +1850 -1900
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +2089 -2156
- package/api-services/modules/space-manage/index.js +1715 -1769
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +2238 -2302
- package/api-services/modules/super-admin/index.js +1851 -1901
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +2245 -2312
- package/api-services/modules/supplier/index.js +1858 -1912
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +2232 -2296
- package/api-services/modules/supplychain-manage/index.js +1850 -1900
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +2128 -2204
- package/api-services/modules/systemConfiguration/index.js +1744 -1812
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +2232 -2296
- package/api-services/modules/tool/index.js +1850 -1900
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +2029 -2093
- package/api-services/src/create-service/index.js +1671 -1721
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +75 -94
- package/common-info/index.js +64 -78
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.js +997 -1073
- package/common-info/set-personal-info/index.js +827 -895
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +2 -0
- package/common-tools/extract-file-name/es5.js +998 -1074
- package/common-tools/extract-file-name/index.js +821 -889
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/handle-data/es5.js +1 -1
- package/common-tools/update-browser-title/es5.js +1 -1
- package/common-tools/update-fav-icon/es5.js +1 -1
- package/create-api-service/check-token/es5.js +904 -980
- package/create-api-service/check-token/index.js +727 -795
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/es5.js +2126 -2202
- package/create-api-service/index.js +1742 -1810
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/es5.js +1166 -1242
- package/create-api-service/sso/index.js +938 -1006
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/es5.js +1366 -1442
- package/curring-http/index.js +1064 -1132
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/es5.js +36 -63
- package/directive/auth/index.js +31 -48
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/es5.js +1 -1
- package/directive/hoverInside/es5.js +1 -1
- package/directive/utils/es5.js +1 -1
- package/hooks/use-get-auth/apis.d.ts +1 -4
- package/hooks/use-get-auth/es5.js +62 -192
- package/hooks/use-get-auth/index.d.ts +2 -7
- package/hooks/use-get-auth/index.js +19 -50
- package/package.json +3 -3
- package/pinyin-first-character/es5.js +45 -47
- package/pinyin-first-character/index.js +35 -37
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/es5.js +11 -11
- package/style/index.js +10 -10
- package/style/index.js.gz +0 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
|
Binary file
|
package/common-info/es5.js
CHANGED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
var config = require('@das-fed/upf-utils/config/es5');
|
|
4
4
|
var tokenTools = require('@das-fed/upf-utils/token-tools/es5');
|
|
5
5
|
var getInfoFromUrl = require('@das-fed/upf-utils/common-info/getInfoFromUrl/es5');
|
|
6
|
-
var
|
|
7
|
-
var _t$rightFuncCodes, _t$routeUrl, _t$parentId, _t$id, _t$appId, _t$menuAppearance, _t$name, _t$showName, _ref;
|
|
6
|
+
var j = function j(e) {
|
|
7
|
+
var _t$rightFuncCodes, _t$routeCode, _t$routeUrl, _t$parentId, _t$id, _t$appId, _t$menuAppearance, _t$name, _t$showName, _ref;
|
|
8
8
|
var t = e || JSON.parse(sessionStorage.getItem("menuItem") || "{}");
|
|
9
9
|
return {
|
|
10
10
|
authCodes: (_t$rightFuncCodes = t.rightFuncCodes) !== null && _t$rightFuncCodes !== void 0 ? _t$rightFuncCodes : [],
|
|
11
|
+
routeCode: (_t$routeCode = t.routeCode) !== null && _t$routeCode !== void 0 ? _t$routeCode : "",
|
|
11
12
|
routeUrl: (_t$routeUrl = t.routeUrl) !== null && _t$routeUrl !== void 0 ? _t$routeUrl : "",
|
|
12
13
|
parentId: (_t$parentId = t.parentId) !== null && _t$parentId !== void 0 ? _t$parentId : "",
|
|
13
14
|
id: (_t$id = t.id) !== null && _t$id !== void 0 ? _t$id : "",
|
|
@@ -18,56 +19,36 @@ var T = function T(e) {
|
|
|
18
19
|
type: (_ref = t == null ? undefined : t.type) !== null && _ref !== void 0 ? _ref : ""
|
|
19
20
|
};
|
|
20
21
|
},
|
|
21
|
-
|
|
22
|
+
d = function d() {
|
|
22
23
|
return JSON.parse(sessionStorage.getItem("menuList") || "[]");
|
|
23
24
|
},
|
|
24
|
-
|
|
25
|
-
var e =
|
|
26
|
-
t = {}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (n.routeCode && (t[n.routeCode] = []), n.rightFuncCodes && n.rightFuncCodes[0] && !n.children) {
|
|
33
|
-
var r = (p = n.rightFuncCodes[0]) == null ? undefined : p.lastIndexOf("."),
|
|
34
|
-
g = (o = n.rightFuncCodes[0]) == null ? undefined : o.slice(0, r);
|
|
35
|
-
t[g] = [], n.rightFuncCodes.forEach(function (a) {
|
|
36
|
-
var l = a == null ? undefined : a.lastIndexOf(".");
|
|
37
|
-
t[g].push({
|
|
38
|
-
code: a == null ? undefined : a.slice(l + 1)
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
n.children && n.children.forEach(function (r) {
|
|
43
|
-
var g, a;
|
|
44
|
-
if (r.routeCode && (t[r.routeCode] = []), r.rightFuncCodes) {
|
|
45
|
-
var l = (g = r.rightFuncCodes[0]) == null ? undefined : g.lastIndexOf("."),
|
|
46
|
-
u = (a = r.rightFuncCodes[0]) == null ? undefined : a.slice(0, l);
|
|
47
|
-
t[u] = [], r.rightFuncCodes.forEach(function (c) {
|
|
48
|
-
var m = c == null ? undefined : c.lastIndexOf(".");
|
|
49
|
-
t[u].push({
|
|
50
|
-
code: c == null ? undefined : c.slice(m + 1)
|
|
51
|
-
});
|
|
25
|
+
i = function i() {
|
|
26
|
+
var e = d(),
|
|
27
|
+
t = {},
|
|
28
|
+
_r = function r(n) {
|
|
29
|
+
!n || !Array.isArray(n) || n.forEach(function (s) {
|
|
30
|
+
s.routeCode && t[s.routeCode] === undefined && (t[s.routeCode] = []), s.routeCode && s.rightFuncCodes && Array.isArray(s.rightFuncCodes) && s.rightFuncCodes.forEach(function (a) {
|
|
31
|
+
a && typeof a == "string" && t[s.routeCode].push({
|
|
32
|
+
code: a
|
|
52
33
|
});
|
|
53
|
-
}
|
|
34
|
+
}), s.children && Array.isArray(s.children) && _r(s.children);
|
|
54
35
|
});
|
|
55
|
-
}
|
|
56
|
-
|
|
36
|
+
};
|
|
37
|
+
return _r(e), t;
|
|
57
38
|
},
|
|
58
|
-
|
|
59
|
-
|
|
39
|
+
m = tokenTools.getAccessToken,
|
|
40
|
+
P = function P() {
|
|
60
41
|
var _e$id, _e$userName, _e$flag, _ref2;
|
|
61
|
-
var
|
|
42
|
+
var r;
|
|
62
43
|
var e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
63
44
|
return {
|
|
64
45
|
id: (_e$id = e.id) !== null && _e$id !== void 0 ? _e$id : "",
|
|
65
46
|
name: (_e$userName = e.userName) !== null && _e$userName !== void 0 ? _e$userName : "",
|
|
66
47
|
flag: (_e$flag = e.flag) !== null && _e$flag !== void 0 ? _e$flag : null,
|
|
67
|
-
tenantId: (_ref2 = (
|
|
48
|
+
tenantId: (_ref2 = (r = e == null ? undefined : e.tenant) == null ? undefined : r.id) !== null && _ref2 !== void 0 ? _ref2 : ""
|
|
68
49
|
};
|
|
69
50
|
},
|
|
70
|
-
|
|
51
|
+
b = function b() {
|
|
71
52
|
var _e$id2, _e$name, _e$userName2, _e$phone, _e$email, _e$headPicture;
|
|
72
53
|
var e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
73
54
|
var t = config.getConfig();
|
|
@@ -80,7 +61,7 @@ var T = function T(e) {
|
|
|
80
61
|
headPicture: (_e$headPicture = e.headPicture) !== null && _e$headPicture !== void 0 ? _e$headPicture : ""
|
|
81
62
|
};
|
|
82
63
|
},
|
|
83
|
-
|
|
64
|
+
A = function A() {
|
|
84
65
|
var _e$id3, _e$userName3, _e$name2, _e$areaCode, _e$region, _e$phone2, _e$email2, _e$flag2, _e$tenant, _e$headPicture2, _e$nickName, _e$gender, _e$status, _e$statusName, _e$tags, _e$type, _e$address, _e$description;
|
|
85
66
|
var e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
86
67
|
return {
|
|
@@ -104,10 +85,10 @@ var T = function T(e) {
|
|
|
104
85
|
description: (_e$description = e.description) !== null && _e$description !== void 0 ? _e$description : ""
|
|
105
86
|
};
|
|
106
87
|
},
|
|
107
|
-
|
|
88
|
+
T = function T() {
|
|
108
89
|
return sessionStorage.getItem("languages");
|
|
109
90
|
},
|
|
110
|
-
|
|
91
|
+
I = function I() {
|
|
111
92
|
var _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11;
|
|
112
93
|
var e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
113
94
|
var t = config.getConfig();
|
|
@@ -125,7 +106,7 @@ var T = function T(e) {
|
|
|
125
106
|
optional: (_ref11 = e == null ? undefined : e.leaf) !== null && _ref11 !== void 0 ? _ref11 : true
|
|
126
107
|
};
|
|
127
108
|
},
|
|
128
|
-
|
|
109
|
+
f = function f() {
|
|
129
110
|
var _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32;
|
|
130
111
|
var e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
131
112
|
return {
|
|
@@ -152,7 +133,7 @@ var T = function T(e) {
|
|
|
152
133
|
currency: (_ref32 = e == null ? undefined : e.currency) !== null && _ref32 !== void 0 ? _ref32 : {}
|
|
153
134
|
};
|
|
154
135
|
},
|
|
155
|
-
|
|
136
|
+
J = function J() {
|
|
156
137
|
var _ref33, _ref34, _ref35, _ref36, _ref37, _ref38, _ref39;
|
|
157
138
|
var e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
158
139
|
return {
|
|
@@ -165,7 +146,7 @@ var T = function T(e) {
|
|
|
165
146
|
type: (_ref39 = e == null ? undefined : e.type) !== null && _ref39 !== void 0 ? _ref39 : null
|
|
166
147
|
};
|
|
167
148
|
},
|
|
168
|
-
|
|
149
|
+
O = function O() {
|
|
169
150
|
var _ref40, _ref41;
|
|
170
151
|
var e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
|
|
171
152
|
return {
|
|
@@ -173,14 +154,14 @@ var T = function T(e) {
|
|
|
173
154
|
skinStyle: (_ref41 = e == null ? undefined : e.skinStyle) !== null && _ref41 !== void 0 ? _ref41 : ""
|
|
174
155
|
};
|
|
175
156
|
},
|
|
176
|
-
|
|
177
|
-
return e ?
|
|
157
|
+
y = function y(e, t) {
|
|
158
|
+
return e ? i()[e] : undefined;
|
|
178
159
|
},
|
|
179
|
-
|
|
180
|
-
var
|
|
181
|
-
return (
|
|
160
|
+
M = function M(e, t) {
|
|
161
|
+
var _y;
|
|
162
|
+
return (_y = y(e)) !== null && _y !== void 0 ? _y : [];
|
|
182
163
|
},
|
|
183
|
-
|
|
164
|
+
C = function C() {
|
|
184
165
|
var _e$appcategorys, _e$currentSubApp, _e$currentSubAppCode, _e$subAppList, _e$menuCollapses;
|
|
185
166
|
var e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
186
167
|
return {
|
|
@@ -191,28 +172,28 @@ var T = function T(e) {
|
|
|
191
172
|
menuCollapses: (_e$menuCollapses = e.menuCollapses) !== null && _e$menuCollapses !== void 0 ? _e$menuCollapses : []
|
|
192
173
|
};
|
|
193
174
|
},
|
|
194
|
-
|
|
175
|
+
k = function k(e) {
|
|
195
176
|
var _ref42, _ref43;
|
|
196
177
|
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
197
|
-
var n,
|
|
198
|
-
var
|
|
199
|
-
if (e) return t ? (_ref42 = (n =
|
|
200
|
-
return
|
|
201
|
-
})) == null ? undefined : n.originalMenus) !== null && _ref42 !== void 0 ? _ref42 : [] : (_ref43 = (
|
|
202
|
-
return
|
|
203
|
-
})) == null ? undefined :
|
|
178
|
+
var n, s;
|
|
179
|
+
var r = C().subAppList;
|
|
180
|
+
if (e) return t ? (_ref42 = (n = r == null ? undefined : r.find(function (a) {
|
|
181
|
+
return a.code === e;
|
|
182
|
+
})) == null ? undefined : n.originalMenus) !== null && _ref42 !== void 0 ? _ref42 : [] : (_ref43 = (s = r == null ? undefined : r.find(function (a) {
|
|
183
|
+
return a.code === e;
|
|
184
|
+
})) == null ? undefined : s.menus) !== null && _ref43 !== void 0 ? _ref43 : [];
|
|
204
185
|
{
|
|
205
|
-
var
|
|
206
|
-
return t ?
|
|
207
|
-
var
|
|
208
|
-
o
|
|
209
|
-
}) :
|
|
210
|
-
var
|
|
211
|
-
o
|
|
212
|
-
}),
|
|
186
|
+
var a = {};
|
|
187
|
+
return t ? r == null || r.forEach(function (o) {
|
|
188
|
+
var _o$originalMenus;
|
|
189
|
+
a[o.code] = (_o$originalMenus = o.originalMenus) !== null && _o$originalMenus !== void 0 ? _o$originalMenus : [];
|
|
190
|
+
}) : r == null || r.forEach(function (o) {
|
|
191
|
+
var _o$menus;
|
|
192
|
+
a[o.code] = (_o$menus = o.menus) !== null && _o$menus !== void 0 ? _o$menus : [];
|
|
193
|
+
}), a;
|
|
213
194
|
}
|
|
214
195
|
},
|
|
215
|
-
|
|
196
|
+
v = function v() {
|
|
216
197
|
var _e$currentCode, _e$currentTab, _e$tabMap, _e$preTab;
|
|
217
198
|
var e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
218
199
|
return {
|
|
@@ -222,40 +203,40 @@ var T = function T(e) {
|
|
|
222
203
|
preTab: (_e$preTab = e.preTab) !== null && _e$preTab !== void 0 ? _e$preTab : {}
|
|
223
204
|
};
|
|
224
205
|
},
|
|
225
|
-
|
|
206
|
+
F = function F() {
|
|
226
207
|
var e = config.getConfig(),
|
|
227
208
|
t = sessionStorage.getItem("minioAddress");
|
|
228
209
|
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
229
210
|
},
|
|
230
|
-
|
|
211
|
+
U = function U() {
|
|
231
212
|
var _JSON$parse$instanceI;
|
|
232
213
|
return {
|
|
233
214
|
instanceInfo: (_JSON$parse$instanceI = JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo) !== null && _JSON$parse$instanceI !== void 0 ? _JSON$parse$instanceI : {}
|
|
234
215
|
};
|
|
235
216
|
},
|
|
236
|
-
|
|
217
|
+
D = function D() {
|
|
237
218
|
return localStorage.getItem("fav-icon") || "./logo.svg";
|
|
238
219
|
};
|
|
239
|
-
|
|
240
|
-
var
|
|
241
|
-
(
|
|
242
|
-
exports.getAuthobj =
|
|
243
|
-
exports.getFavIcon =
|
|
244
|
-
exports.getHomeInfo =
|
|
245
|
-
exports.getInstanceInfo =
|
|
246
|
-
exports.getLanguages =
|
|
247
|
-
exports.getMenuItemInfo =
|
|
248
|
-
exports.getMenuListnfo =
|
|
249
|
-
exports.getMenus =
|
|
250
|
-
exports.getMinioAddress =
|
|
251
|
-
exports.getPageAuth =
|
|
252
|
-
exports.getPageAuthBtn =
|
|
253
|
-
exports.getPersonalConfig =
|
|
254
|
-
exports.getPersonalInfo =
|
|
255
|
-
exports.getProjectInfo =
|
|
256
|
-
exports.getProjectMessage =
|
|
257
|
-
exports.getSubApps =
|
|
258
|
-
exports.getTabInfo =
|
|
259
|
-
exports.getTenantInfo =
|
|
260
|
-
exports.getToken =
|
|
261
|
-
exports.getUserInfo =
|
|
220
|
+
m() || getInfoFromUrl.getTokenFromQuery();
|
|
221
|
+
var p;
|
|
222
|
+
(p = I()) != null && p.id || getInfoFromUrl.getProjectInfoFromQuery();
|
|
223
|
+
exports.getAuthobj = i;
|
|
224
|
+
exports.getFavIcon = D;
|
|
225
|
+
exports.getHomeInfo = J;
|
|
226
|
+
exports.getInstanceInfo = U;
|
|
227
|
+
exports.getLanguages = T;
|
|
228
|
+
exports.getMenuItemInfo = j;
|
|
229
|
+
exports.getMenuListnfo = d;
|
|
230
|
+
exports.getMenus = k;
|
|
231
|
+
exports.getMinioAddress = F;
|
|
232
|
+
exports.getPageAuth = y;
|
|
233
|
+
exports.getPageAuthBtn = M;
|
|
234
|
+
exports.getPersonalConfig = O;
|
|
235
|
+
exports.getPersonalInfo = b;
|
|
236
|
+
exports.getProjectInfo = I;
|
|
237
|
+
exports.getProjectMessage = f;
|
|
238
|
+
exports.getSubApps = C;
|
|
239
|
+
exports.getTabInfo = v;
|
|
240
|
+
exports.getTenantInfo = A;
|
|
241
|
+
exports.getToken = m;
|
|
242
|
+
exports.getUserInfo = P;
|
package/common-info/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { getAccessToken as
|
|
3
|
-
import { getTokenFromQuery as
|
|
4
|
-
const
|
|
1
|
+
import { getConfig as c } from "@das-fed/upf-utils/config";
|
|
2
|
+
import { getAccessToken as u } from "@das-fed/upf-utils/token-tools";
|
|
3
|
+
import { getTokenFromQuery as g, getProjectInfoFromQuery as l } from "@das-fed/upf-utils/common-info/getInfoFromUrl";
|
|
4
|
+
const j = (e) => {
|
|
5
5
|
const t = e || JSON.parse(sessionStorage.getItem("menuItem") || "{}");
|
|
6
6
|
return {
|
|
7
7
|
authCodes: t.rightFuncCodes ?? [],
|
|
8
|
+
routeCode: t.routeCode ?? "",
|
|
8
9
|
routeUrl: t.routeUrl ?? "",
|
|
9
10
|
parentId: t.parentId ?? "",
|
|
10
11
|
id: t.id ?? "",
|
|
@@ -14,42 +15,27 @@ const T = (e) => {
|
|
|
14
15
|
showName: t.showName ?? "",
|
|
15
16
|
type: (t == null ? void 0 : t.type) ?? ""
|
|
16
17
|
};
|
|
17
|
-
},
|
|
18
|
-
const e =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
n.children && n.children.forEach((r) => {
|
|
30
|
-
var g, a;
|
|
31
|
-
if (r.routeCode && (t[r.routeCode] = []), r.rightFuncCodes) {
|
|
32
|
-
const l = (g = r.rightFuncCodes[0]) == null ? void 0 : g.lastIndexOf("."), u = (a = r.rightFuncCodes[0]) == null ? void 0 : a.slice(0, l);
|
|
33
|
-
t[u] = [], r.rightFuncCodes.forEach((c) => {
|
|
34
|
-
const m = c == null ? void 0 : c.lastIndexOf(".");
|
|
35
|
-
t[u].push({ code: c == null ? void 0 : c.slice(m + 1) });
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}));
|
|
40
|
-
}), t;
|
|
41
|
-
}, h = I, J = () => {
|
|
42
|
-
var s;
|
|
18
|
+
}, d = () => JSON.parse(sessionStorage.getItem("menuList") || "[]"), i = () => {
|
|
19
|
+
const e = d(), t = {}, r = (n) => {
|
|
20
|
+
!n || !Array.isArray(n) || n.forEach((s) => {
|
|
21
|
+
s.routeCode && t[s.routeCode] === void 0 && (t[s.routeCode] = []), s.routeCode && s.rightFuncCodes && Array.isArray(s.rightFuncCodes) && s.rightFuncCodes.forEach((a) => {
|
|
22
|
+
a && typeof a == "string" && t[s.routeCode].push({ code: a });
|
|
23
|
+
}), s.children && Array.isArray(s.children) && r(s.children);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return r(e), t;
|
|
27
|
+
}, m = u, P = () => {
|
|
28
|
+
var r;
|
|
43
29
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
44
30
|
return {
|
|
45
31
|
id: e.id ?? "",
|
|
46
32
|
name: e.userName ?? "",
|
|
47
33
|
flag: e.flag ?? null,
|
|
48
|
-
tenantId: ((
|
|
34
|
+
tenantId: ((r = e == null ? void 0 : e.tenant) == null ? void 0 : r.id) ?? ""
|
|
49
35
|
};
|
|
50
|
-
},
|
|
36
|
+
}, b = () => {
|
|
51
37
|
let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
52
|
-
const t =
|
|
38
|
+
const t = c();
|
|
53
39
|
return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
|
|
54
40
|
id: e.id ?? "",
|
|
55
41
|
name: e.name ?? "",
|
|
@@ -58,7 +44,7 @@ const T = (e) => {
|
|
|
58
44
|
email: e.email ?? "",
|
|
59
45
|
headPicture: e.headPicture ?? ""
|
|
60
46
|
};
|
|
61
|
-
},
|
|
47
|
+
}, A = () => {
|
|
62
48
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
63
49
|
return {
|
|
64
50
|
userId: e.id ?? "",
|
|
@@ -80,9 +66,9 @@ const T = (e) => {
|
|
|
80
66
|
address: e.address ?? "",
|
|
81
67
|
description: e.description ?? ""
|
|
82
68
|
};
|
|
83
|
-
},
|
|
69
|
+
}, T = () => sessionStorage.getItem("languages"), I = () => {
|
|
84
70
|
let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
85
|
-
const t =
|
|
71
|
+
const t = c();
|
|
86
72
|
return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
|
|
87
73
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
88
74
|
code: (e == null ? void 0 : e.code) ?? 0,
|
|
@@ -96,7 +82,7 @@ const T = (e) => {
|
|
|
96
82
|
leaf: (e == null ? void 0 : e.leaf) ?? !1,
|
|
97
83
|
optional: (e == null ? void 0 : e.leaf) ?? !0
|
|
98
84
|
};
|
|
99
|
-
},
|
|
85
|
+
}, f = () => {
|
|
100
86
|
let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
101
87
|
return {
|
|
102
88
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
@@ -121,7 +107,7 @@ const T = (e) => {
|
|
|
121
107
|
autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
|
|
122
108
|
currency: (e == null ? void 0 : e.currency) ?? {}
|
|
123
109
|
};
|
|
124
|
-
},
|
|
110
|
+
}, J = () => {
|
|
125
111
|
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
126
112
|
return {
|
|
127
113
|
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
@@ -132,13 +118,13 @@ const T = (e) => {
|
|
|
132
118
|
displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
|
|
133
119
|
type: (e == null ? void 0 : e.type) ?? null
|
|
134
120
|
};
|
|
135
|
-
},
|
|
121
|
+
}, O = () => {
|
|
136
122
|
const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
|
|
137
123
|
return {
|
|
138
124
|
style: (e == null ? void 0 : e.style) ?? "",
|
|
139
125
|
skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
|
|
140
126
|
};
|
|
141
|
-
},
|
|
127
|
+
}, y = (e, t) => e ? i()[e] : void 0, M = (e, t) => y(e) ?? [], C = () => {
|
|
142
128
|
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
143
129
|
return {
|
|
144
130
|
appcategorys: e.appcategorys ?? [],
|
|
@@ -147,20 +133,20 @@ const T = (e) => {
|
|
|
147
133
|
subAppList: e.subAppList ?? [],
|
|
148
134
|
menuCollapses: e.menuCollapses ?? []
|
|
149
135
|
};
|
|
150
|
-
},
|
|
151
|
-
var n,
|
|
152
|
-
const
|
|
136
|
+
}, k = (e, t = !1) => {
|
|
137
|
+
var n, s;
|
|
138
|
+
const r = C().subAppList;
|
|
153
139
|
if (e)
|
|
154
|
-
return t ? ((n =
|
|
140
|
+
return t ? ((n = r == null ? void 0 : r.find((a) => a.code === e)) == null ? void 0 : n.originalMenus) ?? [] : ((s = r == null ? void 0 : r.find((a) => a.code === e)) == null ? void 0 : s.menus) ?? [];
|
|
155
141
|
{
|
|
156
|
-
let
|
|
157
|
-
return t ?
|
|
158
|
-
o
|
|
159
|
-
}) :
|
|
160
|
-
o
|
|
161
|
-
}),
|
|
142
|
+
let a = {};
|
|
143
|
+
return t ? r == null || r.forEach((o) => {
|
|
144
|
+
a[o.code] = o.originalMenus ?? [];
|
|
145
|
+
}) : r == null || r.forEach((o) => {
|
|
146
|
+
a[o.code] = o.menus ?? [];
|
|
147
|
+
}), a;
|
|
162
148
|
}
|
|
163
|
-
},
|
|
149
|
+
}, v = () => {
|
|
164
150
|
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
165
151
|
return {
|
|
166
152
|
currentCode: e.currentCode ?? "",
|
|
@@ -168,34 +154,34 @@ const T = (e) => {
|
|
|
168
154
|
tabMap: e.tabMap ?? {},
|
|
169
155
|
preTab: e.preTab ?? {}
|
|
170
156
|
};
|
|
171
|
-
},
|
|
172
|
-
const e =
|
|
157
|
+
}, F = () => {
|
|
158
|
+
const e = c(), t = sessionStorage.getItem("minioAddress");
|
|
173
159
|
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
174
|
-
},
|
|
160
|
+
}, U = () => ({
|
|
175
161
|
instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
|
|
176
|
-
}),
|
|
177
|
-
|
|
178
|
-
var
|
|
179
|
-
(
|
|
162
|
+
}), D = () => localStorage.getItem("fav-icon") || "./logo.svg";
|
|
163
|
+
m() || g();
|
|
164
|
+
var p;
|
|
165
|
+
(p = I()) != null && p.id || l();
|
|
180
166
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
167
|
+
i as getAuthobj,
|
|
168
|
+
D as getFavIcon,
|
|
169
|
+
J as getHomeInfo,
|
|
170
|
+
U as getInstanceInfo,
|
|
171
|
+
T as getLanguages,
|
|
172
|
+
j as getMenuItemInfo,
|
|
173
|
+
d as getMenuListnfo,
|
|
174
|
+
k as getMenus,
|
|
175
|
+
F as getMinioAddress,
|
|
176
|
+
y as getPageAuth,
|
|
177
|
+
M as getPageAuthBtn,
|
|
178
|
+
O as getPersonalConfig,
|
|
179
|
+
b as getPersonalInfo,
|
|
180
|
+
I as getProjectInfo,
|
|
181
|
+
f as getProjectMessage,
|
|
182
|
+
C as getSubApps,
|
|
183
|
+
v as getTabInfo,
|
|
184
|
+
A as getTenantInfo,
|
|
185
|
+
m as getToken,
|
|
186
|
+
P as getUserInfo
|
|
201
187
|
};
|
package/common-info/index.js.gz
CHANGED
|
Binary file
|