@uipath/apollo-react 7.31.1 → 7.33.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/BaseNode/BaseNode.cjs +7 -5
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +8 -6
- package/dist/canvas/components/ButtonHandle/HandleButton.cjs +2 -2
- package/dist/canvas/components/ButtonHandle/HandleButton.js +2 -2
- package/dist/canvas/components/ContainerNode/ContainerNode.cjs +8 -2
- package/dist/canvas/components/ContainerNode/ContainerNode.d.ts.map +1 -1
- package/dist/canvas/components/ContainerNode/ContainerNode.js +9 -3
- 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/utils/NodeUtils.cjs +12 -1
- package/dist/canvas/utils/NodeUtils.d.ts +14 -0
- package/dist/canvas/utils/NodeUtils.d.ts.map +1 -1
- package/dist/canvas/utils/NodeUtils.js +9 -1
- package/dist/canvas/utils/icon-registry.cjs +13 -29
- package/dist/canvas/utils/icon-registry.d.ts.map +1 -1
- package/dist/canvas/utils/icon-registry.js +15 -31
- package/dist/decision-table/useGridLayout.cjs +2 -2
- package/dist/decision-table/useGridLayout.d.ts.map +1 -1
- package/dist/decision-table/useGridLayout.js +2 -2
- package/dist/icons/APIWorkflowGlyph.cjs +1 -0
- package/dist/icons/APIWorkflowGlyph.d.ts +2 -0
- package/dist/icons/APIWorkflowGlyph.js +2 -0
- package/dist/icons/AgentGlyph.cjs +1 -0
- package/dist/icons/AgentGlyph.d.ts +2 -0
- package/dist/icons/AgentGlyph.js +2 -0
- package/dist/icons/FunctionGlyph.cjs +1 -0
- package/dist/icons/FunctionGlyph.d.ts +2 -0
- package/dist/icons/FunctionGlyph.js +2 -0
- package/dist/icons/RpaGlyph.cjs +1 -0
- package/dist/icons/RpaGlyph.d.ts +2 -0
- package/dist/icons/RpaGlyph.js +2 -0
- package/package.json +3 -3
|
@@ -286,12 +286,14 @@ const BaseNodeComponent = (props)=>{
|
|
|
286
286
|
isHovered,
|
|
287
287
|
isFocused
|
|
288
288
|
]);
|
|
289
|
-
const shouldShowHandles = (0,
|
|
289
|
+
const { shouldShowHandles, showAddButton } = (0, NodeUtils_cjs_namespaceObject.resolveNodeHandleAffordances)({
|
|
290
290
|
isConnecting,
|
|
291
291
|
selected,
|
|
292
|
-
isHovered,
|
|
293
|
-
dragging
|
|
294
|
-
|
|
292
|
+
hovered: isHovered,
|
|
293
|
+
dragging,
|
|
294
|
+
canEdit,
|
|
295
|
+
multipleNodesSelected
|
|
296
|
+
});
|
|
295
297
|
const hasVisibleBottomHandles = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
296
298
|
if (!handleConfigurations || !Array.isArray(handleConfigurations) || !selected || 'circle' === displayShape) return false;
|
|
297
299
|
return handleConfigurations.some((config)=>config.position === react_cjs_namespaceObject.Position.Bottom && config.handles.length > 0 && false !== config.visible && (config.handles.some((h)=>'source' === h.type) || config.handles.some((h)=>h.showButton)));
|
|
@@ -389,7 +391,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
389
391
|
nodeId: id,
|
|
390
392
|
selected: selected ?? false,
|
|
391
393
|
hovered: isHovered,
|
|
392
|
-
showAddButton
|
|
394
|
+
showAddButton,
|
|
393
395
|
isLocked: !canEdit,
|
|
394
396
|
showNotches,
|
|
395
397
|
nodeWidth: containerWidth,
|
|
@@ -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,EAAE,MAAM,0CAA0C,CAAC;AA+ChF,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,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,EAAE,MAAM,0CAA0C,CAAC;AA+ChF,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AA6tB1B,eAAO,MAAM,QAAQ,8CAxrBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAwrBmB,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { isWideNodeShape } from "../../schema/index.js";
|
|
|
9
9
|
import { resolveAdornments } from "../../utils/adornment-resolver.js";
|
|
10
10
|
import { CanvasIcon, getIcon } from "../../utils/icon-registry.js";
|
|
11
11
|
import { resolveDisplay, resolveHandles } from "../../utils/manifest-resolver.js";
|
|
12
|
-
import { selectIsConnecting } from "../../utils/NodeUtils.js";
|
|
12
|
+
import { resolveNodeHandleAffordances, selectIsConnecting } from "../../utils/NodeUtils.js";
|
|
13
13
|
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
14
14
|
import { resolveToolbar } from "../../utils/toolbar-resolver.js";
|
|
15
15
|
import { useBaseCanvasMode } from "../BaseCanvas/BaseCanvasModeProvider.js";
|
|
@@ -258,12 +258,14 @@ const BaseNodeComponent = (props)=>{
|
|
|
258
258
|
isHovered,
|
|
259
259
|
isFocused
|
|
260
260
|
]);
|
|
261
|
-
const shouldShowHandles =
|
|
261
|
+
const { shouldShowHandles, showAddButton } = resolveNodeHandleAffordances({
|
|
262
262
|
isConnecting,
|
|
263
263
|
selected,
|
|
264
|
-
isHovered,
|
|
265
|
-
dragging
|
|
266
|
-
|
|
264
|
+
hovered: isHovered,
|
|
265
|
+
dragging,
|
|
266
|
+
canEdit,
|
|
267
|
+
multipleNodesSelected
|
|
268
|
+
});
|
|
267
269
|
const hasVisibleBottomHandles = useMemo(()=>{
|
|
268
270
|
if (!handleConfigurations || !Array.isArray(handleConfigurations) || !selected || 'circle' === displayShape) return false;
|
|
269
271
|
return handleConfigurations.some((config)=>config.position === Position.Bottom && config.handles.length > 0 && false !== config.visible && (config.handles.some((h)=>'source' === h.type) || config.handles.some((h)=>h.showButton)));
|
|
@@ -361,7 +363,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
361
363
|
nodeId: id,
|
|
362
364
|
selected: selected ?? false,
|
|
363
365
|
hovered: isHovered,
|
|
364
|
-
showAddButton
|
|
366
|
+
showAddButton,
|
|
365
367
|
isLocked: !canEdit,
|
|
366
368
|
showNotches,
|
|
367
369
|
nodeWidth: containerWidth,
|
|
@@ -31,6 +31,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
31
31
|
const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
32
32
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
33
33
|
const external_react_namespaceObject = require("react");
|
|
34
|
+
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
34
35
|
const CssUtil_cjs_namespaceObject = require("../../utils/CssUtil.cjs");
|
|
35
36
|
const external_NodeViewportOverlay_cjs_namespaceObject = require("../NodeViewportOverlay.cjs");
|
|
36
37
|
const external_CanvasInlineButton_cjs_namespaceObject = require("./CanvasInlineButton.cjs");
|
|
@@ -41,7 +42,6 @@ const BUTTON_POSITION = {
|
|
|
41
42
|
[react_cjs_namespaceObject.Position.Left]: 'flex-row-reverse right-full top-1/2 -translate-y-1/2',
|
|
42
43
|
[react_cjs_namespaceObject.Position.Right]: 'flex-row left-full top-1/2 -translate-y-1/2'
|
|
43
44
|
};
|
|
44
|
-
const DRAG_THRESHOLD = 5;
|
|
45
45
|
const HandleButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ visible, labelVisible, keepButtonMounted = false, position, onAction, onMouseEnter, onMouseLeave, handleRef, label, labelIcon, labelBackgroundColor, renderLabel = true, portal })=>{
|
|
46
46
|
const accessibleName = label ? `Add node from ${label} handle` : 'Add node';
|
|
47
47
|
const didDragRef = (0, external_react_namespaceObject.useRef)(false);
|
|
@@ -63,7 +63,7 @@ const HandleButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ v
|
|
|
63
63
|
if (didDragRef.current) return;
|
|
64
64
|
const dx = moveEvt.clientX - startX;
|
|
65
65
|
const dy = moveEvt.clientY - startY;
|
|
66
|
-
if (dx * dx + dy * dy <
|
|
66
|
+
if (dx * dx + dy * dy < external_constants_cjs_namespaceObject.HANDLE_DRAG_THRESHOLD * external_constants_cjs_namespaceObject.HANDLE_DRAG_THRESHOLD) return;
|
|
67
67
|
didDragRef.current = true;
|
|
68
68
|
const handleEl = handleRef?.current;
|
|
69
69
|
if (handleEl) {
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Row } from "../../layouts/index.js";
|
|
3
3
|
import { Position } from "../../xyflow/react.js";
|
|
4
4
|
import { memo, useCallback, useEffect, useRef } from "react";
|
|
5
|
+
import { HANDLE_DRAG_THRESHOLD } from "../../constants.js";
|
|
5
6
|
import { cx } from "../../utils/CssUtil.js";
|
|
6
7
|
import { NodeViewportOverlay } from "../NodeViewportOverlay.js";
|
|
7
8
|
import { CanvasInlineButton } from "./CanvasInlineButton.js";
|
|
@@ -12,7 +13,6 @@ const BUTTON_POSITION = {
|
|
|
12
13
|
[Position.Left]: 'flex-row-reverse right-full top-1/2 -translate-y-1/2',
|
|
13
14
|
[Position.Right]: 'flex-row left-full top-1/2 -translate-y-1/2'
|
|
14
15
|
};
|
|
15
|
-
const DRAG_THRESHOLD = 5;
|
|
16
16
|
const HandleButton = /*#__PURE__*/ memo(({ visible, labelVisible, keepButtonMounted = false, position, onAction, onMouseEnter, onMouseLeave, handleRef, label, labelIcon, labelBackgroundColor, renderLabel = true, portal })=>{
|
|
17
17
|
const accessibleName = label ? `Add node from ${label} handle` : 'Add node';
|
|
18
18
|
const didDragRef = useRef(false);
|
|
@@ -34,7 +34,7 @@ const HandleButton = /*#__PURE__*/ memo(({ visible, labelVisible, keepButtonMoun
|
|
|
34
34
|
if (didDragRef.current) return;
|
|
35
35
|
const dx = moveEvt.clientX - startX;
|
|
36
36
|
const dy = moveEvt.clientY - startY;
|
|
37
|
-
if (dx * dx + dy * dy <
|
|
37
|
+
if (dx * dx + dy * dy < HANDLE_DRAG_THRESHOLD * HANDLE_DRAG_THRESHOLD) return;
|
|
38
38
|
didDragRef.current = true;
|
|
39
39
|
const handleEl = handleRef?.current;
|
|
40
40
|
if (handleEl) {
|
|
@@ -239,8 +239,14 @@ function ContainerNodeComponent(props) {
|
|
|
239
239
|
const handleHandleAction = (0, external_react_namespaceObject.useCallback)((_event)=>{
|
|
240
240
|
setIsHovered(false);
|
|
241
241
|
}, []);
|
|
242
|
-
const shouldShowHandles
|
|
243
|
-
|
|
242
|
+
const { shouldShowHandles, showAddButton: showHandleAddButtons } = (0, NodeUtils_cjs_namespaceObject.resolveNodeHandleAffordances)({
|
|
243
|
+
isConnecting,
|
|
244
|
+
selected,
|
|
245
|
+
hovered: isHovered,
|
|
246
|
+
dragging,
|
|
247
|
+
canEdit: canEditNode,
|
|
248
|
+
multipleNodesSelected
|
|
249
|
+
});
|
|
244
250
|
const showEmptyState = canEditNode && !hasChildNodes && hasEmptyState;
|
|
245
251
|
const interactionState = (0, external_ContainerNode_hooks_cjs_namespaceObject.resolveInteractionState)(dragging, selected, isHovered);
|
|
246
252
|
const activeStatus = suggestionType ?? validationState?.validationStatus ?? executionStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ContainerNode/ContainerNode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContainerNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ContainerNode/ContainerNode.tsx"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAWhE,iBAAS,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,2CA8XxD;AAOD,eAAO,MAAM,aAAa,oEAAkE,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { useElementValidationStatus, useNodeExecutionState, useToolbarActionStor
|
|
|
8
8
|
import { resolveAdornments } from "../../utils/adornment-resolver.js";
|
|
9
9
|
import { DEFAULT_CONTAINER_HEIGHT, DEFAULT_CONTAINER_MIN_HEIGHT, DEFAULT_CONTAINER_MIN_WIDTH, DEFAULT_CONTAINER_WIDTH } from "../../utils/container.js";
|
|
10
10
|
import { resolveDisplay, resolveHandles } from "../../utils/manifest-resolver.js";
|
|
11
|
-
import { selectIsConnecting, snapToGrid } from "../../utils/NodeUtils.js";
|
|
11
|
+
import { resolveNodeHandleAffordances, selectIsConnecting, snapToGrid } from "../../utils/NodeUtils.js";
|
|
12
12
|
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
13
13
|
import { resolveToolbar } from "../../utils/toolbar-resolver.js";
|
|
14
14
|
import { useBaseCanvasMode } from "../BaseCanvas/BaseCanvasModeProvider.js";
|
|
@@ -211,8 +211,14 @@ function ContainerNodeComponent(props) {
|
|
|
211
211
|
const handleHandleAction = useCallback((_event)=>{
|
|
212
212
|
setIsHovered(false);
|
|
213
213
|
}, []);
|
|
214
|
-
const shouldShowHandles
|
|
215
|
-
|
|
214
|
+
const { shouldShowHandles, showAddButton: showHandleAddButtons } = resolveNodeHandleAffordances({
|
|
215
|
+
isConnecting,
|
|
216
|
+
selected,
|
|
217
|
+
hovered: isHovered,
|
|
218
|
+
dragging,
|
|
219
|
+
canEdit: canEditNode,
|
|
220
|
+
multipleNodesSelected
|
|
221
|
+
});
|
|
216
222
|
const showEmptyState = canEditNode && !hasChildNodes && hasEmptyState;
|
|
217
223
|
const interactionState = resolveInteractionState(dragging, selected, isHovered);
|
|
218
224
|
const activeStatus = suggestionType ?? validationState?.validationStatus ?? executionStatus;
|
|
@@ -30,6 +30,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
DEFAULT_SOURCE_HANDLE_ID: ()=>DEFAULT_SOURCE_HANDLE_ID,
|
|
31
31
|
FLOATING_CANVAS_PANEL_OFFSET: ()=>FLOATING_CANVAS_PANEL_OFFSET,
|
|
32
32
|
GRID_SPACING: ()=>GRID_SPACING,
|
|
33
|
+
HANDLE_DRAG_THRESHOLD: ()=>HANDLE_DRAG_THRESHOLD,
|
|
33
34
|
NODE_BADGE_INSET_CIRCLE: ()=>NODE_BADGE_INSET_CIRCLE,
|
|
34
35
|
NODE_BADGE_INSET_SQUARE: ()=>NODE_BADGE_INSET_SQUARE,
|
|
35
36
|
NODE_BADGE_SIZE: ()=>NODE_BADGE_SIZE,
|
|
@@ -58,6 +59,7 @@ const PREVIEW_EDGE_ID = 'preview-edge-id';
|
|
|
58
59
|
const DEFAULT_SOURCE_HANDLE_ID = 'output';
|
|
59
60
|
const DEFAULT_NODE_SIZE = 96;
|
|
60
61
|
const GRID_SPACING = 16;
|
|
62
|
+
const HANDLE_DRAG_THRESHOLD = 5;
|
|
61
63
|
const CANVAS_COMPACT_BREAKPOINT = 600;
|
|
62
64
|
const TOOLBOX_WIDTH = 320;
|
|
63
65
|
const TOOLBOX_HEIGHT = 410;
|
|
@@ -87,6 +89,7 @@ exports.DEFAULT_RECTANGLE_NODE_WIDTH = __webpack_exports__.DEFAULT_RECTANGLE_NOD
|
|
|
87
89
|
exports.DEFAULT_SOURCE_HANDLE_ID = __webpack_exports__.DEFAULT_SOURCE_HANDLE_ID;
|
|
88
90
|
exports.FLOATING_CANVAS_PANEL_OFFSET = __webpack_exports__.FLOATING_CANVAS_PANEL_OFFSET;
|
|
89
91
|
exports.GRID_SPACING = __webpack_exports__.GRID_SPACING;
|
|
92
|
+
exports.HANDLE_DRAG_THRESHOLD = __webpack_exports__.HANDLE_DRAG_THRESHOLD;
|
|
90
93
|
exports.NODE_BADGE_INSET_CIRCLE = __webpack_exports__.NODE_BADGE_INSET_CIRCLE;
|
|
91
94
|
exports.NODE_BADGE_INSET_SQUARE = __webpack_exports__.NODE_BADGE_INSET_SQUARE;
|
|
92
95
|
exports.NODE_BADGE_SIZE = __webpack_exports__.NODE_BADGE_SIZE;
|
|
@@ -116,6 +119,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
116
119
|
"DEFAULT_SOURCE_HANDLE_ID",
|
|
117
120
|
"FLOATING_CANVAS_PANEL_OFFSET",
|
|
118
121
|
"GRID_SPACING",
|
|
122
|
+
"HANDLE_DRAG_THRESHOLD",
|
|
119
123
|
"NODE_BADGE_INSET_CIRCLE",
|
|
120
124
|
"NODE_BADGE_INSET_SQUARE",
|
|
121
125
|
"NODE_BADGE_SIZE",
|
|
@@ -3,6 +3,7 @@ export declare const PREVIEW_EDGE_ID = "preview-edge-id";
|
|
|
3
3
|
export declare const DEFAULT_SOURCE_HANDLE_ID = "output";
|
|
4
4
|
export declare const DEFAULT_NODE_SIZE = 96;
|
|
5
5
|
export declare const GRID_SPACING = 16;
|
|
6
|
+
export declare const HANDLE_DRAG_THRESHOLD = 5;
|
|
6
7
|
export declare const CANVAS_COMPACT_BREAKPOINT = 600;
|
|
7
8
|
export declare const TOOLBOX_WIDTH = 320;
|
|
8
9
|
export declare const TOOLBOX_HEIGHT = 410;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/canvas/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,wBAAwB,WAAW,CAAC;AACjD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,YAAY,KAAK,CAAC;AAG/B,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAG7C,eAAO,MAAM,aAAa,MAAM,CAAC;AAOjC,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC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M,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,WAAW,KAAK,CAAC;AAU9B,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAG/C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAGhD,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AACpD,eAAO,MAAM,yBAAyB,QAAmB,CAAC;AAC1D,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AAC3D,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AAO3D,eAAO,MAAM,2BAA2B,QAAyB,CAAC;AAClE,eAAO,MAAM,sBAAsB,QAAyB,CAAC;AAC7D,eAAO,MAAM,qBAAqB,QAAyB,CAAC;AAC5D,eAAO,MAAM,uBAAuB,QAAyB,CAAC;AAC9D,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAGlC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAGvC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAGxD,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,KAAK,CAAC"}
|
package/dist/canvas/constants.js
CHANGED
|
@@ -3,6 +3,7 @@ const PREVIEW_EDGE_ID = 'preview-edge-id';
|
|
|
3
3
|
const DEFAULT_SOURCE_HANDLE_ID = 'output';
|
|
4
4
|
const DEFAULT_NODE_SIZE = 96;
|
|
5
5
|
const GRID_SPACING = 16;
|
|
6
|
+
const HANDLE_DRAG_THRESHOLD = 5;
|
|
6
7
|
const CANVAS_COMPACT_BREAKPOINT = 600;
|
|
7
8
|
const TOOLBOX_WIDTH = 320;
|
|
8
9
|
const TOOLBOX_HEIGHT = 410;
|
|
@@ -26,4 +27,4 @@ const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
|
|
|
26
27
|
const NODE_BADGE_SIZE = 20;
|
|
27
28
|
const NODE_BADGE_INSET_SQUARE = 6;
|
|
28
29
|
const NODE_BADGE_INSET_CIRCLE = 12;
|
|
29
|
-
export { CANVAS_COMPACT_BREAKPOINT, DEFAULT_NODE_SIZE, DEFAULT_RECTANGLE_NODE_WIDTH, DEFAULT_SOURCE_HANDLE_ID, FLOATING_CANVAS_PANEL_OFFSET, GRID_SPACING, NODE_BADGE_INSET_CIRCLE, NODE_BADGE_INSET_SQUARE, NODE_BADGE_SIZE, NODE_BORDER_SIZE, NODE_CONTAINER_RADIUS_RATIO, NODE_ERROR_ICON_SIZE, 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, NODE_TEXT_BOTTOM_OFFSET, NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES, PREVIEW_EDGE_ID, PREVIEW_NODE_ID, TOOLBOX_GAP, TOOLBOX_HEIGHT, TOOLBOX_PADDING_X, TOOLBOX_PADDING_Y, TOOLBOX_WIDTH };
|
|
30
|
+
export { CANVAS_COMPACT_BREAKPOINT, DEFAULT_NODE_SIZE, DEFAULT_RECTANGLE_NODE_WIDTH, DEFAULT_SOURCE_HANDLE_ID, FLOATING_CANVAS_PANEL_OFFSET, GRID_SPACING, HANDLE_DRAG_THRESHOLD, NODE_BADGE_INSET_CIRCLE, NODE_BADGE_INSET_SQUARE, NODE_BADGE_SIZE, NODE_BORDER_SIZE, NODE_CONTAINER_RADIUS_RATIO, NODE_ERROR_ICON_SIZE, 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, NODE_TEXT_BOTTOM_OFFSET, NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES, PREVIEW_EDGE_ID, PREVIEW_NODE_ID, TOOLBOX_GAP, TOOLBOX_HEIGHT, TOOLBOX_PADDING_X, TOOLBOX_PADDING_Y, TOOLBOX_WIDTH };
|
|
@@ -33,11 +33,20 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
33
33
|
snapUpToGrid: ()=>snapUpToGrid,
|
|
34
34
|
resolveHandleContext: ()=>resolveHandleContext,
|
|
35
35
|
resolveCollisions: ()=>resolveCollisions,
|
|
36
|
-
snapDownToGrid: ()=>snapDownToGrid
|
|
36
|
+
snapDownToGrid: ()=>snapDownToGrid,
|
|
37
|
+
resolveNodeHandleAffordances: ()=>resolveNodeHandleAffordances
|
|
37
38
|
});
|
|
38
39
|
const react_cjs_namespaceObject = require("../xyflow/react.cjs");
|
|
39
40
|
const external_constants_cjs_namespaceObject = require("../constants.cjs");
|
|
40
41
|
const selectIsConnecting = (state)=>!!state.connection.inProgress;
|
|
42
|
+
function resolveNodeHandleAffordances({ isConnecting, selected = false, hovered, dragging = false, canEdit, multipleNodesSelected }) {
|
|
43
|
+
const showAddButton = canEdit && !multipleNodesSelected && !isConnecting && !dragging;
|
|
44
|
+
return {
|
|
45
|
+
shouldShowHandles: (isConnecting || selected || hovered) && !dragging,
|
|
46
|
+
showAddButton,
|
|
47
|
+
isAddButtonVisible: showAddButton && (selected || hovered)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
41
50
|
const getAbsolutePosition = (node, nodes)=>{
|
|
42
51
|
let x = node.position.x;
|
|
43
52
|
let y = node.position.y;
|
|
@@ -176,6 +185,7 @@ exports.getHandleIndex = __webpack_exports__.getHandleIndex;
|
|
|
176
185
|
exports.getNonOverlappingPositionForDirection = __webpack_exports__.getNonOverlappingPositionForDirection;
|
|
177
186
|
exports.resolveCollisions = __webpack_exports__.resolveCollisions;
|
|
178
187
|
exports.resolveHandleContext = __webpack_exports__.resolveHandleContext;
|
|
188
|
+
exports.resolveNodeHandleAffordances = __webpack_exports__.resolveNodeHandleAffordances;
|
|
179
189
|
exports.selectIsConnecting = __webpack_exports__.selectIsConnecting;
|
|
180
190
|
exports.snapDownToGrid = __webpack_exports__.snapDownToGrid;
|
|
181
191
|
exports.snapToGrid = __webpack_exports__.snapToGrid;
|
|
@@ -187,6 +197,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
187
197
|
"getNonOverlappingPositionForDirection",
|
|
188
198
|
"resolveCollisions",
|
|
189
199
|
"resolveHandleContext",
|
|
200
|
+
"resolveNodeHandleAffordances",
|
|
190
201
|
"selectIsConnecting",
|
|
191
202
|
"snapDownToGrid",
|
|
192
203
|
"snapToGrid",
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { type Handle, type InternalNode, type Node, Position, type ReactFlowState, type XYPosition } from '../xyflow/react.ts';
|
|
2
2
|
export declare const selectIsConnecting: (state: ReactFlowState) => boolean;
|
|
3
|
+
export interface NodeHandleAffordanceState {
|
|
4
|
+
isConnecting: boolean;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
hovered: boolean;
|
|
7
|
+
dragging?: boolean;
|
|
8
|
+
canEdit: boolean;
|
|
9
|
+
multipleNodesSelected: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface NodeHandleAffordances {
|
|
12
|
+
shouldShowHandles: boolean;
|
|
13
|
+
showAddButton: boolean;
|
|
14
|
+
isAddButtonVisible: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function resolveNodeHandleAffordances({ isConnecting, selected, hovered, dragging, canEdit, multipleNodesSelected, }: NodeHandleAffordanceState): NodeHandleAffordances;
|
|
3
17
|
export declare const getAbsolutePosition: (node: Node, nodes: Node[]) => {
|
|
4
18
|
x: number;
|
|
5
19
|
y: number;
|
|
@@ -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,I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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"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Position } from "../xyflow/react.js";
|
|
2
2
|
import { DEFAULT_NODE_SIZE, GRID_SPACING, PREVIEW_NODE_ID } from "../constants.js";
|
|
3
3
|
const selectIsConnecting = (state)=>!!state.connection.inProgress;
|
|
4
|
+
function resolveNodeHandleAffordances({ isConnecting, selected = false, hovered, dragging = false, canEdit, multipleNodesSelected }) {
|
|
5
|
+
const showAddButton = canEdit && !multipleNodesSelected && !isConnecting && !dragging;
|
|
6
|
+
return {
|
|
7
|
+
shouldShowHandles: (isConnecting || selected || hovered) && !dragging,
|
|
8
|
+
showAddButton,
|
|
9
|
+
isAddButtonVisible: showAddButton && (selected || hovered)
|
|
10
|
+
};
|
|
11
|
+
}
|
|
4
12
|
const getAbsolutePosition = (node, nodes)=>{
|
|
5
13
|
let x = node.position.x;
|
|
6
14
|
let y = node.position.y;
|
|
@@ -133,4 +141,4 @@ function getHandleIndex(handleId, position, allHandles) {
|
|
|
133
141
|
const index = peers.findIndex((h)=>h.id === handleId);
|
|
134
142
|
return -1 === index ? null : index;
|
|
135
143
|
}
|
|
136
|
-
export { clamp, getAbsolutePosition, getHandleIndex, getNonOverlappingPositionForDirection, resolveCollisions, resolveHandleContext, selectIsConnecting, snapDownToGrid, snapToGrid, snapUpToGrid };
|
|
144
|
+
export { clamp, getAbsolutePosition, getHandleIndex, getNonOverlappingPositionForDirection, resolveCollisions, resolveHandleContext, resolveNodeHandleAffordances, selectIsConnecting, snapDownToGrid, snapToGrid, snapUpToGrid };
|
|
@@ -45,10 +45,6 @@ const sizedIcon = (Icon)=>({ w, h, color })=>{
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
const iconRegistry = {
|
|
48
|
-
agent: ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.AgentProject, {
|
|
49
|
-
w: w ?? 29,
|
|
50
|
-
h: h ?? 28
|
|
51
|
-
}),
|
|
52
48
|
'autonomous-agent': ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.AutonomousAgentIcon, {
|
|
53
49
|
w: w ?? 29,
|
|
54
50
|
h: h ?? 28
|
|
@@ -77,26 +73,6 @@ const iconRegistry = {
|
|
|
77
73
|
w: w ?? 29,
|
|
78
74
|
h: h ?? 28
|
|
79
75
|
}),
|
|
80
|
-
rpa: ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.RpaProject, {
|
|
81
|
-
w: w ?? 29,
|
|
82
|
-
h: h ?? 28
|
|
83
|
-
}),
|
|
84
|
-
api: ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.ApiProject, {
|
|
85
|
-
w: w ?? 29,
|
|
86
|
-
h: h ?? 28
|
|
87
|
-
}),
|
|
88
|
-
'agentic-process': ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.BusinessProcessProject, {
|
|
89
|
-
w: w ?? 29,
|
|
90
|
-
h: h ?? 28
|
|
91
|
-
}),
|
|
92
|
-
'flow-project': ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.FlowProject, {
|
|
93
|
-
w: w ?? 29,
|
|
94
|
-
h: h ?? 28
|
|
95
|
-
}),
|
|
96
|
-
'case-management': ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.CaseManagementProject, {
|
|
97
|
-
w: w ?? 29,
|
|
98
|
-
h: h ?? 28
|
|
99
|
-
}),
|
|
100
76
|
decision: ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.DecisionIcon, {
|
|
101
77
|
w: w ?? 24,
|
|
102
78
|
h: h ?? 24
|
|
@@ -117,10 +93,6 @@ const iconRegistry = {
|
|
|
117
93
|
w: w ?? 24,
|
|
118
94
|
h: h ?? 24
|
|
119
95
|
}),
|
|
120
|
-
function: ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.FunctionProject, {
|
|
121
|
-
w: w ?? 29,
|
|
122
|
-
h: h ?? 28
|
|
123
|
-
}),
|
|
124
96
|
mcp: ({ w, h })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject_0.McpIcon, {
|
|
125
97
|
w: w ?? 29,
|
|
126
98
|
h: h ?? 28
|
|
@@ -142,7 +114,19 @@ const iconRegistry = {
|
|
|
142
114
|
'decision-table': sizedIcon(index_cjs_namespaceObject.ComponentDecisionTable),
|
|
143
115
|
'decision-table-row': sizedIcon(index_cjs_namespaceObject.ComponentDecisionTableRow),
|
|
144
116
|
'literal-expression': sizedIcon(index_cjs_namespaceObject.ComponentLiteralExpression),
|
|
145
|
-
batch: sizedIcon(index_cjs_namespaceObject.ComponentBatch)
|
|
117
|
+
batch: sizedIcon(index_cjs_namespaceObject.ComponentBatch),
|
|
118
|
+
agent: sizedIcon(index_cjs_namespaceObject.AgentGlyph),
|
|
119
|
+
'agentic-process': sizedIcon(index_cjs_namespaceObject.MaestroBpmnFlat),
|
|
120
|
+
api: sizedIcon(index_cjs_namespaceObject.APIWorkflowGlyph),
|
|
121
|
+
'case-management': sizedIcon(index_cjs_namespaceObject.MaestroCaseFlat),
|
|
122
|
+
'flow-project': sizedIcon(index_cjs_namespaceObject.MaestroFlowFlat),
|
|
123
|
+
function: sizedIcon(index_cjs_namespaceObject.FunctionGlyph),
|
|
124
|
+
maestro: sizedIcon(index_cjs_namespaceObject.Maestro),
|
|
125
|
+
'maestro-automate': sizedIcon(index_cjs_namespaceObject.MaestroAutomateFlat),
|
|
126
|
+
'maestro-bpmn': sizedIcon(index_cjs_namespaceObject.MaestroBpmnFlat),
|
|
127
|
+
'maestro-case': sizedIcon(index_cjs_namespaceObject.MaestroCaseFlat),
|
|
128
|
+
'maestro-flow': sizedIcon(index_cjs_namespaceObject.MaestroFlowFlat),
|
|
129
|
+
rpa: sizedIcon(index_cjs_namespaceObject.RpaGlyph)
|
|
146
130
|
};
|
|
147
131
|
function kebabToPascal(str) {
|
|
148
132
|
return str.split('-').map((word)=>word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-registry.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/icon-registry.tsx"],"names":[],"mappings":"AASA,OAAO,EAA0C,KAAK,GAAG,EAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-registry.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/icon-registry.tsx"],"names":[],"mappings":"AASA,OAAO,EAA0C,KAAK,GAAG,EAAiB,MAAM,OAAO,CAAC;AAmBxF,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE;IAClC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,KAAK,GAAG,CAAC,OAAO,CAAC;AAsFlB,wBAAgB,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CA0CtD;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAMD,eAAO,MAAM,UAAU,uDASrB,CAAC;AAGH,eAAO,MAAM,QAAQ,uDAAa,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { icons } from "lucide-react";
|
|
3
3
|
import { memo, useMemo } from "react";
|
|
4
|
-
import { ComponentBatch, ComponentBusinessRule, ComponentDecisionTable, ComponentDecisionTableRow, ComponentLiteralExpression } from "../../icons/index.js";
|
|
5
|
-
import { A2aIcon, AgentDiagramIcon,
|
|
4
|
+
import { APIWorkflowGlyph, AgentGlyph, ComponentBatch, ComponentBusinessRule, ComponentDecisionTable, ComponentDecisionTableRow, ComponentLiteralExpression, FunctionGlyph, Maestro, MaestroAutomateFlat, MaestroBpmnFlat, MaestroCaseFlat, MaestroFlowFlat, RpaGlyph } from "../../icons/index.js";
|
|
5
|
+
import { A2aIcon, AgentDiagramIcon, AutonomousAgentIcon, CodedAgentIcon, ConnectorBuilderProject, ContextIcon, ControlFlowIcon, ConversationalAgentIcon, DataAndTools, DecisionIcon, FileSparklesCornerIcon, LayersArrowUpRightIcon, McpIcon, SwitchIcon, UiPathIcon, WebAppProject } from "../icons/index.js";
|
|
6
6
|
const sizedIcon = (Icon)=>({ w, h, color })=>{
|
|
7
7
|
const width = w ?? 24;
|
|
8
8
|
const height = h ?? 24;
|
|
@@ -15,10 +15,6 @@ const sizedIcon = (Icon)=>({ w, h, color })=>{
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
const iconRegistry = {
|
|
18
|
-
agent: ({ w, h })=>/*#__PURE__*/ jsx(AgentProject, {
|
|
19
|
-
w: w ?? 29,
|
|
20
|
-
h: h ?? 28
|
|
21
|
-
}),
|
|
22
18
|
'autonomous-agent': ({ w, h })=>/*#__PURE__*/ jsx(AutonomousAgentIcon, {
|
|
23
19
|
w: w ?? 29,
|
|
24
20
|
h: h ?? 28
|
|
@@ -47,26 +43,6 @@ const iconRegistry = {
|
|
|
47
43
|
w: w ?? 29,
|
|
48
44
|
h: h ?? 28
|
|
49
45
|
}),
|
|
50
|
-
rpa: ({ w, h })=>/*#__PURE__*/ jsx(RpaProject, {
|
|
51
|
-
w: w ?? 29,
|
|
52
|
-
h: h ?? 28
|
|
53
|
-
}),
|
|
54
|
-
api: ({ w, h })=>/*#__PURE__*/ jsx(ApiProject, {
|
|
55
|
-
w: w ?? 29,
|
|
56
|
-
h: h ?? 28
|
|
57
|
-
}),
|
|
58
|
-
'agentic-process': ({ w, h })=>/*#__PURE__*/ jsx(BusinessProcessProject, {
|
|
59
|
-
w: w ?? 29,
|
|
60
|
-
h: h ?? 28
|
|
61
|
-
}),
|
|
62
|
-
'flow-project': ({ w, h })=>/*#__PURE__*/ jsx(FlowProject, {
|
|
63
|
-
w: w ?? 29,
|
|
64
|
-
h: h ?? 28
|
|
65
|
-
}),
|
|
66
|
-
'case-management': ({ w, h })=>/*#__PURE__*/ jsx(CaseManagementProject, {
|
|
67
|
-
w: w ?? 29,
|
|
68
|
-
h: h ?? 28
|
|
69
|
-
}),
|
|
70
46
|
decision: ({ w, h })=>/*#__PURE__*/ jsx(DecisionIcon, {
|
|
71
47
|
w: w ?? 24,
|
|
72
48
|
h: h ?? 24
|
|
@@ -87,10 +63,6 @@ const iconRegistry = {
|
|
|
87
63
|
w: w ?? 24,
|
|
88
64
|
h: h ?? 24
|
|
89
65
|
}),
|
|
90
|
-
function: ({ w, h })=>/*#__PURE__*/ jsx(FunctionProject, {
|
|
91
|
-
w: w ?? 29,
|
|
92
|
-
h: h ?? 28
|
|
93
|
-
}),
|
|
94
66
|
mcp: ({ w, h })=>/*#__PURE__*/ jsx(McpIcon, {
|
|
95
67
|
w: w ?? 29,
|
|
96
68
|
h: h ?? 28
|
|
@@ -112,7 +84,19 @@ const iconRegistry = {
|
|
|
112
84
|
'decision-table': sizedIcon(ComponentDecisionTable),
|
|
113
85
|
'decision-table-row': sizedIcon(ComponentDecisionTableRow),
|
|
114
86
|
'literal-expression': sizedIcon(ComponentLiteralExpression),
|
|
115
|
-
batch: sizedIcon(ComponentBatch)
|
|
87
|
+
batch: sizedIcon(ComponentBatch),
|
|
88
|
+
agent: sizedIcon(AgentGlyph),
|
|
89
|
+
'agentic-process': sizedIcon(MaestroBpmnFlat),
|
|
90
|
+
api: sizedIcon(APIWorkflowGlyph),
|
|
91
|
+
'case-management': sizedIcon(MaestroCaseFlat),
|
|
92
|
+
'flow-project': sizedIcon(MaestroFlowFlat),
|
|
93
|
+
function: sizedIcon(FunctionGlyph),
|
|
94
|
+
maestro: sizedIcon(Maestro),
|
|
95
|
+
'maestro-automate': sizedIcon(MaestroAutomateFlat),
|
|
96
|
+
'maestro-bpmn': sizedIcon(MaestroBpmnFlat),
|
|
97
|
+
'maestro-case': sizedIcon(MaestroCaseFlat),
|
|
98
|
+
'maestro-flow': sizedIcon(MaestroFlowFlat),
|
|
99
|
+
rpa: sizedIcon(RpaGlyph)
|
|
116
100
|
};
|
|
117
101
|
function kebabToPascal(str) {
|
|
118
102
|
return str.split('-').map((word)=>word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
@@ -72,10 +72,10 @@ const useGridLayout = ({ columns, rowCount, rowHeightPx, leadingColumnWidth, tra
|
|
|
72
72
|
const theadRef = (0, external_react_namespaceObject.useCallback)((element)=>{
|
|
73
73
|
headerObserverRef.current?.disconnect();
|
|
74
74
|
headerObserverRef.current = null;
|
|
75
|
-
headerHeightRef.current = element?.
|
|
75
|
+
headerHeightRef.current = element?.getBoundingClientRect().height ?? 0;
|
|
76
76
|
if (!element || "u" < typeof ResizeObserver) return;
|
|
77
77
|
const observer = new ResizeObserver(()=>{
|
|
78
|
-
headerHeightRef.current = element.
|
|
78
|
+
headerHeightRef.current = element.getBoundingClientRect().height;
|
|
79
79
|
});
|
|
80
80
|
observer.observe(element);
|
|
81
81
|
headerObserverRef.current = observer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGridLayout.d.ts","sourceRoot":"","sources":["../../src/decision-table/useGridLayout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAY,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAI3E,UAAU,iBAAiB;IACzB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,EAAE,MAAM,CAAC;IAEpB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,mBAAmB,EAAE,MAAM,CAAC;IAE5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC;IAErF,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAEhE,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAE5D,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAWD,eAAO,MAAM,oBAAoB,GAAI,SAAS,UAAU,EAAE,EAAE,oBAAe,KAAG,GAAG,CAAC,MAAM,CASvF,CAAC;A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IAAI;+BAoJzD,cAAc,GAAG,IAAI;;;;kCAbpB,MAAM;wCAIH,MAAM;;;;CAwCvB,CAAC"}
|
|
@@ -43,10 +43,10 @@ const useGridLayout = ({ columns, rowCount, rowHeightPx, leadingColumnWidth, tra
|
|
|
43
43
|
const theadRef = useCallback((element)=>{
|
|
44
44
|
headerObserverRef.current?.disconnect();
|
|
45
45
|
headerObserverRef.current = null;
|
|
46
|
-
headerHeightRef.current = element?.
|
|
46
|
+
headerHeightRef.current = element?.getBoundingClientRect().height ?? 0;
|
|
47
47
|
if (!element || "u" < typeof ResizeObserver) return;
|
|
48
48
|
const observer = new ResizeObserver(()=>{
|
|
49
|
-
headerHeightRef.current = element.
|
|
49
|
+
headerHeightRef.current = element.getBoundingClientRect().height;
|
|
50
50
|
});
|
|
51
51
|
observer.observe(element);
|
|
52
52
|
headerObserverRef.current = observer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@uipath/apollo-ui-icons-react/APIWorkflowGlyph');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@uipath/apollo-ui-icons-react/AgentGlyph');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@uipath/apollo-ui-icons-react/FunctionGlyph');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@uipath/apollo-ui-icons-react/RpaGlyph');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.33.0",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -251,9 +251,9 @@
|
|
|
251
251
|
"use-sync-external-store": "^1.2.0",
|
|
252
252
|
"zod": "^4.6.6",
|
|
253
253
|
"zustand": "^5.0.9",
|
|
254
|
-
"@uipath/apollo-core": "5.15.3",
|
|
255
254
|
"@uipath/apollo-ui-icons": "1.2.1",
|
|
256
|
-
"@uipath/apollo-ui-icons-react": "1.
|
|
255
|
+
"@uipath/apollo-ui-icons-react": "1.1.0",
|
|
256
|
+
"@uipath/apollo-core": "5.15.3",
|
|
257
257
|
"@uipath/apollo-wind": "2.94.1"
|
|
258
258
|
},
|
|
259
259
|
"devDependencies": {
|