agilebuilder-ui 1.0.35 → 1.0.36
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/lib/super-ui.js +27 -11
- package/lib/super-ui.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/utils/permission.js +1 -1
package/lib/super-ui.js
CHANGED
|
@@ -12086,7 +12086,7 @@ var api = init(defaultConverter, { path: "/" });
|
|
|
12086
12086
|
const jwtKey = "JWT", currentUserNameKey = "USERNAME", currentUserInfoKey = "CURRENT_USER", currentSystemUrlKey = "CURRENT_SYSTEM_URL_", langKey = "CURRENT_LANGUAGE", allLangKey = "AMB_LANG_INFO", versionEnv = "VERSION_ENVIRONMENT", userVersion = "CURRENT_USER_SYSTEM_VERSION", runDevpJwtKey = "_runDevpJWT";
|
|
12087
12087
|
function getToken$1() {
|
|
12088
12088
|
let e = isDevpSystem(), t;
|
|
12089
|
-
return e ? t = getMyToken() : (t = getSessionCache(runDevpJwtKey), t || (t = getMyToken())), t;
|
|
12089
|
+
return e ? t = getMyToken() : (t = getSessionCache$1(runDevpJwtKey), t || (t = getMyToken())), t;
|
|
12090
12090
|
}
|
|
12091
12091
|
function isDevpSystem() {
|
|
12092
12092
|
let e = !1;
|
|
@@ -12095,7 +12095,7 @@ function isDevpSystem() {
|
|
|
12095
12095
|
}
|
|
12096
12096
|
function getMyToken() {
|
|
12097
12097
|
let e = getCookieCache(jwtKey);
|
|
12098
|
-
return e || (e = getSessionCache(jwtKey), console.log("authAPI.getToken---getSessionCache=", e)), e;
|
|
12098
|
+
return e || (e = getSessionCache$1(jwtKey), console.log("authAPI.getToken---getSessionCache=", e)), e;
|
|
12099
12099
|
}
|
|
12100
12100
|
function setToken(e) {
|
|
12101
12101
|
setCookieCache(jwtKey, e), setSessionCache(jwtKey, e);
|
|
@@ -12105,7 +12105,7 @@ function removeToken() {
|
|
|
12105
12105
|
}
|
|
12106
12106
|
function getUsername() {
|
|
12107
12107
|
let e = getRunInfoKey(currentUserNameKey), t = getCookieCache(e);
|
|
12108
|
-
return t || (t = getSessionCache(e)), t;
|
|
12108
|
+
return t || (t = getSessionCache$1(e)), t;
|
|
12109
12109
|
}
|
|
12110
12110
|
function setUsername(e) {
|
|
12111
12111
|
let t = getRunInfoKey(currentUserNameKey);
|
|
@@ -12120,7 +12120,7 @@ function getCurrentUser() {
|
|
|
12120
12120
|
}
|
|
12121
12121
|
function getCurrentUserByKey(e) {
|
|
12122
12122
|
let t = getCookieCache(e);
|
|
12123
|
-
if (t || (t = getSessionCache(e)), t)
|
|
12123
|
+
if (t || (t = getSessionCache$1(e)), t)
|
|
12124
12124
|
return JSON.parse(t);
|
|
12125
12125
|
}
|
|
12126
12126
|
function setCurrentUser(e) {
|
|
@@ -12133,7 +12133,7 @@ function setCurrentUser(e) {
|
|
|
12133
12133
|
}
|
|
12134
12134
|
function getRunInfoKey(e) {
|
|
12135
12135
|
let t = e;
|
|
12136
|
-
return isDevpSystem() || getSessionCache(runDevpJwtKey) && (t = "_run_" + t), t;
|
|
12136
|
+
return isDevpSystem() || getSessionCache$1(runDevpJwtKey) && (t = "_run_" + t), t;
|
|
12137
12137
|
}
|
|
12138
12138
|
function removeCurrentUser() {
|
|
12139
12139
|
removeSessionCache(currentUserInfoKey), removeCookieCache(currentUserInfoKey);
|
|
@@ -12151,7 +12151,7 @@ function removeCookieCache(e) {
|
|
|
12151
12151
|
path: "/"
|
|
12152
12152
|
});
|
|
12153
12153
|
}
|
|
12154
|
-
function getSessionCache(e) {
|
|
12154
|
+
function getSessionCache$1(e) {
|
|
12155
12155
|
return window.sessionStorage.getItem(e);
|
|
12156
12156
|
}
|
|
12157
12157
|
function setSessionCache(e, t) {
|
|
@@ -12169,7 +12169,7 @@ function getSystemCacheUrlByCode(e) {
|
|
|
12169
12169
|
}
|
|
12170
12170
|
function getSystemCacheUrl() {
|
|
12171
12171
|
let e = getCookieCache(currentSystemUrlKey);
|
|
12172
|
-
if (e || (e = getSessionCache(currentSystemUrlKey)), e)
|
|
12172
|
+
if (e || (e = getSessionCache$1(currentSystemUrlKey)), e)
|
|
12173
12173
|
return JSON.parse(e);
|
|
12174
12174
|
}
|
|
12175
12175
|
function setSystemCacheUrl(e) {
|
|
@@ -12184,7 +12184,7 @@ function removeSystemCacheUrl() {
|
|
|
12184
12184
|
function getLanguage() {
|
|
12185
12185
|
let e = getCookieCache(langKey);
|
|
12186
12186
|
const t = window.$vueApp.config.globalProperties.projectModel;
|
|
12187
|
-
return !e && t && t === "developing.model" && (e = getSessionCache(langKey)), e;
|
|
12187
|
+
return !e && t && t === "developing.model" && (e = getSessionCache$1(langKey)), e;
|
|
12188
12188
|
}
|
|
12189
12189
|
function setLanguage(e) {
|
|
12190
12190
|
setCookieCache(langKey, e), setSessionCache(langKey, e);
|
|
@@ -12195,7 +12195,7 @@ function removeLanguage() {
|
|
|
12195
12195
|
function getAllLanguages$1() {
|
|
12196
12196
|
let e = getCookieCache(allLangKey);
|
|
12197
12197
|
const t = window.$vueApp.config.globalProperties.projectModel;
|
|
12198
|
-
return !e && t && t === "developing.model" && (e = getSessionCache(allLangKey)), e;
|
|
12198
|
+
return !e && t && t === "developing.model" && (e = getSessionCache$1(allLangKey)), e;
|
|
12199
12199
|
}
|
|
12200
12200
|
function setAllLanguages(e) {
|
|
12201
12201
|
setCookieCache(allLangKey, e), setSessionCache(allLangKey, e);
|
|
@@ -12219,7 +12219,7 @@ const authApi = {
|
|
|
12219
12219
|
getCookieCache,
|
|
12220
12220
|
setCookieCache,
|
|
12221
12221
|
removeCookieCache,
|
|
12222
|
-
getSessionCache,
|
|
12222
|
+
getSessionCache: getSessionCache$1,
|
|
12223
12223
|
setSessionCache,
|
|
12224
12224
|
removeSessionCache,
|
|
12225
12225
|
getSystemCacheUrlByCode,
|
|
@@ -12239,6 +12239,9 @@ const authApi = {
|
|
|
12239
12239
|
function getToken() {
|
|
12240
12240
|
return authApi.getToken();
|
|
12241
12241
|
}
|
|
12242
|
+
function getSessionCache(e) {
|
|
12243
|
+
return authApi.getSessionCache(e);
|
|
12244
|
+
}
|
|
12242
12245
|
function getAllLanguages() {
|
|
12243
12246
|
return authApi.getAllLanguages();
|
|
12244
12247
|
}
|
|
@@ -25260,11 +25263,24 @@ const superGridService$1 = {
|
|
|
25260
25263
|
n();
|
|
25261
25264
|
});
|
|
25262
25265
|
}
|
|
25263
|
-
};
|
|
25266
|
+
}, permissionKey = "PERMISSION-", _RUN_PERMISSION = "_RUN_PERMISSION";
|
|
25264
25267
|
function getSystemCode() {
|
|
25265
25268
|
let e;
|
|
25266
25269
|
return window.$vueApp.config.globalProperties.customSystem ? e = window.$vueApp.config.globalProperties.customSystem : window.$vueApp.config.globalProperties.currentSystem ? e = window.$vueApp.config.globalProperties.currentSystem : e = window.$vueApp.config.globalProperties.systemCode, e;
|
|
25267
25270
|
}
|
|
25271
|
+
function getTotalPermissions() {
|
|
25272
|
+
(/* @__PURE__ */ new Date()).getTime();
|
|
25273
|
+
let e;
|
|
25274
|
+
const t = getSessionCache(_RUN_PERMISSION);
|
|
25275
|
+
t && (e = JSON.parse(t));
|
|
25276
|
+
let n;
|
|
25277
|
+
const o = getSystemCode(), i = window.sessionStorage.getItem(permissionKey + o);
|
|
25278
|
+
if (i && (n = JSON.parse(i)), (/* @__PURE__ */ new Date()).getTime(), e || n) {
|
|
25279
|
+
let l = {};
|
|
25280
|
+
return e && Object.assign(l, e), n && Object.assign(l, n), console.log("getTotalPermissions----permissions=", l), l;
|
|
25281
|
+
}
|
|
25282
|
+
return null;
|
|
25283
|
+
}
|
|
25268
25284
|
const headerContextMenu_vue_vue_type_style_index_0_scoped_040fcf55_lang = "", _sfc_main$S = {
|
|
25269
25285
|
name: "HeaderContextMenu",
|
|
25270
25286
|
components: {},
|