@das-fed/utils 1.0.8 → 6.3.0-beta.0
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/api-services/index.d.ts +2 -1
- package/api-services/index.js +3 -2
- package/api-services/modules/app-manage.js +1 -1
- package/api-services/modules/authentication.js +1 -1
- package/api-services/modules/bems.js +1 -1
- package/api-services/modules/contract.js +1 -1
- package/api-services/modules/duty-manage.js +1 -1
- package/api-services/modules/enterpriseright.js +1 -1
- package/api-services/modules/file.d.ts +1 -1
- package/api-services/modules/file.js +355 -342
- package/api-services/modules/gateway-edge.js +1 -1
- package/api-services/modules/index.d.ts +21 -21
- package/api-services/modules/index.js +57 -558
- package/api-services/modules/iot.js +1 -1
- package/api-services/modules/justauth.js +1 -1
- package/api-services/modules/knowledge.js +1 -1
- package/api-services/modules/link.js +1 -1
- package/api-services/modules/permission.js +1 -1
- package/api-services/modules/platformManage.js +1 -1
- package/api-services/modules/portal.js +1 -1
- package/api-services/modules/space-manage.js +1 -1
- package/api-services/modules/super-admin.js +1 -1
- package/api-services/modules/supplier.js +1 -1
- package/api-services/modules/supplychain-manage.js +1 -1
- package/api-services/modules/systemConfiguration.js +1 -1
- package/api-services/modules/tool.js +1 -1
- package/api-services/src/create-service.d.ts +1 -1
- package/api-services/src/create-service.js +2 -3234
- package/common-info/{setInfoFromUrl.d.ts → getInfoFromUrl.d.ts} +1 -1
- package/common-info/{setInfoFromUrl.js → getInfoFromUrl.js} +26 -29
- package/common-info/index.d.ts +18 -7
- package/common-info/index.js +82 -143
- package/{api-services/src/sso.js → common-info/set-personal-info.js} +754 -667
- package/common-tools/get-url-params.d.ts +21 -8
- package/common-tools/get-url-params.js +26 -15
- package/common-tools/index.d.ts +3 -0
- package/common-tools/index.js +3 -0
- package/common-tools/obj-tools.d.ts +1 -1
- package/common-tools/platform-tools.d.ts +18 -0
- package/common-tools/platform-tools.js +15 -0
- package/common-tools/queue-promise.d.ts +6 -0
- package/common-tools/queue-promise.js +9 -0
- package/common-tools/setHtmlMinWH.js +8 -4
- package/common-tools/update-fav-icon.d.ts +10 -0
- package/common-tools/update-fav-icon.js +22 -0
- package/create-api-service/index.d.ts +1 -0
- package/create-api-service/index.js +3492 -0
- package/create-api-service/proxy-sso.d.ts +3 -0
- package/create-api-service/proxy-sso.js +21 -0
- package/create-api-service/sso.d.ts +23 -0
- package/create-api-service/sso.js +1969 -0
- package/curring-http/index.d.ts +3 -2
- package/curring-http/index.js +2872 -2662
- package/dimple-canvas/index.d.ts +1 -0
- package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +1 -0
- package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +2244 -2265
- package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +4 -3
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +1079 -1051
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +3 -2
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/index.d.ts +2 -1
- package/directive/auth.js +21 -21
- package/directive/clickOutside.d.ts +3 -2
- package/directive/hoverInside.d.ts +2 -1
- package/dom-check-in/index.js +5 -5
- package/hooks/popup-manager/use-zindex.js +8 -8
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/apis.js +8 -0
- package/hooks/use-get-auth/index.d.ts +9 -0
- package/hooks/use-get-auth/index.js +57 -0
- package/nextTiken/index.d.ts +3 -4
- package/nextTiken/index.js +34 -46
- package/package.json +5 -4
- package/pinyin-first-character/index.js +19792 -20877
- package/process-engine-info/index.d.ts +5 -2
- package/process-engine-info/index.js +11 -6
- package/style/index.js +1 -1
- package/style/style.d.ts +2 -1
- package/style/style.js +1 -1
- package/token-tools/index.d.ts +10 -7
- package/token-tools/index.js +44 -59
- package/use-low-code/index.d.ts +1 -0
- package/use-low-code/index.js +70 -0
- package/use-low-code/low-code-iframe.vue.d.ts +2 -0
- package/use-low-code/style.css +1 -0
- package/webSocket-service/index.d.ts +2 -1
- package/with-install/index.d.ts +2 -1
- package/api-services/src/sso.d.ts +0 -29
- package/api-services/src/util.d.ts +0 -1
- package/api-services/src/util.js +0 -1466
- package/common-tools/throttled.d.ts +0 -7
- package/common-tools/throttled.js +0 -10
- package/micro-app/globalData.d.ts +0 -3
- package/micro-app/globalData.js +0 -11
- package/micro-app/index.d.ts +0 -5
- package/micro-app/index.js +0 -3699
- package/panel/index.d.ts +0 -31
- package/panel/index.js +0 -37
- package/set-personal-info/index.js +0 -1468
- /package/{set-personal-info/index.d.ts → common-info/set-personal-info.d.ts} +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 子应用存储流程引擎需要的token信息
|
|
3
3
|
* @param data token信息
|
|
4
4
|
*/
|
|
5
5
|
export declare const setProcessEngineToken: (data: Record<any, any>) => void;
|
|
6
|
+
/** 移除流程引擎token */
|
|
7
|
+
export declare const removeProcessEngineToken: () => void;
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
9
|
+
* 子应用存储流程引擎需要的项目信息
|
|
8
10
|
* @param projectId 项目id
|
|
9
11
|
*/
|
|
10
12
|
export declare const setProcessEngineProject: (projectId: string) => void;
|
|
13
|
+
export declare const removeProcessEngineProject: () => void;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const s = (e) => {
|
|
2
|
+
sessionStorage.setItem("hotentToken", e.accessToken || ""), sessionStorage.setItem("currentUser", JSON.stringify({ token: e.accessToken || "" }));
|
|
3
|
+
}, o = () => {
|
|
4
|
+
sessionStorage.removeItem("hotentToken"), sessionStorage.removeItem("currentUser");
|
|
5
|
+
}, t = (e) => {
|
|
5
6
|
sessionStorage.setItem("project", e);
|
|
7
|
+
}, n = () => {
|
|
8
|
+
sessionStorage.removeItem("project");
|
|
6
9
|
};
|
|
7
10
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
n as removeProcessEngineProject,
|
|
12
|
+
o as removeProcessEngineToken,
|
|
13
|
+
t as setProcessEngineProject,
|
|
14
|
+
s as setProcessEngineToken
|
|
10
15
|
};
|
package/style/index.js
CHANGED
package/style/style.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
|
|
2
3
|
export declare const classNameToArray: (cls?: string) => string[];
|
|
3
4
|
export declare const hasClass: (el: Element, cls: string) => boolean;
|
|
4
5
|
export declare const addClass: (el: Element, cls: string) => void;
|
package/style/style.js
CHANGED
package/token-tools/index.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 获取token
|
|
3
|
-
* @returns
|
|
2
|
+
* 获取token
|
|
3
|
+
* @returns token
|
|
4
4
|
*/
|
|
5
|
-
export declare const getAccessToken: () =>
|
|
5
|
+
export declare const getAccessToken: () => string;
|
|
6
6
|
/**
|
|
7
|
-
* 获取
|
|
7
|
+
* 获取tokenInfo相关信息
|
|
8
8
|
*/
|
|
9
|
-
export declare const getAccessTokenInfo: () => any;
|
|
9
|
+
export declare const getAccessTokenInfo: (key: 'accessTokenExpiredAt' | 'refreshToken' | 'redirectUri') => any;
|
|
10
10
|
/**
|
|
11
|
-
* 存入
|
|
11
|
+
* 存入token、tokenInfo
|
|
12
12
|
* @param token
|
|
13
|
+
* @param info
|
|
13
14
|
*/
|
|
14
15
|
export declare const setAccessToken: (token: string, info?: any) => void;
|
|
15
16
|
/**
|
|
16
|
-
* 删除
|
|
17
|
+
* 删除token、tokenInfo
|
|
17
18
|
*/
|
|
18
19
|
export declare const removeAccessToken: () => void;
|
|
20
|
+
/** 清除所有的 cookie */
|
|
21
|
+
export declare const clearAllCookies: () => void;
|
package/token-tools/index.js
CHANGED
|
@@ -1,102 +1,87 @@
|
|
|
1
|
-
import { tokenStorage as k } from "@das-fed/utils/api-services/src/sso";
|
|
2
|
-
import { setProcessEngineToken as C } from "@das-fed/utils/process-engine-info";
|
|
3
|
-
import { setPersonalInfo as D } from "@das-fed/utils/set-personal-info";
|
|
4
1
|
/*! js-cookie v3.0.5 | MIT */
|
|
5
|
-
function
|
|
6
|
-
for (var
|
|
7
|
-
var f = arguments[
|
|
8
|
-
for (var
|
|
9
|
-
|
|
2
|
+
function d(e) {
|
|
3
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
4
|
+
var f = arguments[o];
|
|
5
|
+
for (var p in f)
|
|
6
|
+
e[p] = f[p];
|
|
10
7
|
}
|
|
11
|
-
return
|
|
8
|
+
return e;
|
|
12
9
|
}
|
|
13
|
-
var
|
|
14
|
-
read: function(
|
|
15
|
-
return
|
|
10
|
+
var m = {
|
|
11
|
+
read: function(e) {
|
|
12
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
16
13
|
},
|
|
17
|
-
write: function(
|
|
18
|
-
return encodeURIComponent(
|
|
14
|
+
write: function(e) {
|
|
15
|
+
return encodeURIComponent(e).replace(
|
|
19
16
|
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
20
17
|
decodeURIComponent
|
|
21
18
|
);
|
|
22
19
|
}
|
|
23
20
|
};
|
|
24
|
-
function
|
|
25
|
-
function f(n,
|
|
21
|
+
function u(e, o) {
|
|
22
|
+
function f(n, s, r) {
|
|
26
23
|
if (!(typeof document > "u")) {
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
for (var
|
|
30
|
-
|
|
31
|
-
return document.cookie = n + "=" +
|
|
24
|
+
r = d({}, o, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
25
|
+
var t = "";
|
|
26
|
+
for (var i in r)
|
|
27
|
+
r[i] && (t += "; " + i, r[i] !== !0 && (t += "=" + r[i].split(";")[0]));
|
|
28
|
+
return document.cookie = n + "=" + e.write(s, n) + t;
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
|
-
function
|
|
31
|
+
function p(n) {
|
|
35
32
|
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
36
|
-
for (var
|
|
37
|
-
var
|
|
33
|
+
for (var s = document.cookie ? document.cookie.split("; ") : [], r = {}, t = 0; t < s.length; t++) {
|
|
34
|
+
var i = s[t].split("="), l = i.slice(1).join("=");
|
|
38
35
|
try {
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
36
|
+
var v = decodeURIComponent(i[0]);
|
|
37
|
+
if (r[v] = e.read(l, v), n === v)
|
|
41
38
|
break;
|
|
42
39
|
} catch {
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
|
-
return n ?
|
|
42
|
+
return n ? r[n] : r;
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
45
|
return Object.create(
|
|
49
46
|
{
|
|
50
47
|
set: f,
|
|
51
|
-
get:
|
|
52
|
-
remove: function(n,
|
|
48
|
+
get: p,
|
|
49
|
+
remove: function(n, s) {
|
|
53
50
|
f(
|
|
54
51
|
n,
|
|
55
52
|
"",
|
|
56
|
-
|
|
53
|
+
d({}, s, {
|
|
57
54
|
expires: -1
|
|
58
55
|
})
|
|
59
56
|
);
|
|
60
57
|
},
|
|
61
58
|
withAttributes: function(n) {
|
|
62
|
-
return
|
|
59
|
+
return u(this.converter, d({}, this.attributes, n));
|
|
63
60
|
},
|
|
64
61
|
withConverter: function(n) {
|
|
65
|
-
return
|
|
62
|
+
return u(d({}, this.converter, n), this.attributes);
|
|
66
63
|
}
|
|
67
64
|
},
|
|
68
65
|
{
|
|
69
|
-
attributes: { value: Object.freeze(
|
|
70
|
-
converter: { value: Object.freeze(
|
|
66
|
+
attributes: { value: Object.freeze(o) },
|
|
67
|
+
converter: { value: Object.freeze(e) }
|
|
71
68
|
}
|
|
72
69
|
);
|
|
73
70
|
}
|
|
74
|
-
var
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
accessToken: g,
|
|
84
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + h * 1e3,
|
|
85
|
-
refreshToken: T,
|
|
86
|
-
info: p
|
|
87
|
-
};
|
|
88
|
-
k().save(l), D(g), C(l);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return s.get(v) ?? ((c = k().getData()) == null ? void 0 : c.accessToken) ?? "";
|
|
92
|
-
}, x = () => s.get(d) ? JSON.parse(s.get(d)) : {}, y = (o, t) => {
|
|
93
|
-
s.set(v, o), t && s.set(d, JSON.stringify(t));
|
|
94
|
-
}, E = () => {
|
|
95
|
-
s.remove(v), s.get(d) && s.remove(d);
|
|
71
|
+
var c = u(m, { path: "/" });
|
|
72
|
+
const k = "accessToken", g = "accessTokenExpiredAt", a = "refreshToken", h = "redirectUri", T = () => c.get(k) ?? "", x = (e) => c.get(e) ?? "", A = (e, o = {}) => {
|
|
73
|
+
c.set(k, e), c.set(g, o.accessTokenExpiredAt ?? "0"), c.set(a, o.refreshToken ?? ""), o.redirectUri && c.set(h, o.redirectUri);
|
|
74
|
+
}, U = () => {
|
|
75
|
+
c.remove(k), c.remove(g), c.remove(a), c.remove(h);
|
|
76
|
+
}, y = () => {
|
|
77
|
+
const e = c.get();
|
|
78
|
+
for (const o in e)
|
|
79
|
+
e.hasOwnProperty(o) && c.remove(o);
|
|
96
80
|
};
|
|
97
81
|
export {
|
|
98
|
-
|
|
82
|
+
y as clearAllCookies,
|
|
83
|
+
T as getAccessToken,
|
|
99
84
|
x as getAccessTokenInfo,
|
|
100
|
-
|
|
101
|
-
|
|
85
|
+
U as removeAccessToken,
|
|
86
|
+
A as setAccessToken
|
|
102
87
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LowCode } from './low-code-iframe.vue';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, openBlock as y, createElementBlock as h } from "vue";
|
|
2
|
+
const x = ["src"], b = /* @__PURE__ */ v({
|
|
3
|
+
__name: "low-code-iframe",
|
|
4
|
+
props: {
|
|
5
|
+
app: {},
|
|
6
|
+
query: {},
|
|
7
|
+
iframeLoading: { type: Boolean }
|
|
8
|
+
},
|
|
9
|
+
emits: ["emit-change", "update:iframeLoading"],
|
|
10
|
+
setup(n, { expose: c, emit: s }) {
|
|
11
|
+
const a = n, r = u(() => {
|
|
12
|
+
if (!a.app)
|
|
13
|
+
return;
|
|
14
|
+
let e = "";
|
|
15
|
+
const o = "";
|
|
16
|
+
let t = a.query || {};
|
|
17
|
+
return a.app && (t.app = a.app), e = `${o}/api/node-low-code/v1/visitor/views/index?${new URLSearchParams(t).toString()}`, e;
|
|
18
|
+
}), d = s, l = u({
|
|
19
|
+
get: () => a.iframeLoading,
|
|
20
|
+
set: (e) => d("update:iframeLoading", e)
|
|
21
|
+
}), p = (e) => {
|
|
22
|
+
const { emitName: o = "", emitData: t = {} } = e.data || {};
|
|
23
|
+
o === "app-mounted" ? l.value = !1 : d("emit-change", o, t);
|
|
24
|
+
};
|
|
25
|
+
g(() => {
|
|
26
|
+
window.addEventListener("message", p, !1);
|
|
27
|
+
}), _(() => {
|
|
28
|
+
window.removeEventListener("message", p, !1);
|
|
29
|
+
});
|
|
30
|
+
const i = L(null), f = (e) => {
|
|
31
|
+
var o;
|
|
32
|
+
l.value || (o = i.value) != null && o.contentWindow && i.value.contentWindow.postMessage(e);
|
|
33
|
+
};
|
|
34
|
+
c({
|
|
35
|
+
onActivated: () => {
|
|
36
|
+
f({ type: "onActivated" });
|
|
37
|
+
},
|
|
38
|
+
onDeactivated: () => {
|
|
39
|
+
f({ type: "onDeactivated" });
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const w = () => {
|
|
43
|
+
var o, t, m;
|
|
44
|
+
const { origin: e } = new URL(r.value || "");
|
|
45
|
+
e && ((m = (t = (o = i.value) == null ? void 0 : o.contentWindow) == null ? void 0 : t.postMessage) == null || m.call(
|
|
46
|
+
t,
|
|
47
|
+
{ type: "setProxSsoStatus", data: { visible: !0, parentHref: location.href } },
|
|
48
|
+
e
|
|
49
|
+
));
|
|
50
|
+
};
|
|
51
|
+
return (e, o) => (y(), h("iframe", {
|
|
52
|
+
class: "low-code-iframe",
|
|
53
|
+
id: "low-code-iframe",
|
|
54
|
+
src: r.value,
|
|
55
|
+
frameborder: "0",
|
|
56
|
+
sandbox: "allow-same-origin allow-scripts allow-forms allow-modals allow-popups allow-downloads allow-top-navigation",
|
|
57
|
+
ref_key: "lowCodeRef",
|
|
58
|
+
ref: i,
|
|
59
|
+
onLoad: w
|
|
60
|
+
}, null, 40, x));
|
|
61
|
+
}
|
|
62
|
+
}), C = (n, c) => {
|
|
63
|
+
const s = n.__vccOpts || n;
|
|
64
|
+
for (const [a, r] of c)
|
|
65
|
+
s[a] = r;
|
|
66
|
+
return s;
|
|
67
|
+
}, B = /* @__PURE__ */ C(b, [["__scopeId", "data-v-dfb25e5d"]]);
|
|
68
|
+
export {
|
|
69
|
+
B as LowCode
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.low-code-iframe[data-v-dfb25e5d]{padding:0;margin:0;border:none;outline:none;height:100%;width:100%;min-height:100px;min-width:100px}
|
package/with-install/index.d.ts
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare const getQuery: (name: any) => string;
|
|
2
|
-
declare const real_uri: string;
|
|
3
|
-
declare const getTokenParams: any;
|
|
4
|
-
declare const getTokenFromCode: (code: string, data: {
|
|
5
|
-
[key: string]: string;
|
|
6
|
-
client_id: string;
|
|
7
|
-
client_secret: string;
|
|
8
|
-
}, redirectUri: string, keepLogin: boolean) => Promise<any>;
|
|
9
|
-
declare const getToken: (config: any) => Promise<any>;
|
|
10
|
-
declare const login: (params: any) => void;
|
|
11
|
-
declare const refreshToken: (params: any) => Promise<any>;
|
|
12
|
-
declare const tokenStorage: () => {
|
|
13
|
-
getData: () => {
|
|
14
|
-
accessToken: string;
|
|
15
|
-
accessTokenExpiredAt: number;
|
|
16
|
-
refreshToken: string;
|
|
17
|
-
info: any;
|
|
18
|
-
redirectUri: string;
|
|
19
|
-
};
|
|
20
|
-
save: (data: {
|
|
21
|
-
accessToken?: string | null;
|
|
22
|
-
accessTokenExpiredAt?: number;
|
|
23
|
-
refreshToken?: string;
|
|
24
|
-
info?: any;
|
|
25
|
-
redirectUri?: string;
|
|
26
|
-
}) => void;
|
|
27
|
-
remove: () => void;
|
|
28
|
-
};
|
|
29
|
-
export { getTokenParams, real_uri, getQuery, getTokenFromCode, getToken, tokenStorage, login };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getCertificateInstalled: () => Promise<any[]>;
|