@das-fed/upf-utils 6.4.0-dev.238 → 6.4.0-dev.239

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 (190) hide show
  1. package/api-services/es5.d.ts +2 -0
  2. package/api-services/es5.js +823 -820
  3. package/api-services/i18n/es5.d.ts +63 -0
  4. package/api-services/index.js +642 -644
  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 +25 -19
  8. package/api-services/modules/app-manage/index.js +17 -15
  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 +1100 -1082
  12. package/api-services/modules/authentication/index.js +911 -891
  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 +96 -90
  16. package/api-services/modules/bems/index.js +75 -73
  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 +1343 -1325
  20. package/api-services/modules/contract/index.js +1140 -1120
  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 +1338 -1344
  24. package/api-services/modules/duty-manage/index.js +1122 -1138
  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 +1086 -1071
  28. package/api-services/modules/enterpriseright/index.js +892 -876
  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 +1351 -1357
  32. package/api-services/modules/file/es5.d.ts +37 -0
  33. package/api-services/modules/file/es5.js +131 -125
  34. package/api-services/modules/file/index.js +108 -106
  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 +1343 -1325
  38. package/api-services/modules/gateway-edge/index.js +1140 -1120
  39. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  40. package/api-services/modules/index.js +1060 -1076
  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 +33 -27
  44. package/api-services/modules/iot/index.js +23 -21
  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 +25 -19
  48. package/api-services/modules/justauth/index.js +17 -15
  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 +1337 -1321
  52. package/api-services/modules/knowledge/index.js +1124 -1108
  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 +1343 -1325
  56. package/api-services/modules/link/index.js +1140 -1120
  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 +1100 -1106
  60. package/api-services/modules/permission/index.js +897 -913
  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 +104 -98
  64. package/api-services/modules/platformManage/index.js +83 -81
  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 +1343 -1349
  68. package/api-services/modules/portal/index.js +1126 -1142
  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 +1343 -1349
  72. package/api-services/modules/space-manage/index.js +1126 -1142
  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 +1081 -1084
  76. package/api-services/modules/super-admin/index.js +880 -892
  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 +1081 -1084
  80. package/api-services/modules/supplier/index.js +880 -892
  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 +1343 -1325
  84. package/api-services/modules/supplychain-manage/index.js +1140 -1120
  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 +1100 -1106
  88. package/api-services/modules/systemConfiguration/index.js +897 -913
  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 +845 -836
  92. package/api-services/modules/tool/index.js +660 -654
  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 +1326 -1332
  96. package/api-services/src/create-service/index.js +1110 -1126
  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 +48 -0
  100. package/common-info/es5.js +1269 -1331
  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 +1371 -1355
  105. package/common-info/getPermissionMethod/index.d.ts +27 -9
  106. package/common-info/getPermissionMethod/index.js +1141 -1125
  107. package/common-info/getPermissionMethod/index.js.gz +0 -0
  108. package/common-info/index.d.ts +1 -29
  109. package/common-info/index.js +1046 -1096
  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 +28 -0
  134. package/common-tools/timezone-format/es5.js +140 -0
  135. package/common-tools/timezone-format/index.d.ts +28 -0
  136. package/common-tools/timezone-format/index.js +81 -0
  137. package/common-tools/timezone-format/index.js.gz +0 -0
  138. package/common-tools/update-browser-title/es5.d.ts +1 -0
  139. package/common-tools/update-fav-icon/es5.d.ts +11 -0
  140. package/config/es5.d.ts +2 -0
  141. package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
  142. package/create-api-service/access-token-auto-refresh/es5.js +27 -26
  143. package/create-api-service/access-token-auto-refresh/index.js +27 -26
  144. package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
  145. package/create-api-service/check-token/es5.d.ts +12 -0
  146. package/create-api-service/es5.d.ts +8 -0
  147. package/create-api-service/es5.js +24 -18
  148. package/create-api-service/i18n/es5.d.ts +39 -0
  149. package/create-api-service/index.js +17 -15
  150. package/create-api-service/index.js.gz +0 -0
  151. package/create-api-service/proxy-sso/es5.d.ts +3 -0
  152. package/create-api-service/sso/es5.d.ts +21 -0
  153. package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
  154. package/curring-http/es5.d.ts +12 -0
  155. package/dimple-canvas/es5.d.ts +3 -0
  156. package/directive/auth/es5.d.ts +8 -0
  157. package/directive/clickOutside/es5.d.ts +6 -0
  158. package/directive/es5.d.ts +3 -0
  159. package/directive/hoverInside/es5.d.ts +6 -0
  160. package/directive/utils/es5.d.ts +7 -0
  161. package/dom-check-in/es5.d.ts +6 -0
  162. package/dom-watcher/es5.d.ts +25 -0
  163. package/esm-map.json +32 -7
  164. package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
  165. package/i18n-bridge/es5.d.ts +10 -0
  166. package/index.d.ts +1 -0
  167. package/index.js +1 -0
  168. package/load-js/es5.d.ts +3 -0
  169. package/nextTiken/es5.d.ts +12 -0
  170. package/oss/es5.d.ts +2 -0
  171. package/package.json +4 -3
  172. package/pinyin-first-character/es5.d.ts +2 -0
  173. package/process-engine-info/es5.d.ts +13 -0
  174. package/pure-image-src/es5.d.ts +2 -0
  175. package/size-watcher/es5.d.ts +6 -0
  176. package/style/es5.d.ts +2 -0
  177. package/theme/es5.d.ts +92 -0
  178. package/theme/es5.js +1365 -0
  179. package/theme/index.d.ts +92 -0
  180. package/theme/index.js +871 -0
  181. package/theme/index.js.gz +0 -0
  182. package/token-tools/es5.d.ts +21 -0
  183. package/use-low-code/es5.d.ts +1 -0
  184. package/vue/es5.d.ts +1 -0
  185. package/vue/hooks/use-model-value/es5.d.ts +9 -0
  186. package/webSocket-service/es5.d.ts +41 -0
  187. package/with-install/es5.d.ts +11 -0
  188. package/hooks/use-get-auth/es5.js +0 -67
  189. package/hooks/use-get-auth/index.d.ts +0 -4
  190. package/hooks/use-get-auth/index.js +0 -19
