@das-fed/upf-utils 6.4.0-hot.11 → 6.4.0-hot.13
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.d.ts +2 -0
- package/api-services/es5.js +1125 -1074
- package/api-services/i18n/es5.d.ts +63 -0
- package/api-services/index.js +852 -813
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.d.ts +2 -0
- package/api-services/modules/app-manage/es5.js +957 -909
- package/api-services/modules/app-manage/index.js +746 -711
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.d.ts +2 -0
- package/api-services/modules/authentication/es5.js +1650 -1587
- package/api-services/modules/authentication/index.js +1410 -1353
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.d.ts +6 -0
- package/api-services/modules/bems/es5.js +1645 -1582
- package/api-services/modules/bems/index.js +1404 -1347
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.d.ts +2 -0
- package/api-services/modules/contract/es5.js +1250 -1199
- package/api-services/modules/contract/index.js +1035 -996
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.d.ts +7 -0
- package/api-services/modules/duty-manage/es5.js +963 -912
- package/api-services/modules/duty-manage/index.js +755 -716
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.d.ts +2 -0
- package/api-services/modules/enterpriseright/es5.js +1250 -1199
- package/api-services/modules/enterpriseright/index.js +1035 -996
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.d.ts +21 -0
- package/api-services/modules/es5.js +1113 -1062
- package/api-services/modules/file/es5.d.ts +37 -0
- package/api-services/modules/file/es5.js +1005 -954
- package/api-services/modules/file/index.js +786 -747
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.d.ts +2 -0
- package/api-services/modules/gateway-edge/es5.js +1250 -1199
- package/api-services/modules/gateway-edge/index.js +1035 -996
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +856 -817
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.d.ts +16 -0
- package/api-services/modules/iot/es5.js +1389 -1350
- package/api-services/modules/iot/index.js +1153 -1132
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.d.ts +3 -0
- package/api-services/modules/justauth/es5.js +1327 -1285
- package/api-services/modules/justauth/index.js +1111 -1086
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.d.ts +2 -0
- package/api-services/modules/knowledge/es5.js +1052 -998
- package/api-services/modules/knowledge/index.js +822 -779
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.d.ts +2 -0
- package/api-services/modules/link/es5.js +1250 -1199
- package/api-services/modules/link/index.js +1035 -996
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.d.ts +2 -0
- package/api-services/modules/permission/es5.js +1250 -1199
- package/api-services/modules/permission/index.js +1035 -996
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.d.ts +14 -0
- package/api-services/modules/platformManage/es5.js +1334 -1274
- package/api-services/modules/platformManage/index.js +1123 -1070
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.d.ts +2 -0
- package/api-services/modules/portal/es5.js +1250 -1199
- package/api-services/modules/portal/index.js +1035 -996
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.d.ts +2 -0
- package/api-services/modules/space-manage/es5.js +968 -917
- package/api-services/modules/space-manage/index.js +763 -724
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.d.ts +8 -0
- package/api-services/modules/super-admin/es5.js +1260 -1209
- package/api-services/modules/super-admin/index.js +1038 -999
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.d.ts +6 -0
- package/api-services/modules/supplier/es5.js +1249 -1198
- package/api-services/modules/supplier/index.js +1032 -993
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.d.ts +2 -0
- package/api-services/modules/supplychain-manage/es5.js +983 -932
- package/api-services/modules/supplychain-manage/index.js +775 -736
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.d.ts +2 -0
- package/api-services/modules/systemConfiguration/es5.js +1250 -1199
- package/api-services/modules/systemConfiguration/index.js +1035 -996
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.d.ts +2 -0
- package/api-services/modules/tool/es5.js +971 -920
- package/api-services/modules/tool/index.js +764 -725
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.d.ts +1 -0
- package/api-services/src/create-service/es5.js +1396 -1357
- package/api-services/src/create-service/index.js +1170 -1149
- package/api-services/src/create-service/index.js.gz +0 -0
- package/atob/es5.d.ts +2 -0
- package/common-info/es5.d.ts +73 -0
- package/common-info/es5.js +2155 -2063
- package/common-info/getIframeUrl/es5.d.ts +9 -0
- package/common-info/getInfoFromUrl/es5.d.ts +8 -0
- package/common-info/getPermissionMethod/es5.d.ts +77 -0
- package/common-info/getPermissionMethod/es5.js +1414 -1313
- package/common-info/getPermissionMethod/index.d.ts +57 -6
- package/common-info/getPermissionMethod/index.js +1155 -1073
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.d.ts +5 -8
- package/common-info/index.js +1818 -1751
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.d.ts +5 -0
- package/common-info/type.d.ts +2 -2
- package/common-tools/arr-tools/es5.d.ts +15 -0
- package/common-tools/calc-text-width/es5.d.ts +1 -0
- package/common-tools/date-format/es5.d.ts +7 -0
- package/common-tools/es5.d.ts +15 -0
- package/common-tools/es5.js +9 -0
- package/common-tools/extract-file-name/es5.d.ts +1 -0
- package/common-tools/get-file-extension/es5.d.ts +6 -0
- package/common-tools/get-url-params/es5.d.ts +46 -0
- package/common-tools/handle-data/es5.d.ts +34 -0
- package/common-tools/handle-data/es5.js +44 -6
- package/common-tools/handle-data/index.d.ts +16 -1
- package/common-tools/handle-data/index.js +1 -1
- package/common-tools/handle-data/index.js.gz +0 -0
- package/common-tools/index.d.ts +1 -0
- package/common-tools/index.js +1 -0
- package/common-tools/nest-tree-format/es5.d.ts +30 -0
- package/common-tools/obj-tools/es5.d.ts +7 -0
- package/common-tools/platform-tools/es5.d.ts +19 -0
- package/common-tools/queue-promise/es5.d.ts +6 -0
- package/common-tools/setHtmlMinWH/es5.d.ts +5 -0
- package/common-tools/timezone-format/es5.d.ts +132 -0
- package/common-tools/timezone-format/es5.js +822 -0
- package/common-tools/timezone-format/get-iana-data/dayjs-timezone-iana-plugin.d.ts +72 -0
- package/common-tools/timezone-format/get-iana-data/iana-api-fetch.d.ts +21 -0
- package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +29 -0
- package/common-tools/timezone-format/index.d.ts +132 -0
- package/common-tools/timezone-format/index.js +439 -0
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/common-tools/update-browser-title/es5.d.ts +1 -0
- package/common-tools/update-fav-icon/es5.d.ts +11 -0
- package/config/es5.d.ts +2 -0
- package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
- package/create-api-service/access-token-auto-refresh/es5.js +27 -26
- package/create-api-service/access-token-auto-refresh/index.js +27 -26
- package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
- package/create-api-service/check-token/es5.d.ts +12 -0
- package/create-api-service/es5.d.ts +8 -0
- package/create-api-service/es5.js +1397 -1358
- package/create-api-service/i18n/es5.d.ts +39 -0
- package/create-api-service/index.js +1171 -1150
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/es5.d.ts +3 -0
- package/create-api-service/sso/es5.d.ts +21 -0
- package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
- package/curring-http/es5.d.ts +12 -0
- package/dimple-canvas/es5.d.ts +3 -0
- package/directive/auth/es5.d.ts +8 -0
- package/directive/auth/es5.js +50 -42
- package/directive/auth/index.d.ts +1 -1
- package/directive/auth/index.js +42 -34
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/es5.d.ts +6 -0
- package/directive/es5.d.ts +3 -0
- package/directive/hoverInside/es5.d.ts +6 -0
- package/directive/utils/es5.d.ts +7 -0
- package/dom-check-in/es5.d.ts +6 -0
- package/dom-watcher/es5.d.ts +25 -0
- package/esm-map.json +66 -3
- package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/es5.d.ts +8 -0
- package/hooks/use-get-auth/es5.js +325 -57
- package/hooks/use-get-auth/index.d.ts +8 -4
- package/hooks/use-get-auth/index.js +71 -16
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/i18n-bridge/es5.d.ts +10 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/load-js/es5.d.ts +3 -0
- package/nextTiken/es5.d.ts +12 -0
- package/oss/es5.d.ts +2 -0
- package/package.json +4 -3
- package/pinyin-first-character/es5.d.ts +2 -0
- package/process-engine-info/es5.d.ts +13 -0
- package/pure-image-src/es5.d.ts +2 -0
- package/size-watcher/es5.d.ts +6 -0
- package/style/es5.d.ts +2 -0
- package/theme/es5.d.ts +111 -0
- package/theme/es5.js +1676 -0
- package/theme/index.d.ts +111 -0
- package/theme/index.js +1118 -0
- package/theme/index.js.gz +0 -0
- package/token-tools/es5.d.ts +21 -0
- package/use-low-code/es5.d.ts +1 -0
- package/use-low-code/es5.js +37 -53
- package/use-low-code/index.js +36 -31
- package/use-low-code/index.js.gz +0 -0
- package/vue/es5.d.ts +1 -0
- package/vue/hooks/use-model-value/es5.d.ts +9 -0
- package/webSocket-service/es5.d.ts +41 -0
- package/with-install/es5.d.ts +11 -0
- package/use-low-code/style.css +0 -1
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const getQuery: (name: any) => any;
|
|
2
|
+
declare const real_uri: any;
|
|
3
|
+
declare const getTokenParams: any;
|
|
4
|
+
declare const getTokenFromCode: () => unknown;
|
|
5
|
+
declare const getToken: (config: any) => unknown;
|
|
6
|
+
declare const login: (params: any) => any;
|
|
7
|
+
declare const tokenStorage: () => {
|
|
8
|
+
getData: () => {
|
|
9
|
+
accessToken: any;
|
|
10
|
+
accessTokenExpiredAt: any;
|
|
11
|
+
refreshToken: any;
|
|
12
|
+
};
|
|
13
|
+
save: (data: {
|
|
14
|
+
accessToken?: string | null;
|
|
15
|
+
accessTokenExpiredAt?: string | number | null;
|
|
16
|
+
refreshToken?: string | null;
|
|
17
|
+
info?: any;
|
|
18
|
+
}) => void;
|
|
19
|
+
remove: () => void;
|
|
20
|
+
};
|
|
21
|
+
export { getTokenParams, getTokenFromCode, real_uri, getQuery, getToken, tokenStorage, login };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface RefreshDataType {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
refreshToken: string;
|
|
4
|
+
accessExp: number;
|
|
5
|
+
refreshExp?: number;
|
|
6
|
+
accessTokenExpiredAt?: number;
|
|
7
|
+
sub?: string;
|
|
8
|
+
tenant?: string;
|
|
9
|
+
}
|
|
10
|
+
export type TokenLifecycleData = {
|
|
11
|
+
accessToken?: string;
|
|
12
|
+
refreshToken?: string;
|
|
13
|
+
accessExp?: number | string;
|
|
14
|
+
refreshExp?: number | string;
|
|
15
|
+
accessTokenExpiredAt?: number | string;
|
|
16
|
+
};
|
|
17
|
+
export type RefreshPrecheckResult = 'access_valid' | 'need_refresh' | 'refresh_expired';
|
|
18
|
+
export declare const CHECK_BUFFER_TIME: number;
|
|
19
|
+
export declare const MAX_RETRIES = 1;
|
|
20
|
+
export declare const RETRY_DELAY = 1000;
|
|
21
|
+
export declare const DEFAULT_REFRESH_SCOPE = "basic-application-access-token-refresh";
|
|
22
|
+
export declare const toTimestamp: (value: any) => any;
|
|
23
|
+
export declare const normalizeRefreshData: (data: any) => RefreshDataType;
|
|
24
|
+
export declare const getRefreshPrecheckResult: (tokenData: TokenLifecycleData, bufferTime?: number) => RefreshPrecheckResult;
|
|
25
|
+
export declare const startRefreshPending: (scope?: string) => boolean;
|
|
26
|
+
export declare const waitRefreshResult: (scope?: string) => any;
|
|
27
|
+
export declare const resolveRefreshResult: (data: RefreshDataType, scope?: string) => void;
|
|
28
|
+
export declare const rejectRefreshResult: (reason?: any, scope?: string) => void;
|
|
29
|
+
export declare const clearRefreshState: (scope?: string, reason?: any) => void;
|
|
30
|
+
export declare function refreshTokenWithRetry(refreshToken: string, maxRetries?: number, delay?: number, retryCount?: number): Promise<RefreshDataType>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { CurringConfigFun, CurringConfig, CurringRes } from './type';
|
|
3
|
+
|
|
4
|
+
/** 第一层(接入层):接收封装后的axios实例,第二个参数是全局请求配置,配置项参考AxiosRequestConfig */
|
|
5
|
+
declare const curringHttp: (axiosInstance: any, globalConfig?: CurringConfigFun) => {
|
|
6
|
+
get: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
7
|
+
post: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
8
|
+
put: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
9
|
+
patch: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
10
|
+
delete: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
11
|
+
};
|
|
12
|
+
export { curringHttp };
|
package/directive/auth/es5.js
CHANGED
|
@@ -2,66 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
var commonInfo = require('@das-fed/upf-utils/common-info/es5');
|
|
4
4
|
var utils = require('@das-fed/upf-utils/directive/utils/es5');
|
|
5
|
-
var
|
|
6
|
-
var _ref
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
var A = function A(e) {
|
|
6
|
+
var _ref = e !== null && e !== void 0 ? e : {},
|
|
7
|
+
_ref$code = _ref.code,
|
|
8
|
+
t = _ref$code === void 0 ? "" : _ref$code;
|
|
9
|
+
var i = false;
|
|
10
|
+
if (!t || !t.length) return false;
|
|
11
|
+
var o = Array.isArray(t) ? t : [t],
|
|
12
|
+
r = commonInfo.getCurrentModulePermissionData("all"),
|
|
13
|
+
a = Array.isArray(r == null ? undefined : r.idList) ? r.idList : commonInfo.getCurrentModulePermissionData("id"),
|
|
14
|
+
c = Array.isArray(r == null ? undefined : r.codeList) ? r.codeList : commonInfo.getCurrentModulePermissionData("code"),
|
|
15
|
+
d = new Set((Array.isArray(a) ? a : []).map(function (n) {
|
|
15
16
|
return String(n);
|
|
16
17
|
})),
|
|
17
|
-
u = new Set((Array.isArray(
|
|
18
|
+
u = new Set((Array.isArray(c) ? c : []).map(function (n) {
|
|
18
19
|
return String(n);
|
|
19
20
|
})),
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
return
|
|
21
|
+
y = o.some(function (n) {
|
|
22
|
+
var s = String(n !== null && n !== void 0 ? n : "").trim();
|
|
23
|
+
return s && !/^[0-9]{3,}$/.test(s) && !s.includes(".") && !s.includes("_");
|
|
23
24
|
}),
|
|
24
|
-
|
|
25
|
-
l =
|
|
26
|
-
routeCode:
|
|
25
|
+
L = commonInfo.getCurrentRouteCode(),
|
|
26
|
+
l = y ? commonInfo.buildActionSuffixSet(u, {
|
|
27
|
+
routeCode: L
|
|
27
28
|
}) : /* @__PURE__ */new Set(),
|
|
28
|
-
|
|
29
|
+
g = {
|
|
29
30
|
search: "q",
|
|
30
31
|
add: "a",
|
|
31
32
|
"delete": "d",
|
|
32
33
|
edit: "m",
|
|
33
34
|
view: "v"
|
|
34
35
|
},
|
|
35
|
-
|
|
36
|
+
p = function p(n) {
|
|
36
37
|
if (!n) return false;
|
|
37
|
-
var
|
|
38
|
-
if (!
|
|
39
|
-
if (
|
|
40
|
-
var m =
|
|
41
|
-
return l.has(
|
|
38
|
+
var s = String(n || "").trim();
|
|
39
|
+
if (!s) return false;
|
|
40
|
+
if (s.includes(".") || s.includes("_")) return u.has(s);
|
|
41
|
+
var m = g[s] || "";
|
|
42
|
+
return l.has(s) || (m ? l.has(m) : false);
|
|
42
43
|
};
|
|
43
|
-
return (
|
|
44
|
-
var
|
|
45
|
-
return
|
|
46
|
-
}),
|
|
44
|
+
return (d.size > 0 || u.size > 0) && (i = o.some(function (n) {
|
|
45
|
+
var s = String(n !== null && n !== void 0 ? n : "").trim();
|
|
46
|
+
return s ? /^[0-9]{3,}$/.test(s) ? d.has(s) : p(s) : false;
|
|
47
|
+
}), i) ? true : i;
|
|
47
48
|
},
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
S = function S(e, t) {
|
|
50
|
+
t === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
|
|
50
51
|
},
|
|
51
|
-
|
|
52
|
+
P = function P(e, t) {
|
|
53
|
+
t === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
|
|
54
|
+
},
|
|
55
|
+
E = function E(e, t) {
|
|
52
56
|
var _ref2;
|
|
53
|
-
var
|
|
54
|
-
typeof
|
|
55
|
-
code:
|
|
57
|
+
var i = (e ? t.value : t) || {};
|
|
58
|
+
typeof i == "string" && (i = {
|
|
59
|
+
code: i
|
|
56
60
|
});
|
|
57
|
-
var o = (_ref2 =
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
var o = (_ref2 = i == null ? undefined : i.type) !== null && _ref2 !== void 0 ? _ref2 : "hide",
|
|
62
|
+
r = A(i);
|
|
63
|
+
if (e) if (!t.oldValue) r || utils.getEl(e, i).then(function (a) {
|
|
64
|
+
S(a, o);
|
|
65
|
+
});else {
|
|
66
|
+
var a = A(t.oldValue),
|
|
67
|
+
c = r;
|
|
68
|
+
if (a === c) return;
|
|
69
|
+
utils.getEl(e, i).then(function (d) {
|
|
70
|
+
c ? P(d, o) : S(d, o);
|
|
63
71
|
});
|
|
64
72
|
}
|
|
65
|
-
return
|
|
73
|
+
return r;
|
|
66
74
|
};
|
|
67
|
-
exports.vAuth =
|
|
75
|
+
exports.vAuth = E;
|
package/directive/auth/index.js
CHANGED
|
@@ -1,39 +1,47 @@
|
|
|
1
|
-
import { getCurrentModulePermissionData as f, getCurrentRouteCode as
|
|
2
|
-
import { getEl as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
let
|
|
6
|
-
if (!
|
|
7
|
-
return
|
|
8
|
-
const o = Array.isArray(
|
|
9
|
-
const
|
|
10
|
-
return
|
|
11
|
-
}),
|
|
1
|
+
import { getCurrentModulePermissionData as f, getCurrentRouteCode as v, buildActionSuffixSet as w } from "@das-fed/upf-utils/common-info";
|
|
2
|
+
import { getEl as h } from "@das-fed/upf-utils/directive/utils";
|
|
3
|
+
const A = (e) => {
|
|
4
|
+
const { code: t = "" } = e ?? {};
|
|
5
|
+
let i = !1;
|
|
6
|
+
if (!t || !t.length)
|
|
7
|
+
return !1;
|
|
8
|
+
const o = Array.isArray(t) ? t : [t], r = f("all"), a = Array.isArray(r == null ? void 0 : r.idList) ? r.idList : f("id"), c = Array.isArray(r == null ? void 0 : r.codeList) ? r.codeList : f("code"), d = new Set((Array.isArray(a) ? a : []).map((n) => String(n))), u = new Set((Array.isArray(c) ? c : []).map((n) => String(n))), y = o.some((n) => {
|
|
9
|
+
const s = String(n ?? "").trim();
|
|
10
|
+
return s && !/^[0-9]{3,}$/.test(s) && !s.includes(".") && !s.includes("_");
|
|
11
|
+
}), L = v(), l = y ? w(u, { routeCode: L }) : /* @__PURE__ */ new Set(), g = { search: "q", add: "a", delete: "d", edit: "m", view: "v" }, p = (n) => {
|
|
12
12
|
if (!n) return !1;
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
15
|
-
if (
|
|
16
|
-
const m =
|
|
17
|
-
return l.has(
|
|
13
|
+
const s = String(n || "").trim();
|
|
14
|
+
if (!s) return !1;
|
|
15
|
+
if (s.includes(".") || s.includes("_")) return u.has(s);
|
|
16
|
+
const m = g[s] || "";
|
|
17
|
+
return l.has(s) || (m ? l.has(m) : !1);
|
|
18
18
|
};
|
|
19
|
-
return (
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
}),
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
return (d.size > 0 || u.size > 0) && (i = o.some((n) => {
|
|
20
|
+
const s = String(n ?? "").trim();
|
|
21
|
+
return s ? /^[0-9]{3,}$/.test(s) ? d.has(s) : p(s) : !1;
|
|
22
|
+
}), i) ? !0 : i;
|
|
23
|
+
}, S = (e, t) => {
|
|
24
|
+
t === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
|
|
25
|
+
}, P = (e, t) => {
|
|
26
|
+
t === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
|
|
27
|
+
}, E = (e, t) => {
|
|
28
|
+
let i = (e ? t.value : t) || {};
|
|
29
|
+
typeof i == "string" && (i = { code: i });
|
|
30
|
+
const o = (i == null ? void 0 : i.type) ?? "hide", r = A(i);
|
|
31
|
+
if (e)
|
|
32
|
+
if (!t.oldValue)
|
|
33
|
+
r || h(e, i).then((a) => {
|
|
34
|
+
S(a, o);
|
|
35
|
+
});
|
|
36
|
+
else {
|
|
37
|
+
const a = A(t.oldValue), c = r;
|
|
38
|
+
if (a === c) return;
|
|
39
|
+
h(e, i).then((d) => {
|
|
40
|
+
c ? P(d, o) : S(d, o);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return r;
|
|
36
44
|
};
|
|
37
45
|
export {
|
|
38
|
-
|
|
46
|
+
E as vAuth
|
|
39
47
|
};
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface Config {
|
|
2
|
+
/** 观察目标节点的子节点的新增和删除;*/
|
|
3
|
+
childList?: boolean;
|
|
4
|
+
/** 观察目标节点的属性节点(新增或删除了某个属性,以及某个属性的属性值发生了变化); */
|
|
5
|
+
attributes?: boolean;
|
|
6
|
+
/** 要监视的特定属性名称的数组,如果未包含此属性,则对所有属性的更改都会触发变动通知; */
|
|
7
|
+
attributeFilter?: any[];
|
|
8
|
+
/** 在attributes属性已经设为true的前提下, 将发生变化的属性节点之前的属性值记录下来(记录在MutationRecord对象的oldValue属性中); */
|
|
9
|
+
attributeOldValue?: boolean;
|
|
10
|
+
/** 在characterData属性已经设为true的前提下,将发生变化characterData节点之前的文本内容记录下来(记录在MutationRecord对象的oldValue属性中); */
|
|
11
|
+
characterDataOldValue?: boolean;
|
|
12
|
+
/** 如果目标节点为characterData节点(一种抽象接口,具体可以为文本节点、注释节点,以及处理指令节点)时,也要观察该节点的文本内容是否发生变化; */
|
|
13
|
+
characterData?: boolean;
|
|
14
|
+
/** 观察目标节点的所有后代节点(观察目标节点所包含的整棵DOM树上的上述三种节点变化); */
|
|
15
|
+
subtree?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* dom监听器
|
|
19
|
+
* @param cb 回调函数
|
|
20
|
+
* @param dom 目标dom
|
|
21
|
+
* @param config 配置
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
declare const DomWatcher: (cb: (list: MutationRecord[]) => void, dom: HTMLElement, config?: Config) => any;
|
|
25
|
+
export { DomWatcher };
|
package/esm-map.json
CHANGED
|
@@ -55,6 +55,63 @@
|
|
|
55
55
|
"getInstanceInfo": "/common-info/index",
|
|
56
56
|
"getFavIcon": "/common-info/index",
|
|
57
57
|
"dateFormat": "/common-tools/date-format/index",
|
|
58
|
+
"getClientTimeZone": "/common-tools/timezone-format/index",
|
|
59
|
+
"normalizeLocaleCode": "/common-tools/timezone-format/index",
|
|
60
|
+
"isDaylightSavingTime": "/common-tools/timezone-format/index",
|
|
61
|
+
"getTimeZoneDisplayInfo": "/common-tools/timezone-format/index",
|
|
62
|
+
"dayjsTimezoneIanaPlugin": "/common-tools/timezone-format/index",
|
|
63
|
+
"loadDayjsIanaTimeZoneData": "/common-tools/timezone-format/index",
|
|
64
|
+
"applyDayjsIanaTimeZoneData": "/common-tools/timezone-format/index",
|
|
65
|
+
"loadMomentIanaTimeZoneData": "/common-tools/timezone-format/index",
|
|
66
|
+
"applyMomentIanaTimeZoneData": "/common-tools/timezone-format/index",
|
|
67
|
+
"loadMomentIanaData": "/common-tools/timezone-format/index",
|
|
68
|
+
"loadMomentIanaFromApi": "/common-tools/timezone-format/index",
|
|
69
|
+
"setDefaultTimeZone": "/common-tools/timezone-format/index",
|
|
70
|
+
"resolveTimeZone": "/common-tools/timezone-format/index",
|
|
71
|
+
"formatInTimeZone": "/common-tools/timezone-format/index",
|
|
72
|
+
"formatLocalDateTime": "/common-tools/timezone-format/index",
|
|
73
|
+
"toLocalDate": "/common-tools/timezone-format/index",
|
|
74
|
+
"getZoneUtcOffset": "/common-tools/timezone-format/index",
|
|
75
|
+
"formatTimeZoneOffsetLabel": "/common-tools/timezone-format/index",
|
|
76
|
+
"resolveUtcOffsetFallback": "/common-tools/timezone-format/index",
|
|
77
|
+
"buildTimeZoneDisplayOptions": "/common-tools/timezone-format/index",
|
|
78
|
+
"formatClientLocalDateTimeLine": "/common-tools/timezone-format/index",
|
|
79
|
+
"timeZoneHasDST": "/common-tools/timezone-format/index",
|
|
80
|
+
"timeZoneIsDST": "/common-tools/timezone-format/index",
|
|
81
|
+
"isKnownTimeZone": "/common-tools/timezone-format/index",
|
|
82
|
+
"rebuildKnownTimeZoneIds": "/common-tools/timezone-format/index",
|
|
83
|
+
"getKnownTimeZoneIds": "/common-tools/timezone-format/index",
|
|
84
|
+
"mixHexColor": "/theme/index",
|
|
85
|
+
"toRgbaColor": "/theme/index",
|
|
86
|
+
"resolveThemeBridgeVariables": "/theme/index",
|
|
87
|
+
"toLegacyThemeVariables": "/theme/index",
|
|
88
|
+
"toElementThemeVariables": "/theme/index",
|
|
89
|
+
"toDasUiColorOverrides": "/theme/index",
|
|
90
|
+
"toUpfComponentThemeVariables": "/theme/index",
|
|
91
|
+
"buildRuntimeThemeVariables": "/theme/index",
|
|
92
|
+
"BUILTIN_PRESET_THEME_NAMES": "/theme/index",
|
|
93
|
+
"PRESET_THEMES": "/theme/index",
|
|
94
|
+
"getPresetTheme": "/theme/index",
|
|
95
|
+
"getAllPresetThemes": "/theme/index",
|
|
96
|
+
"getDefaultPresetTheme": "/theme/index",
|
|
97
|
+
"getDefaultThemeVariables": "/theme/index",
|
|
98
|
+
"buildPresetThemeCssText": "/theme/index",
|
|
99
|
+
"buildDefaultThemeCssText": "/theme/index",
|
|
100
|
+
"ensureDefaultThemeStyle": "/theme/index",
|
|
101
|
+
"applyThemeVariablesToDocument": "/theme/index",
|
|
102
|
+
"applyThemeEventToDocument": "/theme/index",
|
|
103
|
+
"getThemeAPI": "/theme/index",
|
|
104
|
+
"getCurrentTheme": "/theme/index",
|
|
105
|
+
"getThemeVariables": "/theme/index",
|
|
106
|
+
"changeTheme": "/theme/index",
|
|
107
|
+
"syncThemeFromHost": "/theme/index",
|
|
108
|
+
"syncHostThemeRoot": "/theme/index",
|
|
109
|
+
"initSubAppThemeSync": "/theme/index",
|
|
110
|
+
"initHostThemeRootSync": "/theme/index",
|
|
111
|
+
"getThemeVariable": "/theme/index",
|
|
112
|
+
"getVar": "/theme/index",
|
|
113
|
+
"getVarValue": "/theme/index",
|
|
114
|
+
"useSubAppTheme": "/theme/vue",
|
|
58
115
|
"getOriginFromUrl": "/common-tools/get-url-params/index",
|
|
59
116
|
"getUrlParams": "/common-tools/get-url-params/index",
|
|
60
117
|
"getFullPath": "/common-tools/get-url-params/index",
|
|
@@ -154,8 +211,8 @@
|
|
|
154
211
|
"groupPermissionListByModuleAndCode": "/common-info/index",
|
|
155
212
|
"getGroupedCurrentUserPermissionList": "/common-info/index",
|
|
156
213
|
"getCurrentModulePermissionData": "/common-info/getPermissionMethod/index",
|
|
157
|
-
"
|
|
158
|
-
"
|
|
214
|
+
"getCurrentUserPermissionList": "/common-info/getPermissionMethod/index",
|
|
215
|
+
"hasMenuPermissionByRouteCode": "/common-info/getPermissionMethod/index",
|
|
159
216
|
"handleUnauthorized": "/create-api-service/index",
|
|
160
217
|
"getCurrentRouteCode": "/common-info/index",
|
|
161
218
|
"buildActionSuffixSet": "/common-info/index",
|
|
@@ -176,5 +233,11 @@
|
|
|
176
233
|
"resolveRefreshResult": "/create-api-service/token-refresh-shared/index",
|
|
177
234
|
"rejectRefreshResult": "/create-api-service/token-refresh-shared/index",
|
|
178
235
|
"clearRefreshState": "/create-api-service/token-refresh-shared/index",
|
|
179
|
-
"refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index"
|
|
236
|
+
"refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index",
|
|
237
|
+
"LEGACY_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
238
|
+
"ELEMENT_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
239
|
+
"DAS_UI_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
240
|
+
"UPF_COMPONENT_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
241
|
+
"getHostThemeSnapshotFromWindowName": "/theme/index",
|
|
242
|
+
"clonePresetTheme": "/theme/presets/index"
|
|
180
243
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type SystemAppName = 'superadmin' | 'enterpriseadmin';
|
|
2
|
+
export interface UseGetAuthAPI {
|
|
3
|
+
getApplication: (code?: string, appName?: SystemAppName) => Promise<any>;
|
|
4
|
+
getMenu: (code?: string, menuCode?: string, path?: string, appName?: SystemAppName) => Promise<any>;
|
|
5
|
+
getAuth: (params?: any, appName?: SystemAppName) => Promise<boolean>;
|
|
6
|
+
}
|
|
7
|
+
export declare const useGetAuth: () => UseGetAuthAPI;
|
|
8
|
+
export {};
|