@uipath/apollo-react 3.69.0 → 3.69.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.
Files changed (30) hide show
  1. package/dist/canvas/components/StageNode/AdhocTask.cjs +3 -67
  2. package/dist/canvas/components/StageNode/AdhocTask.d.ts.map +1 -1
  3. package/dist/canvas/components/StageNode/AdhocTask.js +3 -57
  4. package/dist/canvas/components/StageNode/DraggableTask.cjs +5 -143
  5. package/dist/canvas/components/StageNode/DraggableTask.d.ts +1 -2
  6. package/dist/canvas/components/StageNode/DraggableTask.d.ts.map +1 -1
  7. package/dist/canvas/components/StageNode/DraggableTask.js +5 -140
  8. package/dist/canvas/components/StageNode/DraggableTask.types.d.ts +0 -5
  9. package/dist/canvas/components/StageNode/DraggableTask.types.d.ts.map +1 -1
  10. package/dist/canvas/components/StageNode/StageNode.stories.cjs +63 -3
  11. package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
  12. package/dist/canvas/components/StageNode/StageNode.stories.js +63 -3
  13. package/dist/canvas/components/StageNode/StageTaskDragOverlay.cjs +2 -2
  14. package/dist/canvas/components/StageNode/StageTaskDragOverlay.d.ts.map +1 -1
  15. package/dist/canvas/components/StageNode/StageTaskDragOverlay.js +1 -1
  16. package/dist/canvas/components/StageNode/TaskContent.cjs +273 -0
  17. package/dist/canvas/components/StageNode/TaskContent.d.ts +9 -0
  18. package/dist/canvas/components/StageNode/TaskContent.d.ts.map +1 -0
  19. package/dist/canvas/components/StageNode/TaskContent.js +229 -0
  20. package/dist/canvas/icons/TimelinePlayIcon.cjs +1 -1
  21. package/dist/canvas/icons/TimelinePlayIcon.js +1 -1
  22. package/dist/canvas/icons/index.cjs +1 -5
  23. package/dist/canvas/icons/index.d.ts +0 -1
  24. package/dist/canvas/icons/index.d.ts.map +1 -1
  25. package/dist/canvas/icons/index.js +1 -2
  26. package/package.json +4 -4
  27. package/dist/canvas/icons/PlayIcon.cjs +0 -46
  28. package/dist/canvas/icons/PlayIcon.d.ts +0 -5
  29. package/dist/canvas/icons/PlayIcon.d.ts.map +0 -1
  30. package/dist/canvas/icons/PlayIcon.js +0 -12
