@das-fed/upf-utils 6.4.0-dev.124

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 (203) hide show
  1. package/__VLS_types.d.ts +124 -0
  2. package/api-services/i18n/index.d.ts +53 -0
  3. package/api-services/i18n/index.js +27 -0
  4. package/api-services/i18n/index.js.gz +0 -0
  5. package/api-services/index.d.ts +2 -0
  6. package/api-services/index.js +3141 -0
  7. package/api-services/index.js.gz +0 -0
  8. package/api-services/modules/app-manage/index.d.ts +2 -0
  9. package/api-services/modules/app-manage/index.js +2827 -0
  10. package/api-services/modules/app-manage/index.js.gz +0 -0
  11. package/api-services/modules/authentication/index.d.ts +2 -0
  12. package/api-services/modules/authentication/index.js +2827 -0
  13. package/api-services/modules/authentication/index.js.gz +0 -0
  14. package/api-services/modules/bems/index.d.ts +6 -0
  15. package/api-services/modules/bems/index.js +2831 -0
  16. package/api-services/modules/bems/index.js.gz +0 -0
  17. package/api-services/modules/contract/index.d.ts +2 -0
  18. package/api-services/modules/contract/index.js +2827 -0
  19. package/api-services/modules/contract/index.js.gz +0 -0
  20. package/api-services/modules/duty-manage/index.d.ts +7 -0
  21. package/api-services/modules/duty-manage/index.js +2836 -0
  22. package/api-services/modules/duty-manage/index.js.gz +0 -0
  23. package/api-services/modules/enterpriseright/index.d.ts +2 -0
  24. package/api-services/modules/enterpriseright/index.js +2827 -0
  25. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  26. package/api-services/modules/file/index.d.ts +37 -0
  27. package/api-services/modules/file/index.js +3059 -0
  28. package/api-services/modules/file/index.js.gz +0 -0
  29. package/api-services/modules/gateway-edge/index.d.ts +2 -0
  30. package/api-services/modules/gateway-edge/index.js +2827 -0
  31. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  32. package/api-services/modules/index.d.ts +21 -0
  33. package/api-services/modules/index.js +3115 -0
  34. package/api-services/modules/index.js.gz +0 -0
  35. package/api-services/modules/iot/index.d.ts +16 -0
  36. package/api-services/modules/iot/index.js +2841 -0
  37. package/api-services/modules/iot/index.js.gz +0 -0
  38. package/api-services/modules/justauth/index.d.ts +3 -0
  39. package/api-services/modules/justauth/index.js +2828 -0
  40. package/api-services/modules/justauth/index.js.gz +0 -0
  41. package/api-services/modules/knowledge/index.d.ts +2 -0
  42. package/api-services/modules/knowledge/index.js +2827 -0
  43. package/api-services/modules/knowledge/index.js.gz +0 -0
  44. package/api-services/modules/link/index.d.ts +2 -0
  45. package/api-services/modules/link/index.js +2827 -0
  46. package/api-services/modules/link/index.js.gz +0 -0
  47. package/api-services/modules/permission/index.d.ts +2 -0
  48. package/api-services/modules/permission/index.js +2827 -0
  49. package/api-services/modules/permission/index.js.gz +0 -0
  50. package/api-services/modules/platformManage/index.d.ts +14 -0
  51. package/api-services/modules/platformManage/index.js +2835 -0
  52. package/api-services/modules/platformManage/index.js.gz +0 -0
  53. package/api-services/modules/portal/index.d.ts +2 -0
  54. package/api-services/modules/portal/index.js +2827 -0
  55. package/api-services/modules/portal/index.js.gz +0 -0
  56. package/api-services/modules/space-manage/index.d.ts +2 -0
  57. package/api-services/modules/space-manage/index.js +2827 -0
  58. package/api-services/modules/space-manage/index.js.gz +0 -0
  59. package/api-services/modules/super-admin/index.d.ts +8 -0
  60. package/api-services/modules/super-admin/index.js +2830 -0
  61. package/api-services/modules/super-admin/index.js.gz +0 -0
  62. package/api-services/modules/supplier/index.d.ts +6 -0
  63. package/api-services/modules/supplier/index.js +2829 -0
  64. package/api-services/modules/supplier/index.js.gz +0 -0
  65. package/api-services/modules/supplychain-manage/index.d.ts +2 -0
  66. package/api-services/modules/supplychain-manage/index.js +2827 -0
  67. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  68. package/api-services/modules/systemConfiguration/index.d.ts +2 -0
  69. package/api-services/modules/systemConfiguration/index.js +2827 -0
  70. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  71. package/api-services/modules/tool/index.d.ts +2 -0
  72. package/api-services/modules/tool/index.js +2827 -0
  73. package/api-services/modules/tool/index.js.gz +0 -0
  74. package/api-services/src/create-service/index.d.ts +1 -0
  75. package/api-services/src/create-service/index.js +2827 -0
  76. package/api-services/src/create-service/index.js.gz +0 -0
  77. package/atob/index.d.ts +2 -0
  78. package/atob/index.js +11 -0
  79. package/common-info/getIframeUrl/index.d.ts +9 -0
  80. package/common-info/getIframeUrl/index.js +10 -0
  81. package/common-info/getInfoFromUrl/index.d.ts +8 -0
  82. package/common-info/getInfoFromUrl/index.js +84 -0
  83. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  84. package/common-info/index.d.ts +61 -0
  85. package/common-info/index.js +171 -0
  86. package/common-info/index.js.gz +0 -0
  87. package/common-info/set-personal-info/index.d.ts +5 -0
  88. package/common-info/set-personal-info/index.js +1474 -0
  89. package/common-info/set-personal-info/index.js.gz +0 -0
  90. package/common-info/type.d.ts +214 -0
  91. package/common-tools/arr-tools/index.d.ts +15 -0
  92. package/common-tools/arr-tools/index.js +8 -0
  93. package/common-tools/calc-text-width/index.d.ts +1 -0
  94. package/common-tools/calc-text-width/index.js +10 -0
  95. package/common-tools/date-format/index.d.ts +7 -0
  96. package/common-tools/date-format/index.js +19 -0
  97. package/common-tools/extract-file-name/index.d.ts +1 -0
  98. package/common-tools/extract-file-name/index.js +1466 -0
  99. package/common-tools/extract-file-name/index.js.gz +0 -0
  100. package/common-tools/get-file-extension/index.d.ts +6 -0
  101. package/common-tools/get-file-extension/index.js +7 -0
  102. package/common-tools/get-url-params/index.d.ts +46 -0
  103. package/common-tools/get-url-params/index.js +63 -0
  104. package/common-tools/get-url-params/index.js.gz +0 -0
  105. package/common-tools/handle-data/index.d.ts +6 -0
  106. package/common-tools/handle-data/index.js +4 -0
  107. package/common-tools/index.d.ts +14 -0
  108. package/common-tools/index.js +14 -0
  109. package/common-tools/nest-tree-format/index.d.ts +30 -0
  110. package/common-tools/nest-tree-format/index.js +24 -0
  111. package/common-tools/obj-tools/index.d.ts +7 -0
  112. package/common-tools/obj-tools/index.js +14 -0
  113. package/common-tools/platform-tools/index.d.ts +19 -0
  114. package/common-tools/platform-tools/index.js +19 -0
  115. package/common-tools/queue-promise/index.d.ts +6 -0
  116. package/common-tools/queue-promise/index.js +9 -0
  117. package/common-tools/setHtmlMinWH/index.d.ts +5 -0
  118. package/common-tools/setHtmlMinWH/index.js +7 -0
  119. package/common-tools/update-browser-title/index.d.ts +1 -0
  120. package/common-tools/update-browser-title/index.js +12 -0
  121. package/common-tools/update-fav-icon/index.d.ts +11 -0
  122. package/common-tools/update-fav-icon/index.js +22 -0
  123. package/config/index.d.ts +2 -0
  124. package/config/index.js +9 -0
  125. package/create-api-service/i18n/index.d.ts +33 -0
  126. package/create-api-service/i18n/index.js +15 -0
  127. package/create-api-service/index.d.ts +3 -0
  128. package/create-api-service/index.js +2827 -0
  129. package/create-api-service/index.js.gz +0 -0
  130. package/create-api-service/proxy-sso/index.d.ts +3 -0
  131. package/create-api-service/proxy-sso/index.js +21 -0
  132. package/create-api-service/sso/index.d.ts +21 -0
  133. package/create-api-service/sso/index.js +1845 -0
  134. package/create-api-service/sso/index.js.gz +0 -0
  135. package/curring-http/index.d.ts +12 -0
  136. package/curring-http/index.js +2002 -0
  137. package/curring-http/index.js.gz +0 -0
  138. package/curring-http/type.d.ts +89 -0
  139. package/dimple-canvas/index.d.ts +3 -0
  140. package/dimple-canvas/index.js +5 -0
  141. package/directive/auth/index.d.ts +8 -0
  142. package/directive/auth/index.js +62 -0
  143. package/directive/auth/index.js.gz +0 -0
  144. package/directive/clickOutside/index.d.ts +6 -0
  145. package/directive/clickOutside/index.js +27 -0
  146. package/directive/hoverInside/index.d.ts +6 -0
  147. package/directive/hoverInside/index.js +21 -0
  148. package/directive/index.d.ts +3 -0
  149. package/directive/index.js +8 -0
  150. package/directive/utils/index.d.ts +7 -0
  151. package/directive/utils/index.js +7 -0
  152. package/dom-check-in/index.d.ts +6 -0
  153. package/dom-check-in/index.js +8 -0
  154. package/dom-watcher/index.d.ts +25 -0
  155. package/dom-watcher/index.js +9 -0
  156. package/esm-map.json +146 -0
  157. package/hooks/popup-manager/use-zindex/index.d.ts +3 -0
  158. package/hooks/popup-manager/use-zindex/index.js +9 -0
  159. package/hooks/use-get-auth/apis.d.ts +4 -0
  160. package/hooks/use-get-auth/index.d.ts +9 -0
  161. package/hooks/use-get-auth/index.js +53 -0
  162. package/hooks/use-get-auth/index.js.gz +0 -0
  163. package/index.d.ts +2 -0
  164. package/index.js +2 -0
  165. package/load-js/index.d.ts +3 -0
  166. package/load-js/index.js +12 -0
  167. package/nextTiken/index.d.ts +12 -0
  168. package/nextTiken/index.js +45 -0
  169. package/nextTiken/index.js.gz +0 -0
  170. package/oss/index.d.ts +2 -0
  171. package/oss/index.js +11 -0
  172. package/package.json +49 -0
  173. package/pinyin-first-character/index.d.ts +2 -0
  174. package/pinyin-first-character/index.js +25022 -0
  175. package/pinyin-first-character/index.js.gz +0 -0
  176. package/process-engine-info/index.d.ts +13 -0
  177. package/process-engine-info/index.js +15 -0
  178. package/pure-image-src/index.d.ts +2 -0
  179. package/pure-image-src/index.js +4 -0
  180. package/size-watcher/index.d.ts +6 -0
  181. package/size-watcher/index.js +20 -0
  182. package/style/index.d.ts +2 -0
  183. package/style/index.js +70 -0
  184. package/style/index.js.gz +0 -0
  185. package/style/math.d.ts +9 -0
  186. package/style/style.d.ts +31 -0
  187. package/token-tools/index.d.ts +21 -0
  188. package/token-tools/index.js +11 -0
  189. package/use-low-code/index.d.ts +1 -0
  190. package/use-low-code/index.js +69 -0
  191. package/use-low-code/index.js.gz +0 -0
  192. package/use-low-code/low-code-iframe.vue.d.ts +2 -0
  193. package/use-low-code/style.css +1 -0
  194. package/vue/hooks/use-model-value/index.d.ts +9 -0
  195. package/vue/hooks/use-model-value/index.js +10 -0
  196. package/vue/index.d.ts +1 -0
  197. package/vue/index.js +4 -0
  198. package/webSocket-service/index.d.ts +41 -0
  199. package/webSocket-service/index.js +83 -0
  200. package/webSocket-service/index.js.gz +0 -0
  201. package/webSocket-service/type.d.ts +28 -0
  202. package/with-install/index.d.ts +11 -0
  203. package/with-install/index.js +6 -0
