@uipath/apollo-react 4.59.2 → 4.59.3
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/StageTaskEntryConditionIcon.cjs +2 -1
- package/dist/canvas/components/StageNode/StageTaskEntryConditionIcon.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageTaskEntryConditionIcon.js +2 -1
- package/dist/canvas/components/StageNode/TaskContent.cjs +17 -27
- package/dist/canvas/components/StageNode/TaskContent.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/TaskContent.js +17 -27
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +1 -1
|
@@ -40,7 +40,8 @@ const StageTaskEntryConditionIcon = ({ task, small })=>{
|
|
|
40
40
|
alignItems: 'center',
|
|
41
41
|
justifyContent: 'center',
|
|
42
42
|
color: 'var(--color-icon-default)',
|
|
43
|
-
flexShrink: 0
|
|
43
|
+
flexShrink: 0,
|
|
44
|
+
transform: small ? 'translateX(1px)' : 'translateX(0.5px)'
|
|
44
45
|
},
|
|
45
46
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.EntryConditionIcon, {
|
|
46
47
|
w: small ? 16 : 20,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageTaskEntryConditionIcon.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageTaskEntryConditionIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,eAAO,MAAM,2BAA2B,GAAI,kBAGzC;IACD,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,
|
|
1
|
+
{"version":3,"file":"StageTaskEntryConditionIcon.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageTaskEntryConditionIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,eAAO,MAAM,2BAA2B,GAAI,kBAGzC;IACD,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,mDAsBA,CAAC"}
|
|
@@ -12,7 +12,8 @@ const StageTaskEntryConditionIcon = ({ task, small })=>{
|
|
|
12
12
|
alignItems: 'center',
|
|
13
13
|
justifyContent: 'center',
|
|
14
14
|
color: 'var(--color-icon-default)',
|
|
15
|
-
flexShrink: 0
|
|
15
|
+
flexShrink: 0,
|
|
16
|
+
transform: small ? 'translateX(1px)' : 'translateX(0.5px)'
|
|
16
17
|
},
|
|
17
18
|
children: /*#__PURE__*/ jsx(EntryConditionIcon, {
|
|
18
19
|
w: small ? 16 : 20,
|
|
@@ -41,9 +41,9 @@ const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
|
41
41
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
42
42
|
const external_debounce_namespaceObject = require("debounce");
|
|
43
43
|
var external_debounce_default = /*#__PURE__*/ __webpack_require__.n(external_debounce_namespaceObject);
|
|
44
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
44
45
|
const external_react_namespaceObject = require("react");
|
|
45
46
|
const external_i18n_index_cjs_namespaceObject = require("../../../i18n/index.cjs");
|
|
46
|
-
const external_icons_index_cjs_namespaceObject = require("../../icons/index.cjs");
|
|
47
47
|
const external_CanvasTooltip_cjs_namespaceObject = require("../CanvasTooltip.cjs");
|
|
48
48
|
const external_ExecutionStatusIcon_index_cjs_namespaceObject = require("../ExecutionStatusIcon/index.cjs");
|
|
49
49
|
const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.styles.cjs");
|
|
@@ -87,6 +87,11 @@ const ProcessCanvasIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs
|
|
|
87
87
|
});
|
|
88
88
|
const TaskPlayButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ taskId, onTaskPlay, small })=>{
|
|
89
89
|
const [playLoading, setPlayLoading] = (0, external_react_namespaceObject.useState)(false);
|
|
90
|
+
const { _ } = (0, external_i18n_index_cjs_namespaceObject.useSafeLingui)();
|
|
91
|
+
const triggerTaskLabel = _({
|
|
92
|
+
id: 'stage-node.trigger-task',
|
|
93
|
+
message: 'Trigger task'
|
|
94
|
+
});
|
|
90
95
|
const debouncedTaskPlay = (0, external_react_namespaceObject.useMemo)(()=>external_debounce_default()(async (id)=>{
|
|
91
96
|
setPlayLoading(true);
|
|
92
97
|
try {
|
|
@@ -107,10 +112,8 @@ const TaskPlayButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({
|
|
|
107
112
|
debouncedTaskPlay,
|
|
108
113
|
taskId
|
|
109
114
|
]);
|
|
110
|
-
const iconSize = small ? 18 : 22;
|
|
111
|
-
const buttonSize = small ? '20px' : apollo_core_namespaceObject.Spacing.SpacingL;
|
|
112
115
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
113
|
-
content:
|
|
116
|
+
content: triggerTaskLabel,
|
|
114
117
|
placement: "top",
|
|
115
118
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
116
119
|
variant: "ghost",
|
|
@@ -119,27 +122,16 @@ const TaskPlayButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({
|
|
|
119
122
|
onClick: handlePlayClick,
|
|
120
123
|
onMouseDown: (e)=>e.stopPropagation(),
|
|
121
124
|
onKeyDown: (e)=>e.stopPropagation(),
|
|
122
|
-
|
|
125
|
+
"aria-label": triggerTaskLabel,
|
|
126
|
+
className: small ? 'task-menu-icon-button h-4 w-4 [&_svg]:size-3.5' : 'task-menu-icon-button h-4 w-4',
|
|
123
127
|
style: {
|
|
124
128
|
color: 'var(--canvas-icon-default)',
|
|
125
129
|
minWidth: 'unset',
|
|
126
|
-
|
|
127
|
-
height: buttonSize,
|
|
128
|
-
padding: 0,
|
|
129
|
-
...small && {
|
|
130
|
-
marginRight: '-2px'
|
|
131
|
-
}
|
|
130
|
+
padding: 0
|
|
132
131
|
},
|
|
133
132
|
children: playLoading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Spinner, {
|
|
134
|
-
size: "sm"
|
|
135
|
-
|
|
136
|
-
width: iconSize - 2,
|
|
137
|
-
height: iconSize - 2
|
|
138
|
-
}
|
|
139
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icons_index_cjs_namespaceObject.TimelinePlayIcon, {
|
|
140
|
-
w: iconSize,
|
|
141
|
-
h: iconSize
|
|
142
|
-
})
|
|
133
|
+
size: "sm"
|
|
134
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CirclePlay, {})
|
|
143
135
|
})
|
|
144
136
|
});
|
|
145
137
|
});
|
|
@@ -170,7 +162,7 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
170
162
|
_
|
|
171
163
|
]);
|
|
172
164
|
const hasSecondRowContent = taskExecution && (taskExecution.duration || taskExecution.retryDuration || badgeText);
|
|
173
|
-
const
|
|
165
|
+
const showTaskPlayButton = onTaskPlay && hasExecutionStatus;
|
|
174
166
|
const taskStatusFallbackName = hasExecutionStatus ? getStatusName(taskExecution?.status) : '';
|
|
175
167
|
const taskStatusTooltip = taskExecution?.message || taskStatusFallbackName;
|
|
176
168
|
const durationLabel = (0, external_react_namespaceObject.useMemo)(()=>taskExecution?.duration ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
@@ -261,13 +253,11 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
261
253
|
})
|
|
262
254
|
}),
|
|
263
255
|
!hasSecondRowContent && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageTaskEntryConditionIcon_cjs_namespaceObject.StageTaskEntryConditionIcon, {
|
|
264
|
-
task: task
|
|
265
|
-
small: !!hasExecutionStatus
|
|
256
|
+
task: task
|
|
266
257
|
}),
|
|
267
|
-
|
|
258
|
+
showTaskPlayButton && !hasSecondRowContent && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
268
259
|
taskId: task.id,
|
|
269
|
-
onTaskPlay: onTaskPlay
|
|
270
|
-
small: true
|
|
260
|
+
onTaskPlay: onTaskPlay
|
|
271
261
|
}),
|
|
272
262
|
onTaskPlay && !hasExecutionStatus && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
273
263
|
taskId: task.id,
|
|
@@ -311,7 +301,7 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
311
301
|
task: task,
|
|
312
302
|
small: true
|
|
313
303
|
}),
|
|
314
|
-
|
|
304
|
+
showTaskPlayButton && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskPlayButton, {
|
|
315
305
|
taskId: task.id,
|
|
316
306
|
onTaskPlay: onTaskPlay,
|
|
317
307
|
small: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskContent.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/TaskContent.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"TaskContent.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/TaskContent.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAmF3E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED,eAAO,MAAM,WAAW,wFAC4B,gBAAgB,6CAmInE,CAAC"}
|
|
@@ -3,9 +3,9 @@ import { Padding, Spacing } from "@uipath/apollo-core";
|
|
|
3
3
|
import { Column, Row } from "../../layouts/index.js";
|
|
4
4
|
import { Badge, Button, Spinner } from "@uipath/apollo-wind";
|
|
5
5
|
import debounce from "debounce";
|
|
6
|
+
import { CirclePlay } from "lucide-react";
|
|
6
7
|
import { memo, useCallback, useMemo, useState } from "react";
|
|
7
8
|
import { useSafeLingui } from "../../../i18n/index.js";
|
|
8
|
-
import { TimelinePlayIcon } from "../../icons/index.js";
|
|
9
9
|
import { CanvasTooltip } from "../CanvasTooltip.js";
|
|
10
10
|
import { ExecutionStatusIcon } from "../ExecutionStatusIcon/index.js";
|
|
11
11
|
import { StageTaskIcon, StageTaskRetryDuration } from "./StageNode.styles.js";
|
|
@@ -49,6 +49,11 @@ const ProcessCanvasIcon = ()=>/*#__PURE__*/ jsxs("svg", {
|
|
|
49
49
|
});
|
|
50
50
|
const TaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay, small })=>{
|
|
51
51
|
const [playLoading, setPlayLoading] = useState(false);
|
|
52
|
+
const { _ } = useSafeLingui();
|
|
53
|
+
const triggerTaskLabel = _({
|
|
54
|
+
id: 'stage-node.trigger-task',
|
|
55
|
+
message: 'Trigger task'
|
|
56
|
+
});
|
|
52
57
|
const debouncedTaskPlay = useMemo(()=>debounce(async (id)=>{
|
|
53
58
|
setPlayLoading(true);
|
|
54
59
|
try {
|
|
@@ -69,10 +74,8 @@ const TaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay, small })=>{
|
|
|
69
74
|
debouncedTaskPlay,
|
|
70
75
|
taskId
|
|
71
76
|
]);
|
|
72
|
-
const iconSize = small ? 18 : 22;
|
|
73
|
-
const buttonSize = small ? '20px' : Spacing.SpacingL;
|
|
74
77
|
return /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
75
|
-
content:
|
|
78
|
+
content: triggerTaskLabel,
|
|
76
79
|
placement: "top",
|
|
77
80
|
children: /*#__PURE__*/ jsx(Button, {
|
|
78
81
|
variant: "ghost",
|
|
@@ -81,27 +84,16 @@ const TaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay, small })=>{
|
|
|
81
84
|
onClick: handlePlayClick,
|
|
82
85
|
onMouseDown: (e)=>e.stopPropagation(),
|
|
83
86
|
onKeyDown: (e)=>e.stopPropagation(),
|
|
84
|
-
|
|
87
|
+
"aria-label": triggerTaskLabel,
|
|
88
|
+
className: small ? 'task-menu-icon-button h-4 w-4 [&_svg]:size-3.5' : 'task-menu-icon-button h-4 w-4',
|
|
85
89
|
style: {
|
|
86
90
|
color: 'var(--canvas-icon-default)',
|
|
87
91
|
minWidth: 'unset',
|
|
88
|
-
|
|
89
|
-
height: buttonSize,
|
|
90
|
-
padding: 0,
|
|
91
|
-
...small && {
|
|
92
|
-
marginRight: '-2px'
|
|
93
|
-
}
|
|
92
|
+
padding: 0
|
|
94
93
|
},
|
|
95
94
|
children: playLoading ? /*#__PURE__*/ jsx(Spinner, {
|
|
96
|
-
size: "sm"
|
|
97
|
-
|
|
98
|
-
width: iconSize - 2,
|
|
99
|
-
height: iconSize - 2
|
|
100
|
-
}
|
|
101
|
-
}) : /*#__PURE__*/ jsx(TimelinePlayIcon, {
|
|
102
|
-
w: iconSize,
|
|
103
|
-
h: iconSize
|
|
104
|
-
})
|
|
95
|
+
size: "sm"
|
|
96
|
+
}) : /*#__PURE__*/ jsx(CirclePlay, {})
|
|
105
97
|
})
|
|
106
98
|
});
|
|
107
99
|
});
|
|
@@ -132,7 +124,7 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTas
|
|
|
132
124
|
_
|
|
133
125
|
]);
|
|
134
126
|
const hasSecondRowContent = taskExecution && (taskExecution.duration || taskExecution.retryDuration || badgeText);
|
|
135
|
-
const
|
|
127
|
+
const showTaskPlayButton = onTaskPlay && hasExecutionStatus;
|
|
136
128
|
const taskStatusFallbackName = hasExecutionStatus ? getStatusName(taskExecution?.status) : '';
|
|
137
129
|
const taskStatusTooltip = taskExecution?.message || taskStatusFallbackName;
|
|
138
130
|
const durationLabel = useMemo(()=>taskExecution?.duration ? /*#__PURE__*/ jsx("span", {
|
|
@@ -223,13 +215,11 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTas
|
|
|
223
215
|
})
|
|
224
216
|
}),
|
|
225
217
|
!hasSecondRowContent && /*#__PURE__*/ jsx(StageTaskEntryConditionIcon, {
|
|
226
|
-
task: task
|
|
227
|
-
small: !!hasExecutionStatus
|
|
218
|
+
task: task
|
|
228
219
|
}),
|
|
229
|
-
|
|
220
|
+
showTaskPlayButton && !hasSecondRowContent && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
230
221
|
taskId: task.id,
|
|
231
|
-
onTaskPlay: onTaskPlay
|
|
232
|
-
small: true
|
|
222
|
+
onTaskPlay: onTaskPlay
|
|
233
223
|
}),
|
|
234
224
|
onTaskPlay && !hasExecutionStatus && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
235
225
|
taskId: task.id,
|
|
@@ -273,7 +263,7 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTas
|
|
|
273
263
|
task: task,
|
|
274
264
|
small: true
|
|
275
265
|
}),
|
|
276
|
-
|
|
266
|
+
showTaskPlayButton && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
277
267
|
taskId: task.id,
|
|
278
268
|
onTaskPlay: onTaskPlay,
|
|
279
269
|
small: true
|