v-nuxt-ui 0.2.2 → 0.2.3
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/module.json
CHANGED
|
@@ -64,10 +64,10 @@ export function useFlow(options) {
|
|
|
64
64
|
const toVueFlowEdge = (edge) => ({
|
|
65
65
|
id: String(edge.id),
|
|
66
66
|
type: "custom",
|
|
67
|
-
source: String(edge.
|
|
68
|
-
target: String(edge.
|
|
69
|
-
sourceHandle: edge.
|
|
70
|
-
targetHandle: edge.
|
|
67
|
+
source: String(edge.sourceNodeId),
|
|
68
|
+
target: String(edge.targetNodeId),
|
|
69
|
+
sourceHandle: edge.sourceNodeHandlePos ?? void 0,
|
|
70
|
+
targetHandle: edge.targetNodeHandlePos ?? void 0,
|
|
71
71
|
label: edge.label
|
|
72
72
|
});
|
|
73
73
|
watch(
|
|
@@ -94,10 +94,10 @@ export function useFlow(options) {
|
|
|
94
94
|
})),
|
|
95
95
|
edges: edges.value.map((e) => ({
|
|
96
96
|
id: Number(e.id) || void 0,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
sourceNodeId: Number(e.source),
|
|
98
|
+
targetNodeId: Number(e.target),
|
|
99
|
+
sourceNodeHandlePos: e.sourceHandle ?? void 0,
|
|
100
|
+
targetNodeHandlePos: e.targetHandle ?? void 0,
|
|
101
101
|
label: typeof e.label === "string" ? e.label : void 0
|
|
102
102
|
}))
|
|
103
103
|
};
|
|
@@ -142,10 +142,10 @@ export function useFlow(options) {
|
|
|
142
142
|
const { data } = await api.value.createEdge({
|
|
143
143
|
id: 0,
|
|
144
144
|
flowId: flow.value?.id,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
sourceNodeId: Number(params.source),
|
|
146
|
+
targetNodeId: Number(params.target),
|
|
147
|
+
sourceNodeHandlePos: params.sourceHandle ?? void 0,
|
|
148
|
+
targetNodeHandlePos: params.targetHandle ?? void 0
|
|
149
149
|
});
|
|
150
150
|
if (data.value.data) {
|
|
151
151
|
edgeId = String(data.value.data.id);
|
|
@@ -210,10 +210,10 @@ export function useFlow(options) {
|
|
|
210
210
|
const { data } = await api.value.createEdge({
|
|
211
211
|
id: 0,
|
|
212
212
|
flowId: flow.value?.id,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
sourceNodeId: Number(connection.source),
|
|
214
|
+
targetNodeId: Number(connection.target),
|
|
215
|
+
sourceNodeHandlePos: connection.sourceHandle ?? void 0,
|
|
216
|
+
targetNodeHandlePos: connection.targetHandle ?? void 0
|
|
217
217
|
});
|
|
218
218
|
if (data.value.data) {
|
|
219
219
|
finalId = String(data.value.data.id);
|
|
@@ -291,10 +291,10 @@ export function useFlow(options) {
|
|
|
291
291
|
if (!Number.isNaN(Number(edgeId))) {
|
|
292
292
|
await api.value.updateEdge({
|
|
293
293
|
id: Number(edgeId),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
sourceNodeId: Number(edge.source),
|
|
295
|
+
targetNodeId: Number(edge.target),
|
|
296
|
+
sourceNodeHandlePos: edge.sourceHandle ?? void 0,
|
|
297
|
+
targetNodeHandlePos: edge.targetHandle ?? void 0,
|
|
298
298
|
label: label || void 0
|
|
299
299
|
});
|
|
300
300
|
}
|
|
@@ -8,20 +8,24 @@ export type Flow = {
|
|
|
8
8
|
} & BaseModel;
|
|
9
9
|
export type FlowNode = {
|
|
10
10
|
flowId?: number;
|
|
11
|
+
flow?: Flow;
|
|
11
12
|
name?: string;
|
|
12
13
|
positionX?: number;
|
|
13
14
|
positionY?: number;
|
|
14
15
|
width?: number;
|
|
15
16
|
height?: number;
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
sourceEdges?: FlowEdge[];
|
|
18
|
+
targetEdges?: FlowEdge[];
|
|
18
19
|
} & BaseModel;
|
|
19
20
|
export type FlowEdge = {
|
|
20
21
|
flowId?: number;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
flow?: Flow;
|
|
23
|
+
sourceNodeId?: number;
|
|
24
|
+
sourceNode?: FlowNode;
|
|
25
|
+
sourceNodeHandlePos?: string;
|
|
26
|
+
targetNodeId?: number;
|
|
27
|
+
targetNode?: FlowNode;
|
|
28
|
+
targetNodeHandlePos?: string;
|
|
25
29
|
label?: string;
|
|
26
30
|
condition?: string;
|
|
27
31
|
order?: number;
|
package/package.json
CHANGED