@@ -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, {
@@ -36,62 +27,10 @@ __webpack_require__.d(__webpack_exports__, {
36
27
  AdhocTaskItem: ()=>AdhocTaskItem
37
28
  });
38
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
39
- const apollo_core_namespaceObject = require("@uipath/apollo-core");
40
- const index_cjs_namespaceObject = require("../../../material/index.cjs");
41
- const external_debounce_namespaceObject = require("debounce");
42
- var external_debounce_default = /*#__PURE__*/ __webpack_require__.n(external_debounce_namespaceObject);
43
30
  const external_react_namespaceObject = require("react");
44
- const external_icons_index_cjs_namespaceObject = require("../../icons/index.cjs");
45
- const external_DraggableTask_cjs_namespaceObject = require("./DraggableTask.cjs");
46
31
  const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.styles.cjs");
32
+ const external_TaskContent_cjs_namespaceObject = require("./TaskContent.cjs");
47
33
  const external_TaskMenu_cjs_namespaceObject = require("./TaskMenu.cjs");
48
- const AdhocTaskPlayButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ taskId, onTaskPlay })=>{
49
- const [playLoading, setPlayLoading] = (0, external_react_namespaceObject.useState)(false);
50
- const debouncedTaskPlay = (0, external_react_namespaceObject.useMemo)(()=>external_debounce_default()(async (id)=>{
51
- setPlayLoading(true);
52
- try {
53
- await onTaskPlay(id);
54
- } catch {} finally{
55
- setPlayLoading(false);
56
- }
57
- }, 500, {
58
- immediate: true
59
- }), [
60
- onTaskPlay
61
- ]);
62
- const handlePlayClick = (0, external_react_namespaceObject.useCallback)((e)=>{
63
- e.stopPropagation();
64
- e.preventDefault();
65
- debouncedTaskPlay(taskId);
66
- }, [
67
- debouncedTaskPlay,
68
- taskId
69
- ]);
70
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApTooltip, {
71
- content: "Trigger task",
72
- placement: "top",
73
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApIconButton, {
74
- "data-testid": `stage-task-play-${taskId}`,
75
- onClick: handlePlayClick,
76
- onMouseDown: (e)=>e.stopPropagation(),
77
- onKeyDown: (e)=>e.stopPropagation(),
78
- className: "task-menu-icon-button",
79
- sx: {
80
- color: 'var(--uix-canvas-primary) !important',
81
- minWidth: 'unset !important',
82
- width: `${apollo_core_namespaceObject.Spacing.SpacingL} !important`,
83
- height: `${apollo_core_namespaceObject.Spacing.SpacingL} !important`,
84
- padding: '0 !important'
85
- },
86
- children: playLoading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApCircularProgress, {
87
- size: 20
88
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject.PlayIcon, {
89
- w: 20,
90
- h: 20
91
- })
92
- })
93
- });
94
- });
95
34
  const AdhocTaskItemComponent = ({ task, taskExecution, isSelected, getContextMenuItems, onTaskClick, onTaskPlay })=>{
96
35
  const [isMenuOpen, setIsMenuOpen] = (0, external_react_namespaceObject.useState)(false);
97
36
  const taskRef = (0, external_react_namespaceObject.useRef)(null);
@@ -120,12 +59,9 @@ const AdhocTaskItemComponent = ({ task, taskExecution, isSelected, getContextMen
120
59
  onContextMenu: handleContextMenu
121
60
  },
122
61
  children: [
123
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DraggableTask_cjs_namespaceObject.TaskContent, {
62
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskContent_cjs_namespaceObject.TaskContent, {
124
63
  task: task,
125
- taskExecution: taskExecution
126
- }),
127
- onTaskPlay && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AdhocTaskPlayButton, {
128
- taskId: task.id,
64
+ taskExecution: taskExecution,
129
65
  onTaskPlay: onTaskPlay
130
66
  }),
131
67
  getContextMenuItems && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskMenu_cjs_namespaceObject.TaskMenu, {
@@ -1 +1 @@
1
- {"version":3,"file":"AdhocTask.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/AdhocTask.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA0D3E,UAAU,kBAAkB;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,YAAY,EAAE,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAsDD,eAAO,MAAM,aAAa,2HA7CvB,kBAAkB,6CA6CoC,CAAC"}
1
+ {"version":3,"file":"AdhocTask.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/AdhocTask.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI3E,UAAU,kBAAkB;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,YAAY,EAAE,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAqDD,eAAO,MAAM,aAAa,2HA5CvB,kBAAkB,6CA4CoC,CAAC"}
@@ -1,59 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Spacing } from "@uipath/apollo-core";
3
- import { ApCircularProgress, ApIconButton, ApTooltip } from "../../../material/index.js";
4
- import debounce from "debounce";
5
- import { memo, useCallback, useMemo, useRef, useState } from "react";
6
- import { PlayIcon } from "../../icons/index.js";
7
- import { TaskContent } from "./DraggableTask.js";
2
+ import { memo, useCallback, useRef, useState } from "react";
8
3
  import { StageTask } from "./StageNode.styles.js";
4
+ import { TaskContent } from "./TaskContent.js";
9
5
  import { TaskMenu } from "./TaskMenu.js";
10
- const AdhocTaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay })=>{
11
- const [playLoading, setPlayLoading] = useState(false);
12
- const debouncedTaskPlay = useMemo(()=>debounce(async (id)=>{
13
- setPlayLoading(true);
14
- try {
15
- await onTaskPlay(id);
16
- } catch {} finally{
17
- setPlayLoading(false);
18
- }
19
- }, 500, {
20
- immediate: true
21
- }), [
22
- onTaskPlay
23
- ]);
24
- const handlePlayClick = useCallback((e)=>{
25
- e.stopPropagation();
26
- e.preventDefault();
27
- debouncedTaskPlay(taskId);
28
- }, [
29
- debouncedTaskPlay,
30
- taskId
31
- ]);
32
- return /*#__PURE__*/ jsx(ApTooltip, {
33
- content: "Trigger task",
34
- placement: "top",
35
- children: /*#__PURE__*/ jsx(ApIconButton, {
36
- "data-testid": `stage-task-play-${taskId}`,
37
- onClick: handlePlayClick,
38
- onMouseDown: (e)=>e.stopPropagation(),
39
- onKeyDown: (e)=>e.stopPropagation(),
40
- className: "task-menu-icon-button",
41
- sx: {
42
- color: 'var(--uix-canvas-primary) !important',
43
- minWidth: 'unset !important',
44
- width: `${Spacing.SpacingL} !important`,
45
- height: `${Spacing.SpacingL} !important`,
46
- padding: '0 !important'
47
- },
48
- children: playLoading ? /*#__PURE__*/ jsx(ApCircularProgress, {
49
- size: 20
50
- }) : /*#__PURE__*/ jsx(PlayIcon, {
51
- w: 20,
52
- h: 20
53
- })
54
- })
55
- });
56
- });
57
6
  const AdhocTaskItemComponent = ({ task, taskExecution, isSelected, getContextMenuItems, onTaskClick, onTaskPlay })=>{
58
7
  const [isMenuOpen, setIsMenuOpen] = useState(false);
59
8
  const taskRef = useRef(null);
@@ -84,10 +33,7 @@ const AdhocTaskItemComponent = ({ task, taskExecution, isSelected, getContextMen
84
33
  children: [
85
34
  /*#__PURE__*/ jsx(TaskContent, {
86
35
  task: task,
87
- taskExecution: taskExecution
88
- }),
89
- onTaskPlay && /*#__PURE__*/ jsx(AdhocTaskPlayButton, {
90
- taskId: task.id,
36
+ taskExecution: taskExecution,
91
37
  onTaskPlay: onTaskPlay
92
38
  }),
93
39
  getContextMenuItems && /*#__PURE__*/ jsx(TaskMenu, {
@@ -24,154 +24,18 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- TaskContent: ()=>TaskContent,
28
27
  DraggableTask: ()=>DraggableTask
29
28
  });
30
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
30
  const sortable_namespaceObject = require("@dnd-kit/sortable");
32
31
  const utilities_namespaceObject = require("@dnd-kit/utilities");
33
- const apollo_core_namespaceObject = require("@uipath/apollo-core");
34
- const index_cjs_namespaceObject = require("../../layouts/index.cjs");
35
32
  const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
36
- const external_material_index_cjs_namespaceObject = require("../../../material/index.cjs");
33
+ const index_cjs_namespaceObject = require("../../../material/index.cjs");
37
34
  const external_react_namespaceObject = require("react");
38
35
  const external_icons_index_cjs_namespaceObject = require("../../icons/index.cjs");
39
- const external_ExecutionStatusIcon_index_cjs_namespaceObject = require("../ExecutionStatusIcon/index.cjs");
40
36
  const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.styles.cjs");
37
+ const external_TaskContent_cjs_namespaceObject = require("./TaskContent.cjs");
41
38
  const external_TaskMenu_cjs_namespaceObject = require("./TaskMenu.cjs");
42
- const ProcessNodeIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
43
- viewBox: "0 0 24 24",
44
- fill: "none",
45
- stroke: "currentColor",
46
- strokeWidth: "1.5",
47
- children: [
48
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
49
- x: "3",
50
- y: "3",
51
- width: "7",
52
- height: "7",
53
- rx: "1"
54
- }),
55
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
56
- x: "14",
57
- y: "3",
58
- width: "7",
59
- height: "7",
60
- rx: "1"
61
- }),
62
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
63
- x: "3",
64
- y: "14",
65
- width: "7",
66
- height: "7",
67
- rx: "1"
68
- }),
69
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
70
- x: "14",
71
- y: "14",
72
- width: "7",
73
- height: "7",
74
- rx: "1"
75
- })
76
- ]
77
- });
78
- const generateBadgeText = (taskExecution)=>{
79
- if (!taskExecution.badge) return;
80
- if (taskExecution.retryCount && taskExecution.retryCount > 1) return `${taskExecution.badge} x${taskExecution.retryCount}`;
81
- return taskExecution.badge;
82
- };
83
- const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ task, taskExecution, isDragging })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
84
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
85
- flex: 1,
86
- style: {
87
- overflow: 'hidden',
88
- textOverflow: 'ellipsis',
89
- whiteSpace: 'nowrap'
90
- },
91
- gap: apollo_core_namespaceObject.Padding.PadXs,
92
- children: [
93
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
94
- align: "center",
95
- justify: "space-between",
96
- children: [
97
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
98
- gap: apollo_core_namespaceObject.Spacing.SpacingXs,
99
- align: "center",
100
- style: {
101
- overflow: 'hidden',
102
- textOverflow: 'ellipsis',
103
- whiteSpace: 'nowrap'
104
- },
105
- children: [
106
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskIcon, {
107
- children: task.icon ?? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessNodeIcon, {})
108
- }),
109
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
110
- content: task.label,
111
- placement: "top",
112
- smartTooltip: true,
113
- ...isDragging && {
114
- isOpen: false
115
- },
116
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
117
- variant: apollo_core_namespaceObject.FontVariantToken.fontSizeM,
118
- color: "var(--uix-canvas-foreground)",
119
- style: {
120
- overflow: 'hidden',
121
- textOverflow: 'ellipsis',
122
- whiteSpace: 'nowrap'
123
- },
124
- children: task.label
125
- })
126
- })
127
- ]
128
- }),
129
- taskExecution?.status && (taskExecution.message ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
130
- content: taskExecution.message,
131
- placement: "top",
132
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApIconButton, {
133
- size: "small",
134
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
135
- status: taskExecution.status
136
- })
137
- })
138
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
139
- status: taskExecution.status
140
- }))
141
- ]
142
- }),
143
- taskExecution && (taskExecution.duration || taskExecution.retryDuration || taskExecution.badge) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
144
- align: "center",
145
- justify: "space-between",
146
- children: [
147
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
148
- gap: '2px',
149
- children: [
150
- taskExecution?.duration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
151
- variant: apollo_core_namespaceObject.FontVariantToken.fontSizeS,
152
- color: "var(--uix-canvas-foreground-de-emp)",
153
- children: taskExecution.duration
154
- }),
155
- taskExecution?.retryDuration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskRetryDuration, {
156
- status: taskExecution.badgeStatus ?? 'warning',
157
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
158
- variant: apollo_core_namespaceObject.FontVariantToken.fontSizeS,
159
- color: "inherit",
160
- children: `(+${taskExecution.retryDuration})`
161
- })
162
- })
163
- ]
164
- }),
165
- taskExecution?.badge && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApBadge, {
166
- size: external_material_index_cjs_namespaceObject.BadgeSize.SMALL,
167
- status: taskExecution.badgeStatus,
168
- label: generateBadgeText(taskExecution) ?? ''
169
- })
170
- ]
171
- })
172
- ]
173
- })
174
- }));
175
39
  const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, groupIndex, taskIndex, getContextMenuItems, onTaskClick, isDragDisabled, projectedDepth })=>{
176
40
  const [isMenuOpen, setIsMenuOpen] = (0, external_react_namespaceObject.useState)(false);
177
41
  const zoom = (0, react_cjs_namespaceObject.useStore)((s)=>s.transform[2]);
@@ -248,11 +112,11 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, g
248
112
  onContextMenu: handleContextMenu
249
113
  },
