@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
|
Binary file
|
package/atob/es5.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var config = require('@das-fed/upf-utils/config/es5');
|
|
4
|
+
var commonTools = require('@das-fed/upf-utils/common-tools/es5');
|
|
5
|
+
var tokenTools = require('@das-fed/upf-utils/token-tools/es5');
|
|
6
|
+
var getInfoFromUrl = require('@das-fed/upf-utils/common-info/getInfoFromUrl/es5');
|
|
7
|
+
var N = tokenTools.getAccessToken,
|
|
8
|
+
A = function A() {
|
|
9
|
+
var _e$id, _e$userName, _e$flag, _ref;
|
|
10
|
+
var r;
|
|
11
|
+
var e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
12
|
+
return {
|
|
13
|
+
id: (_e$id = e.id) !== null && _e$id !== void 0 ? _e$id : "",
|
|
14
|
+
name: (_e$userName = e.userName) !== null && _e$userName !== void 0 ? _e$userName : "",
|
|
15
|
+
flag: (_e$flag = e.flag) !== null && _e$flag !== void 0 ? _e$flag : null,
|
|
16
|
+
tenantId: (_ref = (r = e == null ? undefined : e.tenant) == null ? undefined : r.id) !== null && _ref !== void 0 ? _ref : ""
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
J = function J() {
|
|
20
|
+
var _e$id2, _e$name, _e$userName2, _e$phone, _e$email, _e$headPicture;
|
|
21
|
+
var e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
22
|
+
var t = config.getConfig();
|
|
23
|
+
return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
|
|
24
|
+
id: (_e$id2 = e.id) !== null && _e$id2 !== void 0 ? _e$id2 : "",
|
|
25
|
+
name: (_e$name = e.name) !== null && _e$name !== void 0 ? _e$name : "",
|
|
26
|
+
userName: (_e$userName2 = e.userName) !== null && _e$userName2 !== void 0 ? _e$userName2 : "",
|
|
27
|
+
phone: (_e$phone = e.phone) !== null && _e$phone !== void 0 ? _e$phone : "",
|
|
28
|
+
email: (_e$email = e.email) !== null && _e$email !== void 0 ? _e$email : "",
|
|
29
|
+
headPicture: (_e$headPicture = e.headPicture) !== null && _e$headPicture !== void 0 ? _e$headPicture : ""
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
O = function O() {
|
|
33
|
+
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;
|
|
34
|
+
var e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
35
|
+
return {
|
|
36
|
+
userId: (_e$id3 = e.id) !== null && _e$id3 !== void 0 ? _e$id3 : "",
|
|
37
|
+
userName: (_e$userName3 = e.userName) !== null && _e$userName3 !== void 0 ? _e$userName3 : "",
|
|
38
|
+
name: (_e$name2 = e.name) !== null && _e$name2 !== void 0 ? _e$name2 : "",
|
|
39
|
+
areaCode: (_e$areaCode = e.areaCode) !== null && _e$areaCode !== void 0 ? _e$areaCode : "",
|
|
40
|
+
region: (_e$region = e.region) !== null && _e$region !== void 0 ? _e$region : "",
|
|
41
|
+
phone: (_e$phone2 = e.phone) !== null && _e$phone2 !== void 0 ? _e$phone2 : "",
|
|
42
|
+
email: (_e$email2 = e.email) !== null && _e$email2 !== void 0 ? _e$email2 : "",
|
|
43
|
+
flag: (_e$flag2 = e.flag) !== null && _e$flag2 !== void 0 ? _e$flag2 : null,
|
|
44
|
+
tenant: (_e$tenant = e.tenant) !== null && _e$tenant !== void 0 ? _e$tenant : {},
|
|
45
|
+
headPicture: (_e$headPicture2 = e.headPicture) !== null && _e$headPicture2 !== void 0 ? _e$headPicture2 : "",
|
|
46
|
+
nickName: (_e$nickName = e.nickName) !== null && _e$nickName !== void 0 ? _e$nickName : "",
|
|
47
|
+
gender: (_e$gender = e.gender) !== null && _e$gender !== void 0 ? _e$gender : null,
|
|
48
|
+
status: (_e$status = e.status) !== null && _e$status !== void 0 ? _e$status : null,
|
|
49
|
+
statusName: (_e$statusName = e.statusName) !== null && _e$statusName !== void 0 ? _e$statusName : null,
|
|
50
|
+
tags: (_e$tags = e.tags) !== null && _e$tags !== void 0 ? _e$tags : [],
|
|
51
|
+
type: (_e$type = e.type) !== null && _e$type !== void 0 ? _e$type : null,
|
|
52
|
+
address: (_e$address = e.address) !== null && _e$address !== void 0 ? _e$address : "",
|
|
53
|
+
description: (_e$description = e.description) !== null && _e$description !== void 0 ? _e$description : ""
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
M = function M() {
|
|
57
|
+
return sessionStorage.getItem("languages");
|
|
58
|
+
},
|
|
59
|
+
C = function C() {
|
|
60
|
+
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10;
|
|
61
|
+
var e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
62
|
+
var t = config.getConfig();
|
|
63
|
+
return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
|
|
64
|
+
id: (_ref2 = e == null ? undefined : e.id) !== null && _ref2 !== void 0 ? _ref2 : 0,
|
|
65
|
+
code: (_ref3 = e == null ? undefined : e.code) !== null && _ref3 !== void 0 ? _ref3 : 0,
|
|
66
|
+
name: (_ref4 = e == null ? undefined : e.name) !== null && _ref4 !== void 0 ? _ref4 : "",
|
|
67
|
+
type: (_ref5 = e == null ? undefined : e.type) !== null && _ref5 !== void 0 ? _ref5 : null,
|
|
68
|
+
parentId: (_ref6 = e == null ? undefined : e.parentId) !== null && _ref6 !== void 0 ? _ref6 : "",
|
|
69
|
+
parentName: (_ref7 = e == null ? undefined : e.parentName) !== null && _ref7 !== void 0 ? _ref7 : "",
|
|
70
|
+
parentType: (_ref8 = e == null ? undefined : e.parentType) !== null && _ref8 !== void 0 ? _ref8 : null,
|
|
71
|
+
tenantId: (_ref9 = e == null ? undefined : e.tenant) !== null && _ref9 !== void 0 ? _ref9 : "",
|
|
72
|
+
isParent: (_ref0 = e == null ? undefined : e.isParent) !== null && _ref0 !== void 0 ? _ref0 : false,
|
|
73
|
+
leaf: (_ref1 = e == null ? undefined : e.leaf) !== null && _ref1 !== void 0 ? _ref1 : false,
|
|
74
|
+
optional: (_ref10 = e == null ? undefined : e.leaf) !== null && _ref10 !== void 0 ? _ref10 : true
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
f = function f() {
|
|
78
|
+
var _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
|
|
79
|
+
var e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
80
|
+
return {
|
|
81
|
+
id: (_ref11 = e == null ? undefined : e.id) !== null && _ref11 !== void 0 ? _ref11 : 0,
|
|
82
|
+
projectName: (_ref12 = e == null ? undefined : e.projectName) !== null && _ref12 !== void 0 ? _ref12 : "",
|
|
83
|
+
provinceCode: (_ref13 = e == null ? undefined : e.provinceCode) !== null && _ref13 !== void 0 ? _ref13 : "",
|
|
84
|
+
cityCode: (_ref14 = e == null ? undefined : e.cityCode) !== null && _ref14 !== void 0 ? _ref14 : "",
|
|
85
|
+
areaCode: (_ref15 = e == null ? undefined : e.areaCode) !== null && _ref15 !== void 0 ? _ref15 : "",
|
|
86
|
+
address: (_ref16 = e == null ? undefined : e.address) !== null && _ref16 !== void 0 ? _ref16 : "",
|
|
87
|
+
projectDesc: (_ref17 = e == null ? undefined : e.projectDesc) !== null && _ref17 !== void 0 ? _ref17 : "",
|
|
88
|
+
logoPath: (_ref18 = e == null ? undefined : e.logoPath) !== null && _ref18 !== void 0 ? _ref18 : "",
|
|
89
|
+
projectType: (_ref19 = e == null ? undefined : e.projectType) !== null && _ref19 !== void 0 ? _ref19 : "",
|
|
90
|
+
projectTypeCode: (_ref20 = e == null ? undefined : e.projectTypeCode) !== null && _ref20 !== void 0 ? _ref20 : "",
|
|
91
|
+
longitude: (_ref21 = e == null ? undefined : e.longitude) !== null && _ref21 !== void 0 ? _ref21 : "",
|
|
92
|
+
latitude: (_ref22 = e == null ? undefined : e.latitude) !== null && _ref22 !== void 0 ? _ref22 : "",
|
|
93
|
+
projectStartDate: (_ref23 = e == null ? undefined : e.projectStartDate) !== null && _ref23 !== void 0 ? _ref23 : "",
|
|
94
|
+
projectExpiryDate: (_ref24 = e == null ? undefined : e.projectExpiryDate) !== null && _ref24 !== void 0 ? _ref24 : "",
|
|
95
|
+
projectCode: (_ref25 = e == null ? undefined : e.projectCode) !== null && _ref25 !== void 0 ? _ref25 : "",
|
|
96
|
+
mapConfiguration: (_ref26 = e == null ? undefined : e.mapConfiguration) !== null && _ref26 !== void 0 ? _ref26 : false,
|
|
97
|
+
cityName: (_ref27 = e == null ? undefined : e.cityName) !== null && _ref27 !== void 0 ? _ref27 : "",
|
|
98
|
+
cityNamePinyin: (_ref28 = e == null ? undefined : e.cityNamePinyin) !== null && _ref28 !== void 0 ? _ref28 : "",
|
|
99
|
+
timezone: (_ref29 = e == null ? undefined : e.timezone) !== null && _ref29 !== void 0 ? _ref29 : "",
|
|
100
|
+
autoTimezone: (_ref30 = e == null ? undefined : e.autoTimezone) !== null && _ref30 !== void 0 ? _ref30 : false,
|
|
101
|
+
currency: (_ref31 = e == null ? undefined : e.currency) !== null && _ref31 !== void 0 ? _ref31 : {}
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
k = function k() {
|
|
105
|
+
var _ref32, _ref33, _ref34, _ref35, _ref36, _ref37, _ref38;
|
|
106
|
+
var e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
107
|
+
return {
|
|
108
|
+
applicationCode: (_ref32 = e == null ? undefined : e.applicationCode) !== null && _ref32 !== void 0 ? _ref32 : "",
|
|
109
|
+
applicationPath: (_ref33 = e == null ? undefined : e.applicationPath) !== null && _ref33 !== void 0 ? _ref33 : "",
|
|
110
|
+
enable: (_ref34 = e == null ? undefined : e.enable) !== null && _ref34 !== void 0 ? _ref34 : false,
|
|
111
|
+
originalCode: (_ref35 = e == null ? undefined : e.originalCode) !== null && _ref35 !== void 0 ? _ref35 : "",
|
|
112
|
+
routeUrl: (_ref36 = e == null ? undefined : e.routeUrl) !== null && _ref36 !== void 0 ? _ref36 : "",
|
|
113
|
+
displayPosition: (_ref37 = e == null ? undefined : e.displayPosition) !== null && _ref37 !== void 0 ? _ref37 : 1,
|
|
114
|
+
type: (_ref38 = e == null ? undefined : e.type) !== null && _ref38 !== void 0 ? _ref38 : null
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
v = function v() {
|
|
118
|
+
var _ref39, _ref40;
|
|
119
|
+
var e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
|
|
120
|
+
return {
|
|
121
|
+
style: (_ref39 = e == null ? undefined : e.style) !== null && _ref39 !== void 0 ? _ref39 : "",
|
|
122
|
+
skinStyle: (_ref40 = e == null ? undefined : e.skinStyle) !== null && _ref40 !== void 0 ? _ref40 : ""
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
j = function j(e, t) {
|
|
126
|
+
var _c$n$originAuth$l;
|
|
127
|
+
var g;
|
|
128
|
+
var r = "permission-btn",
|
|
129
|
+
a = m(),
|
|
130
|
+
o = commonTools.getUrlParams(location.href, "app") || "",
|
|
131
|
+
n = t || o || a.currentSubAppCode;
|
|
132
|
+
if (!n) return;
|
|
133
|
+
var s = commonTools.getUrlParams(location.href, "menu") || "",
|
|
134
|
+
l = e || s || a.currentSubApp.currentMenuCode,
|
|
135
|
+
c = JSON.parse(sessionStorage.getItem(r) || "{}");
|
|
136
|
+
if (!c || JSON.stringify(c) === "{}") return;
|
|
137
|
+
var p = (g = c[n]) == null ? undefined : g[l];
|
|
138
|
+
if (p) return p.length ? p : c[n]["origin-auth"] ? (_c$n$originAuth$l = c[n]["origin-auth"][l]) !== null && _c$n$originAuth$l !== void 0 ? _c$n$originAuth$l : [] : [];
|
|
139
|
+
},
|
|
140
|
+
D = function D(e, t) {
|
|
141
|
+
var _j;
|
|
142
|
+
return (_j = j(e, t)) !== null && _j !== void 0 ? _j : [];
|
|
143
|
+
},
|
|
144
|
+
m = function m() {
|
|
145
|
+
var _e$appcategorys, _e$currentSubApp, _e$currentSubAppCode, _e$subAppList, _e$menuCollapses;
|
|
146
|
+
var e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
147
|
+
return {
|
|
148
|
+
appcategorys: (_e$appcategorys = e.appcategorys) !== null && _e$appcategorys !== void 0 ? _e$appcategorys : [],
|
|
149
|
+
currentSubApp: (_e$currentSubApp = e.currentSubApp) !== null && _e$currentSubApp !== void 0 ? _e$currentSubApp : {},
|
|
150
|
+
currentSubAppCode: (_e$currentSubAppCode = e.currentSubAppCode) !== null && _e$currentSubAppCode !== void 0 ? _e$currentSubAppCode : "",
|
|
151
|
+
subAppList: (_e$subAppList = e.subAppList) !== null && _e$subAppList !== void 0 ? _e$subAppList : [],
|
|
152
|
+
menuCollapses: (_e$menuCollapses = e.menuCollapses) !== null && _e$menuCollapses !== void 0 ? _e$menuCollapses : []
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
U = function U(e) {
|
|
156
|
+
var _ref41, _ref42;
|
|
157
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
158
|
+
var a, o;
|
|
159
|
+
var r = m().subAppList;
|
|
160
|
+
if (e) return t ? (_ref41 = (a = r == null ? undefined : r.find(function (n) {
|
|
161
|
+
return n.code === e;
|
|
162
|
+
})) == null ? undefined : a.originalMenus) !== null && _ref41 !== void 0 ? _ref41 : [] : (_ref42 = (o = r == null ? undefined : r.find(function (n) {
|
|
163
|
+
return n.code === e;
|
|
164
|
+
})) == null ? undefined : o.menus) !== null && _ref42 !== void 0 ? _ref42 : [];
|
|
165
|
+
{
|
|
166
|
+
var n = {};
|
|
167
|
+
return t ? r == null || r.forEach(function (s) {
|
|
168
|
+
var _s$originalMenus;
|
|
169
|
+
n[s.code] = (_s$originalMenus = s.originalMenus) !== null && _s$originalMenus !== void 0 ? _s$originalMenus : [];
|
|
170
|
+
}) : r == null || r.forEach(function (s) {
|
|
171
|
+
var _s$menus;
|
|
172
|
+
n[s.code] = (_s$menus = s.menus) !== null && _s$menus !== void 0 ? _s$menus : [];
|
|
173
|
+
}), n;
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
E = function E() {
|
|
177
|
+
var _e$currentCode, _e$currentTab, _e$tabMap, _e$preTab;
|
|
178
|
+
var e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
179
|
+
return {
|
|
180
|
+
currentCode: (_e$currentCode = e.currentCode) !== null && _e$currentCode !== void 0 ? _e$currentCode : "",
|
|
181
|
+
currentTab: (_e$currentTab = e.currentTab) !== null && _e$currentTab !== void 0 ? _e$currentTab : {},
|
|
182
|
+
tabMap: (_e$tabMap = e.tabMap) !== null && _e$tabMap !== void 0 ? _e$tabMap : {},
|
|
183
|
+
preTab: (_e$preTab = e.preTab) !== null && _e$preTab !== void 0 ? _e$preTab : {}
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
z = function z() {
|
|
187
|
+
var e = config.getConfig(),
|
|
188
|
+
t = sessionStorage.getItem("minioAddress");
|
|
189
|
+
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
190
|
+
},
|
|
191
|
+
x = function x() {
|
|
192
|
+
var _JSON$parse$instanceI;
|
|
193
|
+
return {
|
|
194
|
+
instanceInfo: (_JSON$parse$instanceI = JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo) !== null && _JSON$parse$instanceI !== void 0 ? _JSON$parse$instanceI : {}
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
F = function F() {
|
|
198
|
+
return localStorage.getItem("fav-icon") || "./logo.svg";
|
|
199
|
+
};
|
|
200
|
+
N() || getInfoFromUrl.getTokenFromQuery();
|
|
201
|
+
var i;
|
|
202
|
+
(i = C()) != null && i.id || getInfoFromUrl.getProjectInfoFromQuery();
|
|
203
|
+
exports.getFavIcon = F;
|
|
204
|
+
exports.getHomeInfo = k;
|
|
205
|
+
exports.getInstanceInfo = x;
|
|
206
|
+
exports.getLanguages = M;
|
|
207
|
+
exports.getMenus = U;
|
|
208
|
+
exports.getMinioAddress = z;
|
|
209
|
+
exports.getPageAuth = j;
|
|
210
|
+
exports.getPageAuthBtn = D;
|
|
211
|
+
exports.getPersonalConfig = v;
|
|
212
|
+
exports.getPersonalInfo = J;
|
|
213
|
+
exports.getProjectInfo = C;
|
|
214
|
+
exports.getProjectMessage = f;
|
|
215
|
+
exports.getSubApps = m;
|
|
216
|
+
exports.getTabInfo = E;
|
|
217
|
+
exports.getTenantInfo = O;
|
|
218
|
+
exports.getToken = N;
|
|
219
|
+
exports.getUserInfo = A;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
var commonTools = require('@das-fed/upf-utils/common-tools/es5');
|
|
10
|
+
var l = function l(r, t) {
|
|
11
|
+
if (!r) return;
|
|
12
|
+
var e = {};
|
|
13
|
+
var i = "enterpriseadmin/iocvisual";
|
|
14
|
+
return (r === "preview" || r === "preview3d") && (e = {
|
|
15
|
+
showLayout: false
|
|
16
|
+
}), commonTools.getFullPath("/" + i + "/" + r, _objectSpread(_objectSpread({}, e), t));
|
|
17
|
+
};
|
|
18
|
+
exports.getIframeUrl = l;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function a(e) {
|
|
11
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
12
|
+
var t = arguments[o];
|
|
13
|
+
for (var s in t) e[s] = t[s];
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
var u = {
|
|
18
|
+
read: function read(e) {
|
|
19
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
20
|
+
},
|
|
21
|
+
write: function write(e) {
|
|
22
|
+
return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function g(e, o) {
|
|
26
|
+
function t(n, f, r) {
|
|
27
|
+
if (!((typeof document === "undefined" ? "undefined" : _typeof(document)) > "u")) {
|
|
28
|
+
r = a({}, o, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
29
|
+
var c = "";
|
|
30
|
+
for (var i in r) r[i] && (c += "; " + i, r[i] !== true && (c += "=" + r[i].split(";")[0]));
|
|
31
|
+
return document.cookie = n + "=" + e.write(f, n) + c;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function s(n) {
|
|
35
|
+
if (!((typeof document === "undefined" ? "undefined" : _typeof(document)) > "u" || arguments.length && !n)) {
|
|
36
|
+
for (var f = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < f.length; c++) {
|
|
37
|
+
var i = f[c].split("="),
|
|
38
|
+
d = i.slice(1).join("=");
|
|
39
|
+
try {
|
|
40
|
+
var p = decodeURIComponent(i[0]);
|
|
41
|
+
if (r[p] = e.read(d, p), n === p) break;
|
|
42
|
+
} catch (_unused) {}
|
|
43
|
+
}
|
|
44
|
+
return n ? r[n] : r;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return Object.create({
|
|
48
|
+
set: t,
|
|
49
|
+
get: s,
|
|
50
|
+
remove: function remove(n, f) {
|
|
51
|
+
t(n, "", a({}, f, {
|
|
52
|
+
expires: -1
|
|
53
|
+
}));
|
|
54
|
+
},
|
|
55
|
+
withAttributes: function withAttributes(n) {
|
|
56
|
+
return g(this.converter, a({}, this.attributes, n));
|
|
57
|
+
},
|
|
58
|
+
withConverter: function withConverter(n) {
|
|
59
|
+
return g(a({}, this.converter, n), this.attributes);
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
attributes: {
|
|
63
|
+
value: Object.freeze(o)
|
|
64
|
+
},
|
|
65
|
+
converter: {
|
|
66
|
+
value: Object.freeze(e)
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
var h = g(u, {
|
|
71
|
+
path: "/"
|
|
72
|
+
});
|
|
73
|
+
var v = function v() {
|
|
74
|
+
var e = new URL(location.href).searchParams,
|
|
75
|
+
o = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
|
|
76
|
+
o && (JSON.stringify({
|
|
77
|
+
access_token: o
|
|
78
|
+
}), h.set("accessToken", o));
|
|
79
|
+
},
|
|
80
|
+
I = function I() {
|
|
81
|
+
var e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"),
|
|
82
|
+
o = new URL(location.href).searchParams,
|
|
83
|
+
t = o.get("project") || o.get("projectId") || "";
|
|
84
|
+
if (!t) return;
|
|
85
|
+
var s = o.get("projectParent") || o.get("projectParentId") || (e == null ? undefined : e.parentId) || "",
|
|
86
|
+
n = o.get("projectName") || (e == null ? undefined : e.name) || "";
|
|
87
|
+
sessionStorage.setItem("project", t), sessionStorage.setItem("projectInfo", JSON.stringify(_objectSpread(_objectSpread({}, e), {}, {
|
|
88
|
+
id: t,
|
|
89
|
+
name: n,
|
|
90
|
+
parentId: s
|
|
91
|
+
})));
|
|
92
|
+
};
|
|
93
|
+
exports.getProjectInfoFromQuery = I;
|
|
94
|
+
exports.getTokenFromQuery = v;
|
package/common-info/index.js
CHANGED
|
@@ -60,7 +60,7 @@ const N = I, A = () => {
|
|
|
60
60
|
leaf: (e == null ? void 0 : e.leaf) ?? !1,
|
|
61
61
|
optional: (e == null ? void 0 : e.leaf) ?? !0
|
|
62
62
|
};
|
|
63
|
-
},
|
|
63
|
+
}, f = () => {
|
|
64
64
|
let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
65
65
|
return {
|
|
66
66
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
@@ -85,7 +85,7 @@ const N = I, A = () => {
|
|
|
85
85
|
autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
|
|
86
86
|
currency: (e == null ? void 0 : e.currency) ?? {}
|
|
87
87
|
};
|
|
88
|
-
},
|
|
88
|
+
}, k = () => {
|
|
89
89
|
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
90
90
|
return {
|
|
91
91
|
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
@@ -96,7 +96,7 @@ const N = I, A = () => {
|
|
|
96
96
|
displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
|
|
97
97
|
type: (e == null ? void 0 : e.type) ?? null
|
|
98
98
|
};
|
|
99
|
-
},
|
|
99
|
+
}, v = () => {
|
|
100
100
|
const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
|
|
101
101
|
return {
|
|
102
102
|
style: (e == null ? void 0 : e.style) ?? "",
|
|
@@ -104,13 +104,13 @@ const N = I, A = () => {
|
|
|
104
104
|
};
|
|
105
105
|
}, j = (e, t) => {
|
|
106
106
|
var g;
|
|
107
|
-
const r = "permission-btn", a = m(), o = d(location.href, "app") || "",
|
|
108
|
-
if (!
|
|
109
|
-
const
|
|
107
|
+
const r = "permission-btn", a = m(), o = d(location.href, "app") || "", n = t || o || a.currentSubAppCode;
|
|
108
|
+
if (!n) return;
|
|
109
|
+
const s = d(location.href, "menu") || "", l = e || s || a.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
|
|
110
110
|
if (!c || JSON.stringify(c) === "{}") return;
|
|
111
|
-
const p = (g = c[
|
|
111
|
+
const p = (g = c[n]) == null ? void 0 : g[l];
|
|
112
112
|
if (p)
|
|
113
|
-
return p.length ? p : c[
|
|
113
|
+
return p.length ? p : c[n]["origin-auth"] ? c[n]["origin-auth"][l] ?? [] : [];
|
|
114
114
|
}, D = (e, t) => j(e, t) ?? [], m = () => {
|
|
115
115
|
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
116
116
|
return {
|
|
@@ -124,14 +124,14 @@ const N = I, A = () => {
|
|
|
124
124
|
var a, o;
|
|
125
125
|
const r = m().subAppList;
|
|
126
126
|
if (e)
|
|
127
|
-
return t ? ((a = r == null ? void 0 : r.find((
|
|
127
|
+
return t ? ((a = r == null ? void 0 : r.find((n) => n.code === e)) == null ? void 0 : a.originalMenus) ?? [] : ((o = r == null ? void 0 : r.find((n) => n.code === e)) == null ? void 0 : o.menus) ?? [];
|
|
128
128
|
{
|
|
129
|
-
let
|
|
130
|
-
return t ? r == null || r.forEach((
|
|
131
|
-
s
|
|
132
|
-
}) : r == null || r.forEach((
|
|
133
|
-
s
|
|
134
|
-
}),
|
|
129
|
+
let n = {};
|
|
130
|
+
return t ? r == null || r.forEach((s) => {
|
|
131
|
+
n[s.code] = s.originalMenus ?? [];
|
|
132
|
+
}) : r == null || r.forEach((s) => {
|
|
133
|
+
n[s.code] = s.menus ?? [];
|
|
134
|
+
}), n;
|
|
135
135
|
}
|
|
136
136
|
}, E = () => {
|
|
137
137
|
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
@@ -152,17 +152,17 @@ var i;
|
|
|
152
152
|
(i = C()) != null && i.id || y();
|
|
153
153
|
export {
|
|
154
154
|
F as getFavIcon,
|
|
155
|
-
|
|
155
|
+
k as getHomeInfo,
|
|
156
156
|
x as getInstanceInfo,
|
|
157
157
|
M as getLanguages,
|
|
158
158
|
U as getMenus,
|
|
159
159
|
z as getMinioAddress,
|
|
160
160
|
j as getPageAuth,
|
|
161
161
|
D as getPageAuthBtn,
|
|
162
|
-
|
|
162
|
+
v as getPersonalConfig,
|
|
163
163
|
J as getPersonalInfo,
|
|
164
164
|
C as getProjectInfo,
|
|
165
|
-
|
|
165
|
+
f as getProjectMessage,
|
|
166
166
|
m as getSubApps,
|
|
167
167
|
E as getTabInfo,
|
|
168
168
|
O as getTenantInfo,
|
package/common-info/index.js.gz
CHANGED
|
Binary file
|