@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
|
@@ -12,14 +12,14 @@ const X = (e) => {
|
|
|
12
12
|
} catch {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
}, o = () => c.refreshScope || d,
|
|
16
|
-
const e = _("accessTokenExpiredAt"), r =
|
|
15
|
+
}, o = () => c.refreshScope || d, w = () => X(_("tokenInfo")) || {}, T = () => {
|
|
16
|
+
const e = _("accessTokenExpiredAt"), r = w();
|
|
17
17
|
return x((r == null ? void 0 : r.accessExp) || (r == null ? void 0 : r.accessTokenExpiredAt) || e);
|
|
18
18
|
}, m = () => {
|
|
19
|
-
const e =
|
|
19
|
+
const e = w();
|
|
20
20
|
return String((e == null ? void 0 : e.refreshToken) || _("refreshToken") || "").trim();
|
|
21
21
|
}, C = () => {
|
|
22
|
-
const e =
|
|
22
|
+
const e = w();
|
|
23
23
|
return x(e == null ? void 0 : e.refreshExp);
|
|
24
24
|
}, E = () => ({
|
|
25
25
|
accessToken: M(),
|
|
@@ -33,20 +33,21 @@ const X = (e) => {
|
|
|
33
33
|
}, N = () => {
|
|
34
34
|
p && (clearTimeout(p), p = null), l && (clearTimeout(l), l = null), R && (clearTimeout(R), R = null);
|
|
35
35
|
}, j = () => {
|
|
36
|
-
var e;
|
|
37
36
|
try {
|
|
38
|
-
const
|
|
39
|
-
if (location.pathname ===
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
const e = "/login";
|
|
38
|
+
if (location.pathname === e) return;
|
|
39
|
+
window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1;
|
|
40
|
+
const r = window.top;
|
|
41
|
+
if (r != null && r.vueRouter) {
|
|
42
|
+
r.vueRouter.replace(e);
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
|
-
window.location.replace(`/#${
|
|
45
|
+
window.location.replace(`/#${e}`);
|
|
45
46
|
} catch {
|
|
46
47
|
window.location.replace("/#/login");
|
|
47
48
|
}
|
|
48
49
|
}, a = () => {
|
|
49
|
-
|
|
50
|
+
S(), (c.redirectToLogin || j)();
|
|
50
51
|
}, G = () => {
|
|
51
52
|
const e = T();
|
|
52
53
|
if (!e) return 60 * 1e3;
|
|
@@ -62,13 +63,13 @@ const X = (e) => {
|
|
|
62
63
|
r <= s ? t = 30 * 1e3 : r <= n ? t = 60 * 1e3 : r <= f ? t = 5 * 60 * 1e3 : t = 10 * 60 * 1e3;
|
|
63
64
|
const k = r - t;
|
|
64
65
|
return k > 0 ? k : 0;
|
|
65
|
-
},
|
|
66
|
+
}, $ = (e) => {
|
|
66
67
|
var f;
|
|
67
68
|
const r = String((e == null ? void 0 : e.accessToken) || "").trim(), s = String((e == null ? void 0 : e.refreshToken) || "").trim() || m(), n = x((e == null ? void 0 : e.accessExp) || (e == null ? void 0 : e.accessTokenExpiredAt));
|
|
68
69
|
if (!(!r || !n)) {
|
|
69
70
|
P(r, { accessTokenExpiredAt: n, refreshToken: s });
|
|
70
71
|
try {
|
|
71
|
-
const t =
|
|
72
|
+
const t = w(), k = {
|
|
72
73
|
...t,
|
|
73
74
|
...e,
|
|
74
75
|
accessToken: r,
|
|
@@ -86,7 +87,7 @@ const X = (e) => {
|
|
|
86
87
|
}, F = async () => {
|
|
87
88
|
if (!i) return;
|
|
88
89
|
if (!h()) {
|
|
89
|
-
|
|
90
|
+
S();
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
92
93
|
const e = m();
|
|
@@ -111,17 +112,17 @@ const X = (e) => {
|
|
|
111
112
|
refreshExp: (s == null ? void 0 : s.refreshExp) || C(),
|
|
112
113
|
accessTokenExpiredAt: x((s == null ? void 0 : s.accessTokenExpiredAt) || (s == null ? void 0 : s.accessExp))
|
|
113
114
|
};
|
|
114
|
-
n != null && n.accessToken && (n != null && n.accessExp) &&
|
|
115
|
+
n != null && n.accessToken && (n != null && n.accessExp) && $(n), B(n, o()), y();
|
|
115
116
|
} catch (s) {
|
|
116
117
|
if (g(s, o()), A(E()) === "refresh_expired") {
|
|
117
118
|
a();
|
|
118
119
|
return;
|
|
119
120
|
}
|
|
120
|
-
|
|
121
|
+
S();
|
|
121
122
|
}
|
|
122
123
|
}, H = async () => {
|
|
123
124
|
if (!h()) {
|
|
124
|
-
|
|
125
|
+
S();
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
127
128
|
const e = A(E());
|
|
@@ -142,14 +143,14 @@ const X = (e) => {
|
|
|
142
143
|
e > 0 && r === "access_valid" && (p = window.setTimeout(() => {
|
|
143
144
|
p = null, F();
|
|
144
145
|
}, e)), O();
|
|
145
|
-
},
|
|
146
|
+
}, Q = (e = {}) => {
|
|
146
147
|
c = {
|
|
147
148
|
...c,
|
|
148
149
|
...e,
|
|
149
150
|
refreshScope: e.refreshScope || c.refreshScope || d,
|
|
150
151
|
maxStartRetry: e.maxStartRetry ?? c.maxStartRetry ?? I
|
|
151
152
|
};
|
|
152
|
-
},
|
|
153
|
+
}, V = () => {
|
|
153
154
|
if (i) return !0;
|
|
154
155
|
const e = () => h() ? (i = !0, u = 0, H(), y(), !0) : !1;
|
|
155
156
|
if (e()) return !0;
|
|
@@ -164,9 +165,9 @@ const X = (e) => {
|
|
|
164
165
|
}, 500));
|
|
165
166
|
};
|
|
166
167
|
return r(), !1;
|
|
167
|
-
},
|
|
168
|
+
}, S = () => {
|
|
168
169
|
i = !1, N(), J(o()), u = 0;
|
|
169
|
-
},
|
|
170
|
+
}, W = () => ({
|
|
170
171
|
started: i,
|
|
171
172
|
tokenReady: h(),
|
|
172
173
|
accessTokenExpiredAt: T(),
|
|
@@ -174,9 +175,9 @@ const X = (e) => {
|
|
|
174
175
|
refreshScope: o()
|
|
175
176
|
});
|
|
176
177
|
export {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
$ as applyRefreshedToken,
|
|
179
|
+
Q as configureAccessTokenAutoRefresh,
|
|
180
|
+
W as getAccessTokenAutoRefreshState,
|
|
181
|
+
V as startAccessTokenAutoRefresh,
|
|
182
|
+
S as stopAccessTokenAutoRefresh
|
|
182
183
|
};
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RefreshDataType } from '@das-fed/upf-utils/create-api-service/token-refresh-shared';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 检查并获取有效的 Access Token(带缓冲、防并发和重试机制)
|
|
5
|
+
* @param tokenData 当前 token 数据
|
|
6
|
+
* @param updateTokenCallback 更新 token 的回调函数
|
|
7
|
+
* @param retryCount 内部重试计数器(外部调用无需传递)
|
|
8
|
+
* @returns 有效的 access_token
|
|
9
|
+
*/
|
|
10
|
+
declare const getValidAccessToken: (tokenData: RefreshDataType, updateTokenCallback: (newToken: RefreshDataType) => void, retryCount?: number) => Promise<string>;
|
|
11
|
+
export { getValidAccessToken };
|
|
12
|
+
export type { RefreshDataType };
|