250
114
  children: [
251
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskContent, {
115
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskContent_cjs_namespaceObject.TaskContent, {
252
116
  task: task,
253
117
  taskExecution: taskExecution
254
118
  }),
255
- task.hasEntryCondition && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
119
+ task.hasEntryCondition && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApTooltip, {
256
120
  content: "Entry condition",
257
121
  placement: "top",
258
122
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
@@ -289,10 +153,8 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, g
289
153
  };
290
154
  const DraggableTask = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(DraggableTaskComponent);
291
155
  exports.DraggableTask = __webpack_exports__.DraggableTask;
292
- exports.TaskContent = __webpack_exports__.TaskContent;
293
156
  for(var __rspack_i in __webpack_exports__)if (-1 === [
294
- "DraggableTask",
295
- "TaskContent"
157
+ "DraggableTask"
296
158
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
297
159
  Object.defineProperty(exports, '__esModule', {
298
160
  value: true
@@ -1,4 +1,3 @@
1
- import type { DraggableTaskProps, TaskContentProps } from './DraggableTask.types';
2
- export declare const TaskContent: import("react").MemoExoticComponent<({ task, taskExecution, isDragging }: TaskContentProps) => import("react/jsx-runtime").JSX.Element>;
1
+ import type { DraggableTaskProps } from './DraggableTask.types';
3
2
  export declare const DraggableTask: import("react").MemoExoticComponent<({ task, taskExecution, isSelected, isParallel, groupIndex, taskIndex, getContextMenuItems, onTaskClick, isDragDisabled, projectedDepth, }: DraggableTaskProps) => import("react/jsx-runtime").JSX.Element>;
4
3
  //# sourceMappingURL=DraggableTask.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableTask.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAgClF,eAAO,MAAM,WAAW,4EAA8C,gBAAgB,6CAwEpF,CAAC;AAyIH,eAAO,MAAM,aAAa,kLA5HvB,kBAAkB,6CA4HoC,CAAC"}
1
+ {"version":3,"file":"DraggableTask.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAkJhE,eAAO,MAAM,aAAa,kLA5HvB,kBAAkB,6CA4HoC,CAAC"}
@@ -1,148 +1,13 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useSortable } from "@dnd-kit/sortable";
3
3
  import { CSS } from "@dnd-kit/utilities";
4
- import { FontVariantToken, Padding, Spacing } from "@uipath/apollo-core";
5
- import { Column, Row } from "../../layouts/index.js";
6
4
  import { useStore } from "../../xyflow/react.js";
7
- import { ApBadge, ApIconButton, ApTooltip, ApTypography, BadgeSize } from "../../../material/index.js";
5
+ import { ApTooltip } from "../../../material/index.js";
8
6
  import { memo, useCallback, useMemo, useRef, useState } from "react";
9
7
  import { EntryConditionIcon } from "../../icons/index.js";
10
- import { ExecutionStatusIcon } from "../ExecutionStatusIcon/index.js";
11
- import { INDENTATION_WIDTH, StageTask, StageTaskDragPlaceholder, StageTaskDragPlaceholderWrapper, StageTaskIcon, StageTaskRetryDuration, StageTaskWrapper } from "./StageNode.styles.js";
8
+ import { INDENTATION_WIDTH, StageTask, StageTaskDragPlaceholder, StageTaskDragPlaceholderWrapper, StageTaskWrapper } from "./StageNode.styles.js";
9
+ import { TaskContent } from "./TaskContent.js";
12
10
  import { TaskMenu } from "./TaskMenu.js";
13
- const ProcessNodeIcon = ()=>/*#__PURE__*/ jsxs("svg", {
14
- viewBox: "0 0 24 24",
15
- fill: "none",
16
- stroke: "currentColor",
17
- strokeWidth: "1.5",
18
- children: [
19
- /*#__PURE__*/ jsx("rect", {
20
- x: "3",
21
- y: "3",
22
- width: "7",
23
- height: "7",
24
- rx: "1"
25
- }),
26
- /*#__PURE__*/ jsx("rect", {
27
- x: "14",
28
- y: "3",
29
- width: "7",
30
- height: "7",
31
- rx: "1"
32
- }),
33
- /*#__PURE__*/ jsx("rect", {
34
- x: "3",
35
- y: "14",
36
- width: "7",
37
- height: "7",
38
- rx: "1"
39
- }),
40
- /*#__PURE__*/ jsx("rect", {
41
- x: "14",
42
- y: "14",
43
- width: "7",
44
- height: "7",
45
- rx: "1"
46
- })
47
- ]
48
- });
49
- const generateBadgeText = (taskExecution)=>{
50
- if (!taskExecution.badge) return;
51
- if (taskExecution.retryCount && taskExecution.retryCount > 1) return `${taskExecution.badge} x${taskExecution.retryCount}`;
52
- return taskExecution.badge;
53
- };
54
- const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging })=>/*#__PURE__*/ jsx(Fragment, {
55
- children: /*#__PURE__*/ jsxs(Column, {
56
- flex: 1,
57
- style: {
58
- overflow: 'hidden',
59
- textOverflow: 'ellipsis',
60
- whiteSpace: 'nowrap'
61
- },
62
- gap: Padding.PadXs,
63
- children: [
64
- /*#__PURE__*/ jsxs(Row, {
65
- align: "center",
66
- justify: "space-between",
67
- children: [
68
- /*#__PURE__*/ jsxs(Row, {
69
- gap: Spacing.SpacingXs,
70
- align: "center",
71
- style: {
72
- overflow: 'hidden',
73
- textOverflow: 'ellipsis',
74
- whiteSpace: 'nowrap'
75
- },
76
- children: [
77
- /*#__PURE__*/ jsx(StageTaskIcon, {
78
- children: task.icon ?? /*#__PURE__*/ jsx(ProcessNodeIcon, {})
79
- }),
80
- /*#__PURE__*/ jsx(ApTooltip, {
81
- content: task.label,
82
- placement: "top",
83
- smartTooltip: true,
84
- ...isDragging && {
85
- isOpen: false
86
- },
87
- children: /*#__PURE__*/ jsx(ApTypography, {
88
- variant: FontVariantToken.fontSizeM,
89
- color: "var(--uix-canvas-foreground)",
90
- style: {
91
- overflow: 'hidden',
92
- textOverflow: 'ellipsis',
93
- whiteSpace: 'nowrap'
94
- },
95
- children: task.label
96
- })
97
- })
98
- ]
99
- }),
100
- taskExecution?.status && (taskExecution.message ? /*#__PURE__*/ jsx(ApTooltip, {
101
- content: taskExecution.message,
102
- placement: "top",
103
- children: /*#__PURE__*/ jsx(ApIconButton, {
104
- size: "small",
105
- children: /*#__PURE__*/ jsx(ExecutionStatusIcon, {
106
- status: taskExecution.status
107
- })
108
- })
109
- }) : /*#__PURE__*/ jsx(ExecutionStatusIcon, {
110
- status: taskExecution.status
111
- }))
112
- ]
113
- }),
114
- taskExecution && (taskExecution.duration || taskExecution.retryDuration || taskExecution.badge) && /*#__PURE__*/ jsxs(Row, {
115
- align: "center",
116
- justify: "space-between",
117
- children: [
118
- /*#__PURE__*/ jsxs(Row, {
119
- gap: '2px',
120
- children: [
121
- taskExecution?.duration && /*#__PURE__*/ jsx(ApTypography, {
122
- variant: FontVariantToken.fontSizeS,
123
- color: "var(--uix-canvas-foreground-de-emp)",
124
- children: taskExecution.duration
125
- }),
126
- taskExecution?.retryDuration && /*#__PURE__*/ jsx(StageTaskRetryDuration, {
127
- status: taskExecution.badgeStatus ?? 'warning',
128
- children: /*#__PURE__*/ jsx(ApTypography, {
129
- variant: FontVariantToken.fontSizeS,
130
- color: "inherit",
131
- children: `(+${taskExecution.retryDuration})`
132
- })
133
- })
134
- ]
135
- }),
136
- taskExecution?.badge && /*#__PURE__*/ jsx(ApBadge, {
137
- size: BadgeSize.SMALL,
138
- status: taskExecution.badgeStatus,
139
- label: generateBadgeText(taskExecution) ?? ''
140
- })
141
- ]
142
- })
143
- ]
144
- })
145
- }));
146
11
  const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, groupIndex, taskIndex, getContextMenuItems, onTaskClick, isDragDisabled, projectedDepth })=>{
147
12
  const [isMenuOpen, setIsMenuOpen] = useState(false);
148
13
  const zoom = useStore((s)=>s.transform[2]);
@@ -259,4 +124,4 @@ const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, g
259
124
  });
