@uipath/apollo-react 4.6.1 → 4.6.2
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.
|
@@ -76,7 +76,6 @@ const CHIP_ICONS = {
|
|
|
76
76
|
};
|
|
77
77
|
const StageNodeInner = (props)=>{
|
|
78
78
|
const { dragging, selected, id, width, execution, stageDetails, addTaskLabel = 'Add task', replaceTaskLabel = 'Replace task', taskOptions = [], menuItems, pendingReplaceTask, onStageClick, onTaskAdd, onAddTaskFromToolbox, onTaskToolboxSearch, onTaskClick, onTaskGroupModification, onStageTitleChange, onTaskReorder, onReplaceTaskFromToolbox, onTaskPlay, hideParallelOptions, loadingTaskIds } = props;
|
|
79
|
-
const isAnyTaskLoading = null != loadingTaskIds && loadingTaskIds.size > 0;
|
|
80
79
|
const taskWidth = width ? width - external_StageNode_styles_cjs_namespaceObject.STAGE_CONTENT_INSET : void 0;
|
|
81
80
|
const allTasks = (0, external_react_namespaceObject.useMemo)(()=>stageDetails?.tasks || [], [
|
|
82
81
|
stageDetails?.tasks
|
|
@@ -594,14 +593,12 @@ const StageNodeInner = (props)=>{
|
|
|
594
593
|
(onTaskAdd || onAddTaskFromToolbox) && !isReadOnly && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
595
594
|
content: addTaskLabel,
|
|
596
595
|
placement: "top",
|
|
597
|
-
hide: isAnyTaskLoading,
|
|
598
596
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
599
597
|
variant: "ghost",
|
|
600
598
|
size: "icon",
|
|
601
599
|
className: "h-6 w-6",
|
|
602
600
|
onClick: handleTaskAddClick,
|
|
603
601
|
"aria-label": addTaskLabel,
|
|
604
|
-
disabled: isAnyTaskLoading,
|
|
605
602
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icon_registry_cjs_namespaceObject.CanvasIcon, {
|
|
606
603
|
icon: "plus",
|
|
607
604
|
size: 20
|
|
@@ -617,10 +614,9 @@ const StageNodeInner = (props)=>{
|
|
|
617
614
|
py: 2,
|
|
618
615
|
children: (onTaskAdd || onAddTaskFromToolbox) && !isReadOnly ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
619
616
|
variant: "link",
|
|
620
|
-
onClick:
|
|
617
|
+
onClick: handleTaskAddClick,
|
|
621
618
|
style: {
|
|
622
|
-
maxWidth: 'fit-content'
|
|
623
|
-
pointerEvents: isAnyTaskLoading ? 'none' : void 0
|
|
619
|
+
maxWidth: 'fit-content'
|
|
624
620
|
},
|
|
625
621
|
children: defaultContent
|
|
626
622
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
@@ -669,7 +665,7 @@ const StageNodeInner = (props)=>{
|
|
|
669
665
|
taskIndex: taskIndex,
|
|
670
666
|
onTaskClick: handleTaskClick,
|
|
671
667
|
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
672
|
-
isDragDisabled: !onTaskReorder,
|
|
668
|
+
isDragDisabled: !onTaskReorder || isReadOnly,
|
|
673
669
|
isTaskLoading: loadingTaskIds?.has(task.id),
|
|
674
670
|
...hasContextMenu && !isReadOnly && {
|
|
675
671
|
getContextMenuItems: buildContextMenuItems
|
|
@@ -731,7 +727,6 @@ const StageNodeInner = (props)=>{
|
|
|
731
727
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Toolbox_index_cjs_namespaceObject.Toolbox, {
|
|
732
728
|
title: addTaskLabel,
|
|
733
729
|
initialItems: taskOptions,
|
|
734
|
-
loading: isAnyTaskLoading,
|
|
735
730
|
onClose: ()=>setIsAddingTask(false),
|
|
736
731
|
onItemSelect: handleAddTaskToolboxItemSelected,
|
|
737
732
|
onSearch: onTaskToolboxSearch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA2vBxD,eAAO,MAAM,SAAS,8CAvuBS,cAAc,6CAuuBA,CAAC"}
|
|
@@ -48,7 +48,6 @@ const CHIP_ICONS = {
|
|
|
48
48
|
};
|
|
49
49
|
const StageNodeInner = (props)=>{
|
|
50
50
|
const { dragging, selected, id, width, execution, stageDetails, addTaskLabel = 'Add task', replaceTaskLabel = 'Replace task', taskOptions = [], menuItems, pendingReplaceTask, onStageClick, onTaskAdd, onAddTaskFromToolbox, onTaskToolboxSearch, onTaskClick, onTaskGroupModification, onStageTitleChange, onTaskReorder, onReplaceTaskFromToolbox, onTaskPlay, hideParallelOptions, loadingTaskIds } = props;
|
|
51
|
-
const isAnyTaskLoading = null != loadingTaskIds && loadingTaskIds.size > 0;
|
|
52
51
|
const taskWidth = width ? width - STAGE_CONTENT_INSET : void 0;
|
|
53
52
|
const allTasks = useMemo(()=>stageDetails?.tasks || [], [
|
|
54
53
|
stageDetails?.tasks
|
|
@@ -566,14 +565,12 @@ const StageNodeInner = (props)=>{
|
|
|
566
565
|
(onTaskAdd || onAddTaskFromToolbox) && !isReadOnly && /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
567
566
|
content: addTaskLabel,
|
|
568
567
|
placement: "top",
|
|
569
|
-
hide: isAnyTaskLoading,
|
|
570
568
|
children: /*#__PURE__*/ jsx(Button, {
|
|
571
569
|
variant: "ghost",
|
|
572
570
|
size: "icon",
|
|
573
571
|
className: "h-6 w-6",
|
|
574
572
|
onClick: handleTaskAddClick,
|
|
575
573
|
"aria-label": addTaskLabel,
|
|
576
|
-
disabled: isAnyTaskLoading,
|
|
577
574
|
children: /*#__PURE__*/ jsx(CanvasIcon, {
|
|
578
575
|
icon: "plus",
|
|
579
576
|
size: 20
|
|
@@ -589,10 +586,9 @@ const StageNodeInner = (props)=>{
|
|
|
589
586
|
py: 2,
|
|
590
587
|
children: (onTaskAdd || onAddTaskFromToolbox) && !isReadOnly ? /*#__PURE__*/ jsx(Button, {
|
|
591
588
|
variant: "link",
|
|
592
|
-
onClick:
|
|
589
|
+
onClick: handleTaskAddClick,
|
|
593
590
|
style: {
|
|
594
|
-
maxWidth: 'fit-content'
|
|
595
|
-
pointerEvents: isAnyTaskLoading ? 'none' : void 0
|
|
591
|
+
maxWidth: 'fit-content'
|
|
596
592
|
},
|
|
597
593
|
children: defaultContent
|
|
598
594
|
}) : /*#__PURE__*/ jsx("span", {
|
|
@@ -641,7 +637,7 @@ const StageNodeInner = (props)=>{
|
|
|
641
637
|
taskIndex: taskIndex,
|
|
642
638
|
onTaskClick: handleTaskClick,
|
|
643
639
|
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
644
|
-
isDragDisabled: !onTaskReorder,
|
|
640
|
+
isDragDisabled: !onTaskReorder || isReadOnly,
|
|
645
641
|
isTaskLoading: loadingTaskIds?.has(task.id),
|
|
646
642
|
...hasContextMenu && !isReadOnly && {
|
|
647
643
|
getContextMenuItems: buildContextMenuItems
|
|
@@ -703,7 +699,6 @@ const StageNodeInner = (props)=>{
|
|
|
703
699
|
children: /*#__PURE__*/ jsx(Toolbox, {
|
|
704
700
|
title: addTaskLabel,
|
|
705
701
|
initialItems: taskOptions,
|
|
706
|
-
loading: isAnyTaskLoading,
|
|
707
702
|
onClose: ()=>setIsAddingTask(false),
|
|
708
703
|
onItemSelect: handleAddTaskToolboxItemSelected,
|
|
709
704
|
onSearch: onTaskToolboxSearch
|