@@ -3218,9 +3218,9 @@ function Bt(t, e) {
3218
3218
  var jr = Bt(Bl, { path: "/" });
3219
3219
  Mt.extend(eo);
3220
3220
  Mt.extend(to);
3221
- const Xt = Vr(), zn = Xt.sso ?? !0, Hr = Xt.i18n ?? !0, Wn = Xt.noRedireLogin ?? !1;
3221
+ const Ml = "UTC", kl = () => Mt.tz.guess() || Ml, Xt = Vr(), zn = Xt.sso ?? !0, Hr = Xt.i18n ?? !0, Wn = Xt.noRedireLogin ?? !1;
3222
3222
  let zr = "", Wr = 0;
3223
- const Ml = 1e3, Gr = async (t, e, r = []) => {
3223
+ const ql = 1e3, Gr = async (t, e, r = []) => {
3224
3224
  const n = Date.now(), o = 1200, a = 60;
3225
3225
  for (; Date.now() - n < o; ) {
3226
3226
  const i = t(e, ...r);
@@ -3230,17 +3230,19 @@ const Ml = 1e3, Gr = async (t, e, r = []) => {
3230
3230
  return t(e, ...r);
3231
3231
  };
3232
3232
  let Tt = !1;
3233
- const kl = 5e3, Gn = () => Tt ? !1 : (Tt = !0, setTimeout(() => {
3233
+ const jl = 5e3, Gn = () => Tt ? !1 : (Tt = !0, setTimeout(() => {
3234
3234
  Tt = !1;
3235
- }, kl), !0), Jn = () => {
3236
- var e, r;
3235
+ }, jl), !0), Jn = () => {
3237
3236
  if (Wn) return;
3238
3237
  const t = "/login";
3239
- location.pathname !== t && (window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1, (e = window.top) != null && e.vueRouter ? (r = window.top) == null || r.vueRouter.replace(t) : window.location.replace(`/#${t}`));
3240
- }, ql = () => Kn("code") || "" || Wn ? !1 : Gn() ? (zn ? Qn({ ...Xn, redirect_uri: Zn }) : Jn(), !0) : !1, jl = async (t) => {
3238
+ if (location.pathname === t) return;
3239
+ window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1;
3240
+ const e = window.top;
3241
+ e != null && e.vueRouter ? e.vueRouter.replace(t) : window.location.replace(`/#${t}`);
3242
+ }, Hl = () => Kn("code") || "" || Wn ? !1 : Gn() ? (zn ? Qn({ ...Xn, redirect_uri: Zn }) : Jn(), !0) : !1, zl = async (t) => {
3241
3243
  var r;
3242
3244
  return ((r = t.config) == null ? void 0 : r.responseType) === "blob" ? t : t.data ?? t;
3243
- }, Hl = async (t, e) => {
3245
+ }, Wl = async (t, e) => {
3244
3246
  var d, m, h, S;
3245
3247
  const { t: r } = Jr();
3246
3248
  let n, o, a = {};
@@ -3248,7 +3250,7 @@ const kl = 5e3, Gn = () => Tt ? !1 : (Tt = !0, setTimeout(() => {
3248
3250
  let s = ((d = t == null ? void 0 : t.response) == null ? void 0 : d.data) || {};
3249
3251
  const c = s == null ? void 0 : s.code, u = (m = t.response) == null ? void 0 : m.status;
3250
3252
  if (c === 401 || u === 401) {
3251
- ql(), n = c || u, a = s;
3253
+ Hl(), n = c || u, a = s;
3252
3254
  const O = (e == null ? void 0 : e.i18n) ?? !0;
3253
3255
  if (Hr && O && (s != null && s.status)) {
3254
3256
  const g = !(s != null && s.data) || !s.data.length ? [] : s.data, E = r(s.status, ...g);
@@ -3278,10 +3280,10 @@ const kl = 5e3, Gn = () => Tt ? !1 : (Tt = !0, setTimeout(() => {
3278
3280
  o || (o = i[t.response.status] || t.message);
3279
3281
  } else t.request ? (n = 500, t.code === "ERR_CANCELED" ? o = t.abortReason || "" : o = r("网络异常,请检查您的网络情况")) : (n = 500, t.code === "ERR_CANCELED" ? o = t.abortReason || "" : o = r("请求配置异常"));
3280
3282
  e != null && e.customErrorMessage && (o = e == null ? void 0 : e.customErrorMessage(o, t));
3281
- const p = Date.now(), y = o === zr, v = p - Wr < Ml;
3283
+ const p = Date.now(), y = o === zr, v = p - Wr < ql;
3282
3284
  return !(e != null && e.ignoreErrorMessage) && o && (!y || !v) && ((S = (h = window.DasMessage) == null ? void 0 : h.error) == null || S.call(h, { message: o, showClose: !0 }), zr = o, Wr = p), { ...a, code: n, msg: o, error: t };
3283
3285
  };
3284
- function tc(t, e) {
3286
+ function nc(t, e) {
3285
3287
  const r = R.create();
3286
3288
  return Vn(r, async (n) => {
3287
3289
  const { currentLang: o } = Jr(), a = Vr();
@@ -3302,7 +3304,7 @@ function tc(t, e) {
3302
3304
  }
3303
3305
  p && !n.headers.Authorization && (n.headers.Authorization = `Bearer ${p}`);
3304
3306
  }
3305
- n.baseURL || (n.baseURL = a.baseURL || ""), n.urlPrefix || (n.urlPrefix = t), n.paramsSerializer || (n.paramsSerializer = { serialize: (p) => Ll.stringify(p, { indices: !1 }) }), n.onSuccess || (n.onSuccess = jl), n.onError || (n.onError = Hl), (n.csrf ?? !1) && (n.headers["csrf-token"] = jr.get("csrf-token"));
3307
+ n.baseURL || (n.baseURL = a.baseURL || ""), n.urlPrefix || (n.urlPrefix = t), n.paramsSerializer || (n.paramsSerializer = { serialize: (p) => Ll.stringify(p, { indices: !1 }) }), n.onSuccess || (n.onSuccess = zl), n.onError || (n.onError = Wl), (n.csrf ?? !1) && (n.headers["csrf-token"] = jr.get("csrf-token"));
3306
3308
  const c = n.params || {};
3307
3309
  if (c.project === void 0) {
3308
3310
  let p = 0;
@@ -3313,12 +3315,12 @@ function tc(t, e) {
3313
3315
  const { instanceInfo: p } = no();
3314
3316
  p != null && p.instanceId && (c.instance = p.instanceId);
3315
3317
  }
3316
- n.params = c, n.headers.Timezone = Mt.tz.guess(), n.headers["X-Origin"] = location.origin;
3318
+ n.params = c, n.headers.Timezone = kl(), n.headers["X-Origin"] = location.origin;
3317
3319
  const l = (o == null ? void 0 : o.value) ?? "";
3318
3320
  return l && (n.headers["Accept-Language"] = l), l && jr.set("locale", l), (e == null ? void 0 : e(n)) || n;
3319
3321
  });
3320
3322
  }
3321
3323
  export {
3322
- tc as createService,
3323
- ql as handleUnauthorized
3324
+ nc as createService,
3325
+ Hl as handleUnauthorized
3324
3326
  };
Binary file
@@ -0,0 +1,3 @@
1
+ declare let proxySso: any;
2
+ declare const addMicroAppProxySsoEvent: (cb: any) => void;
3
+ export { proxySso, addMicroAppProxySsoEvent };
@@ -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 };
@@ -0,0 +1,3 @@
1
+ import { useDimpleCanvas, Konva } from '@das-fed/upf-utils/dimple-canvas/use-dimple-canvas';
2
+
3
+ export { useDimpleCanvas, Konva };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 按钮权限控制工具,只支持判断当前菜单下的按钮权限,使用时传入按钮权限code,支持单个或数组形式。
3
+ * @param el 绑定的dom
4
+ * @param binding 使用指令时对应binding,使用函数时对应options
5
+ * @param vnode
6
+ * @returns 是否有权限
7
+ */
8
+ export declare const vAuth: (el: any, binding: any) => boolean;
@@ -0,0 +1,6 @@
1
+ import { Directive } from 'vue';
2
+
3
+ /**
4
+ * 点击当前区域或者指定区域之外的位置
5
+ */
6
+ export declare const vClickOutside: Directive<HTMLElement>;
@@ -0,0 +1,3 @@
1
+ export { vAuth } from '@das-fed/upf-utils/directive/auth';
2
+ export { vClickOutside } from '@das-fed/upf-utils/directive/clickOutside';
3
+ export { vHoverInside } from '@das-fed/upf-utils/directive/hoverInside';
@@ -0,0 +1,6 @@
1
+ import { Directive } from 'vue';
2
+
3
+ /**
4
+ * 指令:鼠标移入移出dom事件
5
+ */
6
+ export declare const vHoverInside: Directive<HTMLElement>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 获取指定dom
3
+ * @param el
4
+ * @param options
5
+ * @returns
6
+ */
7
+ export declare const getEl: (el: HTMLElement, options: any) => Promise<HTMLElement>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 判断鼠标是否落在一个块级元素内部
3
+ * @param {*} dom 块级元素
4
+ * @returns
5
+ */
6
+ export declare const domCheckIn: (dom: HTMLElement) => boolean;
@@ -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
@@ -46,15 +46,36 @@
46
46
  "getTenantInfo": "/common-info/index",
47
47
  "getProjectInfo": "/common-info/index",
48
48
  "getHomeInfo": "/common-info/index",
49
- "getPageAuth": "/common-info/index",
50
- "getPageAuthBtn": "/common-info/index",
51
- "getSubApps": "/common-info/index",
52
- "getMenus": "/common-info/index",
53
- "getTabInfo": "/common-info/index",
54
49
  "getMinioAddress": "/common-info/index",
55
50
  "getInstanceInfo": "/common-info/index",
56
51
  "getFavIcon": "/common-info/index",
57
52
  "dateFormat": "/common-tools/date-format/index",
53
+ "getClientTimeZone": "/common-tools/timezone-format/index",
54
+ "normalizeLocaleCode": "/common-tools/timezone-format/index",
55
+ "isDaylightSavingTime": "/common-tools/timezone-format/index",
56
+ "getTimeZoneDisplayInfo": "/common-tools/timezone-format/index",
57
+ "mixHexColor": "/theme/index",
58
+ "toRgbaColor": "/theme/index",
59
+ "resolveThemeBridgeVariables": "/theme/index",
60
+ "toLegacyThemeVariables": "/theme/index",
61
+ "toElementThemeVariables": "/theme/index",
62
+ "toDasUiColorOverrides": "/theme/index",
63
+ "toUpfComponentThemeVariables": "/theme/index",
64
+ "buildRuntimeThemeVariables": "/theme/index",
65
+ "applyThemeVariablesToDocument": "/theme/index",
66
+ "applyThemeEventToDocument": "/theme/index",
67
+ "getThemeAPI": "/theme/index",
68
+ "getCurrentTheme": "/theme/index",
69
+ "getThemeVariables": "/theme/index",
70
+ "changeTheme": "/theme/index",
71
+ "syncThemeFromHost": "/theme/index",
72
+ "syncHostThemeRoot": "/theme/index",
73
+ "initSubAppThemeSync": "/theme/index",
74
+ "initHostThemeRootSync": "/theme/index",
75
+ "getThemeVariable": "/theme/index",
76
+ "getVar": "/theme/index",
77
+ "getVarValue": "/theme/index",
78
+ "useSubAppTheme": "/theme/vue",
58
79
  "getOriginFromUrl": "/common-tools/get-url-params/index",
59
80
  "getUrlParams": "/common-tools/get-url-params/index",
60
81
  "getFullPath": "/common-tools/get-url-params/index",
@@ -126,7 +147,6 @@
126
147
  "getQuery": "/create-api-service/sso/index",
127
148
  "tokenStorage": "/create-api-service/sso/index",
128
149
  "login": "/create-api-service/sso/index",
129
- "useGetAuth": "/hooks/use-get-auth/index",
130
150
  "getPinyinFirstCharacter": "/pinyin-first-character/index",
131
151
  "useZIndex": "/hooks/popup-manager/use-zindex/index",
132
152
  "Graph": "/dimple-canvas/use-dimple-canvas/core/antv-x6/index",
@@ -176,5 +196,10 @@
176
196
  "resolveRefreshResult": "/create-api-service/token-refresh-shared/index",
177
197
  "rejectRefreshResult": "/create-api-service/token-refresh-shared/index",
178
198
  "clearRefreshState": "/create-api-service/token-refresh-shared/index",
179
- "refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index"
199
+ "refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index",
200
+ "LEGACY_THEME_BRIDGE_ITEMS": "/theme/index",
201
+ "ELEMENT_THEME_BRIDGE_ITEMS": "/theme/index",
202
+ "DAS_UI_THEME_BRIDGE_ITEMS": "/theme/index",
203
+ "UPF_COMPONENT_THEME_BRIDGE_ITEMS": "/theme/index",
204
+ "getHostThemeSnapshotFromWindowName": "/theme/index"
180
205
  }
@@ -0,0 +1,3 @@
1
+ export declare const useZIndex: () => {
2
+ nextZIndex: () => any;
3
+ };
@@ -0,0 +1,10 @@
1
+ export type I18nBridgeLangRef = {
2
+ value: string;
3
+ };
4
+ export type I18nBridgeT = (key: string, ...args: any[]) => string;
5
+ export type I18nBridgeState = {
6
+ t: I18nBridgeT;
7
+ currentLang: I18nBridgeLangRef;
8
+ };
9
+ export declare const setI18nBridge: (next: Partial<I18nBridgeState>) => void;
10
+ export declare const getI18nBridge: () => I18nBridgeState;
package/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from '@das-fed/upf-utils/directive';
2
2
  export * from '@das-fed/upf-utils/with-install';
3
+ export * from '@das-fed/upf-utils/theme';
package/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "@das-fed/upf-utils/directive";
2
2
  export * from "@das-fed/upf-utils/with-install";
3
+ export * from "@das-fed/upf-utils/theme";
@@ -0,0 +1,3 @@
1
+ /** 使用promise加载js的工具 */
2
+ declare const loadJs: (src: string) => any;
3
+ export { loadJs };
@@ -0,0 +1,12 @@
1
+ import { PersonalInfo, TenantInfo } from '@das-fed/upf-utils/common-info/type';
2
+
3
+ /** 等待获取到token */
4
+ export declare const tokenNextTick_1: () => Promise<string>;
5
+ /** 等待获取到projectId */
6
+ export declare const projectNextTick: () => Promise<string | number>;
7
+ /** 等待获取到token和projectId */
8
+ export declare const tokenNextTick: () => Promise<boolean>;
9
+ /** 等待获取到userInfo */
10
+ export declare const userInfoNextTick: () => Promise<PersonalInfo>;
11
+ /** 等待获取到租户信息 */
12
+ export declare const tenantInfoNextTick: () => Promise<TenantInfo>;
package/oss/es5.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const oss: (urlName: any) => any;
2
+ export { oss };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-utils",
3
- "version": "6.4.0-dev.238",
3
+ "version": "6.4.0-dev.239",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -9,6 +9,7 @@
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
11
  "@antv/x6": "^2.18.1",
12
+ "@das-fed/mframe": "^0.0.0",
12
13
  "@vue/shared": "^3.4.21",
13
14
  "@vueuse/core": "^9.6.0",
14
15
  "axios": "^1.6.7",
@@ -21,8 +22,8 @@
21
22
  },
22
23
  "devDependencies": {
23
24
  "@babel/preset-env": "7.26.0",
24
- "@das-fed/upf-cli": "6.4.0-dev.238",
25
- "@das-fed/upf-web": "6.4.0-dev.238",
25
+ "@das-fed/upf-cli": "6.4.0-dev.239",
26
+ "@das-fed/upf-web": "6.4.0-dev.239",
26
27
  "@rollup/plugin-babel": "6.0.4",
27
28
  "@types/js-cookie": "^3.0.6",
28
29
  "@types/lodash-es": "^4.17.12",
@@ -0,0 +1,2 @@
1
+ /** 获取输入内容中的中文拼音首字符,如:汉字 --> hz; test汉字拼音test --> hzpy */
2
+ export declare const getPinyinFirstCharacter: (value: string) => any;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 子应用存储流程引擎需要的token信息
3
+ * @param data token信息
4
+ */
5
+ export declare const setProcessEngineToken: (data: Record<any, any>) => void;
6
+ /** 移除流程引擎token */
7
+ export declare const removeProcessEngineToken: () => void;
8
+ /**
9
+ * 子应用存储流程引擎需要的项目信息
10
+ * @param projectId 项目id
11
+ */
12
+ export declare const setProcessEngineProject: (projectId: string) => void;
13
+ export declare const removeProcessEngineProject: () => void;
@@ -0,0 +1,2 @@
1
+ declare const pureImageSrc: (url: string) => any;
2
+ export { pureImageSrc };
@@ -0,0 +1,6 @@
1
+ declare const SizeWatcher: (cb: (e: DOMRectReadOnly) => any, dom?: HTMLElement | null) => ResizeObserver;
2
+ declare const useSizeWatcher: () => {
3
+ el: any;
4
+ rect: any;
5
+ };
6
+ export { SizeWatcher, useSizeWatcher };
package/style/es5.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { hasClass, addClass, removeClass, getStyle, getCSS, createStyle, updateStyle } from './style';
2
+ export { curringMath } from './math';
package/theme/es5.d.ts ADDED
@@ -0,0 +1,92 @@
1
+ export type ThemeVariables = Record<string, string>;
2
+ type ThemeVariableSource = Record<string, string | undefined>;
3
+ export interface ThemeConfig {
4
+ name?: string;
5
+ basePresetName?: string;
6
+ variables?: ThemeVariableSource;
7
+ [key: string]: unknown;
8
+ }
9
+ export interface ThemeChangeEvent<TThemeName extends string = string, TVariables extends object = ThemeVariables> {
10
+ themeName: TThemeName;
11
+ config?: ThemeConfig | null;
12
+ variables: TVariables;
13
+ source?: 'change' | 'mountSync';
14
+ timestamp: number;
15
+ }
16
+ export interface ThemeBridgeAPI<TThemeName extends string = string, TVariables extends object = ThemeVariables> {
17
+ getCurrentTheme: () => ThemeChangeEvent<TThemeName, TVariables> | null;
18
+ getVariables?: () => TVariables | null;
19
+ changeTheme?: (themeName: TThemeName) => void;
20
+ onThemeChange?: (callback: (event: ThemeChangeEvent<TThemeName, TVariables>) => void) => () => void;
21
+ }
22
+ export interface ThemeBridgeResolveContext<TVariables extends object = ThemeVariables> {
23
+ variables: TVariables;
24
+ result: Record<string, string>;
25
+ }
26
+ export interface ThemeBridgeVariableItem<TVariables extends object = ThemeVariables> {
27
+ target: string;
28
+ from?: keyof TVariables | string;
29
+ value?: string;
30
+ resolve?: (context: ThemeBridgeResolveContext<TVariables> & {
31
+ mixHexColor: typeof mixHexColor;
32
+ toRgbaColor: typeof toRgbaColor;
33
+ }) => string;
34
+ }
35
+ export interface ApplyThemeVariablesOptions {
36
+ /** 写入目标节点;默认当前文档 html。 */
37
+ root?: HTMLElement | null;
38
+ /** 是否生成运行时桥接变量;false 时仅写入源变量。 */
39
+ includeBridges?: boolean;
40
+ /** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
41
+ includeElementAndDasUiBridges?: boolean;
42
+ /** 写入 data-theme 的主题名。 */
43
+ themeName?: string;
44
+ /** 写入 data-skin 的皮肤名;传 null 时移除。 */
45
+ skinName?: string | null;
46
+ }
47
+ export interface ThemePullOptions extends ApplyThemeVariablesOptions {
48
+ /** 是否输出主题同步警告日志。 */
49
+ debug?: boolean;
50
+ }
51
+ export interface SubAppThemeSyncOptions extends ThemePullOptions {
52
+ /** 初始化时是否立即从宿主拉取当前主题。 */
53
+ syncOnInit?: boolean;
54
+ /** 是否优先使用 window.__THEME_API__ 订阅。 */
55
+ preferWindowSubscription?: boolean;
56
+ /** 后续真实主题切换后的回调,不包含 mountSync。 */
57
+ onThemeChange?: (event: ThemeChangeEvent) => void;
58
+ }
59
+ export type HostThemeRootSyncOptions = SubAppThemeSyncOptions;
60
+ export interface RuntimeThemeVariableBuildOptions {
61
+ /** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
62
+ includeElementAndDasUiBridges?: boolean;
63
+ }
64
+ export declare const mixHexColor: (foreground: string, background: string, foregroundWeight: number, fallback: string) => string;
65
+ export declare const toRgbaColor: (color: string, alpha: number, fallback: string) => string;
66
+ export declare const resolveThemeBridgeVariables: <TVariables extends object = ThemeVariables>(variables: TVariables, items: readonly ThemeBridgeVariableItem<TVariables>[]) => any;
67
+ export declare const LEGACY_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
68
+ export declare const ELEMENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
69
+ export declare const DAS_UI_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
70
+ export declare const UPF_COMPONENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
71
+ export declare const toLegacyThemeVariables: (variables: object) => any;
72
+ export declare const toElementThemeVariables: (variables: object) => any;
73
+ export declare const toDasUiColorOverrides: (variables: object) => any;
74
+ export declare const toUpfComponentThemeVariables: (variables: object) => any;
75
+ export declare const buildRuntimeThemeVariables: (variables: object, options?: RuntimeThemeVariableBuildOptions) => Record<string, string>;
76
+ export declare const getHostThemeSnapshotFromWindowName: (debug?: boolean) => ThemeChangeEvent | null;
77
+ export declare const applyThemeVariablesToDocument: (variables: object, options?: ApplyThemeVariablesOptions) => any;
78
+ export declare const applyThemeEventToDocument: (event: ThemeChangeEvent, options?: ApplyThemeVariablesOptions) => any;
79
+ export declare const getThemeAPI: (debug?: boolean) => ThemeBridgeAPI | null;
80
+ export declare const getCurrentTheme: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<string, string>>;
81
+ export declare const getThemeVariables: (options?: ThemePullOptions) => any;
82
+ export declare const changeTheme: (themeName: string, debug?: boolean) => boolean;
83
+ export declare const syncThemeFromHost: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<string, string>>;
84
+ export declare const syncHostThemeRoot: (options?: ThemePullOptions) => ThemeChangeEvent | null;
85
+ export declare const initSubAppThemeSync: (options?: SubAppThemeSyncOptions) => () => void;
86
+ export declare const initHostThemeRootSync: (options?: HostThemeRootSyncOptions) => () => void;
87
+ export declare const getThemeVariable: (varName: string, root?: HTMLElement | null) => any;
88
+ export declare const getVar: (key?: string) => string;
89
+ export declare const getVarValue: (key?: string, root?: HTMLElement | null) => {
90
+ value: any;
91
+ };
92
+ export {};