@code0-tech/pictor 0.0.0-mvp.43 → 0.0.0-mvp.45
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/dist/assets/components/avatar/Avatar.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -0
- package/dist/components/avatar/Avatar.js +44 -48
- package/dist/components/d-application/DApplication.service.js +1 -0
- package/dist/components/d-flow/DFlow.edges.hook.js +3 -2
- package/dist/components/d-flow/DFlow.nodes.hook.js +16 -15
- package/dist/components/d-flow/DFlow.service.js +3 -2
- package/dist/components/d-flow-data-type/DFlowDataType.service.js +8 -8
- package/dist/components/d-flow-file/DFlowTabDefault.js +1 -1
- package/dist/components/d-flow-file/DFlowTabTrigger.js +1 -1
- package/dist/components/d-flow-file/DFlowTabs.js +58 -106
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +1 -1
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +52 -50
- package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +43 -38
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +3 -2
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +26 -22
- package/dist/components/d-flow-function/DFlowFunction.service.js +3 -2
- package/dist/components/d-flow-input/DFlowInputDataType.js +15 -14
- package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +3 -2
- package/dist/components/d-flow-input/DFlowInputDefault.js +1 -1
- package/dist/components/d-flow-input/DFlowInputNodeBadge.js +1 -1
- package/dist/components/d-flow-node/DFlowNode.return.hook.js +1 -1
- package/dist/components/d-flow-node/DFlowNodeDefaultCard.js +1 -1
- package/dist/components/d-flow-panel/DFlowExport.js +1 -1
- package/dist/components/d-flow-panel/DFlowPanelControl.js +1 -1
- package/dist/components/d-flow-panel/DFlowPanelUpdate.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +6 -5
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +3 -2
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +1 -1
- package/dist/components/d-flow-type/DFlowType.service.d.ts +3 -3
- package/dist/components/d-flow-type/DFlowType.service.js +3 -2
- package/dist/components/d-flow-type/DFlowType.view.d.ts +4 -1
- package/dist/components/d-flow-type/DFlowType.view.js +16 -10
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
- package/dist/components/d-flow-validation/DFlowValidation.js +3 -2
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +1 -1
- package/dist/components/d-license/DNamespaceLicense.service.js +3 -2
- package/dist/components/d-member/DNamespaceMember.service.js +1 -0
- package/dist/components/d-member/DNamespaceMemberContent.js +3 -2
- package/dist/components/d-member/DNamespaceMemberList.js +5 -4
- package/dist/components/d-namespace/DNamespace.service.js +3 -2
- package/dist/components/d-organization/DOrganization.service.js +3 -2
- package/dist/components/d-organization/DOrganizationList.js +7 -6
- package/dist/components/d-organization/DOrganizatonContent.js +3 -2
- package/dist/components/d-organization/index.js +9 -8
- package/dist/components/d-project/DNamespaceProject.service.js +3 -2
- package/dist/components/d-project/DNamespaceProject.view.d.ts +7 -1
- package/dist/components/d-project/DNamespaceProject.view.js +7 -1
- package/dist/components/d-project/DNamespaceProjectContent.js +3 -2
- package/dist/components/d-project/DNamespaceProjectList.js +3 -2
- package/dist/components/d-project/index.js +10 -9
- package/dist/components/d-role/DNamespaceRole.service.js +3 -2
- package/dist/components/d-role/DNamespaceRoleContent.js +3 -2
- package/dist/components/d-role/DNamespaceRoleList.js +6 -5
- package/dist/components/d-runtime/DRuntimeContent.js +3 -2
- package/dist/components/d-runtime/DRuntimeList.js +3 -2
- package/dist/components/d-user/DUser.service.js +3 -2
- package/dist/components/d-user/DUserContent.js +6 -5
- package/dist/components/d-user/DUserInput.js +3 -2
- package/dist/components/d-user/DUserList.js +5 -4
- package/dist/components/d-user/DUserMenu.js +5 -4
- package/dist/components/d-user/index.js +15 -14
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.js +25 -23
- package/dist/index.js +178 -181
- package/dist/utils/index.js +19 -24
- package/dist/utils/utils.d.ts +3 -18
- package/dist/utils/utils.js +101 -176
- package/package.json +16 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
.avatar{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden}.avatar{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:transparent;box-shadow:none}.avatar--image{padding:0}
|
|
1
|
+
.avatar{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%}.avatar{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:transparent;box-shadow:none}.avatar--image{padding:0}.avatar--identicon>div>div{--color: inherit;background:#201e2c}.avatar--identicon>div>div>span,.avatar--identicon>div>div>p{color:var(--color)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger,.menu__checkbox-item{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.menu__item,.menu__sub-trigger,.menu__checkbox-item{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__item:focus,.menu__sub-trigger:focus,.menu__checkbox-item:focus{outline:none}.menu__item,.menu__sub-trigger,.menu__checkbox-item{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item:disabled,.menu__item[data-disabled],.menu__item[aria-disabled=true],.menu__item--disabled,.menu__sub-trigger:disabled,.menu__sub-trigger[data-disabled],.menu__sub-trigger[aria-disabled=true],.menu__sub-trigger--disabled,.menu__checkbox-item:disabled,.menu__checkbox-item[data-disabled],.menu__checkbox-item[aria-disabled=true],.menu__checkbox-item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger,.menu__checkbox-item{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true],.menu__checkbox-item:focus,.menu__checkbox-item[data-focus=true]{background:#
|
|
1
|
+
.menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger,.menu__checkbox-item{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.menu__item,.menu__sub-trigger,.menu__checkbox-item{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__item:focus,.menu__sub-trigger:focus,.menu__checkbox-item:focus{outline:none}.menu__item,.menu__sub-trigger,.menu__checkbox-item{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item:disabled,.menu__item[data-disabled],.menu__item[aria-disabled=true],.menu__item--disabled,.menu__sub-trigger:disabled,.menu__sub-trigger[data-disabled],.menu__sub-trigger[aria-disabled=true],.menu__sub-trigger--disabled,.menu__checkbox-item:disabled,.menu__checkbox-item[data-disabled],.menu__checkbox-item[aria-disabled=true],.menu__checkbox-item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger,.menu__checkbox-item{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true],.menu__checkbox-item:focus,.menu__checkbox-item[data-focus=true]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.menu__separator{border:none;margin:.35rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.menu__content--primary,.menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--secondary,.menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--tertiary,.menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--success,.menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--warning,.menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--error,.menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--info,.menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}
|
|
@@ -1,58 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as v } from "../../_virtual/compiler-runtime.js";
|
|
3
|
-
import g from "react";
|
|
4
|
-
import { md5 as R } from "js-md5";
|
|
5
3
|
import '../../assets/components/avatar/Avatar.style.css';/* empty css */
|
|
6
|
-
import { mergeCode0Props as
|
|
7
|
-
import
|
|
8
|
-
|
|
4
|
+
import { mergeCode0Props as y } from "../../utils/utils.js";
|
|
5
|
+
import z from "avvvatars-react";
|
|
6
|
+
import { hashToColor as A } from "../d-flow/DFlow.util.js";
|
|
7
|
+
const $ = (m) => {
|
|
9
8
|
const t = v.c(3), {
|
|
10
|
-
src:
|
|
11
|
-
size:
|
|
12
|
-
} =
|
|
9
|
+
src: e,
|
|
10
|
+
size: i
|
|
11
|
+
} = m;
|
|
12
|
+
let r;
|
|
13
|
+
return t[0] !== i || t[1] !== e ? (r = /* @__PURE__ */ d("img", { src: e, width: i, height: i, alt: "Avatar image" }), t[0] = i, t[1] = e, t[2] = r) : r = t[2], r;
|
|
14
|
+
}, x = (m) => {
|
|
15
|
+
const t = v.c(12), {
|
|
16
|
+
identifier: e,
|
|
17
|
+
size: i,
|
|
18
|
+
color: r,
|
|
19
|
+
type: s
|
|
20
|
+
} = m;
|
|
13
21
|
let o;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
n[0] = n[4] = a.slice(0, 5), n[1] = n[3] = a.slice(5, 10), n[2] = a.slice(10, 15);
|
|
29
|
-
const f = e.current.getContext("2d");
|
|
30
|
-
f.imageSmoothingEnabled = !1, f.clearRect(0, 0, e.current.width, e.current.height), n.forEach((m, h) => {
|
|
31
|
-
m.forEach((d, p) => {
|
|
32
|
-
d ? (f.fillStyle = s, f.fillRect(r * h, r * p, r, r)) : (f.fillStyle = "transparent", f.fillRect(r * h, r * p, r, r));
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
return /* @__PURE__ */ u("canvas", { ref: e });
|
|
37
|
-
}, k = (l) => {
|
|
38
|
-
const t = v.c(14);
|
|
39
|
-
let c, e, o, i, r;
|
|
40
|
-
if (t[0] !== l) {
|
|
22
|
+
t[0] !== r || t[1] !== e ? (o = r ?? A(e), t[0] = r, t[1] = e, t[2] = o) : o = t[2];
|
|
23
|
+
let l;
|
|
24
|
+
t[3] !== o ? (l = {
|
|
25
|
+
"--color": o
|
|
26
|
+
}, t[3] = o, t[4] = l) : l = t[4];
|
|
27
|
+
const c = l, n = s ?? "shape";
|
|
28
|
+
let a;
|
|
29
|
+
t[5] !== e || t[6] !== i || t[7] !== n ? (a = /* @__PURE__ */ d(z, { style: n, value: e, size: i }), t[5] = e, t[6] = i, t[7] = n, t[8] = a) : a = t[8];
|
|
30
|
+
let f;
|
|
31
|
+
return t[9] !== c || t[10] !== a ? (f = /* @__PURE__ */ d("div", { style: c, children: a }), t[9] = c, t[10] = a, t[11] = f) : f = t[11], f;
|
|
32
|
+
}, R = (m) => {
|
|
33
|
+
const t = v.c(16);
|
|
34
|
+
let e, i, r, s, o, l;
|
|
35
|
+
if (t[0] !== m) {
|
|
41
36
|
const {
|
|
42
|
-
identifier:
|
|
37
|
+
identifier: a,
|
|
43
38
|
color: f,
|
|
44
|
-
src:
|
|
45
|
-
size:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
src: h,
|
|
40
|
+
size: p,
|
|
41
|
+
type: g,
|
|
42
|
+
...u
|
|
43
|
+
} = m;
|
|
44
|
+
i = a, e = f, s = h, l = g, r = p === void 0 ? 32 : p, o = y(`avatar ${!i && s ? "avatar--image" : "avatar--identicon"}`, u), t[0] = m, t[1] = e, t[2] = i, t[3] = r, t[4] = s, t[5] = o, t[6] = l;
|
|
49
45
|
} else
|
|
50
|
-
|
|
51
|
-
let
|
|
52
|
-
t[
|
|
53
|
-
let
|
|
54
|
-
return t[
|
|
46
|
+
e = t[1], i = t[2], r = t[3], s = t[4], o = t[5], l = t[6];
|
|
47
|
+
let c;
|
|
48
|
+
t[7] !== e || t[8] !== i || t[9] !== r || t[10] !== s || t[11] !== l ? (c = i ? /* @__PURE__ */ d(x, { type: l, color: e, identifier: i, size: r }) : s ? /* @__PURE__ */ d($, { src: s, size: r }) : null, t[7] = e, t[8] = i, t[9] = r, t[10] = s, t[11] = l, t[12] = c) : c = t[12];
|
|
49
|
+
let n;
|
|
50
|
+
return t[13] !== o || t[14] !== c ? (n = /* @__PURE__ */ d("div", { ...o, children: c }), t[13] = o, t[14] = c, t[15] = n) : n = t[15], n;
|
|
55
51
|
};
|
|
56
52
|
export {
|
|
57
|
-
|
|
53
|
+
R as Avatar
|
|
58
54
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useService as u, useStore as p } from "../../utils/contextStore.js";
|
|
2
2
|
import $ from "react";
|
|
3
3
|
import "merge-props";
|
|
4
|
+
import "js-md5";
|
|
4
5
|
import { DFlowReactiveService as h } from "./DFlow.service.js";
|
|
5
6
|
import { DFlowFunctionReactiveService as I } from "../d-flow-function/DFlowFunction.service.js";
|
|
6
7
|
import { hashToColor as b } from "./DFlow.util.js";
|
|
7
8
|
import { DFlowDataTypeReactiveService as D } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
8
|
-
const
|
|
9
|
+
const O = (i, S, N) => {
|
|
9
10
|
const f = u(h), g = p(h), F = u(I), m = p(I), T = u(D), y = p(D), s = $.useMemo(() => f.getById(i, {
|
|
10
11
|
namespaceId: S,
|
|
11
12
|
projectId: N
|
|
@@ -105,5 +106,5 @@ const H = (i, S, N) => {
|
|
|
105
106
|
}, [s, g, m, y]);
|
|
106
107
|
};
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
O as useFlowEdges
|
|
109
110
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useService as S, useStore as x } from "../../utils/contextStore.js";
|
|
2
2
|
import B from "react";
|
|
3
3
|
import "merge-props";
|
|
4
|
+
import "js-md5";
|
|
4
5
|
import { DFlowReactiveService as F } from "./DFlow.service.js";
|
|
5
6
|
import { DFlowFunctionReactiveService as w } from "../d-flow-function/DFlowFunction.service.js";
|
|
6
7
|
import { hashToColor as D } from "./DFlow.util.js";
|
|
7
8
|
import { DFlowDataTypeReactiveService as A } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
8
9
|
const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
9
10
|
if (!y || i.size === 0) return "";
|
|
10
|
-
const
|
|
11
|
+
const p = /[:._\-\/\s]+/, o = y.trim().toLowerCase();
|
|
11
12
|
let n = null, l = -1 / 0;
|
|
12
13
|
for (const [f, N] of i.entries()) {
|
|
13
14
|
const a = f.trim().toLowerCase();
|
|
@@ -17,7 +18,7 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
17
18
|
if (o.startsWith(a)) {
|
|
18
19
|
e = 2e3 + a.length * 2;
|
|
19
20
|
const s = o.charAt(a.length);
|
|
20
|
-
(s === "" ||
|
|
21
|
+
(s === "" || p.test(s)) && (e += 200);
|
|
21
22
|
} else {
|
|
22
23
|
const s = Math.min(o.length, a.length);
|
|
23
24
|
let t = 0;
|
|
@@ -25,24 +26,24 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
25
26
|
t++;
|
|
26
27
|
if (t > 0) {
|
|
27
28
|
e = 1e3 + t;
|
|
28
|
-
const
|
|
29
|
-
(
|
|
29
|
+
const m = o.charAt(t), v = a.charAt(t);
|
|
30
|
+
(m === "" || p.test(m) || v === "" || p.test(v)) && (e += 50);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
e > l ? (l = e, n = f) : (e === l && n !== null && f.length > n.length || e === l && n === null) && (n = f);
|
|
33
34
|
}
|
|
34
35
|
return n !== null ? i.get(n) : "";
|
|
35
|
-
},
|
|
36
|
+
}, j = (i, y, p) => {
|
|
36
37
|
const o = S(F), n = x(F), l = S(w), f = x(w), N = S(A), a = x(A), e = B.useMemo(() => o.getById(i, {
|
|
37
38
|
namespaceId: y,
|
|
38
|
-
projectId:
|
|
39
|
+
projectId: p
|
|
39
40
|
}), [i, n]);
|
|
40
41
|
return B.useMemo(() => {
|
|
41
42
|
if (!e) return [];
|
|
42
43
|
if (f.length <= 0) return [];
|
|
43
44
|
if (a.length <= 0) return [];
|
|
44
45
|
const s = [], t = /* @__PURE__ */ new Set();
|
|
45
|
-
let
|
|
46
|
+
let m = 0, v = 0;
|
|
46
47
|
s.push({
|
|
47
48
|
id: `${e.id}`,
|
|
48
49
|
type: "trigger",
|
|
@@ -75,17 +76,17 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
75
76
|
isParameter: C,
|
|
76
77
|
flowId: i,
|
|
77
78
|
parentNodeId: C ? M : void 0,
|
|
78
|
-
index: ++
|
|
79
|
+
index: ++v,
|
|
79
80
|
color: D(d)
|
|
80
81
|
}
|
|
81
82
|
}));
|
|
82
83
|
const R = r.functionDefinition?.id ? l.getById(r.functionDefinition.id) : void 0;
|
|
83
|
-
if (r.parameters?.nodes?.forEach((
|
|
84
|
-
const h =
|
|
84
|
+
if (r.parameters?.nodes?.forEach((g) => {
|
|
85
|
+
const h = g?.value;
|
|
85
86
|
if (!h || h.__typename !== "NodeFunctionIdWrapper") return;
|
|
86
|
-
const T = R?.parameterDefinitions?.find((c) => c.id ===
|
|
87
|
+
const T = R?.parameterDefinitions?.find((c) => c.id === g?.parameterDefinition?.id);
|
|
87
88
|
if ((T?.dataTypeIdentifier ? N.getDataType(T.dataTypeIdentifier) : void 0)?.variant === "NODE") {
|
|
88
|
-
const c = `${d}-group-${
|
|
89
|
+
const c = `${d}-group-${m++}`;
|
|
89
90
|
t.has(c) || (t.add(c), s.push({
|
|
90
91
|
id: c,
|
|
91
92
|
type: "group",
|
|
@@ -111,8 +112,8 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
111
112
|
c && I(c, !0, d, u);
|
|
112
113
|
}
|
|
113
114
|
}), r.nextNodeId) {
|
|
114
|
-
const
|
|
115
|
-
|
|
115
|
+
const g = o.getNodeById(e.id, r.nextNodeId);
|
|
116
|
+
g && I(g, !1, void 0, u);
|
|
116
117
|
}
|
|
117
118
|
};
|
|
118
119
|
if (e.startingNodeId) {
|
|
@@ -123,5 +124,5 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
123
124
|
}, [e, n, f, a]);
|
|
124
125
|
};
|
|
125
126
|
export {
|
|
126
|
-
|
|
127
|
+
j as useFlowNodes
|
|
127
128
|
};
|
|
@@ -2,8 +2,9 @@ import "../../utils/contextStore.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { ReactiveArrayService as l } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import "js-md5";
|
|
5
6
|
import { View as c } from "../../utils/view.js";
|
|
6
|
-
class
|
|
7
|
+
class x extends l {
|
|
7
8
|
getById(n, i) {
|
|
8
9
|
return this.values(i).find((t) => t.id === n);
|
|
9
10
|
}
|
|
@@ -143,5 +144,5 @@ class v extends l {
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
export {
|
|
146
|
-
|
|
147
|
+
x as DFlowReactiveService
|
|
147
148
|
};
|
|
@@ -2,11 +2,11 @@ import "../../utils/contextStore.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { ReactiveArrayService as c } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import { md5 as g } from "js-md5";
|
|
5
6
|
import { DataTypeView as l } from "./DFlowDataType.view.js";
|
|
6
|
-
import { resolveType as
|
|
7
|
-
import { useValueValidation as
|
|
8
|
-
import { findReturnNode as
|
|
9
|
-
import { md5 as _ } from "js-md5";
|
|
7
|
+
import { resolveType as m } from "../../utils/generics.js";
|
|
8
|
+
import { useValueValidation as v } from "../d-flow-validation/DValueValidation.hook.js";
|
|
9
|
+
import { findReturnNode as _ } from "./rules/DFlowDataTypeReturnTypeRule.js";
|
|
10
10
|
class R extends c {
|
|
11
11
|
getDataType(e, n) {
|
|
12
12
|
if (!e || e.genericKey) return;
|
|
@@ -42,7 +42,7 @@ class R extends c {
|
|
|
42
42
|
}
|
|
43
43
|
}, i);
|
|
44
44
|
}
|
|
45
|
-
const t = this.values(i).filter((u) => e.__typename === "NodeFunctionIdWrapper" && (u.variant != "NODE" || !n) ? !1 :
|
|
45
|
+
const t = this.values(i).filter((u) => e.__typename === "NodeFunctionIdWrapper" && (u.variant != "NODE" || !n) ? !1 : v(e, u, this, n));
|
|
46
46
|
return t[t.length - 1];
|
|
47
47
|
}
|
|
48
48
|
getValueFromType(e, n, i) {
|
|
@@ -135,7 +135,7 @@ class R extends c {
|
|
|
135
135
|
target: p
|
|
136
136
|
};
|
|
137
137
|
if (s && s.variant == "RETURN_TYPE" && t.variant === "NODE") {
|
|
138
|
-
const a =
|
|
138
|
+
const a = _(e, n)?.parameters?.nodes?.[0]?.value;
|
|
139
139
|
return {
|
|
140
140
|
sourceDataTypeIdentifiers: [this.getTypeFromValue(a ?? {
|
|
141
141
|
__typename: "LiteralValue",
|
|
@@ -168,7 +168,7 @@ class R extends c {
|
|
|
168
168
|
dataType: new l({
|
|
169
169
|
...t.json,
|
|
170
170
|
genericKeys: [],
|
|
171
|
-
identifier:
|
|
171
|
+
identifier: g(String(e.value)),
|
|
172
172
|
rules: {
|
|
173
173
|
nodes: r
|
|
174
174
|
}
|
|
@@ -192,7 +192,7 @@ class R extends c {
|
|
|
192
192
|
identifier: t.identifier
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
|
-
return
|
|
195
|
+
return m(y, this);
|
|
196
196
|
}
|
|
197
197
|
hasDataTypes(e, n) {
|
|
198
198
|
return e.every((i) => this.values(n).find((t) => t.id === (i.genericType?.dataType?.id ?? i.dataType?.id)));
|
|
@@ -3,6 +3,7 @@ import r from "react";
|
|
|
3
3
|
import "../../_virtual/compiler-runtime.js";
|
|
4
4
|
import "@radix-ui/react-checkbox";
|
|
5
5
|
import "merge-props";
|
|
6
|
+
import "js-md5";
|
|
6
7
|
import "@tabler/icons-react";
|
|
7
8
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
8
9
|
import "../form/EmailInput.js";
|
|
@@ -18,7 +19,6 @@ import { useForm as M } from "../form/useForm.js";
|
|
|
18
19
|
import { Flex as k } from "../flex/Flex.js";
|
|
19
20
|
import { useService as p, useStore as S } from "../../utils/contextStore.js";
|
|
20
21
|
import { DFlowFunctionReactiveService as g } from "../d-flow-function/DFlowFunction.service.js";
|
|
21
|
-
import "js-md5";
|
|
22
22
|
import "../d-flow/DFlow.js";
|
|
23
23
|
import { DFlowReactiveService as V } from "../d-flow/DFlow.service.js";
|
|
24
24
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
@@ -2,9 +2,9 @@ import { jsxs as V, jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import I from "react";
|
|
3
3
|
import { useService as c } from "../../utils/contextStore.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import "js-md5";
|
|
5
6
|
import "../d-flow/DFlow.js";
|
|
6
7
|
import { DFlowReactiveService as b } from "../d-flow/DFlow.service.js";
|
|
7
|
-
import "js-md5";
|
|
8
8
|
import { DFlowDataTypeReactiveService as h } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
9
9
|
import { Flex as F } from "../flex/Flex.js";
|
|
10
10
|
import { DFlowTypeReactiveService as j } from "../d-flow-type/DFlowType.service.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useService as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as i, Fragment as q, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useService as u, useStore as f } from "../../utils/contextStore.js";
|
|
3
|
+
import o from "react";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import "js-md5";
|
|
5
6
|
import { FileTabsService as S } from "../file-tabs/FileTabs.service.js";
|
|
6
|
-
import { FileTabs as
|
|
7
|
-
import { Menu as
|
|
7
|
+
import { FileTabs as N, FileTabsContent as O, FileTabsList as W, FileTabsTrigger as G } from "../file-tabs/FileTabs.js";
|
|
8
|
+
import { Menu as b, MenuTrigger as y, MenuPortal as C, MenuContent as w, MenuLabel as h, MenuItem as r, MenuSeparator as p } from "../menu/Menu.js";
|
|
8
9
|
import { Button as M } from "../button/Button.js";
|
|
9
|
-
import { IconPlus as
|
|
10
|
-
import { DLayout as
|
|
11
|
-
import { ButtonGroup as
|
|
10
|
+
import { IconPlus as P, IconDotsVertical as V } from "@tabler/icons-react";
|
|
11
|
+
import { DLayout as E } from "../d-layout/DLayout.js";
|
|
12
|
+
import { ButtonGroup as H } from "../button-group/ButtonGroup.js";
|
|
12
13
|
import "../d-flow/DFlow.js";
|
|
13
|
-
import { DFlowReactiveService as
|
|
14
|
-
import "js-md5";
|
|
14
|
+
import { DFlowReactiveService as I } from "../d-flow/DFlow.service.js";
|
|
15
15
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
16
16
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
17
17
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
@@ -19,114 +19,66 @@ import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
|
|
|
19
19
|
import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
|
|
20
20
|
import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
|
|
21
21
|
import "../d-flow-data-type/variants/DFlowDataTypeNodeVariant.js";
|
|
22
|
-
import { DFlowTypeReactiveService as
|
|
23
|
-
|
|
24
|
-
import { Flex as n } from "../flex/Flex.js";
|
|
25
|
-
import { Badge as s } from "../badge/Badge.js";
|
|
26
|
-
import { Spacing as k } from "../spacing/Spacing.js";
|
|
27
|
-
const Ie = (R) => {
|
|
22
|
+
import { DFlowTypeReactiveService as F } from "../d-flow-type/DFlowType.service.js";
|
|
23
|
+
const he = (x) => {
|
|
28
24
|
const {
|
|
29
|
-
flowId:
|
|
30
|
-
namespaceId:
|
|
31
|
-
projectId:
|
|
32
|
-
} =
|
|
33
|
-
namespaceId:
|
|
34
|
-
projectId:
|
|
35
|
-
}), [
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
38
|
-
}, [
|
|
39
|
-
return
|
|
25
|
+
flowId: L,
|
|
26
|
+
namespaceId: B,
|
|
27
|
+
projectId: A
|
|
28
|
+
} = x, t = u(S), c = f(S), D = u(I), k = f(I), z = u(F), R = f(F), a = o.useId(), v = o.useMemo(() => D.getById(L, {
|
|
29
|
+
namespaceId: B,
|
|
30
|
+
projectId: A
|
|
31
|
+
}), [k]), d = o.useMemo(() => z.getById(v?.type?.id), [R, v]), T = o.useMemo(() => c.find((e) => e.active)?.id ?? t.getActiveTab()?.id, [c, t]), n = o.useMemo(() => {
|
|
32
|
+
if (d?.id)
|
|
33
|
+
return t.values().find((e) => e.id === d.id);
|
|
34
|
+
}, [c, d]), g = o.useMemo(() => t.values().filter((e) => e.show), [c, n]), $ = o.useMemo(() => t.values().filter((e) => !e.show && e.id !== n?.id), [c, n]);
|
|
35
|
+
return o.useEffect(() => {
|
|
40
36
|
setTimeout(() => {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
left:
|
|
37
|
+
const l = document.querySelector('[data-id="' + a + '"]').querySelector(".file-tabs__list-content"), m = l.querySelector('[data-value="' + t.getActiveTab()?.id + '"]');
|
|
38
|
+
if (l && m) {
|
|
39
|
+
const j = m.offsetLeft + m.offsetWidth / 2 - l.offsetWidth / 2;
|
|
40
|
+
l.scrollLeft = 0, l.scrollBy({
|
|
41
|
+
left: j,
|
|
46
42
|
behavior: "smooth"
|
|
47
43
|
});
|
|
48
44
|
}
|
|
49
45
|
}, 0);
|
|
50
|
-
}, [
|
|
51
|
-
|
|
52
|
-
}, children: /* @__PURE__ */
|
|
46
|
+
}, [T, a]), /* @__PURE__ */ i(N, { "data-id": a, value: T, onValueChange: (e) => {
|
|
47
|
+
t.activateTab(e);
|
|
48
|
+
}, children: /* @__PURE__ */ i(E, { layoutGap: "0", topContent: /* @__PURE__ */ i(W, { controls: /* @__PURE__ */ s(H, { color: "primary", p: 0, style: {
|
|
53
49
|
boxShadow: "none"
|
|
54
50
|
}, children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, children: r.children }, `menu-${r.id}`))
|
|
71
|
-
] }),
|
|
72
|
-
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ o(n, { style: {
|
|
73
|
-
gap: ".35rem"
|
|
74
|
-
}, children: [
|
|
75
|
-
/* @__PURE__ */ o(n, { align: "center", style: {
|
|
76
|
-
gap: "0.35rem"
|
|
77
|
-
}, children: [
|
|
78
|
-
/* @__PURE__ */ o(n, { children: [
|
|
79
|
-
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(z, { size: 12 }) }),
|
|
80
|
-
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(F, { size: 12 }) })
|
|
81
|
-
] }),
|
|
82
|
-
"move"
|
|
83
|
-
] }),
|
|
84
|
-
/* @__PURE__ */ e(k, { spacing: "xxs" }),
|
|
85
|
-
/* @__PURE__ */ o(n, { align: "center", style: {
|
|
86
|
-
gap: ".35rem"
|
|
87
|
-
}, children: [
|
|
88
|
-
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(L, { size: 12 }) }),
|
|
89
|
-
"select"
|
|
90
|
-
] })
|
|
91
|
-
] }) })
|
|
51
|
+
/* @__PURE__ */ s(b, { children: [
|
|
52
|
+
/* @__PURE__ */ i(y, { asChild: !0, children: /* @__PURE__ */ i(M, { variant: "none", paddingSize: "xxs", color: "primary", children: /* @__PURE__ */ i(P, { size: 12 }) }) }),
|
|
53
|
+
/* @__PURE__ */ i(C, { children: /* @__PURE__ */ s(w, { align: "start", sideOffset: 8, children: [
|
|
54
|
+
/* @__PURE__ */ i(h, { children: "Starting Node" }),
|
|
55
|
+
n && /* @__PURE__ */ i(r, { onSelect: () => t.activateTab(n.id), children: n.children }),
|
|
56
|
+
/* @__PURE__ */ i(p, {}),
|
|
57
|
+
/* @__PURE__ */ i(h, { children: "Opened Nodes" }),
|
|
58
|
+
g.map((e) => /* @__PURE__ */ i(r, { onSelect: () => {
|
|
59
|
+
t.activateTab(e.id);
|
|
60
|
+
}, children: e.children }, `menu-${e.id}`)),
|
|
61
|
+
/* @__PURE__ */ i(p, {}),
|
|
62
|
+
/* @__PURE__ */ i(h, { children: "Available Node" }),
|
|
63
|
+
$.map((e) => /* @__PURE__ */ i(r, { onSelect: () => {
|
|
64
|
+
t.activateTab(e.id);
|
|
65
|
+
}, children: e.children }, `menu-${e.id}`))
|
|
92
66
|
] }) })
|
|
93
67
|
] }),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/* @__PURE__ */ e(l, { onClick: () => i.clearRight(), children: "Close all tabs to right" })
|
|
103
|
-
] }),
|
|
104
|
-
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ o(n, { style: {
|
|
105
|
-
gap: ".35rem"
|
|
106
|
-
}, children: [
|
|
107
|
-
/* @__PURE__ */ o(n, { align: "center", style: {
|
|
108
|
-
gap: "0.35rem"
|
|
109
|
-
}, children: [
|
|
110
|
-
/* @__PURE__ */ o(n, { children: [
|
|
111
|
-
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(z, { size: 12 }) }),
|
|
112
|
-
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(F, { size: 12 }) })
|
|
113
|
-
] }),
|
|
114
|
-
"move"
|
|
115
|
-
] }),
|
|
116
|
-
/* @__PURE__ */ e(k, { spacing: "xxs" }),
|
|
117
|
-
/* @__PURE__ */ o(n, { align: "center", style: {
|
|
118
|
-
gap: ".35rem"
|
|
119
|
-
}, children: [
|
|
120
|
-
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(L, { size: 12 }) }),
|
|
121
|
-
"select"
|
|
122
|
-
] })
|
|
123
|
-
] }) })
|
|
68
|
+
/* @__PURE__ */ s(b, { children: [
|
|
69
|
+
/* @__PURE__ */ i(y, { asChild: !0, children: /* @__PURE__ */ i(M, { variant: "none", paddingSize: "xxs", color: "primary", children: /* @__PURE__ */ i(V, { size: 12 }) }) }),
|
|
70
|
+
/* @__PURE__ */ i(C, { children: /* @__PURE__ */ s(w, { align: "end", sideOffset: 8, children: [
|
|
71
|
+
/* @__PURE__ */ i(r, { onClick: () => t.clearAll(), children: "Close all tabs" }),
|
|
72
|
+
/* @__PURE__ */ i(r, { onClick: () => t.clearWithoutActive(), children: "Close other tabs" }),
|
|
73
|
+
/* @__PURE__ */ i(p, {}),
|
|
74
|
+
/* @__PURE__ */ i(r, { onClick: () => t.clearLeft(), children: "Close all tabs to left" }),
|
|
75
|
+
/* @__PURE__ */ i(r, { onClick: () => t.clearRight(), children: "Close all tabs to right" })
|
|
124
76
|
] }) })
|
|
125
77
|
] })
|
|
126
|
-
] }), children:
|
|
127
|
-
|
|
128
|
-
}, children:
|
|
78
|
+
] }), children: g.map((e, l) => e.show && /* @__PURE__ */ i(G, { closable: e.closeable, value: e.id, onClose: () => {
|
|
79
|
+
t.removeTabById(e.id);
|
|
80
|
+
}, children: e.children }, `trigger-${e.id}`)) }), children: /* @__PURE__ */ i(q, { children: t.values().map((e) => /* @__PURE__ */ i(O, { value: e.id, children: e.content }, `content-${e.id}`)) }) }) });
|
|
129
81
|
};
|
|
130
82
|
export {
|
|
131
|
-
|
|
83
|
+
he as DFlowTabs
|
|
132
84
|
};
|
|
@@ -6,8 +6,8 @@ import { Text as i } from "../text/Text.js";
|
|
|
6
6
|
import { IconChevronRight as b, IconEdit as v, IconTrash as F } from "@tabler/icons-react";
|
|
7
7
|
import { useService as R, useStore as T } from "../../utils/contextStore.js";
|
|
8
8
|
import "merge-props";
|
|
9
|
-
import { DFlowTypeReactiveService as l } from "../d-flow-type/DFlowType.service.js";
|
|
10
9
|
import "js-md5";
|
|
10
|
+
import { DFlowTypeReactiveService as l } from "../d-flow-type/DFlowType.service.js";
|
|
11
11
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
12
12
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
13
13
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|