@code0-tech/pictor 0.0.0-mvp.33 → 0.0.0-mvp.35
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/button-group/ButtonGroup.style.css +1 -1
- package/dist/assets/components/d-flow-node/DFlowNode.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
- package/dist/assets/components/tab/Tab.style.css +1 -1
- package/dist/components/alert/Alert.js +1 -1
- package/dist/components/aurora/Aurora.js +1 -1
- package/dist/components/context-menu/ContextMenu.js +14 -14
- package/dist/components/d-application/DApplication.service.d.ts +5 -1
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +0 -1
- package/dist/components/d-flow/DFlow.edges.hook.js +63 -63
- package/dist/components/d-flow/DFlow.js +146 -146
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +2 -5
- package/dist/components/d-flow/DFlow.nodes.hook.js +96 -90
- package/dist/components/d-flow/DFlow.service.d.ts +3 -2
- package/dist/components/d-flow/DFlow.service.js +102 -71
- package/dist/components/d-flow/DFlow.view.d.ts +4 -0
- package/dist/components/d-flow/DFlow.view.js +1 -0
- package/dist/components/d-flow/DFlowEdge.js +1 -1
- package/dist/components/d-flow/index.js +3 -4
- package/dist/components/d-flow-file/DFlowTabDefault.d.ts +2 -2
- package/dist/components/d-flow-file/DFlowTabDefault.js +4 -4
- package/dist/components/d-flow-file/DFlowTabTrigger.js +29 -32
- package/dist/components/d-flow-file/DFlowTabs.js +57 -57
- package/dist/components/d-flow-folder/DFlowFolder.js +3 -3
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +1 -1
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +94 -59
- package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +46 -42
- package/dist/components/d-flow-input/DFlowInputDataType.js +2 -2
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.js +1 -1
- package/dist/components/d-flow-input/DFlowInputNodeBadge.js +11 -10
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +4 -4
- package/dist/components/d-flow-node/DFlowNode.d.ts +10 -0
- package/dist/components/d-flow-node/DFlowNode.js +1 -0
- package/dist/components/d-flow-node/DFlowNodeDefaultCard.d.ts +5 -0
- package/dist/components/d-flow-node/DFlowNodeDefaultCard.js +117 -0
- package/dist/components/d-flow-node/DFlowNodeGroupCard.d.ts +5 -0
- package/dist/components/d-flow-node/DFlowNodeGroupCard.js +69 -0
- package/dist/components/d-flow-node/DFlowNodeTriggerCard.d.ts +5 -0
- package/dist/components/d-flow-node/DFlowNodeTriggerCard.js +80 -0
- package/dist/components/d-flow-panel/DFlowMiniMap.js +11 -29
- package/dist/components/d-flow-panel/DFlowPanelControl.js +32 -53
- package/dist/components/d-flow-panel/DFlowPanelLayout.js +6 -6
- package/dist/components/d-flow-panel/DFlowPanelSize.js +50 -55
- package/dist/components/d-flow-panel/DFlowPanelUpdate.d.ts +6 -0
- package/dist/components/d-flow-panel/DFlowPanelUpdate.js +76 -0
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +18 -18
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +15 -12
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +2 -2
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenuFooter.js +8 -8
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenuSearchBar.js +2 -2
- package/dist/components/d-flow-type/DFlowType.view.js +5 -5
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +38 -38
- package/dist/components/d-fullscreen/DFullScreen.js +1 -1
- package/dist/components/d-layout/DLayout.d.ts +4 -2
- package/dist/components/d-layout/DLayout.js +64 -41
- package/dist/components/d-resizable/DResizable.js +1 -1
- package/dist/components/d-user/DUser.session.hook.js +1 -1
- package/dist/components/d-user/DUserContent.js +46 -79
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/file-tabs/FileTabs.js +1 -1
- package/dist/components/file-tabs/FileTabs.service.d.ts +3 -3
- package/dist/components/file-tabs/FileTabs.service.js +26 -33
- package/dist/components/file-tabs/FileTabs.view.d.ts +1 -1
- package/dist/components/form/CheckboxInput.js +1 -1
- package/dist/components/form/Input.js +0 -1
- package/dist/components/form/InputContentEditable.hook.js +1 -2
- package/dist/components/form/InputMessage.js +1 -1
- package/dist/components/form/InputSuggestion.js +1 -1
- package/dist/components/form/RadioInput.js +2 -2
- package/dist/components/toast/Toast.js +1 -1
- package/dist/index.js +161 -161
- package/dist/utils/arrayService.d.ts +5 -5
- package/dist/utils/index.js +19 -18
- package/dist/utils/inspection.d.ts +2 -2
- package/dist/utils/nonReactiveArrayService.d.ts +1 -1
- package/dist/utils/reactiveArrayService.d.ts +9 -8
- package/dist/utils/reactiveArrayService.js +34 -35
- package/dist/utils/utils.d.ts +3 -1
- package/dist/utils/utils.js +47 -29
- package/dist/utils/view.d.ts +8 -0
- package/dist/utils/view.js +28 -0
- package/package.json +26 -26
- package/dist/assets/components/d-flow-function/DFlowFunctionDefaultCard.style.css +0 -1
- package/dist/components/d-flow-function/DFlowFunctionDefaultCard.d.ts +0 -15
- package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +0 -117
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.d.ts +0 -13
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.js +0 -68
- package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.d.ts +0 -10
- package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +0 -43
- package/dist/components/d-flow-function/DFlowFunctionTriggerCard.d.ts +0 -9
- package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +0 -78
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-group{border:none;width:fit-content;background:transparent;position:relative;display:flex;padding:.
|
|
1
|
+
.button-group{border:none;width:fit-content;background:transparent;position:relative;display:flex;padding:.175rem;gap:.35rem}.button-group{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;border-width:0}.button-group .button{display:inline-flex;height:100%;border-radius:.825rem}.button-group__first,.button-group__item{position:relative}.button-group__first:after,.button-group__item:after{content:"";position:absolute;top:25%;bottom:0;right:-.175rem;height:50%;width:1px;background:#ffffff1a}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-flow-node__handle{border:none!important;padding:1px;z-index:-1;opacity:0}.d-flow-node__inspection{top:0;transform:translateY(-50%);padding:.35rem}.d-flow-node__inspection{background:#030014;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;position:absolute}.d-flow-node--active{box-shadow:0 0 0 1px #70ffb280}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.d-layout{position:relative;width:100%;height:100%;overflow:hidden;display:flex}.d-layout__inner{display:flex;flex-direction:column;width:100%;height:100%}.d-layout__top,.d-layout__bottom{flex:0 0 auto}.d-layout__middle{display:flex;flex:1 1 auto;min-height:0;width:100%}.d-
|
|
1
|
+
.d-layout{position:relative;width:100%;height:100%;overflow:hidden;display:flex}.d-layout__inner{display:flex;flex-direction:column;width:100%;height:100%}.d-layout__top,.d-layout__bottom{flex:0 0 auto}.d-layout__middle{display:flex;flex:1 1 auto;min-height:0;height:100%;width:100%}.d-layout__splitter{background:#ffffff1a;position:relative;align-self:stretch}.d-layout__splitter[aria-orientation=vertical]{width:1px;height:auto}.d-layout__splitter[aria-orientation=horizontal]{width:100%;height:1px}.d-layout__left,.d-layout__right{flex:0 0 auto}.d-layout__content{flex:1 1 auto;min-width:0;min-height:0;overflow:auto}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.segmented-control{padding:.
|
|
1
|
+
.segmented-control{padding:.175rem;gap:.35rem;display:flex;flex-wrap:nowrap}.segmented-control{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;border-width:0}.segmented-control__item{cursor:pointer;padding:.35rem .7rem}.segmented-control__item[data-state=off]{background:transparent;opacity:.6666666666}.segmented-control__item{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box}.segmented-control__item:disabled,.segmented-control__item[data-disabled],.segmented-control__item[aria-disabled=true],.segmented-control__item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.segmented-control__item{background:#353343;border-radius:.825rem;border:none}.segmented-control__item:disabled{background:transparent}.segmented-control__item:after{content:"";position:absolute;top:25%;bottom:0;right:-.175rem;height:50%;width:1px;background:#ffffff1a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tab[data-orientation=vertical]{display:flex}.tab__list{display:flex;gap:.7rem}.tab__list[data-orientation=vertical]{flex-direction:column}.tab__trigger{background:transparent;border:none;margin:0;position:relative;box-sizing:border-box;opacity:.5;transition:all ease-in-out .2s}.tab__trigger:after{content:"";position:absolute;background:transparent;
|
|
1
|
+
.tab[data-orientation=vertical]{display:flex}.tab[data-orientation=horizontal]{padding-bottom:.475rem}.tab__list{display:flex;gap:.7rem}.tab__list[data-orientation=horizontal]{align-items:end}.tab__list[data-orientation=vertical]{flex-direction:column}.tab__trigger{background:transparent;border:none;margin:0;position:relative;box-sizing:border-box;opacity:.5;transition:all ease-in-out .2s}.tab__trigger[data-orientation=horizontal]:after{content:"";position:absolute;background:transparent;border-top-left-radius:50rem;border-top-right-radius:50rem;width:35%;min-width:28px;height:2px;bottom:-.475rem;left:50%;transform:translate(-50%)}.tab__trigger[aria-selected=true][data-orientation=vertical],.tab__trigger[aria-selected=true][data-orientation=horizontal]{opacity:1}.tab__trigger[aria-selected=true][data-orientation=vertical]:after,.tab__trigger[aria-selected=true][data-orientation=horizontal]:after{background:#70ffb2}
|
|
@@ -16,7 +16,7 @@ const k = (n) => {
|
|
|
16
16
|
} = n;
|
|
17
17
|
r = d, i = f === void 0 ? "secondary" : f;
|
|
18
18
|
let s;
|
|
19
|
-
e[5] === Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
19
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
20
20
|
primary: /* @__PURE__ */ t(a, { size: 18 }),
|
|
21
21
|
secondary: /* @__PURE__ */ t(a, { size: 18 }),
|
|
22
22
|
info: /* @__PURE__ */ t(u, { size: 18 }),
|
|
@@ -14,7 +14,7 @@ const k = (i) => {
|
|
|
14
14
|
a[4] !== r || a[5] !== c ? (s = ["aurora-background", c, r].filter(Boolean), a[4] = r, a[5] = c, a[6] = s) : s = a[6];
|
|
15
15
|
const n = s.join(" ");
|
|
16
16
|
let t;
|
|
17
|
-
a[7] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ d("div", { className: "aurora-background__overlay", children: /* @__PURE__ */ d("div", { className: "aurora-background__aurora" }) }), a[7] = t) : t = a[7];
|
|
17
|
+
a[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ d("div", { className: "aurora-background__overlay", children: /* @__PURE__ */ d("div", { className: "aurora-background__aurora" }) }), a[7] = t) : t = a[7];
|
|
18
18
|
let l;
|
|
19
19
|
return a[8] !== o || a[9] !== n ? (l = /* @__PURE__ */ d("div", { className: n, ...o, children: t }), a[8] = o, a[9] = n, a[10] = l) : l = a[10], l;
|
|
20
20
|
};
|
|
@@ -37,23 +37,23 @@ const U = (t) => {
|
|
|
37
37
|
e[0] !== t || e[1] !== c ? (n = i(c, t), e[0] = t, e[1] = c, e[2] = n) : n = e[2];
|
|
38
38
|
const C = n;
|
|
39
39
|
let s;
|
|
40
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
40
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
41
41
|
borderWidth: "2px"
|
|
42
42
|
}, e[3] = s) : s = e[3];
|
|
43
43
|
let u;
|
|
44
44
|
e[4] !== t.children ? (u = /* @__PURE__ */ o($, { paddingSize: "xxs", mt: -0.35, mx: -0.35, style: s, children: t.children }), e[4] = t.children, e[5] = u) : u = e[5];
|
|
45
45
|
let f;
|
|
46
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
46
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
47
47
|
gap: ".35rem"
|
|
48
48
|
}, e[6] = f) : f = e[6];
|
|
49
49
|
let x;
|
|
50
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
50
|
+
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
51
51
|
gap: "0.35rem"
|
|
52
52
|
}, e[7] = x) : x = e[7];
|
|
53
53
|
let _;
|
|
54
|
-
e[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ o(y, { border: !0, children: /* @__PURE__ */ o(z, { size: 12 }) }), e[8] = _) : _ = e[8];
|
|
54
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ o(y, { border: !0, children: /* @__PURE__ */ o(z, { size: 12 }) }), e[8] = _) : _ = e[8];
|
|
55
55
|
let d, h;
|
|
56
|
-
e[9] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(S, { align: "center", style: x, children: [
|
|
56
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(S, { align: "center", style: x, children: [
|
|
57
57
|
/* @__PURE__ */ a(S, { children: [
|
|
58
58
|
_,
|
|
59
59
|
/* @__PURE__ */ o(y, { border: !0, children: /* @__PURE__ */ o(w, { size: 12 }) })
|
|
@@ -61,11 +61,11 @@ const U = (t) => {
|
|
|
61
61
|
"move"
|
|
62
62
|
] }), d = /* @__PURE__ */ o(A, { spacing: "xxs" }), e[9] = d, e[10] = h) : (d = e[9], h = e[10]);
|
|
63
63
|
let b;
|
|
64
|
-
e[11] === Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
64
|
+
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
65
65
|
gap: ".35rem"
|
|
66
66
|
}, e[11] = b) : b = e[11];
|
|
67
67
|
let g;
|
|
68
|
-
e[12] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ o(T, { children: /* @__PURE__ */ a(S, { style: f, children: [
|
|
68
|
+
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ o(T, { children: /* @__PURE__ */ a(S, { style: f, children: [
|
|
69
69
|
h,
|
|
70
70
|
d,
|
|
71
71
|
/* @__PURE__ */ a(S, { align: "center", style: b, children: [
|
|
@@ -119,23 +119,23 @@ const U = (t) => {
|
|
|
119
119
|
e[0] !== t || e[1] !== l ? (c = i(l, t), e[0] = t, e[1] = l, e[2] = c) : c = e[2];
|
|
120
120
|
const n = c;
|
|
121
121
|
let C;
|
|
122
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (C = {
|
|
122
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = {
|
|
123
123
|
borderWidth: "2px"
|
|
124
124
|
}, e[3] = C) : C = e[3];
|
|
125
125
|
let s;
|
|
126
126
|
e[4] !== t.children ? (s = /* @__PURE__ */ o($, { paddingSize: "xxs", mt: -0.35, mx: -0.35, style: C, children: t.children }), e[4] = t.children, e[5] = s) : s = e[5];
|
|
127
127
|
let u;
|
|
128
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
128
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
129
129
|
gap: ".35rem"
|
|
130
130
|
}, e[6] = u) : u = e[6];
|
|
131
131
|
let f;
|
|
132
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
132
|
+
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
133
133
|
gap: "0.35rem"
|
|
134
134
|
}, e[7] = f) : f = e[7];
|
|
135
135
|
let x;
|
|
136
|
-
e[8] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ o(y, { border: !0, children: /* @__PURE__ */ o(z, { size: 12 }) }), e[8] = x) : x = e[8];
|
|
136
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ o(y, { border: !0, children: /* @__PURE__ */ o(z, { size: 12 }) }), e[8] = x) : x = e[8];
|
|
137
137
|
let _, d;
|
|
138
|
-
e[9] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ a(S, { align: "center", style: f, children: [
|
|
138
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ a(S, { align: "center", style: f, children: [
|
|
139
139
|
/* @__PURE__ */ a(S, { children: [
|
|
140
140
|
x,
|
|
141
141
|
/* @__PURE__ */ o(y, { border: !0, children: /* @__PURE__ */ o(w, { size: 12 }) })
|
|
@@ -143,11 +143,11 @@ const U = (t) => {
|
|
|
143
143
|
"move"
|
|
144
144
|
] }), d = /* @__PURE__ */ o(A, { spacing: "xxs" }), e[9] = _, e[10] = d) : (_ = e[9], d = e[10]);
|
|
145
145
|
let h;
|
|
146
|
-
e[11] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
146
|
+
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
147
147
|
gap: ".35rem"
|
|
148
148
|
}, e[11] = h) : h = e[11];
|
|
149
149
|
let b;
|
|
150
|
-
e[12] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ o(T, { children: /* @__PURE__ */ a(S, { style: u, children: [
|
|
150
|
+
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ o(T, { children: /* @__PURE__ */ a(S, { style: u, children: [
|
|
151
151
|
_,
|
|
152
152
|
d,
|
|
153
153
|
/* @__PURE__ */ a(S, { align: "center", style: h, children: [
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ReactiveArrayService } from '../../utils';
|
|
2
2
|
import { Application, ApplicationSettingsUpdateInput, ApplicationSettingsUpdatePayload } from '@code0-tech/sagittarius-graphql-types';
|
|
3
|
-
|
|
3
|
+
import { Payload } from '../../utils/view';
|
|
4
|
+
interface App extends Payload, Application {
|
|
5
|
+
}
|
|
6
|
+
export declare abstract class DApplicationService extends ReactiveArrayService<App> {
|
|
4
7
|
abstract settingsUpdate(payload: ApplicationSettingsUpdateInput): Promise<ApplicationSettingsUpdatePayload | undefined>;
|
|
5
8
|
}
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Edge } from '@xyflow/react';
|
|
2
2
|
import { Flow, Namespace, NamespaceProject } from '@code0-tech/sagittarius-graphql-types';
|
|
3
3
|
import { DFlowEdgeDataProps } from './DFlowEdge';
|
|
4
|
-
export declare const FLOW_EDGE_RAINBOW: string[];
|
|
5
4
|
export declare const useFlowEdges: (flowId: Flow["id"], namespaceId?: Namespace["id"], projectId?: NamespaceProject["id"]) => Edge<DFlowEdgeDataProps>[];
|
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
import { useService as
|
|
2
|
-
import
|
|
1
|
+
import { useService as u, useStore as p } from "../../utils/contextStore.js";
|
|
2
|
+
import $ from "react";
|
|
3
3
|
import "merge-props";
|
|
4
|
-
import { DFlowReactiveService as
|
|
5
|
-
import { DFlowFunctionReactiveService as
|
|
6
|
-
import { hashToColor as
|
|
7
|
-
import { DFlowDataTypeReactiveService as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
namespaceId:
|
|
11
|
-
projectId:
|
|
12
|
-
}), [i,
|
|
13
|
-
return
|
|
14
|
-
if (!
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
4
|
+
import { DFlowReactiveService as h } from "./DFlow.service.js";
|
|
5
|
+
import { DFlowFunctionReactiveService as I } from "../d-flow-function/DFlowFunction.service.js";
|
|
6
|
+
import { hashToColor as b } from "./DFlow.util.js";
|
|
7
|
+
import { DFlowDataTypeReactiveService as D } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
8
|
+
const H = (i, S, N) => {
|
|
9
|
+
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
|
+
namespaceId: S,
|
|
11
|
+
projectId: N
|
|
12
|
+
}), [i, g]);
|
|
13
|
+
return $.useMemo(() => {
|
|
14
|
+
if (!s) return [];
|
|
15
|
+
if (m.length <= 0) return [];
|
|
16
|
+
if (y.length <= 0) return [];
|
|
17
|
+
const o = [], c = /* @__PURE__ */ new Map();
|
|
18
|
+
let x = 0;
|
|
19
|
+
const l = (e, r, B = !1) => {
|
|
18
20
|
if (!e) return "";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
target: t,
|
|
21
|
+
if (e.id == s.startingNodeId && o.push({
|
|
22
|
+
id: `trigger-${e.id}-next`,
|
|
23
|
+
source: s.id,
|
|
24
|
+
target: e.id,
|
|
24
25
|
data: {
|
|
25
|
-
color:
|
|
26
|
+
color: "#ffffff",
|
|
26
27
|
type: "default",
|
|
27
28
|
flowId: i,
|
|
28
|
-
parentNodeId:
|
|
29
|
+
parentNodeId: r?.id
|
|
29
30
|
},
|
|
30
31
|
deletable: !1,
|
|
31
32
|
selectable: !1
|
|
32
|
-
}),
|
|
33
|
-
const a =
|
|
34
|
-
a.length > 0 ? a.forEach((
|
|
35
|
-
id: `${
|
|
36
|
-
source:
|
|
37
|
-
target:
|
|
33
|
+
}), r?.id && !B) {
|
|
34
|
+
const a = c.get(r.id) ?? [];
|
|
35
|
+
a.length > 0 ? a.forEach((t, n) => o.push({
|
|
36
|
+
id: `${t}-${e.id}-next-${n}`,
|
|
37
|
+
source: t,
|
|
38
|
+
target: e.id,
|
|
38
39
|
data: {
|
|
39
|
-
color:
|
|
40
|
+
color: "#ffffff",
|
|
40
41
|
type: "default",
|
|
41
42
|
flowId: i,
|
|
42
|
-
parentNodeId:
|
|
43
|
+
parentNodeId: r?.id
|
|
43
44
|
},
|
|
44
45
|
deletable: !1,
|
|
45
46
|
selectable: !1
|
|
46
|
-
})) :
|
|
47
|
-
id: `${
|
|
48
|
-
source:
|
|
49
|
-
target:
|
|
47
|
+
})) : o.push({
|
|
48
|
+
id: `${r.id}-${e.id}-next`,
|
|
49
|
+
source: r.id,
|
|
50
|
+
target: e.id,
|
|
50
51
|
data: {
|
|
51
|
-
color:
|
|
52
|
+
color: "#ffffff",
|
|
52
53
|
type: "default",
|
|
53
54
|
flowId: i,
|
|
54
|
-
parentNodeId:
|
|
55
|
+
parentNodeId: r.id
|
|
55
56
|
},
|
|
56
57
|
deletable: !1,
|
|
57
58
|
selectable: !1
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
return e.parameters?.nodes?.forEach((a) => {
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
if (
|
|
64
|
-
if (
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
id: `${
|
|
68
|
-
source:
|
|
69
|
-
target:
|
|
62
|
+
const t = a?.value, n = F.getById(e.functionDefinition?.id)?.parameterDefinitions?.find((d) => d.id === a?.parameterDefinition?.id), v = n?.dataTypeIdentifier, E = v ? T.getDataType(v) : void 0;
|
|
63
|
+
if (t) {
|
|
64
|
+
if (E?.variant === "NODE") {
|
|
65
|
+
if (t && t.__typename === "NodeFunctionIdWrapper") {
|
|
66
|
+
const d = `${e.id}-group-${x++}`;
|
|
67
|
+
o.push({
|
|
68
|
+
id: `${e.id}-${d}-param-${a.id}`,
|
|
69
|
+
source: e.id,
|
|
70
|
+
target: d,
|
|
70
71
|
deletable: !1,
|
|
71
72
|
selectable: !1,
|
|
72
73
|
animated: !0,
|
|
73
|
-
label:
|
|
74
|
+
label: n?.names[0]?.content ?? a.id,
|
|
74
75
|
data: {
|
|
75
|
-
color:
|
|
76
|
+
color: b(t?.id || ""),
|
|
76
77
|
type: "group",
|
|
77
78
|
flowId: i,
|
|
78
|
-
parentNodeId:
|
|
79
|
+
parentNodeId: r?.id
|
|
79
80
|
}
|
|
80
|
-
}), (
|
|
81
|
+
}), (c.get(e.id) ?? (c.set(e.id, []), c.get(e.id))).push(d), l(f.getNodeById(i, t.id), e, !0);
|
|
81
82
|
}
|
|
82
|
-
} else if (
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
id: `${
|
|
86
|
-
source:
|
|
87
|
-
target:
|
|
83
|
+
} else if (t && t.__typename === "NodeFunctionIdWrapper") {
|
|
84
|
+
const d = l(f.getNodeById(i, t.id), e, !0);
|
|
85
|
+
o.push({
|
|
86
|
+
id: `${d}-${e.id}-param-${a.id}`,
|
|
87
|
+
source: d,
|
|
88
|
+
target: e.id,
|
|
88
89
|
targetHandle: `param-${a.id}`,
|
|
89
90
|
animated: !0,
|
|
90
91
|
deletable: !1,
|
|
91
92
|
selectable: !1,
|
|
92
93
|
data: {
|
|
93
|
-
color:
|
|
94
|
+
color: b(t?.id || ""),
|
|
94
95
|
type: "parameter",
|
|
95
96
|
flowId: i,
|
|
96
|
-
parentNodeId:
|
|
97
|
+
parentNodeId: r?.id
|
|
97
98
|
}
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
}), e.nextNodeId && f
|
|
102
|
+
}), e.nextNodeId && l(f.getNodeById(s.id, e.nextNodeId), e), e.id;
|
|
102
103
|
};
|
|
103
|
-
return
|
|
104
|
-
}, [
|
|
104
|
+
return s.startingNodeId && l(f.getNodeById(s.id, s.startingNodeId), void 0, !1), o;
|
|
105
|
+
}, [s, g, m, y]);
|
|
105
106
|
};
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
-
J as useFlowEdges
|
|
108
|
+
H as useFlowEdges
|
|
109
109
|
};
|