@uipath/apollo-react 3.65.4 → 3.66.1
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/StageNode/DraggableTask.cjs +2 -57
- 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 +4 -49
- package/dist/canvas/components/StageNode/StageNode.cjs +183 -84
- package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.js +176 -87
- package/dist/canvas/components/StageNode/StageNode.stories.cjs +2 -1
- package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.stories.js +2 -1
- package/dist/canvas/components/StageNode/StageNode.styles.cjs +19 -2
- package/dist/canvas/components/StageNode/StageNode.styles.d.ts +8 -0
- package/dist/canvas/components/StageNode/StageNode.styles.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.styles.js +14 -3
- package/dist/canvas/components/StageNode/StageNode.types.d.ts +1 -0
- package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.n = (module)=>{
|
|
5
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
-
__webpack_require__.d(getter, {
|
|
7
|
-
a: getter
|
|
8
|
-
});
|
|
9
|
-
return getter;
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
3
|
(()=>{
|
|
13
4
|
__webpack_require__.d = (exports1, definition)=>{
|
|
14
5
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -42,8 +33,6 @@ const utilities_namespaceObject = require("@dnd-kit/utilities");
|
|
|
42
33
|
const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
43
34
|
const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
44
35
|
const external_material_index_cjs_namespaceObject = require("../../../material/index.cjs");
|
|
45
|
-
const external_debounce_namespaceObject = require("debounce");
|
|
46
|
-
var external_debounce_default = /*#__PURE__*/ __webpack_require__.n(external_debounce_namespaceObject);
|
|
47
36
|
const external_react_namespaceObject = require("react");
|
|
48
37
|
const external_icons_index_cjs_namespaceObject = require("../../icons/index.cjs");
|
|
49
38
|
const external_ExecutionStatusIcon_index_cjs_namespaceObject = require("../ExecutionStatusIcon/index.cjs");
|
|
@@ -182,11 +171,10 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
182
171
|
]
|
|
183
172
|
})
|
|
184
173
|
}));
|
|
185
|
-
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen,
|
|
174
|
+
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, isDragDisabled, projectedDepth, zoom = 1 })=>{
|
|
186
175
|
const [isMenuOpen, setIsMenuOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
187
176
|
const taskRef = (0, external_react_namespaceObject.useRef)(null);
|
|
188
177
|
const menuRef = (0, external_react_namespaceObject.useRef)(null);
|
|
189
|
-
const [playLoading, setPlayLoading] = (0, external_react_namespaceObject.useState)(false);
|
|
190
178
|
const handleClick = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
191
179
|
if (isMenuOpen) return;
|
|
192
180
|
onTaskClick(e, task.id);
|
|
@@ -198,26 +186,6 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
198
186
|
const handleMenuOpenChange = (0, external_react_namespaceObject.useCallback)((isOpen)=>{
|
|
199
187
|
setIsMenuOpen(isOpen);
|
|
200
188
|
}, []);
|
|
201
|
-
const debouncedTaskPlay = (0, external_react_namespaceObject.useMemo)(()=>onTaskPlay ? external_debounce_default()(async (taskId)=>{
|
|
202
|
-
setPlayLoading(true);
|
|
203
|
-
try {
|
|
204
|
-
await onTaskPlay(taskId);
|
|
205
|
-
} catch {} finally{
|
|
206
|
-
setPlayLoading(false);
|
|
207
|
-
}
|
|
208
|
-
}, 500, {
|
|
209
|
-
immediate: true
|
|
210
|
-
}) : void 0, [
|
|
211
|
-
onTaskPlay
|
|
212
|
-
]);
|
|
213
|
-
const handlePlayClick = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
214
|
-
e.stopPropagation();
|
|
215
|
-
e.preventDefault();
|
|
216
|
-
debouncedTaskPlay?.(task.id);
|
|
217
|
-
}, [
|
|
218
|
-
debouncedTaskPlay,
|
|
219
|
-
task.id
|
|
220
|
-
]);
|
|
221
189
|
const handleContextMenu = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
222
190
|
menuRef.current?.handleContextMenu(e);
|
|
223
191
|
}, []);
|
|
@@ -274,30 +242,7 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
274
242
|
task: task,
|
|
275
243
|
taskExecution: taskExecution
|
|
276
244
|
}),
|
|
277
|
-
task.
|
|
278
|
-
content: "Trigger task",
|
|
279
|
-
placement: "top",
|
|
280
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApIconButton, {
|
|
281
|
-
"data-testid": `stage-task-play-${task.id}`,
|
|
282
|
-
onClick: handlePlayClick,
|
|
283
|
-
onMouseDown: (e)=>e.stopPropagation(),
|
|
284
|
-
className: "task-menu-icon-button",
|
|
285
|
-
sx: {
|
|
286
|
-
color: 'var(--uix-canvas-primary) !important',
|
|
287
|
-
minWidth: 'unset !important',
|
|
288
|
-
width: `${apollo_core_namespaceObject.Spacing.SpacingXl} !important`,
|
|
289
|
-
height: `${apollo_core_namespaceObject.Spacing.SpacingXl} !important`,
|
|
290
|
-
padding: '0 !important'
|
|
291
|
-
},
|
|
292
|
-
children: playLoading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApCircularProgress, {
|
|
293
|
-
size: 20
|
|
294
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject.PlayIcon, {
|
|
295
|
-
w: 20,
|
|
296
|
-
h: 20
|
|
297
|
-
})
|
|
298
|
-
})
|
|
299
|
-
}),
|
|
300
|
-
task.isAdhoc && !onTaskPlay && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
245
|
+
task.hasEntryCondition && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
301
246
|
content: "Entry condition",
|
|
302
247
|
placement: "top",
|
|
303
248
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DraggableTaskProps, TaskContentProps } from './DraggableTask.types';
|
|
2
2
|
export declare const TaskContent: import("react").MemoExoticComponent<({ task, taskExecution, isDragging }: TaskContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
-
export declare const DraggableTask: import("react").MemoExoticComponent<({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen,
|
|
3
|
+
export declare const DraggableTask: import("react").MemoExoticComponent<({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, isDragDisabled, projectedDepth, zoom, }: DraggableTaskProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
4
|
//# sourceMappingURL=DraggableTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableTask.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DraggableTask.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAgClF,eAAO,MAAM,WAAW,4EAA8C,gBAAgB,6CAwEpF,CAAC;AAkIH,eAAO,MAAM,aAAa,0KArHvB,kBAAkB,6CAqHoC,CAAC"}
|
|
@@ -3,10 +3,9 @@ import { useSortable } from "@dnd-kit/sortable";
|
|
|
3
3
|
import { CSS } from "@dnd-kit/utilities";
|
|
4
4
|
import { FontVariantToken, Padding, Spacing } from "@uipath/apollo-core";
|
|
5
5
|
import { Column, Row } from "../../layouts/index.js";
|
|
6
|
-
import { ApBadge,
|
|
7
|
-
import debounce from "debounce";
|
|
6
|
+
import { ApBadge, ApIconButton, ApTooltip, ApTypography, BadgeSize } from "../../../material/index.js";
|
|
8
7
|
import { memo, useCallback, useMemo, useRef, useState } from "react";
|
|
9
|
-
import { EntryConditionIcon
|
|
8
|
+
import { EntryConditionIcon } from "../../icons/index.js";
|
|
10
9
|
import { ExecutionStatusIcon } from "../ExecutionStatusIcon/index.js";
|
|
11
10
|
import { INDENTATION_WIDTH, StageTask, StageTaskDragPlaceholder, StageTaskDragPlaceholderWrapper, StageTaskIcon, StageTaskRetryDuration, StageTaskWrapper } from "./StageNode.styles.js";
|
|
12
11
|
import { TaskMenu } from "./TaskMenu.js";
|
|
@@ -143,11 +142,10 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging })=>/*
|
|
|
143
142
|
]
|
|
144
143
|
})
|
|
145
144
|
}));
|
|
146
|
-
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen,
|
|
145
|
+
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, isDragDisabled, projectedDepth, zoom = 1 })=>{
|
|
147
146
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
148
147
|
const taskRef = useRef(null);
|
|
149
148
|
const menuRef = useRef(null);
|
|
150
|
-
const [playLoading, setPlayLoading] = useState(false);
|
|
151
149
|
const handleClick = useCallback((e)=>{
|
|
152
150
|
if (isMenuOpen) return;
|
|
153
151
|
onTaskClick(e, task.id);
|
|
@@ -159,26 +157,6 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
159
157
|
const handleMenuOpenChange = useCallback((isOpen)=>{
|
|
160
158
|
setIsMenuOpen(isOpen);
|
|
161
159
|
}, []);
|
|
162
|
-
const debouncedTaskPlay = useMemo(()=>onTaskPlay ? debounce(async (taskId)=>{
|
|
163
|
-
setPlayLoading(true);
|
|
164
|
-
try {
|
|
165
|
-
await onTaskPlay(taskId);
|
|
166
|
-
} catch {} finally{
|
|
167
|
-
setPlayLoading(false);
|
|
168
|
-
}
|
|
169
|
-
}, 500, {
|
|
170
|
-
immediate: true
|
|
171
|
-
}) : void 0, [
|
|
172
|
-
onTaskPlay
|
|
173
|
-
]);
|
|
174
|
-
const handlePlayClick = useCallback((e)=>{
|
|
175
|
-
e.stopPropagation();
|
|
176
|
-
e.preventDefault();
|
|
177
|
-
debouncedTaskPlay?.(task.id);
|
|
178
|
-
}, [
|
|
179
|
-
debouncedTaskPlay,
|
|
180
|
-
task.id
|
|
181
|
-
]);
|
|
182
160
|
const handleContextMenu = useCallback((e)=>{
|
|
183
161
|
menuRef.current?.handleContextMenu(e);
|
|
184
162
|
}, []);
|
|
@@ -235,30 +213,7 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
235
213
|
task: task,
|
|
236
214
|
taskExecution: taskExecution
|
|
237
215
|
}),
|
|
238
|
-
task.
|
|
239
|
-
content: "Trigger task",
|
|
240
|
-
placement: "top",
|
|
241
|
-
children: /*#__PURE__*/ jsx(ApIconButton, {
|
|
242
|
-
"data-testid": `stage-task-play-${task.id}`,
|
|
243
|
-
onClick: handlePlayClick,
|
|
244
|
-
onMouseDown: (e)=>e.stopPropagation(),
|
|
245
|
-
className: "task-menu-icon-button",
|
|
246
|
-
sx: {
|
|
247
|
-
color: 'var(--uix-canvas-primary) !important',
|
|
248
|
-
minWidth: 'unset !important',
|
|
249
|
-
width: `${Spacing.SpacingXl} !important`,
|
|
250
|
-
height: `${Spacing.SpacingXl} !important`,
|
|
251
|
-
padding: '0 !important'
|
|
252
|
-
},
|
|
253
|
-
children: playLoading ? /*#__PURE__*/ jsx(ApCircularProgress, {
|
|
254
|
-
size: 20
|
|
255
|
-
}) : /*#__PURE__*/ jsx(PlayIcon, {
|
|
256
|
-
w: 20,
|
|
257
|
-
h: 20
|
|
258
|
-
})
|
|
259
|
-
})
|
|
260
|
-
}),
|
|
261
|
-
task.isAdhoc && !onTaskPlay && /*#__PURE__*/ jsx(ApTooltip, {
|
|
216
|
+
task.hasEntryCondition && /*#__PURE__*/ jsx(ApTooltip, {
|
|
262
217
|
content: "Entry condition",
|
|
263
218
|
placement: "top",
|
|
264
219
|
children: /*#__PURE__*/ jsx("span", {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
3
12
|
(()=>{
|
|
4
13
|
__webpack_require__.d = (exports1, definition)=>{
|
|
5
14
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -33,8 +42,11 @@ const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
|
33
42
|
const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
34
43
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
35
44
|
const external_material_index_cjs_namespaceObject = require("../../../material/index.cjs");
|
|
45
|
+
const external_debounce_namespaceObject = require("debounce");
|
|
46
|
+
var external_debounce_default = /*#__PURE__*/ __webpack_require__.n(external_debounce_namespaceObject);
|
|
36
47
|
const external_react_namespaceObject = require("react");
|
|
37
48
|
const external_react_dom_namespaceObject = require("react-dom");
|
|
49
|
+
const external_icons_index_cjs_namespaceObject = require("../../icons/index.cjs");
|
|
38
50
|
const ConnectedHandlesContext_cjs_namespaceObject = require("../BaseCanvas/ConnectedHandlesContext.cjs");
|
|
39
51
|
const useButtonHandles_cjs_namespaceObject = require("../ButtonHandle/useButtonHandles.cjs");
|
|
40
52
|
const external_ExecutionStatusIcon_index_cjs_namespaceObject = require("../ExecutionStatusIcon/index.cjs");
|
|
@@ -42,7 +54,6 @@ const external_FloatingCanvasPanel_index_cjs_namespaceObject = require("../Float
|
|
|
42
54
|
const external_NodeContextMenu_index_cjs_namespaceObject = require("../NodeContextMenu/index.cjs");
|
|
43
55
|
const hooks_index_cjs_namespaceObject = require("../NodePropertiesPanel/hooks/index.cjs");
|
|
44
56
|
const external_Toolbox_index_cjs_namespaceObject = require("../Toolbox/index.cjs");
|
|
45
|
-
const external_icons_index_cjs_namespaceObject = require("../../icons/index.cjs");
|
|
46
57
|
const external_DraggableTask_cjs_namespaceObject = require("./DraggableTask.cjs");
|
|
47
58
|
const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.styles.cjs");
|
|
48
59
|
const external_StageNode_types_cjs_namespaceObject = require("./StageNode.types.cjs");
|
|
@@ -70,12 +81,65 @@ const CHIP_ICONS = {
|
|
|
70
81
|
size: apollo_core_namespaceObject.Icon.IconXs
|
|
71
82
|
})
|
|
72
83
|
};
|
|
84
|
+
const AdhocTaskPlayButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ taskId, onTaskPlay })=>{
|
|
85
|
+
const [playLoading, setPlayLoading] = (0, external_react_namespaceObject.useState)(false);
|
|
86
|
+
const debouncedTaskPlay = (0, external_react_namespaceObject.useMemo)(()=>external_debounce_default()(async (id)=>{
|
|
87
|
+
setPlayLoading(true);
|
|
88
|
+
try {
|
|
89
|
+
await onTaskPlay(id);
|
|
90
|
+
} catch {} finally{
|
|
91
|
+
setPlayLoading(false);
|
|
92
|
+
}
|
|
93
|
+
}, 500, {
|
|
94
|
+
immediate: true
|
|
95
|
+
}), [
|
|
96
|
+
onTaskPlay
|
|
97
|
+
]);
|
|
98
|
+
const handlePlayClick = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
debouncedTaskPlay(taskId);
|
|
102
|
+
}, [
|
|
103
|
+
debouncedTaskPlay,
|
|
104
|
+
taskId
|
|
105
|
+
]);
|
|
106
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
107
|
+
content: "Trigger task",
|
|
108
|
+
placement: "top",
|
|
109
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApIconButton, {
|
|
110
|
+
"data-testid": `stage-task-play-${taskId}`,
|
|
111
|
+
onClick: handlePlayClick,
|
|
112
|
+
onMouseDown: (e)=>e.stopPropagation(),
|
|
113
|
+
onKeyDown: (e)=>e.stopPropagation(),
|
|
114
|
+
className: "task-menu-icon-button",
|
|
115
|
+
sx: {
|
|
116
|
+
color: 'var(--uix-canvas-primary) !important',
|
|
117
|
+
minWidth: 'unset !important',
|
|
118
|
+
width: `${apollo_core_namespaceObject.Spacing.SpacingL} !important`,
|
|
119
|
+
height: `${apollo_core_namespaceObject.Spacing.SpacingL} !important`,
|
|
120
|
+
padding: '0 !important'
|
|
121
|
+
},
|
|
122
|
+
children: playLoading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApCircularProgress, {
|
|
123
|
+
size: 20
|
|
124
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject.PlayIcon, {
|
|
125
|
+
w: 20,
|
|
126
|
+
h: 20
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
});
|
|
73
131
|
const StageNodeComponent = (props)=>{
|
|
74
132
|
const { dragging, selected, id, width, execution, stageDetails, addTaskLabel = 'Add task', addTaskLoading = false, replaceTaskLabel = 'Replace task', taskOptions = [], menuItems, pendingReplaceTask, onStageClick, onTaskAdd, onAddTaskFromToolbox, onTaskToolboxSearch, onTaskClick, onTaskGroupModification, onStageTitleChange, onTaskReorder, onReplaceTaskFromToolbox, onTaskPlay, hideParallelOptions } = props;
|
|
75
133
|
const taskWidth = width ? width - external_StageNode_styles_cjs_namespaceObject.STAGE_CONTENT_INSET : void 0;
|
|
76
|
-
const
|
|
134
|
+
const allTasks = (0, external_react_namespaceObject.useMemo)(()=>stageDetails?.tasks || [], [
|
|
77
135
|
stageDetails?.tasks
|
|
78
136
|
]);
|
|
137
|
+
const tasks = (0, external_react_namespaceObject.useMemo)(()=>allTasks.filter((group)=>group.some((t)=>!t.isAdhoc)), [
|
|
138
|
+
allTasks
|
|
139
|
+
]);
|
|
140
|
+
const adhocTasks = (0, external_react_namespaceObject.useMemo)(()=>allTasks.flat().filter((t)=>t.isAdhoc), [
|
|
141
|
+
allTasks
|
|
142
|
+
]);
|
|
79
143
|
const flatTasks = (0, external_react_namespaceObject.useMemo)(()=>tasks.flat(), [
|
|
80
144
|
tasks
|
|
81
145
|
]);
|
|
@@ -114,14 +178,14 @@ const StageNodeComponent = (props)=>{
|
|
|
114
178
|
const [isReplacingTask, setIsReplacingTask] = (0, external_react_namespaceObject.useState)(false);
|
|
115
179
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
116
180
|
if (pendingReplaceTask) {
|
|
117
|
-
const match =
|
|
181
|
+
const match = allTasks.flatMap((group, gi)=>group.map((task, ti)=>({
|
|
118
182
|
task,
|
|
119
183
|
groupIndex: gi,
|
|
120
184
|
taskIndex: ti
|
|
121
185
|
}))).find(({ task })=>task.id === selectedTaskId);
|
|
122
186
|
if (match) {
|
|
123
187
|
taskStateReference.current = {
|
|
124
|
-
isParallel: (
|
|
188
|
+
isParallel: (allTasks[match.groupIndex]?.length ?? 0) > 1,
|
|
125
189
|
groupIndex: match.groupIndex,
|
|
126
190
|
taskIndex: match.taskIndex
|
|
127
191
|
};
|
|
@@ -131,7 +195,7 @@ const StageNodeComponent = (props)=>{
|
|
|
131
195
|
}, [
|
|
132
196
|
pendingReplaceTask,
|
|
133
197
|
selectedTaskId,
|
|
134
|
-
|
|
198
|
+
allTasks
|
|
135
199
|
]);
|
|
136
200
|
const [activeDragId, setActiveDragId] = (0, external_react_namespaceObject.useState)(null);
|
|
137
201
|
const [offsetLeft, setOffsetLeft] = (0, external_react_namespaceObject.useState)(0);
|
|
@@ -552,85 +616,7 @@ const StageNodeComponent = (props)=>{
|
|
|
552
616
|
]
|
|
553
617
|
}),
|
|
554
618
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageContent, {
|
|
555
|
-
children: tasks && 0
|
|
556
|
-
collisionDetection: core_namespaceObject.closestCenter,
|
|
557
|
-
sensors: sensors,
|
|
558
|
-
onDragStart: handleDragStart,
|
|
559
|
-
onDragMove: handleDragMove,
|
|
560
|
-
onDragOver: handleDragOver,
|
|
561
|
-
onDragEnd: handleDragEnd,
|
|
562
|
-
onDragCancel: handleDragCancel,
|
|
563
|
-
children: [
|
|
564
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(sortable_namespaceObject.SortableContext, {
|
|
565
|
-
items: taskIds,
|
|
566
|
-
strategy: sortable_namespaceObject.verticalListSortingStrategy,
|
|
567
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskList, {
|
|
568
|
-
className: "nodrag nopan",
|
|
569
|
-
children: tasks.map((taskGroup, groupIndex)=>{
|
|
570
|
-
const isParallel = taskGroup.length > 1;
|
|
571
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
572
|
-
gap: apollo_core_namespaceObject.Spacing.SpacingS,
|
|
573
|
-
children: [
|
|
574
|
-
isParallel && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageParallelBracket, {}),
|
|
575
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_StageNode_styles_cjs_namespaceObject.StageTaskGroup, {
|
|
576
|
-
isParallel: isParallel,
|
|
577
|
-
children: [
|
|
578
|
-
isParallel && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageParallelLabel, {
|
|
579
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
|
|
580
|
-
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeS,
|
|
581
|
-
children: "Parallel"
|
|
582
|
-
})
|
|
583
|
-
}),
|
|
584
|
-
taskGroup.map((task, taskIndex)=>{
|
|
585
|
-
const taskExecution = execution?.taskStatus?.[task.id];
|
|
586
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DraggableTask_cjs_namespaceObject.DraggableTask, {
|
|
587
|
-
task: task,
|
|
588
|
-
taskExecution: taskExecution,
|
|
589
|
-
isSelected: selectedTaskId === task.id,
|
|
590
|
-
isParallel: isParallel,
|
|
591
|
-
contextMenuItems: contextMenuItems(isParallel, groupIndex, taskIndex, tasks.length, taskGroup.length, (tasks[groupIndex - 1]?.length ?? 0) > 1, (tasks[groupIndex + 1]?.length ?? 0) > 1),
|
|
592
|
-
onTaskClick: handleTaskClick,
|
|
593
|
-
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
594
|
-
onTaskPlay: onTaskPlay,
|
|
595
|
-
isDragDisabled: !onTaskReorder,
|
|
596
|
-
zoom: zoom,
|
|
597
|
-
...(onTaskGroupModification || onReplaceTaskFromToolbox) && {
|
|
598
|
-
onMenuOpen: ()=>{
|
|
599
|
-
taskStateReference.current = {
|
|
600
|
-
isParallel,
|
|
601
|
-
groupIndex,
|
|
602
|
-
taskIndex
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
}, task.id);
|
|
607
|
-
})
|
|
608
|
-
]
|
|
609
|
-
})
|
|
610
|
-
]
|
|
611
|
-
}, `group-${groupIndex}`);
|
|
612
|
-
})
|
|
613
|
-
})
|
|
614
|
-
}),
|
|
615
|
-
/*#__PURE__*/ (0, external_react_dom_namespaceObject.createPortal)(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(core_namespaceObject.DragOverlay, {
|
|
616
|
-
children: activeTask ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
617
|
-
style: dragOverlayStyle,
|
|
618
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTask, {
|
|
619
|
-
selected: true,
|
|
620
|
-
isParallel: isActiveTaskParallel,
|
|
621
|
-
style: {
|
|
622
|
-
cursor: 'grabbing',
|
|
623
|
-
...taskWidthStyle
|
|
624
|
-
},
|
|
625
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DraggableTask_cjs_namespaceObject.TaskContent, {
|
|
626
|
-
task: activeTask,
|
|
627
|
-
isDragging: true
|
|
628
|
-
})
|
|
629
|
-
})
|
|
630
|
-
}) : null
|
|
631
|
-
}), document.body)
|
|
632
|
-
]
|
|
633
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Column, {
|
|
619
|
+
children: 0 === tasks.length && 0 === adhocTasks.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Column, {
|
|
634
620
|
py: 2,
|
|
635
621
|
children: (onTaskAdd || onAddTaskFromToolbox) && !isReadOnly ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApLink, {
|
|
636
622
|
onClick: addTaskLoading ? void 0 : handleTaskAddClick,
|
|
@@ -645,6 +631,119 @@ const StageNodeComponent = (props)=>{
|
|
|
645
631
|
color: "var(--uix-canvas-foreground-de-emp)",
|
|
646
632
|
children: defaultContent
|
|
647
633
|
})
|
|
634
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
635
|
+
children: [
|
|
636
|
+
tasks.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(core_namespaceObject.DndContext, {
|
|
637
|
+
collisionDetection: core_namespaceObject.closestCenter,
|
|
638
|
+
sensors: sensors,
|
|
639
|
+
onDragStart: handleDragStart,
|
|
640
|
+
onDragMove: handleDragMove,
|
|
641
|
+
onDragOver: handleDragOver,
|
|
642
|
+
onDragEnd: handleDragEnd,
|
|
643
|
+
onDragCancel: handleDragCancel,
|
|
644
|
+
children: [
|
|
645
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(sortable_namespaceObject.SortableContext, {
|
|
646
|
+
items: taskIds,
|
|
647
|
+
strategy: sortable_namespaceObject.verticalListSortingStrategy,
|
|
648
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskList, {
|
|
649
|
+
className: "nodrag nopan",
|
|
650
|
+
children: tasks.map((taskGroup, groupIndex)=>{
|
|
651
|
+
const isParallel = taskGroup.length > 1;
|
|
652
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
653
|
+
gap: apollo_core_namespaceObject.Spacing.SpacingS,
|
|
654
|
+
children: [
|
|
655
|
+
isParallel && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageParallelBracket, {}),
|
|
656
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_StageNode_styles_cjs_namespaceObject.StageTaskGroup, {
|
|
657
|
+
isParallel: isParallel,
|
|
658
|
+
children: [
|
|
659
|
+
isParallel && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageParallelLabel, {
|
|
660
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
|
|
661
|
+
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeS,
|
|
662
|
+
children: "Parallel"
|
|
663
|
+
})
|
|
664
|
+
}),
|
|
665
|
+
taskGroup.map((task, taskIndex)=>{
|
|
666
|
+
const taskExecution = execution?.taskStatus?.[task.id];
|
|
667
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DraggableTask_cjs_namespaceObject.DraggableTask, {
|
|
668
|
+
task: task,
|
|
669
|
+
taskExecution: taskExecution,
|
|
670
|
+
isSelected: selectedTaskId === task.id,
|
|
671
|
+
isParallel: isParallel,
|
|
672
|
+
contextMenuItems: contextMenuItems(isParallel, groupIndex, taskIndex, tasks.length, taskGroup.length, (tasks[groupIndex - 1]?.length ?? 0) > 1, (tasks[groupIndex + 1]?.length ?? 0) > 1),
|
|
673
|
+
onTaskClick: handleTaskClick,
|
|
674
|
+
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
675
|
+
isDragDisabled: !onTaskReorder,
|
|
676
|
+
zoom: zoom,
|
|
677
|
+
...(onTaskGroupModification || onReplaceTaskFromToolbox) && {
|
|
678
|
+
onMenuOpen: ()=>{
|
|
679
|
+
taskStateReference.current = {
|
|
680
|
+
isParallel,
|
|
681
|
+
groupIndex,
|
|
682
|
+
taskIndex
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}, task.id);
|
|
687
|
+
})
|
|
688
|
+
]
|
|
689
|
+
})
|
|
690
|
+
]
|
|
691
|
+
}, `group-${groupIndex}`);
|
|
692
|
+
})
|
|
693
|
+
})
|
|
694
|
+
}),
|
|
695
|
+
/*#__PURE__*/ (0, external_react_dom_namespaceObject.createPortal)(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(core_namespaceObject.DragOverlay, {
|
|
696
|
+
children: activeTask ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
697
|
+
style: dragOverlayStyle,
|
|
698
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTask, {
|
|
699
|
+
selected: true,
|
|
700
|
+
isParallel: isActiveTaskParallel,
|
|
701
|
+
style: {
|
|
702
|
+
cursor: 'grabbing',
|
|
703
|
+
...taskWidthStyle
|
|
704
|
+
},
|
|
705
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DraggableTask_cjs_namespaceObject.TaskContent, {
|
|
706
|
+
task: activeTask,
|
|
707
|
+
isDragging: true
|
|
708
|
+
})
|
|
709
|
+
})
|
|
710
|
+
}) : null
|
|
711
|
+
}), document.body)
|
|
712
|
+
]
|
|
713
|
+
}),
|
|
714
|
+
adhocTasks.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_StageNode_styles_cjs_namespaceObject.StageAdhocSection, {
|
|
715
|
+
children: [
|
|
716
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageAdhocHeaderSection, {
|
|
717
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
|
|
718
|
+
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeSBold,
|
|
719
|
+
color: "var(--uix-canvas-foreground-de-emp)",
|
|
720
|
+
children: "Adhoc tasks"
|
|
721
|
+
})
|
|
722
|
+
}),
|
|
723
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskList, {
|
|
724
|
+
children: adhocTasks.map((task)=>{
|
|
725
|
+
const taskExecution = execution?.taskStatus?.[task.id];
|
|
726
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_StageNode_styles_cjs_namespaceObject.StageTask, {
|
|
727
|
+
"data-testid": `stage-task-${task.id}`,
|
|
728
|
+
selected: selectedTaskId === task.id,
|
|
729
|
+
status: taskExecution?.status,
|
|
730
|
+
onClick: (e)=>handleTaskClick(e, task.id),
|
|
731
|
+
children: [
|
|
732
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DraggableTask_cjs_namespaceObject.TaskContent, {
|
|
733
|
+
task: task,
|
|
734
|
+
taskExecution: taskExecution
|
|
735
|
+
}),
|
|
736
|
+
onTaskPlay && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AdhocTaskPlayButton, {
|
|
737
|
+
taskId: task.id,
|
|
738
|
+
onTaskPlay: onTaskPlay
|
|
739
|
+
})
|
|
740
|
+
]
|
|
741
|
+
}, task.id);
|
|
742
|
+
})
|
|
743
|
+
})
|
|
744
|
+
]
|
|
745
|
+
})
|
|
746
|
+
]
|
|
648
747
|
})
|
|
649
748
|
})
|
|
650
749
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA8yBxD,eAAO,MAAM,SAAS,8CApuBa,cAAc,6CAouBA,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DndContext, DragOverlay, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
3
3
|
import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
4
4
|
import { FontVariantToken, Icon, Padding, Spacing } from "@uipath/apollo-core";
|
|
5
5
|
import { Column, Row } from "../../layouts/index.js";
|
|
6
6
|
import { Position, useStore, useViewport } from "../../xyflow/react.js";
|
|
7
|
-
import { ApIcon, ApIconButton, ApLink, ApTooltip, ApTypography } from "../../../material/index.js";
|
|
7
|
+
import { ApCircularProgress, ApIcon, ApIconButton, ApLink, ApTooltip, ApTypography } from "../../../material/index.js";
|
|
8
|
+
import debounce from "debounce";
|
|
8
9
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
9
10
|
import { createPortal } from "react-dom";
|
|
11
|
+
import { EntryConditionIcon, ExitConditionIcon, PlayIcon, ReturnToOriginIcon } from "../../icons/index.js";
|
|
10
12
|
import { useConnectedHandles } from "../BaseCanvas/ConnectedHandlesContext.js";
|
|
11
13
|
import { useButtonHandles } from "../ButtonHandle/useButtonHandles.js";
|
|
12
14
|
import { ExecutionStatusIcon } from "../ExecutionStatusIcon/index.js";
|
|
@@ -14,9 +16,8 @@ import { FloatingCanvasPanel } from "../FloatingCanvasPanel/index.js";
|
|
|
14
16
|
import { NodeContextMenu } from "../NodeContextMenu/index.js";
|
|
15
17
|
import { useNodeSelection } from "../NodePropertiesPanel/hooks/index.js";
|
|
16
18
|
import { Toolbox } from "../Toolbox/index.js";
|
|
17
|
-
import { EntryConditionIcon, ExitConditionIcon, ReturnToOriginIcon } from "../../icons/index.js";
|
|
18
19
|
import { DraggableTask, TaskContent } from "./DraggableTask.js";
|
|
19
|
-
import { INDENTATION_WIDTH, STAGE_CONTENT_INSET, StageChip, StageContainer, StageContent, StageHeader, StageHeaderChipsRow, StageParallelBracket, StageParallelLabel, StageTask, StageTaskGroup, StageTaskList, StageTitleContainer, StageTitleInput } from "./StageNode.styles.js";
|
|
20
|
+
import { INDENTATION_WIDTH, STAGE_CONTENT_INSET, StageAdhocHeaderSection, StageAdhocSection, StageChip, StageContainer, StageContent, StageHeader, StageHeaderChipsRow, StageParallelBracket, StageParallelLabel, StageTask, StageTaskGroup, StageTaskList, StageTitleContainer, StageTitleInput } from "./StageNode.styles.js";
|
|
20
21
|
import { StageHeaderChipType } from "./StageNode.types.js";
|
|
21
22
|
import { flattenTasks, getProjection, reorderTasks } from "./StageNode.utils.js";
|
|
22
23
|
import { getContextMenuItems, getDivider, getMenuItem } from "./StageNodeTaskUtilities.js";
|
|
@@ -42,12 +43,65 @@ const CHIP_ICONS = {
|
|
|
42
43
|
size: Icon.IconXs
|
|
43
44
|
})
|
|
44
45
|
};
|
|
46
|
+
const AdhocTaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay })=>{
|
|
47
|
+
const [playLoading, setPlayLoading] = useState(false);
|
|
48
|
+
const debouncedTaskPlay = useMemo(()=>debounce(async (id)=>{
|
|
49
|
+
setPlayLoading(true);
|
|
50
|
+
try {
|
|
51
|
+
await onTaskPlay(id);
|
|
52
|
+
} catch {} finally{
|
|
53
|
+
setPlayLoading(false);
|
|
54
|
+
}
|
|
55
|
+
}, 500, {
|
|
56
|
+
immediate: true
|
|
57
|
+
}), [
|
|
58
|
+
onTaskPlay
|
|
59
|
+
]);
|
|
60
|
+
const handlePlayClick = useCallback((e)=>{
|
|
61
|
+
e.stopPropagation();
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
debouncedTaskPlay(taskId);
|
|
64
|
+
}, [
|
|
65
|
+
debouncedTaskPlay,
|
|
66
|
+
taskId
|
|
67
|
+
]);
|
|
68
|
+
return /*#__PURE__*/ jsx(ApTooltip, {
|
|
69
|
+
content: "Trigger task",
|
|
70
|
+
placement: "top",
|
|
71
|
+
children: /*#__PURE__*/ jsx(ApIconButton, {
|
|
72
|
+
"data-testid": `stage-task-play-${taskId}`,
|
|
73
|
+
onClick: handlePlayClick,
|
|
74
|
+
onMouseDown: (e)=>e.stopPropagation(),
|
|
75
|
+
onKeyDown: (e)=>e.stopPropagation(),
|
|
76
|
+
className: "task-menu-icon-button",
|
|
77
|
+
sx: {
|
|
78
|
+
color: 'var(--uix-canvas-primary) !important',
|
|
79
|
+
minWidth: 'unset !important',
|
|
80
|
+
width: `${Spacing.SpacingL} !important`,
|
|
81
|
+
height: `${Spacing.SpacingL} !important`,
|
|
82
|
+
padding: '0 !important'
|
|
83
|
+
},
|
|
84
|
+
children: playLoading ? /*#__PURE__*/ jsx(ApCircularProgress, {
|
|
85
|
+
size: 20
|
|
86
|
+
}) : /*#__PURE__*/ jsx(PlayIcon, {
|
|
87
|
+
w: 20,
|
|
88
|
+
h: 20
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
});
|
|
45
93
|
const StageNodeComponent = (props)=>{
|
|
46
94
|
const { dragging, selected, id, width, execution, stageDetails, addTaskLabel = 'Add task', addTaskLoading = false, replaceTaskLabel = 'Replace task', taskOptions = [], menuItems, pendingReplaceTask, onStageClick, onTaskAdd, onAddTaskFromToolbox, onTaskToolboxSearch, onTaskClick, onTaskGroupModification, onStageTitleChange, onTaskReorder, onReplaceTaskFromToolbox, onTaskPlay, hideParallelOptions } = props;
|
|
47
95
|
const taskWidth = width ? width - STAGE_CONTENT_INSET : void 0;
|
|
48
|
-
const
|
|
96
|
+
const allTasks = useMemo(()=>stageDetails?.tasks || [], [
|
|
49
97
|
stageDetails?.tasks
|
|
50
98
|
]);
|
|
99
|
+
const tasks = useMemo(()=>allTasks.filter((group)=>group.some((t)=>!t.isAdhoc)), [
|
|
100
|
+
allTasks
|
|
101
|
+
]);
|
|
102
|
+
const adhocTasks = useMemo(()=>allTasks.flat().filter((t)=>t.isAdhoc), [
|
|
103
|
+
allTasks
|
|
104
|
+
]);
|
|
51
105
|
const flatTasks = useMemo(()=>tasks.flat(), [
|
|
52
106
|
tasks
|
|
53
107
|
]);
|
|
@@ -86,14 +140,14 @@ const StageNodeComponent = (props)=>{
|
|
|
86
140
|
const [isReplacingTask, setIsReplacingTask] = useState(false);
|
|
87
141
|
useEffect(()=>{
|
|
88
142
|
if (pendingReplaceTask) {
|
|
89
|
-
const match =
|
|
143
|
+
const match = allTasks.flatMap((group, gi)=>group.map((task, ti)=>({
|
|
90
144
|
task,
|
|
91
145
|
groupIndex: gi,
|
|
92
146
|
taskIndex: ti
|
|
93
147
|
}))).find(({ task })=>task.id === selectedTaskId);
|
|
94
148
|
if (match) {
|
|
95
149
|
taskStateReference.current = {
|
|
96
|
-
isParallel: (
|
|
150
|
+
isParallel: (allTasks[match.groupIndex]?.length ?? 0) > 1,
|
|
97
151
|
groupIndex: match.groupIndex,
|
|
98
152
|
taskIndex: match.taskIndex
|
|
99
153
|
};
|
|
@@ -103,7 +157,7 @@ const StageNodeComponent = (props)=>{
|
|
|
103
157
|
}, [
|
|
104
158
|
pendingReplaceTask,
|
|
105
159
|
selectedTaskId,
|
|
106
|
-
|
|
160
|
+
allTasks
|
|
107
161
|
]);
|
|
108
162
|
const [activeDragId, setActiveDragId] = useState(null);
|
|
109
163
|
const [offsetLeft, setOffsetLeft] = useState(0);
|
|
@@ -524,85 +578,7 @@ const StageNodeComponent = (props)=>{
|
|
|
524
578
|
]
|
|
525
579
|
}),
|
|
526
580
|
/*#__PURE__*/ jsx(StageContent, {
|
|
527
|
-
children: tasks && 0
|
|
528
|
-
collisionDetection: closestCenter,
|
|
529
|
-
sensors: sensors,
|
|
530
|
-
onDragStart: handleDragStart,
|
|
531
|
-
onDragMove: handleDragMove,
|
|
532
|
-
onDragOver: handleDragOver,
|
|
533
|
-
onDragEnd: handleDragEnd,
|
|
534
|
-
onDragCancel: handleDragCancel,
|
|
535
|
-
children: [
|
|
536
|
-
/*#__PURE__*/ jsx(SortableContext, {
|
|
537
|
-
items: taskIds,
|
|
538
|
-
strategy: verticalListSortingStrategy,
|
|
539
|
-
children: /*#__PURE__*/ jsx(StageTaskList, {
|
|
540
|
-
className: "nodrag nopan",
|
|
541
|
-
children: tasks.map((taskGroup, groupIndex)=>{
|
|
542
|
-
const isParallel = taskGroup.length > 1;
|
|
543
|
-
return /*#__PURE__*/ jsxs(Row, {
|
|
544
|
-
gap: Spacing.SpacingS,
|
|
545
|
-
children: [
|
|
546
|
-
isParallel && /*#__PURE__*/ jsx(StageParallelBracket, {}),
|
|
547
|
-
/*#__PURE__*/ jsxs(StageTaskGroup, {
|
|
548
|
-
isParallel: isParallel,
|
|
549
|
-
children: [
|
|
550
|
-
isParallel && /*#__PURE__*/ jsx(StageParallelLabel, {
|
|
551
|
-
children: /*#__PURE__*/ jsx(ApTypography, {
|
|
552
|
-
variant: FontVariantToken.fontSizeS,
|
|
553
|
-
children: "Parallel"
|
|
554
|
-
})
|
|
555
|
-
}),
|
|
556
|
-
taskGroup.map((task, taskIndex)=>{
|
|
557
|
-
const taskExecution = execution?.taskStatus?.[task.id];
|
|
558
|
-
return /*#__PURE__*/ jsx(DraggableTask, {
|
|
559
|
-
task: task,
|
|
560
|
-
taskExecution: taskExecution,
|
|
561
|
-
isSelected: selectedTaskId === task.id,
|
|
562
|
-
isParallel: isParallel,
|
|
563
|
-
contextMenuItems: contextMenuItems(isParallel, groupIndex, taskIndex, tasks.length, taskGroup.length, (tasks[groupIndex - 1]?.length ?? 0) > 1, (tasks[groupIndex + 1]?.length ?? 0) > 1),
|
|
564
|
-
onTaskClick: handleTaskClick,
|
|
565
|
-
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
566
|
-
onTaskPlay: onTaskPlay,
|
|
567
|
-
isDragDisabled: !onTaskReorder,
|
|
568
|
-
zoom: zoom,
|
|
569
|
-
...(onTaskGroupModification || onReplaceTaskFromToolbox) && {
|
|
570
|
-
onMenuOpen: ()=>{
|
|
571
|
-
taskStateReference.current = {
|
|
572
|
-
isParallel,
|
|
573
|
-
groupIndex,
|
|
574
|
-
taskIndex
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
}, task.id);
|
|
579
|
-
})
|
|
580
|
-
]
|
|
581
|
-
})
|
|
582
|
-
]
|
|
583
|
-
}, `group-${groupIndex}`);
|
|
584
|
-
})
|
|
585
|
-
})
|
|
586
|
-
}),
|
|
587
|
-
/*#__PURE__*/ createPortal(/*#__PURE__*/ jsx(DragOverlay, {
|
|
588
|
-
children: activeTask ? /*#__PURE__*/ jsx("div", {
|
|
589
|
-
style: dragOverlayStyle,
|
|
590
|
-
children: /*#__PURE__*/ jsx(StageTask, {
|
|
591
|
-
selected: true,
|
|
592
|
-
isParallel: isActiveTaskParallel,
|
|
593
|
-
style: {
|
|
594
|
-
cursor: 'grabbing',
|
|
595
|
-
...taskWidthStyle
|
|
596
|
-
},
|
|
597
|
-
children: /*#__PURE__*/ jsx(TaskContent, {
|
|
598
|
-
task: activeTask,
|
|
599
|
-
isDragging: true
|
|
600
|
-
})
|
|
601
|
-
})
|
|
602
|
-
}) : null
|
|
603
|
-
}), document.body)
|
|
604
|
-
]
|
|
605
|
-
}) : /*#__PURE__*/ jsx(Column, {
|
|
581
|
+
children: 0 === tasks.length && 0 === adhocTasks.length ? /*#__PURE__*/ jsx(Column, {
|
|
606
582
|
py: 2,
|
|
607
583
|
children: (onTaskAdd || onAddTaskFromToolbox) && !isReadOnly ? /*#__PURE__*/ jsx(ApLink, {
|
|
608
584
|
onClick: addTaskLoading ? void 0 : handleTaskAddClick,
|
|
@@ -617,6 +593,119 @@ const StageNodeComponent = (props)=>{
|
|
|
617
593
|
color: "var(--uix-canvas-foreground-de-emp)",
|
|
618
594
|
children: defaultContent
|
|
619
595
|
})
|
|
596
|
+
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
597
|
+
children: [
|
|
598
|
+
tasks.length > 0 && /*#__PURE__*/ jsxs(DndContext, {
|
|
599
|
+
collisionDetection: closestCenter,
|
|
600
|
+
sensors: sensors,
|
|
601
|
+
onDragStart: handleDragStart,
|
|
602
|
+
onDragMove: handleDragMove,
|
|
603
|
+
onDragOver: handleDragOver,
|
|
604
|
+
onDragEnd: handleDragEnd,
|
|
605
|
+
onDragCancel: handleDragCancel,
|
|
606
|
+
children: [
|
|
607
|
+
/*#__PURE__*/ jsx(SortableContext, {
|
|
608
|
+
items: taskIds,
|
|
609
|
+
strategy: verticalListSortingStrategy,
|
|
610
|
+
children: /*#__PURE__*/ jsx(StageTaskList, {
|
|
611
|
+
className: "nodrag nopan",
|
|
612
|
+
children: tasks.map((taskGroup, groupIndex)=>{
|
|
613
|
+
const isParallel = taskGroup.length > 1;
|
|
614
|
+
return /*#__PURE__*/ jsxs(Row, {
|
|
615
|
+
gap: Spacing.SpacingS,
|
|
616
|
+
children: [
|
|
617
|
+
isParallel && /*#__PURE__*/ jsx(StageParallelBracket, {}),
|
|
618
|
+
/*#__PURE__*/ jsxs(StageTaskGroup, {
|
|
619
|
+
isParallel: isParallel,
|
|
620
|
+
children: [
|
|
621
|
+
isParallel && /*#__PURE__*/ jsx(StageParallelLabel, {
|
|
622
|
+
children: /*#__PURE__*/ jsx(ApTypography, {
|
|
623
|
+
variant: FontVariantToken.fontSizeS,
|
|
624
|
+
children: "Parallel"
|
|
625
|
+
})
|
|
626
|
+
}),
|
|
627
|
+
taskGroup.map((task, taskIndex)=>{
|
|
628
|
+
const taskExecution = execution?.taskStatus?.[task.id];
|
|
629
|
+
return /*#__PURE__*/ jsx(DraggableTask, {
|
|
630
|
+
task: task,
|
|
631
|
+
taskExecution: taskExecution,
|
|
632
|
+
isSelected: selectedTaskId === task.id,
|
|
633
|
+
isParallel: isParallel,
|
|
634
|
+
contextMenuItems: contextMenuItems(isParallel, groupIndex, taskIndex, tasks.length, taskGroup.length, (tasks[groupIndex - 1]?.length ?? 0) > 1, (tasks[groupIndex + 1]?.length ?? 0) > 1),
|
|
635
|
+
onTaskClick: handleTaskClick,
|
|
636
|
+
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
637
|
+
isDragDisabled: !onTaskReorder,
|
|
638
|
+
zoom: zoom,
|
|
639
|
+
...(onTaskGroupModification || onReplaceTaskFromToolbox) && {
|
|
640
|
+
onMenuOpen: ()=>{
|
|
641
|
+
taskStateReference.current = {
|
|
642
|
+
isParallel,
|
|
643
|
+
groupIndex,
|
|
644
|
+
taskIndex
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}, task.id);
|
|
649
|
+
})
|
|
650
|
+
]
|
|
651
|
+
})
|
|
652
|
+
]
|
|
653
|
+
}, `group-${groupIndex}`);
|
|
654
|
+
})
|
|
655
|
+
})
|
|
656
|
+
}),
|
|
657
|
+
/*#__PURE__*/ createPortal(/*#__PURE__*/ jsx(DragOverlay, {
|
|
658
|
+
children: activeTask ? /*#__PURE__*/ jsx("div", {
|
|
659
|
+
style: dragOverlayStyle,
|
|
660
|
+
children: /*#__PURE__*/ jsx(StageTask, {
|
|
661
|
+
selected: true,
|
|
662
|
+
isParallel: isActiveTaskParallel,
|
|
663
|
+
style: {
|
|
664
|
+
cursor: 'grabbing',
|
|
665
|
+
...taskWidthStyle
|
|
666
|
+
},
|
|
667
|
+
children: /*#__PURE__*/ jsx(TaskContent, {
|
|
668
|
+
task: activeTask,
|
|
669
|
+
isDragging: true
|
|
670
|
+
})
|
|
671
|
+
})
|
|
672
|
+
}) : null
|
|
673
|
+
}), document.body)
|
|
674
|
+
]
|
|
675
|
+
}),
|
|
676
|
+
adhocTasks.length > 0 && /*#__PURE__*/ jsxs(StageAdhocSection, {
|
|
677
|
+
children: [
|
|
678
|
+
/*#__PURE__*/ jsx(StageAdhocHeaderSection, {
|
|
679
|
+
children: /*#__PURE__*/ jsx(ApTypography, {
|
|
680
|
+
variant: FontVariantToken.fontSizeSBold,
|
|
681
|
+
color: "var(--uix-canvas-foreground-de-emp)",
|
|
682
|
+
children: "Adhoc tasks"
|
|
683
|
+
})
|
|
684
|
+
}),
|
|
685
|
+
/*#__PURE__*/ jsx(StageTaskList, {
|
|
686
|
+
children: adhocTasks.map((task)=>{
|
|
687
|
+
const taskExecution = execution?.taskStatus?.[task.id];
|
|
688
|
+
return /*#__PURE__*/ jsxs(StageTask, {
|
|
689
|
+
"data-testid": `stage-task-${task.id}`,
|
|
690
|
+
selected: selectedTaskId === task.id,
|
|
691
|
+
status: taskExecution?.status,
|
|
692
|
+
onClick: (e)=>handleTaskClick(e, task.id),
|
|
693
|
+
children: [
|
|
694
|
+
/*#__PURE__*/ jsx(TaskContent, {
|
|
695
|
+
task: task,
|
|
696
|
+
taskExecution: taskExecution
|
|
697
|
+
}),
|
|
698
|
+
onTaskPlay && /*#__PURE__*/ jsx(AdhocTaskPlayButton, {
|
|
699
|
+
taskId: task.id,
|
|
700
|
+
onTaskPlay: onTaskPlay
|
|
701
|
+
})
|
|
702
|
+
]
|
|
703
|
+
}, task.id);
|
|
704
|
+
})
|
|
705
|
+
})
|
|
706
|
+
]
|
|
707
|
+
})
|
|
708
|
+
]
|
|
620
709
|
})
|
|
621
710
|
})
|
|
622
711
|
]
|
|
@@ -2184,7 +2184,8 @@ const AdhocTasks = {
|
|
|
2184
2184
|
{
|
|
2185
2185
|
id: '3',
|
|
2186
2186
|
label: 'Regular Task',
|
|
2187
|
-
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
|
|
2187
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {}),
|
|
2188
|
+
hasEntryCondition: true
|
|
2188
2189
|
}
|
|
2189
2190
|
]
|
|
2190
2191
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyBvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA0FD,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA4CnC,eAAO,MAAM,OAAO,EAAE,KAoHrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAsE3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA8M7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KA+HvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAoKpC,CAAC;AA8GF,eAAO,MAAM,uBAAuB,EAAE,KAOrC,CAAC;AAkVF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AA2HF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AA0KF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"StageNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyBvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA0FD,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA4CnC,eAAO,MAAM,OAAO,EAAE,KAoHrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAsE3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA8M7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KA+HvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAoKpC,CAAC;AA8GF,eAAO,MAAM,uBAAuB,EAAE,KAOrC,CAAC;AAkVF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AA2HF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AA0KF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAwHxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAkO3B,CAAC"}
|
|
@@ -50,8 +50,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
50
50
|
StageTitleContainer: ()=>StageTitleContainer,
|
|
51
51
|
StageTaskGroup: ()=>StageTaskGroup,
|
|
52
52
|
INDENTATION_WIDTH: ()=>INDENTATION_WIDTH,
|
|
53
|
+
StageAdhocHeaderSection: ()=>StageAdhocHeaderSection,
|
|
53
54
|
StageTaskList: ()=>StageTaskList,
|
|
54
55
|
StageHeader: ()=>StageHeader,
|
|
56
|
+
StageAdhocSection: ()=>StageAdhocSection,
|
|
55
57
|
STAGE_CONTENT_INSET: ()=>STAGE_CONTENT_INSET,
|
|
56
58
|
StageTaskRetryDuration: ()=>StageTaskRetryDuration
|
|
57
59
|
});
|
|
@@ -91,7 +93,7 @@ const StageContainer = styled_default().div`
|
|
|
91
93
|
border-color: var(--uix-canvas-info-icon);
|
|
92
94
|
`}
|
|
93
95
|
|
|
94
|
-
${({ status })=>
|
|
96
|
+
${({ status })=>'Paused' === status && (0, react_namespaceObject.css)`
|
|
95
97
|
border-color: var(--uix-canvas-warning-icon);
|
|
96
98
|
`}
|
|
97
99
|
|
|
@@ -218,7 +220,7 @@ const StageTask = styled_default().div`
|
|
|
218
220
|
border-color: var(--uix-canvas-success-icon);
|
|
219
221
|
`}
|
|
220
222
|
|
|
221
|
-
${({ status })=>
|
|
223
|
+
${({ status })=>'Paused' === status && (0, react_namespaceObject.css)`
|
|
222
224
|
border-color: var(--uix-canvas-warning-icon);
|
|
223
225
|
`}
|
|
224
226
|
|
|
@@ -295,6 +297,17 @@ const StageChip = styled_default().button`
|
|
|
295
297
|
outline-offset: 2px;
|
|
296
298
|
}
|
|
297
299
|
`;
|
|
300
|
+
const StageAdhocSection = styled_default().div`
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-direction: column;
|
|
303
|
+
gap: ${apollo_core_namespaceObject.Spacing.SpacingS};
|
|
304
|
+
margin-top: ${apollo_core_namespaceObject.Spacing.SpacingS};
|
|
305
|
+
`;
|
|
306
|
+
const StageAdhocHeaderSection = styled_default().div`
|
|
307
|
+
height: 36px;
|
|
308
|
+
display: flex;
|
|
309
|
+
align-items: center;
|
|
310
|
+
`;
|
|
298
311
|
const StageTaskDragPlaceholder = styled_default().div`
|
|
299
312
|
display: flex;
|
|
300
313
|
align-items: center;
|
|
@@ -311,6 +324,8 @@ exports.INDENTATION_WIDTH = __webpack_exports__.INDENTATION_WIDTH;
|
|
|
311
324
|
exports.STAGE_BORDER_WIDTH = __webpack_exports__.STAGE_BORDER_WIDTH;
|
|
312
325
|
exports.STAGE_CONTENT_INSET = __webpack_exports__.STAGE_CONTENT_INSET;
|
|
313
326
|
exports.STAGE_CONTENT_PADDING_X = __webpack_exports__.STAGE_CONTENT_PADDING_X;
|
|
327
|
+
exports.StageAdhocHeaderSection = __webpack_exports__.StageAdhocHeaderSection;
|
|
328
|
+
exports.StageAdhocSection = __webpack_exports__.StageAdhocSection;
|
|
314
329
|
exports.StageChip = __webpack_exports__.StageChip;
|
|
315
330
|
exports.StageContainer = __webpack_exports__.StageContainer;
|
|
316
331
|
exports.StageContent = __webpack_exports__.StageContent;
|
|
@@ -333,6 +348,8 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
333
348
|
"STAGE_BORDER_WIDTH",
|
|
334
349
|
"STAGE_CONTENT_INSET",
|
|
335
350
|
"STAGE_CONTENT_PADDING_X",
|
|
351
|
+
"StageAdhocHeaderSection",
|
|
352
|
+
"StageAdhocSection",
|
|
336
353
|
"StageChip",
|
|
337
354
|
"StageContainer",
|
|
338
355
|
"StageContent",
|
|
@@ -90,6 +90,14 @@ export declare const StageChip: import("@emotion/styled").StyledComponent<{
|
|
|
90
90
|
theme?: import("@emotion/react").Theme;
|
|
91
91
|
as?: React.ElementType;
|
|
92
92
|
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
93
|
+
export declare const StageAdhocSection: import("@emotion/styled").StyledComponent<{
|
|
94
|
+
theme?: import("@emotion/react").Theme;
|
|
95
|
+
as?: React.ElementType;
|
|
96
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
97
|
+
export declare const StageAdhocHeaderSection: import("@emotion/styled").StyledComponent<{
|
|
98
|
+
theme?: import("@emotion/react").Theme;
|
|
99
|
+
as?: React.ElementType;
|
|
100
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
93
101
|
export declare const StageTaskDragPlaceholder: import("@emotion/styled").StyledComponent<{
|
|
94
102
|
theme?: import("@emotion/react").Theme;
|
|
95
103
|
as?: React.ElementType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.styles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,mBAAmB,QAAuD,CAAC;AAExF,eAAO,MAA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
|
37
37
|
border-color: var(--uix-canvas-warning-icon);
|
|
38
38
|
`}
|
|
39
39
|
|
|
@@ -160,7 +160,7 @@ const StageTask = styled.div`
|
|
|
160
160
|
border-color: var(--uix-canvas-success-icon);
|
|
161
161
|
`}
|
|
162
162
|
|
|
163
|
-
${({ status })=>
|
|
163
|
+
${({ status })=>'Paused' === status && css`
|
|
164
164
|
border-color: var(--uix-canvas-warning-icon);
|
|
165
165
|
`}
|
|
166
166
|
|
|
@@ -237,6 +237,17 @@ const StageChip = styled.button`
|
|
|
237
237
|
outline-offset: 2px;
|
|
238
238
|
}
|
|
239
239
|
`;
|
|
240
|
+
const StageAdhocSection = styled.div`
|
|
241
|
+
display: flex;
|
|
242
|
+
flex-direction: column;
|
|
243
|
+
gap: ${Spacing.SpacingS};
|
|
244
|
+
margin-top: ${Spacing.SpacingS};
|
|
245
|
+
`;
|
|
246
|
+
const StageAdhocHeaderSection = styled.div`
|
|
247
|
+
height: 36px;
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
`;
|
|
240
251
|
const StageTaskDragPlaceholder = styled.div`
|
|
241
252
|
display: flex;
|
|
242
253
|
align-items: center;
|
|
@@ -249,4 +260,4 @@ const StageTaskDragPlaceholder = styled.div`
|
|
|
249
260
|
height: 100%;
|
|
250
261
|
width: ${({ isTargetParallel })=>isTargetParallel ? 'var(--stage-task-width-parallel, 216px)' : 'var(--stage-task-width, 246px)'};
|
|
251
262
|
`;
|
|
252
|
-
export { INDENTATION_WIDTH, STAGE_BORDER_WIDTH, STAGE_CONTENT_INSET, STAGE_CONTENT_PADDING_X, StageChip, StageContainer, StageContent, StageHeader, StageHeaderChipsRow, StageParallelBracket, StageParallelLabel, StageTask, StageTaskDragPlaceholder, StageTaskDragPlaceholderWrapper, StageTaskGroup, StageTaskIcon, StageTaskList, StageTaskRetryDuration, StageTaskWrapper, StageTitleContainer, StageTitleInput };
|
|
263
|
+
export { INDENTATION_WIDTH, STAGE_BORDER_WIDTH, STAGE_CONTENT_INSET, STAGE_CONTENT_PADDING_X, StageAdhocHeaderSection, StageAdhocSection, StageChip, StageContainer, StageContent, StageHeader, StageHeaderChipsRow, StageParallelBracket, StageParallelLabel, StageTask, StageTaskDragPlaceholder, StageTaskDragPlaceholderWrapper, StageTaskGroup, StageTaskIcon, StageTaskList, StageTaskRetryDuration, StageTaskWrapper, StageTitleContainer, StageTitleInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEjE,aAAK,mBAAmB;IACtB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,WAAW,GAAG,GAAG,mBAAmB,EAAE,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,GAAG,mBAAmB,EAAE,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StageNode.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EA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AAE,MAAM,EAClB,SAAS,EAAE,MAAM,KACd,IAAI,CAAC;IACV,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,aAAa,CAAC,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,EAAE,KAAK,IAAI,CAAC;IAC5D,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9F,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.66.1",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
"use-sync-external-store": "^1.2.0",
|
|
201
201
|
"zod": "^4.3.5",
|
|
202
202
|
"zustand": "^5.0.9",
|
|
203
|
-
"@uipath/apollo-
|
|
204
|
-
"@uipath/apollo-
|
|
203
|
+
"@uipath/apollo-core": "5.9.0",
|
|
204
|
+
"@uipath/apollo-wind": "2.0.0"
|
|
205
205
|
},
|
|
206
206
|
"devDependencies": {
|
|
207
207
|
"@lingui/cli": "^5.6.1",
|