Binary file
@@ -0,0 +1,89 @@
1
+ import { AxiosInstance, AxiosRequestConfig, AxiosError } from 'axios';
2
+ import { Ref } from 'vue';
3
+
4
+
5
+ /** 请求工具配置项 */
6
+ export type CurringConfig = AxiosRequestConfig & {
7
+ /** 请求实例 */
8
+ axiosInstance?: AxiosInstance
9
+
10
+ /** 请求方法 */
11
+ method?: Method
12
+
13
+ /** 请求的body数据 */
14
+ data?: any
15
+
16
+ /** 请求的query数据 */
17
+ params?: any
18
+
19
+ /** 接口地址前缀 */
20
+ urlPrefix?: string
21
+
22
+ /** 标记为公共接口,不需要鉴权,默认为false */
23
+ public?: boolean
24
+
25
+ /** 请求成功执行的回调 */
26
+ onSuccess?: (res: any, config: CurringConfig) => Promise<any>
27
+
28
+ /** 请求失败执行的回调 */
29
+ onError?: (error: any, config: CurringConfig) => Promise<any>
30
+
31
+ /** 自定义处理请求失败执行的回调 */
32
+ onCustomError?: (error: any, config: CurringConfig) => Promise<any>
33
+
34
+ /** 不管请求成功或失败都会执行的回调 */
35
+ finally?: (config: CurringConfig) => any
36
+
37
+ /** 每次请求之前都会执行的函数 */
38
+ beforeRun?: (config: CurringConfig) => Promise<CurringConfig>
39
+
40
+ /** 自定义错误信息 */
41
+ customErrorMessage?: (
42
+ /** 原始错误信息 */
43
+ message: string,
44
+
45
+ /** 原始错误对象 */
46
+ error: any,
47
+ ) => string | null | undefined
48
+
49
+ /** 忽略错误提示 */
50
+ ignoreErrorMessage?: boolean
51
+
52
+ /** 接口401是否重定向到登录页 */
53
+ noRedireLogin?: boolean
54
+
55
+ /** 开启CSRF安全选项 */
56
+ csrf?: boolean
57
+ }
58
+
59
+ export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
60
+
61
+ export type CurringConfigFun = (config: CurringConfig) => CurringConfig | Promise<CurringConfig>
62
+
63
+ export type CurringRes = {
64
+ /** 请求时返回的接口数据 */
65
+ data: Ref<any>
66
+
67
+ /** 请求时的错误信息 */
68
+ error: Ref<any>
69
+
70
+ /** 请求时的loading */
71
+ loading: Ref<boolean>
72
+
73
+ /** 发起请求 返回格式 [ error, data ] */
74
+ run: (payload?: any, config?: CurringConfig) => CurringRunRes
75
+
76
+ /** 取消请求控制器 */
77
+ abortController: Ref<AbortController | null>
78
+ }
79
+
80
+ /** 返回为数组 [error, data], 请求成功error为null,请求失败data为null */
81
+ export type CurringRunRes = Promise<
82
+ [
83
+ /** 请求返回的错误信息,请求成功时为null,请求失败时为错误信息 */
84
+ error: { code: string | number; msg: string; error: AxiosError } | null,
85
+
86
+ /** 请求返回的接口数据,请求成功时为后端数据,请求失败时为null */
87
+ data: any | null,
88
+ ]
89
+ >
@@ -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,5 @@
1
+ import { Konva as o, useDimpleCanvas as m } from "@das-fed/upf-utils/dimple-canvas/use-dimple-canvas";
2
+ export {
3
+ o as Konva,
4
+ m as useDimpleCanvas
5
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 权限控制工具
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,62 @@
1
+ import { getUrlParams as i, flatTree as P } from "@das-fed/upf-utils/common-tools";
2
+ import { getSubApps as v, getPageAuth as o } from "@das-fed/upf-utils/common-info";
3
+ import { getEl as h } from "@das-fed/upf-utils/directive/utils";
4
+ const A = (e, t) => {
5
+ if (!e || !t) return !1;
6
+ if (typeof t == "string")
7
+ return !!e.find((s) => s.code === t);
8
+ {
9
+ let r = !1;
10
+ for (let s of t)
11
+ if (e.find((a) => a.code === s)) {
12
+ r = !0;
13
+ break;
14
+ }
15
+ return r;
16
+ }
17
+ }, m = (e) => {
18
+ var n;
19
+ const t = (e == null ? void 0 : e.code) ?? "", r = (e == null ? void 0 : e.path) ?? (location == null ? void 0 : location.pathname) ?? "", s = (e == null ? void 0 : e.applicationCode) ?? i(location.href, "app");
20
+ let l = "";
21
+ if (l = e != null && e.menuCode ? e.menuCode : i(location.href, "menu"), !l) {
22
+ const c = ((n = v().currentSubApp) == null ? void 0 : n.menus) ?? [];
23
+ if (c && c.length) {
24
+ const d = P(c).filter((f) => f == null ? void 0 : f.routeUrl);
25
+ if (d && d.length) {
26
+ const f = d.find((u) => u != null && u.applicationPath ? r == null ? void 0 : r.includes("/" + u.applicationPath + u.routeUrl) : r == null ? void 0 : r.includes(u.routeUrl));
27
+ f && (l = (f == null ? void 0 : f.code) ?? "");
28
+ }
29
+ }
30
+ }
31
+ let a = !1;
32
+ if (t) {
33
+ const c = o(l, s) ?? [];
34
+ a = A(c, t);
35
+ } else
36
+ a = !!o(l, s);
37
+ return a;
38
+ }, g = (e, t) => {
39
+ t === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
40
+ }, b = (e, t) => {
41
+ t === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
42
+ }, U = (e, t) => {
43
+ let r = (e ? t.value : t) || {};
44
+ typeof r == "string" && (r = { code: r });
45
+ const s = (r == null ? void 0 : r.type) ?? "hide", l = m(r);
46
+ if (e)
47
+ if (!t.oldValue)
48
+ l || h(e, r).then((a) => {
49
+ g(a, s);
50
+ });
51
+ else {
52
+ const a = m(t.oldValue), n = l;
53
+ if (a === n) return;
54
+ h(e, r).then((c) => {
55
+ n ? b(c, s) : g(c, s);
56
+ });
57
+ }
58
+ return l;
59
+ };
60
+ export {
61
+ U as vAuth
62
+ };
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,27 @@
1
+ import { getEl as r } from "@das-fed/upf-utils/directive/utils";
2
+ const f = {
3
+ mounted: async (i, _) => {
4
+ const e = _.value, t = await r(i, e);
5
+ function c(n) {
6
+ let l = !0;
7
+ if (Array.isArray(t))
8
+ for (let o of t)
9
+ o.__click_outside__ = c, o.contains(n.target) && (l = !1);
10
+ else
11
+ t.contains(n.target) && (l = !1), t.__click_outside__ = c;
12
+ l && e != null && e.fn && typeof (e == null ? void 0 : e.fn) == "function" && (e == null || e.fn(n));
13
+ }
14
+ document.addEventListener("click", c);
15
+ },
16
+ beforeUnmount: async (i, _) => {
17
+ const e = _.value, t = await r(i, e);
18
+ if (Array.isArray(t))
19
+ for (let c of t)
20
+ document.removeEventListener("click", c.__click_outside__), delete c.__click_outside__;
21
+ else
22
+ document.removeEventListener("click", t.__click_outside__), delete t.__click_outside__;
23
+ }
24
+ };
25
+ export {
26
+ f as vClickOutside
27
+ };
@@ -0,0 +1,6 @@
1
+ import { Directive } from 'vue';
2
+
3
+ /**
4
+ * 指令:鼠标移入移出dom事件
5
+ */
6
+ export declare const vHoverInside: Directive<HTMLElement>;
@@ -0,0 +1,21 @@
1
+ import { getEl as r } from "@das-fed/upf-utils/directive/utils";
2
+ const o = {
3
+ mounted: async (s, a) => {
4
+ const e = a.value, n = await r(s, e);
5
+ function i(t, d) {
6
+ n._inside_event = i, typeof e == "function" ? e(t, d) : e != null && e.fn && typeof (e == null ? void 0 : e.fn) == "function" && (e == null || e.fn(t, d));
7
+ }
8
+ n.addEventListener("mouseenter", (t) => {
9
+ i(!0, t);
10
+ }), n.addEventListener("mouseleave", (t) => {
11
+ i(!1, t);
12
+ });
13
+ },
14
+ beforeUnmount: async (s, a) => {
15
+ const e = a.value, n = await r(s, e);
16
+ n.addEventListener("mouseenter", n._inside_event), n.addEventListener("mouseleave", n._inside_event), delete n._inside_event;
17
+ }
18
+ };
19
+ export {
20
+ o as vHoverInside
21
+ };
@@ -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,8 @@
1
+ import { vAuth as e } from "@das-fed/upf-utils/directive/auth";
2
+ import { vClickOutside as v } from "@das-fed/upf-utils/directive/clickOutside";
3
+ import { vHoverInside as i } from "@das-fed/upf-utils/directive/hoverInside";
4
+ export {
5
+ e as vAuth,
6
+ v as vClickOutside,
7
+ i as vHoverInside
8
+ };
@@ -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,7 @@
1
+ const a = async (r, t) => {
2
+ let e = r;
3
+ return t != null && t.target && (typeof t.target == "string" && (e = t.target), typeof t.target == "function" && (e = await t.target(r))), e;
4
+ };
5
+ export {
6
+ a as getEl
7
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 判断鼠标是否落在一个块级元素内部
3
+ * @param {*} dom 块级元素
4
+ * @returns
5
+ */
6
+ export declare const domCheckIn: (dom: HTMLElement) => boolean;
@@ -0,0 +1,8 @@
1
+ const d = (e) => {
2
+ const t = window.event;
3
+ let i = Number(t.clientX), n = Number(t.clientY), l = Number(e.getBoundingClientRect().left), r = Number(l + e.clientWidth), c = Number(e.getBoundingClientRect().top), u = Number(c + e.clientHeight);
4
+ return i > l && i < r && n > c && n < u;
5
+ };
6
+ export {
7
+ d as domCheckIn
8
+ };
@@ -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 };
@@ -0,0 +1,9 @@
1
+ const c = (e, r, o = { attributes: !0, childList: !0, subtree: !0 }) => {
2
+ const s = r || document.body, t = new MutationObserver((u) => {
3
+ e(u);
4
+ });
5
+ return t.observe(s, o), t;
6
+ };
7
+ export {
8
+ c as DomWatcher
9
+ };
package/esm-map.json ADDED
@@ -0,0 +1,146 @@
1
+ {
2
+ "withInstall": "/with-install/index",
3
+ "vAuth": "/directive/auth/index",
4
+ "vHoverInside": "/directive/hoverInside/index",
5
+ "vClickOutside": "/directive/clickOutside/index",
6
+ "getEl": "/directive/utils/index",
7
+ "createService": "/api-services/src/create-service/index",
8
+ "appManage": "/api-services/modules/app-manage/index",
9
+ "authentication": "/api-services/modules/authentication/index",
10
+ "bemsModules": "/api-services/modules/bems/index",
11
+ "contract": "/api-services/modules/contract/index",
12
+ "dutyModules": "/api-services/modules/duty-manage/index",
13
+ "enterpriseright": "/api-services/modules/enterpriseright/index",
14
+ "downloadFile": "/api-services/modules/file/index",
15
+ "useFile": "/api-services/modules/file/index",
16
+ "gatewayEdge": "/api-services/modules/gateway-edge/index",
17
+ "iot": "/api-services/modules/iot/index",
18
+ "iotMinio": "/api-services/modules/iot/index",
19
+ "iotModules": "/api-services/modules/iot/index",
20
+ "iotProgress": "/api-services/modules/iot/index",
21
+ "iotRelationModules": "/api-services/modules/iot/index",
22
+ "justauth": "/api-services/modules/justauth/index",
23
+ "oauthServer": "/api-services/modules/justauth/index",
24
+ "knowledgeBase": "/api-services/modules/knowledge/index",
25
+ "daslink": "/api-services/modules/link/index",
26
+ "permission": "/api-services/modules/permission/index",
27
+ "company": "/api-services/modules/platformManage/index",
28
+ "customer": "/api-services/modules/platformManage/index",
29
+ "customerGrade": "/api-services/modules/platformManage/index",
30
+ "customerType": "/api-services/modules/platformManage/index",
31
+ "projectManage": "/api-services/modules/platformManage/index",
32
+ "portal": "/api-services/modules/portal/index",
33
+ "spaceManage": "/api-services/modules/space-manage/index",
34
+ "superadminLicense": "/api-services/modules/super-admin/index",
35
+ "superadminPermission": "/api-services/modules/super-admin/index",
36
+ "superadminPortal": "/api-services/modules/super-admin/index",
37
+ "superadminResource": "/api-services/modules/super-admin/index",
38
+ "supplier": "/api-services/modules/supplier/index",
39
+ "supplierClassification": "/api-services/modules/supplier/index",
40
+ "supplierManage": "/api-services/modules/supplier/index",
41
+ "enterpriseadminBrandModel": "/api-services/modules/supplychain-manage/index",
42
+ "tool": "/api-services/modules/tool/index",
43
+ "systemConfiguration": "/api-services/modules/systemConfiguration/index",
44
+ "getToken": "/create-api-service/sso/index",
45
+ "getUserInfo": "/common-info/index",
46
+ "getPersonalInfo": "/common-info/index",
47
+ "getTenantInfo": "/common-info/index",
48
+ "getProjectInfo": "/common-info/index",
49
+ "getHomeInfo": "/common-info/index",
50
+ "getPageAuth": "/common-info/index",
51
+ "getPageAuthBtn": "/common-info/index",
52
+ "getSubApps": "/common-info/index",
53
+ "getMenus": "/common-info/index",
54
+ "getTabInfo": "/common-info/index",
55
+ "getMinioAddress": "/common-info/index",
56
+ "getInstanceInfo": "/common-info/index",
57
+ "getFavIcon": "/common-info/index",
58
+ "dateFormat": "/common-tools/date-format/index",
59
+ "getOriginFromUrl": "/common-tools/get-url-params/index",
60
+ "getUrlParams": "/common-tools/get-url-params/index",
61
+ "getFullPath": "/common-tools/get-url-params/index",
62
+ "funcUrlDel": "/common-tools/get-url-params/index",
63
+ "urlParamsToObject": "/common-tools/get-url-params/index",
64
+ "objectToUrlparams": "/common-tools/get-url-params/index",
65
+ "addPathParamsToUrl": "/common-tools/get-url-params/index",
66
+ "findNonEmptyChildrenItems": "/common-tools/nest-tree-format/index",
67
+ "flatTree": "/common-tools/nest-tree-format/index",
68
+ "filterTreeArray": "/common-tools/nest-tree-format/index",
69
+ "treeFind": "/common-tools/nest-tree-format/index",
70
+ "objEqual": "/common-tools/obj-tools/index",
71
+ "arrEqual": "/common-tools/arr-tools/index",
72
+ "arrUnique": "/common-tools/arr-tools/index",
73
+ "isEmpty": "/common-tools/handle-data/index",
74
+ "setHtmlMinWH": "/common-tools/setHtmlMinWH/index",
75
+ "runPromiseByQueue": "/common-tools/queue-promise/index",
76
+ "isRelativeOrSameDomain": "/common-tools/platform-tools/index",
77
+ "setShowLayout": "/common-tools/platform-tools/index",
78
+ "withToken": "/common-tools/platform-tools/index",
79
+ "updateFavIcon": "/common-tools/update-fav-icon/index",
80
+ "setDasHtmlIcon": "/common-tools/update-fav-icon/index",
81
+ "encryption": "/atob/index",
82
+ "decrypt": "/atob/index",
83
+ "getConfig": "/config/index",
84
+ "curringHttp": "/curring-http/index",
85
+ "oss": "/oss/index",
86
+ "DomWatcher": "/dom-watcher/index",
87
+ "setProcessEngineToken": "/process-engine-info/index",
88
+ "removeProcessEngineToken": "/process-engine-info/index",
89
+ "setProcessEngineProject": "/process-engine-info/index",
90
+ "removeProcessEngineProject": "/process-engine-info/index",
91
+ "tokenNextTick_1": "/nextTiken/index",
92
+ "projectNextTick": "/nextTiken/index",
93
+ "tokenNextTick": "/nextTiken/index",
94
+ "userInfoNextTick": "/nextTiken/index",
95
+ "tenantInfoNextTick": "/nextTiken/index",
96
+ "useDimpleCanvas": "/dimple-canvas/use-dimple-canvas/index",
97
+ "Konva": "/dimple-canvas/use-dimple-canvas/core/konva/index",
98
+ "loadJs": "/load-js/index",
99
+ "pureImageSrc": "/pure-image-src/index",
100
+ "SizeWatcher": "/size-watcher/index",
101
+ "useSizeWatcher": "/size-watcher/index",
102
+ "hasClass": "/style/index",
103
+ "addClass": "/style/index",
104
+ "removeClass": "/style/index",
105
+ "getStyle": "/style/index",
106
+ "getCSS": "/style/index",
107
+ "createStyle": "/style/index",
108
+ "updateStyle": "/style/index",
109
+ "curringMath": "/style/index",
110
+ "useModelValue": "/vue/hooks/use-model-value/index",
111
+ "getAccessToken": "/token-tools/index",
112
+ "getAccessTokenInfo": "/token-tools/index",
113
+ "setAccessToken": "/token-tools/index",
114
+ "removeAccessToken": "/token-tools/index",
115
+ "socketService": "/webSocket-service/index",
116
+ "getTokenFromQuery": "/common-info/getInfoFromUrl/index",
117
+ "getProjectInfoFromQuery": "/common-info/getInfoFromUrl/index",
118
+ "getIframeUrl": "/common-info/getIframeUrl/index",
119
+ "LowCode": "/use-low-code/index",
120
+ "domCheckIn": "/dom-check-in/index",
121
+ "setPersonalInfo": "/common-info/set-personal-info/index",
122
+ "proxySso": "/create-api-service/proxy-sso/index",
123
+ "addMicroAppProxySsoEvent": "/create-api-service/proxy-sso/index",
124
+ "getTokenParams": "/create-api-service/sso/index",
125
+ "getTokenFromCode": "/create-api-service/sso/index",
126
+ "real_uri": "/create-api-service/sso/index",
127
+ "getQuery": "/create-api-service/sso/index",
128
+ "tokenStorage": "/create-api-service/sso/index",
129
+ "login": "/create-api-service/sso/index",
130
+ "useGetAuth": "/hooks/use-get-auth/index",
131
+ "getPinyinFirstCharacter": "/pinyin-first-character/index",
132
+ "useZIndex": "/hooks/popup-manager/use-zindex/index",
133
+ "Graph": "/dimple-canvas/use-dimple-canvas/core/antv-x6/index",
134
+ "useAntvX6": "/dimple-canvas/use-dimple-canvas/core/antv-x6/index",
135
+ "addObject": "/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index",
136
+ "useKonva": "/dimple-canvas/use-dimple-canvas/core/konva/index",
137
+ "setShowWatermark": "/common-tools/platform-tools/index",
138
+ "extractFilename": "/common-tools/extract-file-name/index",
139
+ "setBrowseTitle": "/common-tools/update-browser-title/index",
140
+ "getPersonalConfig": "/common-info/index",
141
+ "getProjectMessage": "/common-info/index",
142
+ "analyApi": "/api-services/modules/iot/index",
143
+ "calcTextWidth": "/common-tools/calc-text-width/index",
144
+ "getFileExtension": "/common-tools/get-file-extension/index",
145
+ "getLanguages": "/common-info/index"
146
+ }
@@ -0,0 +1,3 @@
1
+ export declare const useZIndex: () => {
2
+ nextZIndex: () => any;
3
+ };
@@ -0,0 +1,9 @@
1
+ const n = () => [...document.body.querySelectorAll("*")].reduce(
2
+ (e, t) => Math.max(e, +window.getComputedStyle(t).zIndex || 0),
3
+ 0
4
+ ), d = () => ({
5
+ nextZIndex: () => n() + 1
6
+ });
7
+ export {
8
+ d as useZIndex
9
+ };
@@ -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,9 @@
1
+ export declare const useGetAuth: () => {
2
+ getApplication: (code?: string, appName?: "superadmin" | "enterpriseadmin") => unknown;
3
+ getMenu: (code: string, menuCode?: string, path?: string, appName?: "superadmin" | "enterpriseadmin") => unknown;
4
+ getAuth: (options: {
5
+ applicationCode: string;
6
+ menuCode: string;
7
+ code: string;
8
+ }, appName?: "superadmin" | "enterpriseadmin") => unknown;
9
+ };
@@ -0,0 +1,53 @@
1
+ import { flatTree as w } from "@das-fed/upf-utils/common-tools";
2
+ import { projectNextTick as A } from "@das-fed/upf-utils/nextTiken";
3
+ import { vAuth as M } from "@das-fed/upf-utils/directive/auth";
4
+ import { portal as T, superadminPortal as y, enterpriseright as U } from "@das-fed/upf-utils/api-services/modules";
5
+ const v = T.get("/appcategory"), B = y.get("/appcategory"), C = U.get("/permissionset/user-portal-menu"), L = y.get("/user-menu"), k = () => {
6
+ const d = async (r, i = "enterpriseadmin") => {
7
+ let t = null, s = {};
8
+ await A(), i === "superadmin" ? t = B().run : (s = { userType: 1 }, t = v().run);
9
+ const [a, l] = await t(s);
10
+ if (a || !l || !l.length) return null;
11
+ const f = l.map((o) => o.apps).flat();
12
+ return r ? f.find((o) => o.code === r) : f;
13
+ }, g = async (r, i, t, s = "enterpriseadmin") => {
14
+ var c;
15
+ await A();
16
+ let a = null, l = {
17
+ code: r,
18
+ showBtn: !0
19
+ };
20
+ s === "superadmin" ? a = L().run : (l.userType = 1, a = C().run);
21
+ const [f, e] = await a(l);
22
+ if (f || !e || !e.length)
23
+ return i || t ? void 0 : [];
24
+ if (!i && !t) return e;
25
+ const o = e != null && e.length ? e.filter((n) => n.routeUrl) : [], m = e != null && e.length ? e.filter((n) => !n.routeUrl && n.children).map((n) => n.children).flat() : [], p = [...o, ...m];
26
+ let u;
27
+ if (i)
28
+ u = p.find((n) => n.code === i || n.originalCode === i);
29
+ else if (t) {
30
+ const n = t.replace(((c = p[0]) == null ? void 0 : c.applicationPath) ?? "", "").replace(/\/\//g, "/");
31
+ u = p.find((h) => h.routeUrl && h.routeUrl === n);
32
+ }
33
+ return u;
34
+ };
35
+ return {
36
+ getApplication: d,
37
+ getMenu: g,
38
+ getAuth: async (r, i = "enterpriseadmin") => {
39
+ var p;
40
+ const t = (r == null ? void 0 : r.applicationCode) ?? "", s = (r == null ? void 0 : r.menuCode) ?? "", a = (r == null ? void 0 : r.code) ?? "";
41
+ if (JSON.parse(sessionStorage.getItem("permission-btn") || "{}")[s]) return M(null, { applicationCode: t, menuCode: s, code: a });
42
+ if (!await d(t, i)) return !1;
43
+ const e = await g(t, s, i);
44
+ return !e || !(e != null && e.children) || !((p = e.children) != null && p.length) ? !1 : !!w(e.children).find((u) => {
45
+ let c = (u == null ? void 0 : u.originalCode) ?? u.code;
46
+ return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c === a;
47
+ });
48
+ }
49
+ };
50
+ };
51
+ export {
52
+ k as useGetAuth
53
+ };
Binary file
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from '@das-fed/upf-utils/directive';
2
+ export * from '@das-fed/upf-utils/with-install';
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "@das-fed/upf-utils/directive";
2
+ export * from "@das-fed/upf-utils/with-install";
@@ -0,0 +1,3 @@
1
+ /** 使用promise加载js的工具 */
2
+ declare const loadJs: (src: string) => any;
3
+ export { loadJs };
@@ -0,0 +1,12 @@
1
+ import { getConfig as r } from "@das-fed/upf-utils/config";
2
+ const c = (t) => {
3
+ let { baseURL: i, publicPath: n = "" } = r();
4
+ if (document.getElementById(t)) return;
5
+ const e = document.createElement("script");
6
+ return t.startsWith("/") && (t = `${i}/${n}/${t}`), t = t.replace(/\/\//g, "/").replace(/\/\//g, "/").replace("http:/", "http://").replace("https:/", "https://"), e.src = t, e.id = t, document.body.appendChild(e), new Promise((o, p) => {
7
+ e.onload = o, e.onerror = p;
8
+ });
9
+ };
10
+ export {
11
+ c as loadJs
12
+ };
@@ -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>;