@uipath/apollo-react 3.45.6 → 3.46.0-pr292.a9ebebf
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/BaseNode/BaseNode.cjs +5 -1
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +6 -2
- package/dist/canvas/components/BaseNode/BaseNode.types.d.ts +2 -0
- package/dist/canvas/components/BaseNode/BaseNode.types.d.ts.map +1 -1
- package/dist/canvas/core/CategoryTree.cjs +33 -9
- package/dist/canvas/core/CategoryTree.d.ts.map +1 -1
- package/dist/canvas/core/CategoryTree.js +33 -9
- package/dist/canvas/core/CategoryTreeAdapter.cjs +1 -1
- package/dist/canvas/core/CategoryTreeAdapter.js +1 -1
- package/dist/canvas/utils/adornment-resolver.cjs +27 -3
- package/dist/canvas/utils/adornment-resolver.d.ts +3 -0
- package/dist/canvas/utils/adornment-resolver.d.ts.map +1 -1
- package/dist/canvas/utils/adornment-resolver.js +23 -2
- package/package.json +3 -3
|
@@ -59,6 +59,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
59
59
|
const [isFocused, setIsFocused] = (0, external_react_namespaceObject.useState)(false);
|
|
60
60
|
const originalHeightRef = (0, external_react_namespaceObject.useRef)(void 0);
|
|
61
61
|
const executionState = (0, external_hooks_index_cjs_namespaceObject.useNodeExecutionState)(id);
|
|
62
|
+
const validationState = (0, external_hooks_index_cjs_namespaceObject.useElementValidationStatus)(id);
|
|
62
63
|
const nodeTypeRegistry = (0, external_core_index_cjs_namespaceObject.useNodeTypeRegistry)();
|
|
63
64
|
const { mode } = (0, BaseCanvasModeProvider_cjs_namespaceObject.useBaseCanvasMode)();
|
|
64
65
|
const connectedHandleIds = (0, ConnectedHandlesContext_cjs_namespaceObject.useConnectedHandles)(id);
|
|
@@ -71,14 +72,17 @@ const BaseNodeComponent = (props)=>{
|
|
|
71
72
|
]);
|
|
72
73
|
const statusContext = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
73
74
|
nodeId: id,
|
|
74
|
-
executionState,
|
|
75
|
+
executionState: executionStatusOverride ?? executionState,
|
|
76
|
+
validationState,
|
|
75
77
|
isConnecting,
|
|
76
78
|
isSelected: selected,
|
|
77
79
|
isDragging: dragging,
|
|
78
80
|
mode
|
|
79
81
|
}), [
|
|
80
82
|
id,
|
|
83
|
+
executionStatusOverride,
|
|
81
84
|
executionState,
|
|
85
|
+
validationState,
|
|
82
86
|
isConnecting,
|
|
83
87
|
selected,
|
|
84
88
|
dragging,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,0CAA0C,CAAC;AAkChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AA0gB1B,eAAO,MAAM,QAAQ,8CApgBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAogBhB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { ApIcon } from "../../../material/components/index.js";
|
|
|
5
5
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { DEFAULT_NODE_SIZE } from "../../constants.js";
|
|
7
7
|
import { useNodeTypeRegistry } from "../../core/index.js";
|
|
8
|
-
import { useNodeExecutionState } from "../../hooks/index.js";
|
|
8
|
+
import { useElementValidationStatus, useNodeExecutionState } from "../../hooks/index.js";
|
|
9
9
|
import { resolveAdornments } from "../../utils/adornment-resolver.js";
|
|
10
10
|
import { getIcon } from "../../utils/icon-registry.js";
|
|
11
11
|
import { resolveDisplay, resolveHandles } from "../../utils/manifest-resolver.js";
|
|
@@ -31,6 +31,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
31
31
|
const [isFocused, setIsFocused] = useState(false);
|
|
32
32
|
const originalHeightRef = useRef(void 0);
|
|
33
33
|
const executionState = useNodeExecutionState(id);
|
|
34
|
+
const validationState = useElementValidationStatus(id);
|
|
34
35
|
const nodeTypeRegistry = useNodeTypeRegistry();
|
|
35
36
|
const { mode } = useBaseCanvasMode();
|
|
36
37
|
const connectedHandleIds = useConnectedHandles(id);
|
|
@@ -43,14 +44,17 @@ const BaseNodeComponent = (props)=>{
|
|
|
43
44
|
]);
|
|
44
45
|
const statusContext = useMemo(()=>({
|
|
45
46
|
nodeId: id,
|
|
46
|
-
executionState,
|
|
47
|
+
executionState: executionStatusOverride ?? executionState,
|
|
48
|
+
validationState,
|
|
47
49
|
isConnecting,
|
|
48
50
|
isSelected: selected,
|
|
49
51
|
isDragging: dragging,
|
|
50
52
|
mode
|
|
51
53
|
}), [
|
|
52
54
|
id,
|
|
55
|
+
executionStatusOverride,
|
|
53
56
|
executionState,
|
|
57
|
+
validationState,
|
|
54
58
|
isConnecting,
|
|
55
59
|
selected,
|
|
56
60
|
dragging,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NodeShape } from '../../schema';
|
|
2
2
|
import type { ExecutionState } from '../../types/execution';
|
|
3
|
+
import type { ValidationState } from '../../types/validation';
|
|
3
4
|
export type FooterVariant = 'none' | 'button' | 'single' | 'double';
|
|
4
5
|
export interface BaseNodeData extends Record<string, unknown> {
|
|
5
6
|
display?: {
|
|
@@ -25,6 +26,7 @@ export interface NodeAdornments {
|
|
|
25
26
|
export interface NodeStatusContext {
|
|
26
27
|
nodeId: string;
|
|
27
28
|
executionState?: ExecutionState;
|
|
29
|
+
validationState?: ValidationState;
|
|
28
30
|
isHovered?: boolean;
|
|
29
31
|
isConnecting?: boolean;
|
|
30
32
|
isSelected?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEpE,MAAM,WAAW,YAAa,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3D,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,SAAS,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAOF,eAAe,CAAC,EAAE,OAAO,CAAC;IAM1B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -130,16 +130,40 @@ class CategoryTree {
|
|
|
130
130
|
}
|
|
131
131
|
filterBySearch(searchTerm) {
|
|
132
132
|
if (!searchTerm) return this;
|
|
133
|
-
const
|
|
134
|
-
return this
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
const searchWords = searchTerm.toLowerCase().split(/\s+/).filter(Boolean);
|
|
134
|
+
if (0 === searchWords.length) return this;
|
|
135
|
+
const matchesAllWords = (node, ancestorCategoryNames)=>{
|
|
136
|
+
const searchableTexts = [
|
|
137
|
+
node.display.label.toLowerCase(),
|
|
138
|
+
node.nodeType.toLowerCase(),
|
|
139
|
+
...node.description ? [
|
|
140
|
+
node.description.toLowerCase()
|
|
141
|
+
] : [],
|
|
142
|
+
...node.tags?.filter((tag)=>'string' == typeof tag).map((tag)=>tag.toLowerCase()) ?? [],
|
|
143
|
+
...ancestorCategoryNames
|
|
144
|
+
];
|
|
145
|
+
return searchWords.every((word)=>searchableTexts.some((text)=>text.includes(word)));
|
|
146
|
+
};
|
|
147
|
+
const filterTree = (tree, ancestorNames)=>{
|
|
148
|
+
const filtered = [];
|
|
149
|
+
for (const item of tree){
|
|
150
|
+
const categoryNames = [
|
|
151
|
+
...ancestorNames,
|
|
152
|
+
item.name.toLowerCase()
|
|
153
|
+
];
|
|
154
|
+
const nestedCategories = filterTree(item.nestedCategories, categoryNames);
|
|
155
|
+
const nodes = item.nodes.filter((node)=>matchesAllWords(node, categoryNames));
|
|
156
|
+
if (nestedCategories.length > 0 || nodes.length > 0) filtered.push({
|
|
157
|
+
...item,
|
|
158
|
+
nestedCategories,
|
|
159
|
+
nodes
|
|
160
|
+
});
|
|
141
161
|
}
|
|
142
|
-
|
|
162
|
+
return filtered;
|
|
163
|
+
};
|
|
164
|
+
const filteredRoots = filterTree(this.rootCategories, []);
|
|
165
|
+
const filteredRootNodes = this.rootNodes.filter((node)=>matchesAllWords(node, []));
|
|
166
|
+
return CategoryTree.fromPrebuilt(filteredRoots, filteredRootNodes);
|
|
143
167
|
}
|
|
144
168
|
filterByConnections(validator) {
|
|
145
169
|
return this.filter({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryTree.d.ts","sourceRoot":"","sources":["../../../src/canvas/core/CategoryTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKhF,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAKD,MAAM,WAAW,yBAAyB;IAExC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAEzD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CAC9C;AAMD,MAAM,WAAW,mBAAmB;IAMlC,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAO1D,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3C;AA8BD,qBAAa,YAAY;IACvB,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO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earch(searchTerm) {
|
|
104
104
|
if (!searchTerm) return this;
|
|
105
|
-
const
|
|
106
|
-
return this
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
const searchWords = searchTerm.toLowerCase().split(/\s+/).filter(Boolean);
|
|
106
|
+
if (0 === searchWords.length) return this;
|
|
107
|
+
const matchesAllWords = (node, ancestorCategoryNames)=>{
|
|
108
|
+
const searchableTexts = [
|
|
109
|
+
node.display.label.toLowerCase(),
|
|
110
|
+
node.nodeType.toLowerCase(),
|
|
111
|
+
...node.description ? [
|
|
112
|
+
node.description.toLowerCase()
|
|
113
|
+
] : [],
|
|
114
|
+
...node.tags?.filter((tag)=>'string' == typeof tag).map((tag)=>tag.toLowerCase()) ?? [],
|
|
115
|
+
...ancestorCategoryNames
|
|
116
|
+
];
|
|
117
|
+
return searchWords.every((word)=>searchableTexts.some((text)=>text.includes(word)));
|
|
118
|
+
};
|
|
119
|
+
const filterTree = (tree, ancestorNames)=>{
|
|
120
|
+
const filtered = [];
|
|
121
|
+
for (const item of tree){
|
|
122
|
+
const categoryNames = [
|
|
123
|
+
...ancestorNames,
|
|
124
|
+
item.name.toLowerCase()
|
|
125
|
+
];
|
|
126
|
+
const nestedCategories = filterTree(item.nestedCategories, categoryNames);
|
|
127
|
+
const nodes = item.nodes.filter((node)=>matchesAllWords(node, categoryNames));
|
|
128
|
+
if (nestedCategories.length > 0 || nodes.length > 0) filtered.push({
|
|
129
|
+
...item,
|
|
130
|
+
nestedCategories,
|
|
131
|
+
nodes
|
|
132
|
+
});
|
|
113
133
|
}
|
|
114
|
-
|
|
134
|
+
return filtered;
|
|
135
|
+
};
|
|
136
|
+
const filteredRoots = filterTree(this.rootCategories, []);
|
|
137
|
+
const filteredRootNodes = this.rootNodes.filter((node)=>matchesAllWords(node, []));
|
|
138
|
+
return CategoryTree.fromPrebuilt(filteredRoots, filteredRootNodes);
|
|
115
139
|
}
|
|
116
140
|
filterByConnections(validator) {
|
|
117
141
|
return this.filter({
|
|
@@ -34,7 +34,7 @@ class CategoryTreeAdapter {
|
|
|
34
34
|
const convertNodeManifest = (node)=>({
|
|
35
35
|
id: node.nodeType,
|
|
36
36
|
name: node.display.label,
|
|
37
|
-
description: node.description,
|
|
37
|
+
description: node.description || node.display.description,
|
|
38
38
|
data: {
|
|
39
39
|
type: node.nodeType,
|
|
40
40
|
category: node.category,
|
|
@@ -6,7 +6,7 @@ class CategoryTreeAdapter {
|
|
|
6
6
|
const convertNodeManifest = (node)=>({
|
|
7
7
|
id: node.nodeType,
|
|
8
8
|
name: node.display.label,
|
|
9
|
-
description: node.description,
|
|
9
|
+
description: node.description || node.display.description,
|
|
10
10
|
data: {
|
|
11
11
|
type: node.nodeType,
|
|
12
12
|
category: node.category,
|
|
@@ -26,14 +26,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
ExecutionStartPointIndicator: ()=>ExecutionStartPointIndicator,
|
|
28
28
|
BreakpointIndicator: ()=>BreakpointIndicator,
|
|
29
|
+
ValidationErrorIndicator: ()=>ValidationErrorIndicator,
|
|
29
30
|
resolveAdornments: ()=>resolveAdornments,
|
|
30
31
|
ExecutionStatusIndicator: ()=>ExecutionStatusIndicator
|
|
31
32
|
});
|
|
32
33
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
34
|
const external_index_cjs_namespaceObject = require("../index.cjs");
|
|
34
|
-
const index_cjs_namespaceObject = require("../../material/index.cjs");
|
|
35
|
+
const index_cjs_namespaceObject = require("../../material/components/index.cjs");
|
|
36
|
+
const external_material_index_cjs_namespaceObject = require("../../material/index.cjs");
|
|
35
37
|
const external_react_namespaceObject = require("react");
|
|
36
38
|
const ExecutionStatusIcon_cjs_namespaceObject = require("../components/ExecutionStatusIcon/ExecutionStatusIcon.cjs");
|
|
39
|
+
const validation_cjs_namespaceObject = require("../types/validation.cjs");
|
|
37
40
|
function BreakpointIndicator({ isActive = true }) {
|
|
38
41
|
if (!isActive) return null;
|
|
39
42
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -67,7 +70,7 @@ function ExecutionStatusIndicatorInternal({ status, count }) {
|
|
|
67
70
|
});
|
|
68
71
|
}
|
|
69
72
|
function PinnedOutputIndicator() {
|
|
70
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
73
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
71
74
|
content: "Node output is mocked",
|
|
72
75
|
placement: "bottom",
|
|
73
76
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
@@ -83,6 +86,22 @@ function PinnedOutputIndicator() {
|
|
|
83
86
|
});
|
|
84
87
|
}
|
|
85
88
|
const ExecutionStatusIndicator = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(ExecutionStatusIndicatorInternal);
|
|
89
|
+
function ValidationErrorIndicator({ message }) {
|
|
90
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
91
|
+
content: message || 'Validation error',
|
|
92
|
+
placement: "bottom",
|
|
93
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
94
|
+
style: {
|
|
95
|
+
display: 'inline-flex'
|
|
96
|
+
},
|
|
97
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApIcon, {
|
|
98
|
+
name: "error",
|
|
99
|
+
size: "16px",
|
|
100
|
+
color: "var(--uix-canvas-error-icon)"
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
86
105
|
const getDefaultAdornments = (context)=>{
|
|
87
106
|
const executionState = context.executionState;
|
|
88
107
|
const status = 'object' == typeof executionState ? executionState?.status : executionState;
|
|
@@ -90,9 +109,12 @@ const getDefaultAdornments = (context)=>{
|
|
|
90
109
|
const hasBreakpoint = 'object' == typeof executionState && executionState?.debug;
|
|
91
110
|
const isExecutionStartPoint = 'object' == typeof executionState && executionState?.isExecutionStartPoint;
|
|
92
111
|
const isOutputPinned = 'object' == typeof executionState && executionState?.isOutputPinned;
|
|
112
|
+
const hasValidationError = context.validationState?.validationStatus === validation_cjs_namespaceObject.ValidationErrorSeverity.ERROR || context.validationState?.validationStatus === validation_cjs_namespaceObject.ValidationErrorSeverity.CRITICAL;
|
|
93
113
|
return {
|
|
94
114
|
topLeft: hasBreakpoint ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreakpointIndicator, {}) : void 0,
|
|
95
|
-
topRight: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
115
|
+
topRight: !status && hasValidationError ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ValidationErrorIndicator, {
|
|
116
|
+
message: context.validationState?.validationError?.message
|
|
117
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ExecutionStatusIndicator, {
|
|
96
118
|
status: status,
|
|
97
119
|
count: count
|
|
98
120
|
}),
|
|
@@ -106,11 +128,13 @@ function resolveAdornments(context) {
|
|
|
106
128
|
exports.BreakpointIndicator = __webpack_exports__.BreakpointIndicator;
|
|
107
129
|
exports.ExecutionStartPointIndicator = __webpack_exports__.ExecutionStartPointIndicator;
|
|
108
130
|
exports.ExecutionStatusIndicator = __webpack_exports__.ExecutionStatusIndicator;
|
|
131
|
+
exports.ValidationErrorIndicator = __webpack_exports__.ValidationErrorIndicator;
|
|
109
132
|
exports.resolveAdornments = __webpack_exports__.resolveAdornments;
|
|
110
133
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
111
134
|
"BreakpointIndicator",
|
|
112
135
|
"ExecutionStartPointIndicator",
|
|
113
136
|
"ExecutionStatusIndicator",
|
|
137
|
+
"ValidationErrorIndicator",
|
|
114
138
|
"resolveAdornments"
|
|
115
139
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
116
140
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -12,6 +12,9 @@ declare function ExecutionStatusIndicatorInternal({ status, count }: {
|
|
|
12
12
|
count?: number;
|
|
13
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare const ExecutionStatusIndicator: import("react").MemoExoticComponent<typeof ExecutionStatusIndicatorInternal>;
|
|
15
|
+
export declare function ValidationErrorIndicator({ message }: {
|
|
16
|
+
message?: string;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export declare function resolveAdornments(context: NodeStatusContext): NodeAdornments;
|
|
16
19
|
export {};
|
|
17
20
|
//# sourceMappingURL=adornment-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adornment-resolver.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/adornment-resolver.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adornment-resolver.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/adornment-resolver.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIvE,UAAU,wBAAwB;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,QAAe,EAAE,EAAE,wBAAwB,kDAWhF;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,QAAe,GAChB,EAAE,iCAAiC,kDAWnC;AAED,iBAAS,gCAAgC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,2CAc/F;AAYD,eAAO,MAAM,wBAAwB,8EAAyC,CAAC;AAE/E,wBAAgB,wBAAwB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,2CAQzE;AA0BD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,kBAG3D"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ExecutionStatusIcon, NodeIcon } from "../index.js";
|
|
3
|
+
import { ApIcon } from "../../material/components/index.js";
|
|
3
4
|
import { ApTooltip } from "../../material/index.js";
|
|
4
5
|
import { memo } from "react";
|
|
5
6
|
import { getExecutionStatusColor } from "../components/ExecutionStatusIcon/ExecutionStatusIcon.js";
|
|
7
|
+
import { ValidationErrorSeverity } from "../types/validation.js";
|
|
6
8
|
function BreakpointIndicator({ isActive = true }) {
|
|
7
9
|
if (!isActive) return null;
|
|
8
10
|
return /*#__PURE__*/ jsx("div", {
|
|
@@ -52,6 +54,22 @@ function PinnedOutputIndicator() {
|
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
56
|
const ExecutionStatusIndicator = /*#__PURE__*/ memo(ExecutionStatusIndicatorInternal);
|
|
57
|
+
function ValidationErrorIndicator({ message }) {
|
|
58
|
+
return /*#__PURE__*/ jsx(ApTooltip, {
|
|
59
|
+
content: message || 'Validation error',
|
|
60
|
+
placement: "bottom",
|
|
61
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
62
|
+
style: {
|
|
63
|
+
display: 'inline-flex'
|
|
64
|
+
},
|
|
65
|
+
children: /*#__PURE__*/ jsx(ApIcon, {
|
|
66
|
+
name: "error",
|
|
67
|
+
size: "16px",
|
|
68
|
+
color: "var(--uix-canvas-error-icon)"
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
}
|
|
55
73
|
const getDefaultAdornments = (context)=>{
|
|
56
74
|
const executionState = context.executionState;
|
|
57
75
|
const status = 'object' == typeof executionState ? executionState?.status : executionState;
|
|
@@ -59,9 +77,12 @@ const getDefaultAdornments = (context)=>{
|
|
|
59
77
|
const hasBreakpoint = 'object' == typeof executionState && executionState?.debug;
|
|
60
78
|
const isExecutionStartPoint = 'object' == typeof executionState && executionState?.isExecutionStartPoint;
|
|
61
79
|
const isOutputPinned = 'object' == typeof executionState && executionState?.isOutputPinned;
|
|
80
|
+
const hasValidationError = context.validationState?.validationStatus === ValidationErrorSeverity.ERROR || context.validationState?.validationStatus === ValidationErrorSeverity.CRITICAL;
|
|
62
81
|
return {
|
|
63
82
|
topLeft: hasBreakpoint ? /*#__PURE__*/ jsx(BreakpointIndicator, {}) : void 0,
|
|
64
|
-
topRight: /*#__PURE__*/ jsx(
|
|
83
|
+
topRight: !status && hasValidationError ? /*#__PURE__*/ jsx(ValidationErrorIndicator, {
|
|
84
|
+
message: context.validationState?.validationError?.message
|
|
85
|
+
}) : /*#__PURE__*/ jsx(ExecutionStatusIndicator, {
|
|
65
86
|
status: status,
|
|
66
87
|
count: count
|
|
67
88
|
}),
|
|
@@ -72,4 +93,4 @@ const getDefaultAdornments = (context)=>{
|
|
|
72
93
|
function resolveAdornments(context) {
|
|
73
94
|
return getDefaultAdornments(context);
|
|
74
95
|
}
|
|
75
|
-
export { BreakpointIndicator, ExecutionStartPointIndicator, ExecutionStatusIndicator, resolveAdornments };
|
|
96
|
+
export { BreakpointIndicator, ExecutionStartPointIndicator, ExecutionStatusIndicator, ValidationErrorIndicator, resolveAdornments };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.46.0-pr292.a9ebebf",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
"use-sync-external-store": "^1.2.0",
|
|
201
201
|
"zod": "^4.3.5",
|
|
202
202
|
"zustand": "^5.0.9",
|
|
203
|
-
"@uipath/apollo-
|
|
204
|
-
"@uipath/apollo-
|
|
203
|
+
"@uipath/apollo-core": "5.7.0",
|
|
204
|
+
"@uipath/apollo-wind": "0.11.0"
|
|
205
205
|
},
|
|
206
206
|
"devDependencies": {
|
|
207
207
|
"@lingui/cli": "^5.6.1",
|