@uipath/apollo-react 4.5.1 → 4.5.2-pr525.171b58a
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 +55 -74
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +50 -69
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.cjs +67 -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 +33 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +87 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts +23 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.js +50 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.cjs +65 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts +14 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.js +31 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.cjs +67 -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 +33 -0
- package/dist/canvas/components/BaseNode/BaseNodeTextContainer.cjs +51 -0
- package/dist/canvas/components/BaseNode/BaseNodeTextContainer.d.ts +9 -0
- package/dist/canvas/components/BaseNode/BaseNodeTextContainer.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeTextContainer.js +17 -0
- package/dist/canvas/components/BaseNode/NodeLabel.cjs +48 -18
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts +1 -1
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/NodeLabel.js +44 -14
- 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/constants.cjs +60 -0
- package/dist/canvas/constants.d.ts +15 -0
- package/dist/canvas/constants.d.ts.map +1 -1
- package/dist/canvas/constants.js +16 -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/styles/reactflow-reset.css +12 -0
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/material/components/ap-chat/components/message/suggestions/chat-suggestions.cjs +1 -0
- package/dist/material/components/ap-chat/components/message/suggestions/chat-suggestions.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/suggestions/chat-suggestions.js +1 -0
- package/dist/material/components/ap-tool-call/ApToolCall.cjs +127 -41
- package/dist/material/components/ap-tool-call/ApToolCall.d.ts.map +1 -1
- package/dist/material/components/ap-tool-call/ApToolCall.js +123 -38
- package/dist/material/components/ap-tool-call/ApToolCall.types.cjs +23 -1
- package/dist/material/components/ap-tool-call/ApToolCall.types.d.ts +9 -1
- package/dist/material/components/ap-tool-call/ApToolCall.types.d.ts.map +1 -1
- package/dist/material/components/ap-tool-call/ApToolCall.types.js +6 -0
- package/dist/material/components/ap-tool-call/assets/spanIcons.cjs +221 -0
- package/dist/material/components/ap-tool-call/assets/spanIcons.d.ts +2 -0
- package/dist/material/components/ap-tool-call/assets/spanIcons.d.ts.map +1 -0
- package/dist/material/components/ap-tool-call/assets/spanIcons.js +187 -0
- package/dist/material/components/ap-tool-call/components/NestedValue.d.ts +4 -0
- package/dist/material/components/ap-tool-call/components/NestedValue.d.ts.map +1 -0
- package/dist/material/components/ap-tool-call/{ToolCallSection.cjs → components/ToolCallSection.cjs} +5 -1
- package/dist/material/components/ap-tool-call/components/ToolCallSection.d.ts +4 -0
- package/dist/material/components/ap-tool-call/components/ToolCallSection.d.ts.map +1 -0
- package/dist/material/components/ap-tool-call/{ToolCallSection.js → components/ToolCallSection.js} +5 -1
- package/dist/material/components/ap-tool-call/index.cjs +8 -4
- package/dist/material/components/ap-tool-call/index.d.ts +4 -3
- package/dist/material/components/ap-tool-call/index.d.ts.map +1 -1
- package/dist/material/components/ap-tool-call/index.js +4 -3
- package/dist/material/components/ap-tool-call/locales/en.cjs +1 -1
- package/dist/material/components/ap-tool-call/locales/en.d.ts.map +1 -1
- package/dist/material/components/ap-tool-call/locales/en.js +1 -1
- package/dist/material/components/ap-tool-call/utils/traceIconUtils.cjs +254 -0
- package/dist/material/components/ap-tool-call/utils/traceIconUtils.d.ts +3 -0
- package/dist/material/components/ap-tool-call/utils/traceIconUtils.d.ts.map +1 -0
- package/dist/material/components/ap-tool-call/utils/traceIconUtils.js +220 -0
- 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/material/components/ap-tool-call/NestedValue.d.ts +0 -4
- package/dist/material/components/ap-tool-call/NestedValue.d.ts.map +0 -1
- package/dist/material/components/ap-tool-call/ToolCallSection.d.ts +0 -4
- package/dist/material/components/ap-tool-call/ToolCallSection.d.ts.map +0 -1
- /package/dist/material/components/ap-tool-call/{NestedValue.cjs → components/NestedValue.cjs} +0 -0
- /package/dist/material/components/ap-tool-call/{NestedValue.js → components/NestedValue.js} +0 -0
|
@@ -27,11 +27,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
BaseNode: ()=>BaseNode
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
-
const index_cjs_namespaceObject = require("../../utils/index.cjs");
|
|
31
30
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
32
31
|
const external_react_namespaceObject = require("react");
|
|
33
32
|
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
34
|
-
const
|
|
33
|
+
const index_cjs_namespaceObject = require("../../core/index.cjs");
|
|
35
34
|
const external_hooks_index_cjs_namespaceObject = require("../../hooks/index.cjs");
|
|
36
35
|
const adornment_resolver_cjs_namespaceObject = require("../../utils/adornment-resolver.cjs");
|
|
37
36
|
const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
|
|
@@ -44,10 +43,31 @@ const SelectionStateContext_cjs_namespaceObject = require("../BaseCanvas/Selecti
|
|
|
44
43
|
const SmartHandle_cjs_namespaceObject = require("../ButtonHandle/SmartHandle.cjs");
|
|
45
44
|
const useButtonHandles_cjs_namespaceObject = require("../ButtonHandle/useButtonHandles.cjs");
|
|
46
45
|
const external_Toolbar_index_cjs_namespaceObject = require("../Toolbar/index.cjs");
|
|
47
|
-
const
|
|
46
|
+
const external_BaseNodeBadgeSlot_cjs_namespaceObject = require("./BaseNodeBadgeSlot.cjs");
|
|
48
47
|
const external_BaseNodeConfigContext_cjs_namespaceObject = require("./BaseNodeConfigContext.cjs");
|
|
48
|
+
const external_BaseNodeContainer_cjs_namespaceObject = require("./BaseNodeContainer.cjs");
|
|
49
|
+
const external_BaseNodeInnerShape_cjs_namespaceObject = require("./BaseNodeInnerShape.cjs");
|
|
50
|
+
const external_BaseNodeMissingManifest_cjs_namespaceObject = require("./BaseNodeMissingManifest.cjs");
|
|
49
51
|
const external_NodeLabel_cjs_namespaceObject = require("./NodeLabel.cjs");
|
|
50
52
|
const selectIsConnecting = (state)=>!!state.connectionClickStartHandle;
|
|
53
|
+
const getContainerWidth = (shape, width)=>{
|
|
54
|
+
const defaultWidth = 'rectangle' === shape ? external_constants_cjs_namespaceObject.DEFAULT_RECTANGLE_NODE_WIDTH : external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE;
|
|
55
|
+
if (width && width !== external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE && width !== external_constants_cjs_namespaceObject.DEFAULT_RECTANGLE_NODE_WIDTH) return width;
|
|
56
|
+
return defaultWidth;
|
|
57
|
+
};
|
|
58
|
+
const getContainerHeight = (height, hasFooter, footerVariant)=>{
|
|
59
|
+
if (hasFooter) switch(footerVariant){
|
|
60
|
+
case 'button':
|
|
61
|
+
return external_constants_cjs_namespaceObject.NODE_HEIGHT_FOOTER_BUTTON;
|
|
62
|
+
case 'single':
|
|
63
|
+
return external_constants_cjs_namespaceObject.NODE_HEIGHT_FOOTER_SINGLE;
|
|
64
|
+
case 'double':
|
|
65
|
+
return external_constants_cjs_namespaceObject.NODE_HEIGHT_FOOTER_DOUBLE;
|
|
66
|
+
default:
|
|
67
|
+
return 'auto';
|
|
68
|
+
}
|
|
69
|
+
return height || external_constants_cjs_namespaceObject.NODE_HEIGHT_DEFAULT;
|
|
70
|
+
};
|
|
51
71
|
const BaseNodeComponent = (props)=>{
|
|
52
72
|
const { type, data, selected, id, dragging, width, height } = props;
|
|
53
73
|
const { onHandleAction: onHandleActionProp, shouldShowAddButtonFn: shouldShowAddButtonFnProp, shouldShowButtonHandleNotchesFn: shouldShowButtonHandleNotchesFnProp, toolbarConfig: toolbarConfigProp, handleConfigurations: handleConfigurationsProp, adornments: adornmentsProp, suggestionType, disabled, executionStatusOverride, labelTooltip, labelBackgroundColor, footerVariant, footerComponent, subLabelComponent, iconComponent } = (0, external_BaseNodeConfigContext_cjs_namespaceObject.useBaseNodeOverrideConfig)();
|
|
@@ -59,7 +79,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
59
79
|
const originalHeightRef = (0, external_react_namespaceObject.useRef)(void 0);
|
|
60
80
|
const executionState = (0, external_hooks_index_cjs_namespaceObject.useNodeExecutionState)(id);
|
|
61
81
|
const validationState = (0, external_hooks_index_cjs_namespaceObject.useElementValidationStatus)(id);
|
|
62
|
-
const nodeTypeRegistry = (0,
|
|
82
|
+
const nodeTypeRegistry = (0, index_cjs_namespaceObject.useNodeTypeRegistry)();
|
|
63
83
|
const { mode } = (0, BaseCanvasModeProvider_cjs_namespaceObject.useBaseCanvasMode)();
|
|
64
84
|
const connectedHandleIds = (0, ConnectedHandlesContext_cjs_namespaceObject.useConnectedHandles)(id);
|
|
65
85
|
const isConnecting = (0, react_cjs_namespaceObject.useStore)(selectIsConnecting);
|
|
@@ -155,7 +175,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
155
175
|
statusContext
|
|
156
176
|
]);
|
|
157
177
|
const computedHeight = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
158
|
-
const handleSpacing =
|
|
178
|
+
const handleSpacing = 2 * external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
159
179
|
const leftHandles = handleConfigurations.filter((config)=>config.position === react_cjs_namespaceObject.Position.Left && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
160
180
|
const rightHandles = handleConfigurations.filter((config)=>config.position === react_cjs_namespaceObject.Position.Right && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
161
181
|
const leftRightHandles = Math.max(leftHandles, rightHandles);
|
|
@@ -324,103 +344,69 @@ const BaseNodeComponent = (props)=>{
|
|
|
324
344
|
const handleElements = useSmartHandles ? smartHandleElements : buttonHandleElements;
|
|
325
345
|
if (!manifest) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
326
346
|
ref: containerRef,
|
|
327
|
-
|
|
328
|
-
position: 'relative'
|
|
329
|
-
},
|
|
347
|
+
className: "relative",
|
|
330
348
|
onMouseEnter: handleMouseEnter,
|
|
331
349
|
onMouseLeave: handleMouseLeave,
|
|
332
350
|
onFocus: handleFocus,
|
|
333
351
|
onBlur: handleBlur,
|
|
334
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
interactionState: interactionState
|
|
339
|
-
children: [
|
|
340
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNode_styles_cjs_namespaceObject.BaseIconWrapper, {
|
|
341
|
-
backgroundColor: "var(--canvas-error-background)",
|
|
342
|
-
shape: "square",
|
|
343
|
-
height: height,
|
|
344
|
-
width: width ?? height,
|
|
345
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icon_registry_cjs_namespaceObject.CanvasIcon, {
|
|
346
|
-
icon: "circle-alert",
|
|
347
|
-
size: 32,
|
|
348
|
-
color: "var(--canvas-error-icon)"
|
|
349
|
-
})
|
|
350
|
-
}),
|
|
351
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_BaseNode_styles_cjs_namespaceObject.BaseTextContainer, {
|
|
352
|
-
shape: "square",
|
|
353
|
-
children: [
|
|
354
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNode_styles_cjs_namespaceObject.BaseHeader, {
|
|
355
|
-
shape: "square",
|
|
356
|
-
children: "Manifest not found"
|
|
357
|
-
}),
|
|
358
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_BaseNode_styles_cjs_namespaceObject.BaseSubHeader, {
|
|
359
|
-
children: [
|
|
360
|
-
'Node type "',
|
|
361
|
-
type,
|
|
362
|
-
'" is not registered'
|
|
363
|
-
]
|
|
364
|
-
})
|
|
365
|
-
]
|
|
366
|
-
})
|
|
367
|
-
]
|
|
352
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNodeMissingManifest_cjs_namespaceObject.MissingManifestNode, {
|
|
353
|
+
type: data.nodeType,
|
|
354
|
+
isSelected: selected,
|
|
355
|
+
isHovered: isHovered,
|
|
356
|
+
interactionState: interactionState
|
|
368
357
|
})
|
|
369
358
|
});
|
|
359
|
+
const hasFooter = !!displayFooter;
|
|
360
|
+
const containerWidth = getContainerWidth(displayShape, width);
|
|
361
|
+
const containerHeight = getContainerHeight(height, hasFooter, displayFooterVariant);
|
|
370
362
|
const nodeContent = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
371
363
|
ref: containerRef,
|
|
372
|
-
|
|
373
|
-
position: 'relative'
|
|
374
|
-
},
|
|
364
|
+
className: "relative",
|
|
375
365
|
onMouseEnter: handleMouseEnter,
|
|
376
366
|
onMouseLeave: handleMouseLeave,
|
|
377
367
|
onFocus: handleFocus,
|
|
378
368
|
onBlur: handleBlur,
|
|
379
369
|
children: [
|
|
380
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
381
|
-
selected: selected,
|
|
370
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_BaseNodeContainer_cjs_namespaceObject.BaseContainer, {
|
|
382
371
|
shape: displayShape,
|
|
383
|
-
|
|
372
|
+
isSelected: selected,
|
|
373
|
+
isHovered: isHovered,
|
|
384
374
|
interactionState: interactionState,
|
|
385
375
|
executionStatus: executionStatus,
|
|
386
376
|
validationStatus: validationState?.validationStatus,
|
|
387
377
|
suggestionType: suggestionType,
|
|
388
|
-
width:
|
|
389
|
-
height:
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
"aria-busy": data.loading || void 0,
|
|
378
|
+
width: containerWidth,
|
|
379
|
+
height: containerHeight,
|
|
380
|
+
hasFooter: hasFooter,
|
|
381
|
+
background: displayBackground,
|
|
382
|
+
loading: data.loading,
|
|
394
383
|
children: [
|
|
395
|
-
|
|
396
|
-
"data-testid": "skeleton-icon",
|
|
397
|
-
shape: displayShape,
|
|
398
|
-
nodeHeight: displayFooter ? void 0 : height,
|
|
399
|
-
nodeWidth: displayFooter ? void 0 : width ?? height
|
|
400
|
-
}) : Icon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNode_styles_cjs_namespaceObject.BaseIconWrapper, {
|
|
384
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNodeInnerShape_cjs_namespaceObject.BaseInnerShape, {
|
|
401
385
|
shape: displayShape,
|
|
402
386
|
color: displayColor,
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
387
|
+
background: displayIconBackground,
|
|
388
|
+
loading: data.loading,
|
|
389
|
+
hasFooter: hasFooter,
|
|
390
|
+
containerWidth: containerWidth,
|
|
391
|
+
containerHeight: 'number' == typeof containerHeight ? containerHeight : void 0,
|
|
392
|
+
children: data.loading ? null : Icon
|
|
407
393
|
}),
|
|
408
|
-
adornments?.topLeft && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
394
|
+
adornments?.topLeft && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNodeBadgeSlot_cjs_namespaceObject.BaseBadgeSlot, {
|
|
409
395
|
position: "top-left",
|
|
410
396
|
shape: displayShape,
|
|
411
397
|
children: adornments.topLeft
|
|
412
398
|
}),
|
|
413
|
-
adornments?.topRight && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
399
|
+
adornments?.topRight && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNodeBadgeSlot_cjs_namespaceObject.BaseBadgeSlot, {
|
|
414
400
|
position: "top-right",
|
|
415
401
|
shape: displayShape,
|
|
416
402
|
children: adornments.topRight
|
|
417
403
|
}),
|
|
418
|
-
adornments?.bottomRight && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
404
|
+
adornments?.bottomRight && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNodeBadgeSlot_cjs_namespaceObject.BaseBadgeSlot, {
|
|
419
405
|
position: "bottom-right",
|
|
420
406
|
shape: displayShape,
|
|
421
407
|
children: adornments.bottomRight
|
|
422
408
|
}),
|
|
423
|
-
adornments?.bottomLeft && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
409
|
+
adornments?.bottomLeft && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_BaseNodeBadgeSlot_cjs_namespaceObject.BaseBadgeSlot, {
|
|
424
410
|
position: "bottom-left",
|
|
425
411
|
shape: displayShape,
|
|
426
412
|
children: adornments.bottomLeft
|
|
@@ -438,12 +424,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
438
424
|
onChange: handleLabelChange
|
|
439
425
|
}),
|
|
440
426
|
displayFooter && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
441
|
-
|
|
442
|
-
flexBasis: '100%',
|
|
443
|
-
paddingTop: '2px',
|
|
444
|
-
minWidth: 0,
|
|
445
|
-
overflow: 'hidden'
|
|
446
|
-
},
|
|
427
|
+
className: "basis-full pt-0.5 min-w-0 overflow-hidden",
|
|
447
428
|
children: displayFooter
|
|
448
429
|
})
|
|
449
430
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"
|
|
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;AAkChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AAyiB1B,eAAO,MAAM,QAAQ,8CAjgBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAigBhB,CAAC"}
|
|
@@ -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_HEIGHT_DEFAULT, NODE_HEIGHT_FOOTER_BUTTON, NODE_HEIGHT_FOOTER_DOUBLE, NODE_HEIGHT_FOOTER_SINGLE } 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
24
|
const selectIsConnecting = (state)=>!!state.connectionClickStartHandle;
|
|
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();
|
|
@@ -127,7 +147,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
127
147
|
statusContext
|
|
128
148
|
]);
|
|
129
149
|
const computedHeight = useMemo(()=>{
|
|
130
|
-
const handleSpacing =
|
|
150
|
+
const handleSpacing = 2 * GRID_SPACING;
|
|
131
151
|
const leftHandles = handleConfigurations.filter((config)=>config.position === Position.Left && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
132
152
|
const rightHandles = handleConfigurations.filter((config)=>config.position === Position.Right && false !== config.visible).reduce((count, config)=>count + config.handles.length, 0);
|
|
133
153
|
const leftRightHandles = Math.max(leftHandles, rightHandles);
|
|
@@ -296,86 +316,52 @@ const BaseNodeComponent = (props)=>{
|
|
|
296
316
|
const handleElements = useSmartHandles ? smartHandleElements : buttonHandleElements;
|
|
297
317
|
if (!manifest) return /*#__PURE__*/ jsx("div", {
|
|
298
318
|
ref: containerRef,
|
|
299
|
-
|
|
300
|
-
position: 'relative'
|
|
301
|
-
},
|
|
319
|
+
className: "relative",
|
|
302
320
|
onMouseEnter: handleMouseEnter,
|
|
303
321
|
onMouseLeave: handleMouseLeave,
|
|
304
322
|
onFocus: handleFocus,
|
|
305
323
|
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
|
-
]
|
|
324
|
+
children: /*#__PURE__*/ jsx(MissingManifestNode, {
|
|
325
|
+
type: data.nodeType,
|
|
326
|
+
isSelected: selected,
|
|
327
|
+
isHovered: isHovered,
|
|
328
|
+
interactionState: interactionState
|
|
340
329
|
})
|
|
341
330
|
});
|
|
331
|
+
const hasFooter = !!displayFooter;
|
|
332
|
+
const containerWidth = getContainerWidth(displayShape, width);
|
|
333
|
+
const containerHeight = getContainerHeight(height, hasFooter, displayFooterVariant);
|
|
342
334
|
const nodeContent = /*#__PURE__*/ jsxs("div", {
|
|
343
335
|
ref: containerRef,
|
|
344
|
-
|
|
345
|
-
position: 'relative'
|
|
346
|
-
},
|
|
336
|
+
className: "relative",
|
|
347
337
|
onMouseEnter: handleMouseEnter,
|
|
348
338
|
onMouseLeave: handleMouseLeave,
|
|
349
339
|
onFocus: handleFocus,
|
|
350
340
|
onBlur: handleBlur,
|
|
351
341
|
children: [
|
|
352
342
|
/*#__PURE__*/ jsxs(BaseContainer, {
|
|
353
|
-
selected: selected,
|
|
354
343
|
shape: displayShape,
|
|
355
|
-
|
|
344
|
+
isSelected: selected,
|
|
345
|
+
isHovered: isHovered,
|
|
356
346
|
interactionState: interactionState,
|
|
357
347
|
executionStatus: executionStatus,
|
|
358
348
|
validationStatus: validationState?.validationStatus,
|
|
359
349
|
suggestionType: suggestionType,
|
|
360
|
-
width:
|
|
361
|
-
height:
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
"aria-busy": data.loading || void 0,
|
|
350
|
+
width: containerWidth,
|
|
351
|
+
height: containerHeight,
|
|
352
|
+
hasFooter: hasFooter,
|
|
353
|
+
background: displayBackground,
|
|
354
|
+
loading: data.loading,
|
|
366
355
|
children: [
|
|
367
|
-
|
|
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, {
|
|
356
|
+
/*#__PURE__*/ jsx(BaseInnerShape, {
|
|
373
357
|
shape: displayShape,
|
|
374
358
|
color: displayColor,
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
359
|
+
background: displayIconBackground,
|
|
360
|
+
loading: data.loading,
|
|
361
|
+
hasFooter: hasFooter,
|
|
362
|
+
containerWidth: containerWidth,
|
|
363
|
+
containerHeight: 'number' == typeof containerHeight ? containerHeight : void 0,
|
|
364
|
+
children: data.loading ? null : Icon
|
|
379
365
|
}),
|
|
380
366
|
adornments?.topLeft && /*#__PURE__*/ jsx(BaseBadgeSlot, {
|
|
381
367
|
position: "top-left",
|
|
@@ -410,12 +396,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
410
396
|
onChange: handleLabelChange
|
|
411
397
|
}),
|
|
412
398
|
displayFooter && /*#__PURE__*/ jsx("div", {
|
|
413
|
-
|
|
414
|
-
flexBasis: '100%',
|
|
415
|
-
paddingTop: '2px',
|
|
416
|
-
minWidth: 0,
|
|
417
|
-
overflow: 'hidden'
|
|
418
|
-
},
|
|
399
|
+
className: "basis-full pt-0.5 min-w-0 overflow-hidden",
|
|
419
400
|
children: displayFooter
|
|
420
401
|
})
|
|
421
402
|
]
|
|
@@ -0,0 +1,67 @@
|
|
|
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_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
31
|
+
const BaseBadgeSlot = ({ position, shape, children })=>{
|
|
32
|
+
const offset = 'circle' === shape ? external_constants_cjs_namespaceObject.NODE_BADGE_INSET_CIRCLE : external_constants_cjs_namespaceObject.NODE_BADGE_INSET_SQUARE;
|
|
33
|
+
const style = {
|
|
34
|
+
width: external_constants_cjs_namespaceObject.NODE_BADGE_SIZE,
|
|
35
|
+
height: external_constants_cjs_namespaceObject.NODE_BADGE_SIZE
|
|
36
|
+
};
|
|
37
|
+
switch(position){
|
|
38
|
+
case 'top-left':
|
|
39
|
+
style.top = offset;
|
|
40
|
+
style.left = offset;
|
|
41
|
+
break;
|
|
42
|
+
case 'top-right':
|
|
43
|
+
style.top = offset;
|
|
44
|
+
style.right = offset;
|
|
45
|
+
break;
|
|
46
|
+
case 'bottom-left':
|
|
47
|
+
style.bottom = offset;
|
|
48
|
+
style.left = offset;
|
|
49
|
+
break;
|
|
50
|
+
case 'bottom-right':
|
|
51
|
+
style.bottom = offset;
|
|
52
|
+
style.right = offset;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
56
|
+
className: "absolute flex items-center justify-center bg-transparent",
|
|
57
|
+
style: style,
|
|
58
|
+
children: children
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
exports.BaseBadgeSlot = __webpack_exports__.BaseBadgeSlot;
|
|
62
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
63
|
+
"BaseBadgeSlot"
|
|
64
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
65
|
+
Object.defineProperty(exports, '__esModule', {
|
|
66
|
+
value: true
|
|
67
|
+
});
|
|
@@ -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: ({ 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":"AACA,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,GAAI,+BAA+B,kBAAkB,4CA0B9E,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NODE_BADGE_INSET_CIRCLE, NODE_BADGE_INSET_SQUARE, NODE_BADGE_SIZE } from "../../constants.js";
|
|
3
|
+
const BaseBadgeSlot = ({ position, shape, children })=>{
|
|
4
|
+
const offset = 'circle' === shape ? NODE_BADGE_INSET_CIRCLE : NODE_BADGE_INSET_SQUARE;
|
|
5
|
+
const style = {
|
|
6
|
+
width: NODE_BADGE_SIZE,
|
|
7
|
+
height: NODE_BADGE_SIZE
|
|
8
|
+
};
|
|
9
|
+
switch(position){
|
|
10
|
+
case 'top-left':
|
|
11
|
+
style.top = offset;
|
|
12
|
+
style.left = offset;
|
|
13
|
+
break;
|
|
14
|
+
case 'top-right':
|
|
15
|
+
style.top = offset;
|
|
16
|
+
style.right = offset;
|
|
17
|
+
break;
|
|
18
|
+
case 'bottom-left':
|
|
19
|
+
style.bottom = offset;
|
|
20
|
+
style.left = offset;
|
|
21
|
+
break;
|
|
22
|
+
case 'bottom-right':
|
|
23
|
+
style.bottom = offset;
|
|
24
|
+
style.right = offset;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
return /*#__PURE__*/ jsx("div", {
|
|
28
|
+
className: "absolute flex items-center justify-center bg-transparent",
|
|
29
|
+
style: style,
|
|
30
|
+
children: children
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export { BaseBadgeSlot };
|
|
@@ -0,0 +1,87 @@
|
|
|
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_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
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 animate-glow [--glow-color:var(--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, width, height, hasFooter, background, loading, children })=>{
|
|
57
|
+
const activeStatus = suggestionType ?? validationStatus ?? executionStatus;
|
|
58
|
+
const numericWidth = 'number' == typeof width ? width : void 0;
|
|
59
|
+
const numericHeight = 'number' == typeof height ? height : void 0;
|
|
60
|
+
const radiusBasis = 'rectangle' === shape ? numericHeight ?? external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE : Math.min(numericWidth ?? external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE, numericHeight ?? external_constants_cjs_namespaceObject.DEFAULT_NODE_SIZE);
|
|
61
|
+
const containerRadius = radiusBasis * external_constants_cjs_namespaceObject.NODE_CONTAINER_RADIUS_RATIO;
|
|
62
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
63
|
+
"data-testid": "base-container",
|
|
64
|
+
"data-execution-status": executionStatus,
|
|
65
|
+
"data-interaction-state": interactionState,
|
|
66
|
+
"data-validation-status": validationStatus,
|
|
67
|
+
"data-suggestion-type": suggestionType,
|
|
68
|
+
className: (0, apollo_wind_namespaceObject.cn)('relative flex items-center cursor-pointer bg-surface-overlay border-2 border-border', 'circle' === shape ? 'rounded-full' : '', 'rectangle' === shape ? 'flex-row justify-start gap-3 p-2' : 'flex-col justify-center', hasFooter && 'flex-wrap rounded-2xl', 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'),
|
|
69
|
+
style: {
|
|
70
|
+
width,
|
|
71
|
+
height,
|
|
72
|
+
background,
|
|
73
|
+
borderRadius: 'circle' === shape || hasFooter ? void 0 : containerRadius
|
|
74
|
+
},
|
|
75
|
+
"aria-busy": loading || void 0,
|
|
76
|
+
children: children
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
exports.BaseContainer = __webpack_exports__.BaseContainer;
|
|
80
|
+
exports.getStatusBorder = __webpack_exports__.getStatusBorder;
|
|
81
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
82
|
+
"BaseContainer",
|
|
83
|
+
"getStatusBorder"
|
|
84
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
85
|
+
Object.defineProperty(exports, '__esModule', {
|
|
86
|
+
value: true
|
|
87
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
width?: number;
|
|
15
|
+
height?: number | 'auto';
|
|
16
|
+
hasFooter?: boolean;
|
|
17
|
+
background?: string;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const BaseContainer: ({ isSelected, isHovered, shape, interactionState, executionStatus, validationStatus, suggestionType, width, height, hasFooter, background, loading, children, }: BaseContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
23
|
+
//# 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,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,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;AACD,eAAO,MAAM,aAAa,GAAI,iKAc3B,kBAAkB,4CAkDpB,CAAC"}
|