@uipath/apollo-react 4.6.3 → 4.8.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/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 +93 -86
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +88 -81
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.cjs +68 -0
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.d.ts +9 -0
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.js +34 -0
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts +2 -1
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +88 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts +21 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.js +51 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.cjs +49 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts +9 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.js +15 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.cjs +62 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.d.ts +9 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.js +28 -0
- package/dist/canvas/components/BaseNode/NodeLabel.cjs +64 -18
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts +8 -1
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/NodeLabel.js +58 -15
- 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/ButtonHandleStyleUtils.cjs +4 -7
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.js +4 -7
- 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/components/CodedAgent/CodedAgentFlow.cjs +4 -4
- package/dist/canvas/components/CodedAgent/CodedAgentFlow.js +4 -4
- package/dist/canvas/constants.cjs +64 -0
- package/dist/canvas/constants.d.ts +16 -0
- package/dist/canvas/constants.d.ts.map +1 -1
- package/dist/canvas/constants.js +17 -1
- package/dist/canvas/index.cjs +39 -35
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/canvas/index.js +1 -0
- package/dist/canvas/storybook-utils/manifests/node-definitions.d.ts.map +1 -1
- package/dist/canvas/styles/reactflow-reset.css +12 -0
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +2 -2
- package/dist/canvas/components/BaseNode/BaseNode.styles.cjs +0 -410
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts +0 -75
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts.map +0 -1
- package/dist/canvas/components/BaseNode/BaseNode.styles.js +0 -342
- 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
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cx } from "../../utils/index.js";
|
|
3
2
|
import { Position, useReactFlow, useStore, useUpdateNodeInternals } from "../../xyflow/react.js";
|
|
4
3
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
-
import { DEFAULT_NODE_SIZE } 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";
|
|
6
5
|
import { useNodeTypeRegistry } from "../../core/index.js";
|
|
7
6
|
import { useElementValidationStatus, useNodeExecutionState } from "../../hooks/index.js";
|
|
8
7
|
import { resolveAdornments } from "../../utils/adornment-resolver.js";
|
|
9
|
-
import {
|
|
8
|
+
import { getIcon } from "../../utils/icon-registry.js";
|
|
10
9
|
import { resolveDisplay, resolveHandles } from "../../utils/manifest-resolver.js";
|
|
11
10
|
import { resolveToolbar } from "../../utils/toolbar-resolver.js";
|
|
12
11
|
import { useBaseCanvasMode } from "../BaseCanvas/BaseCanvasModeProvider.js";
|
|
@@ -16,10 +15,31 @@ import { useSelectionState } from "../BaseCanvas/SelectionStateContext.js";
|
|
|
16
15
|
import { SmartHandle, SmartHandleProvider } from "../ButtonHandle/SmartHandle.js";
|
|
17
16
|
import { useButtonHandles } from "../ButtonHandle/useButtonHandles.js";
|
|
18
17
|
import { NodeToolbar } from "../Toolbar/index.js";
|
|
19
|
-
import { BaseBadgeSlot
|
|
18
|
+
import { BaseBadgeSlot } from "./BaseNodeBadgeSlot.js";
|
|
20
19
|
import { useBaseNodeOverrideConfig } from "./BaseNodeConfigContext.js";
|
|
20
|
+
import { BaseContainer } from "./BaseNodeContainer.js";
|
|
21
|
+
import { BaseInnerShape } from "./BaseNodeInnerShape.js";
|
|
22
|
+
import { MissingManifestNode } from "./BaseNodeMissingManifest.js";
|
|
21
23
|
import { NodeLabel } from "./NodeLabel.js";
|
|
22
|
-
const selectIsConnecting = (state)=>!!state.
|
|
24
|
+
const selectIsConnecting = (state)=>!!state.connection.inProgress;
|
|
25
|
+
const getContainerWidth = (shape, width)=>{
|
|
26
|
+
const defaultWidth = 'rectangle' === shape ? DEFAULT_RECTANGLE_NODE_WIDTH : DEFAULT_NODE_SIZE;
|
|
27
|
+
if (width && width !== DEFAULT_NODE_SIZE && width !== DEFAULT_RECTANGLE_NODE_WIDTH) return width;
|
|
28
|
+
return defaultWidth;
|
|
29
|
+
};
|
|
30
|
+
const getContainerHeight = (height, hasFooter, footerVariant)=>{
|
|
31
|
+
if (hasFooter) switch(footerVariant){
|
|
32
|
+
case 'button':
|
|
33
|
+
return NODE_HEIGHT_FOOTER_BUTTON;
|
|
34
|
+
case 'single':
|
|
35
|
+
return NODE_HEIGHT_FOOTER_SINGLE;
|
|
36
|
+
case 'double':
|
|
37
|
+
return NODE_HEIGHT_FOOTER_DOUBLE;
|
|
38
|
+
default:
|
|
39
|
+
return 'auto';
|
|
40
|
+
}
|
|
41
|
+
return height || NODE_HEIGHT_DEFAULT;
|
|
42
|
+
};
|
|
23
43
|
const BaseNodeComponent = (props)=>{
|
|
24
44
|
const { type, data, selected, id, dragging, width, height } = props;
|
|
25
45
|
const { onHandleAction: onHandleActionProp, shouldShowAddButtonFn: shouldShowAddButtonFnProp, shouldShowButtonHandleNotchesFn: shouldShowButtonHandleNotchesFnProp, toolbarConfig: toolbarConfigProp, handleConfigurations: handleConfigurationsProp, adornments: adornmentsProp, suggestionType, disabled, executionStatusOverride, labelTooltip, labelBackgroundColor, footerVariant, footerComponent, subLabelComponent, iconComponent } = useBaseNodeOverrideConfig();
|
|
@@ -28,7 +48,9 @@ const BaseNodeComponent = (props)=>{
|
|
|
28
48
|
const containerRef = useRef(null);
|
|
29
49
|
const [isHovered, setIsHovered] = useState(false);
|
|
30
50
|
const [isFocused, setIsFocused] = useState(false);
|
|
31
|
-
const
|
|
51
|
+
const syncedHeightRef = useRef(void 0);
|
|
52
|
+
const baseHeightRef = useRef(DEFAULT_NODE_SIZE);
|
|
53
|
+
if (height && height !== syncedHeightRef.current) baseHeightRef.current = height;
|
|
32
54
|
const executionState = useNodeExecutionState(id);
|
|
33
55
|
const validationState = useElementValidationStatus(id);
|
|
34
56
|
const nodeTypeRegistry = useNodeTypeRegistry();
|
|
@@ -127,13 +149,14 @@ const BaseNodeComponent = (props)=>{
|
|
|
127
149
|
statusContext
|
|
128
150
|
]);
|
|
129
151
|
const computedHeight = useMemo(()=>{
|
|
130
|
-
const handleSpacing =
|
|
131
|
-
const leftHandles = handleConfigurations.filter((config)=>config.position === Position.Left && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
132
|
-
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);
|
|
133
155
|
const leftRightHandles = Math.max(leftHandles, rightHandles);
|
|
134
|
-
return Math.max(
|
|
156
|
+
return Math.max(baseHeightRef.current, leftRightHandles * handleSpacing);
|
|
135
157
|
}, [
|
|
136
|
-
handleConfigurations
|
|
158
|
+
handleConfigurations,
|
|
159
|
+
height
|
|
137
160
|
]);
|
|
138
161
|
useEffect(()=>{
|
|
139
162
|
updateNodeInternals(id);
|
|
@@ -143,11 +166,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
143
166
|
updateNodeInternals
|
|
144
167
|
]);
|
|
145
168
|
useEffect(()=>{
|
|
146
|
-
if (!originalHeightRef.current && height) {
|
|
147
|
-
originalHeightRef.current = height;
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
169
|
if (void 0 !== computedHeight && computedHeight !== height) {
|
|
170
|
+
syncedHeightRef.current = computedHeight;
|
|
151
171
|
const frameId = requestAnimationFrame(()=>{
|
|
152
172
|
updateNode(id, {
|
|
153
173
|
height: computedHeight
|
|
@@ -181,6 +201,38 @@ const BaseNodeComponent = (props)=>{
|
|
|
181
201
|
display.subLabel
|
|
182
202
|
]);
|
|
183
203
|
const displayFooter = footerComponent;
|
|
204
|
+
const hasFooter = !!displayFooter;
|
|
205
|
+
const containerWidth = getContainerWidth(displayShape, width);
|
|
206
|
+
const containerHeight = getContainerHeight(height, hasFooter, displayFooterVariant);
|
|
207
|
+
const nodeVars = useMemo(()=>{
|
|
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;
|
|
213
|
+
const effectiveW = hasFooter ? DEFAULT_NODE_SIZE : containerWidth;
|
|
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;
|
|
220
|
+
return {
|
|
221
|
+
'--node-w': `${containerWidth}px`,
|
|
222
|
+
'--node-h': 'number' == typeof containerHeight ? `${containerHeight}px` : 'auto',
|
|
223
|
+
'--node-radius': nodeRadius,
|
|
224
|
+
'--node-gap': `${(gap - 2 * NODE_BORDER_SIZE) / 2}px`,
|
|
225
|
+
'--inner-w': `${innerW}px`,
|
|
226
|
+
'--inner-h': `${innerH}px`,
|
|
227
|
+
'--inner-radius': innerRadius,
|
|
228
|
+
'--icon-size': `${innerBasis * NODE_INNER_ICON_RATIO}px`
|
|
229
|
+
};
|
|
230
|
+
}, [
|
|
231
|
+
containerWidth,
|
|
232
|
+
containerHeight,
|
|
233
|
+
displayShape,
|
|
234
|
+
hasFooter
|
|
235
|
+
]);
|
|
184
236
|
const interactionState = useMemo(()=>{
|
|
185
237
|
if (disabled) return 'disabled';
|
|
186
238
|
if (dragging) return 'drag';
|
|
@@ -245,7 +297,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
245
297
|
handleAction,
|
|
246
298
|
nodeId: id,
|
|
247
299
|
selected: selected ?? false,
|
|
248
|
-
|
|
300
|
+
hovered: isHovered,
|
|
301
|
+
showAddButton: 'design' === mode && !multipleNodesSelected && !isConnecting,
|
|
249
302
|
showNotches,
|
|
250
303
|
nodeWidth: width,
|
|
251
304
|
nodeHeight: height,
|
|
@@ -296,86 +349,45 @@ const BaseNodeComponent = (props)=>{
|
|
|
296
349
|
const handleElements = useSmartHandles ? smartHandleElements : buttonHandleElements;
|
|
297
350
|
if (!manifest) return /*#__PURE__*/ jsx("div", {
|
|
298
351
|
ref: containerRef,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
},
|
|
352
|
+
className: "relative",
|
|
353
|
+
style: nodeVars,
|
|
302
354
|
onMouseEnter: handleMouseEnter,
|
|
303
355
|
onMouseLeave: handleMouseLeave,
|
|
304
356
|
onFocus: handleFocus,
|
|
305
357
|
onBlur: handleBlur,
|
|
306
|
-
children: /*#__PURE__*/
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
interactionState: interactionState
|
|
311
|
-
children: [
|
|
312
|
-
/*#__PURE__*/ jsx(BaseIconWrapper, {
|
|
313
|
-
backgroundColor: "var(--canvas-error-background)",
|
|
314
|
-
shape: "square",
|
|
315
|
-
height: height,
|
|
316
|
-
width: width ?? height,
|
|
317
|
-
children: /*#__PURE__*/ jsx(CanvasIcon, {
|
|
318
|
-
icon: "circle-alert",
|
|
319
|
-
size: 32,
|
|
320
|
-
color: "var(--canvas-error-icon)"
|
|
321
|
-
})
|
|
322
|
-
}),
|
|
323
|
-
/*#__PURE__*/ jsxs(BaseTextContainer, {
|
|
324
|
-
shape: "square",
|
|
325
|
-
children: [
|
|
326
|
-
/*#__PURE__*/ jsx(BaseHeader, {
|
|
327
|
-
shape: "square",
|
|
328
|
-
children: "Manifest not found"
|
|
329
|
-
}),
|
|
330
|
-
/*#__PURE__*/ jsxs(BaseSubHeader, {
|
|
331
|
-
children: [
|
|
332
|
-
'Node type "',
|
|
333
|
-
type,
|
|
334
|
-
'" is not registered'
|
|
335
|
-
]
|
|
336
|
-
})
|
|
337
|
-
]
|
|
338
|
-
})
|
|
339
|
-
]
|
|
358
|
+
children: /*#__PURE__*/ jsx(MissingManifestNode, {
|
|
359
|
+
type: data.nodeType,
|
|
360
|
+
isSelected: selected,
|
|
361
|
+
isHovered: isHovered,
|
|
362
|
+
interactionState: interactionState
|
|
340
363
|
})
|
|
341
364
|
});
|
|
342
365
|
const nodeContent = /*#__PURE__*/ jsxs("div", {
|
|
343
366
|
ref: containerRef,
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
},
|
|
367
|
+
className: "relative",
|
|
368
|
+
style: nodeVars,
|
|
347
369
|
onMouseEnter: handleMouseEnter,
|
|
348
370
|
onMouseLeave: handleMouseLeave,
|
|
349
371
|
onFocus: handleFocus,
|
|
350
372
|
onBlur: handleBlur,
|
|
351
373
|
children: [
|
|
352
374
|
/*#__PURE__*/ jsxs(BaseContainer, {
|
|
353
|
-
selected: selected,
|
|
354
375
|
shape: displayShape,
|
|
355
|
-
|
|
376
|
+
isSelected: selected,
|
|
377
|
+
isHovered: isHovered,
|
|
356
378
|
interactionState: interactionState,
|
|
357
379
|
executionStatus: executionStatus,
|
|
358
380
|
validationStatus: validationState?.validationStatus,
|
|
359
381
|
suggestionType: suggestionType,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
hasFooter: !!displayFooter,
|
|
364
|
-
footerVariant: displayFooterVariant,
|
|
365
|
-
"aria-busy": data.loading || void 0,
|
|
382
|
+
hasFooter: hasFooter,
|
|
383
|
+
background: displayBackground,
|
|
384
|
+
loading: data.loading,
|
|
366
385
|
children: [
|
|
367
|
-
data.loading
|
|
368
|
-
"data-testid": "skeleton-icon",
|
|
369
|
-
shape: displayShape,
|
|
370
|
-
nodeHeight: displayFooter ? void 0 : height,
|
|
371
|
-
nodeWidth: displayFooter ? void 0 : width ?? height
|
|
372
|
-
}) : Icon && /*#__PURE__*/ jsx(BaseIconWrapper, {
|
|
373
|
-
shape: displayShape,
|
|
386
|
+
(Icon || data.loading) && /*#__PURE__*/ jsx(BaseInnerShape, {
|
|
374
387
|
color: displayColor,
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
children: Icon
|
|
388
|
+
background: displayIconBackground,
|
|
389
|
+
loading: data.loading,
|
|
390
|
+
children: data.loading ? null : Icon
|
|
379
391
|
}),
|
|
380
392
|
adornments?.topLeft && /*#__PURE__*/ jsx(BaseBadgeSlot, {
|
|
381
393
|
position: "top-left",
|
|
@@ -410,12 +422,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
410
422
|
onChange: handleLabelChange
|
|
411
423
|
}),
|
|
412
424
|
displayFooter && /*#__PURE__*/ jsx("div", {
|
|
413
|
-
|
|
414
|
-
flexBasis: '100%',
|
|
415
|
-
paddingTop: '2px',
|
|
416
|
-
minWidth: 0,
|
|
417
|
-
overflow: 'hidden'
|
|
418
|
-
},
|
|
425
|
+
className: "basis-full pt-0.5 min-w-0 overflow-hidden",
|
|
419
426
|
children: displayFooter
|
|
420
427
|
})
|
|
421
428
|
]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
BaseBadgeSlot: ()=>BaseBadgeSlot
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const external_react_namespaceObject = require("react");
|
|
31
|
+
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
32
|
+
const BaseBadgeSlot = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ position, shape, children })=>{
|
|
33
|
+
const offset = 'circle' === shape ? external_constants_cjs_namespaceObject.NODE_BADGE_INSET_CIRCLE : external_constants_cjs_namespaceObject.NODE_BADGE_INSET_SQUARE;
|
|
34
|
+
const style = {
|
|
35
|
+
width: external_constants_cjs_namespaceObject.NODE_BADGE_SIZE,
|
|
36
|
+
height: external_constants_cjs_namespaceObject.NODE_BADGE_SIZE
|
|
37
|
+
};
|
|
38
|
+
switch(position){
|
|
39
|
+
case 'top-left':
|
|
40
|
+
style.top = offset;
|
|
41
|
+
style.left = offset;
|
|
42
|
+
break;
|
|
43
|
+
case 'top-right':
|
|
44
|
+
style.top = offset;
|
|
45
|
+
style.right = offset;
|
|
46
|
+
break;
|
|
47
|
+
case 'bottom-left':
|
|
48
|
+
style.bottom = offset;
|
|
49
|
+
style.left = offset;
|
|
50
|
+
break;
|
|
51
|
+
case 'bottom-right':
|
|
52
|
+
style.bottom = offset;
|
|
53
|
+
style.right = offset;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
57
|
+
className: "absolute flex items-center justify-center bg-transparent",
|
|
58
|
+
style: style,
|
|
59
|
+
children: children
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
exports.BaseBadgeSlot = __webpack_exports__.BaseBadgeSlot;
|
|
63
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
64
|
+
"BaseBadgeSlot"
|
|
65
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
66
|
+
Object.defineProperty(exports, '__esModule', {
|
|
67
|
+
value: true
|
|
68
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NodeShape } from '../../schema';
|
|
2
|
+
interface BaseBadgeSlotProps {
|
|
3
|
+
position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4
|
+
shape?: NodeShape;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const BaseBadgeSlot: import("react").MemoExoticComponent<({ position, shape, children }: BaseBadgeSlotProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=BaseNodeBadgeSlot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseNodeBadgeSlot.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNodeBadgeSlot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;IACpE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,sEAAwC,kBAAkB,6CA0BlF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
import { NODE_BADGE_INSET_CIRCLE, NODE_BADGE_INSET_SQUARE, NODE_BADGE_SIZE } from "../../constants.js";
|
|
4
|
+
const BaseBadgeSlot = /*#__PURE__*/ memo(({ position, shape, children })=>{
|
|
5
|
+
const offset = 'circle' === shape ? NODE_BADGE_INSET_CIRCLE : NODE_BADGE_INSET_SQUARE;
|
|
6
|
+
const style = {
|
|
7
|
+
width: NODE_BADGE_SIZE,
|
|
8
|
+
height: NODE_BADGE_SIZE
|
|
9
|
+
};
|
|
10
|
+
switch(position){
|
|
11
|
+
case 'top-left':
|
|
12
|
+
style.top = offset;
|
|
13
|
+
style.left = offset;
|
|
14
|
+
break;
|
|
15
|
+
case 'top-right':
|
|
16
|
+
style.top = offset;
|
|
17
|
+
style.right = offset;
|
|
18
|
+
break;
|
|
19
|
+
case 'bottom-left':
|
|
20
|
+
style.bottom = offset;
|
|
21
|
+
style.left = offset;
|
|
22
|
+
break;
|
|
23
|
+
case 'bottom-right':
|
|
24
|
+
style.bottom = offset;
|
|
25
|
+
style.right = offset;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/ jsx("div", {
|
|
29
|
+
className: "absolute flex items-center justify-center bg-transparent",
|
|
30
|
+
style: style,
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
export { BaseBadgeSlot };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HandleGroupManifest } from '../../schema/node-definition';
|
|
2
|
+
import type { ElementStatusValues } from '../../types/execution';
|
|
2
3
|
import type { HandleActionEvent } from '../ButtonHandle/ButtonHandle';
|
|
3
4
|
import type { NodeToolbarConfig } from '../Toolbar';
|
|
4
5
|
import type { FooterVariant, NodeAdornments } from './BaseNode.types';
|
|
@@ -18,7 +19,7 @@ export interface BaseNodeOverrideConfig {
|
|
|
18
19
|
adornments?: NodeAdornments;
|
|
19
20
|
suggestionType?: 'add' | 'update' | 'delete';
|
|
20
21
|
disabled?: boolean;
|
|
21
|
-
executionStatusOverride?:
|
|
22
|
+
executionStatusOverride?: ElementStatusValues;
|
|
22
23
|
labelTooltip?: string;
|
|
23
24
|
labelBackgroundColor?: string;
|
|
24
25
|
footerVariant?: FooterVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNodeConfigContext.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNodeConfigContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AActE,MAAM,WAAW,sBAAsB;IAErC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,aAAa,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;IACzF,+BAA+B,CAAC,EAAE,CAAC,IAAI,EAAE;QACvC,YAAY,EAAE,OAAO,CAAC;QACtB,UAAU,EAAE,OAAO,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC;IAGd,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC7C,UAAU,CAAC,EAAE,cAAc,CAAC;IAG5B,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"BaseNodeConfigContext.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNodeConfigContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AActE,MAAM,WAAW,sBAAsB;IAErC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,aAAa,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;IACzF,+BAA+B,CAAC,EAAE,CAAC,IAAI,EAAE;QACvC,YAAY,EAAE,OAAO,CAAC;QACtB,UAAU,EAAE,OAAO,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC;IAGd,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC7C,UAAU,CAAC,EAAE,cAAc,CAAC;IAG5B,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,mBAAmB,CAAC;IAG9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAMD,eAAO,MAAM,8BAA8B,kDAAyC,CAAC;AAMrF,wBAAgB,yBAAyB,IAAI,sBAAsB,CAElE"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
BaseContainer: ()=>BaseContainer,
|
|
28
|
+
getStatusBorder: ()=>getStatusBorder
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const getStatusBorder = (status)=>{
|
|
34
|
+
switch(status){
|
|
35
|
+
case 'InProgress':
|
|
36
|
+
return 'border-info animate-glow [--glow-color:var(--info)]';
|
|
37
|
+
case 'Completed':
|
|
38
|
+
case 'add':
|
|
39
|
+
return 'border-success';
|
|
40
|
+
case 'Paused':
|
|
41
|
+
case 'Warning':
|
|
42
|
+
case 'WARNING':
|
|
43
|
+
case 'update':
|
|
44
|
+
return 'border-warning animate-glow [--glow-color:var(--warning)]';
|
|
45
|
+
case 'Cancelled':
|
|
46
|
+
case 'Failed':
|
|
47
|
+
case 'Terminated':
|
|
48
|
+
case 'ERROR':
|
|
49
|
+
case 'CRITICAL':
|
|
50
|
+
case 'delete':
|
|
51
|
+
return 'border-error animate-glow [--glow-color:var(--error)]';
|
|
52
|
+
default:
|
|
53
|
+
return '';
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const BaseContainer = ({ isSelected, isHovered, shape, interactionState, executionStatus, validationStatus, suggestionType, hasFooter, background, loading, children })=>{
|
|
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-(--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
|
+
shape,
|
|
60
|
+
hasFooter,
|
|
61
|
+
activeStatus,
|
|
62
|
+
isSelected,
|
|
63
|
+
isHovered,
|
|
64
|
+
interactionState
|
|
65
|
+
]);
|
|
66
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
67
|
+
"data-testid": "base-container",
|
|
68
|
+
"data-execution-status": executionStatus,
|
|
69
|
+
"data-interaction-state": interactionState,
|
|
70
|
+
"data-validation-status": validationStatus,
|
|
71
|
+
"data-suggestion-type": suggestionType,
|
|
72
|
+
className: className,
|
|
73
|
+
style: background ? {
|
|
74
|
+
background
|
|
75
|
+
} : void 0,
|
|
76
|
+
"aria-busy": loading || void 0,
|
|
77
|
+
children: children
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
exports.BaseContainer = __webpack_exports__.BaseContainer;
|
|
81
|
+
exports.getStatusBorder = __webpack_exports__.getStatusBorder;
|
|
82
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
83
|
+
"BaseContainer",
|
|
84
|
+
"getStatusBorder"
|
|
85
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
86
|
+
Object.defineProperty(exports, '__esModule', {
|
|
87
|
+
value: true
|
|
88
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NodeShape } from '../../schema';
|
|
2
|
+
import type { SuggestionType } from '../../types';
|
|
3
|
+
import type { ElementStatusValues } from '../../types/execution';
|
|
4
|
+
import { ValidationErrorSeverity } from '../../types/validation';
|
|
5
|
+
export declare const getStatusBorder: (status?: ElementStatusValues | ValidationErrorSeverity | SuggestionType) => string;
|
|
6
|
+
interface BaseContainerProps {
|
|
7
|
+
isSelected?: boolean;
|
|
8
|
+
isHovered?: boolean;
|
|
9
|
+
shape?: NodeShape;
|
|
10
|
+
interactionState?: string;
|
|
11
|
+
executionStatus?: ElementStatusValues;
|
|
12
|
+
validationStatus?: ValidationErrorSeverity;
|
|
13
|
+
suggestionType?: SuggestionType;
|
|
14
|
+
hasFooter?: boolean;
|
|
15
|
+
background?: string;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const BaseContainer: ({ isSelected, isHovered, shape, interactionState, executionStatus, validationStatus, suggestionType, hasFooter, background, loading, children, }: BaseContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=BaseNodeContainer.d.ts.map
|
|
@@ -0,0 +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,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,GAAI,kJAY3B,kBAAkB,4CAsCpB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@uipath/apollo-wind";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
const getStatusBorder = (status)=>{
|
|
5
|
+
switch(status){
|
|
6
|
+
case 'InProgress':
|
|
7
|
+
return 'border-info animate-glow [--glow-color:var(--info)]';
|
|
8
|
+
case 'Completed':
|
|
9
|
+
case 'add':
|
|
10
|
+
return 'border-success';
|
|
11
|
+
case 'Paused':
|
|
12
|
+
case 'Warning':
|
|
13
|
+
case 'WARNING':
|
|
14
|
+
case 'update':
|
|
15
|
+
return 'border-warning animate-glow [--glow-color:var(--warning)]';
|
|
16
|
+
case 'Cancelled':
|
|
17
|
+
case 'Failed':
|
|
18
|
+
case 'Terminated':
|
|
19
|
+
case 'ERROR':
|
|
20
|
+
case 'CRITICAL':
|
|
21
|
+
case 'delete':
|
|
22
|
+
return 'border-error animate-glow [--glow-color:var(--error)]';
|
|
23
|
+
default:
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const BaseContainer = ({ isSelected, isHovered, shape, interactionState, executionStatus, validationStatus, suggestionType, hasFooter, background, loading, children })=>{
|
|
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-(--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
|
+
shape,
|
|
31
|
+
hasFooter,
|
|
32
|
+
activeStatus,
|
|
33
|
+
isSelected,
|
|
34
|
+
isHovered,
|
|
35
|
+
interactionState
|
|
36
|
+
]);
|
|
37
|
+
return /*#__PURE__*/ jsx("div", {
|
|
38
|
+
"data-testid": "base-container",
|
|
39
|
+
"data-execution-status": executionStatus,
|
|
40
|
+
"data-interaction-state": interactionState,
|
|
41
|
+
"data-validation-status": validationStatus,
|
|
42
|
+
"data-suggestion-type": suggestionType,
|
|
43
|
+
className: className,
|
|
44
|
+
style: background ? {
|
|
45
|
+
background
|
|
46
|
+
} : void 0,
|
|
47
|
+
"aria-busy": loading || void 0,
|
|
48
|
+
children: children
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
export { BaseContainer, getStatusBorder };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
BaseInnerShape: ()=>BaseInnerShape
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
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-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
|
+
style: color || background ? {
|
|
35
|
+
color,
|
|
36
|
+
background
|
|
37
|
+
} : void 0,
|
|
38
|
+
children: loading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Skeleton, {
|
|
39
|
+
"data-testid": "skeleton-icon",
|
|
40
|
+
className: "rounded-lg w-(--icon-size) h-(--icon-size)"
|
|
41
|
+
}) : children
|
|
42
|
+
}));
|
|
43
|
+
exports.BaseInnerShape = __webpack_exports__.BaseInnerShape;
|
|
44
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
45
|
+
"BaseInnerShape"
|
|
46
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
47
|
+
Object.defineProperty(exports, '__esModule', {
|
|
48
|
+
value: true
|
|
49
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface BaseInnerShapeProps {
|
|
2
|
+
loading?: boolean;
|
|
3
|
+
color?: string;
|
|
4
|
+
background?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const BaseInnerShape: import("react").MemoExoticComponent<({ loading, color, background, children }: BaseInnerShapeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=BaseNodeInnerShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseNodeInnerShape.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNodeInnerShape.tsx"],"names":[],"mappings":"AAGA,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,iFACkB,mBAAmB,6CAoB/D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton } from "@uipath/apollo-wind";
|
|
3
|
+
import { memo } from "react";
|
|
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-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
|
+
style: color || background ? {
|
|
7
|
+
color,
|
|
8
|
+
background
|
|
9
|
+
} : void 0,
|
|
10
|
+
children: loading ? /*#__PURE__*/ jsx(Skeleton, {
|
|
11
|
+
"data-testid": "skeleton-icon",
|
|
12
|
+
className: "rounded-lg w-(--icon-size) h-(--icon-size)"
|
|
13
|
+
}) : children
|
|
14
|
+
}));
|
|
15
|
+
export { BaseInnerShape };
|