@uipath/apollo-react 6.2.0 → 6.4.0
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.types.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/TaskContent.cjs +127 -148
- package/dist/canvas/components/StageNode/TaskContent.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/TaskContent.js +131 -152
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/material/components/ap-model-picker/ModelPicker.cjs +84 -5
- package/dist/material/components/ap-model-picker/ModelPicker.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/ModelPicker.js +78 -5
- package/dist/material/components/ap-model-picker/i18n.cjs +17 -0
- package/dist/material/components/ap-model-picker/i18n.d.ts +6 -0
- package/dist/material/components/ap-model-picker/i18n.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/i18n.js +15 -1
- package/dist/material/components/ap-model-picker/locales/de.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/de.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/de.js +1 -1
- package/dist/material/components/ap-model-picker/locales/en.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/en.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/en.js +1 -1
- package/dist/material/components/ap-model-picker/locales/es-MX.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/es-MX.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/es-MX.js +1 -1
- package/dist/material/components/ap-model-picker/locales/es.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/es.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/es.js +1 -1
- package/dist/material/components/ap-model-picker/locales/fr.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/fr.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/fr.js +1 -1
- package/dist/material/components/ap-model-picker/locales/ja.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/ja.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/ja.js +1 -1
- package/dist/material/components/ap-model-picker/locales/ko.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/ko.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/ko.js +1 -1
- package/dist/material/components/ap-model-picker/locales/pt-BR.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/pt-BR.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/pt-BR.js +1 -1
- package/dist/material/components/ap-model-picker/locales/pt.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/pt.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/pt.js +1 -1
- package/dist/material/components/ap-model-picker/locales/ro.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/ro.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/ro.js +1 -1
- package/dist/material/components/ap-model-picker/locales/ru.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/ru.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/ru.js +1 -1
- package/dist/material/components/ap-model-picker/locales/tr.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/tr.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/tr.js +1 -1
- package/dist/material/components/ap-model-picker/locales/zh-CN.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/zh-CN.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/zh-CN.js +1 -1
- package/dist/material/components/ap-model-picker/locales/zh-TW.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/zh-TW.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/zh-TW.js +1 -1
- package/dist/material/components/ap-model-picker/types.d.ts +12 -2
- package/dist/material/components/ap-model-picker/types.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/utils.cjs +4 -3
- package/dist/material/components/ap-model-picker/utils.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/utils.js +4 -3
- package/package.json +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Spacing } from "@uipath/apollo-core";
|
|
3
|
+
import { 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
|
+
import { CirclePlay, Redo2, RotateCcw } from "lucide-react";
|
|
7
7
|
import { memo, useCallback, useMemo, useState } from "react";
|
|
8
8
|
import { useSafeLingui } from "../../../i18n/index.js";
|
|
9
9
|
import { CanvasTooltip } from "../CanvasTooltip.js";
|
|
10
10
|
import { ExecutionStatusIcon } from "../ExecutionStatusIcon/index.js";
|
|
11
|
-
import { StageTaskIcon
|
|
11
|
+
import { StageTaskIcon } from "./StageNode.styles.js";
|
|
12
12
|
import { StageTaskEntryConditionIcon } from "./StageTaskEntryConditionIcon.js";
|
|
13
13
|
import { useExecutionStatusLabel } from "./useExecutionStatusLabel.js";
|
|
14
14
|
const ProcessCanvasIcon = ()=>/*#__PURE__*/ jsxs("svg", {
|
|
@@ -47,7 +47,7 @@ const ProcessCanvasIcon = ()=>/*#__PURE__*/ jsxs("svg", {
|
|
|
47
47
|
})
|
|
48
48
|
]
|
|
49
49
|
});
|
|
50
|
-
const TaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay
|
|
50
|
+
const TaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay })=>{
|
|
51
51
|
const [playLoading, setPlayLoading] = useState(false);
|
|
52
52
|
const { _ } = useSafeLingui();
|
|
53
53
|
const triggerTaskLabel = _({
|
|
@@ -85,7 +85,7 @@ const TaskPlayButton = /*#__PURE__*/ memo(({ taskId, onTaskPlay, small })=>{
|
|
|
85
85
|
onMouseDown: (e)=>e.stopPropagation(),
|
|
86
86
|
onKeyDown: (e)=>e.stopPropagation(),
|
|
87
87
|
"aria-label": triggerTaskLabel,
|
|
88
|
-
className:
|
|
88
|
+
className: "task-menu-icon-button h-4 w-4 rounded-sm",
|
|
89
89
|
style: {
|
|
90
90
|
color: 'var(--canvas-icon-default)',
|
|
91
91
|
minWidth: 'unset',
|
|
@@ -101,174 +101,153 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTas
|
|
|
101
101
|
const { _ } = useSafeLingui();
|
|
102
102
|
const getStatusName = useExecutionStatusLabel();
|
|
103
103
|
const hasExecutionStatus = !!taskExecution?.status;
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
count: taskExecution.retryCount
|
|
116
|
-
}
|
|
117
|
-
});
|
|
104
|
+
const retries = taskExecution?.retryCount ?? 0;
|
|
105
|
+
const hasRuns = retries > 0;
|
|
106
|
+
const totalRuns = retries + 1;
|
|
107
|
+
const runsTooltip = taskExecution?.status === 'InProgress' ? _({
|
|
108
|
+
id: 'stage-node.task-badge.running-again',
|
|
109
|
+
message: 'Running again'
|
|
110
|
+
}) : _({
|
|
111
|
+
id: 'stage-node.task-badge.ran-n-times',
|
|
112
|
+
message: '{count, plural, one {Ran # time} other {Ran # times}}',
|
|
113
|
+
values: {
|
|
114
|
+
count: totalRuns
|
|
118
115
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
});
|
|
117
|
+
const hasRework = !!taskExecution?.retryDuration;
|
|
118
|
+
const reworkTooltip = _({
|
|
119
|
+
id: 'stage-node.task-badge.rework-time',
|
|
120
|
+
message: 'Reworked (+{duration})',
|
|
121
|
+
values: {
|
|
122
|
+
duration: taskExecution?.retryDuration ?? ''
|
|
123
|
+
}
|
|
124
|
+
});
|
|
128
125
|
const taskStatusFallbackName = hasExecutionStatus ? getStatusName(taskExecution?.status) : '';
|
|
129
126
|
const taskStatusTooltip = taskExecution?.message || taskStatusFallbackName;
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return /*#__PURE__*/ jsxs(Column, {
|
|
127
|
+
const showRequiredMarker = task.isRequired && !task.isAdhoc && 'adhoc' !== task.taskGroupType;
|
|
128
|
+
const durationLabel = taskExecution?.duration ? /*#__PURE__*/ jsx("span", {
|
|
129
|
+
className: "text-xs text-foreground-muted",
|
|
130
|
+
children: taskExecution.duration
|
|
131
|
+
}) : null;
|
|
132
|
+
return /*#__PURE__*/ jsxs(Row, {
|
|
137
133
|
flex: 1,
|
|
134
|
+
align: "center",
|
|
135
|
+
justify: "space-between",
|
|
136
|
+
gap: Spacing.SpacingXs,
|
|
138
137
|
style: {
|
|
139
|
-
overflow: 'hidden'
|
|
140
|
-
textOverflow: 'ellipsis',
|
|
141
|
-
whiteSpace: 'nowrap'
|
|
138
|
+
overflow: 'hidden'
|
|
142
139
|
},
|
|
143
|
-
gap: Padding.PadXs,
|
|
144
140
|
children: [
|
|
145
141
|
/*#__PURE__*/ jsxs(Row, {
|
|
146
|
-
align: "center",
|
|
147
|
-
justify: "space-between",
|
|
148
142
|
gap: Spacing.SpacingXs,
|
|
143
|
+
align: "center",
|
|
144
|
+
style: {
|
|
145
|
+
overflow: 'hidden',
|
|
146
|
+
textOverflow: 'ellipsis',
|
|
147
|
+
whiteSpace: 'nowrap'
|
|
148
|
+
},
|
|
149
149
|
children: [
|
|
150
|
-
/*#__PURE__*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
/*#__PURE__*/ jsx(StageTaskIcon, {
|
|
151
|
+
children: task.icon ?? /*#__PURE__*/ jsx(ProcessCanvasIcon, {})
|
|
152
|
+
}),
|
|
153
|
+
/*#__PURE__*/ jsx(CanvasTooltip, {
|
|
154
|
+
content: task.label,
|
|
155
|
+
placement: "top",
|
|
156
|
+
smartTooltip: true,
|
|
157
|
+
...isDragging && {
|
|
158
|
+
isOpen: false
|
|
157
159
|
},
|
|
158
|
-
children:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
children: /*#__PURE__*/ jsxs(Row, {
|
|
170
|
-
gap: '2px',
|
|
171
|
-
align: "center",
|
|
160
|
+
children: /*#__PURE__*/ jsxs(Row, {
|
|
161
|
+
gap: '2px',
|
|
162
|
+
align: "center",
|
|
163
|
+
style: {
|
|
164
|
+
overflow: 'hidden',
|
|
165
|
+
textOverflow: 'ellipsis',
|
|
166
|
+
whiteSpace: 'nowrap'
|
|
167
|
+
},
|
|
168
|
+
children: [
|
|
169
|
+
/*#__PURE__*/ jsx("span", {
|
|
170
|
+
className: "text-sm truncate",
|
|
172
171
|
style: {
|
|
173
|
-
|
|
174
|
-
textOverflow: 'ellipsis',
|
|
175
|
-
whiteSpace: 'nowrap'
|
|
172
|
+
minWidth: 0
|
|
176
173
|
},
|
|
177
|
-
children:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
task.isRequired && /*#__PURE__*/ jsx("span", {
|
|
186
|
-
className: "text-sm",
|
|
187
|
-
style: {
|
|
188
|
-
flexShrink: 0
|
|
189
|
-
},
|
|
190
|
-
children: '*'
|
|
191
|
-
})
|
|
192
|
-
]
|
|
193
|
-
})
|
|
194
|
-
})
|
|
195
|
-
]
|
|
196
|
-
}),
|
|
197
|
-
/*#__PURE__*/ jsxs(Row, {
|
|
198
|
-
align: "center",
|
|
199
|
-
gap: Spacing.SpacingXs,
|
|
200
|
-
style: {
|
|
201
|
-
flexShrink: 0
|
|
202
|
-
},
|
|
203
|
-
children: [
|
|
204
|
-
hasExecutionStatus && /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
205
|
-
content: taskStatusTooltip,
|
|
206
|
-
placement: "top",
|
|
207
|
-
children: /*#__PURE__*/ jsx(Button, {
|
|
208
|
-
variant: "ghost",
|
|
209
|
-
size: "icon",
|
|
210
|
-
className: "h-4 w-4 rounded-sm",
|
|
211
|
-
"aria-label": taskStatusTooltip,
|
|
212
|
-
children: /*#__PURE__*/ jsx(ExecutionStatusIcon, {
|
|
213
|
-
status: taskExecution.status
|
|
214
|
-
})
|
|
174
|
+
children: task.label
|
|
175
|
+
}),
|
|
176
|
+
showRequiredMarker && /*#__PURE__*/ jsx("span", {
|
|
177
|
+
className: "text-sm",
|
|
178
|
+
style: {
|
|
179
|
+
flexShrink: 0
|
|
180
|
+
},
|
|
181
|
+
children: '*'
|
|
215
182
|
})
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
task: task
|
|
219
|
-
}),
|
|
220
|
-
showTaskPlayButton && !hasSecondRowContent && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
221
|
-
taskId: task.id,
|
|
222
|
-
onTaskPlay: onTaskPlay
|
|
223
|
-
}),
|
|
224
|
-
onTaskPlay && !hasExecutionStatus && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
225
|
-
taskId: task.id,
|
|
226
|
-
onTaskPlay: onTaskPlay
|
|
227
|
-
})
|
|
228
|
-
]
|
|
183
|
+
]
|
|
184
|
+
})
|
|
229
185
|
})
|
|
230
186
|
]
|
|
231
187
|
}),
|
|
232
|
-
|
|
188
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
233
189
|
align: "center",
|
|
234
|
-
|
|
190
|
+
gap: Spacing.SpacingMicro,
|
|
191
|
+
style: {
|
|
192
|
+
flexShrink: 0
|
|
193
|
+
},
|
|
235
194
|
children: [
|
|
236
|
-
/*#__PURE__*/
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
195
|
+
durationLabel && (taskExecution?.durationTooltip ? /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
196
|
+
content: taskExecution.durationTooltip,
|
|
197
|
+
placement: "top",
|
|
198
|
+
hide: isDragging,
|
|
199
|
+
children: durationLabel
|
|
200
|
+
}) : durationLabel),
|
|
201
|
+
hasRuns && /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
202
|
+
content: runsTooltip,
|
|
203
|
+
placement: "top",
|
|
204
|
+
hide: isDragging,
|
|
205
|
+
children: /*#__PURE__*/ jsxs(Badge, {
|
|
206
|
+
variant: "warning",
|
|
207
|
+
role: "img",
|
|
208
|
+
"aria-label": runsTooltip,
|
|
209
|
+
className: "h-[14px] gap-px rounded-full px-1 py-0 text-[11px] leading-none [&>svg]:size-3",
|
|
210
|
+
children: [
|
|
211
|
+
/*#__PURE__*/ jsx(Redo2, {
|
|
212
|
+
"aria-hidden": true
|
|
213
|
+
}),
|
|
214
|
+
totalRuns
|
|
215
|
+
]
|
|
216
|
+
})
|
|
217
|
+
}),
|
|
218
|
+
hasRework && /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
219
|
+
content: reworkTooltip,
|
|
220
|
+
placement: "top",
|
|
221
|
+
hide: isDragging,
|
|
222
|
+
children: /*#__PURE__*/ jsx(Badge, {
|
|
223
|
+
variant: "warning",
|
|
224
|
+
role: "img",
|
|
225
|
+
"aria-label": reworkTooltip,
|
|
226
|
+
className: "h-[14px] rounded-full px-1 py-0 [&>svg]:size-3",
|
|
227
|
+
children: /*#__PURE__*/ jsx(RotateCcw, {
|
|
228
|
+
"aria-hidden": true
|
|
251
229
|
})
|
|
252
|
-
|
|
230
|
+
})
|
|
253
231
|
}),
|
|
254
|
-
/*#__PURE__*/
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
taskId: task.id,
|
|
268
|
-
onTaskPlay: onTaskPlay,
|
|
269
|
-
small: true
|
|
232
|
+
/*#__PURE__*/ jsx(StageTaskEntryConditionIcon, {
|
|
233
|
+
task: task
|
|
234
|
+
}),
|
|
235
|
+
hasExecutionStatus && /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
236
|
+
content: taskStatusTooltip,
|
|
237
|
+
placement: "top",
|
|
238
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
239
|
+
variant: "ghost",
|
|
240
|
+
size: "icon",
|
|
241
|
+
className: "h-4 w-4 rounded-sm",
|
|
242
|
+
"aria-label": taskStatusTooltip,
|
|
243
|
+
children: /*#__PURE__*/ jsx(ExecutionStatusIcon, {
|
|
244
|
+
status: taskExecution.status
|
|
270
245
|
})
|
|
271
|
-
|
|
246
|
+
})
|
|
247
|
+
}),
|
|
248
|
+
onTaskPlay && /*#__PURE__*/ jsx(TaskPlayButton, {
|
|
249
|
+
taskId: task.id,
|
|
250
|
+
onTaskPlay: onTaskPlay
|
|
272
251
|
})
|
|
273
252
|
]
|
|
274
253
|
})
|