@uipath/apollo-react 4.22.1 → 4.22.2-pr651.476969
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/AddNodePanel/AddNodeManager.cjs +4 -1
- package/dist/canvas/components/AddNodePanel/AddNodeManager.d.ts.map +1 -1
- package/dist/canvas/components/AddNodePanel/AddNodeManager.helpers.cjs +15 -26
- package/dist/canvas/components/AddNodePanel/AddNodeManager.helpers.d.ts +3 -3
- package/dist/canvas/components/AddNodePanel/AddNodeManager.helpers.d.ts.map +1 -1
- package/dist/canvas/components/AddNodePanel/AddNodeManager.helpers.js +18 -29
- package/dist/canvas/components/AddNodePanel/AddNodeManager.js +4 -1
- package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.cjs +2 -9
- package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.d.ts.map +1 -1
- package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.js +2 -9
- package/dist/canvas/components/LoopNode/LoopNode.helpers.cjs +28 -8
- package/dist/canvas/components/LoopNode/LoopNode.helpers.d.ts +8 -2
- package/dist/canvas/components/LoopNode/LoopNode.helpers.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.helpers.js +23 -6
- package/dist/canvas/components/StageNode/DraggableTask.cjs +3 -2
- package/dist/canvas/components/StageNode/DraggableTask.d.ts +1 -1
- package/dist/canvas/components/StageNode/DraggableTask.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/DraggableTask.js +3 -2
- package/dist/canvas/components/StageNode/DraggableTask.types.d.ts +1 -0
- package/dist/canvas/components/StageNode/DraggableTask.types.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeAllTaskGroups.cjs +5 -2
- package/dist/canvas/components/StageNode/StageNodeAllTaskGroups.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeAllTaskGroups.js +5 -2
- package/dist/canvas/components/StageNode/StageNodeSequentialTaskGroups.cjs +2 -1
- package/dist/canvas/components/StageNode/StageNodeSequentialTaskGroups.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeSequentialTaskGroups.js +2 -1
- package/dist/canvas/components/StageNode/TaskContent.cjs +109 -111
- package/dist/canvas/components/StageNode/TaskContent.d.ts +2 -1
- package/dist/canvas/components/StageNode/TaskContent.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/TaskContent.js +110 -112
- package/dist/canvas/components/Toolbar/EdgeToolbar/useEdgeToolbarState.cjs +6 -9
- package/dist/canvas/components/Toolbar/EdgeToolbar/useEdgeToolbarState.d.ts.map +1 -1
- package/dist/canvas/components/Toolbar/EdgeToolbar/useEdgeToolbarState.js +6 -9
- package/dist/canvas/hooks/index.cjs +19 -12
- package/dist/canvas/hooks/index.d.ts +1 -0
- package/dist/canvas/hooks/index.d.ts.map +1 -1
- package/dist/canvas/hooks/index.js +1 -0
- package/dist/canvas/hooks/useAddNodeOnConnectEnd.cjs +18 -5
- package/dist/canvas/hooks/useAddNodeOnConnectEnd.d.ts.map +1 -1
- package/dist/canvas/hooks/useAddNodeOnConnectEnd.js +18 -5
- package/dist/canvas/hooks/useCanvasNodeLayout.cjs +66 -0
- package/dist/canvas/hooks/useCanvasNodeLayout.d.ts +15 -0
- package/dist/canvas/hooks/useCanvasNodeLayout.d.ts.map +1 -0
- package/dist/canvas/hooks/useCanvasNodeLayout.js +29 -0
- package/dist/canvas/utils/NodeUtils.cjs +4 -4
- package/dist/canvas/utils/NodeUtils.d.ts +1 -1
- package/dist/canvas/utils/NodeUtils.d.ts.map +1 -1
- package/dist/canvas/utils/NodeUtils.js +4 -4
- package/dist/canvas/utils/container.cjs +3 -2
- package/dist/canvas/utils/container.d.ts +1 -0
- package/dist/canvas/utils/container.d.ts.map +1 -1
- package/dist/canvas/utils/container.js +3 -2
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ import { INDENTATION_WIDTH, StageTask, StageTaskDragPlaceholder, StageTaskDragPl
|
|
|
7
7
|
import { StageTaskEntryConditionIcon } from "./StageTaskEntryConditionIcon.js";
|
|
8
8
|
import { TaskContent } from "./TaskContent.js";
|
|
9
9
|
import { TaskMenu } from "./TaskMenu.js";
|
|
10
|
-
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, groupIndex, taskIndex, getContextMenuItems, onTaskClick, isDragDisabled, projectedDepth, isTaskLoading })=>{
|
|
10
|
+
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, groupIndex, taskIndex, getContextMenuItems, onTaskClick, isDragDisabled, projectedDepth, isTaskLoading, isReadOnly })=>{
|
|
11
11
|
const zoom = useStore((s)=>s.transform[2]);
|
|
12
12
|
const taskRef = useRef(null);
|
|
13
13
|
const menuRef = useRef(null);
|
|
@@ -80,7 +80,8 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, g
|
|
|
80
80
|
children: [
|
|
81
81
|
/*#__PURE__*/ jsx(TaskContent, {
|
|
82
82
|
task: task,
|
|
83
|
-
taskExecution: taskExecution
|
|
83
|
+
taskExecution: taskExecution,
|
|
84
|
+
isReadOnly: isReadOnly
|
|
84
85
|
}),
|
|
85
86
|
/*#__PURE__*/ jsx(StageTaskEntryConditionIcon, {
|
|
86
87
|
task: task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableTask.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,YAAY,EAAE,CAAC;IAChG,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DraggableTask.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,YAAY,EAAE,CAAC;IAChG,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -114,16 +114,19 @@ const StageNodeAllTaskGroupsInner = ({ props, isReadOnly, taskWidthStyle, taskSt
|
|
|
114
114
|
py: 2,
|
|
115
115
|
children: (onTaskAdd || onAddTaskFromToolbox) && !isReadOnly ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
116
116
|
variant: "link",
|
|
117
|
+
size: "sm",
|
|
117
118
|
onClick: handleTaskAddClick,
|
|
118
119
|
style: {
|
|
119
|
-
maxWidth: 'fit-content'
|
|
120
|
+
maxWidth: 'fit-content',
|
|
121
|
+
padding: 0
|
|
120
122
|
},
|
|
121
123
|
children: defaultContent
|
|
122
124
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
123
|
-
className: "text-xs text-foreground-muted",
|
|
125
|
+
className: "text-xs text-foreground-muted h-9",
|
|
124
126
|
children: defaultContent
|
|
125
127
|
})
|
|
126
128
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
129
|
+
py: 2,
|
|
127
130
|
children: [
|
|
128
131
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNodeSequentialTaskGroups_cjs_namespaceObject.StageNodeSequentialTaskGroups, {
|
|
129
132
|
props: props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNodeAllTaskGroups.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeAllTaskGroups.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAQ,SAAS,EAAwB,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,cAAc,EAAiB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"StageNodeAllTaskGroups.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeAllTaskGroups.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAQ,SAAS,EAAwB,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,cAAc,EAAiB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAqM3F,eAAO,MAAM,sBAAsB,8JAvLhC;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,kBAAkB,EAAE,SAAS,CAAC,kBAAkB,CAAC,CAAC;IAClD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACtD,kBAAkB,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD,6CA+KsE,CAAC"}
|
|
@@ -86,16 +86,19 @@ const StageNodeAllTaskGroupsInner = ({ props, isReadOnly, taskWidthStyle, taskSt
|
|
|
86
86
|
py: 2,
|
|
87
87
|
children: (onTaskAdd || onAddTaskFromToolbox) && !isReadOnly ? /*#__PURE__*/ jsx(Button, {
|
|
88
88
|
variant: "link",
|
|
89
|
+
size: "sm",
|
|
89
90
|
onClick: handleTaskAddClick,
|
|
90
91
|
style: {
|
|
91
|
-
maxWidth: 'fit-content'
|
|
92
|
+
maxWidth: 'fit-content',
|
|
93
|
+
padding: 0
|
|
92
94
|
},
|
|
93
95
|
children: defaultContent
|
|
94
96
|
}) : /*#__PURE__*/ jsx("span", {
|
|
95
|
-
className: "text-xs text-foreground-muted",
|
|
97
|
+
className: "text-xs text-foreground-muted h-9",
|
|
96
98
|
children: defaultContent
|
|
97
99
|
})
|
|
98
100
|
}) : /*#__PURE__*/ jsxs(Column, {
|
|
101
|
+
py: 2,
|
|
99
102
|
children: [
|
|
100
103
|
/*#__PURE__*/ jsx(StageNodeSequentialTaskGroups, {
|
|
101
104
|
props: props,
|
|
@@ -156,7 +156,8 @@ const StageNodeSequentialTaskGroups = ({ props, sequentialTaskGroups, sequential
|
|
|
156
156
|
isTaskLoading: loadingTaskIds?.has(task.id),
|
|
157
157
|
...hasContextMenu && !isReadOnly && {
|
|
158
158
|
getContextMenuItems: buildContextMenuItems
|
|
159
|
-
}
|
|
159
|
+
},
|
|
160
|
+
isReadOnly: isReadOnly
|
|
160
161
|
}, task.id);
|
|
161
162
|
})
|
|
162
163
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNodeSequentialTaskGroups.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeSequentialTaskGroups.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAwB,MAAM,OAAO,CAAC;AAM5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASvD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvF,eAAO,MAAM,6BAA6B,GAAI,4MAY3C;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,oBAAoB,EAAE,aAAa,EAAE,EAAE,CAAC;IACxC,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,QAAQ,EAAE,aAAa,EAAE,EAAE,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,4BAA4B,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,KAAK,IAAI,CAAC;IACpE,kCAAkC,EAAE,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,OAAO,KAChB,YAAY,GAAG,SAAS,CAAC;CAC/B,
|
|
1
|
+
{"version":3,"file":"StageNodeSequentialTaskGroups.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeSequentialTaskGroups.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAwB,MAAM,OAAO,CAAC;AAM5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASvD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvF,eAAO,MAAM,6BAA6B,GAAI,4MAY3C;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,oBAAoB,EAAE,aAAa,EAAE,EAAE,CAAC;IACxC,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,QAAQ,EAAE,aAAa,EAAE,EAAE,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,4BAA4B,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,KAAK,IAAI,CAAC;IACpE,kCAAkC,EAAE,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,OAAO,KAChB,YAAY,GAAG,SAAS,CAAC;CAC/B,mDAkLA,CAAC"}
|
|
@@ -128,7 +128,8 @@ const StageNodeSequentialTaskGroups = ({ props, sequentialTaskGroups, sequential
|
|
|
128
128
|
isTaskLoading: loadingTaskIds?.has(task.id),
|
|
129
129
|
...hasContextMenu && !isReadOnly && {
|
|
130
130
|
getContextMenuItems: buildContextMenuItems
|
|
131
|
-
}
|
|
131
|
+
},
|
|
132
|
+
isReadOnly: isReadOnly
|
|
132
133
|
}, task.id);
|
|
133
134
|
})
|
|
134
135
|
]
|
|
@@ -145,124 +145,122 @@ const TaskPlayButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({
|
|
|
145
145
|
})
|
|
146
146
|
});
|
|
147
147
|
});
|
|
148
|
-
const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ task, taskExecution, isDragging, onTaskPlay })=>{
|
|
148
|
+
const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ task, taskExecution, isDragging, onTaskPlay, isReadOnly })=>{
|
|
149
149
|
const hasExecutionStatus = !!taskExecution?.status;
|
|
150
150
|
const hasSecondRowContent = taskExecution && (taskExecution.duration || taskExecution.retryDuration || taskExecution.badge);
|
|
151
151
|
const showPlayButtonSmall = onTaskPlay && hasExecutionStatus;
|
|
152
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
children: task.label
|
|
188
|
-
})
|
|
189
|
-
})
|
|
190
|
-
]
|
|
191
|
-
}),
|
|
192
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
193
|
-
align: "center",
|
|
194
|
-
gap: apollo_core_namespaceObject.Spacing.SpacingXs,
|
|
195
|
-
style: {
|
|
196
|
-
flexShrink: 0
|
|
197
|
-
},
|
|
198
|
-
children: [
|
|
199
|
-
hasExecutionStatus && (taskExecution.message ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
200
|
-
content: taskExecution.message,
|
|
201
|
-
placement: "top",
|
|
202
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
203
|
-
variant: "ghost",
|
|
204
|
-
size: "icon",
|
|
205
|
-
className: "h-6 w-6",
|
|
206
|
-
"aria-label": taskExecution.message,
|
|
207
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
|
|
208
|
-
status: taskExecution.status
|
|
209
|
-
})
|
|
210
|
-
})
|
|
211
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
|
|
212
|
-
status: taskExecution.status
|
|
213
|
-
})),
|
|
214
|
-
showPlayButtonSmall && !hasSecondRowContent && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
215
|
-
taskId: task.id,
|
|
216
|
-
onTaskPlay: onTaskPlay,
|
|
217
|
-
small: true
|
|
218
|
-
}),
|
|
219
|
-
onTaskPlay && !hasExecutionStatus && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
220
|
-
taskId: task.id,
|
|
221
|
-
onTaskPlay: onTaskPlay
|
|
152
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
153
|
+
flex: 1,
|
|
154
|
+
style: {
|
|
155
|
+
overflow: 'hidden',
|
|
156
|
+
textOverflow: 'ellipsis',
|
|
157
|
+
whiteSpace: 'nowrap'
|
|
158
|
+
},
|
|
159
|
+
gap: apollo_core_namespaceObject.Padding.PadXs,
|
|
160
|
+
children: [
|
|
161
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
162
|
+
align: "center",
|
|
163
|
+
justify: "space-between",
|
|
164
|
+
children: [
|
|
165
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
166
|
+
gap: apollo_core_namespaceObject.Spacing.SpacingXs,
|
|
167
|
+
align: "center",
|
|
168
|
+
style: {
|
|
169
|
+
overflow: 'hidden',
|
|
170
|
+
textOverflow: 'ellipsis',
|
|
171
|
+
whiteSpace: 'nowrap'
|
|
172
|
+
},
|
|
173
|
+
children: [
|
|
174
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskIcon, {
|
|
175
|
+
children: task.icon ?? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessCanvasIcon, {})
|
|
176
|
+
}),
|
|
177
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
178
|
+
content: task.label,
|
|
179
|
+
placement: "top",
|
|
180
|
+
smartTooltip: true,
|
|
181
|
+
...isDragging && {
|
|
182
|
+
isOpen: false
|
|
183
|
+
},
|
|
184
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
185
|
+
className: "text-sm truncate",
|
|
186
|
+
children: task.label
|
|
222
187
|
})
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
taskExecution
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
}),
|
|
191
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
192
|
+
align: "center",
|
|
193
|
+
gap: apollo_core_namespaceObject.Spacing.SpacingXs,
|
|
194
|
+
style: {
|
|
195
|
+
flexShrink: 0
|
|
196
|
+
},
|
|
197
|
+
children: [
|
|
198
|
+
hasExecutionStatus && (taskExecution.message ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
199
|
+
content: taskExecution.message,
|
|
200
|
+
placement: "top",
|
|
201
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
202
|
+
variant: "ghost",
|
|
203
|
+
size: "icon",
|
|
204
|
+
className: "h-6 w-6",
|
|
205
|
+
"aria-label": taskExecution.message,
|
|
206
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
|
|
207
|
+
status: taskExecution.status
|
|
243
208
|
})
|
|
244
209
|
})
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
210
|
+
}) : !isReadOnly && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
|
|
211
|
+
status: taskExecution.status
|
|
212
|
+
})),
|
|
213
|
+
showPlayButtonSmall && !hasSecondRowContent && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
214
|
+
taskId: task.id,
|
|
215
|
+
onTaskPlay: onTaskPlay,
|
|
216
|
+
small: true
|
|
217
|
+
}),
|
|
218
|
+
onTaskPlay && !hasExecutionStatus && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
219
|
+
taskId: task.id,
|
|
220
|
+
onTaskPlay: onTaskPlay
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
})
|
|
224
|
+
]
|
|
225
|
+
}),
|
|
226
|
+
taskExecution && hasSecondRowContent && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
227
|
+
align: "center",
|
|
228
|
+
justify: "space-between",
|
|
229
|
+
children: [
|
|
230
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
231
|
+
gap: '2px',
|
|
232
|
+
children: [
|
|
233
|
+
taskExecution?.duration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
234
|
+
className: "text-xs text-foreground-muted",
|
|
235
|
+
children: taskExecution.duration
|
|
236
|
+
}),
|
|
237
|
+
taskExecution?.retryDuration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskRetryDuration, {
|
|
238
|
+
status: taskExecution.badgeStatus ?? 'warning',
|
|
239
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
240
|
+
className: "text-xs",
|
|
241
|
+
children: `(+${taskExecution.retryDuration})`
|
|
259
242
|
})
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
243
|
+
})
|
|
244
|
+
]
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
247
|
+
align: "center",
|
|
248
|
+
gap: apollo_core_namespaceObject.Spacing.SpacingXs,
|
|
249
|
+
children: [
|
|
250
|
+
taskExecution?.badge && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Badge, {
|
|
251
|
+
variant: taskExecution.badgeStatus,
|
|
252
|
+
children: generateBadgeText(taskExecution) ?? ''
|
|
253
|
+
}),
|
|
254
|
+
showPlayButtonSmall && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
255
|
+
taskId: task.id,
|
|
256
|
+
onTaskPlay: onTaskPlay,
|
|
257
|
+
small: true
|
|
258
|
+
})
|
|
259
|
+
]
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
})
|
|
263
|
+
]
|
|
266
264
|
});
|
|
267
265
|
});
|
|
268
266
|
exports.TaskContent = __webpack_exports__.TaskContent;
|
|
@@ -4,6 +4,7 @@ export interface TaskContentProps {
|
|
|
4
4
|
taskExecution?: StageTaskExecution;
|
|
5
5
|
isDragging?: boolean;
|
|
6
6
|
onTaskPlay?: (taskId: string) => Promise<void>;
|
|
7
|
+
isReadOnly?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const TaskContent: import("react").MemoExoticComponent<({ task, taskExecution, isDragging, onTaskPlay }: TaskContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export declare const TaskContent: import("react").MemoExoticComponent<({ task, taskExecution, isDragging, onTaskPlay, isReadOnly }: TaskContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
10
|
//# sourceMappingURL=TaskContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskContent.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/TaskContent.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA8F3E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"TaskContent.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/TaskContent.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA8F3E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,oGACwC,gBAAgB,6CAiF/E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Padding, Spacing } from "@uipath/apollo-core";
|
|
3
3
|
import { Column, Row } from "../../layouts/index.js";
|
|
4
4
|
import { Badge, Button, Spinner } from "@uipath/apollo-wind";
|
|
@@ -107,124 +107,122 @@ const TaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay, small })=>{
|
|
|
107
107
|
})
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
|
-
const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTaskPlay })=>{
|
|
110
|
+
const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTaskPlay, isReadOnly })=>{
|
|
111
111
|
const hasExecutionStatus = !!taskExecution?.status;
|
|
112
112
|
const hasSecondRowContent = taskExecution && (taskExecution.duration || taskExecution.retryDuration || taskExecution.badge);
|
|
113
113
|
const showPlayButtonSmall = onTaskPlay && hasExecutionStatus;
|
|
114
|
-
return /*#__PURE__*/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/*#__PURE__*/ jsx(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
children: task.label
|
|
150
|
-
})
|
|
151
|
-
})
|
|
152
|
-
]
|
|
153
|
-
}),
|
|
154
|
-
/*#__PURE__*/ jsxs(Row, {
|
|
155
|
-
align: "center",
|
|
156
|
-
gap: Spacing.SpacingXs,
|
|
157
|
-
style: {
|
|
158
|
-
flexShrink: 0
|
|
159
|
-
},
|
|
160
|
-
children: [
|
|
161
|
-
hasExecutionStatus && (taskExecution.message ? /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
162
|
-
content: taskExecution.message,
|
|
163
|
-
placement: "top",
|
|
164
|
-
children: /*#__PURE__*/ jsx(Button, {
|
|
165
|
-
variant: "ghost",
|
|
166
|
-
size: "icon",
|
|
167
|
-
className: "h-6 w-6",
|
|
168
|
-
"aria-label": taskExecution.message,
|
|
169
|
-
children: /*#__PURE__*/ jsx(ExecutionStatusIcon, {
|
|
170
|
-
status: taskExecution.status
|
|
171
|
-
})
|
|
172
|
-
})
|
|
173
|
-
}) : /*#__PURE__*/ jsx(ExecutionStatusIcon, {
|
|
174
|
-
status: taskExecution.status
|
|
175
|
-
})),
|
|
176
|
-
showPlayButtonSmall && !hasSecondRowContent && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
177
|
-
taskId: task.id,
|
|
178
|
-
onTaskPlay: onTaskPlay,
|
|
179
|
-
small: true
|
|
180
|
-
}),
|
|
181
|
-
onTaskPlay && !hasExecutionStatus && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
182
|
-
taskId: task.id,
|
|
183
|
-
onTaskPlay: onTaskPlay
|
|
114
|
+
return /*#__PURE__*/ jsxs(Column, {
|
|
115
|
+
flex: 1,
|
|
116
|
+
style: {
|
|
117
|
+
overflow: 'hidden',
|
|
118
|
+
textOverflow: 'ellipsis',
|
|
119
|
+
whiteSpace: 'nowrap'
|
|
120
|
+
},
|
|
121
|
+
gap: Padding.PadXs,
|
|
122
|
+
children: [
|
|
123
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
124
|
+
align: "center",
|
|
125
|
+
justify: "space-between",
|
|
126
|
+
children: [
|
|
127
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
128
|
+
gap: Spacing.SpacingXs,
|
|
129
|
+
align: "center",
|
|
130
|
+
style: {
|
|
131
|
+
overflow: 'hidden',
|
|
132
|
+
textOverflow: 'ellipsis',
|
|
133
|
+
whiteSpace: 'nowrap'
|
|
134
|
+
},
|
|
135
|
+
children: [
|
|
136
|
+
/*#__PURE__*/ jsx(StageTaskIcon, {
|
|
137
|
+
children: task.icon ?? /*#__PURE__*/ jsx(ProcessCanvasIcon, {})
|
|
138
|
+
}),
|
|
139
|
+
/*#__PURE__*/ jsx(CanvasTooltip, {
|
|
140
|
+
content: task.label,
|
|
141
|
+
placement: "top",
|
|
142
|
+
smartTooltip: true,
|
|
143
|
+
...isDragging && {
|
|
144
|
+
isOpen: false
|
|
145
|
+
},
|
|
146
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
147
|
+
className: "text-sm truncate",
|
|
148
|
+
children: task.label
|
|
184
149
|
})
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
taskExecution
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
}),
|
|
153
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
154
|
+
align: "center",
|
|
155
|
+
gap: Spacing.SpacingXs,
|
|
156
|
+
style: {
|
|
157
|
+
flexShrink: 0
|
|
158
|
+
},
|
|
159
|
+
children: [
|
|
160
|
+
hasExecutionStatus && (taskExecution.message ? /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
161
|
+
content: taskExecution.message,
|
|
162
|
+
placement: "top",
|
|
163
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
164
|
+
variant: "ghost",
|
|
165
|
+
size: "icon",
|
|
166
|
+
className: "h-6 w-6",
|
|
167
|
+
"aria-label": taskExecution.message,
|
|
168
|
+
children: /*#__PURE__*/ jsx(ExecutionStatusIcon, {
|
|
169
|
+
status: taskExecution.status
|
|
205
170
|
})
|
|
206
171
|
})
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
172
|
+
}) : !isReadOnly && /*#__PURE__*/ jsx(ExecutionStatusIcon, {
|
|
173
|
+
status: taskExecution.status
|
|
174
|
+
})),
|
|
175
|
+
showPlayButtonSmall && !hasSecondRowContent && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
176
|
+
taskId: task.id,
|
|
177
|
+
onTaskPlay: onTaskPlay,
|
|
178
|
+
small: true
|
|
179
|
+
}),
|
|
180
|
+
onTaskPlay && !hasExecutionStatus && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
181
|
+
taskId: task.id,
|
|
182
|
+
onTaskPlay: onTaskPlay
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
}),
|
|
188
|
+
taskExecution && hasSecondRowContent && /*#__PURE__*/ jsxs(Row, {
|
|
189
|
+
align: "center",
|
|
190
|
+
justify: "space-between",
|
|
191
|
+
children: [
|
|
192
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
193
|
+
gap: '2px',
|
|
194
|
+
children: [
|
|
195
|
+
taskExecution?.duration && /*#__PURE__*/ jsx("span", {
|
|
196
|
+
className: "text-xs text-foreground-muted",
|
|
197
|
+
children: taskExecution.duration
|
|
198
|
+
}),
|
|
199
|
+
taskExecution?.retryDuration && /*#__PURE__*/ jsx(StageTaskRetryDuration, {
|
|
200
|
+
status: taskExecution.badgeStatus ?? 'warning',
|
|
201
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
202
|
+
className: "text-xs",
|
|
203
|
+
children: `(+${taskExecution.retryDuration})`
|
|
221
204
|
})
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
205
|
+
})
|
|
206
|
+
]
|
|
207
|
+
}),
|
|
208
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
209
|
+
align: "center",
|
|
210
|
+
gap: Spacing.SpacingXs,
|
|
211
|
+
children: [
|
|
212
|
+
taskExecution?.badge && /*#__PURE__*/ jsx(Badge, {
|
|
213
|
+
variant: taskExecution.badgeStatus,
|
|
214
|
+
children: generateBadgeText(taskExecution) ?? ''
|
|
215
|
+
}),
|
|
216
|
+
showPlayButtonSmall && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
217
|
+
taskId: task.id,
|
|
218
|
+
onTaskPlay: onTaskPlay,
|
|
219
|
+
small: true
|
|
220
|
+
})
|
|
221
|
+
]
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
})
|
|
225
|
+
]
|
|
228
226
|
});
|
|
229
227
|
});
|
|
230
228
|
export { TaskContent };
|