@code0-tech/pictor 0.0.0-mvp.40 → 0.0.0-mvp.42

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 (56) hide show
  1. package/dist/assets/components/data-table/DataTable.style.css +1 -0
  2. package/dist/assets/components/menu/Menu.style.css +1 -1
  3. package/dist/components/d-flow/DFlow.service.js +80 -100
  4. package/dist/components/d-flow-data-type/DFlowDataType.service.js +6 -7
  5. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +1 -1
  6. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js +15 -15
  7. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +1 -1
  8. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js +17 -17
  9. package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.d.ts +1 -1
  10. package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.js +1 -1
  11. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -1
  12. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +87 -85
  13. package/dist/components/d-flow-data-type/rules/DFlowDataTypeRule.d.ts +2 -1
  14. package/dist/components/d-flow-function/DFlowFunction.input.hook.d.ts +2 -1
  15. package/dist/components/d-flow-function/DFlowFunction.input.hook.js +5 -5
  16. package/dist/components/d-flow-function/DFlowFunction.return.hook.d.ts +2 -1
  17. package/dist/components/d-flow-function/DFlowFunction.return.hook.js +5 -5
  18. package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +1 -1
  19. package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +17 -17
  20. package/dist/components/d-flow-node/DFlowNode.return.hook.d.ts +5 -0
  21. package/dist/components/d-flow-node/DFlowNode.return.hook.js +27 -0
  22. package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +90 -91
  23. package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +1 -1
  24. package/dist/components/d-flow-validation/DNodeValidation.hook.js +33 -33
  25. package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +2 -1
  26. package/dist/components/d-flow-validation/DValueValidation.hook.js +5 -5
  27. package/dist/components/d-project/DNamespaceProject.service.d.ts +2 -1
  28. package/dist/components/data-table/DataTable.d.ts +23 -0
  29. package/dist/components/data-table/DataTable.js +41 -0
  30. package/dist/components/data-table/DataTableColumn.d.ts +6 -0
  31. package/dist/components/data-table/DataTableColumn.js +22 -0
  32. package/dist/components/data-table/DataTableFilterInput.d.ts +18 -0
  33. package/dist/components/data-table/DataTableFilterInput.js +210 -0
  34. package/dist/components/data-table/DataTableFilterSuggestionMenu.d.ts +7 -0
  35. package/dist/components/data-table/DataTableFilterSuggestionMenu.js +53 -0
  36. package/dist/components/data-table/index.d.ts +4 -0
  37. package/dist/components/data-table/index.js +11 -0
  38. package/dist/components/editor/Editor.d.ts +9 -3
  39. package/dist/components/editor/Editor.js +249 -174
  40. package/dist/components/menu/Menu.d.ts +5 -1
  41. package/dist/components/menu/Menu.js +73 -57
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +182 -171
  44. package/dist/node_modules/@lezer/highlight/dist/index.js +132 -169
  45. package/dist/utils/generics.d.ts +2 -1
  46. package/dist/utils/generics.js +84 -80
  47. package/package.json +32 -21
  48. package/dist/node_modules/@codemirror/language/dist/index.js +0 -429
  49. package/dist/node_modules/@codemirror/lint/dist/index.js +0 -515
  50. package/dist/node_modules/@codemirror/state/dist/index.js +0 -2614
  51. package/dist/node_modules/@codemirror/view/dist/index.js +0 -6227
  52. package/dist/node_modules/@lezer/common/dist/index.js +0 -1357
  53. package/dist/node_modules/@marijn/find-cluster-break/src/index.js +0 -69
  54. package/dist/node_modules/crelt/index.js +0 -27
  55. package/dist/node_modules/style-mod/src/style-mod.js +0 -109
  56. package/dist/node_modules/w3c-keyname/index.js +0 -88