260
125
  };
261
126
  const DraggableTask = /*#__PURE__*/ memo(DraggableTaskComponent);
262
- export { DraggableTask, TaskContent };
127
+ export { DraggableTask };
@@ -1,10 +1,5 @@
1
1
  import type { NodeMenuItem } from '../NodeContextMenu';
2
2
  import type { StageTaskExecution, StageTaskItem } from './StageNode.types';
3
- export interface TaskContentProps {
4
- task: StageTaskItem;
5
- taskExecution?: StageTaskExecution;
6
- isDragging?: boolean;
7
- }
8
3
  export interface DraggableTaskProps {
9
4
  task: StageTaskItem;
10
5
  taskExecution?: StageTaskExecution;
@@ -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,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,YAAY,EAAE,CAAC;IAChF,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
1
+ {"version":3,"file":"DraggableTask.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,YAAY,EAAE,CAAC;IAChF,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -2174,15 +2174,75 @@ const AdhocTasks = {
2174
2174
  [
2175
2175
  {
2176
2176
  id: '3',
2177
+ label: 'Adhoc - Bkgd Check',
2178
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(VerificationIcon, {}),
2179
+ isAdhoc: true
2180
+ }
2181
+ ],
2182
+ [
2183
+ {
2184
+ id: '4',
2185
+ label: 'Adhoc - Review Docs',
2186
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DocumentIcon, {}),
2187
+ isAdhoc: true
2188
+ }
2189
+ ],
2190
+ [
2191
+ {
2192
+ id: '5',
2177
2193
  label: 'Regular Processing',
2178
2194
  icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessIcon, {})
2179
2195
  }
2180
2196
  ]
