@uipath/apollo-react 4.23.1 → 4.23.2-pr663.7a094a6
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/LoopNode/LoopNode.cjs +50 -7
- package/dist/canvas/components/LoopNode/LoopNode.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.helpers.cjs +3 -1
- package/dist/canvas/components/LoopNode/LoopNode.helpers.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.helpers.js +3 -1
- package/dist/canvas/components/LoopNode/LoopNode.js +51 -8
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/canvas/utils/container.cjs +52 -1
- package/dist/canvas/utils/container.d.ts +12 -0
- package/dist/canvas/utils/container.d.ts.map +1 -1
- package/dist/canvas/utils/container.js +50 -2
- package/package.json +3 -3
|
@@ -29,6 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
DEFAULT_CONTAINER_HEIGHT: ()=>DEFAULT_CONTAINER_HEIGHT,
|
|
30
30
|
getContainerSafeArea: ()=>container_getContainerSafeArea,
|
|
31
31
|
DEFAULT_CONTAINER_WIDTH: ()=>DEFAULT_CONTAINER_WIDTH,
|
|
32
|
+
getContainerResizeMinimums: ()=>getContainerResizeMinimums,
|
|
32
33
|
isContainerNodeManifest: ()=>isContainerNodeManifest,
|
|
33
34
|
fitContainersAndPushSiblings: ()=>fitContainersAndPushSiblings,
|
|
34
35
|
DEFAULT_CONTAINER_MIN_HEIGHT: ()=>DEFAULT_CONTAINER_MIN_HEIGHT,
|
|
@@ -105,6 +106,52 @@ function container_getContainerFitGeometry() {
|
|
|
105
106
|
padding
|
|
106
107
|
};
|
|
107
108
|
}
|
|
109
|
+
function resolveResizeMinimum(minSize, currentSize, requiredSize) {
|
|
110
|
+
const requiredMinimum = Math.max(minSize, (0, external_NodeUtils_cjs_namespaceObject.snapUpToGrid)(requiredSize));
|
|
111
|
+
const currentResizeFloor = Math.max(minSize, currentSize);
|
|
112
|
+
return Math.min(currentResizeFloor, requiredMinimum);
|
|
113
|
+
}
|
|
114
|
+
function getContainerResizeMinimums(containerNode, nodes, { minWidth = DEFAULT_CONTAINER_MIN_WIDTH, minHeight = DEFAULT_CONTAINER_MIN_HEIGHT, ignoredNodeTypes = [] } = {}) {
|
|
115
|
+
const currentSize = container_getNodeDimensions(containerNode, {
|
|
116
|
+
width: DEFAULT_CONTAINER_WIDTH,
|
|
117
|
+
height: DEFAULT_CONTAINER_HEIGHT
|
|
118
|
+
});
|
|
119
|
+
const padding = container_getContainerSafeArea(containerNode, currentSize).padding ?? {};
|
|
120
|
+
const ignoredTypes = new Set(ignoredNodeTypes);
|
|
121
|
+
let childBounds;
|
|
122
|
+
for (const childNode of nodes){
|
|
123
|
+
if (childNode.id === external_constants_cjs_namespaceObject.PREVIEW_NODE_ID || childNode.hidden || childNode.parentId !== containerNode.id || ignoredTypes.has(childNode.type ?? '')) continue;
|
|
124
|
+
const childSize = container_getNodeDimensions(childNode);
|
|
125
|
+
const nextBounds = {
|
|
126
|
+
left: childNode.position.x,
|
|
127
|
+
right: childNode.position.x + childSize.width,
|
|
128
|
+
top: childNode.position.y,
|
|
129
|
+
bottom: childNode.position.y + childSize.height
|
|
130
|
+
};
|
|
131
|
+
childBounds = childBounds ? {
|
|
132
|
+
left: Math.min(childBounds.left, nextBounds.left),
|
|
133
|
+
right: Math.max(childBounds.right, nextBounds.right),
|
|
134
|
+
top: Math.min(childBounds.top, nextBounds.top),
|
|
135
|
+
bottom: Math.max(childBounds.bottom, nextBounds.bottom)
|
|
136
|
+
} : nextBounds;
|
|
137
|
+
}
|
|
138
|
+
if (!childBounds) return {
|
|
139
|
+
left: minWidth,
|
|
140
|
+
right: minWidth,
|
|
141
|
+
top: minHeight,
|
|
142
|
+
bottom: minHeight
|
|
143
|
+
};
|
|
144
|
+
const leftEdgeLimit = currentSize.width - childBounds.left + (padding.left ?? 0);
|
|
145
|
+
const topEdgeLimit = currentSize.height - childBounds.top + (padding.top ?? 0);
|
|
146
|
+
const rightEdgeLimit = childBounds.right + (padding.right ?? 0);
|
|
147
|
+
const bottomEdgeLimit = childBounds.bottom + (padding.bottom ?? 0);
|
|
148
|
+
return {
|
|
149
|
+
left: resolveResizeMinimum(minWidth, currentSize.width, leftEdgeLimit),
|
|
150
|
+
right: resolveResizeMinimum(minWidth, currentSize.width, rightEdgeLimit),
|
|
151
|
+
top: resolveResizeMinimum(minHeight, currentSize.height, topEdgeLimit),
|
|
152
|
+
bottom: resolveResizeMinimum(minHeight, currentSize.height, bottomEdgeLimit)
|
|
153
|
+
};
|
|
154
|
+
}
|
|
108
155
|
function isContainerNodeManifest(manifest) {
|
|
109
156
|
return manifest?.display.shape === 'container';
|
|
110
157
|
}
|
|
@@ -352,7 +399,7 @@ function collectLinearDownstreamSiblings({ startNodeId, parentId, nodes, edges,
|
|
|
352
399
|
}
|
|
353
400
|
return collectedIds;
|
|
354
401
|
}
|
|
355
|
-
function resolveInsertPreview({ source, sourceHandleType, reactFlowInstance, isContainerNode, replacedEdge: exactReplacedEdge, getContainerSafeArea, previewNodeSize, gap, getNodeDimensions }) {
|
|
402
|
+
function resolveInsertPreview({ source, sourceHandleType, reactFlowInstance, isContainerNode, allowedContainerId, replacedEdge: exactReplacedEdge, getContainerSafeArea, previewNodeSize, gap, getNodeDimensions }) {
|
|
356
403
|
if ('source' !== sourceHandleType || !source.handleId) return null;
|
|
357
404
|
const replacedEdge = exactReplacedEdge ?? getSingleOutgoingEdge(source.nodeId, source.handleId, reactFlowInstance.getEdges());
|
|
358
405
|
if (!replacedEdge) return null;
|
|
@@ -362,6 +409,7 @@ function resolveInsertPreview({ source, sourceHandleType, reactFlowInstance, isC
|
|
|
362
409
|
const nodes = reactFlowInstance.getNodes();
|
|
363
410
|
const containerNode = getContainerNodeForEdge(sourceNode, targetNode, nodes);
|
|
364
411
|
if (!containerNode) return null;
|
|
412
|
+
if (allowedContainerId && containerNode.id !== allowedContainerId) return null;
|
|
365
413
|
if (isContainerNode && !isContainerNode(containerNode)) return null;
|
|
366
414
|
const containerPlacement = getPreviewPlacement({
|
|
367
415
|
sourceNode,
|
|
@@ -401,6 +449,7 @@ function resolveAppendPreview({ source, sourceHandleType, reactFlowInstance, ...
|
|
|
401
449
|
if (outgoingEdges.length > 0) return null;
|
|
402
450
|
const nodes = reactFlowInstance.getNodes();
|
|
403
451
|
const containerNode = nodes.find((node)=>node.id === sourceNode.parentId);
|
|
452
|
+
if (options.allowedContainerId && containerNode.id !== options.allowedContainerId) return null;
|
|
404
453
|
if (options.isContainerNode && !options.isContainerNode(containerNode)) return null;
|
|
405
454
|
const continuationTarget = options.getContainerContinuationTarget?.({
|
|
406
455
|
containerNode,
|
|
@@ -675,6 +724,7 @@ exports.fitContainersAndPushSiblings = __webpack_exports__.fitContainersAndPushS
|
|
|
675
724
|
exports.getContainerFitGeometry = __webpack_exports__.getContainerFitGeometry;
|
|
676
725
|
exports.getContainerNodeForEdge = __webpack_exports__.getContainerNodeForEdge;
|
|
677
726
|
exports.getContainerPlacement = __webpack_exports__.getContainerPlacement;
|
|
727
|
+
exports.getContainerResizeMinimums = __webpack_exports__.getContainerResizeMinimums;
|
|
678
728
|
exports.getContainerSafeArea = __webpack_exports__.getContainerSafeArea;
|
|
679
729
|
exports.getNodeDimensions = __webpack_exports__.getNodeDimensions;
|
|
680
730
|
exports.isContainerNodeManifest = __webpack_exports__.isContainerNodeManifest;
|
|
@@ -693,6 +743,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
693
743
|
"getContainerFitGeometry",
|
|
694
744
|
"getContainerNodeForEdge",
|
|
695
745
|
"getContainerPlacement",
|
|
746
|
+
"getContainerResizeMinimums",
|
|
696
747
|
"getContainerSafeArea",
|
|
697
748
|
"getNodeDimensions",
|
|
698
749
|
"isContainerNodeManifest",
|
|
@@ -32,6 +32,12 @@ export interface ContainerSizeChange {
|
|
|
32
32
|
previousSize: NodeDimensions;
|
|
33
33
|
nextSize: NodeDimensions;
|
|
34
34
|
}
|
|
35
|
+
export interface ContainerResizeMinimums {
|
|
36
|
+
left: number;
|
|
37
|
+
right: number;
|
|
38
|
+
top: number;
|
|
39
|
+
bottom: number;
|
|
40
|
+
}
|
|
35
41
|
export interface EnsureContainersFitChildrenResult {
|
|
36
42
|
nodes: Node[];
|
|
37
43
|
changes: ContainerSizeChange[];
|
|
@@ -49,6 +55,7 @@ interface ContainerPreviewContext {
|
|
|
49
55
|
}
|
|
50
56
|
interface ContainerPreviewOptions {
|
|
51
57
|
isContainerNode?: (node: Node) => boolean;
|
|
58
|
+
allowedContainerId?: string;
|
|
52
59
|
replacedEdge?: Edge;
|
|
53
60
|
getContainerSafeArea?: (containerNode: Node) => ContainerSafeArea | undefined;
|
|
54
61
|
getContainerContinuationTarget?: (context: {
|
|
@@ -79,6 +86,11 @@ export declare const CONTAINER_SEQUENCE_GAP_PX: number;
|
|
|
79
86
|
export declare function getNodeDimensions(node: Pick<Node, 'width' | 'height' | 'measured' | 'style'>, fallback?: NodeDimensions): NodeDimensions;
|
|
80
87
|
export declare function getContainerSafeArea(containerNode: Pick<Node, 'width' | 'height' | 'measured' | 'style'>, fallback?: NodeDimensions): ContainerSafeArea;
|
|
81
88
|
export declare function getContainerFitGeometry(): ContainerFitGeometry;
|
|
89
|
+
export declare function getContainerResizeMinimums(containerNode: Pick<Node, 'id' | 'width' | 'height' | 'measured' | 'style'>, nodes: Node[], { minWidth, minHeight, ignoredNodeTypes, }?: {
|
|
90
|
+
minWidth?: number;
|
|
91
|
+
minHeight?: number;
|
|
92
|
+
ignoredNodeTypes?: string[];
|
|
93
|
+
}): ContainerResizeMinimums;
|
|
82
94
|
export declare function isContainerNodeManifest(manifest: Pick<NodeManifest, 'display'> | undefined): boolean;
|
|
83
95
|
export declare function ensureContainersFitChildren(nodes: Node[], { containerIds, getContainerFitGeometry: resolveContainerFitGeometry, getNodeDimensions: resolveNodeDimensions, ignoredNodeTypes, includeAncestors, }?: {
|
|
84
96
|
containerIds?: Iterable<string>;
|
|
@@ -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,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAanF,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAOD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAMD,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAGD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAGD,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAA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uBAAuB,EAAE,2BAAqD,EAC9E,iBAAiB,EAAE,qBAAyC,EAC5D,GAA+B,EAC/B,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,GACN,EAAE;IACD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,EAAE,IAAI,CAAC;IACnB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,uBAAuB,CAAC,EAAE,CAAC,aAAa,EAAE,IAAI,KAAK,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3F,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,cAAc,CAAC;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB,GAAG,IAAI,EAAE,CA+FT"}
|
|
@@ -61,6 +61,52 @@ function container_getContainerFitGeometry() {
|
|
|
61
61
|
padding
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
+
function resolveResizeMinimum(minSize, currentSize, requiredSize) {
|
|
65
|
+
const requiredMinimum = Math.max(minSize, snapUpToGrid(requiredSize));
|
|
66
|
+
const currentResizeFloor = Math.max(minSize, currentSize);
|
|
67
|
+
return Math.min(currentResizeFloor, requiredMinimum);
|
|
68
|
+
}
|
|
69
|
+
function getContainerResizeMinimums(containerNode, nodes, { minWidth = DEFAULT_CONTAINER_MIN_WIDTH, minHeight = DEFAULT_CONTAINER_MIN_HEIGHT, ignoredNodeTypes = [] } = {}) {
|
|
70
|
+
const currentSize = container_getNodeDimensions(containerNode, {
|
|
71
|
+
width: DEFAULT_CONTAINER_WIDTH,
|
|
72
|
+
height: DEFAULT_CONTAINER_HEIGHT
|
|
73
|
+
});
|
|
74
|
+
const padding = container_getContainerSafeArea(containerNode, currentSize).padding ?? {};
|
|
75
|
+
const ignoredTypes = new Set(ignoredNodeTypes);
|
|
76
|
+
let childBounds;
|
|
77
|
+
for (const childNode of nodes){
|
|
78
|
+
if (childNode.id === PREVIEW_NODE_ID || childNode.hidden || childNode.parentId !== containerNode.id || ignoredTypes.has(childNode.type ?? '')) continue;
|
|
79
|
+
const childSize = container_getNodeDimensions(childNode);
|
|
80
|
+
const nextBounds = {
|
|
81
|
+
left: childNode.position.x,
|
|
82
|
+
right: childNode.position.x + childSize.width,
|
|
83
|
+
top: childNode.position.y,
|
|
84
|
+
bottom: childNode.position.y + childSize.height
|
|
85
|
+
};
|
|
86
|
+
childBounds = childBounds ? {
|
|
87
|
+
left: Math.min(childBounds.left, nextBounds.left),
|
|
88
|
+
right: Math.max(childBounds.right, nextBounds.right),
|
|
89
|
+
top: Math.min(childBounds.top, nextBounds.top),
|
|
90
|
+
bottom: Math.max(childBounds.bottom, nextBounds.bottom)
|
|
91
|
+
} : nextBounds;
|
|
92
|
+
}
|
|
93
|
+
if (!childBounds) return {
|
|
94
|
+
left: minWidth,
|
|
95
|
+
right: minWidth,
|
|
96
|
+
top: minHeight,
|
|
97
|
+
bottom: minHeight
|
|
98
|
+
};
|
|
99
|
+
const leftEdgeLimit = currentSize.width - childBounds.left + (padding.left ?? 0);
|
|
100
|
+
const topEdgeLimit = currentSize.height - childBounds.top + (padding.top ?? 0);
|
|
101
|
+
const rightEdgeLimit = childBounds.right + (padding.right ?? 0);
|
|
102
|
+
const bottomEdgeLimit = childBounds.bottom + (padding.bottom ?? 0);
|
|
103
|
+
return {
|
|
104
|
+
left: resolveResizeMinimum(minWidth, currentSize.width, leftEdgeLimit),
|
|
105
|
+
right: resolveResizeMinimum(minWidth, currentSize.width, rightEdgeLimit),
|
|
106
|
+
top: resolveResizeMinimum(minHeight, currentSize.height, topEdgeLimit),
|
|
107
|
+
bottom: resolveResizeMinimum(minHeight, currentSize.height, bottomEdgeLimit)
|
|
108
|
+
};
|
|
109
|
+
}
|
|
64
110
|
function isContainerNodeManifest(manifest) {
|
|
65
111
|
return manifest?.display.shape === 'container';
|
|
66
112
|
}
|
|
@@ -308,7 +354,7 @@ function collectLinearDownstreamSiblings({ startNodeId, parentId, nodes, edges,
|
|
|
308
354
|
}
|
|
309
355
|
return collectedIds;
|
|
310
356
|
}
|
|
311
|
-
function resolveInsertPreview({ source, sourceHandleType, reactFlowInstance, isContainerNode, replacedEdge: exactReplacedEdge, getContainerSafeArea, previewNodeSize, gap, getNodeDimensions }) {
|
|
357
|
+
function resolveInsertPreview({ source, sourceHandleType, reactFlowInstance, isContainerNode, allowedContainerId, replacedEdge: exactReplacedEdge, getContainerSafeArea, previewNodeSize, gap, getNodeDimensions }) {
|
|
312
358
|
if ('source' !== sourceHandleType || !source.handleId) return null;
|
|
313
359
|
const replacedEdge = exactReplacedEdge ?? getSingleOutgoingEdge(source.nodeId, source.handleId, reactFlowInstance.getEdges());
|
|
314
360
|
if (!replacedEdge) return null;
|
|
@@ -318,6 +364,7 @@ function resolveInsertPreview({ source, sourceHandleType, reactFlowInstance, isC
|
|
|
318
364
|
const nodes = reactFlowInstance.getNodes();
|
|
319
365
|
const containerNode = getContainerNodeForEdge(sourceNode, targetNode, nodes);
|
|
320
366
|
if (!containerNode) return null;
|
|
367
|
+
if (allowedContainerId && containerNode.id !== allowedContainerId) return null;
|
|
321
368
|
if (isContainerNode && !isContainerNode(containerNode)) return null;
|
|
322
369
|
const containerPlacement = getPreviewPlacement({
|
|
323
370
|
sourceNode,
|
|
@@ -357,6 +404,7 @@ function resolveAppendPreview({ source, sourceHandleType, reactFlowInstance, ...
|
|
|
357
404
|
if (outgoingEdges.length > 0) return null;
|
|
358
405
|
const nodes = reactFlowInstance.getNodes();
|
|
359
406
|
const containerNode = nodes.find((node)=>node.id === sourceNode.parentId);
|
|
407
|
+
if (options.allowedContainerId && containerNode.id !== options.allowedContainerId) return null;
|
|
360
408
|
if (options.isContainerNode && !options.isContainerNode(containerNode)) return null;
|
|
361
409
|
const continuationTarget = options.getContainerContinuationTarget?.({
|
|
362
410
|
containerNode,
|
|
@@ -619,4 +667,4 @@ function placeContainerNode({ nodes, insertedNode, placement, safeArea, getConta
|
|
|
619
667
|
gap
|
|
620
668
|
});
|
|
621
669
|
}
|
|
622
|
-
export { CONTAINER_FRAME_INSET_PX, CONTAINER_SEQUENCE_GAP_PX, DEFAULT_CONTAINER_HEIGHT, DEFAULT_CONTAINER_MIN_HEIGHT, DEFAULT_CONTAINER_MIN_WIDTH, DEFAULT_CONTAINER_WIDTH, collectLinearDownstreamSiblings, ensureContainersFitChildren, fitContainersAndPushSiblings, container_getContainerFitGeometry as getContainerFitGeometry, getContainerNodeForEdge, getContainerPlacement, container_getContainerSafeArea as getContainerSafeArea, container_getNodeDimensions as getNodeDimensions, isContainerNodeManifest, placeContainerNode, resolveContainerPreview };
|
|
670
|
+
export { CONTAINER_FRAME_INSET_PX, CONTAINER_SEQUENCE_GAP_PX, DEFAULT_CONTAINER_HEIGHT, DEFAULT_CONTAINER_MIN_HEIGHT, DEFAULT_CONTAINER_MIN_WIDTH, DEFAULT_CONTAINER_WIDTH, collectLinearDownstreamSiblings, ensureContainersFitChildren, fitContainersAndPushSiblings, container_getContainerFitGeometry as getContainerFitGeometry, getContainerNodeForEdge, getContainerPlacement, getContainerResizeMinimums, container_getContainerSafeArea as getContainerSafeArea, container_getNodeDimensions as getNodeDimensions, isContainerNodeManifest, placeContainerNode, resolveContainerPreview };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.2-pr663.7a094a6",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -201,8 +201,8 @@
|
|
|
201
201
|
"use-sync-external-store": "^1.2.0",
|
|
202
202
|
"zod": "^4.3.5",
|
|
203
203
|
"zustand": "^5.0.9",
|
|
204
|
-
"@uipath/apollo-
|
|
205
|
-
"@uipath/apollo-
|
|
204
|
+
"@uipath/apollo-core": "5.9.0",
|
|
205
|
+
"@uipath/apollo-wind": "2.15.1"
|
|
206
206
|
},
|
|
207
207
|
"devDependencies": {
|
|
208
208
|
"@lingui/cli": "^5.6.1",
|