@das-fed/utils 6.4.0-test.5.1 → 6.4.0-test.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/i18n/index.d.ts +7 -22
- package/api-services/i18n/index.js +16 -15
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +1542 -1407
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +1351 -1234
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +1341 -1206
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +1344 -1209
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +1341 -1206
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +1344 -1209
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +1341 -1206
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +1511 -1377
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +1351 -1234
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1501 -1367
- 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 +1385 -1249
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +1365 -1230
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +1341 -1206
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +1341 -1206
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +1341 -1206
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +1355 -1220
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +1341 -1206
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +1341 -1206
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +1329 -1194
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +1340 -1205
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +1341 -1206
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +1351 -1234
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +1351 -1234
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +1344 -1209
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/index.d.ts +11 -3
- package/common-info/index.js +101 -53
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +446 -440
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +99 -5
- 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.js +737 -738
- 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/index.d.ts +2 -0
- package/common-tools/index.js +2 -0
- package/common-tools/nest-tree-format/index.d.ts +1 -1
- package/common-tools/nest-tree-format/index.js +15 -15
- package/create-api-service/index.d.ts +3 -1
- package/create-api-service/index.js +1344 -1209
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +0 -2
- package/create-api-service/sso/index.js +483 -480
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +575 -575
- 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 +7 -1
- package/package.json +4 -4
- package/pinyin-first-character/index.js +22 -22
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/style/math.d.ts +4 -4
- package/use-low-code/index.js +2 -2
- package/use-low-code/index.js.gz +0 -0
|
Binary file
|
package/common-info/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, ProjectInfo, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
|
|
1
|
+
import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
|
|
2
2
|
|
|
3
3
|
/** 获取token */
|
|
4
4
|
export declare const getToken: any;
|
|
@@ -8,20 +8,28 @@ export declare const getUserInfo: () => UserInfo;
|
|
|
8
8
|
export declare const getPersonalInfo: () => PersonalInfo;
|
|
9
9
|
/** 获取当前租户详情 */
|
|
10
10
|
export declare const getTenantInfo: () => TenantInfo;
|
|
11
|
+
/** 获取当前租户设置了多少个语言类型 */
|
|
12
|
+
export declare const getLanguages: () => any;
|
|
11
13
|
/**
|
|
12
14
|
* 获取项目信息
|
|
13
15
|
* @returns 项目信息
|
|
14
16
|
*/
|
|
15
17
|
export declare const getProjectInfo: () => ProjectInfo;
|
|
18
|
+
/**
|
|
19
|
+
* 获取项目信息
|
|
20
|
+
* @returns 项目信息
|
|
21
|
+
*/
|
|
22
|
+
export declare const getProjectMessage: () => ProjectMessage;
|
|
16
23
|
/** 获取首页信息 */
|
|
17
24
|
export declare const getHomeInfo: () => HomeInfo;
|
|
25
|
+
export declare const getPersonalConfig: () => PersonalConfigInfo;
|
|
18
26
|
/**
|
|
19
27
|
* 可用于判断菜单或者按钮权限
|
|
20
28
|
* @param menuCode 菜单编码
|
|
21
29
|
* @param applicationCode 应用编码
|
|
22
|
-
* @returns undefined
|
|
30
|
+
* @returns 无菜单权限返回undefined,有菜单权限但是没有任何按钮权限返回空数组
|
|
23
31
|
*/
|
|
24
|
-
export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => any;
|
|
32
|
+
export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => undefined | any[];
|
|
25
33
|
/**
|
|
26
34
|
* 获取指定菜单的按钮权限数据
|
|
27
35
|
* @param menuCode 菜单编码
|
package/common-info/index.js
CHANGED
|
@@ -1,41 +1,52 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { getUrlParams as
|
|
3
|
-
import { getAccessToken as
|
|
4
|
-
import { getTokenFromQuery as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
1
|
+
import { getConfig as u } from "@das-fed/utils/config";
|
|
2
|
+
import { getUrlParams as d } from "@das-fed/utils/common-tools";
|
|
3
|
+
import { getAccessToken as I } from "@das-fed/utils/token-tools";
|
|
4
|
+
import { getTokenFromQuery as S, getProjectInfoFromQuery as y } from "@das-fed/utils/common-info/getInfoFromUrl";
|
|
5
|
+
const N = I, A = () => {
|
|
6
|
+
var r;
|
|
7
7
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
8
8
|
return {
|
|
9
9
|
id: e.id ?? "",
|
|
10
10
|
name: e.userName ?? "",
|
|
11
11
|
flag: e.flag ?? null,
|
|
12
|
-
tenantId: ((
|
|
12
|
+
tenantId: ((r = e == null ? void 0 : e.tenant) == null ? void 0 : r.id) ?? ""
|
|
13
13
|
};
|
|
14
|
-
},
|
|
14
|
+
}, J = () => {
|
|
15
15
|
let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
16
|
-
const t =
|
|
16
|
+
const t = u();
|
|
17
17
|
return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
|
|
18
18
|
id: e.id ?? "",
|
|
19
19
|
name: e.name ?? "",
|
|
20
|
-
phone: e.phone ?? "",
|
|
21
20
|
userName: e.userName ?? "",
|
|
21
|
+
phone: e.phone ?? "",
|
|
22
22
|
email: e.email ?? "",
|
|
23
23
|
headPicture: e.headPicture ?? ""
|
|
24
24
|
};
|
|
25
|
-
},
|
|
25
|
+
}, O = () => {
|
|
26
26
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
27
27
|
return {
|
|
28
28
|
userId: e.id ?? "",
|
|
29
29
|
userName: e.userName ?? "",
|
|
30
30
|
name: e.name ?? "",
|
|
31
31
|
areaCode: e.areaCode ?? "",
|
|
32
|
+
region: e.region ?? "",
|
|
32
33
|
phone: e.phone ?? "",
|
|
34
|
+
email: e.email ?? "",
|
|
33
35
|
flag: e.flag ?? null,
|
|
34
|
-
tenant: e.tenant ?? {}
|
|
36
|
+
tenant: e.tenant ?? {},
|
|
37
|
+
headPicture: e.headPicture ?? "",
|
|
38
|
+
nickName: e.nickName ?? "",
|
|
39
|
+
gender: e.gender ?? null,
|
|
40
|
+
status: e.status ?? null,
|
|
41
|
+
statusName: e.statusName ?? null,
|
|
42
|
+
tags: e.tags ?? [],
|
|
43
|
+
type: e.type ?? null,
|
|
44
|
+
address: e.address ?? "",
|
|
45
|
+
description: e.description ?? ""
|
|
35
46
|
};
|
|
36
|
-
},
|
|
47
|
+
}, M = () => sessionStorage.getItem("languages"), C = () => {
|
|
37
48
|
let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
38
|
-
const t =
|
|
49
|
+
const t = u();
|
|
39
50
|
return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
|
|
40
51
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
41
52
|
code: (e == null ? void 0 : e.code) ?? 0,
|
|
@@ -49,7 +60,32 @@ const S = m, J = () => {
|
|
|
49
60
|
leaf: (e == null ? void 0 : e.leaf) ?? !1,
|
|
50
61
|
optional: (e == null ? void 0 : e.leaf) ?? !0
|
|
51
62
|
};
|
|
52
|
-
},
|
|
63
|
+
}, v = () => {
|
|
64
|
+
let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
65
|
+
return {
|
|
66
|
+
id: (e == null ? void 0 : e.id) ?? 0,
|
|
67
|
+
projectName: (e == null ? void 0 : e.projectName) ?? "",
|
|
68
|
+
provinceCode: (e == null ? void 0 : e.provinceCode) ?? "",
|
|
69
|
+
cityCode: (e == null ? void 0 : e.cityCode) ?? "",
|
|
70
|
+
areaCode: (e == null ? void 0 : e.areaCode) ?? "",
|
|
71
|
+
address: (e == null ? void 0 : e.address) ?? "",
|
|
72
|
+
projectDesc: (e == null ? void 0 : e.projectDesc) ?? "",
|
|
73
|
+
logoPath: (e == null ? void 0 : e.logoPath) ?? "",
|
|
74
|
+
projectType: (e == null ? void 0 : e.projectType) ?? "",
|
|
75
|
+
projectTypeCode: (e == null ? void 0 : e.projectTypeCode) ?? "",
|
|
76
|
+
longitude: (e == null ? void 0 : e.longitude) ?? "",
|
|
77
|
+
latitude: (e == null ? void 0 : e.latitude) ?? "",
|
|
78
|
+
projectStartDate: (e == null ? void 0 : e.projectStartDate) ?? "",
|
|
79
|
+
projectExpiryDate: (e == null ? void 0 : e.projectExpiryDate) ?? "",
|
|
80
|
+
projectCode: (e == null ? void 0 : e.projectCode) ?? "",
|
|
81
|
+
mapConfiguration: (e == null ? void 0 : e.mapConfiguration) ?? !1,
|
|
82
|
+
cityName: (e == null ? void 0 : e.cityName) ?? "",
|
|
83
|
+
cityNamePinyin: (e == null ? void 0 : e.cityNamePinyin) ?? "",
|
|
84
|
+
timezone: (e == null ? void 0 : e.timezone) ?? "",
|
|
85
|
+
autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
|
|
86
|
+
currency: (e == null ? void 0 : e.currency) ?? {}
|
|
87
|
+
};
|
|
88
|
+
}, f = () => {
|
|
53
89
|
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
54
90
|
return {
|
|
55
91
|
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
@@ -57,16 +93,25 @@ const S = m, J = () => {
|
|
|
57
93
|
enable: (e == null ? void 0 : e.enable) ?? !1,
|
|
58
94
|
originalCode: (e == null ? void 0 : e.originalCode) ?? "",
|
|
59
95
|
routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
|
|
96
|
+
displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
|
|
60
97
|
type: (e == null ? void 0 : e.type) ?? null
|
|
61
98
|
};
|
|
62
|
-
},
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
99
|
+
}, k = () => {
|
|
100
|
+
const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
|
|
101
|
+
return {
|
|
102
|
+
style: (e == null ? void 0 : e.style) ?? "",
|
|
103
|
+
skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
|
|
104
|
+
};
|
|
105
|
+
}, j = (e, t) => {
|
|
106
|
+
var g;
|
|
107
|
+
const r = "permission-btn", a = m(), o = d(location.href, "app") || "", s = t || o || a.currentSubAppCode;
|
|
108
|
+
if (!s) return;
|
|
109
|
+
const n = d(location.href, "menu") || "", l = e || n || a.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
|
|
66
110
|
if (!c || JSON.stringify(c) === "{}") return;
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
111
|
+
const p = (g = c[s]) == null ? void 0 : g[l];
|
|
112
|
+
if (p)
|
|
113
|
+
return p.length ? p : c[s]["origin-auth"] ? c[s]["origin-auth"][l] ?? [] : [];
|
|
114
|
+
}, D = (e, t) => j(e, t) ?? [], m = () => {
|
|
70
115
|
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
71
116
|
return {
|
|
72
117
|
appcategorys: e.appcategorys ?? [],
|
|
@@ -75,20 +120,20 @@ const S = m, J = () => {
|
|
|
75
120
|
subAppList: e.subAppList ?? [],
|
|
76
121
|
menuCollapses: e.menuCollapses ?? []
|
|
77
122
|
};
|
|
78
|
-
},
|
|
79
|
-
var
|
|
80
|
-
const
|
|
123
|
+
}, U = (e, t = !1) => {
|
|
124
|
+
var a, o;
|
|
125
|
+
const r = m().subAppList;
|
|
81
126
|
if (e)
|
|
82
|
-
return t ? ((
|
|
127
|
+
return t ? ((a = r == null ? void 0 : r.find((s) => s.code === e)) == null ? void 0 : a.originalMenus) ?? [] : ((o = r == null ? void 0 : r.find((s) => s.code === e)) == null ? void 0 : o.menus) ?? [];
|
|
83
128
|
{
|
|
84
|
-
let
|
|
85
|
-
return t ?
|
|
86
|
-
|
|
87
|
-
}) :
|
|
88
|
-
|
|
89
|
-
}),
|
|
129
|
+
let s = {};
|
|
130
|
+
return t ? r == null || r.forEach((n) => {
|
|
131
|
+
s[n.code] = n.originalMenus ?? [];
|
|
132
|
+
}) : r == null || r.forEach((n) => {
|
|
133
|
+
s[n.code] = n.menus ?? [];
|
|
134
|
+
}), s;
|
|
90
135
|
}
|
|
91
|
-
},
|
|
136
|
+
}, E = () => {
|
|
92
137
|
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
93
138
|
return {
|
|
94
139
|
currentCode: e.currentCode ?? "",
|
|
@@ -96,28 +141,31 @@ const S = m, J = () => {
|
|
|
96
141
|
tabMap: e.tabMap ?? {},
|
|
97
142
|
preTab: e.preTab ?? {}
|
|
98
143
|
};
|
|
99
|
-
},
|
|
100
|
-
const e =
|
|
144
|
+
}, z = () => {
|
|
145
|
+
const e = u(), t = sessionStorage.getItem("minioAddress");
|
|
101
146
|
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
102
|
-
},
|
|
147
|
+
}, x = () => ({
|
|
103
148
|
instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
|
|
104
|
-
}),
|
|
105
|
-
|
|
149
|
+
}), F = () => localStorage.getItem("fav-icon") || "./logo.svg";
|
|
150
|
+
N() || S();
|
|
106
151
|
var i;
|
|
107
|
-
(i =
|
|
152
|
+
(i = C()) != null && i.id || y();
|
|
108
153
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
U as
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
154
|
+
F as getFavIcon,
|
|
155
|
+
f as getHomeInfo,
|
|
156
|
+
x as getInstanceInfo,
|
|
157
|
+
M as getLanguages,
|
|
158
|
+
U as getMenus,
|
|
159
|
+
z as getMinioAddress,
|
|
160
|
+
j as getPageAuth,
|
|
161
|
+
D as getPageAuthBtn,
|
|
162
|
+
k as getPersonalConfig,
|
|
163
|
+
J as getPersonalInfo,
|
|
164
|
+
C as getProjectInfo,
|
|
165
|
+
v as getProjectMessage,
|
|
166
|
+
m as getSubApps,
|
|
167
|
+
E as getTabInfo,
|
|
168
|
+
O as getTenantInfo,
|
|
169
|
+
N as getToken,
|
|
170
|
+
A as getUserInfo
|
|
123
171
|
};
|
package/common-info/index.js.gz
CHANGED
|
Binary file
|