@uipath/apollo-react 3.44.1 → 3.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/components/StageNode/StageNode.cjs +11 -5
- package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.js +12 -6
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.cjs +7 -4
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts +1 -0
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.js +3 -3
- package/package.json +3 -3
|
@@ -97,7 +97,7 @@ const StageNodeComponent = (props)=>{
|
|
|
97
97
|
taskIndex: pendingReplaceTask.taskIndex
|
|
98
98
|
};
|
|
99
99
|
setIsReplacingTask(true);
|
|
100
|
-
}
|
|
100
|
+
} else setIsReplacingTask(false);
|
|
101
101
|
}, [
|
|
102
102
|
pendingReplaceTask,
|
|
103
103
|
tasks
|
|
@@ -201,7 +201,10 @@ const StageNodeComponent = (props)=>{
|
|
|
201
201
|
]);
|
|
202
202
|
const contextMenuItems = (0, external_react_namespaceObject.useCallback)((isParallel, groupIndex, taskIndex, tasksLength, taskGroupLength, isAboveParallel, isBelowParallel)=>{
|
|
203
203
|
const items = [];
|
|
204
|
-
if (onReplaceTaskFromToolbox)
|
|
204
|
+
if (onReplaceTaskFromToolbox) {
|
|
205
|
+
items.push((0, external_StageNodeTaskUtilities_cjs_namespaceObject.getMenuItem)('replace-task', 'Replace task', ()=>setIsReplacingTask(true)));
|
|
206
|
+
items.push((0, external_StageNodeTaskUtilities_cjs_namespaceObject.getDivider)());
|
|
207
|
+
}
|
|
205
208
|
if (onTaskGroupModification) {
|
|
206
209
|
const reGroupOptions = (0, external_StageNodeTaskUtilities_cjs_namespaceObject.getContextMenuItems)(isParallel, groupIndex, tasksLength, taskIndex, taskGroupLength, isAboveParallel, isBelowParallel, reGroupTaskFunction);
|
|
207
210
|
return [
|
|
@@ -252,13 +255,16 @@ const StageNodeComponent = (props)=>{
|
|
|
252
255
|
]);
|
|
253
256
|
const handleReplaceTaskToolboxItemSelected = (0, external_react_namespaceObject.useCallback)((item)=>{
|
|
254
257
|
setIsReplacingTask(true);
|
|
258
|
+
const groupIndex = taskStateReference.current.groupIndex;
|
|
259
|
+
const taskIndex = taskStateReference.current.taskIndex;
|
|
260
|
+
const taskId = tasks[groupIndex]?.[taskIndex]?.id;
|
|
261
|
+
if (taskId) onTaskClick?.(taskId);
|
|
255
262
|
onReplaceTaskFromToolbox?.(item, taskStateReference.current.groupIndex, taskStateReference.current.taskIndex);
|
|
256
263
|
setIsReplacingTask(false);
|
|
257
|
-
setSelectedNodeId(id);
|
|
258
264
|
}, [
|
|
259
265
|
onReplaceTaskFromToolbox,
|
|
260
|
-
|
|
261
|
-
|
|
266
|
+
onTaskClick,
|
|
267
|
+
tasks
|
|
262
268
|
]);
|
|
263
269
|
const handleConfigurations = (0, external_react_namespaceObject.useMemo)(()=>isException ? [] : [
|
|
264
270
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAsDA,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":"AAsDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAkpBxD,eAAO,MAAM,SAAS,8CAxoBa,cAAc,6CAwoBA,CAAC"}
|
|
@@ -17,7 +17,7 @@ import { Toolbox } from "../Toolbox/index.js";
|
|
|
17
17
|
import { DraggableTask, TaskContent } from "./DraggableTask.js";
|
|
18
18
|
import { INDENTATION_WIDTH, STAGE_CONTENT_INSET, StageContainer, StageContent, StageHeader, StageParallelBracket, StageParallelLabel, StageTask, StageTaskGroup, StageTaskList, StageTitleContainer, StageTitleInput } from "./StageNode.styles.js";
|
|
19
19
|
import { flattenTasks, getProjection, reorderTasks } from "./StageNode.utils.js";
|
|
20
|
-
import { getContextMenuItems, getMenuItem } from "./StageNodeTaskUtilities.js";
|
|
20
|
+
import { getContextMenuItems, getDivider, getMenuItem } from "./StageNodeTaskUtilities.js";
|
|
21
21
|
const StageNodeComponent = (props)=>{
|
|
22
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;
|
|
23
23
|
const taskWidth = width ? width - STAGE_CONTENT_INSET : void 0;
|
|
@@ -69,7 +69,7 @@ const StageNodeComponent = (props)=>{
|
|
|
69
69
|
taskIndex: pendingReplaceTask.taskIndex
|
|
70
70
|
};
|
|
71
71
|
setIsReplacingTask(true);
|
|
72
|
-
}
|
|
72
|
+
} else setIsReplacingTask(false);
|
|
73
73
|
}, [
|
|
74
74
|
pendingReplaceTask,
|
|
75
75
|
tasks
|
|
@@ -173,7 +173,10 @@ const StageNodeComponent = (props)=>{
|
|
|
173
173
|
]);
|
|
174
174
|
const contextMenuItems = useCallback((isParallel, groupIndex, taskIndex, tasksLength, taskGroupLength, isAboveParallel, isBelowParallel)=>{
|
|
175
175
|
const items = [];
|
|
176
|
-
if (onReplaceTaskFromToolbox)
|
|
176
|
+
if (onReplaceTaskFromToolbox) {
|
|
177
|
+
items.push(getMenuItem('replace-task', 'Replace task', ()=>setIsReplacingTask(true)));
|
|
178
|
+
items.push(getDivider());
|
|
179
|
+
}
|
|
177
180
|
if (onTaskGroupModification) {
|
|
178
181
|
const reGroupOptions = getContextMenuItems(isParallel, groupIndex, tasksLength, taskIndex, taskGroupLength, isAboveParallel, isBelowParallel, reGroupTaskFunction);
|
|
179
182
|
return [
|
|
@@ -224,13 +227,16 @@ const StageNodeComponent = (props)=>{
|
|
|
224
227
|
]);
|
|
225
228
|
const handleReplaceTaskToolboxItemSelected = useCallback((item)=>{
|
|
226
229
|
setIsReplacingTask(true);
|
|
230
|
+
const groupIndex = taskStateReference.current.groupIndex;
|
|
231
|
+
const taskIndex = taskStateReference.current.taskIndex;
|
|
232
|
+
const taskId = tasks[groupIndex]?.[taskIndex]?.id;
|
|
233
|
+
if (taskId) onTaskClick?.(taskId);
|
|
227
234
|
onReplaceTaskFromToolbox?.(item, taskStateReference.current.groupIndex, taskStateReference.current.taskIndex);
|
|
228
235
|
setIsReplacingTask(false);
|
|
229
|
-
setSelectedNodeId(id);
|
|
230
236
|
}, [
|
|
231
237
|
onReplaceTaskFromToolbox,
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
onTaskClick,
|
|
239
|
+
tasks
|
|
234
240
|
]);
|
|
235
241
|
const handleConfigurations = useMemo(()=>isException ? [] : [
|
|
236
242
|
{
|
|
@@ -24,15 +24,16 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
getDivider: ()=>getDivider,
|
|
28
|
+
getMenuItem: ()=>getMenuItem,
|
|
27
29
|
transformMenuItems: ()=>transformMenuItems,
|
|
28
|
-
getContextMenuItems: ()=>getContextMenuItems
|
|
29
|
-
getMenuItem: ()=>getMenuItem
|
|
30
|
+
getContextMenuItems: ()=>getContextMenuItems
|
|
30
31
|
});
|
|
31
32
|
const GroupModificationUtils_cjs_namespaceObject = require("../../utils/GroupModificationUtils.cjs");
|
|
32
33
|
const getContextMenuItems = (isParallelGroup, groupIndex, tasksLength, taskIndex, _taskGroupLength, isAboveParallel, isBelowParallel, reGroupTaskFunction)=>{
|
|
33
34
|
const CONTEXT_MENU_ITEMS = {
|
|
34
|
-
MOVE_UP: getMenuItem('move-up', 'Move
|
|
35
|
-
MOVE_DOWN: getMenuItem('move-down', 'Move
|
|
35
|
+
MOVE_UP: getMenuItem('move-up', 'Move up', ()=>reGroupTaskFunction(GroupModificationUtils_cjs_namespaceObject.GroupModificationType.TASK_GROUP_UP, groupIndex, taskIndex)),
|
|
36
|
+
MOVE_DOWN: getMenuItem('move-down', 'Move down', ()=>reGroupTaskFunction(GroupModificationUtils_cjs_namespaceObject.GroupModificationType.TASK_GROUP_DOWN, groupIndex, taskIndex)),
|
|
36
37
|
UNGROUP_ALL: getMenuItem('ungroup', 'Ungroup parallel tasks', ()=>reGroupTaskFunction(GroupModificationUtils_cjs_namespaceObject.GroupModificationType.UNGROUP_ALL_TASKS, groupIndex, taskIndex)),
|
|
37
38
|
SPLIT_TASK: getMenuItem('split', 'Remove from parallel group', ()=>reGroupTaskFunction(GroupModificationUtils_cjs_namespaceObject.GroupModificationType.SPLIT_GROUP, groupIndex, taskIndex)),
|
|
38
39
|
REMOVE_GROUP: getMenuItem('remove-group', 'Remove group from stage', ()=>reGroupTaskFunction(GroupModificationUtils_cjs_namespaceObject.GroupModificationType.REMOVE_GROUP, groupIndex, taskIndex)),
|
|
@@ -87,10 +88,12 @@ const transformMenuItems = (menuItems, onItemClick)=>{
|
|
|
87
88
|
});
|
|
88
89
|
};
|
|
89
90
|
exports.getContextMenuItems = __webpack_exports__.getContextMenuItems;
|
|
91
|
+
exports.getDivider = __webpack_exports__.getDivider;
|
|
90
92
|
exports.getMenuItem = __webpack_exports__.getMenuItem;
|
|
91
93
|
exports.transformMenuItems = __webpack_exports__.transformMenuItems;
|
|
92
94
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
93
95
|
"getContextMenuItems",
|
|
96
|
+
"getDivider",
|
|
94
97
|
"getMenuItem",
|
|
95
98
|
"transformMenuItems"
|
|
96
99
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
@@ -3,6 +3,7 @@ import { GroupModificationType } from '../../utils/GroupModificationUtils';
|
|
|
3
3
|
import type { NodeMenuAction, NodeMenuItem } from '../NodeContextMenu';
|
|
4
4
|
export declare const getContextMenuItems: (isParallelGroup: boolean, groupIndex: number, tasksLength: number, taskIndex: number, _taskGroupLength: number, isAboveParallel: boolean, isBelowParallel: boolean, reGroupTaskFunction: (groupModificationType: GroupModificationType, groupIndex: number, taskIndex: number) => void) => NodeMenuItem[];
|
|
5
5
|
export declare function getMenuItem(id: string | undefined, label: string | undefined, onClick: () => void, isDisabled?: boolean): NodeMenuItem;
|
|
6
|
+
export declare const getDivider: () => NodeMenuItem;
|
|
6
7
|
export interface TransformedMenuItem {
|
|
7
8
|
key: string;
|
|
8
9
|
title?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNodeTaskUtilities.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeTaskUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvE,eAAO,MAAM,mBAAmB,GAC9B,iBAAiB,OAAO,EACxB,YAAY,MAAM,EAClB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,kBAAkB,MAAM,EACxB,iBAAiB,OAAO,EACxB,iBAAiB,OAAO,EACxB,qBAAqB,CACnB,qBAAqB,EAAE,qBAAqB,EAC5C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,KACd,IAAI,KACR,YAAY,EAiFd,CAAC;AAEF,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,YAAO,EACjB,KAAK,EAAE,MAAM,YAAU,EACvB,OAAO,EAAE,MAAM,IAAI,EACnB,UAAU,UAAQ,GACjB,YAAY,CAEd;
|
|
1
|
+
{"version":3,"file":"StageNodeTaskUtilities.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeTaskUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvE,eAAO,MAAM,mBAAmB,GAC9B,iBAAiB,OAAO,EACxB,YAAY,MAAM,EAClB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,kBAAkB,MAAM,EACxB,iBAAiB,OAAO,EACxB,iBAAiB,OAAO,EACxB,qBAAqB,CACnB,qBAAqB,EAAE,qBAAqB,EAC5C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,KACd,IAAI,KACR,YAAY,EAiFd,CAAC;AAEF,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,YAAO,EACjB,KAAK,EAAE,MAAM,YAAU,EACvB,OAAO,EAAE,MAAM,IAAI,EACnB,UAAU,UAAQ,GACjB,YAAY,CAEd;AAED,eAAO,MAAM,UAAU,QAAO,YAI7B,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAMD,eAAO,MAAM,kBAAkB,GAC7B,WAAW,YAAY,EAAE,GAAG,SAAS,EACrC,aAAa,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,KAC1C,mBAAmB,EAwBrB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GroupModificationType } from "../../utils/GroupModificationUtils.js";
|
|
2
2
|
const getContextMenuItems = (isParallelGroup, groupIndex, tasksLength, taskIndex, _taskGroupLength, isAboveParallel, isBelowParallel, reGroupTaskFunction)=>{
|
|
3
3
|
const CONTEXT_MENU_ITEMS = {
|
|
4
|
-
MOVE_UP: getMenuItem('move-up', 'Move
|
|
5
|
-
MOVE_DOWN: getMenuItem('move-down', 'Move
|
|
4
|
+
MOVE_UP: getMenuItem('move-up', 'Move up', ()=>reGroupTaskFunction(GroupModificationType.TASK_GROUP_UP, groupIndex, taskIndex)),
|
|
5
|
+
MOVE_DOWN: getMenuItem('move-down', 'Move down', ()=>reGroupTaskFunction(GroupModificationType.TASK_GROUP_DOWN, groupIndex, taskIndex)),
|
|
6
6
|
UNGROUP_ALL: getMenuItem('ungroup', 'Ungroup parallel tasks', ()=>reGroupTaskFunction(GroupModificationType.UNGROUP_ALL_TASKS, groupIndex, taskIndex)),
|
|
7
7
|
SPLIT_TASK: getMenuItem('split', 'Remove from parallel group', ()=>reGroupTaskFunction(GroupModificationType.SPLIT_GROUP, groupIndex, taskIndex)),
|
|
8
8
|
REMOVE_GROUP: getMenuItem('remove-group', 'Remove group from stage', ()=>reGroupTaskFunction(GroupModificationType.REMOVE_GROUP, groupIndex, taskIndex)),
|
|
@@ -56,4 +56,4 @@ const transformMenuItems = (menuItems, onItemClick)=>{
|
|
|
56
56
|
};
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
export { getContextMenuItems, getMenuItem, transformMenuItems };
|
|
59
|
+
export { getContextMenuItems, getDivider, getMenuItem, transformMenuItems };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "3.44.
|
|
3
|
+
"version": "3.44.2",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -198,8 +198,8 @@
|
|
|
198
198
|
"use-sync-external-store": "^1.2.0",
|
|
199
199
|
"zod": "^4.3.5",
|
|
200
200
|
"zustand": "^5.0.9",
|
|
201
|
-
"@uipath/apollo-
|
|
202
|
-
"@uipath/apollo-
|
|
201
|
+
"@uipath/apollo-core": "5.7.0",
|
|
202
|
+
"@uipath/apollo-wind": "0.10.0"
|
|
203
203
|
},
|
|
204
204
|
"devDependencies": {
|
|
205
205
|
"@lingui/cli": "^5.6.1",
|