@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.
- package/__VLS_types.d.ts +124 -0
- package/api-services/i18n/index.d.ts +53 -0
- package/api-services/i18n/index.js +27 -0
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.d.ts +2 -0
- package/api-services/index.js +3141 -0
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.d.ts +2 -0
- package/api-services/modules/app-manage/index.js +2827 -0
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.d.ts +2 -0
- package/api-services/modules/authentication/index.js +2827 -0
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.d.ts +6 -0
- package/api-services/modules/bems/index.js +2831 -0
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.d.ts +2 -0
- package/api-services/modules/contract/index.js +2827 -0
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.d.ts +7 -0
- package/api-services/modules/duty-manage/index.js +2836 -0
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.d.ts +2 -0
- package/api-services/modules/enterpriseright/index.js +2827 -0
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.d.ts +37 -0
- package/api-services/modules/file/index.js +3059 -0
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.d.ts +2 -0
- package/api-services/modules/gateway-edge/index.js +2827 -0
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.d.ts +21 -0
- package/api-services/modules/index.js +3115 -0
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.d.ts +16 -0
- package/api-services/modules/iot/index.js +2841 -0
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.d.ts +3 -0
- package/api-services/modules/justauth/index.js +2828 -0
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.d.ts +2 -0
- package/api-services/modules/knowledge/index.js +2827 -0
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.d.ts +2 -0
- package/api-services/modules/link/index.js +2827 -0
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.d.ts +2 -0
- package/api-services/modules/permission/index.js +2827 -0
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.d.ts +14 -0
- package/api-services/modules/platformManage/index.js +2835 -0
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.d.ts +2 -0
- package/api-services/modules/portal/index.js +2827 -0
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.d.ts +2 -0
- package/api-services/modules/space-manage/index.js +2827 -0
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.d.ts +8 -0
- package/api-services/modules/super-admin/index.js +2830 -0
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.d.ts +6 -0
- package/api-services/modules/supplier/index.js +2829 -0
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.d.ts +2 -0
- package/api-services/modules/supplychain-manage/index.js +2827 -0
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.d.ts +2 -0
- package/api-services/modules/systemConfiguration/index.js +2827 -0
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.d.ts +2 -0
- package/api-services/modules/tool/index.js +2827 -0
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.d.ts +1 -0
- package/api-services/src/create-service/index.js +2827 -0
- package/api-services/src/create-service/index.js.gz +0 -0
- package/atob/index.d.ts +2 -0
- package/atob/index.js +11 -0
- package/common-info/getIframeUrl/index.d.ts +9 -0
- package/common-info/getIframeUrl/index.js +10 -0
- package/common-info/getInfoFromUrl/index.d.ts +8 -0
- package/common-info/getInfoFromUrl/index.js +84 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.d.ts +61 -0
- package/common-info/index.js +171 -0
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.d.ts +5 -0
- package/common-info/set-personal-info/index.js +1474 -0
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +214 -0
- package/common-tools/arr-tools/index.d.ts +15 -0
- package/common-tools/arr-tools/index.js +8 -0
- package/common-tools/calc-text-width/index.d.ts +1 -0
- package/common-tools/calc-text-width/index.js +10 -0
- package/common-tools/date-format/index.d.ts +7 -0
- package/common-tools/date-format/index.js +19 -0
- package/common-tools/extract-file-name/index.d.ts +1 -0
- package/common-tools/extract-file-name/index.js +1466 -0
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-file-extension/index.d.ts +6 -0
- package/common-tools/get-file-extension/index.js +7 -0
- package/common-tools/get-url-params/index.d.ts +46 -0
- package/common-tools/get-url-params/index.js +63 -0
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/handle-data/index.d.ts +6 -0
- package/common-tools/handle-data/index.js +4 -0
- package/common-tools/index.d.ts +14 -0
- package/common-tools/index.js +14 -0
- package/common-tools/nest-tree-format/index.d.ts +30 -0
- package/common-tools/nest-tree-format/index.js +24 -0
- package/common-tools/obj-tools/index.d.ts +7 -0
- package/common-tools/obj-tools/index.js +14 -0
- package/common-tools/platform-tools/index.d.ts +19 -0
- package/common-tools/platform-tools/index.js +19 -0
- package/common-tools/queue-promise/index.d.ts +6 -0
- package/common-tools/queue-promise/index.js +9 -0
- package/common-tools/setHtmlMinWH/index.d.ts +5 -0
- package/common-tools/setHtmlMinWH/index.js +7 -0
- package/common-tools/update-browser-title/index.d.ts +1 -0
- package/common-tools/update-browser-title/index.js +12 -0
- package/common-tools/update-fav-icon/index.d.ts +11 -0
- package/common-tools/update-fav-icon/index.js +22 -0
- package/config/index.d.ts +2 -0
- package/config/index.js +9 -0
- package/create-api-service/i18n/index.d.ts +33 -0
- package/create-api-service/i18n/index.js +15 -0
- package/create-api-service/index.d.ts +3 -0
- package/create-api-service/index.js +2827 -0
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/index.d.ts +3 -0
- package/create-api-service/proxy-sso/index.js +21 -0
- package/create-api-service/sso/index.d.ts +21 -0
- package/create-api-service/sso/index.js +1845 -0
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.d.ts +12 -0
- package/curring-http/index.js +2002 -0
- package/curring-http/index.js.gz +0 -0
- package/curring-http/type.d.ts +89 -0
- package/dimple-canvas/index.d.ts +3 -0
- package/dimple-canvas/index.js +5 -0
- package/directive/auth/index.d.ts +8 -0
- package/directive/auth/index.js +62 -0
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/index.d.ts +6 -0
- package/directive/clickOutside/index.js +27 -0
- package/directive/hoverInside/index.d.ts +6 -0
- package/directive/hoverInside/index.js +21 -0
- package/directive/index.d.ts +3 -0
- package/directive/index.js +8 -0
- package/directive/utils/index.d.ts +7 -0
- package/directive/utils/index.js +7 -0
- package/dom-check-in/index.d.ts +6 -0
- package/dom-check-in/index.js +8 -0
- package/dom-watcher/index.d.ts +25 -0
- package/dom-watcher/index.js +9 -0
- package/esm-map.json +146 -0
- package/hooks/popup-manager/use-zindex/index.d.ts +3 -0
- package/hooks/popup-manager/use-zindex/index.js +9 -0
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/index.d.ts +9 -0
- package/hooks/use-get-auth/index.js +53 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/load-js/index.d.ts +3 -0
- package/load-js/index.js +12 -0
- package/nextTiken/index.d.ts +12 -0
- package/nextTiken/index.js +45 -0
- package/nextTiken/index.js.gz +0 -0
- package/oss/index.d.ts +2 -0
- package/oss/index.js +11 -0
- package/package.json +49 -0
- package/pinyin-first-character/index.d.ts +2 -0
- package/pinyin-first-character/index.js +25022 -0
- package/pinyin-first-character/index.js.gz +0 -0
- package/process-engine-info/index.d.ts +13 -0
- package/process-engine-info/index.js +15 -0
- package/pure-image-src/index.d.ts +2 -0
- package/pure-image-src/index.js +4 -0
- package/size-watcher/index.d.ts +6 -0
- package/size-watcher/index.js +20 -0
- package/style/index.d.ts +2 -0
- package/style/index.js +70 -0
- package/style/index.js.gz +0 -0
- package/style/math.d.ts +9 -0
- package/style/style.d.ts +31 -0
- package/token-tools/index.d.ts +21 -0
- package/token-tools/index.js +11 -0
- package/use-low-code/index.d.ts +1 -0
- package/use-low-code/index.js +69 -0
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/low-code-iframe.vue.d.ts +2 -0
- package/use-low-code/style.css +1 -0
- package/vue/hooks/use-model-value/index.d.ts +9 -0
- package/vue/hooks/use-model-value/index.js +10 -0
- package/vue/index.d.ts +1 -0
- package/vue/index.js +4 -0
- package/webSocket-service/index.d.ts +41 -0
- package/webSocket-service/index.js +83 -0
- package/webSocket-service/index.js.gz +0 -0
- package/webSocket-service/type.d.ts +28 -0
- package/with-install/index.d.ts +11 -0
- 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,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,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,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,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,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 };
|
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,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
package/index.js
ADDED
package/load-js/index.js
ADDED
|
@@ -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>;
|