@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.
Files changed (94) hide show
  1. package/dist/assets/components/button-group/ButtonGroup.style.css +1 -1
  2. package/dist/assets/components/d-flow-node/DFlowNode.style.css +1 -0
  3. package/dist/assets/components/d-layout/DLayout.style.css +1 -1
  4. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
  5. package/dist/assets/components/tab/Tab.style.css +1 -1
  6. package/dist/components/alert/Alert.js +1 -1
  7. package/dist/components/aurora/Aurora.js +1 -1
  8. package/dist/components/context-menu/ContextMenu.js +14 -14
  9. package/dist/components/d-application/DApplication.service.d.ts +5 -1
  10. package/dist/components/d-flow/DFlow.edges.hook.d.ts +0 -1
  11. package/dist/components/d-flow/DFlow.edges.hook.js +63 -63
  12. package/dist/components/d-flow/DFlow.js +146 -146
  13. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +2 -5
  14. package/dist/components/d-flow/DFlow.nodes.hook.js +96 -90
  15. package/dist/components/d-flow/DFlow.service.d.ts +3 -2
  16. package/dist/components/d-flow/DFlow.service.js +102 -71
  17. package/dist/components/d-flow/DFlow.view.d.ts +4 -0
  18. package/dist/components/d-flow/DFlow.view.js +1 -0
  19. package/dist/components/d-flow/DFlowEdge.js +1 -1
  20. package/dist/components/d-flow/index.js +3 -4
  21. package/dist/components/d-flow-file/DFlowTabDefault.d.ts +2 -2
  22. package/dist/components/d-flow-file/DFlowTabDefault.js +4 -4
  23. package/dist/components/d-flow-file/DFlowTabTrigger.js +29 -32
  24. package/dist/components/d-flow-file/DFlowTabs.js +57 -57
  25. package/dist/components/d-flow-folder/DFlowFolder.js +3 -3
  26. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +1 -1
  27. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +94 -59
  28. package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +46 -42
  29. package/dist/components/d-flow-input/DFlowInputDataType.js +2 -2
  30. package/dist/components/d-flow-input/DFlowInputLiteralBadge.js +1 -1
  31. package/dist/components/d-flow-input/DFlowInputNodeBadge.js +11 -10
  32. package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +4 -4
  33. package/dist/components/d-flow-node/DFlowNode.d.ts +10 -0
  34. package/dist/components/d-flow-node/DFlowNode.js +1 -0
  35. package/dist/components/d-flow-node/DFlowNodeDefaultCard.d.ts +5 -0
  36. package/dist/components/d-flow-node/DFlowNodeDefaultCard.js +117 -0
  37. package/dist/components/d-flow-node/DFlowNodeGroupCard.d.ts +5 -0
  38. package/dist/components/d-flow-node/DFlowNodeGroupCard.js +69 -0
  39. package/dist/components/d-flow-node/DFlowNodeTriggerCard.d.ts +5 -0
  40. package/dist/components/d-flow-node/DFlowNodeTriggerCard.js +80 -0
  41. package/dist/components/d-flow-panel/DFlowMiniMap.js +11 -29
  42. package/dist/components/d-flow-panel/DFlowPanelControl.js +32 -53
  43. package/dist/components/d-flow-panel/DFlowPanelLayout.js +6 -6
  44. package/dist/components/d-flow-panel/DFlowPanelSize.js +50 -55
  45. package/dist/components/d-flow-panel/DFlowPanelUpdate.d.ts +6 -0
  46. package/dist/components/d-flow-panel/DFlowPanelUpdate.js +76 -0
  47. package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +1 -1
  48. package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +18 -18
  49. package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +15 -12
  50. package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +2 -2
  51. package/dist/components/d-flow-suggestion/DFlowSuggestionMenuFooter.js +8 -8
  52. package/dist/components/d-flow-suggestion/DFlowSuggestionMenuSearchBar.js +2 -2
  53. package/dist/components/d-flow-type/DFlowType.view.js +5 -5
  54. package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
  55. package/dist/components/d-flow-validation/DNodeValidation.hook.js +38 -38
  56. package/dist/components/d-fullscreen/DFullScreen.js +1 -1
  57. package/dist/components/d-layout/DLayout.d.ts +4 -2
  58. package/dist/components/d-layout/DLayout.js +64 -41
  59. package/dist/components/d-resizable/DResizable.js +1 -1
  60. package/dist/components/d-user/DUser.session.hook.js +1 -1
  61. package/dist/components/d-user/DUserContent.js +46 -79
  62. package/dist/components/dialog/Dialog.js +1 -1
  63. package/dist/components/file-tabs/FileTabs.js +1 -1
  64. package/dist/components/file-tabs/FileTabs.service.d.ts +3 -3
  65. package/dist/components/file-tabs/FileTabs.service.js +26 -33
  66. package/dist/components/file-tabs/FileTabs.view.d.ts +1 -1
  67. package/dist/components/form/CheckboxInput.js +1 -1
  68. package/dist/components/form/Input.js +0 -1
  69. package/dist/components/form/InputContentEditable.hook.js +1 -2
  70. package/dist/components/form/InputMessage.js +1 -1
  71. package/dist/components/form/InputSuggestion.js +1 -1
  72. package/dist/components/form/RadioInput.js +2 -2
  73. package/dist/components/toast/Toast.js +1 -1
  74. package/dist/index.js +161 -161
  75. package/dist/utils/arrayService.d.ts +5 -5
  76. package/dist/utils/index.js +19 -18
  77. package/dist/utils/inspection.d.ts +2 -2
  78. package/dist/utils/nonReactiveArrayService.d.ts +1 -1
  79. package/dist/utils/reactiveArrayService.d.ts +9 -8
  80. package/dist/utils/reactiveArrayService.js +34 -35
  81. package/dist/utils/utils.d.ts +3 -1
  82. package/dist/utils/utils.js +47 -29
  83. package/dist/utils/view.d.ts +8 -0
  84. package/dist/utils/view.js +28 -0
  85. package/package.json +26 -26
  86. package/dist/assets/components/d-flow-function/DFlowFunctionDefaultCard.style.css +0 -1
  87. package/dist/components/d-flow-function/DFlowFunctionDefaultCard.d.ts +0 -15
  88. package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +0 -117
  89. package/dist/components/d-flow-function/DFlowFunctionGroupCard.d.ts +0 -13
  90. package/dist/components/d-flow-function/DFlowFunctionGroupCard.js +0 -68
  91. package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.d.ts +0 -10
  92. package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +0 -43
  93. package/dist/components/d-flow-function/DFlowFunctionTriggerCard.d.ts +0 -9
  94. 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:.35rem;gap:.35rem}.button-group{background:#030014;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem}.button-group .button{display:inline-flex;height:100%}
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-layout__left{border-right:1px solid rgba(255,255,255,.1)}.d-layout__right{border-left:1px solid rgba(255,255,255,.1)}.d-layout__top{border-bottom:1px solid rgba(255,255,255,.1)}.d-layout__bottom{border-top:1px solid rgba(255,255,255,.1)}.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
+ .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:.35rem;gap:.35rem;display:flex;flex-wrap:nowrap}.segmented-control{background:#030014;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem}.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{border-radius:.65rem;border:none}
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;background:#1c1a2c}.tab__trigger[data-orientation=vertical]:after{border-bottom-right-radius:50rem;border-top-right-radius:50rem;height:35%;width:3px;top:50%;transform:translateY(-50%);left:0}.tab__trigger[data-orientation=horizontal]:after{border-top-left-radius:50rem;border-top-right-radius:50rem;width:10%;min-width:28px;height:3px;bottom:0;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}
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
- export declare abstract class DApplicationService extends ReactiveArrayService<Application> {
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 h, useStore as S } from "../../utils/contextStore.js";
2
- import N from "react";
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 T } from "./DFlow.service.js";
5
- import { DFlowFunctionReactiveService as B } from "../d-flow-function/DFlowFunction.service.js";
6
- import { hashToColor as x } from "./DFlow.util.js";
7
- import { DFlowDataTypeReactiveService as E } from "../d-flow-data-type/DFlowDataType.service.js";
8
- const u = ["rgba(255, 255, 255, 0.25)"], J = (i, M, R) => {
9
- const l = h(T), F = S(T), W = h(B), _ = S(B), O = h(E), w = S(E), n = N.useMemo(() => l.getById(i, {
10
- namespaceId: M,
11
- projectId: R
12
- }), [i, F]);
13
- return N.useMemo(() => {
14
- if (!n) return [];
15
- const d = [], p = /* @__PURE__ */ new Map();
16
- let v = 0;
17
- const b = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), G = (e, o = b) => (o.has(e) || o.set(e, W.getById(e)), o.get(e)), A = (e, o = D) => (o.has(e) || o.set(e, O.getDataType(e)), o.get(e)), f = (e, o, g, c = 0, m = b, y = D) => {
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
- const t = `${e.id}-${v++}`;
20
- if (v == 1 && d.push({
21
- id: `trigger-${t}-next`,
22
- source: n.id,
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: u[c % u.length],
26
+ color: "#ffffff",
26
27
  type: "default",
27
28
  flowId: i,
28
- parentNodeId: o?.id
29
+ parentNodeId: r?.id
29
30
  },
30
31
  deletable: !1,
31
32
  selectable: !1
32
- }), g) {
33
- const a = p.get(g) ?? [];
34
- a.length > 0 ? a.forEach((r, $) => d.push({
35
- id: `${r}-${t}-next-${$}`,
36
- source: r,
37
- target: t,
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: u[c % u.length],
40
+ color: "#ffffff",
40
41
  type: "default",
41
42
  flowId: i,
42
- parentNodeId: o?.id
43
+ parentNodeId: r?.id
43
44
  },
44
45
  deletable: !1,
45
46
  selectable: !1
46
- })) : d.push({
47
- id: `${g}-${t}-next`,
48
- source: g,
49
- target: t,
47
+ })) : o.push({
48
+ id: `${r.id}-${e.id}-next`,
49
+ source: r.id,
50
+ target: e.id,
50
51
  data: {
51
- color: u[c % u.length],
52
+ color: "#ffffff",
52
53
  type: "default",
53
54
  flowId: i,
54
- parentNodeId: o?.id
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 r = a?.value, $ = G(e.functionDefinition?.id, m)?.parameterDefinitions?.find((s) => s.id === a?.id), I = $?.dataTypeIdentifier, H = I ? A(I, y) : void 0;
62
- if (r) {
63
- if (H?.variant === "NODE") {
64
- if (r && r.__typename === "NodeFunctionIdWrapper") {
65
- const s = `${t}-group-${v++}`;
66
- d.push({
67
- id: `${t}-${s}-param-${a.id}`,
68
- source: t,
69
- target: s,
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: $?.names[0]?.content ?? a.id,
74
+ label: n?.names[0]?.content ?? a.id,
74
75
  data: {
75
- color: x(r?.id || ""),
76
+ color: b(t?.id || ""),
76
77
  type: "group",
77
78
  flowId: i,
78
- parentNodeId: o?.id
79
+ parentNodeId: r?.id
79
80
  }
80
- }), (p.get(t) ?? (p.set(t, []), p.get(t))).push(s), f(l.getNodeById(i, r.id), e, void 0, c + 1, m, y);
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 (r && r.__typename === "NodeFunctionIdWrapper") {
83
- const s = f(l.getNodeById(i, r.id), e, void 0, c + 1, m, y);
84
- d.push({
85
- id: `${s}-${t}-param-${a.id}`,
86
- source: s,
87
- target: t,
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: x(r?.id || ""),
94
+ color: b(t?.id || ""),
94
95
  type: "parameter",
95
96
  flowId: i,
96
- parentNodeId: o?.id
97
+ parentNodeId: r?.id
97
98
  }
98
99
  });
99
100
  }
100
101
  }
101
- }), e.nextNodeId && f(l.getNodeById(n.id, e.nextNodeId), e, t, c, m, y), t;
102
+ }), e.nextNodeId && l(f.getNodeById(s.id, e.nextNodeId), e), e.id;
102
103
  };
103
- return n.startingNodeId && f(l.getNodeById(n.id, n.startingNodeId), void 0, void 0, 0, b, D), d;
104
- }, [n, F, _, w]);
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
- u as FLOW_EDGE_RAINBOW,
108
- J as useFlowEdges
108
+ H as useFlowEdges
109
109
  };