@das-fed/upf-utils 6.4.0-hot.12 → 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 (200) hide show
  1. package/api-services/es5.d.ts +2 -0
  2. package/api-services/es5.js +1619 -1580
  3. package/api-services/i18n/es5.d.ts +63 -0
  4. package/api-services/index.js +1305 -1284
  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 +1253 -1202
  16. package/api-services/modules/bems/index.js +1034 -995
  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 +1650 -1587
  38. package/api-services/modules/gateway-edge/index.js +1410 -1353
  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 +1326 -1284
  52. package/api-services/modules/knowledge/index.js +1111 -1086
  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 +1650 -1587
  56. package/api-services/modules/link/index.js +1410 -1353
  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 +966 -915
  64. package/api-services/modules/platformManage/index.js +755 -716
  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 +1650 -1587
  68. package/api-services/modules/portal/index.js +1410 -1353
  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 +1398 -1359
  84. package/api-services/modules/supplychain-manage/index.js +1171 -1150
  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 +1398 -1359
  92. package/api-services/modules/tool/index.js +1171 -1150
  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 +1239 -1150
  105. package/common-info/getPermissionMethod/index.d.ts +57 -6
  106. package/common-info/getPermissionMethod/index.js +992 -928
  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/vue/es5.d.ts +1 -0
  198. package/vue/hooks/use-model-value/es5.d.ts +9 -0
  199. package/webSocket-service/es5.d.ts +41 -0
  200. package/with-install/es5.d.ts +11 -0
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;
@@ -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 g = function g(t) {
6
- var _ref;
7
- var r = (_ref = t == null ? undefined : t.code) !== null && _ref !== void 0 ? _ref : "";
8
- var s = false;
9
- if (!r) return s;
10
- var o = Array.isArray(r) ? r : [r],
11
- i = commonInfo.getCurrentModulePermissionData("all"),
12
- c = Array.isArray(i == null ? undefined : i.idList) ? i.idList : commonInfo.getCurrentModulePermissionData("id"),
13
- d = Array.isArray(i == null ? undefined : i.codeList) ? i.codeList : commonInfo.getCurrentModulePermissionData("code"),
14
- a = new Set((Array.isArray(c) ? c : []).map(function (n) {
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(d) ? d : []).map(function (n) {
18
+ u = new Set((Array.isArray(c) ? c : []).map(function (n) {
18
19
  return String(n);
19
20
  })),
20
- h = o.some(function (n) {
21
- var e = String(n !== null && n !== void 0 ? n : "").trim();
22
- return e && !/^[0-9]{3,}$/.test(e) && !e.includes(".") && !e.includes("_");
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
- S = commonInfo.getCurrentRouteCode(),
25
- l = h ? commonInfo.buildActionSuffixSet(u, {
26
- routeCode: S
25
+ L = commonInfo.getCurrentRouteCode(),
26
+ l = y ? commonInfo.buildActionSuffixSet(u, {
27
+ routeCode: L
27
28
  }) : /* @__PURE__ */new Set(),
28
- A = {
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
- y = function y(n) {
36
+ p = function p(n) {
36
37
  if (!n) return false;
37
- var e = String(n || "").trim();
38
- if (!e) return false;
39
- if (e.includes(".") || e.includes("_")) return u.has(e);
40
- var m = A[e] || "";
41
- return l.has(e) || (m ? l.has(m) : false);
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 (a.size > 0 || u.size > 0) && (s = o.some(function (n) {
44
- var e = String(n !== null && n !== void 0 ? n : "").trim();
45
- return e ? /^[0-9]{3,}$/.test(e) ? a.has(e) : y(e) : false;
46
- }), s) ? true : s;
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
- v = function v(t, r) {
49
- r === "hide" ? t.classList.remove("is-hide") : (t.removeAttribute("disabled"), t.classList.remove("is-disabled"));
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
- H = function H(t, r) {
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 s = (t ? r.value : r) || {};
54
- typeof s == "string" && (s = {
55
- code: s
57
+ var i = (e ? t.value : t) || {};
58
+ typeof i == "string" && (i = {
59
+ code: i
56
60
  });
57
- var o = (_ref2 = s == null ? undefined : s.type) !== null && _ref2 !== void 0 ? _ref2 : "hide",
58
- i = true;
59
- if (t && r.oldValue) {
60
- if (g(r.oldValue) === i) return;
61
- utils.getEl(t, s).then(function (a) {
62
- v(a, o);
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 i;
73
+ return r;
66
74
  };
67
- exports.vAuth = H;
75
+ exports.vAuth = E;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 权限控制工具
2
+ * 按钮权限控制工具,只支持判断当前菜单下的按钮权限,使用时传入按钮权限code,支持单个或数组形式。
3
3
  * @param el 绑定的dom
4
4
  * @param binding 使用指令时对应binding,使用函数时对应options
5
5
  * @param vnode
@@ -1,39 +1,47 @@
1
- import { getCurrentModulePermissionData as f, getCurrentRouteCode as w, buildActionSuffixSet as L } from "@das-fed/upf-utils/common-info";
2
- import { getEl as P } from "@das-fed/upf-utils/directive/utils";
3
- const g = (t) => {
4
- const r = (t == null ? void 0 : t.code) ?? "";
5
- let s = !1;
6
- if (!r)
7
- return s;
8
- const o = Array.isArray(r) ? r : [r], i = f("all"), c = Array.isArray(i == null ? void 0 : i.idList) ? i.idList : f("id"), d = Array.isArray(i == null ? void 0 : i.codeList) ? i.codeList : f("code"), a = new Set((Array.isArray(c) ? c : []).map((n) => String(n))), u = new Set((Array.isArray(d) ? d : []).map((n) => String(n))), h = o.some((n) => {
9
- const e = String(n ?? "").trim();
10
- return e && !/^[0-9]{3,}$/.test(e) && !e.includes(".") && !e.includes("_");
11
- }), S = w(), l = h ? L(u, { routeCode: S }) : /* @__PURE__ */ new Set(), A = { search: "q", add: "a", delete: "d", edit: "m", view: "v" }, y = (n) => {
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 e = String(n || "").trim();
14
- if (!e) return !1;
15
- if (e.includes(".") || e.includes("_")) return u.has(e);
16
- const m = A[e] || "";
17
- return l.has(e) || (m ? l.has(m) : !1);
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 (a.size > 0 || u.size > 0) && (s = o.some((n) => {
20
- const e = String(n ?? "").trim();
21
- return e ? /^[0-9]{3,}$/.test(e) ? a.has(e) : y(e) : !1;
22
- }), s) ? !0 : s;
23
- }, v = (t, r) => {
24
- r === "hide" ? t.classList.remove("is-hide") : (t.removeAttribute("disabled"), t.classList.remove("is-disabled"));
25
- }, H = (t, r) => {
26
- let s = (t ? r.value : r) || {};
27
- typeof s == "string" && (s = { code: s });
28
- const o = (s == null ? void 0 : s.type) ?? "hide", i = !0;
29
- if (t && r.oldValue) {
30
- if (g(r.oldValue) === i) return;
31
- P(t, s).then((a) => {
32
- v(a, o);
33
- });
34
- }
35
- return i;
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
- H as vAuth
46
+ E as vAuth
39
47
  };
Binary file
@@ -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
@@ -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
- "getCurrentUserPermissionsList": "/common-info/getPermissionMethod/index",
158
- "getCurrentUserMenuPermissionsList": "/common-info/getPermissionMethod/index",
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,3 @@
1
+ export declare const useZIndex: () => {
2
+ nextZIndex: () => any;
3
+ };
@@ -0,0 +1,4 @@
1
+ export declare const appcategory: any;
2
+ export declare const superadminAppcategory: any;
3
+ export declare const enterpriserightQueryportalmenu: any;
4
+ export declare const superadminQuerymenu: any;
@@ -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 {};