@uipath/apollo-react 4.28.0 → 4.29.0
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/canvas/components/AddNodePanel/AddNodeManager.helpers.cjs +23 -5
- package/dist/canvas/components/AddNodePanel/AddNodeManager.helpers.d.ts.map +1 -1
- package/dist/canvas/components/AddNodePanel/AddNodeManager.helpers.js +23 -5
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.cjs +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.js +1 -1
- package/dist/canvas/utils/NodeUtils.cjs +6 -1
- package/dist/canvas/utils/NodeUtils.d.ts.map +1 -1
- package/dist/canvas/utils/NodeUtils.js +6 -1
- package/dist/canvas/utils/container.cjs +52 -76
- package/dist/canvas/utils/container.d.ts +4 -0
- package/dist/canvas/utils/container.d.ts.map +1 -1
- package/dist/canvas/utils/container.js +52 -76
- package/dist/canvas/utils/createPreviewGraph.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -160,7 +160,7 @@ function placeAddedNode({ nodes, edges, previewNode, insertedNode, layout, ignor
|
|
|
160
160
|
ignoredNodeTypes,
|
|
161
161
|
getNodeDimensions
|
|
162
162
|
});
|
|
163
|
-
const
|
|
163
|
+
const placedNodes = (0, container_cjs_namespaceObject.placeContainerNode)({
|
|
164
164
|
nodes,
|
|
165
165
|
insertedNode,
|
|
166
166
|
placement,
|
|
@@ -170,10 +170,28 @@ function placeAddedNode({ nodes, edges, previewNode, insertedNode, layout, ignor
|
|
|
170
170
|
getContainerFitGeometry,
|
|
171
171
|
ignoredNodeTypes
|
|
172
172
|
});
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
const placedInsertedNode = placedNodes.find((node)=>node.id === insertedNode.id);
|
|
174
|
+
const resolved = resolveScopedCollisions(placedNodes, placedInsertedNode, {
|
|
175
|
+
ignoredNodeTypes,
|
|
176
|
+
getNodeDimensions
|
|
177
|
+
});
|
|
178
|
+
if (resolved.insertedNode.parentId) {
|
|
179
|
+
const refitted = (0, container_cjs_namespaceObject.fitContainersAndPushSiblings)({
|
|
180
|
+
nodes: resolved.nodes,
|
|
181
|
+
containerIds: [
|
|
182
|
+
resolved.insertedNode.parentId
|
|
183
|
+
],
|
|
184
|
+
getContainerFitGeometry,
|
|
185
|
+
getNodeDimensions,
|
|
186
|
+
ignoredNodeTypes,
|
|
187
|
+
gap: container_cjs_namespaceObject.CONTAINER_SEQUENCE_GAP_PX
|
|
188
|
+
});
|
|
189
|
+
return {
|
|
190
|
+
nodes: refitted,
|
|
191
|
+
insertedNode: refitted.find((node)=>node.id === resolved.insertedNode.id) ?? resolved.insertedNode
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return resolved;
|
|
177
195
|
}
|
|
178
196
|
const shifted = shiftForEdgeInsertion({
|
|
179
197
|
nodes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNodeManager.helpers.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AddNodePanel/AddNodeManager.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAG3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAsBjD,UAAU,sBAAsB;IAC9B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,EAAE,IAAI,CAAC;CACpB;AAMD,wBAAgB,eAAe,CAAC,WAAW,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAEjF;AAsBD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,IAAI,EACjB,kBAAkB,EAAE,yBAAyB,EAAE,EAC/C,YAAY,EAAE,YAAY,GAAG,SAAS,GACrC,IAAI,CA2DN;AAkID,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,WAAW,EACX,YAAY,EACZ,MAAM,EACN,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,IAAI,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"AddNodeManager.helpers.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AddNodePanel/AddNodeManager.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAG3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAsBjD,UAAU,sBAAsB;IAC9B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,EAAE,IAAI,CAAC;CACpB;AAMD,wBAAgB,eAAe,CAAC,WAAW,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAEjF;AAsBD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,IAAI,EACjB,kBAAkB,EAAE,yBAAyB,EAAE,EAC/C,YAAY,EAAE,YAAY,GAAG,SAAS,GACrC,IAAI,CA2DN;AAkID,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,WAAW,EACX,YAAY,EACZ,MAAM,EACN,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,IAAI,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B,GAAG,sBAAsB,CAiGzB"}
|
|
@@ -130,7 +130,7 @@ function placeAddedNode({ nodes, edges, previewNode, insertedNode, layout, ignor
|
|
|
130
130
|
ignoredNodeTypes,
|
|
131
131
|
getNodeDimensions
|
|
132
132
|
});
|
|
133
|
-
const
|
|
133
|
+
const placedNodes = placeContainerNode({
|
|
134
134
|
nodes,
|
|
135
135
|
insertedNode,
|
|
136
136
|
placement,
|
|
@@ -140,10 +140,28 @@ function placeAddedNode({ nodes, edges, previewNode, insertedNode, layout, ignor
|
|
|
140
140
|
getContainerFitGeometry,
|
|
141
141
|
ignoredNodeTypes
|
|
142
142
|
});
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
const placedInsertedNode = placedNodes.find((node)=>node.id === insertedNode.id);
|
|
144
|
+
const resolved = resolveScopedCollisions(placedNodes, placedInsertedNode, {
|
|
145
|
+
ignoredNodeTypes,
|
|
146
|
+
getNodeDimensions
|
|
147
|
+
});
|
|
148
|
+
if (resolved.insertedNode.parentId) {
|
|
149
|
+
const refitted = fitContainersAndPushSiblings({
|
|
150
|
+
nodes: resolved.nodes,
|
|
151
|
+
containerIds: [
|
|
152
|
+
resolved.insertedNode.parentId
|
|
153
|
+
],
|
|
154
|
+
getContainerFitGeometry,
|
|
155
|
+
getNodeDimensions,
|
|
156
|
+
ignoredNodeTypes,
|
|
157
|
+
gap: CONTAINER_SEQUENCE_GAP_PX
|
|
158
|
+
});
|
|
159
|
+
return {
|
|
160
|
+
nodes: refitted,
|
|
161
|
+
insertedNode: refitted.find((node)=>node.id === resolved.insertedNode.id) ?? resolved.insertedNode
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return resolved;
|
|
147
165
|
}
|
|
148
166
|
const shifted = shiftForEdgeInsertion({
|
|
149
167
|
nodes,
|
|
@@ -48,7 +48,7 @@ const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = ex
|
|
|
48
48
|
if (0 === numHandles) return [];
|
|
49
49
|
if (nodeSize <= 0) return [];
|
|
50
50
|
if (1 === numHandles) return [
|
|
51
|
-
nodeSize / 2
|
|
51
|
+
snapToGrid(nodeSize / 2, gridSize)
|
|
52
52
|
];
|
|
53
53
|
const idealSpacing = nodeSize / (numHandles + 1);
|
|
54
54
|
if (nodeSize % gridSize !== 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonHandleStyleUtils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandleStyleUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAEpE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAgB/F,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAQ9C,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,WAAU,MAAqB,KAAG,MAE3E,CAAC;AAmBF,eAAO,MAAM,mCAAmC,GAC9C,UAAU,MAAM,EAChB,YAAY,MAAM,EAClB,WAAU,MAAqB,KAC9B,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonHandleStyleUtils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandleStyleUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAEpE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAgB/F,eAAO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,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG,MAyBH,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,sEAMpC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG,MAsBH,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,yCAGhC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,wBAAwB,CAAC,EAAE,mCAAmC,CAAC;CAChE,KAAG,MAgBH,CAAC"}
|
|
@@ -9,7 +9,7 @@ const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = GR
|
|
|
9
9
|
if (0 === numHandles) return [];
|
|
10
10
|
if (nodeSize <= 0) return [];
|
|
11
11
|
if (1 === numHandles) return [
|
|
12
|
-
nodeSize / 2
|
|
12
|
+
snapToGrid(nodeSize / 2, gridSize)
|
|
13
13
|
];
|
|
14
14
|
const idealSpacing = nodeSize / (numHandles + 1);
|
|
15
15
|
if (nodeSize % gridSize !== 0) {
|
|
@@ -57,7 +57,12 @@ function getNonOverlappingPositionForDirection(nodes, newNodePosition, newNodeSt
|
|
|
57
57
|
x: 'right',
|
|
58
58
|
y: 'down'
|
|
59
59
|
}) {
|
|
60
|
-
const isOverlapping = nodes.some((node)=>
|
|
60
|
+
const isOverlapping = nodes.some((node)=>{
|
|
61
|
+
if (node.id === external_constants_cjs_namespaceObject.PREVIEW_NODE_ID || ignoredNodeTypes.includes(node.type ?? '')) return false;
|
|
62
|
+
const nodeWidth = node.measured?.width ?? node.width ?? external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE;
|
|
63
|
+
const nodeHeight = node.measured?.height ?? node.height ?? external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE;
|
|
64
|
+
return node.position.x < newNodePosition.x + newNodeStyle.width && node.position.x + nodeWidth > newNodePosition.x && node.position.y < newNodePosition.y + newNodeStyle.height && node.position.y + nodeHeight > newNodePosition.y;
|
|
65
|
+
});
|
|
61
66
|
if (isOverlapping) {
|
|
62
67
|
if ('left' === direction || 'right' === direction) newNodePosition.y += 'down' === overflowDirection.y ? offset : -offset;
|
|
63
68
|
else newNodePosition.x += 'right' === overflowDirection.x ? offset : -offset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeUtils.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/NodeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,0CAA0C,CAAC;AAQlD,eAAO,MAAM,kBAAkB,GAAI,OAAO,cAAc,YAAkC,CAAC;AAS3F,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,EAAE,OAAO,IAAI,EAAE,KAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAWrF,CAAC;AAeF,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,IAAI,EAAE,EACb,eAAe,EAAE,UAAU,EAC3B,YAAY,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/C,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,EAC9C,MAAM,SAAmB,EACzB,gBAAgB,GAAE,MAAM,EAAO,EAC/B,iBAAiB,GAAE;IAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CAA8B,GACvF,UAAU,
|
|
1
|
+
{"version":3,"file":"NodeUtils.d.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M,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACvE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,EAAE,yBAAyB,KAAK,IAAI,EAAE,CAAC;AAyChG,eAAO,MAAM,iBAAiB,EAAE,kBA8E/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AASF,MAAM,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzF,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAMD,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,QAAQ,EACxB,OAAO,CAAC,EAAE,2BAA2B,GACpC,aAAa,GAAG,SAAS,CAkB3B;AAoCD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,MAAM,EAAE,GACnB,MAAM,GAAG,IAAI,CAQf"}
|
|
@@ -20,7 +20,12 @@ function getNonOverlappingPositionForDirection(nodes, newNodePosition, newNodeSt
|
|
|
20
20
|
x: 'right',
|
|
21
21
|
y: 'down'
|
|
22
22
|
}) {
|
|
23
|
-
const isOverlapping = nodes.some((node)=>
|
|
23
|
+
const isOverlapping = nodes.some((node)=>{
|
|
24
|
+
if (node.id === PREVIEW_NODE_ID || ignoredNodeTypes.includes(node.type ?? '')) return false;
|
|
25
|
+
const nodeWidth = node.measured?.width ?? node.width ?? DEFAULT_NODE_SIZE;
|
|
26
|
+
const nodeHeight = node.measured?.height ?? node.height ?? DEFAULT_NODE_SIZE;
|
|
27
|
+
return node.position.x < newNodePosition.x + newNodeStyle.width && node.position.x + nodeWidth > newNodePosition.x && node.position.y < newNodePosition.y + newNodeStyle.height && node.position.y + nodeHeight > newNodePosition.y;
|
|
28
|
+
});
|
|
24
29
|
if (isOverlapping) {
|
|
25
30
|
if ('left' === direction || 'right' === direction) newNodePosition.y += 'down' === overflowDirection.y ? offset : -offset;
|
|
26
31
|
else newNodePosition.x += 'right' === overflowDirection.x ? offset : -offset;
|
|
@@ -101,8 +101,8 @@ function container_getContainerFitGeometry() {
|
|
|
101
101
|
height: DEFAULT_CONTAINER_HEIGHT
|
|
102
102
|
}).padding;
|
|
103
103
|
return {
|
|
104
|
-
minWidth:
|
|
105
|
-
minHeight:
|
|
104
|
+
minWidth: DEFAULT_CONTAINER_WIDTH,
|
|
105
|
+
minHeight: DEFAULT_CONTAINER_HEIGHT,
|
|
106
106
|
padding
|
|
107
107
|
};
|
|
108
108
|
}
|
|
@@ -237,7 +237,17 @@ function ensureContainersFitChildren(nodes, { containerIds, getContainerFitGeome
|
|
|
237
237
|
if (nextSize.width === currentSize.width && nextSize.height === currentSize.height && 0 === leadingShiftX && 0 === leadingShiftY) continue;
|
|
238
238
|
const shouldShiftChildren = 0 !== leadingShiftX || 0 !== leadingShiftY;
|
|
239
239
|
nextNodes = nextNodes.map((node)=>{
|
|
240
|
-
if (node.id === containerId)
|
|
240
|
+
if (node.id === containerId) {
|
|
241
|
+
const resized = withNodeDimensions(node, nextSize);
|
|
242
|
+
if (!shouldShiftChildren) return resized;
|
|
243
|
+
return {
|
|
244
|
+
...resized,
|
|
245
|
+
position: {
|
|
246
|
+
x: (node.position?.x ?? 0) - leadingShiftX,
|
|
247
|
+
y: (node.position?.y ?? 0) - leadingShiftY
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
241
251
|
if (shouldShiftChildren && childIdsToShift.has(node.id)) return {
|
|
242
252
|
...node,
|
|
243
253
|
position: {
|
|
@@ -248,10 +258,15 @@ function ensureContainersFitChildren(nodes, { containerIds, getContainerFitGeome
|
|
|
248
258
|
return node;
|
|
249
259
|
});
|
|
250
260
|
nodesById.set(containerId, nextNodes.find((node)=>node.id === containerId));
|
|
251
|
-
|
|
261
|
+
const sizeChanged = nextSize.width !== currentSize.width || nextSize.height !== currentSize.height;
|
|
262
|
+
if (sizeChanged || shouldShiftChildren) changes.push({
|
|
252
263
|
containerId,
|
|
253
264
|
previousSize: currentSize,
|
|
254
|
-
nextSize
|
|
265
|
+
nextSize,
|
|
266
|
+
positionDelta: shouldShiftChildren ? {
|
|
267
|
+
x: -leadingShiftX,
|
|
268
|
+
y: -leadingShiftY
|
|
269
|
+
} : void 0
|
|
255
270
|
});
|
|
256
271
|
}
|
|
257
272
|
return {
|
|
@@ -270,10 +285,6 @@ function clampTopLeftToSafeArea(position, safeArea, nodeSize) {
|
|
|
270
285
|
y: (0, external_NodeUtils_cjs_namespaceObject.clamp)(position.y, safeArea.y, maxY)
|
|
271
286
|
};
|
|
272
287
|
}
|
|
273
|
-
function clampTopToSafeArea(top, safeArea, nodeSize) {
|
|
274
|
-
const maxY = safeArea.y + Math.max(0, safeArea.height - nodeSize.height);
|
|
275
|
-
return (0, external_NodeUtils_cjs_namespaceObject.clamp)(top, safeArea.y, maxY);
|
|
276
|
-
}
|
|
277
288
|
function rangesOverlap(startA, endA, startB, endB) {
|
|
278
289
|
return startA < endB && endA > startB;
|
|
279
290
|
}
|
|
@@ -458,32 +469,18 @@ function resolveAppendPreview({ source, sourceHandleType, reactFlowInstance, ...
|
|
|
458
469
|
reactFlowInstance
|
|
459
470
|
});
|
|
460
471
|
if (!continuationTarget) return null;
|
|
461
|
-
const targetNode = continuationTarget.nodeId === containerNode.id ? containerNode : reactFlowInstance.getNode(continuationTarget.nodeId);
|
|
462
|
-
const containerPlacement = getPreviewPlacement({
|
|
463
|
-
sourceNode,
|
|
464
|
-
targetNode,
|
|
465
|
-
containerNode,
|
|
466
|
-
nodes,
|
|
467
|
-
safeArea: options.getContainerSafeArea?.(containerNode),
|
|
468
|
-
previewNodeSize: options.previewNodeSize,
|
|
469
|
-
gap: options.gap,
|
|
470
|
-
avoidSiblings: options.avoidSiblings ?? true,
|
|
471
|
-
getNodeDimensions: options.getNodeDimensions
|
|
472
|
-
});
|
|
473
472
|
const placement = {
|
|
474
|
-
containerId:
|
|
473
|
+
containerId: containerNode.id,
|
|
475
474
|
sourceNodeId: sourceNode.id,
|
|
476
475
|
targetNodeId: continuationTarget.nodeId,
|
|
477
476
|
mode: 'sequence'
|
|
478
477
|
};
|
|
479
478
|
return {
|
|
480
|
-
position: containerPlacement.centerPosition,
|
|
481
|
-
positionMode: 'center',
|
|
482
479
|
data: {
|
|
483
480
|
[PLACEMENT_DATA_KEY]: placement
|
|
484
481
|
},
|
|
485
482
|
target: continuationTarget,
|
|
486
|
-
containerId:
|
|
483
|
+
containerId: containerNode.id
|
|
487
484
|
};
|
|
488
485
|
}
|
|
489
486
|
function resolveContainerPreview({ source, sourceHandleType, reactFlowInstance, ...options }) {
|
|
@@ -527,29 +524,6 @@ function getPreviewPlacement({ sourceNode, targetNode, containerNode, nodes, con
|
|
|
527
524
|
}
|
|
528
525
|
};
|
|
529
526
|
}
|
|
530
|
-
function getNodeCenterY(position, nodeSize) {
|
|
531
|
-
return position.y + nodeSize.height / 2;
|
|
532
|
-
}
|
|
533
|
-
function getInsertedPosition({ sourceNode, targetNode, insertedNode, containerNode, nodes, safeArea, insertedNodeSize, gap, getNodeDimensions }) {
|
|
534
|
-
const sourcePosition = getLocalNodePosition(sourceNode, containerNode, nodes);
|
|
535
|
-
const targetPosition = getLocalNodePosition(targetNode, containerNode, nodes);
|
|
536
|
-
const sourceSize = sourceNode ? getNodeDimensions(sourceNode) : void 0;
|
|
537
|
-
const targetSize = targetNode ? getNodeDimensions(targetNode) : void 0;
|
|
538
|
-
const sourceIsContainer = sourceNode?.id === containerNode.id;
|
|
539
|
-
const targetIsContainer = targetNode?.id === containerNode.id;
|
|
540
|
-
if (sourcePosition && sourceSize && !sourceIsContainer) return {
|
|
541
|
-
x: Math.max(safeArea.x, (0, external_NodeUtils_cjs_namespaceObject.snapToGrid)(sourcePosition.x + sourceSize.width + gap)),
|
|
542
|
-
y: clampTopToSafeArea((0, external_NodeUtils_cjs_namespaceObject.snapToGrid)(getNodeCenterY(sourcePosition, sourceSize) - insertedNodeSize.height / 2), safeArea, insertedNodeSize)
|
|
543
|
-
};
|
|
544
|
-
if (targetPosition && targetSize && !targetIsContainer) return {
|
|
545
|
-
x: Math.max(safeArea.x, (0, external_NodeUtils_cjs_namespaceObject.snapToGrid)(targetPosition.x - insertedNodeSize.width - gap)),
|
|
546
|
-
y: clampTopToSafeArea((0, external_NodeUtils_cjs_namespaceObject.snapToGrid)(getNodeCenterY(targetPosition, targetSize) - insertedNodeSize.height / 2), safeArea, insertedNodeSize)
|
|
547
|
-
};
|
|
548
|
-
return {
|
|
549
|
-
x: Math.max(safeArea.x, (0, external_NodeUtils_cjs_namespaceObject.snapToGrid)(insertedNode.position.x)),
|
|
550
|
-
y: clampTopToSafeArea((0, external_NodeUtils_cjs_namespaceObject.snapToGrid)(insertedNode.position.y), safeArea, insertedNodeSize)
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
527
|
function getNodeDepth(node, nodesById) {
|
|
554
528
|
let depth = 0;
|
|
555
529
|
let parentId = node?.parentId;
|
|
@@ -579,30 +553,38 @@ function pushSiblingsAfterContainerGrowth({ nodes, changes, getNodeDimensions, g
|
|
|
579
553
|
let shifted = false;
|
|
580
554
|
let nextNodes = nodes;
|
|
581
555
|
for (const change of sortContainerSizeChanges(changes, nextNodes)){
|
|
582
|
-
const widthDelta = change.nextSize.width - change.previousSize.width;
|
|
583
|
-
const heightDelta = change.nextSize.height - change.previousSize.height;
|
|
584
|
-
if (widthDelta <= 0 && heightDelta <= 0) continue;
|
|
585
556
|
const containerNode = nextNodes.find((node)=>node.id === change.containerId);
|
|
586
|
-
const
|
|
557
|
+
const positionDelta = change.positionDelta ?? {
|
|
558
|
+
x: 0,
|
|
559
|
+
y: 0
|
|
560
|
+
};
|
|
561
|
+
const prevPosition = {
|
|
562
|
+
x: containerNode.position.x - positionDelta.x,
|
|
563
|
+
y: containerNode.position.y - positionDelta.y
|
|
564
|
+
};
|
|
565
|
+
const oldRight = prevPosition.x + change.previousSize.width;
|
|
587
566
|
const newRight = containerNode.position.x + change.nextSize.width;
|
|
588
|
-
const oldBottom =
|
|
567
|
+
const oldBottom = prevPosition.y + change.previousSize.height;
|
|
589
568
|
const newBottom = containerNode.position.y + change.nextSize.height;
|
|
590
|
-
const
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
const
|
|
569
|
+
const rightDelta = newRight - oldRight;
|
|
570
|
+
const bottomDelta = newBottom - oldBottom;
|
|
571
|
+
if (rightDelta <= 0 && bottomDelta <= 0) continue;
|
|
572
|
+
const containerLeft = Math.min(containerNode.position.x, prevPosition.x);
|
|
573
|
+
const containerRight = Math.max(newRight, oldRight);
|
|
574
|
+
const containerTop = Math.min(containerNode.position.y, prevPosition.y);
|
|
575
|
+
const containerBottom = Math.max(newBottom, oldBottom);
|
|
594
576
|
nextNodes = nextNodes.map((node)=>{
|
|
595
577
|
if (node.id === containerNode.id || node.parentId !== containerNode.parentId) return node;
|
|
596
578
|
const nodeSize = getNodeDimensions(node);
|
|
597
579
|
let nextX = node.position.x;
|
|
598
580
|
let nextY = node.position.y;
|
|
599
|
-
if (
|
|
581
|
+
if (rightDelta > 0 && node.position.x >= oldRight) {
|
|
600
582
|
const verticallyOverlaps = rangesOverlap(node.position.y, node.position.y + nodeSize.height, containerTop, containerBottom);
|
|
601
|
-
if (verticallyOverlaps) nextX = Math.max(node.position.x +
|
|
583
|
+
if (verticallyOverlaps) nextX = Math.max(node.position.x + rightDelta, (0, external_NodeUtils_cjs_namespaceObject.snapUpToGrid)(newRight + gap));
|
|
602
584
|
}
|
|
603
|
-
if (
|
|
585
|
+
if (bottomDelta > 0 && node.position.y >= oldBottom) {
|
|
604
586
|
const horizontallyOverlaps = rangesOverlap(node.position.x, node.position.x + nodeSize.width, containerLeft, containerRight);
|
|
605
|
-
if (horizontallyOverlaps) nextY = Math.max(node.position.y +
|
|
587
|
+
if (horizontallyOverlaps) nextY = Math.max(node.position.y + bottomDelta, (0, external_NodeUtils_cjs_namespaceObject.snapUpToGrid)(newBottom + gap));
|
|
606
588
|
}
|
|
607
589
|
if (nextX === node.position.x && nextY === node.position.y) return node;
|
|
608
590
|
shifted = true;
|
|
@@ -657,23 +639,18 @@ function placeContainerNode({ nodes, insertedNode, placement, safeArea, getConta
|
|
|
657
639
|
]));
|
|
658
640
|
const insertedSize = resolveNodeDimensions(insertedNode);
|
|
659
641
|
const resolvedSafeArea = getSafeArea(containerNode, safeArea);
|
|
642
|
+
const upstreamSource = placement.sourceNodeId && placement.sourceNodeId !== placement.containerId ? nodesById.get(placement.sourceNodeId) : void 0;
|
|
643
|
+
const sequenceX = upstreamSource ? Math.max(insertedNode.position.x, (0, external_NodeUtils_cjs_namespaceObject.snapUpToGrid)(upstreamSource.position.x + resolveNodeDimensions(upstreamSource).width + gap)) : insertedNode.position.x;
|
|
660
644
|
const positionedNode = 'first-child' === placement.mode ? {
|
|
661
645
|
...insertedNode,
|
|
662
646
|
position: centerOnContainerRail(resolveNodeDimensions(containerNode), resolvedSafeArea, insertedSize)
|
|
663
|
-
} : {
|
|
647
|
+
} : sequenceX !== insertedNode.position.x ? {
|
|
664
648
|
...insertedNode,
|
|
665
|
-
position:
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
nodes,
|
|
671
|
-
safeArea: resolvedSafeArea,
|
|
672
|
-
insertedNodeSize: insertedSize,
|
|
673
|
-
gap,
|
|
674
|
-
getNodeDimensions: resolveNodeDimensions
|
|
675
|
-
})
|
|
676
|
-
};
|
|
649
|
+
position: {
|
|
650
|
+
...insertedNode.position,
|
|
651
|
+
x: sequenceX
|
|
652
|
+
}
|
|
653
|
+
} : insertedNode;
|
|
677
654
|
const targetNode = placement.targetNodeId && placement.targetNodeId !== placement.containerId ? nodesById.get(placement.targetNodeId) : void 0;
|
|
678
655
|
const fallbackTargetIds = placement.targetNodeId && placement.targetNodeId !== placement.containerId ? [
|
|
679
656
|
placement.targetNodeId
|
|
@@ -685,9 +662,8 @@ function placeContainerNode({ nodes, insertedNode, placement, safeArea, getConta
|
|
|
685
662
|
edges
|
|
686
663
|
}) : fallbackTargetIds));
|
|
687
664
|
if (placement.sourceNodeId) idsToShift.delete(placement.sourceNodeId);
|
|
688
|
-
const sourceNode = placement.sourceNodeId ? nodesById.get(placement.sourceNodeId) : void 0;
|
|
689
665
|
const sourceIsContainer = placement.sourceNodeId === placement.containerId;
|
|
690
|
-
const isBackEdge = !sourceIsContainer && void 0 !==
|
|
666
|
+
const isBackEdge = !sourceIsContainer && void 0 !== upstreamSource && void 0 !== targetNode && upstreamSource.position.x >= targetNode.position.x;
|
|
691
667
|
const requiredTargetLeft = positionedNode.position.x + insertedSize.width + gap;
|
|
692
668
|
const downstreamShift = !isBackEdge && targetNode && targetNode.position.x < requiredTargetLeft ? (0, external_NodeUtils_cjs_namespaceObject.snapUpToGrid)(requiredTargetLeft - targetNode.position.x) : 0;
|
|
693
669
|
const positionedNodes = nodes.map((node)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,IAAI,EACJ,iBAAiB,EAElB,MAAM,0CAA0C,CAAC;AAOlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,O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
|
60
|
+
minHeight: DEFAULT_CONTAINER_HEIGHT,
|
|
61
61
|
padding
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -192,7 +192,17 @@ function ensureContainersFitChildren(nodes, { containerIds, getContainerFitGeome
|
|
|
192
192
|
if (nextSize.width === currentSize.width && nextSize.height === currentSize.height && 0 === leadingShiftX && 0 === leadingShiftY) continue;
|
|
193
193
|
const shouldShiftChildren = 0 !== leadingShiftX || 0 !== leadingShiftY;
|
|
194
194
|
nextNodes = nextNodes.map((node)=>{
|
|
195
|
-
if (node.id === containerId)
|
|
195
|
+
if (node.id === containerId) {
|
|
196
|
+
const resized = withNodeDimensions(node, nextSize);
|
|
197
|
+
if (!shouldShiftChildren) return resized;
|
|
198
|
+
return {
|
|
199
|
+
...resized,
|
|
200
|
+
position: {
|
|
201
|
+
x: (node.position?.x ?? 0) - leadingShiftX,
|
|
202
|
+
y: (node.position?.y ?? 0) - leadingShiftY
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
}
|
|
196
206
|
if (shouldShiftChildren && childIdsToShift.has(node.id)) return {
|
|
197
207
|
...node,
|
|
198
208
|
position: {
|
|
@@ -203,10 +213,15 @@ function ensureContainersFitChildren(nodes, { containerIds, getContainerFitGeome
|
|
|
203
213
|
return node;
|
|
204
214
|
});
|
|
205
215
|
nodesById.set(containerId, nextNodes.find((node)=>node.id === containerId));
|
|
206
|
-
|
|
216
|
+
const sizeChanged = nextSize.width !== currentSize.width || nextSize.height !== currentSize.height;
|
|
217
|
+
if (sizeChanged || shouldShiftChildren) changes.push({
|
|
207
218
|
containerId,
|
|
208
219
|
previousSize: currentSize,
|
|
209
|
-
nextSize
|
|
220
|
+
nextSize,
|
|
221
|
+
positionDelta: shouldShiftChildren ? {
|
|
222
|
+
x: -leadingShiftX,
|
|
223
|
+
y: -leadingShiftY
|
|
224
|
+
} : void 0
|
|
210
225
|
});
|
|
211
226
|
}
|
|
212
227
|
return {
|
|
@@ -225,10 +240,6 @@ function clampTopLeftToSafeArea(position, safeArea, nodeSize) {
|
|
|
225
240
|
y: clamp(position.y, safeArea.y, maxY)
|
|
226
241
|
};
|
|
227
242
|
}
|
|
228
|
-
function clampTopToSafeArea(top, safeArea, nodeSize) {
|
|
229
|
-
const maxY = safeArea.y + Math.max(0, safeArea.height - nodeSize.height);
|
|
230
|
-
return clamp(top, safeArea.y, maxY);
|
|
231
|
-
}
|
|
232
243
|
function rangesOverlap(startA, endA, startB, endB) {
|
|
233
244
|
return startA < endB && endA > startB;
|
|
234
245
|
}
|
|
@@ -413,32 +424,18 @@ function resolveAppendPreview({ source, sourceHandleType, reactFlowInstance, ...
|
|
|
413
424
|
reactFlowInstance
|
|
414
425
|
});
|
|
415
426
|
if (!continuationTarget) return null;
|
|
416
|
-
const targetNode = continuationTarget.nodeId === containerNode.id ? containerNode : reactFlowInstance.getNode(continuationTarget.nodeId);
|
|
417
|
-
const containerPlacement = getPreviewPlacement({
|
|
418
|
-
sourceNode,
|
|
419
|
-
targetNode,
|
|
420
|
-
containerNode,
|
|
421
|
-
nodes,
|
|
422
|
-
safeArea: options.getContainerSafeArea?.(containerNode),
|
|
423
|
-
previewNodeSize: options.previewNodeSize,
|
|
424
|
-
gap: options.gap,
|
|
425
|
-
avoidSiblings: options.avoidSiblings ?? true,
|
|
426
|
-
getNodeDimensions: options.getNodeDimensions
|
|
427
|
-
});
|
|
428
427
|
const placement = {
|
|
429
|
-
containerId:
|
|
428
|
+
containerId: containerNode.id,
|
|
430
429
|
sourceNodeId: sourceNode.id,
|
|
431
430
|
targetNodeId: continuationTarget.nodeId,
|
|
432
431
|
mode: 'sequence'
|
|
433
432
|
};
|
|
434
433
|
return {
|
|
435
|
-
position: containerPlacement.centerPosition,
|
|
436
|
-
positionMode: 'center',
|
|
437
434
|
data: {
|
|
438
435
|
[PLACEMENT_DATA_KEY]: placement
|
|
439
436
|
},
|
|
440
437
|
target: continuationTarget,
|
|
441
|
-
containerId:
|
|
438
|
+
containerId: containerNode.id
|
|
442
439
|
};
|
|
443
440
|
}
|
|
444
441
|
function resolveContainerPreview({ source, sourceHandleType, reactFlowInstance, ...options }) {
|
|
@@ -482,29 +479,6 @@ function getPreviewPlacement({ sourceNode, targetNode, containerNode, nodes, con
|
|
|
482
479
|
}
|
|
483
480
|
};
|
|
484
481
|
}
|
|
485
|
-
function getNodeCenterY(position, nodeSize) {
|
|
486
|
-
return position.y + nodeSize.height / 2;
|
|
487
|
-
}
|
|
488
|
-
function getInsertedPosition({ sourceNode, targetNode, insertedNode, containerNode, nodes, safeArea, insertedNodeSize, gap, getNodeDimensions }) {
|
|
489
|
-
const sourcePosition = getLocalNodePosition(sourceNode, containerNode, nodes);
|
|
490
|
-
const targetPosition = getLocalNodePosition(targetNode, containerNode, nodes);
|
|
491
|
-
const sourceSize = sourceNode ? getNodeDimensions(sourceNode) : void 0;
|
|
492
|
-
const targetSize = targetNode ? getNodeDimensions(targetNode) : void 0;
|
|
493
|
-
const sourceIsContainer = sourceNode?.id === containerNode.id;
|
|
494
|
-
const targetIsContainer = targetNode?.id === containerNode.id;
|
|
495
|
-
if (sourcePosition && sourceSize && !sourceIsContainer) return {
|
|
496
|
-
x: Math.max(safeArea.x, snapToGrid(sourcePosition.x + sourceSize.width + gap)),
|
|
497
|
-
y: clampTopToSafeArea(snapToGrid(getNodeCenterY(sourcePosition, sourceSize) - insertedNodeSize.height / 2), safeArea, insertedNodeSize)
|
|
498
|
-
};
|
|
499
|
-
if (targetPosition && targetSize && !targetIsContainer) return {
|
|
500
|
-
x: Math.max(safeArea.x, snapToGrid(targetPosition.x - insertedNodeSize.width - gap)),
|
|
501
|
-
y: clampTopToSafeArea(snapToGrid(getNodeCenterY(targetPosition, targetSize) - insertedNodeSize.height / 2), safeArea, insertedNodeSize)
|
|
502
|
-
};
|
|
503
|
-
return {
|
|
504
|
-
x: Math.max(safeArea.x, snapToGrid(insertedNode.position.x)),
|
|
505
|
-
y: clampTopToSafeArea(snapToGrid(insertedNode.position.y), safeArea, insertedNodeSize)
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
482
|
function getNodeDepth(node, nodesById) {
|
|
509
483
|
let depth = 0;
|
|
510
484
|
let parentId = node?.parentId;
|
|
@@ -534,30 +508,38 @@ function pushSiblingsAfterContainerGrowth({ nodes, changes, getNodeDimensions, g
|
|
|
534
508
|
let shifted = false;
|
|
535
509
|
let nextNodes = nodes;
|
|
536
510
|
for (const change of sortContainerSizeChanges(changes, nextNodes)){
|
|
537
|
-
const widthDelta = change.nextSize.width - change.previousSize.width;
|
|
538
|
-
const heightDelta = change.nextSize.height - change.previousSize.height;
|
|
539
|
-
if (widthDelta <= 0 && heightDelta <= 0) continue;
|
|
540
511
|
const containerNode = nextNodes.find((node)=>node.id === change.containerId);
|
|
541
|
-
const
|
|
512
|
+
const positionDelta = change.positionDelta ?? {
|
|
513
|
+
x: 0,
|
|
514
|
+
y: 0
|
|
515
|
+
};
|
|
516
|
+
const prevPosition = {
|
|
517
|
+
x: containerNode.position.x - positionDelta.x,
|
|
518
|
+
y: containerNode.position.y - positionDelta.y
|
|
519
|
+
};
|
|
520
|
+
const oldRight = prevPosition.x + change.previousSize.width;
|
|
542
521
|
const newRight = containerNode.position.x + change.nextSize.width;
|
|
543
|
-
const oldBottom =
|
|
522
|
+
const oldBottom = prevPosition.y + change.previousSize.height;
|
|
544
523
|
const newBottom = containerNode.position.y + change.nextSize.height;
|
|
545
|
-
const
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
const
|
|
524
|
+
const rightDelta = newRight - oldRight;
|
|
525
|
+
const bottomDelta = newBottom - oldBottom;
|
|
526
|
+
if (rightDelta <= 0 && bottomDelta <= 0) continue;
|
|
527
|
+
const containerLeft = Math.min(containerNode.position.x, prevPosition.x);
|
|
528
|
+
const containerRight = Math.max(newRight, oldRight);
|
|
529
|
+
const containerTop = Math.min(containerNode.position.y, prevPosition.y);
|
|
530
|
+
const containerBottom = Math.max(newBottom, oldBottom);
|
|
549
531
|
nextNodes = nextNodes.map((node)=>{
|
|
550
532
|
if (node.id === containerNode.id || node.parentId !== containerNode.parentId) return node;
|
|
551
533
|
const nodeSize = getNodeDimensions(node);
|
|
552
534
|
let nextX = node.position.x;
|
|
553
535
|
let nextY = node.position.y;
|
|
554
|
-
if (
|
|
536
|
+
if (rightDelta > 0 && node.position.x >= oldRight) {
|
|
555
537
|
const verticallyOverlaps = rangesOverlap(node.position.y, node.position.y + nodeSize.height, containerTop, containerBottom);
|
|
556
|
-
if (verticallyOverlaps) nextX = Math.max(node.position.x +
|
|
538
|
+
if (verticallyOverlaps) nextX = Math.max(node.position.x + rightDelta, snapUpToGrid(newRight + gap));
|
|
557
539
|
}
|
|
558
|
-
if (
|
|
540
|
+
if (bottomDelta > 0 && node.position.y >= oldBottom) {
|
|
559
541
|
const horizontallyOverlaps = rangesOverlap(node.position.x, node.position.x + nodeSize.width, containerLeft, containerRight);
|
|
560
|
-
if (horizontallyOverlaps) nextY = Math.max(node.position.y +
|
|
542
|
+
if (horizontallyOverlaps) nextY = Math.max(node.position.y + bottomDelta, snapUpToGrid(newBottom + gap));
|
|
561
543
|
}
|
|
562
544
|
if (nextX === node.position.x && nextY === node.position.y) return node;
|
|
563
545
|
shifted = true;
|
|
@@ -612,23 +594,18 @@ function placeContainerNode({ nodes, insertedNode, placement, safeArea, getConta
|
|
|
612
594
|
]));
|
|
613
595
|
const insertedSize = resolveNodeDimensions(insertedNode);
|
|
614
596
|
const resolvedSafeArea = getSafeArea(containerNode, safeArea);
|
|
597
|
+
const upstreamSource = placement.sourceNodeId && placement.sourceNodeId !== placement.containerId ? nodesById.get(placement.sourceNodeId) : void 0;
|
|
598
|
+
const sequenceX = upstreamSource ? Math.max(insertedNode.position.x, snapUpToGrid(upstreamSource.position.x + resolveNodeDimensions(upstreamSource).width + gap)) : insertedNode.position.x;
|
|
615
599
|
const positionedNode = 'first-child' === placement.mode ? {
|
|
616
600
|
...insertedNode,
|
|
617
601
|
position: centerOnContainerRail(resolveNodeDimensions(containerNode), resolvedSafeArea, insertedSize)
|
|
618
|
-
} : {
|
|
602
|
+
} : sequenceX !== insertedNode.position.x ? {
|
|
619
603
|
...insertedNode,
|
|
620
|
-
position:
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
nodes,
|
|
626
|
-
safeArea: resolvedSafeArea,
|
|
627
|
-
insertedNodeSize: insertedSize,
|
|
628
|
-
gap,
|
|
629
|
-
getNodeDimensions: resolveNodeDimensions
|
|
630
|
-
})
|
|
631
|
-
};
|
|
604
|
+
position: {
|
|
605
|
+
...insertedNode.position,
|
|
606
|
+
x: sequenceX
|
|
607
|
+
}
|
|
608
|
+
} : insertedNode;
|
|
632
609
|
const targetNode = placement.targetNodeId && placement.targetNodeId !== placement.containerId ? nodesById.get(placement.targetNodeId) : void 0;
|
|
633
610
|
const fallbackTargetIds = placement.targetNodeId && placement.targetNodeId !== placement.containerId ? [
|
|
634
611
|
placement.targetNodeId
|
|
@@ -640,9 +617,8 @@ function placeContainerNode({ nodes, insertedNode, placement, safeArea, getConta
|
|
|
640
617
|
edges
|
|
641
618
|
}) : fallbackTargetIds));
|
|
642
619
|
if (placement.sourceNodeId) idsToShift.delete(placement.sourceNodeId);
|
|
643
|
-
const sourceNode = placement.sourceNodeId ? nodesById.get(placement.sourceNodeId) : void 0;
|
|
644
620
|
const sourceIsContainer = placement.sourceNodeId === placement.containerId;
|
|
645
|
-
const isBackEdge = !sourceIsContainer && void 0 !==
|
|
621
|
+
const isBackEdge = !sourceIsContainer && void 0 !== upstreamSource && void 0 !== targetNode && upstreamSource.position.x >= targetNode.position.x;
|
|
646
622
|
const requiredTargetLeft = positionedNode.position.x + insertedSize.width + gap;
|
|
647
623
|
const downstreamShift = !isBackEdge && targetNode && targetNode.position.x < requiredTargetLeft ? snapUpToGrid(requiredTargetLeft - targetNode.position.x) : 0;
|
|
648
624
|
const positionedNodes = nodes.map((node)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPreviewGra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C,EAAE,QAAQ,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAOlC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;CAC3C;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CACzC,IAAI,CACF,yBAAyB,EACvB,aAAa,GACb,MAAM,GACN,UAAU,GACV,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,mBAAmB,CACtB,CACF,CAAC;AAgCF,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,IAAI,EACjB,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,iBAAiB,GACnC,IAAI,GAAG,IAAI,CAkBb;AAwDD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,GAAG,IAAI,CAqB1F;AAOD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,GAAG,IAAI,CAMxF;AAOD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,iBAAiB,GACnC,IAAI,CAgBN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.29.0",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -205,8 +205,8 @@
|
|
|
205
205
|
"use-sync-external-store": "^1.2.0",
|
|
206
206
|
"zod": "^4.3.5",
|
|
207
207
|
"zustand": "^5.0.9",
|
|
208
|
-
"@uipath/apollo-
|
|
209
|
-
"@uipath/apollo-
|
|
208
|
+
"@uipath/apollo-wind": "2.17.0",
|
|
209
|
+
"@uipath/apollo-core": "5.9.1"
|
|
210
210
|
},
|
|
211
211
|
"devDependencies": {
|
|
212
212
|
"@lingui/cli": "^5.6.1",
|