@@ -0,0 +1 @@
1
+ .data-table{width:100%;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;border-spacing:0}.data-table__row td{border-bottom:.5px solid rgba(191,191,191,.1);border-top:.5px solid rgba(191,191,191,.1);padding:.7rem .35rem}.data-table__row:hover{background:#191825;cursor:pointer}.data-table__row td:last-child{width:1px;white-space:nowrap}
@@ -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{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{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{outline:none}.menu__item,.menu__sub-trigger{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{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true]{background:#201e2c;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}.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}.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}.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}.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}.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}.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}
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:#201e2c;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}.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}.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}.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}.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}.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}.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}
@@ -1,167 +1,147 @@
1
1
  import "../../utils/contextStore.js";
2
2
  import "react";
3
- import { ReactiveArrayService as N } from "../../utils/reactiveArrayService.js";
3
+ import { ReactiveArrayService as l } from "../../utils/reactiveArrayService.js";
4
4
  import "merge-props";
5
- import { View as u } from "../../utils/view.js";
6
- class h extends N {
7
- getById(d, i) {
8
- return this.values(i).find((n) => n.id === d);
5
+ import { View as c } from "../../utils/view.js";
6
+ class v extends l {
7
+ getById(n, i) {
8
+ return this.values(i).find((t) => t.id === n);
9
9
  }
10
- removeParameterNode(d, i) {
10
+ removeParameterNode(n, i) {
11
11
  if (i?.value?.__typename === "NodeFunctionIdWrapper") {
12
- const n = d?.nodes?.nodes?.find((e) => e?.id === i.value?.id);
13
- if (n) {
14
- d.nodes.nodes = d.nodes.nodes.filter((t) => t?.id !== i.value?.id);
15
- let e = n.nextNodeId;
12
+ const t = n?.nodes?.nodes?.find((e) => e?.id === i.value?.id);
13
+ if (t) {
14
+ n.nodes.nodes = n.nodes.nodes.filter((d) => d?.id !== i.value?.id);
15
+ let e = t.nextNodeId;
16
16
  for (; e; ) {
17
- const t = d.nodes.nodes.find((o) => o?.id === e);
18
- t ? (d.nodes.nodes = d.nodes.nodes.filter((o) => o?.id !== e), e = t.nextNodeId) : e = null;
17
+ const d = n.nodes.nodes.find((o) => o?.id === e);
18
+ d ? (n.nodes.nodes = n.nodes.nodes.filter((o) => o?.id !== e), e = d.nextNodeId) : e = null;
19
19
  }
20
- n.parameters?.nodes?.forEach((t) => {
21
- this.removeParameterNode(d, t);
20
+ t.parameters?.nodes?.forEach((d) => {
21
+ this.removeParameterNode(n, d);
22
22
  });
23
23
  }
24
24
  }
25
25
  }
26
- getLinkedNodesById(d, i) {
27
- const n = this.getNodeById(d, i), e = n ? this.getLinkedNodesById(d, n.nextNodeId) : [], t = [];
28
- return n?.parameters?.nodes?.forEach((o) => {
26
+ getLinkedNodesById(n, i) {
27
+ const t = this.getNodeById(n, i), e = t ? this.getLinkedNodesById(n, t.nextNodeId) : [], d = [];
28
+ return t?.parameters?.nodes?.forEach((o) => {
29
29
  if (o?.value?.__typename === "NodeFunctionIdWrapper") {
30
- const s = this.getNodeById(d, o.value?.id);
31
- s && (t.push(s), t.push(...s ? this.getLinkedNodesById(d, s.nextNodeId) : []));
30
+ const r = this.getNodeById(n, o.value?.id);
31
+ r && (d.push(r), d.push(...r ? this.getLinkedNodesById(n, r.nextNodeId) : []));
32
32
  }
33
- }), [...n ? [n] : [], ...t, ...e];
33
+ }), [...t ? [t] : [], ...d, ...e];
34
34
  }
35
- getNodeById(d, i) {
36
- return this.getById(d)?.nodes?.nodes?.find((n) => n?.id === i);
35
+ getNodeById(n, i) {
36
+ return this.getById(n)?.nodes?.nodes?.find((t) => t?.id === i);
37
37
  }
38
- getPayloadById(d) {
39
- const i = this.getById(d), n = (e) => ({
40
- ...e?.dataType ? {
41
- dataTypeId: e?.dataType?.id
42
- } : {},
43
- ...e?.genericKey ? {
44
- genericKey: e?.genericKey
45
- } : {},
46
- ...e?.genericType ? {
47
- genericType: {
48
- dataTypeId: e?.genericType?.dataType?.id,
49
- genericMappers: e?.genericType?.genericMappers?.map((t) => ({
50
- target: t.target,
51
- sourceDataTypeIdentifiers: t.sourceDataTypeIdentifiers?.map(n) ?? []
52
- })) ?? []
53
- }
54
- } : {}
55
- });
38
+ getPayloadById(n) {
39
+ const i = this.getById(n);
56
40
  return {
57
41
  name: i?.name,
58
42
  type: i?.type?.id,
59
- settings: i?.settings?.nodes?.map((e) => ({
60
- flowSettingIdentifier: e?.flowSettingIdentifier,
61
- value: e?.value
43
+ settings: i?.settings?.nodes?.map((t) => ({
44
+ flowSettingIdentifier: t?.flowSettingIdentifier,
45
+ value: t?.value
62
46
  })) ?? [],
63
- nodes: (i?.nodes?.nodes ?? []).map((e) => ({
64
- id: e?.id,
65
- nextNodeId: e?.nextNodeId,
66
- functionDefinitionId: e?.functionDefinition?.id,
67
- parameters: (e?.parameters?.nodes ?? []).map((t) => {
68
- let o;
69
- switch (t?.value?.__typename) {
47
+ nodes: (i?.nodes?.nodes ?? []).map((t) => ({
48
+ id: t?.id,
49
+ nextNodeId: t?.nextNodeId,
50
+ functionDefinitionId: t?.functionDefinition?.id,
51
+ parameters: (t?.parameters?.nodes ?? []).map((e) => {
52
+ let d;
53
+ switch (e?.value?.__typename) {
70
54
  case "NodeFunctionIdWrapper":
71
- o = {
72
- nodeFunctionId: t.value.id
55
+ d = {
56
+ nodeFunctionId: e.value.id
73
57
  };
74
58
  break;
75
59
  case "LiteralValue":
76
- o = {
77
- literalValue: t.value.value
60
+ d = {
61
+ literalValue: e.value.value
78
62
  };
79
63
  break;
80
64
  case "ReferenceValue": {
81
- const s = t.value;
82
- o = {
65
+ const o = e.value;
66
+ d = {
83
67
  referenceValue: {
84
- dataTypeIdentifier: n(s.dataTypeIdentifier),
85
- depth: s.depth,
86
- node: s.node,
87
- nodeFunctionId: s.nodeFunctionId,
88
- referencePath: s.referencePath ?? [],
89
- scope: s.scope
68
+ nodeFunctionId: o.nodeFunctionId,
69
+ referencePath: o.referencePath ?? []
90
70
  }
91
71
  };
92
72
  break;
93
73
  }
94
74
  default:
95
- o = {
75
+ d = {
96
76
  literalValue: null
97
77
  };
98
78
  }
99
79
  return {
100
- parameterDefinitionId: t?.parameterDefinition?.id,
101
- value: o
80
+ parameterDefinitionId: e?.parameterDefinition?.id,
81
+ value: d
102
82
  };
103
83
  })
104
84
  })),
105
85
  startingNodeId: i?.startingNodeId
106
86
  };
107
87
  }
108
- async deleteNodeById(d, i) {
109
- const n = this.getById(d), e = this.getNodeById(d, i), t = n?.nodes?.nodes?.find((a) => a?.parameters?.nodes?.find((r) => r?.value?.__typename === "NodeFunctionIdWrapper" && r.value?.id === i)), o = n?.nodes?.nodes?.find((a) => a?.nextNodeId === i), s = this.values().findIndex((a) => a.id === d);
110
- if (!(!n || !e)) {
111
- if (n.nodes.nodes = n.nodes.nodes.filter((a) => a?.id !== i), e.parameters?.nodes?.forEach((a) => this.removeParameterNode(n, a)), o ? o.nextNodeId = e.nextNodeId : t || (n.startingNodeId = e.nextNodeId ?? void 0), t) {
112
- const a = t.parameters?.nodes?.find((r) => r?.value?.__typename === "NodeFunctionIdWrapper" && r.value?.id === i);
113
- a && (a.value = void 0);
88
+ async deleteNodeById(n, i) {
89
+ const t = this.getById(n), e = this.getNodeById(n, i), d = t?.nodes?.nodes?.find((s) => s?.parameters?.nodes?.find((a) => a?.value?.__typename === "NodeFunctionIdWrapper" && a.value?.id === i)), o = t?.nodes?.nodes?.find((s) => s?.nextNodeId === i), r = this.values().findIndex((s) => s.id === n);
90
+ if (!(!t || !e)) {
91
+ if (t.nodes.nodes = t.nodes.nodes.filter((s) => s?.id !== i), e.parameters?.nodes?.forEach((s) => this.removeParameterNode(t, s)), o ? o.nextNodeId = e.nextNodeId : d || (t.startingNodeId = e.nextNodeId ?? void 0), d) {
92
+ const s = d.parameters?.nodes?.find((a) => a?.value?.__typename === "NodeFunctionIdWrapper" && a.value?.id === i);
93
+ s && (s.value = void 0);
114
94
  }
115
- n.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(s, new u(n));
95
+ t.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(r, new c(t));
116
96
  }
117
97
  }
118
- async addNextNodeById(d, i, n) {
119
- const e = this.getById(d), t = this.values().findIndex((c) => c.id === d), o = i ? this.getNodeById(d, i) : void 0;
98
+ async addNextNodeById(n, i, t) {
99
+ const e = this.getById(n), d = this.values().findIndex((u) => u.id === n), o = i ? this.getNodeById(n, i) : void 0;
120
100
  if (!e || i && !o) return;
121
- const a = `gid://sagittarius/NodeFunction/${Math.max(0, ...e.nodes?.nodes?.map((c) => Number(c?.id?.match(/NodeFunction\/(\d+)$/)?.[1] ?? 0)) ?? [0]) + 1}`, r = {
122
- ...JSON.parse(JSON.stringify(n)),
123
- id: a
101
+ const s = `gid://sagittarius/NodeFunction/${Math.max(0, ...e.nodes?.nodes?.map((u) => Number(u?.id?.match(/NodeFunction\/(\d+)$/)?.[1] ?? 0)) ?? [0]) + 1}`, a = {
102
+ ...JSON.parse(JSON.stringify(t)),
103
+ id: s
124
104
  };
125
- o && o.nextNodeId ? r.nextNodeId = o.nextNodeId : !o && e.startingNodeId && (r.nextNodeId = e.startingNodeId), e.nodes?.nodes?.push(r), o ? o.nextNodeId = r.id : e.startingNodeId = r.id, e.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(t, new u(e));
105
+ o && o.nextNodeId ? a.nextNodeId = o.nextNodeId : !o && e.startingNodeId && (a.nextNodeId = e.startingNodeId), e.nodes?.nodes?.push(a), o ? o.nextNodeId = a.id : e.startingNodeId = a.id, e.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(d, new c(e));
126
106
  }
127
- async setSettingValue(d, i, n) {
128
- const e = this.getById(d), t = this.values().findIndex((s) => s.id === d);
107
+ async setSettingValue(n, i, t) {
108
+ const e = this.getById(n), d = this.values().findIndex((r) => r.id === n);
129
109
  if (!e) return;
130
110
  e.editedAt = (/* @__PURE__ */ new Date()).toISOString();
131
- const o = e.settings?.nodes?.find((s) => s?.flowSettingIdentifier === i);
111
+ const o = e.settings?.nodes?.find((r) => r?.flowSettingIdentifier === i);
132
112
  if (o)
133
- o.value = n;
113
+ o.value = t;
134
114
  else {
135
- const s = {
115
+ const r = {
136
116
  flowSettingIdentifier: i,
137
117
  value: null
138
118
  };
139
- s.value = n, e.settings.nodes.push(s);
119
+ r.value = t, e.settings.nodes.push(r);
140
120
  }
141
- this.set(t, new u(e));
121
+ this.set(d, new c(e));
142
122
  }
143
- async setParameterValue(d, i, n, e) {
144
- const t = this.getById(d), o = this.values().findIndex((r) => r.id === d);
145
- if (!t) return;
146
- const s = this.getNodeById(d, i);
147
- if (!s) return;
148
- const a = s.parameters?.nodes?.find((r) => r?.id === n);
149
- if (a) {
150
- if (this.removeParameterNode(t, a), e?.__typename === "NodeFunction") {
151
- const r = Math.max(0, ...t.nodes?.nodes?.map((p) => Number(p?.id?.match(/NodeFunction\/(\d+)$/)?.[1] ?? 0)) ?? [0]), c = {
123
+ async setParameterValue(n, i, t, e) {
124
+ const d = this.getById(n), o = this.values().findIndex((a) => a.id === n);
125
+ if (!d) return;
126
+ const r = this.getNodeById(n, i);
127
+ if (!r) return;
128
+ const s = r.parameters?.nodes?.find((a) => a?.id === t);
129
+ if (s) {
130
+ if (this.removeParameterNode(d, s), e?.__typename === "NodeFunction") {
131
+ const a = Math.max(0, ...d.nodes?.nodes?.map((N) => Number(N?.id?.match(/NodeFunction\/(\d+)$/)?.[1] ?? 0)) ?? [0]), u = {
152
132
  ...e,
153
- id: `gid://sagittarius/NodeFunction/${r + 1}`
133
+ id: `gid://sagittarius/NodeFunction/${a + 1}`
154
134
  };
155
- t.nodes?.nodes?.push(c), a.value = {
156
- id: `gid://sagittarius/NodeFunction/${r + 1}`,
135
+ d.nodes?.nodes?.push(u), s.value = {
136
+ id: `gid://sagittarius/NodeFunction/${a + 1}`,
157
137
  __typename: "NodeFunctionIdWrapper"
158
138
  };
159
139
  } else
160
- a.value = e;
161
- t.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(o, new u(t));
140
+ s.value = e;
141
+ d.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(o, new c(d));
162
142
  }
163
143
  }
164
144
  }
165
145
  export {
166
- h as DFlowReactiveService
146
+ v as DFlowReactiveService
167
147
  };
@@ -1,17 +1,17 @@
1
1
  import "../../utils/contextStore.js";
2
2
  import "react";
3
- import { ReactiveArrayService as l } from "../../utils/reactiveArrayService.js";
3
+ import { ReactiveArrayService as c } from "../../utils/reactiveArrayService.js";
4
4
  import "merge-props";
5
- import { DataTypeView as c } from "./DFlowDataType.view.js";
5
+ import { DataTypeView as l } from "./DFlowDataType.view.js";
6
6
  import { resolveType as g } from "../../utils/generics.js";
7
7
  import { useValueValidation as m } from "../d-flow-validation/DValueValidation.hook.js";
8
8
  import { findReturnNode as v } from "./rules/DFlowDataTypeReturnTypeRule.js";
9
9
  import { md5 as _ } from "js-md5";
10
- class F extends l {
10
+ class R extends c {
11
11
  getDataType(e, n) {
12
12
  if (!e || e.genericKey) return;
13
13
  const i = e.dataType ?? e.genericType?.dataType, t = i?.identifier, u = i?.id;
14
- return i?.rules ? new c(i) : this.values().find((y) => y.identifier == t || y.id == u);
14
+ return i?.rules ? new l(i) : this.values().find((y) => y.identifier == t || y.id == u);
15
15
  }
16
16
  getDataTypeFromValue(e, n, i) {
17
17
  if (!e) return;
@@ -108,7 +108,6 @@ class F extends l {
108
108
  }
109
109
  getTypeFromValue(e, n, i) {
110
110
  if (!e) return;
111
- if (e.__typename === "ReferenceValue") return e.dataTypeIdentifier;
112
111
  const t = this.getDataTypeFromValue(e, n, i);
113
112
  if ((t?.genericKeys?.length ?? 0) <= 0 || !t?.genericKeys) return {
114
113
  dataType: {
@@ -166,7 +165,7 @@ class F extends l {
166
165
  }));
167
166
  return {
168
167
  sourceDataTypeIdentifiers: [{
169
- dataType: new c({
168
+ dataType: new l({
170
169
  ...t.json,
171
170
  genericKeys: [],
172
171
  identifier: _(String(e.value)),
@@ -200,5 +199,5 @@ class F extends l {
200
199
  }
201
200
  }
202
201
  export {
203
- F as DFlowDataTypeReactiveService
202
+ R as DFlowDataTypeReactiveService
204
203
  };
@@ -1,5 +1,5 @@
1
1
  import { DFlowDataTypeReactiveService } from '../DFlowDataType.service';
2
2
  import { DataTypeRulesContainsKeyConfig, Flow, GenericMapper, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
3
3
  export declare class DFlowDataTypeContainsKeyRule {
4
- static validate(value: NodeParameterValue, config: DataTypeRulesContainsKeyConfig, generics?: Map<string, GenericMapper>, service?: DFlowDataTypeReactiveService, flow?: Flow): boolean;
4
+ static validate(value: NodeParameterValue, config: DataTypeRulesContainsKeyConfig, generics?: Map<string, GenericMapper>, flow?: Flow, dataTypeService?: DFlowDataTypeReactiveService): boolean;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { genericMapping as T, staticImplements as D } from "./DFlowDataTypeRule.js";
2
- import { useValueValidation as y } from "../../d-flow-validation/DValueValidation.hook.js";
1
+ import { genericMapping as D, staticImplements as T } from "./DFlowDataTypeRule.js";
2
+ import { useValueValidation as m } from "../../d-flow-validation/DValueValidation.hook.js";
3
3
  function A(r, e, t, n) {
4
4
  var i = k(), o = e(function(s) {
5
5
  i.initializeInstanceElements(s, a.elements);
@@ -128,7 +128,7 @@ function I(r) {
128
128
  }, n = 0; n < r.length; n++) {
129
129
  var i, o = r[n];
130
130
  if (o.kind === "method" && (i = e.find(t)))
131
- if (h(o.descriptor) || h(i.descriptor)) {
131
+ if (y(o.descriptor) || y(i.descriptor)) {
132
132
  if (u(o) || u(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated.");
133
133
  i.descriptor = o.descriptor;
134
134
  } else {
@@ -145,7 +145,7 @@ function I(r) {
145
145
  function u(r) {
146
146
  return r.decorators && r.decorators.length;
147
147
  }
148
- function h(r) {
148
+ function y(r) {
149
149
  return r !== void 0 && !(r.value === void 0 && r.writable === void 0);
150
150
  }
151
151
  function v(r, e) {
@@ -168,13 +168,13 @@ function _(r, e) {
168
168
  return (e === "string" ? String : Number)(r);
169
169
  }
170
170
  function x(r) {
171
- return O(r) || F(r) || z(r) || S();
171
+ return j(r) || O(r) || F(r) || z();
172
172
  }
173
- function S() {
173
+ function z() {
174
174
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
175
175
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
176
176
  }
177
- function z(r, e) {
177
+ function F(r, e) {
178
178
  if (r) {
179
179
  if (typeof r == "string") return b(r, e);
180
180
  var t = {}.toString.call(r).slice(8, -1);
@@ -186,13 +186,13 @@ function b(r, e) {
186
186
  for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
187
187
  return n;
188
188
  }
189
- function F(r) {
189
+ function O(r) {
190
190
  if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
191
191
  }
192
- function O(r) {
192
+ function j(r) {
193
193
  if (Array.isArray(r)) return r;
194
194
  }
195
- let R = A([D()], function(r) {
195
+ let M = A([T()], function(r) {
196
196
  class e {
197
197
  constructor() {
198
198
  r(this);
@@ -206,17 +206,17 @@ let R = A([D()], function(r) {
206
206
  key: "validate",
207
207
  value: function(n, i, o, a, s) {
208
208
  const l = o?.get(i?.dataTypeIdentifier?.genericKey), c = o?.get(i?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers, p = o?.get(i?.dataTypeIdentifier?.genericKey)?.genericCombinationStrategies;
209
- if ((i?.key ?? "") in n && i?.dataTypeIdentifier?.genericKey && !l && !a?.getDataType(i.dataTypeIdentifier)) return !0;
210
- if (!(a?.getDataType(i.dataTypeIdentifier) || l) || l && !a?.hasDataTypes(c) || l && (p?.length ?? 0) + 1 != c.length) return !1;
209
+ if ((i?.key ?? "") in n && i?.dataTypeIdentifier?.genericKey && !l && !s?.getDataType(i.dataTypeIdentifier)) return !0;
210
+ if (!(s?.getDataType(i.dataTypeIdentifier) || l) || l && !s?.hasDataTypes(c) || l && (p?.length ?? 0) + 1 != c.length) return !1;
211
211
  if (i?.dataTypeIdentifier?.genericKey && l && c) {
212
- const d = c.map((f) => y(n.value[i?.key ?? ""], a?.getDataType(f), a, s, f.genericType.genericMappers)), E = d.length > 1 ? d.reduce((f, m, g) => p && p[g - 1].type == "OR" ? f || m : f && m) : d[0];
212
+ const d = c.map((f) => m(n.value[i?.key ?? ""], s?.getDataType(f), s, a, f.genericType.genericMappers)), E = d.length > 1 ? d.reduce((f, h, g) => p && p[g - 1].type == "OR" ? f || h : f && h) : d[0];
213
213
  return (i?.key ?? "") in n && E;
214
214
  }
215
- return i?.dataTypeIdentifier?.dataType ? (i?.key ?? "") in n && y(n.value[i?.key ?? ""], a?.getDataType(i.dataTypeIdentifier), a) : (i?.key ?? "") in n && y(n.value[i?.key ?? ""], a?.getDataType(i.dataTypeIdentifier), a, s, T(i?.dataTypeIdentifier?.genericType?.genericMappers, o));
215
+ return i?.dataTypeIdentifier?.dataType ? (i?.key ?? "") in n && m(n.value[i?.key ?? ""], s?.getDataType(i.dataTypeIdentifier), s) : (i?.key ?? "") in n && m(n.value[i?.key ?? ""], s?.getDataType(i.dataTypeIdentifier), s, a, D(i?.dataTypeIdentifier?.genericType?.genericMappers, o));
216
216
  }
217
217
  }]
218
218
  };
219
219
  });
220
220
  export {
221
- R as DFlowDataTypeContainsKeyRule
221
+ M as DFlowDataTypeContainsKeyRule
222
222
  };
@@ -1,5 +1,5 @@
1
1
  import { DFlowDataTypeReactiveService } from '../DFlowDataType.service';
2
2
  import { DataTypeRulesContainsKeyConfig, Flow, GenericMapper, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
3
3
  export declare class DFlowDataTypeContainsTypeRule {
4
- static validate(value: NodeParameterValue, config: DataTypeRulesContainsKeyConfig, generics?: Map<string, GenericMapper>, service?: DFlowDataTypeReactiveService, flow?: Flow): boolean;
4
+ static validate(value: NodeParameterValue, config: DataTypeRulesContainsKeyConfig, generics?: Map<string, GenericMapper>, flow?: Flow, dataTypeService?: DFlowDataTypeReactiveService): boolean;
5
5
  }
@@ -1,6 +1,6 @@
1
- import { genericMapping as E, staticImplements as T } from "./DFlowDataTypeRule.js";
2
- import { useValueValidation as y } from "../../d-flow-validation/DValueValidation.hook.js";
3
- function D(r, e, t, n) {
1
+ import { genericMapping as E, staticImplements as D } from "./DFlowDataTypeRule.js";
2
+ import { useValueValidation as h } from "../../d-flow-validation/DValueValidation.hook.js";
3
+ function T(r, e, t, n) {
4
4
  var i = w(), o = e(function(s) {
5
5
  i.initializeInstanceElements(s, a.elements);
6
6
  }, t), a = i.decorateClass(C(o.d.map(A)), r);
@@ -128,7 +128,7 @@ function C(r) {
128
128
  }, n = 0; n < r.length; n++) {
129
129
  var i, o = r[n];
130
130
  if (o.kind === "method" && (i = e.find(t)))
131
- if (h(o.descriptor) || h(i.descriptor)) {
131
+ if (y(o.descriptor) || y(i.descriptor)) {
132
132
  if (m(o) || m(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated.");
133
133
  i.descriptor = o.descriptor;
134
134
  } else {
@@ -145,7 +145,7 @@ function C(r) {
145
145
  function m(r) {
146
146
  return r.decorators && r.decorators.length;
147
147
  }
148
- function h(r) {
148
+ function y(r) {
149
149
  return r !== void 0 && !(r.value === void 0 && r.writable === void 0);
150
150
  }
151
151
  function v(r, e) {
@@ -168,13 +168,13 @@ function I(r, e) {
168
168
  return (e === "string" ? String : Number)(r);
169
169
  }
170
170
  function _(r) {
171
- return F(r) || z(r) || S(r) || x();
171
+ return O(r) || F(r) || z(r) || x();
172
172
  }
173
173
  function x() {
174
174
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
175
175
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
176
176
  }
177
- function S(r, e) {
177
+ function z(r, e) {
178
178
  if (r) {
179
179
  if (typeof r == "string") return b(r, e);
180
180
  var t = {}.toString.call(r).slice(8, -1);
@@ -186,13 +186,13 @@ function b(r, e) {
186
186
  for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
187
187
  return n;
188
188
  }
189
- function z(r) {
189
+ function F(r) {
190
190
  if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
191
191
  }
192
- function F(r) {
192
+ function O(r) {
193
193
  if (Array.isArray(r)) return r;
194
194
  }
195
- let K = D([T()], function(r) {
195
+ let R = T([D()], function(r) {
196
196
  class e {
197
197
  constructor() {
198
198
  r(this);
@@ -207,23 +207,23 @@ let K = D([T()], function(r) {
207
207
  value: function(n, i, o, a, s) {
208
208
  const l = o?.get(i?.dataTypeIdentifier?.genericKey), p = o?.get(i?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers, d = o?.get(i?.dataTypeIdentifier?.genericKey)?.genericCombinationStrategies;
209
209
  if ("value" in n && !Array.isArray(n.value)) return !1;
210
- if (i?.dataTypeIdentifier?.genericKey && !l && !a?.getDataType(i.dataTypeIdentifier)) return !0;
211
- if (!(a?.getDataType(i.dataTypeIdentifier) || l) || l && !a?.hasDataTypes(p) || l && (d?.length ?? 0) + 1 != p.length) return !1;
210
+ if (i?.dataTypeIdentifier?.genericKey && !l && !s?.getDataType(i.dataTypeIdentifier)) return !0;
211
+ if (!(s?.getDataType(i.dataTypeIdentifier) || l) || l && !s?.hasDataTypes(p) || l && (d?.length ?? 0) + 1 != p.length) return !1;
212
212
  if (i?.dataTypeIdentifier?.genericKey && l && p) {
213
- const c = p.map((f) => n.value.every((u) => f.genericType ? y({
213
+ const c = p.map((f) => n.value.every((u) => f.genericType ? h({
214
214
  __typename: "LiteralValue",
215
215
  value: u
216
- }, a?.getDataType(f), a, s, f.genericType.genericMappers) : y({
216
+ }, s?.getDataType(f), s, a, f.genericType.genericMappers) : h({
217
217
  __typename: "LiteralValue",
218
218
  value: u
219
- }, a?.getDataType(f), a, s)));
219
+ }, s?.getDataType(f), s, a)));
220
220
  return c.length > 1 ? c.reduce((f, u, k) => d && d[k - 1].type == "OR" ? f || u : f && u) : c[0];
221
221
  }
222
- return i?.dataTypeIdentifier?.dataType ? n.value.every((c) => y(c, a?.getDataType(i.dataTypeIdentifier), a)) : n.value.every((c) => y(c, a?.getDataType(i.dataTypeIdentifier), a, s, E((i.dataTypeIdentifier?.genericType).genericMappers, o)));
222
+ return i?.dataTypeIdentifier?.dataType ? n.value.every((c) => h(c, s?.getDataType(i.dataTypeIdentifier), s)) : n.value.every((c) => h(c, s?.getDataType(i.dataTypeIdentifier), s, a, E((i.dataTypeIdentifier?.genericType).genericMappers, o)));
223
223
  }
224
224
  }]
225
225
  };
226
226
  });
227
227
  export {
228
- K as DFlowDataTypeContainsTypeRule
228
+ R as DFlowDataTypeContainsTypeRule
229
229
  };
@@ -4,5 +4,5 @@ export interface DFlowDataTypeParentRuleConfig {
4
4
  type: DataTypeIdentifier;
5
5
  }
6
6
  export declare class DFlowDataTypeParentRule {
7
- static validate(value: NodeParameterValue, config: DFlowDataTypeParentRuleConfig, generics?: Map<string, GenericMapper>, service?: DFlowDataTypeReactiveService, flow?: Flow): boolean;
7
+ static validate(value: NodeParameterValue, config: DFlowDataTypeParentRuleConfig, generics?: Map<string, GenericMapper>, flow?: Flow, dataTypeService?: DFlowDataTypeReactiveService): boolean;
8
8
  }
@@ -207,7 +207,7 @@ let j = k([w()], function(r) {
207
207
  key: "validate",
208
208
  value: function(i, n, o, s, a) {
209
209
  const l = o ? b(n.type, o) : n.type;
210
- return s ? E(i, s.getDataType(l), s, a, Array.from(o, ([p, c]) => c)) : !1;
210
+ return a ? E(i, a.getDataType(l), a, s, Array.from(o, ([p, c]) => c)) : !1;
211
211
  }
212
212
  }]
213
213
  };
@@ -1,6 +1,7 @@
1
1
  import { DFlowDataTypeReactiveService } from '../DFlowDataType.service';
2
2
  import { DataTypeRulesReturnTypeConfig, Flow, GenericMapper, NodeFunction, NodeFunctionIdWrapper, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
3
+ import { DFlowFunctionReactiveService } from '../../d-flow-function';
3
4
  export declare class DFlowDataTypeReturnTypeRule {
4
- static validate(value: NodeParameterValue, config: DataTypeRulesReturnTypeConfig, generics?: Map<string, GenericMapper>, service?: DFlowDataTypeReactiveService, flow?: Flow): boolean;
5
+ static validate(value: NodeParameterValue, config: DataTypeRulesReturnTypeConfig, generics?: Map<string, GenericMapper>, flow?: Flow, dataTypeService?: DFlowDataTypeReactiveService, functionService?: DFlowFunctionReactiveService): boolean;
5
6
  }
6
7
  export declare const findReturnNode: (n: NodeFunctionIdWrapper, flow: Flow) => NodeFunction | undefined;