@uipath/apollo-react 6.22.0 → 6.22.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/StageNode/StageNodeHeader.cjs +10 -5
- package/dist/canvas/components/StageNode/StageNodeHeader.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeHeader.js +11 -6
- package/dist/canvas/components/StageNode/formatDuration.cjs +18 -2
- package/dist/canvas/components/StageNode/formatDuration.d.ts +2 -0
- package/dist/canvas/components/StageNode/formatDuration.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/formatDuration.js +11 -1
- package/dist/canvas/components/StageNode/rules/StageRuleContent.cjs +5 -14
- package/dist/canvas/components/StageNode/rules/StageRuleContent.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/rules/StageRuleContent.js +5 -14
- package/dist/canvas/components/StageNode/shared/CollapsibleStageHeader.cjs +5 -14
- package/dist/canvas/components/StageNode/shared/CollapsibleStageHeader.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/shared/CollapsibleStageHeader.js +5 -14
- package/dist/canvas/components/StageNode/tasks/TaskContent.cjs +29 -28
- package/dist/canvas/components/StageNode/tasks/TaskContent.js +30 -29
- package/dist/canvas/layouts/Stack.cjs +22 -6
- package/dist/canvas/layouts/Stack.d.ts +3 -4
- package/dist/canvas/layouts/Stack.d.ts.map +1 -1
- package/dist/canvas/layouts/Stack.js +13 -7
- package/dist/test/durations.d.ts +6 -0
- package/dist/test/durations.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -31,10 +31,10 @@ const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
|
31
31
|
const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
32
32
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
33
33
|
const external_react_namespaceObject = require("react");
|
|
34
|
+
const external_i18n_index_cjs_namespaceObject = require("../../../i18n/index.cjs");
|
|
34
35
|
const external_icons_index_cjs_namespaceObject = require("../../../icons/index.cjs");
|
|
35
36
|
const external_icons_index_cjs_namespaceObject_1 = require("../../icons/index.cjs");
|
|
36
37
|
const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
|
|
37
|
-
const external_i18n_index_cjs_namespaceObject = require("../../../i18n/index.cjs");
|
|
38
38
|
const external_CanvasTooltip_cjs_namespaceObject = require("../CanvasTooltip.cjs");
|
|
39
39
|
const external_ExecutionStatusIcon_index_cjs_namespaceObject = require("../ExecutionStatusIcon/index.cjs");
|
|
40
40
|
const ExecutionStatusIcon_cjs_namespaceObject = require("../ExecutionStatusIcon/ExecutionStatusIcon.cjs");
|
|
@@ -122,6 +122,7 @@ const StageNodeHeaderInner = ({ props, isReadOnly, isException, status, handleTa
|
|
|
122
122
|
const formattedStageDuration = void 0 !== stageDurationMs ? (0, external_formatDuration_cjs_namespaceObject.formatDurationMs)(stageDurationMs, locale) : execution?.stageStatus?.duration;
|
|
123
123
|
const stageDurationLabel = execution?.stageStatus?.durationLabel;
|
|
124
124
|
const stageDuration = formattedStageDuration && stageDurationLabel ? `${stageDurationLabel} ${formattedStageDuration}` : formattedStageDuration;
|
|
125
|
+
const exactStageDuration = void 0 !== stageDurationMs && (0, external_formatDuration_cjs_namespaceObject.hasHiddenDurationParts)(stageDurationMs) ? (0, external_formatDuration_cjs_namespaceObject.formatExactDurationMs)(stageDurationMs, locale) : void 0;
|
|
125
126
|
const slaText = execution?.stageStatus?.slaText;
|
|
126
127
|
const slaIcon = execution?.stageStatus?.slaIcon;
|
|
127
128
|
const slaIndicator = slaIcon ? SLA_ICON_CONFIG[slaIcon] : void 0;
|
|
@@ -252,10 +253,14 @@ const StageNodeHeaderInner = ({ props, isReadOnly, isException, status, handleTa
|
|
|
252
253
|
})
|
|
253
254
|
]
|
|
254
255
|
}),
|
|
255
|
-
stageDuration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
256
|
-
|
|
257
|
-
"
|
|
258
|
-
children:
|
|
256
|
+
stageDuration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
257
|
+
content: exactStageDuration,
|
|
258
|
+
placement: "top",
|
|
259
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
260
|
+
className: "flex min-h-8 items-center text-xs text-foreground-muted",
|
|
261
|
+
"data-testid": `stage-duration-${id}`,
|
|
262
|
+
children: stageDuration
|
|
263
|
+
})
|
|
259
264
|
})
|
|
260
265
|
]
|
|
261
266
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNodeHeader.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeHeader.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAgB,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"StageNodeHeader.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNodeHeader.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAgB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoSnF,eAAO,MAAM,eAAe,wGAtLzB;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACvD,6CAgLwD,CAAC"}
|
|
@@ -3,14 +3,14 @@ import { Icon, Padding, Spacing } from "@uipath/apollo-core";
|
|
|
3
3
|
import { Row } from "../../layouts/index.js";
|
|
4
4
|
import { Button } from "@uipath/apollo-wind";
|
|
5
5
|
import { memo } from "react";
|
|
6
|
+
import { useSafeLingui } from "../../../i18n/index.js";
|
|
6
7
|
import { ChecklistIcon } from "../../../icons/index.js";
|
|
7
8
|
import { EntryConditionIcon, ExitConditionIcon, ReturnToOriginIcon } from "../../icons/index.js";
|
|
8
9
|
import { CanvasIcon } from "../../utils/icon-registry.js";
|
|
9
|
-
import { useSafeLingui } from "../../../i18n/index.js";
|
|
10
10
|
import { CanvasTooltip } from "../CanvasTooltip.js";
|
|
11
11
|
import { ExecutionStatusIcon } from "../ExecutionStatusIcon/index.js";
|
|
12
12
|
import { getExecutionStatusColor } from "../ExecutionStatusIcon/ExecutionStatusIcon.js";
|
|
13
|
-
import { formatDurationMs } from "./formatDuration.js";
|
|
13
|
+
import { formatDurationMs, formatExactDurationMs, hasHiddenDurationParts } from "./formatDuration.js";
|
|
14
14
|
import { StageChip, StageHeader } from "./StageNode.styles.js";
|
|
15
15
|
import { StageHeaderChipType } from "./StageNode.types.js";
|
|
16
16
|
import { StageTitleInput } from "./StageTitleInput.js";
|
|
@@ -94,6 +94,7 @@ const StageNodeHeaderInner = ({ props, isReadOnly, isException, status, handleTa
|
|
|
94
94
|
const formattedStageDuration = void 0 !== stageDurationMs ? formatDurationMs(stageDurationMs, locale) : execution?.stageStatus?.duration;
|
|
95
95
|
const stageDurationLabel = execution?.stageStatus?.durationLabel;
|
|
96
96
|
const stageDuration = formattedStageDuration && stageDurationLabel ? `${stageDurationLabel} ${formattedStageDuration}` : formattedStageDuration;
|
|
97
|
+
const exactStageDuration = void 0 !== stageDurationMs && hasHiddenDurationParts(stageDurationMs) ? formatExactDurationMs(stageDurationMs, locale) : void 0;
|
|
97
98
|
const slaText = execution?.stageStatus?.slaText;
|
|
98
99
|
const slaIcon = execution?.stageStatus?.slaIcon;
|
|
99
100
|
const slaIndicator = slaIcon ? SLA_ICON_CONFIG[slaIcon] : void 0;
|
|
@@ -224,10 +225,14 @@ const StageNodeHeaderInner = ({ props, isReadOnly, isException, status, handleTa
|
|
|
224
225
|
})
|
|
225
226
|
]
|
|
226
227
|
}),
|
|
227
|
-
stageDuration && /*#__PURE__*/ jsx(
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
children:
|
|
228
|
+
stageDuration && /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
229
|
+
content: exactStageDuration,
|
|
230
|
+
placement: "top",
|
|
231
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
232
|
+
className: "flex min-h-8 items-center text-xs text-foreground-muted",
|
|
233
|
+
"data-testid": `stage-duration-${id}`,
|
|
234
|
+
children: stageDuration
|
|
235
|
+
})
|
|
231
236
|
})
|
|
232
237
|
]
|
|
233
238
|
});
|
|
@@ -24,7 +24,9 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
27
|
+
hasHiddenDurationParts: ()=>hasHiddenDurationParts,
|
|
28
|
+
formatDurationMs: ()=>formatDurationMs,
|
|
29
|
+
formatExactDurationMs: ()=>formatExactDurationMs
|
|
28
30
|
});
|
|
29
31
|
const external_luxon_namespaceObject = require("luxon");
|
|
30
32
|
const UNITS = [
|
|
@@ -58,9 +60,23 @@ function formatDurationMs(ms, locale = 'en', maxUnits = 3, unitDisplay = 'narrow
|
|
|
58
60
|
unitDisplay
|
|
59
61
|
});
|
|
60
62
|
}
|
|
63
|
+
function formatExactDurationMs(ms, locale = 'en') {
|
|
64
|
+
return formatDurationMs(ms, locale, UNITS.length, 'long');
|
|
65
|
+
}
|
|
66
|
+
function hasHiddenDurationParts(ms, maxUnits = 3) {
|
|
67
|
+
if (!Number.isFinite(ms) || ms <= 0) return false;
|
|
68
|
+
const parts = external_luxon_namespaceObject.Duration.fromMillis(ms).shiftTo(...UNITS).toObject();
|
|
69
|
+
let wholeParts = 0;
|
|
70
|
+
for (const unit of UNITS)if ((parts[unit] ?? 0) >= 1) wholeParts++;
|
|
71
|
+
return wholeParts > maxUnits;
|
|
72
|
+
}
|
|
61
73
|
exports.formatDurationMs = __webpack_exports__.formatDurationMs;
|
|
74
|
+
exports.formatExactDurationMs = __webpack_exports__.formatExactDurationMs;
|
|
75
|
+
exports.hasHiddenDurationParts = __webpack_exports__.hasHiddenDurationParts;
|
|
62
76
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
63
|
-
"formatDurationMs"
|
|
77
|
+
"formatDurationMs",
|
|
78
|
+
"formatExactDurationMs",
|
|
79
|
+
"hasHiddenDurationParts"
|
|
64
80
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
65
81
|
Object.defineProperty(exports, '__esModule', {
|
|
66
82
|
value: true
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare function formatDurationMs(ms: number, locale?: string, maxUnits?: number, unitDisplay?: 'narrow' | 'short' | 'long'): string;
|
|
2
|
+
export declare function formatExactDurationMs(ms: number, locale?: string): string;
|
|
3
|
+
export declare function hasHiddenDurationParts(ms: number, maxUnits?: number): boolean;
|
|
2
4
|
//# sourceMappingURL=formatDuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatDuration.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/formatDuration.ts"],"names":[],"mappings":"AAyBA,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,MAAM,SAAO,EACb,QAAQ,SAAI,EACZ,WAAW,GAAE,QAAQ,GAAG,OAAO,GAAG,MAAiB,GAClD,MAAM,CAsCR"}
|
|
1
|
+
{"version":3,"file":"formatDuration.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/formatDuration.ts"],"names":[],"mappings":"AAyBA,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,MAAM,SAAO,EACb,QAAQ,SAAI,EACZ,WAAW,GAAE,QAAQ,GAAG,OAAO,GAAG,MAAiB,GAClD,MAAM,CAsCR;AAMD,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAEvE;AAOD,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,SAAI,GAAG,OAAO,CAiBxE"}
|
|
@@ -30,4 +30,14 @@ function formatDurationMs(ms, locale = 'en', maxUnits = 3, unitDisplay = 'narrow
|
|
|
30
30
|
unitDisplay
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
function formatExactDurationMs(ms, locale = 'en') {
|
|
34
|
+
return formatDurationMs(ms, locale, UNITS.length, 'long');
|
|
35
|
+
}
|
|
36
|
+
function hasHiddenDurationParts(ms, maxUnits = 3) {
|
|
37
|
+
if (!Number.isFinite(ms) || ms <= 0) return false;
|
|
38
|
+
const parts = Duration.fromMillis(ms).shiftTo(...UNITS).toObject();
|
|
39
|
+
let wholeParts = 0;
|
|
40
|
+
for (const unit of UNITS)if ((parts[unit] ?? 0) >= 1) wholeParts++;
|
|
41
|
+
return wholeParts > maxUnits;
|
|
42
|
+
}
|
|
43
|
+
export { formatDurationMs, formatExactDurationMs, hasHiddenDurationParts };
|
|
@@ -69,22 +69,13 @@ const StageRuleContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(
|
|
|
69
69
|
content: rule.label,
|
|
70
70
|
placement: "top",
|
|
71
71
|
smartTooltip: true,
|
|
72
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
73
|
+
"data-testid": `stage-rule-label-${rule.id}`,
|
|
74
|
+
className: "text-sm truncate",
|
|
75
75
|
style: {
|
|
76
|
-
|
|
77
|
-
textOverflow: 'ellipsis',
|
|
78
|
-
whiteSpace: 'nowrap'
|
|
76
|
+
minWidth: 0
|
|
79
77
|
},
|
|
80
|
-
children:
|
|
81
|
-
"data-testid": `stage-rule-label-${rule.id}`,
|
|
82
|
-
className: "text-sm truncate",
|
|
83
|
-
style: {
|
|
84
|
-
minWidth: 0
|
|
85
|
-
},
|
|
86
|
-
children: rule.label
|
|
87
|
-
})
|
|
78
|
+
children: rule.label
|
|
88
79
|
})
|
|
89
80
|
})
|
|
90
81
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageRuleContent.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/StageNode/rules/StageRuleContent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,2DAA6B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"StageRuleContent.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/StageNode/rules/StageRuleContent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,2DAA6B,qBAAqB,6CAkC7E,CAAC"}
|
|
@@ -41,22 +41,13 @@ const StageRuleContent = /*#__PURE__*/ memo(({ rule, ruleType })=>{
|
|
|
41
41
|
content: rule.label,
|
|
42
42
|
placement: "top",
|
|
43
43
|
smartTooltip: true,
|
|
44
|
-
children: /*#__PURE__*/ jsx(
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
45
|
+
"data-testid": `stage-rule-label-${rule.id}`,
|
|
46
|
+
className: "text-sm truncate",
|
|
47
47
|
style: {
|
|
48
|
-
|
|
49
|
-
textOverflow: 'ellipsis',
|
|
50
|
-
whiteSpace: 'nowrap'
|
|
48
|
+
minWidth: 0
|
|
51
49
|
},
|
|
52
|
-
children:
|
|
53
|
-
"data-testid": `stage-rule-label-${rule.id}`,
|
|
54
|
-
className: "text-sm truncate",
|
|
55
|
-
style: {
|
|
56
|
-
minWidth: 0
|
|
57
|
-
},
|
|
58
|
-
children: rule.label
|
|
59
|
-
})
|
|
50
|
+
children: rule.label
|
|
60
51
|
})
|
|
61
52
|
})
|
|
62
53
|
]
|
|
@@ -96,22 +96,13 @@ const CollapsibleStageHeader = ({ isOpen, label, testId, children, onToggle })=>
|
|
|
96
96
|
content: label,
|
|
97
97
|
placement: "top",
|
|
98
98
|
smartTooltip: true,
|
|
99
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
100
|
+
"data-testid": `${testId}-label`,
|
|
101
|
+
className: "text-sm truncate",
|
|
102
102
|
style: {
|
|
103
|
-
|
|
104
|
-
textOverflow: 'ellipsis',
|
|
105
|
-
whiteSpace: 'nowrap'
|
|
103
|
+
minWidth: 0
|
|
106
104
|
},
|
|
107
|
-
children:
|
|
108
|
-
"data-testid": `${testId}-label`,
|
|
109
|
-
className: "text-sm truncate",
|
|
110
|
-
style: {
|
|
111
|
-
minWidth: 0
|
|
112
|
-
},
|
|
113
|
-
children: label
|
|
114
|
-
})
|
|
105
|
+
children: label
|
|
115
106
|
})
|
|
116
107
|
})
|
|
117
108
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleStageHeader.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/StageNode/shared/CollapsibleStageHeader.tsx"],"names":[],"mappings":"AAuBA,UAAU,2BAA2B;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,GAAI,gDAMpC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"CollapsibleStageHeader.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/StageNode/shared/CollapsibleStageHeader.tsx"],"names":[],"mappings":"AAuBA,UAAU,2BAA2B;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,GAAI,gDAMpC,2BAA2B,4CAkD7B,CAAC"}
|
|
@@ -58,22 +58,13 @@ const CollapsibleStageHeader = ({ isOpen, label, testId, children, onToggle })=>
|
|
|
58
58
|
content: label,
|
|
59
59
|
placement: "top",
|
|
60
60
|
smartTooltip: true,
|
|
61
|
-
children: /*#__PURE__*/ jsx(
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
62
|
+
"data-testid": `${testId}-label`,
|
|
63
|
+
className: "text-sm truncate",
|
|
64
64
|
style: {
|
|
65
|
-
|
|
66
|
-
textOverflow: 'ellipsis',
|
|
67
|
-
whiteSpace: 'nowrap'
|
|
65
|
+
minWidth: 0
|
|
68
66
|
},
|
|
69
|
-
children:
|
|
70
|
-
"data-testid": `${testId}-label`,
|
|
71
|
-
className: "text-sm truncate",
|
|
72
|
-
style: {
|
|
73
|
-
minWidth: 0
|
|
74
|
-
},
|
|
75
|
-
children: label
|
|
76
|
-
})
|
|
67
|
+
children: label
|
|
77
68
|
})
|
|
78
69
|
})
|
|
79
70
|
]
|
|
@@ -170,6 +170,8 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
170
170
|
className: "text-xs text-foreground-muted",
|
|
171
171
|
children: durationText
|
|
172
172
|
}) : null;
|
|
173
|
+
const exactDuration = taskExecution?.durationMs !== void 0 && (0, external_formatDuration_cjs_namespaceObject.hasHiddenDurationParts)(taskExecution.durationMs) ? (0, external_formatDuration_cjs_namespaceObject.formatExactDurationMs)(taskExecution.durationMs, locale) : void 0;
|
|
174
|
+
const durationTooltip = taskExecution?.durationTooltip || exactDuration;
|
|
173
175
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
174
176
|
flex: 1,
|
|
175
177
|
align: "center",
|
|
@@ -205,40 +207,39 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
205
207
|
})
|
|
206
208
|
]
|
|
207
209
|
}),
|
|
208
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
211
|
+
gap: '2px',
|
|
212
|
+
align: "center",
|
|
213
|
+
style: {
|
|
214
|
+
overflow: 'hidden',
|
|
215
|
+
whiteSpace: 'nowrap'
|
|
214
216
|
},
|
|
215
|
-
children:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
217
|
+
children: [
|
|
218
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
219
|
+
content: task.label,
|
|
220
|
+
placement: "top",
|
|
221
|
+
smartTooltip: true,
|
|
222
|
+
...isDragging && {
|
|
223
|
+
isOpen: false
|
|
224
|
+
},
|
|
225
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
225
226
|
"data-testid": `stage-task-label-${task.id}`,
|
|
226
227
|
className: "text-sm truncate",
|
|
227
228
|
style: {
|
|
228
229
|
minWidth: 0
|
|
229
230
|
},
|
|
230
231
|
children: task.label
|
|
231
|
-
}),
|
|
232
|
-
showRequiredMarker && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
233
|
-
"data-testid": `stage-task-required-marker-${task.id}`,
|
|
234
|
-
className: "text-sm",
|
|
235
|
-
style: {
|
|
236
|
-
flexShrink: 0
|
|
237
|
-
},
|
|
238
|
-
children: '*'
|
|
239
232
|
})
|
|
240
|
-
|
|
241
|
-
|
|
233
|
+
}),
|
|
234
|
+
showRequiredMarker && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
235
|
+
"data-testid": `stage-task-required-marker-${task.id}`,
|
|
236
|
+
className: "text-sm",
|
|
237
|
+
style: {
|
|
238
|
+
flexShrink: 0
|
|
239
|
+
},
|
|
240
|
+
children: '*'
|
|
241
|
+
})
|
|
242
|
+
]
|
|
242
243
|
})
|
|
243
244
|
]
|
|
244
245
|
}),
|
|
@@ -250,8 +251,8 @@ const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ ta
|
|
|
250
251
|
},
|
|
251
252
|
"data-testid": `stage-task-actions-${task.id}`,
|
|
252
253
|
children: [
|
|
253
|
-
durationLabel && (
|
|
254
|
-
content:
|
|
254
|
+
durationLabel && (durationTooltip ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
255
|
+
content: durationTooltip,
|
|
255
256
|
placement: "top",
|
|
256
257
|
hide: isDragging,
|
|
257
258
|
children: durationLabel
|
|
@@ -8,7 +8,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 { formatDurationMs } from "../formatDuration.js";
|
|
11
|
+
import { formatDurationMs, formatExactDurationMs, hasHiddenDurationParts } from "../formatDuration.js";
|
|
12
12
|
import { StageItemIcon } from "../StageNode.styles.js";
|
|
13
13
|
import { useExecutionStatusLabel } from "../useExecutionStatusLabel.js";
|
|
14
14
|
import { StageTaskEntryConditionIcon } from "./StageTaskEntryConditionIcon.js";
|
|
@@ -132,6 +132,8 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTas
|
|
|
132
132
|
className: "text-xs text-foreground-muted",
|
|
133
133
|
children: durationText
|
|
134
134
|
}) : null;
|
|
135
|
+
const exactDuration = taskExecution?.durationMs !== void 0 && hasHiddenDurationParts(taskExecution.durationMs) ? formatExactDurationMs(taskExecution.durationMs, locale) : void 0;
|
|
136
|
+
const durationTooltip = taskExecution?.durationTooltip || exactDuration;
|
|
135
137
|
return /*#__PURE__*/ jsxs(Row, {
|
|
136
138
|
flex: 1,
|
|
137
139
|
align: "center",
|
|
@@ -167,40 +169,39 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTas
|
|
|
167
169
|
})
|
|
168
170
|
]
|
|
169
171
|
}),
|
|
170
|
-
/*#__PURE__*/
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
/*#__PURE__*/ jsxs(Row, {
|
|
173
|
+
gap: '2px',
|
|
174
|
+
align: "center",
|
|
175
|
+
style: {
|
|
176
|
+
overflow: 'hidden',
|
|
177
|
+
whiteSpace: 'nowrap'
|
|
176
178
|
},
|
|
177
|
-
children:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
/*#__PURE__*/ jsx("span", {
|
|
179
|
+
children: [
|
|
180
|
+
/*#__PURE__*/ jsx(CanvasTooltip, {
|
|
181
|
+
content: task.label,
|
|
182
|
+
placement: "top",
|
|
183
|
+
smartTooltip: true,
|
|
184
|
+
...isDragging && {
|
|
185
|
+
isOpen: false
|
|
186
|
+
},
|
|
187
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
187
188
|
"data-testid": `stage-task-label-${task.id}`,
|
|
188
189
|
className: "text-sm truncate",
|
|
189
190
|
style: {
|
|
190
191
|
minWidth: 0
|
|
191
192
|
},
|
|
192
193
|
children: task.label
|
|
193
|
-
}),
|
|
194
|
-
showRequiredMarker && /*#__PURE__*/ jsx("span", {
|
|
195
|
-
"data-testid": `stage-task-required-marker-${task.id}`,
|
|
196
|
-
className: "text-sm",
|
|
197
|
-
style: {
|
|
198
|
-
flexShrink: 0
|
|
199
|
-
},
|
|
200
|
-
children: '*'
|
|
201
194
|
})
|
|
202
|
-
|
|
203
|
-
|
|
195
|
+
}),
|
|
196
|
+
showRequiredMarker && /*#__PURE__*/ jsx("span", {
|
|
197
|
+
"data-testid": `stage-task-required-marker-${task.id}`,
|
|
198
|
+
className: "text-sm",
|
|
199
|
+
style: {
|
|
200
|
+
flexShrink: 0
|
|
201
|
+
},
|
|
202
|
+
children: '*'
|
|
203
|
+
})
|
|
204
|
+
]
|
|
204
205
|
})
|
|
205
206
|
]
|
|
206
207
|
}),
|
|
@@ -212,8 +213,8 @@ const TaskContent = /*#__PURE__*/ memo(({ task, taskExecution, isDragging, onTas
|
|
|
212
213
|
},
|
|
213
214
|
"data-testid": `stage-task-actions-${task.id}`,
|
|
214
215
|
children: [
|
|
215
|
-
durationLabel && (
|
|
216
|
-
content:
|
|
216
|
+
durationLabel && (durationTooltip ? /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
217
|
+
content: durationTooltip,
|
|
217
218
|
placement: "top",
|
|
218
219
|
hide: isDragging,
|
|
219
220
|
children: durationLabel
|
|
@@ -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, {
|
|
@@ -29,8 +38,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
38
|
});
|
|
30
39
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
40
|
const external_react_namespaceObject = require("react");
|
|
41
|
+
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
32
42
|
const external_core_cjs_namespaceObject = require("./core.cjs");
|
|
33
|
-
const Stack = ({ children, className, style, direction = 'row', align, justify, wrap, gap, flex, w, h, maxW, minW, maxH, minH, overflow, overflowX, overflowY, position, p, pt, pb, pl, pr, px, py, m, mt, mb, ml, mr, mx, my, ...htmlProps })=>{
|
|
43
|
+
const Stack = /*#__PURE__*/ external_react_default().forwardRef(({ children, className, style, direction = 'row', align, justify, wrap, gap, flex, w, h, maxW, minW, maxH, minH, overflow, overflowX, overflowY, position, p, pt, pb, pl, pr, px, py, m, mt, mb, ml, mr, mx, my, ...htmlProps }, ref)=>{
|
|
34
44
|
const dynamicStyle = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
35
45
|
display: 'flex',
|
|
36
46
|
flexDirection: direction,
|
|
@@ -168,20 +178,26 @@ const Stack = ({ children, className, style, direction = 'row', align, justify,
|
|
|
168
178
|
style
|
|
169
179
|
]);
|
|
170
180
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
181
|
+
ref: ref,
|
|
171
182
|
className: className,
|
|
172
183
|
style: dynamicStyle,
|
|
173
184
|
...htmlProps,
|
|
174
185
|
children: children
|
|
175
186
|
});
|
|
176
|
-
};
|
|
177
|
-
|
|
187
|
+
});
|
|
188
|
+
Stack.displayName = 'Stack';
|
|
189
|
+
const Row = /*#__PURE__*/ external_react_default().forwardRef((props, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Stack, {
|
|
190
|
+
ref: ref,
|
|
178
191
|
direction: "row",
|
|
179
192
|
...props
|
|
180
|
-
});
|
|
181
|
-
|
|
193
|
+
}));
|
|
194
|
+
Row.displayName = 'Row';
|
|
195
|
+
const Column = /*#__PURE__*/ external_react_default().forwardRef((props, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Stack, {
|
|
196
|
+
ref: ref,
|
|
182
197
|
direction: "column",
|
|
183
198
|
...props
|
|
184
|
-
});
|
|
199
|
+
}));
|
|
200
|
+
Column.displayName = 'Column';
|
|
185
201
|
exports.Column = __webpack_exports__.Column;
|
|
186
202
|
exports.Row = __webpack_exports__.Row;
|
|
187
203
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { FlexProps, OverflowProps, PositionProps, SizeProps, SpacingProps } from './core';
|
|
3
|
-
|
|
4
|
-
declare const
|
|
5
|
-
declare const Column: React.FC<StackProps>;
|
|
3
|
+
declare const Row: React.ForwardRefExoticComponent<FlexProps & OverflowProps & PositionProps & React.HTMLAttributes<HTMLDivElement> & SizeProps & SpacingProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const Column: React.ForwardRefExoticComponent<FlexProps & OverflowProps & PositionProps & React.HTMLAttributes<HTMLDivElement> & SizeProps & SpacingProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
5
|
export { Row, Column };
|
|
7
6
|
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/canvas/layouts/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/canvas/layouts/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAyJ/F,QAAA,MAAM,GAAG,oLAEP,CAAC;AAGH,QAAA,MAAM,MAAM,oLAEV,CAAC;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
2
|
+
import react, { useMemo } from "react";
|
|
3
3
|
import { alignMap, calcSpacingPx, justifyMap } from "./core.js";
|
|
4
|
-
const Stack = ({ children, className, style, direction = 'row', align, justify, wrap, gap, flex, w, h, maxW, minW, maxH, minH, overflow, overflowX, overflowY, position, p, pt, pb, pl, pr, px, py, m, mt, mb, ml, mr, mx, my, ...htmlProps })=>{
|
|
4
|
+
const Stack = /*#__PURE__*/ react.forwardRef(({ children, className, style, direction = 'row', align, justify, wrap, gap, flex, w, h, maxW, minW, maxH, minH, overflow, overflowX, overflowY, position, p, pt, pb, pl, pr, px, py, m, mt, mb, ml, mr, mx, my, ...htmlProps }, ref)=>{
|
|
5
5
|
const dynamicStyle = useMemo(()=>({
|
|
6
6
|
display: 'flex',
|
|
7
7
|
flexDirection: direction,
|
|
@@ -139,18 +139,24 @@ const Stack = ({ children, className, style, direction = 'row', align, justify,
|
|
|
139
139
|
style
|
|
140
140
|
]);
|
|
141
141
|
return /*#__PURE__*/ jsx("div", {
|
|
142
|
+
ref: ref,
|
|
142
143
|
className: className,
|
|
143
144
|
style: dynamicStyle,
|
|
144
145
|
...htmlProps,
|
|
145
146
|
children: children
|
|
146
147
|
});
|
|
147
|
-
};
|
|
148
|
-
|
|
148
|
+
});
|
|
149
|
+
Stack.displayName = 'Stack';
|
|
150
|
+
const Row = /*#__PURE__*/ react.forwardRef((props, ref)=>/*#__PURE__*/ jsx(Stack, {
|
|
151
|
+
ref: ref,
|
|
149
152
|
direction: "row",
|
|
150
153
|
...props
|
|
151
|
-
});
|
|
152
|
-
|
|
154
|
+
}));
|
|
155
|
+
Row.displayName = 'Row';
|
|
156
|
+
const Column = /*#__PURE__*/ react.forwardRef((props, ref)=>/*#__PURE__*/ jsx(Stack, {
|
|
157
|
+
ref: ref,
|
|
153
158
|
direction: "column",
|
|
154
159
|
...props
|
|
155
|
-
});
|
|
160
|
+
}));
|
|
161
|
+
Column.displayName = 'Column';
|
|
156
162
|
export { Column, Row };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durations.d.ts","sourceRoot":"","sources":["../../src/test/durations.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,OAAO,CAAC;AAC3B,eAAO,MAAM,MAAM,QAAc,CAAC;AAClC,eAAO,MAAM,IAAI,QAAc,CAAC;AAChC,eAAO,MAAM,GAAG,QAAY,CAAC;AAC7B,eAAO,MAAM,IAAI,QAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "6.22.
|
|
3
|
+
"version": "6.22.1",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -220,8 +220,8 @@
|
|
|
220
220
|
"use-sync-external-store": "^1.2.0",
|
|
221
221
|
"zod": "^4.3.5",
|
|
222
222
|
"zustand": "^5.0.9",
|
|
223
|
-
"@uipath/apollo-
|
|
224
|
-
"@uipath/apollo-
|
|
223
|
+
"@uipath/apollo-wind": "2.33.2",
|
|
224
|
+
"@uipath/apollo-core": "5.12.1"
|
|
225
225
|
},
|
|
226
226
|
"devDependencies": {
|
|
227
227
|
"@lingui/cli": "^5.6.1",
|