@uipath/apollo-react 4.65.1 → 5.0.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/AddNodePanel/AddNodeManager.helpers.cjs +2 -2
- package/dist/canvas/components/AddNodePanel/AddNodeManager.helpers.js +1 -1
- package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.cjs +11 -2
- package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.d.ts.map +1 -1
- package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.js +11 -2
- package/dist/canvas/hooks/useCanvasNodeLayout.cjs +2 -2
- package/dist/canvas/hooks/useCanvasNodeLayout.js +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/canvas/utils/index.cjs +5 -5
- package/dist/canvas/utils/index.d.ts +1 -1
- package/dist/canvas/utils/index.d.ts.map +1 -1
- package/dist/canvas/utils/index.js +1 -1
- package/dist/canvas/utils/manifest-resolver.cjs +3 -7
- package/dist/canvas/utils/manifest-resolver.d.ts.map +1 -1
- package/dist/canvas/utils/manifest-resolver.js +1 -5
- package/dist/canvas/utils/{collapse.cjs → node-size.cjs} +1 -16
- package/dist/canvas/utils/node-size.d.ts +8 -0
- package/dist/canvas/utils/node-size.d.ts.map +1 -0
- package/dist/canvas/utils/{collapse.js → node-size.js} +1 -7
- package/package.json +1 -1
- package/dist/canvas/utils/collapse.d.ts +0 -14
- package/dist/canvas/utils/collapse.d.ts.map +0 -1
|
@@ -31,7 +31,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
31
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
32
32
|
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
33
33
|
const index_cjs_namespaceObject = require("../../utils/index.cjs");
|
|
34
|
-
const
|
|
34
|
+
const node_size_cjs_namespaceObject = require("../../utils/node-size.cjs");
|
|
35
35
|
const container_cjs_namespaceObject = require("../../utils/container.cjs");
|
|
36
36
|
const NodeUtils_cjs_namespaceObject = require("../../utils/NodeUtils.cjs");
|
|
37
37
|
const TOP_LEVEL_INSERTION_GAP_PX = 5 * external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
@@ -45,7 +45,7 @@ function getPrimaryPreviewHandlePosition(previewNode, previewConnections) {
|
|
|
45
45
|
}
|
|
46
46
|
function alignNodeToPreview(node, previewNode, previewConnections, nodeManifest) {
|
|
47
47
|
const previewSize = (0, container_cjs_namespaceObject.getNodeDimensions)(previewNode);
|
|
48
|
-
const nodeSize = (0, container_cjs_namespaceObject.getNodeDimensions)(node, (0,
|
|
48
|
+
const nodeSize = (0, container_cjs_namespaceObject.getNodeDimensions)(node, (0, node_size_cjs_namespaceObject.getExpandedSize)(nodeManifest?.display.shape));
|
|
49
49
|
if (previewSize.width === nodeSize.width && previewSize.height === nodeSize.height) return node;
|
|
50
50
|
const previewHandlePosition = getPrimaryPreviewHandlePosition(previewNode, previewConnections);
|
|
51
51
|
const previewCenterX = previewNode.position.x + previewSize.width / 2;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Position } from "../../xyflow/react.js";
|
|
2
2
|
import { GRID_SPACING } from "../../constants.js";
|
|
3
3
|
import { resolveCollisions } from "../../utils/index.js";
|
|
4
|
-
import { getExpandedSize } from "../../utils/
|
|
4
|
+
import { getExpandedSize } from "../../utils/node-size.js";
|
|
5
5
|
import { CONTAINER_SEQUENCE_GAP_PX, collectLinearDownstreamSiblings, fitContainersAndPushSiblings, getContainerPlacement, getContainerSafeArea, getNodeDimensions as container_js_getNodeDimensions, placeContainerNode } from "../../utils/container.js";
|
|
6
6
|
import { snapUpToGrid } from "../../utils/NodeUtils.js";
|
|
7
7
|
const TOP_LEVEL_INSERTION_GAP_PX = 5 * GRID_SPACING;
|
|
@@ -30,13 +30,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
31
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
|
+
const index_cjs_namespaceObject = require("../../../i18n/index.cjs");
|
|
33
34
|
const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
|
|
34
35
|
function getExecutionStatusColor(status) {
|
|
35
36
|
switch(status){
|
|
36
37
|
case 'NotExecuted':
|
|
37
38
|
return 'var(--color-foreground-de-emp)';
|
|
38
39
|
case 'InProgress':
|
|
39
|
-
return 'var(--color-
|
|
40
|
+
return 'var(--color-primary)';
|
|
40
41
|
case 'Completed':
|
|
41
42
|
return 'var(--color-success-icon)';
|
|
42
43
|
case 'ActionNeeded':
|
|
@@ -72,13 +73,20 @@ function getExecutionStatusColor(status) {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
function ExecutionStatusIcon({ status, size = 16 }) {
|
|
76
|
+
const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
|
|
75
77
|
return (0, external_react_namespaceObject.useMemo)(()=>{
|
|
76
78
|
const color = getExecutionStatusColor(status);
|
|
77
79
|
switch(status){
|
|
78
80
|
case 'InProgress':
|
|
79
81
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Spinner, {
|
|
80
82
|
size: "sm",
|
|
83
|
+
label: _({
|
|
84
|
+
id: 'stage-node.status.in-progress',
|
|
85
|
+
message: 'In progress'
|
|
86
|
+
}),
|
|
87
|
+
className: "[&>svg]:text-[color:var(--spinner-color)] [&>svg]:[stroke-width:3]",
|
|
81
88
|
style: {
|
|
89
|
+
'--spinner-color': color,
|
|
82
90
|
backgroundColor: 'transparent',
|
|
83
91
|
width: size,
|
|
84
92
|
height: size
|
|
@@ -138,7 +146,8 @@ function ExecutionStatusIcon({ status, size = 16 }) {
|
|
|
138
146
|
}
|
|
139
147
|
}, [
|
|
140
148
|
status,
|
|
141
|
-
size
|
|
149
|
+
size,
|
|
150
|
+
_
|
|
142
151
|
]);
|
|
143
152
|
}
|
|
144
153
|
exports.ExecutionStatusIcon = __webpack_exports__.ExecutionStatusIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionStatusIcon.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExecutionStatusIcon.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.tsx"],"names":[],"mappings":"AAKA,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAuC1E;AAED,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,IAAS,GACV,EAAE;IACD,MAAM,CAAC,EACH,cAAc,GACd,YAAY,GACZ,WAAW,GACX,eAAe,GACf,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,SAAS,GACT,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,kDA4CA"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Spinner } from "@uipath/apollo-wind";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
+
import { useSafeLingui } from "../../../i18n/index.js";
|
|
4
5
|
import { CanvasIcon } from "../../utils/icon-registry.js";
|
|
5
6
|
function getExecutionStatusColor(status) {
|
|
6
7
|
switch(status){
|
|
7
8
|
case 'NotExecuted':
|
|
8
9
|
return 'var(--color-foreground-de-emp)';
|
|
9
10
|
case 'InProgress':
|
|
10
|
-
return 'var(--color-
|
|
11
|
+
return 'var(--color-primary)';
|
|
11
12
|
case 'Completed':
|
|
12
13
|
return 'var(--color-success-icon)';
|
|
13
14
|
case 'ActionNeeded':
|
|
@@ -43,13 +44,20 @@ function getExecutionStatusColor(status) {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
function ExecutionStatusIcon({ status, size = 16 }) {
|
|
47
|
+
const { _ } = useSafeLingui();
|
|
46
48
|
return useMemo(()=>{
|
|
47
49
|
const color = getExecutionStatusColor(status);
|
|
48
50
|
switch(status){
|
|
49
51
|
case 'InProgress':
|
|
50
52
|
return /*#__PURE__*/ jsx(Spinner, {
|
|
51
53
|
size: "sm",
|
|
54
|
+
label: _({
|
|
55
|
+
id: 'stage-node.status.in-progress',
|
|
56
|
+
message: 'In progress'
|
|
57
|
+
}),
|
|
58
|
+
className: "[&>svg]:text-[color:var(--spinner-color)] [&>svg]:[stroke-width:3]",
|
|
52
59
|
style: {
|
|
60
|
+
'--spinner-color': color,
|
|
53
61
|
backgroundColor: 'transparent',
|
|
54
62
|
width: size,
|
|
55
63
|
height: size
|
|
@@ -109,7 +117,8 @@ function ExecutionStatusIcon({ status, size = 16 }) {
|
|
|
109
117
|
}
|
|
110
118
|
}, [
|
|
111
119
|
status,
|
|
112
|
-
size
|
|
120
|
+
size,
|
|
121
|
+
_
|
|
113
122
|
]);
|
|
114
123
|
}
|
|
115
124
|
export { ExecutionStatusIcon, getExecutionStatusColor };
|
|
@@ -29,7 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
});
|
|
30
30
|
const external_react_namespaceObject = require("react");
|
|
31
31
|
const index_cjs_namespaceObject = require("../core/index.cjs");
|
|
32
|
-
const
|
|
32
|
+
const node_size_cjs_namespaceObject = require("../utils/node-size.cjs");
|
|
33
33
|
const container_cjs_namespaceObject = require("../utils/container.cjs");
|
|
34
34
|
function useNodeManifestResolver() {
|
|
35
35
|
const registry = (0, index_cjs_namespaceObject.useOptionalNodeTypeRegistry)();
|
|
@@ -42,7 +42,7 @@ function useCanvasNodeLayout() {
|
|
|
42
42
|
return (0, external_react_namespaceObject.useMemo)(()=>{
|
|
43
43
|
const getNodeDimensions = (node)=>{
|
|
44
44
|
const manifest = getManifestForNode(node);
|
|
45
|
-
return (0, container_cjs_namespaceObject.getNodeDimensions)(node, (0,
|
|
45
|
+
return (0, container_cjs_namespaceObject.getNodeDimensions)(node, (0, node_size_cjs_namespaceObject.getExpandedSize)(manifest?.display.shape));
|
|
46
46
|
};
|
|
47
47
|
const isContainerNode = (node)=>(0, container_cjs_namespaceObject.isContainerNodeManifest)(getManifestForNode(node));
|
|
48
48
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react";
|
|
2
2
|
import { useOptionalNodeTypeRegistry } from "../core/index.js";
|
|
3
|
-
import { getExpandedSize } from "../utils/
|
|
3
|
+
import { getExpandedSize } from "../utils/node-size.js";
|
|
4
4
|
import { getContainerFitGeometry, getNodeDimensions as container_js_getNodeDimensions, isContainerNodeManifest } from "../utils/container.js";
|
|
5
5
|
function useNodeManifestResolver() {
|
|
6
6
|
const registry = useOptionalNodeTypeRegistry();
|