@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.
Files changed (204) hide show
  1. package/api-services/es5.d.ts +2 -0
  2. package/api-services/es5.js +1125 -1074
  3. package/api-services/i18n/es5.d.ts +63 -0
  4. package/api-services/index.js +852 -813
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/es5.d.ts +2 -0
  7. package/api-services/modules/app-manage/es5.js +957 -909
  8. package/api-services/modules/app-manage/index.js +746 -711
  9. package/api-services/modules/app-manage/index.js.gz +0 -0
  10. package/api-services/modules/authentication/es5.d.ts +2 -0
  11. package/api-services/modules/authentication/es5.js +1650 -1587
  12. package/api-services/modules/authentication/index.js +1410 -1353
  13. package/api-services/modules/authentication/index.js.gz +0 -0
  14. package/api-services/modules/bems/es5.d.ts +6 -0
  15. package/api-services/modules/bems/es5.js +1645 -1582
  16. package/api-services/modules/bems/index.js +1404 -1347
  17. package/api-services/modules/bems/index.js.gz +0 -0
  18. package/api-services/modules/contract/es5.d.ts +2 -0
  19. package/api-services/modules/contract/es5.js +1250 -1199
  20. package/api-services/modules/contract/index.js +1035 -996
  21. package/api-services/modules/contract/index.js.gz +0 -0
  22. package/api-services/modules/duty-manage/es5.d.ts +7 -0
  23. package/api-services/modules/duty-manage/es5.js +963 -912
  24. package/api-services/modules/duty-manage/index.js +755 -716
  25. package/api-services/modules/duty-manage/index.js.gz +0 -0
  26. package/api-services/modules/enterpriseright/es5.d.ts +2 -0
  27. package/api-services/modules/enterpriseright/es5.js +1250 -1199
  28. package/api-services/modules/enterpriseright/index.js +1035 -996
  29. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  30. package/api-services/modules/es5.d.ts +21 -0
  31. package/api-services/modules/es5.js +1113 -1062
  32. package/api-services/modules/file/es5.d.ts +37 -0
  33. package/api-services/modules/file/es5.js +1005 -954
  34. package/api-services/modules/file/index.js +786 -747
  35. package/api-services/modules/file/index.js.gz +0 -0
  36. package/api-services/modules/gateway-edge/es5.d.ts +2 -0
  37. package/api-services/modules/gateway-edge/es5.js +1250 -1199
  38. package/api-services/modules/gateway-edge/index.js +1035 -996
  39. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  40. package/api-services/modules/index.js +856 -817
  41. package/api-services/modules/index.js.gz +0 -0
  42. package/api-services/modules/iot/es5.d.ts +16 -0
  43. package/api-services/modules/iot/es5.js +1389 -1350
  44. package/api-services/modules/iot/index.js +1153 -1132
  45. package/api-services/modules/iot/index.js.gz +0 -0
  46. package/api-services/modules/justauth/es5.d.ts +3 -0
  47. package/api-services/modules/justauth/es5.js +1327 -1285
  48. package/api-services/modules/justauth/index.js +1111 -1086
  49. package/api-services/modules/justauth/index.js.gz +0 -0
  50. package/api-services/modules/knowledge/es5.d.ts +2 -0
  51. package/api-services/modules/knowledge/es5.js +1052 -998
  52. package/api-services/modules/knowledge/index.js +822 -779
  53. package/api-services/modules/knowledge/index.js.gz +0 -0
  54. package/api-services/modules/link/es5.d.ts +2 -0
  55. package/api-services/modules/link/es5.js +1250 -1199
  56. package/api-services/modules/link/index.js +1035 -996
  57. package/api-services/modules/link/index.js.gz +0 -0
  58. package/api-services/modules/permission/es5.d.ts +2 -0
  59. package/api-services/modules/permission/es5.js +1250 -1199
  60. package/api-services/modules/permission/index.js +1035 -996
  61. package/api-services/modules/permission/index.js.gz +0 -0
  62. package/api-services/modules/platformManage/es5.d.ts +14 -0
  63. package/api-services/modules/platformManage/es5.js +1334 -1274
  64. package/api-services/modules/platformManage/index.js +1123 -1070
  65. package/api-services/modules/platformManage/index.js.gz +0 -0
  66. package/api-services/modules/portal/es5.d.ts +2 -0
  67. package/api-services/modules/portal/es5.js +1250 -1199
  68. package/api-services/modules/portal/index.js +1035 -996
  69. package/api-services/modules/portal/index.js.gz +0 -0
  70. package/api-services/modules/space-manage/es5.d.ts +2 -0
  71. package/api-services/modules/space-manage/es5.js +968 -917
  72. package/api-services/modules/space-manage/index.js +763 -724
  73. package/api-services/modules/space-manage/index.js.gz +0 -0
  74. package/api-services/modules/super-admin/es5.d.ts +8 -0
  75. package/api-services/modules/super-admin/es5.js +1260 -1209
  76. package/api-services/modules/super-admin/index.js +1038 -999
  77. package/api-services/modules/super-admin/index.js.gz +0 -0
  78. package/api-services/modules/supplier/es5.d.ts +6 -0
  79. package/api-services/modules/supplier/es5.js +1249 -1198
  80. package/api-services/modules/supplier/index.js +1032 -993
  81. package/api-services/modules/supplier/index.js.gz +0 -0
  82. package/api-services/modules/supplychain-manage/es5.d.ts +2 -0
  83. package/api-services/modules/supplychain-manage/es5.js +983 -932
  84. package/api-services/modules/supplychain-manage/index.js +775 -736
  85. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  86. package/api-services/modules/systemConfiguration/es5.d.ts +2 -0
  87. package/api-services/modules/systemConfiguration/es5.js +1250 -1199
  88. package/api-services/modules/systemConfiguration/index.js +1035 -996
  89. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  90. package/api-services/modules/tool/es5.d.ts +2 -0
  91. package/api-services/modules/tool/es5.js +971 -920
  92. package/api-services/modules/tool/index.js +764 -725
  93. package/api-services/modules/tool/index.js.gz +0 -0
  94. package/api-services/src/create-service/es5.d.ts +1 -0
  95. package/api-services/src/create-service/es5.js +1396 -1357
  96. package/api-services/src/create-service/index.js +1170 -1149
  97. package/api-services/src/create-service/index.js.gz +0 -0
  98. package/atob/es5.d.ts +2 -0
  99. package/common-info/es5.d.ts +73 -0
  100. package/common-info/es5.js +2155 -2063
  101. package/common-info/getIframeUrl/es5.d.ts +9 -0
  102. package/common-info/getInfoFromUrl/es5.d.ts +8 -0
  103. package/common-info/getPermissionMethod/es5.d.ts +77 -0
  104. package/common-info/getPermissionMethod/es5.js +1414 -1313
  105. package/common-info/getPermissionMethod/index.d.ts +57 -6
  106. package/common-info/getPermissionMethod/index.js +1155 -1073
  107. package/common-info/getPermissionMethod/index.js.gz +0 -0
  108. package/common-info/index.d.ts +5 -8
  109. package/common-info/index.js +1818 -1751
  110. package/common-info/index.js.gz +0 -0
  111. package/common-info/set-personal-info/es5.d.ts +5 -0
  112. package/common-info/type.d.ts +2 -2
  113. package/common-tools/arr-tools/es5.d.ts +15 -0
  114. package/common-tools/calc-text-width/es5.d.ts +1 -0
  115. package/common-tools/date-format/es5.d.ts +7 -0
  116. package/common-tools/es5.d.ts +15 -0
  117. package/common-tools/es5.js +9 -0
  118. package/common-tools/extract-file-name/es5.d.ts +1 -0
  119. package/common-tools/get-file-extension/es5.d.ts +6 -0
  120. package/common-tools/get-url-params/es5.d.ts +46 -0
  121. package/common-tools/handle-data/es5.d.ts +34 -0
  122. package/common-tools/handle-data/es5.js +44 -6
  123. package/common-tools/handle-data/index.d.ts +16 -1
  124. package/common-tools/handle-data/index.js +1 -1
  125. package/common-tools/handle-data/index.js.gz +0 -0
  126. package/common-tools/index.d.ts +1 -0
  127. package/common-tools/index.js +1 -0
  128. package/common-tools/nest-tree-format/es5.d.ts +30 -0
  129. package/common-tools/obj-tools/es5.d.ts +7 -0
  130. package/common-tools/platform-tools/es5.d.ts +19 -0
  131. package/common-tools/queue-promise/es5.d.ts +6 -0
  132. package/common-tools/setHtmlMinWH/es5.d.ts +5 -0
  133. package/common-tools/timezone-format/es5.d.ts +132 -0
  134. package/common-tools/timezone-format/es5.js +822 -0
  135. package/common-tools/timezone-format/get-iana-data/dayjs-timezone-iana-plugin.d.ts +72 -0
  136. package/common-tools/timezone-format/get-iana-data/iana-api-fetch.d.ts +21 -0
  137. package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +29 -0
  138. package/common-tools/timezone-format/index.d.ts +132 -0
  139. package/common-tools/timezone-format/index.js +439 -0
  140. package/common-tools/timezone-format/index.js.gz +0 -0
  141. package/common-tools/update-browser-title/es5.d.ts +1 -0
  142. package/common-tools/update-fav-icon/es5.d.ts +11 -0
  143. package/config/es5.d.ts +2 -0
  144. package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
  145. package/create-api-service/access-token-auto-refresh/es5.js +27 -26
  146. package/create-api-service/access-token-auto-refresh/index.js +27 -26
  147. package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
  148. package/create-api-service/check-token/es5.d.ts +12 -0
  149. package/create-api-service/es5.d.ts +8 -0
  150. package/create-api-service/es5.js +1397 -1358
  151. package/create-api-service/i18n/es5.d.ts +39 -0
  152. package/create-api-service/index.js +1171 -1150
  153. package/create-api-service/index.js.gz +0 -0
  154. package/create-api-service/proxy-sso/es5.d.ts +3 -0
  155. package/create-api-service/sso/es5.d.ts +21 -0
  156. package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
  157. package/curring-http/es5.d.ts +12 -0
  158. package/dimple-canvas/es5.d.ts +3 -0
  159. package/directive/auth/es5.d.ts +8 -0
  160. package/directive/auth/es5.js +50 -42
  161. package/directive/auth/index.d.ts +1 -1
  162. package/directive/auth/index.js +42 -34
  163. package/directive/auth/index.js.gz +0 -0
  164. package/directive/clickOutside/es5.d.ts +6 -0
  165. package/directive/es5.d.ts +3 -0
  166. package/directive/hoverInside/es5.d.ts +6 -0
  167. package/directive/utils/es5.d.ts +7 -0
  168. package/dom-check-in/es5.d.ts +6 -0
  169. package/dom-watcher/es5.d.ts +25 -0
  170. package/esm-map.json +66 -3
  171. package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
  172. package/hooks/use-get-auth/apis.d.ts +4 -0
  173. package/hooks/use-get-auth/es5.d.ts +8 -0
  174. package/hooks/use-get-auth/es5.js +325 -57
  175. package/hooks/use-get-auth/index.d.ts +8 -4
  176. package/hooks/use-get-auth/index.js +71 -16
  177. package/hooks/use-get-auth/index.js.gz +0 -0
  178. package/i18n-bridge/es5.d.ts +10 -0
  179. package/index.d.ts +2 -0
  180. package/index.js +2 -0
  181. package/load-js/es5.d.ts +3 -0
  182. package/nextTiken/es5.d.ts +12 -0
  183. package/oss/es5.d.ts +2 -0
  184. package/package.json +4 -3
  185. package/pinyin-first-character/es5.d.ts +2 -0
  186. package/process-engine-info/es5.d.ts +13 -0
  187. package/pure-image-src/es5.d.ts +2 -0
  188. package/size-watcher/es5.d.ts +6 -0
  189. package/style/es5.d.ts +2 -0
  190. package/theme/es5.d.ts +111 -0
  191. package/theme/es5.js +1676 -0
  192. package/theme/index.d.ts +111 -0
  193. package/theme/index.js +1118 -0
  194. package/theme/index.js.gz +0 -0
  195. package/token-tools/es5.d.ts +21 -0
  196. package/use-low-code/es5.d.ts +1 -0
  197. package/use-low-code/es5.js +37 -53
  198. package/use-low-code/index.js +36 -31
  199. package/use-low-code/index.js.gz +0 -0
  200. package/vue/es5.d.ts +1 -0
  201. package/vue/hooks/use-model-value/es5.d.ts +9 -0
  202. package/webSocket-service/es5.d.ts +41 -0
  203. package/with-install/es5.d.ts +11 -0
  204. 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, S = () => X(_("tokenInfo")) || {}, T = () => {
16
- const e = _("accessTokenExpiredAt"), r = S();
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 = S();
19
+ const e = w();
20
20
  return String((e == null ? void 0 : e.refreshToken) || _("refreshToken") || "").trim();
21
21
  }, C = () => {
22
- const e = S();
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 r = "/login";
39
- if (location.pathname === r) return;
40
- if (window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1, (e = window.top) != null && e.vueRouter) {
41
- window.top.vueRouter.replace(r);
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(`/#${r}`);
45
+ window.location.replace(`/#${e}`);
45
46
  } catch {
46
47
  window.location.replace("/#/login");
47
48
  }
48
49
  }, a = () => {
49
- w(), (c.redirectToLogin || j)();
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
- }, W = (e) => {
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 = S(), k = {
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
- w();
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) && W(n), B(n, o()), y();
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
- w();
121
+ S();
121
122
  }
122
123
  }, H = async () => {
123
124
  if (!h()) {
124
- w();
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
- }, z = (e = {}) => {
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
- }, Q = () => {
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
- }, w = () => {
168
+ }, S = () => {
168
169
  i = !1, N(), J(o()), u = 0;
169
- }, V = () => ({
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
- W as applyRefreshedToken,
178
- z as configureAccessTokenAutoRefresh,
179
- V as getAccessTokenAutoRefreshState,
180
- Q as startAccessTokenAutoRefresh,
181
- w as stopAccessTokenAutoRefresh
178
+ $ as applyRefreshedToken,
179
+ Q as configureAccessTokenAutoRefresh,
180
+ W as getAccessTokenAutoRefreshState,
181
+ V as startAccessTokenAutoRefresh,
182
+ S as stopAccessTokenAutoRefresh
182
183
  };
@@ -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 };
@@ -0,0 +1,8 @@
1
+ import { CurringConfigFun } from '../curring-http/type';
2
+
3
+ /**
4
+ * 处理401未授权情况
5
+ * @returns 是否执行了登录操作
6
+ */
7
+ export declare const handleUnauthorized: () => boolean;
8
+ export declare function createService(urlPrefix: string, customConfig?: CurringConfigFun): any;