@uipath/apollo-react 4.7.0 → 4.8.1
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/AgentCanvas/agent-flow.manifest.d.ts +2 -2
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.cjs +0 -4
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.js +0 -4
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.cjs +5 -10
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.js +5 -10
- package/dist/canvas/components/BaseNode/BaseNode.cjs +29 -21
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +30 -22
- package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +1 -1
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNodeContainer.js +1 -1
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.cjs +1 -1
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.js +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.cjs +75 -128
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts +6 -5
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.js +77 -130
- package/dist/canvas/components/ButtonHandle/HandleButton.cjs +152 -0
- package/dist/canvas/components/ButtonHandle/HandleButton.d.ts +16 -0
- package/dist/canvas/components/ButtonHandle/HandleButton.d.ts.map +1 -0
- package/dist/canvas/components/ButtonHandle/HandleButton.js +115 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.cjs +62 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.d.ts +9 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.d.ts.map +1 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.js +28 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.cjs +53 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.d.ts +9 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.d.ts.map +1 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.js +19 -0
- package/dist/canvas/components/ButtonHandle/SmartHandle.cjs +28 -91
- package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts +1 -2
- package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/SmartHandle.js +29 -92
- package/dist/canvas/components/ButtonHandle/useButtonHandles.cjs +5 -4
- package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts +4 -2
- package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/useButtonHandles.js +5 -4
- package/dist/canvas/constants.cjs +4 -0
- package/dist/canvas/constants.d.ts +1 -0
- package/dist/canvas/constants.d.ts.map +1 -1
- package/dist/canvas/constants.js +2 -1
- package/dist/canvas/schema/node-definition/category-manifest.cjs +2 -2
- package/dist/canvas/schema/node-definition/category-manifest.d.ts +2 -2
- package/dist/canvas/schema/node-definition/category-manifest.js +2 -2
- package/dist/canvas/storybook-utils/manifests/index.d.ts +2 -2
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +2 -2
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.cjs +0 -220
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.d.ts +0 -46
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.d.ts.map +0 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.js +0 -161
|
@@ -14,11 +14,11 @@ export declare const agentFlowManifest: {
|
|
|
14
14
|
id: string;
|
|
15
15
|
name: string;
|
|
16
16
|
sortOrder: number;
|
|
17
|
-
color: string;
|
|
18
|
-
colorDark: string;
|
|
19
17
|
icon: string;
|
|
20
18
|
tags: string[];
|
|
21
19
|
parentId?: string | undefined;
|
|
20
|
+
color?: string | undefined;
|
|
21
|
+
colorDark?: string | undefined;
|
|
22
22
|
}[];
|
|
23
23
|
nodes: {
|
|
24
24
|
nodeType: string;
|
|
@@ -136,7 +136,6 @@ const AgentNodeComponent = /*#__PURE__*/ (0, external_react_namespaceObject.memo
|
|
|
136
136
|
handleType: 'artifact',
|
|
137
137
|
label: translations.memory,
|
|
138
138
|
showButton: 'design' === mode && !hasMemory,
|
|
139
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
140
139
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
141
140
|
visible: displayMemory,
|
|
142
141
|
onAction: (_e)=>{
|
|
@@ -149,7 +148,6 @@ const AgentNodeComponent = /*#__PURE__*/ (0, external_react_namespaceObject.memo
|
|
|
149
148
|
handleType: 'artifact',
|
|
150
149
|
label: translations.escalations,
|
|
151
150
|
showButton: 'design' === mode,
|
|
152
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
153
151
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
154
152
|
visible: displayEscalation,
|
|
155
153
|
onAction: (_e)=>{
|
|
@@ -168,7 +166,6 @@ const AgentNodeComponent = /*#__PURE__*/ (0, external_react_namespaceObject.memo
|
|
|
168
166
|
handleType: 'artifact',
|
|
169
167
|
label: translations.context,
|
|
170
168
|
showButton: 'design' === mode,
|
|
171
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
172
169
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
173
170
|
visible: displayContext,
|
|
174
171
|
onAction: (_e)=>{
|
|
@@ -180,7 +177,6 @@ const AgentNodeComponent = /*#__PURE__*/ (0, external_react_namespaceObject.memo
|
|
|
180
177
|
handleType: 'artifact',
|
|
181
178
|
label: translations.tools,
|
|
182
179
|
showButton: 'design' === mode,
|
|
183
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
184
180
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
185
181
|
visible: displayTool || displayMcp || displayA2a,
|
|
186
182
|
onAction: (_e)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentNode.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/AgentCanvas/nodes/AgentNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAIhF,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AA8BlE,UAAU,aAAc,SAAQ,YAAY;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM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AAO,MAAM,gBAAgB,8CAxDI,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,cAAc,6CAwD1B,CAAC;AAEvD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -108,7 +108,6 @@ const AgentNodeComponent = /*#__PURE__*/ memo((props)=>{
|
|
|
108
108
|
handleType: 'artifact',
|
|
109
109
|
label: translations.memory,
|
|
110
110
|
showButton: 'design' === mode && !hasMemory,
|
|
111
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
112
111
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
113
112
|
visible: displayMemory,
|
|
114
113
|
onAction: (_e)=>{
|
|
@@ -121,7 +120,6 @@ const AgentNodeComponent = /*#__PURE__*/ memo((props)=>{
|
|
|
121
120
|
handleType: 'artifact',
|
|
122
121
|
label: translations.escalations,
|
|
123
122
|
showButton: 'design' === mode,
|
|
124
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
125
123
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
126
124
|
visible: displayEscalation,
|
|
127
125
|
onAction: (_e)=>{
|
|
@@ -140,7 +138,6 @@ const AgentNodeComponent = /*#__PURE__*/ memo((props)=>{
|
|
|
140
138
|
handleType: 'artifact',
|
|
141
139
|
label: translations.context,
|
|
142
140
|
showButton: 'design' === mode,
|
|
143
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
144
141
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
145
142
|
visible: displayContext,
|
|
146
143
|
onAction: (_e)=>{
|
|
@@ -152,7 +149,6 @@ const AgentNodeComponent = /*#__PURE__*/ memo((props)=>{
|
|
|
152
149
|
handleType: 'artifact',
|
|
153
150
|
label: translations.tools,
|
|
154
151
|
showButton: 'design' === mode,
|
|
155
|
-
color: 'var(--canvas-foreground-de-emp)',
|
|
156
152
|
labelBackgroundColor: 'var(--canvas-background-secondary)',
|
|
157
153
|
visible: displayTool || displayMcp || displayA2a,
|
|
158
154
|
onAction: (_e)=>{
|
|
@@ -323,8 +323,7 @@ const ResourceNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ d
|
|
|
323
323
|
id: react_cjs_namespaceObject.Position.Top,
|
|
324
324
|
type: 'target',
|
|
325
325
|
handleType: 'artifact',
|
|
326
|
-
showButton: false
|
|
327
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
326
|
+
showButton: false
|
|
328
327
|
}
|
|
329
328
|
], []);
|
|
330
329
|
const toolBottomHandles = (0, external_react_namespaceObject.useMemo)(()=>[
|
|
@@ -332,8 +331,7 @@ const ResourceNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ d
|
|
|
332
331
|
id: react_cjs_namespaceObject.Position.Bottom,
|
|
333
332
|
type: 'source',
|
|
334
333
|
handleType: 'artifact',
|
|
335
|
-
showButton: false
|
|
336
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
334
|
+
showButton: false
|
|
337
335
|
}
|
|
338
336
|
], []);
|
|
339
337
|
const contextHandles = (0, external_react_namespaceObject.useMemo)(()=>[
|
|
@@ -341,8 +339,7 @@ const ResourceNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ d
|
|
|
341
339
|
id: react_cjs_namespaceObject.Position.Top,
|
|
342
340
|
type: 'source',
|
|
343
341
|
handleType: 'artifact',
|
|
344
|
-
showButton: false
|
|
345
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
342
|
+
showButton: false
|
|
346
343
|
}
|
|
347
344
|
], []);
|
|
348
345
|
const escalationHandles = (0, external_react_namespaceObject.useMemo)(()=>[
|
|
@@ -350,8 +347,7 @@ const ResourceNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ d
|
|
|
350
347
|
id: react_cjs_namespaceObject.Position.Bottom,
|
|
351
348
|
type: 'target',
|
|
352
349
|
handleType: 'artifact',
|
|
353
|
-
showButton: false
|
|
354
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
350
|
+
showButton: false
|
|
355
351
|
}
|
|
356
352
|
], []);
|
|
357
353
|
const memoryHandles = (0, external_react_namespaceObject.useMemo)(()=>[
|
|
@@ -359,8 +355,7 @@ const ResourceNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ d
|
|
|
359
355
|
id: react_cjs_namespaceObject.Position.Bottom,
|
|
360
356
|
type: 'target',
|
|
361
357
|
handleType: 'artifact',
|
|
362
|
-
showButton: false
|
|
363
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
358
|
+
showButton: false
|
|
364
359
|
}
|
|
365
360
|
], []);
|
|
366
361
|
const breakpointAdornment = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceNode.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/AgentCanvas/nodes/ResourceNode.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,0CAA0C,CAAC;AAGpF,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAE9B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAcxB,UAAU,iBAAkB,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IAClE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC7E,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC9E,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACpF,k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({ data, selected, id, mode, hasError =
|
|
|
295
295
|
id: Position.Top,
|
|
296
296
|
type: 'target',
|
|
297
297
|
handleType: 'artifact',
|
|
298
|
-
showButton: false
|
|
299
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
298
|
+
showButton: false
|
|
300
299
|
}
|
|
301
300
|
], []);
|
|
302
301
|
const toolBottomHandles = useMemo(()=>[
|
|
@@ -304,8 +303,7 @@ const ResourceNode = /*#__PURE__*/ memo(({ data, selected, id, mode, hasError =
|
|
|
304
303
|
id: Position.Bottom,
|
|
305
304
|
type: 'source',
|
|
306
305
|
handleType: 'artifact',
|
|
307
|
-
showButton: false
|
|
308
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
306
|
+
showButton: false
|
|
309
307
|
}
|
|
310
308
|
], []);
|
|
311
309
|
const contextHandles = useMemo(()=>[
|
|
@@ -313,8 +311,7 @@ const ResourceNode = /*#__PURE__*/ memo(({ data, selected, id, mode, hasError =
|
|
|
313
311
|
id: Position.Top,
|
|
314
312
|
type: 'source',
|
|
315
313
|
handleType: 'artifact',
|
|
316
|
-
showButton: false
|
|
317
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
314
|
+
showButton: false
|
|
318
315
|
}
|
|
319
316
|
], []);
|
|
320
317
|
const escalationHandles = useMemo(()=>[
|
|
@@ -322,8 +319,7 @@ const ResourceNode = /*#__PURE__*/ memo(({ data, selected, id, mode, hasError =
|
|
|
322
319
|
id: Position.Bottom,
|
|
323
320
|
type: 'target',
|
|
324
321
|
handleType: 'artifact',
|
|
325
|
-
showButton: false
|
|
326
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
322
|
+
showButton: false
|
|
327
323
|
}
|
|
328
324
|
], []);
|
|
329
325
|
const memoryHandles = useMemo(()=>[
|
|
@@ -331,8 +327,7 @@ const ResourceNode = /*#__PURE__*/ memo(({ data, selected, id, mode, hasError =
|
|
|
331
327
|
id: Position.Bottom,
|
|
332
328
|
type: 'target',
|
|
333
329
|
handleType: 'artifact',
|
|
334
|
-
showButton: false
|
|
335
|
-
color: 'var(--canvas-foreground-de-emp)'
|
|
330
|
+
showButton: false
|
|
336
331
|
}
|
|
337
332
|
], []);
|
|
338
333
|
const breakpointAdornment = useMemo(()=>{
|
|
@@ -49,7 +49,7 @@ const external_BaseNodeContainer_cjs_namespaceObject = require("./BaseNodeContai
|
|
|
49
49
|
const external_BaseNodeInnerShape_cjs_namespaceObject = require("./BaseNodeInnerShape.cjs");
|
|
50
50
|
const external_BaseNodeMissingManifest_cjs_namespaceObject = require("./BaseNodeMissingManifest.cjs");
|
|
51
51
|
const external_NodeLabel_cjs_namespaceObject = require("./NodeLabel.cjs");
|
|
52
|
-
const selectIsConnecting = (state)=>!!state.
|
|
52
|
+
const selectIsConnecting = (state)=>!!state.connection.inProgress;
|
|
53
53
|
const getContainerWidth = (shape, width)=>{
|
|
54
54
|
const defaultWidth = 'rectangle' === shape ? external_constants_cjs_namespaceObject.DEFAULT_RECTANGLE_NODE_WIDTH : external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE;
|
|
55
55
|
if (width && width !== external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE && width !== external_constants_cjs_namespaceObject.DEFAULT_RECTANGLE_NODE_WIDTH) return width;
|
|
@@ -76,7 +76,9 @@ const BaseNodeComponent = (props)=>{
|
|
|
76
76
|
const containerRef = (0, external_react_namespaceObject.useRef)(null);
|
|
77
77
|
const [isHovered, setIsHovered] = (0, external_react_namespaceObject.useState)(false);
|
|
78
78
|
const [isFocused, setIsFocused] = (0, external_react_namespaceObject.useState)(false);
|
|
79
|
-
const
|
|
79
|
+
const syncedHeightRef = (0, external_react_namespaceObject.useRef)(void 0);
|
|
80
|
+
const baseHeightRef = (0, external_react_namespaceObject.useRef)(external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE);
|
|
81
|
+
if (height && height !== syncedHeightRef.current) baseHeightRef.current = height;
|
|
80
82
|
const executionState = (0, external_hooks_index_cjs_namespaceObject.useNodeExecutionState)(id);
|
|
81
83
|
const validationState = (0, external_hooks_index_cjs_namespaceObject.useElementValidationStatus)(id);
|
|
82
84
|
const nodeTypeRegistry = (0, index_cjs_namespaceObject.useNodeTypeRegistry)();
|
|
@@ -175,13 +177,14 @@ const BaseNodeComponent = (props)=>{
|
|
|
175
177
|
statusContext
|
|
176
178
|
]);
|
|
177
179
|
const computedHeight = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
178
|
-
const handleSpacing = 2 * external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
179
|
-
const leftHandles = handleConfigurations.filter((config)=>config.position === react_cjs_namespaceObject.Position.Left && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
180
|
-
const rightHandles = handleConfigurations.filter((config)=>config.position === react_cjs_namespaceObject.Position.Right && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
180
|
+
const handleSpacing = 2.5 * external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
181
|
+
const leftHandles = handleConfigurations.filter((config)=>config.position === react_cjs_namespaceObject.Position.Left && false !== config.visible).reduce((count, config)=>count + config.handles.filter((h)=>false !== h.visible).length, 0);
|
|
182
|
+
const rightHandles = handleConfigurations.filter((config)=>config.position === react_cjs_namespaceObject.Position.Right && false !== config.visible).reduce((count, config)=>count + config.handles.filter((h)=>false !== h.visible).length, 0);
|
|
181
183
|
const leftRightHandles = Math.max(leftHandles, rightHandles);
|
|
182
|
-
return Math.max(
|
|
184
|
+
return Math.max(baseHeightRef.current, leftRightHandles * handleSpacing);
|
|
183
185
|
}, [
|
|
184
|
-
handleConfigurations
|
|
186
|
+
handleConfigurations,
|
|
187
|
+
height
|
|
185
188
|
]);
|
|
186
189
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
187
190
|
updateNodeInternals(id);
|
|
@@ -191,11 +194,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
191
194
|
updateNodeInternals
|
|
192
195
|
]);
|
|
193
196
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
194
|
-
if (!originalHeightRef.current && height) {
|
|
195
|
-
originalHeightRef.current = height;
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
197
|
if (void 0 !== computedHeight && computedHeight !== height) {
|
|
198
|
+
syncedHeightRef.current = computedHeight;
|
|
199
199
|
const frameId = requestAnimationFrame(()=>{
|
|
200
200
|
updateNode(id, {
|
|
201
201
|
height: computedHeight
|
|
@@ -233,20 +233,27 @@ const BaseNodeComponent = (props)=>{
|
|
|
233
233
|
const containerWidth = getContainerWidth(displayShape, width);
|
|
234
234
|
const containerHeight = getContainerHeight(height, hasFooter, displayFooterVariant);
|
|
235
235
|
const nodeVars = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
236
|
-
const numH = 'number' == typeof containerHeight ? containerHeight :
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
236
|
+
const numH = 'number' == typeof containerHeight ? containerHeight : external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE;
|
|
237
|
+
const getRadius = (basis, ratio)=>'circle' === displayShape ? '50%' : hasFooter ? `${external_constants_cjs_namespaceObject.GRID_SPACING}px` : `${basis * ratio}px`;
|
|
238
|
+
const radiusBasis = Math.min(containerWidth, numH);
|
|
239
|
+
const nodeRadius = getRadius(radiusBasis, external_constants_cjs_namespaceObject.NODE_CONTAINER_RADIUS_RATIO);
|
|
240
|
+
const effectiveH = hasFooter ? external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE : numH;
|
|
240
241
|
const effectiveW = hasFooter ? external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE : containerWidth;
|
|
241
|
-
const
|
|
242
|
-
const innerRadius =
|
|
242
|
+
const innerBasis = Math.min(effectiveH, effectiveW);
|
|
243
|
+
const innerRadius = getRadius(innerBasis, external_constants_cjs_namespaceObject.NODE_INNER_RADIUS_RATIO);
|
|
244
|
+
const gap = innerBasis * (1 - external_constants_cjs_namespaceObject.NODE_INNER_SHAPE_RATIO);
|
|
245
|
+
const keepSquare = 'circle' === displayShape || 'rectangle' === displayShape;
|
|
246
|
+
const innerW = keepSquare ? innerBasis - gap : effectiveW - gap;
|
|
247
|
+
const innerH = keepSquare ? innerBasis - gap : effectiveH - gap;
|
|
243
248
|
return {
|
|
244
249
|
'--node-w': `${containerWidth}px`,
|
|
245
|
-
'--node-h':
|
|
250
|
+
'--node-h': 'number' == typeof containerHeight ? `${containerHeight}px` : 'auto',
|
|
246
251
|
'--node-radius': nodeRadius,
|
|
247
|
-
'--
|
|
252
|
+
'--node-gap': `${(gap - 2 * external_constants_cjs_namespaceObject.NODE_BORDER_SIZE) / 2}px`,
|
|
253
|
+
'--inner-w': `${innerW}px`,
|
|
254
|
+
'--inner-h': `${innerH}px`,
|
|
248
255
|
'--inner-radius': innerRadius,
|
|
249
|
-
'--icon-size': `${
|
|
256
|
+
'--icon-size': `${innerBasis * external_constants_cjs_namespaceObject.NODE_INNER_ICON_RATIO}px`
|
|
250
257
|
};
|
|
251
258
|
}, [
|
|
252
259
|
containerWidth,
|
|
@@ -318,7 +325,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
318
325
|
handleAction,
|
|
319
326
|
nodeId: id,
|
|
320
327
|
selected: selected ?? false,
|
|
321
|
-
|
|
328
|
+
hovered: isHovered,
|
|
329
|
+
showAddButton: 'design' === mode && !multipleNodesSelected && !isConnecting,
|
|
322
330
|
showNotches,
|
|
323
331
|
nodeWidth: width,
|
|
324
332
|
nodeHeight: height,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;AAsChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AA6mB1B,eAAO,MAAM,QAAQ,8CAhkBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAgkBhB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Position, useReactFlow, useStore, useUpdateNodeInternals } from "../../xyflow/react.js";
|
|
3
3
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
import { DEFAULT_NODE_SIZE, DEFAULT_RECTANGLE_NODE_WIDTH, GRID_SPACING, NODE_CONTAINER_RADIUS_RATIO, NODE_HEIGHT_DEFAULT, NODE_HEIGHT_FOOTER_BUTTON, NODE_HEIGHT_FOOTER_DOUBLE, NODE_HEIGHT_FOOTER_SINGLE, NODE_INNER_ICON_RATIO, NODE_INNER_RADIUS_RATIO, NODE_INNER_SHAPE_RATIO } from "../../constants.js";
|
|
4
|
+
import { DEFAULT_NODE_SIZE, DEFAULT_RECTANGLE_NODE_WIDTH, GRID_SPACING, NODE_BORDER_SIZE, NODE_CONTAINER_RADIUS_RATIO, NODE_HEIGHT_DEFAULT, NODE_HEIGHT_FOOTER_BUTTON, NODE_HEIGHT_FOOTER_DOUBLE, NODE_HEIGHT_FOOTER_SINGLE, NODE_INNER_ICON_RATIO, NODE_INNER_RADIUS_RATIO, NODE_INNER_SHAPE_RATIO } from "../../constants.js";
|
|
5
5
|
import { useNodeTypeRegistry } from "../../core/index.js";
|
|
6
6
|
import { useElementValidationStatus, useNodeExecutionState } from "../../hooks/index.js";
|
|
7
7
|
import { resolveAdornments } from "../../utils/adornment-resolver.js";
|
|
@@ -21,7 +21,7 @@ import { BaseContainer } from "./BaseNodeContainer.js";
|
|
|
21
21
|
import { BaseInnerShape } from "./BaseNodeInnerShape.js";
|
|
22
22
|
import { MissingManifestNode } from "./BaseNodeMissingManifest.js";
|
|
23
23
|
import { NodeLabel } from "./NodeLabel.js";
|
|
24
|
-
const selectIsConnecting = (state)=>!!state.
|
|
24
|
+
const selectIsConnecting = (state)=>!!state.connection.inProgress;
|
|
25
25
|
const getContainerWidth = (shape, width)=>{
|
|
26
26
|
const defaultWidth = 'rectangle' === shape ? DEFAULT_RECTANGLE_NODE_WIDTH : DEFAULT_NODE_SIZE;
|
|
27
27
|
if (width && width !== DEFAULT_NODE_SIZE && width !== DEFAULT_RECTANGLE_NODE_WIDTH) return width;
|
|
@@ -48,7 +48,9 @@ const BaseNodeComponent = (props)=>{
|
|
|
48
48
|
const containerRef = useRef(null);
|
|
49
49
|
const [isHovered, setIsHovered] = useState(false);
|
|
50
50
|
const [isFocused, setIsFocused] = useState(false);
|
|
51
|
-
const
|
|
51
|
+
const syncedHeightRef = useRef(void 0);
|
|
52
|
+
const baseHeightRef = useRef(DEFAULT_NODE_SIZE);
|
|
53
|
+
if (height && height !== syncedHeightRef.current) baseHeightRef.current = height;
|
|
52
54
|
const executionState = useNodeExecutionState(id);
|
|
53
55
|
const validationState = useElementValidationStatus(id);
|
|
54
56
|
const nodeTypeRegistry = useNodeTypeRegistry();
|
|
@@ -147,13 +149,14 @@ const BaseNodeComponent = (props)=>{
|
|
|
147
149
|
statusContext
|
|
148
150
|
]);
|
|
149
151
|
const computedHeight = useMemo(()=>{
|
|
150
|
-
const handleSpacing = 2 * GRID_SPACING;
|
|
151
|
-
const leftHandles = handleConfigurations.filter((config)=>config.position === Position.Left && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
152
|
-
const rightHandles = handleConfigurations.filter((config)=>config.position === Position.Right && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
152
|
+
const handleSpacing = 2.5 * GRID_SPACING;
|
|
153
|
+
const leftHandles = handleConfigurations.filter((config)=>config.position === Position.Left && false !== config.visible).reduce((count, config)=>count + config.handles.filter((h)=>false !== h.visible).length, 0);
|
|
154
|
+
const rightHandles = handleConfigurations.filter((config)=>config.position === Position.Right && false !== config.visible).reduce((count, config)=>count + config.handles.filter((h)=>false !== h.visible).length, 0);
|
|
153
155
|
const leftRightHandles = Math.max(leftHandles, rightHandles);
|
|
154
|
-
return Math.max(
|
|
156
|
+
return Math.max(baseHeightRef.current, leftRightHandles * handleSpacing);
|
|
155
157
|
}, [
|
|
156
|
-
handleConfigurations
|
|
158
|
+
handleConfigurations,
|
|
159
|
+
height
|
|
157
160
|
]);
|
|
158
161
|
useEffect(()=>{
|
|
159
162
|
updateNodeInternals(id);
|
|
@@ -163,11 +166,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
163
166
|
updateNodeInternals
|
|
164
167
|
]);
|
|
165
168
|
useEffect(()=>{
|
|
166
|
-
if (!originalHeightRef.current && height) {
|
|
167
|
-
originalHeightRef.current = height;
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
169
|
if (void 0 !== computedHeight && computedHeight !== height) {
|
|
170
|
+
syncedHeightRef.current = computedHeight;
|
|
171
171
|
const frameId = requestAnimationFrame(()=>{
|
|
172
172
|
updateNode(id, {
|
|
173
173
|
height: computedHeight
|
|
@@ -205,20 +205,27 @@ const BaseNodeComponent = (props)=>{
|
|
|
205
205
|
const containerWidth = getContainerWidth(displayShape, width);
|
|
206
206
|
const containerHeight = getContainerHeight(height, hasFooter, displayFooterVariant);
|
|
207
207
|
const nodeVars = useMemo(()=>{
|
|
208
|
-
const numH = 'number' == typeof containerHeight ? containerHeight :
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
const
|
|
208
|
+
const numH = 'number' == typeof containerHeight ? containerHeight : DEFAULT_NODE_SIZE;
|
|
209
|
+
const getRadius = (basis, ratio)=>'circle' === displayShape ? '50%' : hasFooter ? `${GRID_SPACING}px` : `${basis * ratio}px`;
|
|
210
|
+
const radiusBasis = Math.min(containerWidth, numH);
|
|
211
|
+
const nodeRadius = getRadius(radiusBasis, NODE_CONTAINER_RADIUS_RATIO);
|
|
212
|
+
const effectiveH = hasFooter ? DEFAULT_NODE_SIZE : numH;
|
|
212
213
|
const effectiveW = hasFooter ? DEFAULT_NODE_SIZE : containerWidth;
|
|
213
|
-
const
|
|
214
|
-
const innerRadius =
|
|
214
|
+
const innerBasis = Math.min(effectiveH, effectiveW);
|
|
215
|
+
const innerRadius = getRadius(innerBasis, NODE_INNER_RADIUS_RATIO);
|
|
216
|
+
const gap = innerBasis * (1 - NODE_INNER_SHAPE_RATIO);
|
|
217
|
+
const keepSquare = 'circle' === displayShape || 'rectangle' === displayShape;
|
|
218
|
+
const innerW = keepSquare ? innerBasis - gap : effectiveW - gap;
|
|
219
|
+
const innerH = keepSquare ? innerBasis - gap : effectiveH - gap;
|
|
215
220
|
return {
|
|
216
221
|
'--node-w': `${containerWidth}px`,
|
|
217
|
-
'--node-h':
|
|
222
|
+
'--node-h': 'number' == typeof containerHeight ? `${containerHeight}px` : 'auto',
|
|
218
223
|
'--node-radius': nodeRadius,
|
|
219
|
-
'--
|
|
224
|
+
'--node-gap': `${(gap - 2 * NODE_BORDER_SIZE) / 2}px`,
|
|
225
|
+
'--inner-w': `${innerW}px`,
|
|
226
|
+
'--inner-h': `${innerH}px`,
|
|
220
227
|
'--inner-radius': innerRadius,
|
|
221
|
-
'--icon-size': `${
|
|
228
|
+
'--icon-size': `${innerBasis * NODE_INNER_ICON_RATIO}px`
|
|
222
229
|
};
|
|
223
230
|
}, [
|
|
224
231
|
containerWidth,
|
|
@@ -290,7 +297,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
290
297
|
handleAction,
|
|
291
298
|
nodeId: id,
|
|
292
299
|
selected: selected ?? false,
|
|
293
|
-
|
|
300
|
+
hovered: isHovered,
|
|
301
|
+
showAddButton: 'design' === mode && !multipleNodesSelected && !isConnecting,
|
|
294
302
|
showNotches,
|
|
295
303
|
nodeWidth: width,
|
|
296
304
|
nodeHeight: height,
|
|
@@ -55,7 +55,7 @@ const getStatusBorder = (status)=>{
|
|
|
55
55
|
};
|
|
56
56
|
const BaseContainer = ({ isSelected, isHovered, shape, interactionState, executionStatus, validationStatus, suggestionType, hasFooter, background, loading, children })=>{
|
|
57
57
|
const activeStatus = suggestionType ?? validationStatus ?? executionStatus;
|
|
58
|
-
const className = (0, external_react_namespaceObject.useMemo)(()=>(0, apollo_wind_namespaceObject.cn)('relative flex items-center cursor-pointer bg-surface-overlay border-2 border-border', 'w-(--node-w) h-(--node-h) rounded-(--node-radius)', 'rectangle' === shape ? 'flex-row justify-start gap-3 p-
|
|
58
|
+
const className = (0, external_react_namespaceObject.useMemo)(()=>(0, apollo_wind_namespaceObject.cn)('relative flex items-center cursor-pointer bg-surface-overlay border-2 border-border', 'w-(--node-w) h-(--node-h) rounded-(--node-radius)', 'rectangle' === shape ? 'flex-row justify-start gap-3 p-(--node-gap)' : 'flex-col justify-center', hasFooter && 'flex-wrap', getStatusBorder(activeStatus), !isSelected && isHovered && 'border-foreground-muted', isSelected && 'border-brand', isSelected && isHovered && 'border-foreground-accent-muted', 'disabled' === interactionState && 'opacity-50 cursor-not-allowed', 'drag' === interactionState && 'cursor-grabbing opacity-80'), [
|
|
59
59
|
shape,
|
|
60
60
|
hasFooter,
|
|
61
61
|
activeStatus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNodeContainer.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNodeContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,eAAO,MAAM,eAAe,GAC1B,SAAS,mBAAmB,GAAG,uBAAuB,GAAG,cAAc,KACtE,MAsBF,CAAC;AAEF,UAAU,kBAAkB;IAC1B,UAAU,CAAC,EA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;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,GAAI,kJAY3B,kBAAkB,4CAsCpB,CAAC"}
|
|
@@ -26,7 +26,7 @@ const getStatusBorder = (status)=>{
|
|
|
26
26
|
};
|
|
27
27
|
const BaseContainer = ({ isSelected, isHovered, shape, interactionState, executionStatus, validationStatus, suggestionType, hasFooter, background, loading, children })=>{
|
|
28
28
|
const activeStatus = suggestionType ?? validationStatus ?? executionStatus;
|
|
29
|
-
const className = useMemo(()=>cn('relative flex items-center cursor-pointer bg-surface-overlay border-2 border-border', 'w-(--node-w) h-(--node-h) rounded-(--node-radius)', 'rectangle' === shape ? 'flex-row justify-start gap-3 p-
|
|
29
|
+
const className = useMemo(()=>cn('relative flex items-center cursor-pointer bg-surface-overlay border-2 border-border', 'w-(--node-w) h-(--node-h) rounded-(--node-radius)', 'rectangle' === shape ? 'flex-row justify-start gap-3 p-(--node-gap)' : 'flex-col justify-center', hasFooter && 'flex-wrap', getStatusBorder(activeStatus), !isSelected && isHovered && 'border-foreground-muted', isSelected && 'border-brand', isSelected && isHovered && 'border-foreground-accent-muted', 'disabled' === interactionState && 'opacity-50 cursor-not-allowed', 'drag' === interactionState && 'cursor-grabbing opacity-80'), [
|
|
30
30
|
shape,
|
|
31
31
|
hasFooter,
|
|
32
32
|
activeStatus,
|
|
@@ -30,7 +30,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
31
31
|
const external_react_namespaceObject = require("react");
|
|
32
32
|
const BaseInnerShape = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ loading, color, background, children })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
33
|
-
className: " flex items-center justify-center overflow-hidden bg-surface text-foreground w-(--inner-
|
|
33
|
+
className: " flex items-center justify-center overflow-hidden bg-surface text-foreground w-(--inner-w) h-(--inner-h) rounded-(--inner-radius) [&>svg]:w-(--icon-size) [&>svg]:h-(--icon-size) [&>img]:w-(--icon-size) [&>img]:h-(--icon-size) [&>img]:object-contain ",
|
|
34
34
|
style: color || background ? {
|
|
35
35
|
color,
|
|
36
36
|
background
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Skeleton } from "@uipath/apollo-wind";
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
const BaseInnerShape = /*#__PURE__*/ memo(({ loading, color, background, children })=>/*#__PURE__*/ jsx("div", {
|
|
5
|
-
className: " flex items-center justify-center overflow-hidden bg-surface text-foreground w-(--inner-
|
|
5
|
+
className: " flex items-center justify-center overflow-hidden bg-surface text-foreground w-(--inner-w) h-(--inner-h) rounded-(--inner-radius) [&>svg]:w-(--icon-size) [&>svg]:h-(--icon-size) [&>img]:w-(--icon-size) [&>img]:h-(--icon-size) [&>img]:object-contain ",
|
|
6
6
|
style: color || background ? {
|
|
7
7
|
color,
|
|
8
8
|
background
|