@uipath/apollo-react 3.60.4 → 3.61.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/AddNodePanel/AddNodePanel.stories.cjs +3 -3
- package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.d.ts.map +1 -1
- package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.js +3 -3
- package/dist/canvas/components/StageNode/DraggableTask.cjs +73 -1
- 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 +64 -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/StageNode.cjs +2 -1
- package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.js +2 -1
- package/dist/canvas/components/StageNode/StageNode.stories.cjs +141 -1
- package/dist/canvas/components/StageNode/StageNode.stories.d.ts +1 -0
- package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.stories.js +138 -1
- package/dist/canvas/components/StageNode/StageNode.types.d.ts +2 -0
- package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/ListView.cjs +11 -6
- package/dist/canvas/components/Toolbox/ListView.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/ListView.js +11 -6
- package/dist/canvas/icons/EntryConditionIcon.cjs +47 -0
- package/dist/canvas/icons/EntryConditionIcon.d.ts +5 -0
- package/dist/canvas/icons/EntryConditionIcon.d.ts.map +1 -0
- package/dist/canvas/icons/EntryConditionIcon.js +13 -0
- package/dist/canvas/icons/PlayIcon.cjs +46 -0
- package/dist/canvas/icons/PlayIcon.d.ts +5 -0
- package/dist/canvas/icons/PlayIcon.d.ts.map +1 -0
- package/dist/canvas/icons/PlayIcon.js +12 -0
- package/dist/canvas/icons/index.cjs +9 -1
- package/dist/canvas/icons/index.d.ts +2 -0
- package/dist/canvas/icons/index.d.ts.map +1 -1
- package/dist/canvas/icons/index.js +3 -1
- package/dist/icons/UiPathFullDark.cjs +48 -37
- package/dist/icons/UiPathFullDark.d.ts.map +1 -1
- package/dist/icons/UiPathFullDark.js +49 -38
- package/dist/icons/UiPathFullLight.cjs +48 -37
- package/dist/icons/UiPathFullLight.d.ts.map +1 -1
- package/dist/icons/UiPathFullLight.js +49 -38
- package/package.json +3 -3
|
@@ -102,7 +102,7 @@ const NODE_OPTIONS = [
|
|
|
102
102
|
type: 'ai-agent',
|
|
103
103
|
category: 'AI'
|
|
104
104
|
},
|
|
105
|
-
description: 'Autonomous AI assistant'
|
|
105
|
+
description: 'Autonomous AI assistant that processes complex multi-step workflows end to end'
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
id: '5',
|
|
@@ -114,7 +114,7 @@ const NODE_OPTIONS = [
|
|
|
114
114
|
type: 'openai',
|
|
115
115
|
category: 'AI'
|
|
116
116
|
},
|
|
117
|
-
description: 'GPT models integration'
|
|
117
|
+
description: 'GPT models integration for natural language processing and text generation tasks'
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
id: '6',
|
|
@@ -126,7 +126,7 @@ const NODE_OPTIONS = [
|
|
|
126
126
|
type: 'data-extractor',
|
|
127
127
|
category: 'Data'
|
|
128
128
|
},
|
|
129
|
-
description: 'Extract data from documents'
|
|
129
|
+
description: 'Extract structured data from documents, PDFs, images, and scanned files automatically'
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
id: '7',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNodePanel.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AddNodePanel/AddNodePanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAkB5D,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AASjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAUnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"AddNodePanel.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AddNodePanel/AddNodePanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAkB5D,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AASjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAUnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAiQ3C,eAAO,MAAM,gBAAgB,EAAE,KAG9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAG/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAmBvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAepC,CAAC"}
|
|
@@ -69,7 +69,7 @@ const NODE_OPTIONS = [
|
|
|
69
69
|
type: 'ai-agent',
|
|
70
70
|
category: 'AI'
|
|
71
71
|
},
|
|
72
|
-
description: 'Autonomous AI assistant'
|
|
72
|
+
description: 'Autonomous AI assistant that processes complex multi-step workflows end to end'
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
id: '5',
|
|
@@ -81,7 +81,7 @@ const NODE_OPTIONS = [
|
|
|
81
81
|
type: 'openai',
|
|
82
82
|
category: 'AI'
|
|
83
83
|
},
|
|
84
|
-
description: 'GPT models integration'
|
|
84
|
+
description: 'GPT models integration for natural language processing and text generation tasks'
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
id: '6',
|
|
@@ -93,7 +93,7 @@ const NODE_OPTIONS = [
|
|
|
93
93
|
type: 'data-extractor',
|
|
94
94
|
category: 'Data'
|
|
95
95
|
},
|
|
96
|
-
description: 'Extract data from documents'
|
|
96
|
+
description: 'Extract structured data from documents, PDFs, images, and scanned files automatically'
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
id: '7',
|
|
@@ -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,7 +42,10 @@ const utilities_namespaceObject = require("@dnd-kit/utilities");
|
|
|
33
42
|
const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
34
43
|
const index_cjs_namespaceObject = require("../../layouts/index.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");
|
|
48
|
+
const external_icons_index_cjs_namespaceObject = require("../../icons/index.cjs");
|
|
37
49
|
const external_ExecutionStatusIcon_index_cjs_namespaceObject = require("../ExecutionStatusIcon/index.cjs");
|
|
38
50
|
const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.styles.cjs");
|
|
39
51
|
const external_TaskMenu_cjs_namespaceObject = require("./TaskMenu.cjs");
|
|
@@ -170,10 +182,11 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
170
182
|
]
|
|
171
183
|
})
|
|
172
184
|
}));
|
|
173
|
-
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, isDragDisabled, projectedDepth, zoom = 1 })=>{
|
|
185
|
+
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, onTaskPlay, isDragDisabled, projectedDepth, zoom = 1 })=>{
|
|
174
186
|
const [isMenuOpen, setIsMenuOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
175
187
|
const taskRef = (0, external_react_namespaceObject.useRef)(null);
|
|
176
188
|
const menuRef = (0, external_react_namespaceObject.useRef)(null);
|
|
189
|
+
const [playLoading, setPlayLoading] = (0, external_react_namespaceObject.useState)(false);
|
|
177
190
|
const handleClick = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
178
191
|
if (isMenuOpen) return;
|
|
179
192
|
onTaskClick(e, task.id);
|
|
@@ -185,6 +198,26 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
185
198
|
const handleMenuOpenChange = (0, external_react_namespaceObject.useCallback)((isOpen)=>{
|
|
186
199
|
setIsMenuOpen(isOpen);
|
|
187
200
|
}, []);
|
|
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
|
+
]);
|
|
188
221
|
const handleContextMenu = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
189
222
|
menuRef.current?.handleContextMenu(e);
|
|
190
223
|
}, []);
|
|
@@ -241,6 +274,45 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
241
274
|
task: task,
|
|
242
275
|
taskExecution: taskExecution
|
|
243
276
|
}),
|
|
277
|
+
task.isAdhoc && onTaskPlay && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
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, {
|
|
301
|
+
content: "Entry condition",
|
|
302
|
+
placement: "top",
|
|
303
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
304
|
+
style: {
|
|
305
|
+
display: 'flex',
|
|
306
|
+
alignItems: 'center',
|
|
307
|
+
color: 'var(--color-icon-default)',
|
|
308
|
+
flexShrink: 0
|
|
309
|
+
},
|
|
310
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject.EntryConditionIcon, {
|
|
311
|
+
w: 20,
|
|
312
|
+
h: 20
|
|
313
|
+
})
|
|
314
|
+
})
|
|
315
|
+
}),
|
|
244
316
|
contextMenuItems.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskMenu_cjs_namespaceObject.TaskMenu, {
|
|
245
317
|
ref: menuRef,
|
|
246
318
|
taskId: task.id,
|
|
@@ -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, isDragDisabled, projectedDepth, zoom, }: DraggableTaskProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export declare const DraggableTask: import("react").MemoExoticComponent<({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, onTaskPlay, 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":"AAiBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAgClF,eAAO,MAAM,WAAW,4EAA8C,gBAAgB,6CAwEpF,CAAC;AAqLH,eAAO,MAAM,aAAa,sLAvKvB,kBAAkB,6CAuKoC,CAAC"}
|
|
@@ -3,8 +3,10 @@ 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, ApIconButton, ApTooltip, ApTypography, BadgeSize } from "../../../material/index.js";
|
|
6
|
+
import { ApBadge, ApCircularProgress, ApIconButton, ApTooltip, ApTypography, BadgeSize } from "../../../material/index.js";
|
|
7
|
+
import debounce from "debounce";
|
|
7
8
|
import { memo, useCallback, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { EntryConditionIcon, PlayIcon } from "../../icons/index.js";
|
|
8
10
|
import { ExecutionStatusIcon } from "../ExecutionStatusIcon/index.js";
|
|
9
11
|
import { INDENTATION_WIDTH, StageTask, StageTaskDragPlaceholder, StageTaskDragPlaceholderWrapper, StageTaskIcon, StageTaskRetryDuration, StageTaskWrapper } from "./StageNode.styles.js";
|
|
10
12
|
import { TaskMenu } from "./TaskMenu.js";
|
|
@@ -141,10 +143,11 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging })=>/*
|
|
|
141
143
|
]
|
|
142
144
|
})
|
|
143
145
|
}));
|
|
144
|
-
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, isDragDisabled, projectedDepth, zoom = 1 })=>{
|
|
146
|
+
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, onTaskPlay, isDragDisabled, projectedDepth, zoom = 1 })=>{
|
|
145
147
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
146
148
|
const taskRef = useRef(null);
|
|
147
149
|
const menuRef = useRef(null);
|
|
150
|
+
const [playLoading, setPlayLoading] = useState(false);
|
|
148
151
|
const handleClick = useCallback((e)=>{
|
|
149
152
|
if (isMenuOpen) return;
|
|
150
153
|
onTaskClick(e, task.id);
|
|
@@ -156,6 +159,26 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
156
159
|
const handleMenuOpenChange = useCallback((isOpen)=>{
|
|
157
160
|
setIsMenuOpen(isOpen);
|
|
158
161
|
}, []);
|
|
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
|
+
]);
|
|
159
182
|
const handleContextMenu = useCallback((e)=>{
|
|
160
183
|
menuRef.current?.handleContextMenu(e);
|
|
161
184
|
}, []);
|
|
@@ -212,6 +235,45 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, c
|
|
|
212
235
|
task: task,
|
|
213
236
|
taskExecution: taskExecution
|
|
214
237
|
}),
|
|
238
|
+
task.isAdhoc && onTaskPlay && /*#__PURE__*/ jsx(ApTooltip, {
|
|
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, {
|
|
262
|
+
content: "Entry condition",
|
|
263
|
+
placement: "top",
|
|
264
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
265
|
+
style: {
|
|
266
|
+
display: 'flex',
|
|
267
|
+
alignItems: 'center',
|
|
268
|
+
color: 'var(--color-icon-default)',
|
|
269
|
+
flexShrink: 0
|
|
270
|
+
},
|
|
271
|
+
children: /*#__PURE__*/ jsx(EntryConditionIcon, {
|
|
272
|
+
w: 20,
|
|
273
|
+
h: 20
|
|
274
|
+
})
|
|
275
|
+
})
|
|
276
|
+
}),
|
|
215
277
|
contextMenuItems.length > 0 && /*#__PURE__*/ jsx(TaskMenu, {
|
|
216
278
|
ref: menuRef,
|
|
217
279
|
taskId: task.id,
|
|
@@ -13,6 +13,7 @@ export interface DraggableTaskProps {
|
|
|
13
13
|
contextMenuItems: NodeMenuItem[];
|
|
14
14
|
onTaskClick: (e: React.MouseEvent, taskId: string) => void;
|
|
15
15
|
onMenuOpen?: () => void;
|
|
16
|
+
onTaskPlay?: (taskId: string) => Promise<void>;
|
|
16
17
|
isDragDisabled?: boolean;
|
|
17
18
|
projectedDepth?: number;
|
|
18
19
|
zoom?: number;
|
|
@@ -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,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,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,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
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,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,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,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,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,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -47,7 +47,7 @@ const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.style
|
|
|
47
47
|
const external_StageNode_utils_cjs_namespaceObject = require("./StageNode.utils.cjs");
|
|
48
48
|
const external_StageNodeTaskUtilities_cjs_namespaceObject = require("./StageNodeTaskUtilities.cjs");
|
|
49
49
|
const StageNodeComponent = (props)=>{
|
|
50
|
-
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 } = props;
|
|
50
|
+
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 } = props;
|
|
51
51
|
const taskWidth = width ? width - external_StageNode_styles_cjs_namespaceObject.STAGE_CONTENT_INSET : void 0;
|
|
52
52
|
const tasks = (0, external_react_namespaceObject.useMemo)(()=>stageDetails?.tasks || [], [
|
|
53
53
|
stageDetails?.tasks
|
|
@@ -539,6 +539,7 @@ const StageNodeComponent = (props)=>{
|
|
|
539
539
|
contextMenuItems: contextMenuItems(isParallel, groupIndex, taskIndex, tasks.length, taskGroup.length, (tasks[groupIndex - 1]?.length ?? 0) > 1, (tasks[groupIndex + 1]?.length ?? 0) > 1),
|
|
540
540
|
onTaskClick: handleTaskClick,
|
|
541
541
|
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
542
|
+
onTaskPlay: onTaskPlay,
|
|
542
543
|
isDragDisabled: !onTaskReorder,
|
|
543
544
|
zoom: zoom,
|
|
544
545
|
...(onTaskGroupModification || onReplaceTaskFromToolbox) && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAqDA,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":"AAqDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAspBxD,eAAO,MAAM,SAAS,8CA5oBa,cAAc,6CA4oBA,CAAC"}
|
|
@@ -19,7 +19,7 @@ import { INDENTATION_WIDTH, STAGE_CONTENT_INSET, StageContainer, StageContent, S
|
|
|
19
19
|
import { flattenTasks, getProjection, reorderTasks } from "./StageNode.utils.js";
|
|
20
20
|
import { getContextMenuItems, getDivider, getMenuItem } from "./StageNodeTaskUtilities.js";
|
|
21
21
|
const StageNodeComponent = (props)=>{
|
|
22
|
-
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 } = props;
|
|
22
|
+
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 } = props;
|
|
23
23
|
const taskWidth = width ? width - STAGE_CONTENT_INSET : void 0;
|
|
24
24
|
const tasks = useMemo(()=>stageDetails?.tasks || [], [
|
|
25
25
|
stageDetails?.tasks
|
|
@@ -511,6 +511,7 @@ const StageNodeComponent = (props)=>{
|
|
|
511
511
|
contextMenuItems: contextMenuItems(isParallel, groupIndex, taskIndex, tasks.length, taskGroup.length, (tasks[groupIndex - 1]?.length ?? 0) > 1, (tasks[groupIndex + 1]?.length ?? 0) > 1),
|
|
512
512
|
onTaskClick: handleTaskClick,
|
|
513
513
|
projectedDepth: task.id === activeDragId && projected ? projected.depth : void 0,
|
|
514
|
+
onTaskPlay: onTaskPlay,
|
|
514
515
|
isDragDisabled: !onTaskReorder,
|
|
515
516
|
zoom: zoom,
|
|
516
517
|
...(onTaskGroupModification || onReplaceTaskFromToolbox) && {
|
|
@@ -27,8 +27,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
DraggableTaskReordering: ()=>DraggableTaskReordering,
|
|
28
28
|
default: ()=>StageNode_stories,
|
|
29
29
|
LoanProcessingWorkflow: ()=>LoanProcessingWorkflow,
|
|
30
|
-
InteractiveTaskManagement: ()=>InteractiveTaskManagement,
|
|
31
30
|
AddTaskLoading: ()=>AddTaskLoading,
|
|
31
|
+
AdhocTasks: ()=>AdhocTasks,
|
|
32
|
+
InteractiveTaskManagement: ()=>InteractiveTaskManagement,
|
|
32
33
|
EditableStageTitle: ()=>EditableStageTitle,
|
|
33
34
|
WithTaskIcons: ()=>WithTaskIcons,
|
|
34
35
|
Default: ()=>Default,
|
|
@@ -2075,8 +2076,146 @@ const AddTaskLoading = {
|
|
|
2075
2076
|
render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AddTaskLoadingStory, {}),
|
|
2076
2077
|
args: {}
|
|
2077
2078
|
};
|
|
2079
|
+
const AdhocTasks = {
|
|
2080
|
+
name: 'Adhoc Tasks',
|
|
2081
|
+
parameters: {
|
|
2082
|
+
nodes: [
|
|
2083
|
+
{
|
|
2084
|
+
id: '0',
|
|
2085
|
+
type: 'stage',
|
|
2086
|
+
position: {
|
|
2087
|
+
x: 48,
|
|
2088
|
+
y: 96
|
|
2089
|
+
},
|
|
2090
|
+
width: 304,
|
|
2091
|
+
data: {
|
|
2092
|
+
stageDetails: {
|
|
2093
|
+
label: 'With onTaskPlay',
|
|
2094
|
+
tasks: [
|
|
2095
|
+
[
|
|
2096
|
+
{
|
|
2097
|
+
id: '1',
|
|
2098
|
+
label: 'Adhoc - KYC Check',
|
|
2099
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
|
|
2100
|
+
isAdhoc: true
|
|
2101
|
+
}
|
|
2102
|
+
],
|
|
2103
|
+
[
|
|
2104
|
+
{
|
|
2105
|
+
id: '2',
|
|
2106
|
+
label: 'Adhoc - Document Review',
|
|
2107
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {}),
|
|
2108
|
+
isAdhoc: true
|
|
2109
|
+
}
|
|
2110
|
+
],
|
|
2111
|
+
[
|
|
2112
|
+
{
|
|
2113
|
+
id: '3',
|
|
2114
|
+
label: 'Regular Task',
|
|
2115
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
|
|
2116
|
+
}
|
|
2117
|
+
]
|
|
2118
|
+
]
|
|
2119
|
+
},
|
|
2120
|
+
onTaskPlay: (taskId)=>new Promise((resolve)=>setTimeout(()=>{
|
|
2121
|
+
resolve();
|
|
2122
|
+
console.log(`Play task: ${taskId}`);
|
|
2123
|
+
}, 5000)),
|
|
2124
|
+
onTaskClick: (taskId)=>{
|
|
2125
|
+
window.alert(`Task clicked: ${taskId}`);
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
id: '1',
|
|
2131
|
+
type: 'stage',
|
|
2132
|
+
position: {
|
|
2133
|
+
x: 400,
|
|
2134
|
+
y: 96
|
|
2135
|
+
},
|
|
2136
|
+
width: 304,
|
|
2137
|
+
data: {
|
|
2138
|
+
stageDetails: {
|
|
2139
|
+
label: 'Without onTaskPlay',
|
|
2140
|
+
tasks: [
|
|
2141
|
+
[
|
|
2142
|
+
{
|
|
2143
|
+
id: '1',
|
|
2144
|
+
label: 'Adhoc - Risk Assessment',
|
|
2145
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
|
|
2146
|
+
isAdhoc: true
|
|
2147
|
+
}
|
|
2148
|
+
],
|
|
2149
|
+
[
|
|
2150
|
+
{
|
|
2151
|
+
id: '2',
|
|
2152
|
+
label: 'Adhoc - Compliance Review',
|
|
2153
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {}),
|
|
2154
|
+
isAdhoc: true
|
|
2155
|
+
}
|
|
2156
|
+
],
|
|
2157
|
+
[
|
|
2158
|
+
{
|
|
2159
|
+
id: '3',
|
|
2160
|
+
label: 'Regular Task',
|
|
2161
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
|
|
2162
|
+
}
|
|
2163
|
+
]
|
|
2164
|
+
]
|
|
2165
|
+
},
|
|
2166
|
+
onTaskClick: (taskId)=>{
|
|
2167
|
+
window.alert(`Task clicked: ${taskId}`);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
id: '2',
|
|
2173
|
+
type: 'stage',
|
|
2174
|
+
position: {
|
|
2175
|
+
x: 752,
|
|
2176
|
+
y: 96
|
|
2177
|
+
},
|
|
2178
|
+
width: 304,
|
|
2179
|
+
data: {
|
|
2180
|
+
stageDetails: {
|
|
2181
|
+
label: 'Mixed with Parallel',
|
|
2182
|
+
isReadOnly: true,
|
|
2183
|
+
tasks: [
|
|
2184
|
+
[
|
|
2185
|
+
{
|
|
2186
|
+
id: '1',
|
|
2187
|
+
label: 'Adhoc - Verify Address',
|
|
2188
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
|
|
2189
|
+
isAdhoc: true
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
id: '2',
|
|
2193
|
+
label: 'Adhoc - Verify Identity',
|
|
2194
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
|
|
2195
|
+
isAdhoc: true
|
|
2196
|
+
}
|
|
2197
|
+
],
|
|
2198
|
+
[
|
|
2199
|
+
{
|
|
2200
|
+
id: '3',
|
|
2201
|
+
label: 'Regular Processing',
|
|
2202
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
|
|
2203
|
+
}
|
|
2204
|
+
]
|
|
2205
|
+
]
|
|
2206
|
+
},
|
|
2207
|
+
onTaskPlay: (taskId)=>{
|
|
2208
|
+
console.log(`Play task: ${taskId}`);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
]
|
|
2213
|
+
},
|
|
2214
|
+
args: {}
|
|
2215
|
+
};
|
|
2078
2216
|
exports.AddAndReplaceTasks = __webpack_exports__.AddAndReplaceTasks;
|
|
2079
2217
|
exports.AddTaskLoading = __webpack_exports__.AddTaskLoading;
|
|
2218
|
+
exports.AdhocTasks = __webpack_exports__.AdhocTasks;
|
|
2080
2219
|
exports.Default = __webpack_exports__.Default;
|
|
2081
2220
|
exports.DraggableTaskReordering = __webpack_exports__.DraggableTaskReordering;
|
|
2082
2221
|
exports.EditableStageTitle = __webpack_exports__.EditableStageTitle;
|
|
@@ -2088,6 +2227,7 @@ exports["default"] = __webpack_exports__["default"];
|
|
|
2088
2227
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
2089
2228
|
"AddAndReplaceTasks",
|
|
2090
2229
|
"AddTaskLoading",
|
|
2230
|
+
"AdhocTasks",
|
|
2091
2231
|
"Default",
|
|
2092
2232
|
"DraggableTaskReordering",
|
|
2093
2233
|
"EditableStageTitle",
|
|
@@ -12,4 +12,5 @@ export declare const DraggableTaskReordering: Story;
|
|
|
12
12
|
export declare const AddAndReplaceTasks: Story;
|
|
13
13
|
export declare const EditableStageTitle: Story;
|
|
14
14
|
export declare const AddTaskLoading: Story;
|
|
15
|
+
export declare const AdhocTasks: Story;
|
|
15
16
|
//# sourceMappingURL=StageNode.stories.d.ts.map
|
|
@@ -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;AAiJF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC"}
|
|
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;AAiJF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAiHxB,CAAC"}
|