2181
2197
  ]
2182
2198
  },
2183
- onTaskPlay: (taskId)=>{
2184
- console.log(`Play task: ${taskId}`);
2185
- }
2199
+ execution: {
2200
+ stageStatus: {
2201
+ status: 'InProgress',
2202
+ label: 'In progress',
2203
+ duration: 'SLA: 3h 45m'
2204
+ },
2205
+ taskStatus: {
2206
+ 1: {
2207
+ status: 'Completed',
2208
+ label: 'Verify Address',
2209
+ duration: '1h 20m',
2210
+ retryDuration: '35m',
2211
+ badge: 'Reworked',
2212
+ badgeStatus: 'warning',
2213
+ retryCount: 2
2214
+ },
2215
+ 2: {
2216
+ status: 'Failed',
2217
+ label: 'Verify Identity',
2218
+ duration: '45m',
2219
+ message: 'Identity verification failed - document expired',
2220
+ badge: 'Action needed',
2221
+ badgeStatus: 'error'
2222
+ },
2223
+ 3: {
2224
+ status: 'InProgress',
2225
+ label: 'Background Check'
2226
+ },
2227
+ 4: {
2228
+ status: 'InProgress',
2229
+ label: 'Review Docs',
2230
+ duration: '30m',
2231
+ retryDuration: '10m',
2232
+ badge: 'Reworked',
2233
+ badgeStatus: 'info',
2234
+ retryCount: 1
2235
+ },
2236
+ 5: {
2237
+ status: 'InProgress',
2238
+ label: 'Regular Processing'
2239
+ }
2240
+ }
2241
+ },
2242
+ onTaskPlay: (taskId)=>new Promise((resolve)=>setTimeout(()=>{
2243
+ resolve();
2244
+ console.log(`Play task: ${taskId}`);
2245
+ }, 5000))
2186
2246
  }
2187
2247
  }
2188
2248
  ]
@@ -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;AA2BvD,OAAO,EAAuB,KAAK,cAAc,EAAsB,MAAM,mBAAmB,CAAC;AAiDjG,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,cAAc,CA8C9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA4CnC,eAAO,MAAM,OAAO,EAAE,KAmHrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAqE3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA6M7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KA8HvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAmKpC,CAAC;AAsGF,eAAO,MAAM,uBAAuB,EAAE,KAMrC,CAAC;AA0UF,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AA4GF,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAqJF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA8HxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiO3B,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;AA2BvD,OAAO,EAAuB,KAAK,cAAc,EAAsB,MAAM,mBAAmB,CAAC;AAiDjG,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,cAAc,CA8C9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA4CnC,eAAO,MAAM,OAAO,EAAE,KAmHrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAqE3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA6M7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KA8HvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAmKpC,CAAC;AAsGF,eAAO,MAAM,uBAAuB,EAAE,KAMrC,CAAC;AA0UF,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AA4GF,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAqJF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA8LxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiO3B,CAAC"}