@uipath/apollo-react 3.50.0-pr318.cf1b844 → 3.50.0-pr319.015bd2c
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/AgentCanvas/agent-flow.manifest.d.ts +1 -0
- package/dist/canvas/components/AgentCanvas/agent-flow.manifest.d.ts.map +1 -1
- package/dist/canvas/components/BaseCanvas/BaseCanvas.cjs +2 -0
- package/dist/canvas/components/BaseCanvas/BaseCanvas.d.ts.map +1 -1
- package/dist/canvas/components/BaseCanvas/BaseCanvas.js +2 -0
- package/dist/canvas/components/BaseNode/BaseNode.cjs +1 -0
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +1 -0
- package/dist/canvas/components/BaseNode/BaseNode.stories.cjs +110 -1
- package/dist/canvas/components/BaseNode/BaseNode.stories.d.ts +1 -0
- package/dist/canvas/components/BaseNode/BaseNode.stories.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.stories.js +107 -1
- package/dist/canvas/components/BaseNode/BaseNode.styles.cjs +14 -0
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts +1 -0
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.styles.js +14 -0
- package/dist/canvas/components/TriggerNode/TriggerNode.stories.d.ts.map +1 -1
- package/dist/canvas/schema/node-definition/constraints.cjs +7 -1
- package/dist/canvas/schema/node-definition/constraints.d.ts +6 -0
- package/dist/canvas/schema/node-definition/constraints.d.ts.map +1 -1
- package/dist/canvas/schema/node-definition/constraints.js +7 -1
- package/dist/canvas/schema/node-definition/handle.d.ts +18 -0
- package/dist/canvas/schema/node-definition/handle.d.ts.map +1 -1
- package/dist/canvas/schema/node-definition/node-manifest.d.ts +6 -0
- package/dist/canvas/schema/node-definition/node-manifest.d.ts.map +1 -1
- package/dist/canvas/schema/node-instance/node.d.ts +6 -0
- package/dist/canvas/schema/node-instance/node.d.ts.map +1 -1
- package/dist/canvas/storybook-utils/manifests/index.d.ts +1 -0
- package/dist/canvas/storybook-utils/manifests/index.d.ts.map +1 -1
- package/dist/canvas/utils/adornment-resolver.cjs +42 -11
- 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 +35 -7
- package/package.json +1 -1
|
@@ -72,6 +72,7 @@ export declare const agentFlowManifest: {
|
|
|
72
72
|
forbiddenSourceCategories?: string[] | undefined;
|
|
73
73
|
customValidation?: string | undefined;
|
|
74
74
|
validationMessage?: string | undefined;
|
|
75
|
+
severity?: "info" | "warning" | "error" | "critical" | undefined;
|
|
75
76
|
} | undefined;
|
|
76
77
|
isDefaultForType?: boolean | undefined;
|
|
77
78
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-flow.manifest.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AgentCanvas/agent-flow.manifest.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAMnF,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,EAmBjD,CAAC;AAMF,eAAO,MAAM,2BAA2B,EAAE,YAsDzC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAqDrC,CAAC;AAMF,eAAO,MAAM,uBAAuB,EAAE,YAwBrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAwBlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAwBjC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAwBxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAwBpC,CAAC;AAMF,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"agent-flow.manifest.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AgentCanvas/agent-flow.manifest.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAMnF,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,EAmBjD,CAAC;AAMF,eAAO,MAAM,2BAA2B,EAAE,YAsDzC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAqDrC,CAAC;AAMF,eAAO,MAAM,uBAAuB,EAAE,YAwBrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAwBlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAwBjC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAwBxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAwBpC,CAAC;AAMF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY7B,CAAC"}
|
|
@@ -35,6 +35,7 @@ const external_BaseCanvas_hooks_cjs_namespaceObject = require("./BaseCanvas.hook
|
|
|
35
35
|
const external_CanvasBackground_cjs_namespaceObject = require("./CanvasBackground.cjs");
|
|
36
36
|
const external_CanvasProviders_cjs_namespaceObject = require("./CanvasProviders.cjs");
|
|
37
37
|
const external_PanShortcutTeachingUI_cjs_namespaceObject = require("./PanShortcutTeachingUI.cjs");
|
|
38
|
+
const external_usePreventBackNavigation_cjs_namespaceObject = require("./usePreventBackNavigation.cjs");
|
|
38
39
|
const BaseCanvasInnerComponent = (props)=>{
|
|
39
40
|
const { innerRef, fitViewOptions: fitViewOptionsProps, ...canvasProps } = props;
|
|
40
41
|
const fitViewOptions = fitViewOptionsProps ?? external_BaseCanvas_constants_cjs_namespaceObject.BASE_CANVAS_DEFAULTS.fitViewOptions;
|
|
@@ -44,6 +45,7 @@ const BaseCanvasInnerComponent = (props)=>{
|
|
|
44
45
|
const [reactFlowInstance, setReactFlowInstance] = (0, external_react_namespaceObject.useState)();
|
|
45
46
|
const { isReady } = (0, external_BaseCanvas_hooks_cjs_namespaceObject.useAutoLayout)(nodes, initialAutoLayout, fitViewOptions);
|
|
46
47
|
const { ensureNodesInView, ensureAllNodesInView, centerNode } = (0, external_BaseCanvas_hooks_cjs_namespaceObject.useEnsureNodesInView)();
|
|
48
|
+
(0, external_usePreventBackNavigation_cjs_namespaceObject.usePreventBackNavigation)();
|
|
47
49
|
(0, external_BaseCanvas_hooks_cjs_namespaceObject.useMaintainNodesInView)(maintainNodesInView, fitViewOptions);
|
|
48
50
|
(0, ToolbarActionContext_cjs_namespaceObject.useToolbarActionStore)(mode, onToolbarAction, breakpoints);
|
|
49
51
|
const handleInit = (0, external_react_namespaceObject.useCallback)((instance)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCanvas.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseCanvas/BaseCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAqB,MAAM,0CAA0C,CAAC;AAE9F,OAAO,EAIL,KAAK,YAAY,EAKlB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseCanvas.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseCanvas/BaseCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAqB,MAAM,0CAA0C,CAAC;AAE9F,OAAO,EAIL,KAAK,YAAY,EAKlB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAuMzE,eAAO,MAAM,UAAU,EAKjB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC/D,KAAK,EAAE,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG;IAC3C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;CACpD,KACE,YAAY,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { useAutoLayout, useEnsureNodesInView, useMaintainNodesInView } from "./B
|
|
|
7
7
|
import { CanvasBackground } from "./CanvasBackground.js";
|
|
8
8
|
import { CanvasProviders } from "./CanvasProviders.js";
|
|
9
9
|
import { PanShortcutTeachingUI } from "./PanShortcutTeachingUI.js";
|
|
10
|
+
import { usePreventBackNavigation } from "./usePreventBackNavigation.js";
|
|
10
11
|
const BaseCanvasInnerComponent = (props)=>{
|
|
11
12
|
const { innerRef, fitViewOptions: fitViewOptionsProps, ...canvasProps } = props;
|
|
12
13
|
const fitViewOptions = fitViewOptionsProps ?? BASE_CANVAS_DEFAULTS.fitViewOptions;
|
|
@@ -16,6 +17,7 @@ const BaseCanvasInnerComponent = (props)=>{
|
|
|
16
17
|
const [reactFlowInstance, setReactFlowInstance] = useState();
|
|
17
18
|
const { isReady } = useAutoLayout(nodes, initialAutoLayout, fitViewOptions);
|
|
18
19
|
const { ensureNodesInView, ensureAllNodesInView, centerNode } = useEnsureNodesInView();
|
|
20
|
+
usePreventBackNavigation();
|
|
19
21
|
useMaintainNodesInView(maintainNodesInView, fitViewOptions);
|
|
20
22
|
useToolbarActionStore(mode, onToolbarAction, breakpoints);
|
|
21
23
|
const handleInit = useCallback((instance)=>{
|
|
@@ -384,6 +384,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
384
384
|
className: (0, index_cjs_namespaceObject.cx)(executionStatus, interactionState),
|
|
385
385
|
interactionState: interactionState,
|
|
386
386
|
executionStatus: executionStatus,
|
|
387
|
+
validationStatus: validationState?.validationStatus,
|
|
387
388
|
suggestionType: suggestionType,
|
|
388
389
|
width: width,
|
|
389
390
|
height: height,
|
|
@@ -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;AAkChG,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,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;AA2gB1B,eAAO,MAAM,QAAQ,8CArgBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAqgBhB,CAAC"}
|
|
@@ -356,6 +356,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
356
356
|
className: cx(executionStatus, interactionState),
|
|
357
357
|
interactionState: interactionState,
|
|
358
358
|
executionStatus: executionStatus,
|
|
359
|
+
validationStatus: validationState?.validationStatus,
|
|
359
360
|
suggestionType: suggestionType,
|
|
360
361
|
width: width,
|
|
361
362
|
height: height,
|
|
@@ -25,8 +25,9 @@ var __webpack_exports__ = {};
|
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
CustomizedSizes: ()=>CustomizedSizes,
|
|
28
|
-
|
|
28
|
+
ValidationStates: ()=>ValidationStates,
|
|
29
29
|
Default: ()=>Default,
|
|
30
|
+
default: ()=>BaseNode_stories,
|
|
30
31
|
DynamicHandles: ()=>DynamicHandles
|
|
31
32
|
});
|
|
32
33
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
@@ -832,14 +833,122 @@ const DynamicHandles = {
|
|
|
832
833
|
name: 'Dynamic Handles',
|
|
833
834
|
render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DynamicHandlesStory, {})
|
|
834
835
|
};
|
|
836
|
+
const VALIDATION_SEVERITIES = [
|
|
837
|
+
'WARNING',
|
|
838
|
+
'ERROR',
|
|
839
|
+
'CRITICAL'
|
|
840
|
+
];
|
|
841
|
+
const validationMessages = {
|
|
842
|
+
WARNING: 'Trigger should be connected to at least one node',
|
|
843
|
+
ERROR: 'URL is required',
|
|
844
|
+
CRITICAL: 'Node configuration is invalid'
|
|
845
|
+
};
|
|
846
|
+
function createValidationGrid() {
|
|
847
|
+
const nodes = [];
|
|
848
|
+
VALIDATION_SEVERITIES.forEach((severity, rowIndex)=>{
|
|
849
|
+
SHAPES.forEach((shape, colIndex)=>{
|
|
850
|
+
const label = 'rectangle' === shape ? 'Invoice approval agent' : 'Header';
|
|
851
|
+
const nodeType = 'rectangle' === shape ? 'uipath.agent' : 'uipath.blank-node';
|
|
852
|
+
nodes.push((0, external_storybook_utils_index_cjs_namespaceObject.createNode)({
|
|
853
|
+
id: `validation-${shape}-${severity}`,
|
|
854
|
+
type: nodeType,
|
|
855
|
+
position: {
|
|
856
|
+
x: GRID_CONFIG.startX + colIndex * GRID_CONFIG.gapX,
|
|
857
|
+
y: GRID_CONFIG.startY + rowIndex * GRID_CONFIG.gapY
|
|
858
|
+
},
|
|
859
|
+
data: {
|
|
860
|
+
nodeType,
|
|
861
|
+
version: '1.0.0',
|
|
862
|
+
display: {
|
|
863
|
+
label,
|
|
864
|
+
subLabel: severity,
|
|
865
|
+
shape
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}));
|
|
869
|
+
});
|
|
870
|
+
});
|
|
871
|
+
return nodes;
|
|
872
|
+
}
|
|
873
|
+
function ValidationStatesStory() {
|
|
874
|
+
const initialNodes = (0, external_react_namespaceObject.useMemo)(()=>createValidationGrid(), []);
|
|
875
|
+
const { canvasProps } = (0, external_storybook_utils_index_cjs_namespaceObject.useCanvasStory)({
|
|
876
|
+
initialNodes
|
|
877
|
+
});
|
|
878
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_BaseCanvas_index_cjs_namespaceObject.BaseCanvas, {
|
|
879
|
+
...canvasProps,
|
|
880
|
+
mode: "design",
|
|
881
|
+
children: [
|
|
882
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.Panel, {
|
|
883
|
+
position: "bottom-right",
|
|
884
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasPositionControls_cjs_namespaceObject.CanvasPositionControls, {
|
|
885
|
+
translations: external_types_cjs_namespaceObject.DefaultCanvasTranslations
|
|
886
|
+
})
|
|
887
|
+
}),
|
|
888
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_storybook_utils_index_cjs_namespaceObject.StoryInfoPanel, {
|
|
889
|
+
title: "Validation States",
|
|
890
|
+
description: "Grid showing warning, error, and critical validation badges across shapes. Warnings show a yellow badge only (no border). Errors/critical show a red badge."
|
|
891
|
+
})
|
|
892
|
+
]
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
const ValidationStates = {
|
|
896
|
+
name: 'Validation States',
|
|
897
|
+
decorators: [
|
|
898
|
+
(Story)=>{
|
|
899
|
+
const registry = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
900
|
+
const reg = new external_core_index_cjs_namespaceObject.NodeTypeRegistry();
|
|
901
|
+
reg.registerManifest(sampleManifest.nodes, sampleManifest.categories);
|
|
902
|
+
return reg;
|
|
903
|
+
}, []);
|
|
904
|
+
const contextValue = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
905
|
+
registry
|
|
906
|
+
}), [
|
|
907
|
+
registry
|
|
908
|
+
]);
|
|
909
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_core_index_cjs_namespaceObject.NodeRegistryContext.Provider, {
|
|
910
|
+
value: contextValue,
|
|
911
|
+
children: Story()
|
|
912
|
+
});
|
|
913
|
+
},
|
|
914
|
+
(0, external_storybook_utils_index_cjs_namespaceObject.withCanvasProviders)({
|
|
915
|
+
executionState: {
|
|
916
|
+
getNodeExecutionState: ()=>void 0,
|
|
917
|
+
getEdgeExecutionState: ()=>void 0
|
|
918
|
+
},
|
|
919
|
+
validationState: {
|
|
920
|
+
getElementValidationState: (elementId)=>{
|
|
921
|
+
const severity = elementId.split('-').pop();
|
|
922
|
+
if (![
|
|
923
|
+
'WARNING',
|
|
924
|
+
'ERROR',
|
|
925
|
+
'CRITICAL'
|
|
926
|
+
].includes(severity)) return;
|
|
927
|
+
return {
|
|
928
|
+
validationStatus: severity,
|
|
929
|
+
validationError: {
|
|
930
|
+
code: `VALIDATION_${severity}`,
|
|
931
|
+
message: validationMessages[severity] ?? `Validation ${severity.toLowerCase()}`,
|
|
932
|
+
description: validationMessages[severity] ?? `Validation ${severity.toLowerCase()}`,
|
|
933
|
+
severity: severity
|
|
934
|
+
}
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
})
|
|
939
|
+
],
|
|
940
|
+
render: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ValidationStatesStory, {})
|
|
941
|
+
};
|
|
835
942
|
exports.CustomizedSizes = __webpack_exports__.CustomizedSizes;
|
|
836
943
|
exports.Default = __webpack_exports__.Default;
|
|
837
944
|
exports.DynamicHandles = __webpack_exports__.DynamicHandles;
|
|
945
|
+
exports.ValidationStates = __webpack_exports__.ValidationStates;
|
|
838
946
|
exports["default"] = __webpack_exports__["default"];
|
|
839
947
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
840
948
|
"CustomizedSizes",
|
|
841
949
|
"Default",
|
|
842
950
|
"DynamicHandles",
|
|
951
|
+
"ValidationStates",
|
|
843
952
|
"default"
|
|
844
953
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
845
954
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.stories.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.stories.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAmBvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAuLrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAqB5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmZnC,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAG7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAG5B,CAAC;AAmEF,eAAO,MAAM,gBAAgB,EAAE,KAuC9B,CAAC"}
|
|
@@ -801,4 +801,110 @@ const DynamicHandles = {
|
|
|
801
801
|
name: 'Dynamic Handles',
|
|
802
802
|
render: ()=>/*#__PURE__*/ jsx(DynamicHandlesStory, {})
|
|
803
803
|
};
|
|
804
|
-
|
|
804
|
+
const VALIDATION_SEVERITIES = [
|
|
805
|
+
'WARNING',
|
|
806
|
+
'ERROR',
|
|
807
|
+
'CRITICAL'
|
|
808
|
+
];
|
|
809
|
+
const validationMessages = {
|
|
810
|
+
WARNING: 'Trigger should be connected to at least one node',
|
|
811
|
+
ERROR: 'URL is required',
|
|
812
|
+
CRITICAL: 'Node configuration is invalid'
|
|
813
|
+
};
|
|
814
|
+
function createValidationGrid() {
|
|
815
|
+
const nodes = [];
|
|
816
|
+
VALIDATION_SEVERITIES.forEach((severity, rowIndex)=>{
|
|
817
|
+
SHAPES.forEach((shape, colIndex)=>{
|
|
818
|
+
const label = 'rectangle' === shape ? 'Invoice approval agent' : 'Header';
|
|
819
|
+
const nodeType = 'rectangle' === shape ? 'uipath.agent' : 'uipath.blank-node';
|
|
820
|
+
nodes.push(createNode({
|
|
821
|
+
id: `validation-${shape}-${severity}`,
|
|
822
|
+
type: nodeType,
|
|
823
|
+
position: {
|
|
824
|
+
x: GRID_CONFIG.startX + colIndex * GRID_CONFIG.gapX,
|
|
825
|
+
y: GRID_CONFIG.startY + rowIndex * GRID_CONFIG.gapY
|
|
826
|
+
},
|
|
827
|
+
data: {
|
|
828
|
+
nodeType,
|
|
829
|
+
version: '1.0.0',
|
|
830
|
+
display: {
|
|
831
|
+
label,
|
|
832
|
+
subLabel: severity,
|
|
833
|
+
shape
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}));
|
|
837
|
+
});
|
|
838
|
+
});
|
|
839
|
+
return nodes;
|
|
840
|
+
}
|
|
841
|
+
function ValidationStatesStory() {
|
|
842
|
+
const initialNodes = useMemo(()=>createValidationGrid(), []);
|
|
843
|
+
const { canvasProps } = useCanvasStory({
|
|
844
|
+
initialNodes
|
|
845
|
+
});
|
|
846
|
+
return /*#__PURE__*/ jsxs(BaseCanvas, {
|
|
847
|
+
...canvasProps,
|
|
848
|
+
mode: "design",
|
|
849
|
+
children: [
|
|
850
|
+
/*#__PURE__*/ jsx(Panel, {
|
|
851
|
+
position: "bottom-right",
|
|
852
|
+
children: /*#__PURE__*/ jsx(CanvasPositionControls, {
|
|
853
|
+
translations: DefaultCanvasTranslations
|
|
854
|
+
})
|
|
855
|
+
}),
|
|
856
|
+
/*#__PURE__*/ jsx(StoryInfoPanel, {
|
|
857
|
+
title: "Validation States",
|
|
858
|
+
description: "Grid showing warning, error, and critical validation badges across shapes. Warnings show a yellow badge only (no border). Errors/critical show a red badge."
|
|
859
|
+
})
|
|
860
|
+
]
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
const ValidationStates = {
|
|
864
|
+
name: 'Validation States',
|
|
865
|
+
decorators: [
|
|
866
|
+
(Story)=>{
|
|
867
|
+
const registry = useMemo(()=>{
|
|
868
|
+
const reg = new NodeTypeRegistry();
|
|
869
|
+
reg.registerManifest(sampleManifest.nodes, sampleManifest.categories);
|
|
870
|
+
return reg;
|
|
871
|
+
}, []);
|
|
872
|
+
const contextValue = useMemo(()=>({
|
|
873
|
+
registry
|
|
874
|
+
}), [
|
|
875
|
+
registry
|
|
876
|
+
]);
|
|
877
|
+
return /*#__PURE__*/ jsx(NodeRegistryContext.Provider, {
|
|
878
|
+
value: contextValue,
|
|
879
|
+
children: Story()
|
|
880
|
+
});
|
|
881
|
+
},
|
|
882
|
+
withCanvasProviders({
|
|
883
|
+
executionState: {
|
|
884
|
+
getNodeExecutionState: ()=>void 0,
|
|
885
|
+
getEdgeExecutionState: ()=>void 0
|
|
886
|
+
},
|
|
887
|
+
validationState: {
|
|
888
|
+
getElementValidationState: (elementId)=>{
|
|
889
|
+
const severity = elementId.split('-').pop();
|
|
890
|
+
if (![
|
|
891
|
+
'WARNING',
|
|
892
|
+
'ERROR',
|
|
893
|
+
'CRITICAL'
|
|
894
|
+
].includes(severity)) return;
|
|
895
|
+
return {
|
|
896
|
+
validationStatus: severity,
|
|
897
|
+
validationError: {
|
|
898
|
+
code: `VALIDATION_${severity}`,
|
|
899
|
+
message: validationMessages[severity] ?? `Validation ${severity.toLowerCase()}`,
|
|
900
|
+
description: validationMessages[severity] ?? `Validation ${severity.toLowerCase()}`,
|
|
901
|
+
severity: severity
|
|
902
|
+
}
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
})
|
|
907
|
+
],
|
|
908
|
+
render: ()=>/*#__PURE__*/ jsx(ValidationStatesStory, {})
|
|
909
|
+
};
|
|
910
|
+
export { CustomizedSizes, Default, DynamicHandles, ValidationStates, BaseNode_stories as default };
|
|
@@ -99,6 +99,19 @@ const getExecutionStatusBorder = (executionStatus)=>{
|
|
|
99
99
|
`;
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
+
const getValidationStatusBorder = (validationStatus)=>{
|
|
103
|
+
switch(validationStatus){
|
|
104
|
+
case 'ERROR':
|
|
105
|
+
case 'CRITICAL':
|
|
106
|
+
return (0, react_namespaceObject.css)`
|
|
107
|
+
border-color: var(--uix-canvas-error-icon);
|
|
108
|
+
background: var(--uix-canvas-error-background);
|
|
109
|
+
animation: ${pulseAnimation('--uix-canvas-error-icon')} 2s infinite;
|
|
110
|
+
`;
|
|
111
|
+
default:
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
102
115
|
const getInteractionStateBorder = (interactionState)=>{
|
|
103
116
|
switch(interactionState){
|
|
104
117
|
case 'hover':
|
|
@@ -197,6 +210,7 @@ const BaseContainer = styled_default().div`
|
|
|
197
210
|
cursor: pointer;
|
|
198
211
|
|
|
199
212
|
${({ executionStatus })=>getExecutionStatusBorder(executionStatus)}
|
|
213
|
+
${({ validationStatus })=>getValidationStatusBorder(validationStatus)}
|
|
200
214
|
${({ interactionState })=>getInteractionStateBorder(interactionState)}
|
|
201
215
|
${({ suggestionType })=>getSuggestionTypeBorder(suggestionType)}
|
|
202
216
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.styles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAyItD,eAAO,MAAM,aAAa;;;;eACb,OAAO;sBACA,MAAM;YAChB,SAAS;sBACC,MAAM;uBACL,MAAM;uBACN,MAAM;qBACR,MAAM;YACf,MAAM;aACL,MAAM;gBACH,OAAO;oBACH,aAAa;yGAuE9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;YAClB,MAAM;sBACI,MAAM;YAChB,SAAS;aACR,MAAM;YACP,MAAM;yGAgDf,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;uBAAmC,OAAO;YAAU,SAAS;yGAiC1F,CAAC;AAEF,eAAO,MAAM,UAAU;;;;YAAwB,SAAS;sBAAoB,MAAM;yGAwBjF,CAAC;AAEF,eAAO,MAAM,aAAa;;;;YAAwB,SAAS;yGAe1D,CAAC;AAEF,eAAO,MAAM,aAAa;;;;YAChB,SAAS;sBACC,MAAM;aACf,QAAQ,GAAG,SAAS;2HA+B9B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;yGAkBjC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;cACd,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc;YAC3D,SAAS;yGAsBlB,CAAC"}
|
|
@@ -54,6 +54,19 @@ const getExecutionStatusBorder = (executionStatus)=>{
|
|
|
54
54
|
`;
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
+
const getValidationStatusBorder = (validationStatus)=>{
|
|
58
|
+
switch(validationStatus){
|
|
59
|
+
case 'ERROR':
|
|
60
|
+
case 'CRITICAL':
|
|
61
|
+
return css`
|
|
62
|
+
border-color: var(--uix-canvas-error-icon);
|
|
63
|
+
background: var(--uix-canvas-error-background);
|
|
64
|
+
animation: ${pulseAnimation('--uix-canvas-error-icon')} 2s infinite;
|
|
65
|
+
`;
|
|
66
|
+
default:
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
57
70
|
const getInteractionStateBorder = (interactionState)=>{
|
|
58
71
|
switch(interactionState){
|
|
59
72
|
case 'hover':
|
|
@@ -152,6 +165,7 @@ const BaseContainer = styled.div`
|
|
|
152
165
|
cursor: pointer;
|
|
153
166
|
|
|
154
167
|
${({ executionStatus })=>getExecutionStatusBorder(executionStatus)}
|
|
168
|
+
${({ validationStatus })=>getValidationStatusBorder(validationStatus)}
|
|
155
169
|
${({ interactionState })=>getInteractionStateBorder(interactionState)}
|
|
156
170
|
${({ suggestionType })=>getSuggestionTypeBorder(suggestionType)}
|
|
157
171
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/TriggerNode/TriggerNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAEV,IAAI,EAEJ,IAAI,EAEL,MAAM,0CAA0C,CAAC;AAsNlD,QAAA,MAAM,IAAI;;;
|
|
1
|
+
{"version":3,"file":"TriggerNode.stories.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/TriggerNode/TriggerNode.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAEV,IAAI,EAEJ,IAAI,EAEL,MAAM,0CAA0C,CAAC;AAsNlD,QAAA,MAAM,IAAI;;;WAyB+8E,CAAC;;yBArB98E,GAAG;;;;CAaoB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -44,7 +44,13 @@ const connectionConstraintSchema = external_zod_namespaceObject.z.object({
|
|
|
44
44
|
allowedSourceCategories: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).optional(),
|
|
45
45
|
forbiddenSourceCategories: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).optional(),
|
|
46
46
|
customValidation: external_zod_namespaceObject.z.string().optional(),
|
|
47
|
-
validationMessage: external_zod_namespaceObject.z.string().optional()
|
|
47
|
+
validationMessage: external_zod_namespaceObject.z.string().optional(),
|
|
48
|
+
severity: external_zod_namespaceObject.z["enum"]([
|
|
49
|
+
'warning',
|
|
50
|
+
'error',
|
|
51
|
+
'critical',
|
|
52
|
+
'info'
|
|
53
|
+
]).optional()
|
|
48
54
|
});
|
|
49
55
|
exports.connectionConstraintSchema = __webpack_exports__.connectionConstraintSchema;
|
|
50
56
|
exports.handleTargetSchema = __webpack_exports__.handleTargetSchema;
|
|
@@ -28,6 +28,12 @@ export declare const connectionConstraintSchema: z.ZodObject<{
|
|
|
28
28
|
forbiddenSourceCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
29
|
customValidation: z.ZodOptional<z.ZodString>;
|
|
30
30
|
validationMessage: z.ZodOptional<z.ZodString>;
|
|
31
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
info: "info";
|
|
33
|
+
warning: "warning";
|
|
34
|
+
error: "error";
|
|
35
|
+
critical: "critical";
|
|
36
|
+
}>>;
|
|
31
37
|
}, z.core.$strip>;
|
|
32
38
|
export type HandleTarget = z.infer<typeof handleTargetSchema>;
|
|
33
39
|
export type ConnectionConstraint = z.infer<typeof connectionConstraintSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-definition/constraints.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;iBAY7B,CAAC;AAKH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-definition/constraints.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;iBAY7B,CAAC;AAKH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyGrC,CAAC;AAGH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -15,6 +15,12 @@ const connectionConstraintSchema = z.object({
|
|
|
15
15
|
allowedSourceCategories: z.array(z.string()).optional(),
|
|
16
16
|
forbiddenSourceCategories: z.array(z.string()).optional(),
|
|
17
17
|
customValidation: z.string().optional(),
|
|
18
|
-
validationMessage: z.string().optional()
|
|
18
|
+
validationMessage: z.string().optional(),
|
|
19
|
+
severity: z["enum"]([
|
|
20
|
+
'warning',
|
|
21
|
+
'error',
|
|
22
|
+
'critical',
|
|
23
|
+
'info'
|
|
24
|
+
]).optional()
|
|
19
25
|
});
|
|
20
26
|
export { connectionConstraintSchema, handleTargetSchema };
|
|
@@ -64,6 +64,12 @@ export declare const handleManifestSchema: z.ZodObject<{
|
|
|
64
64
|
forbiddenSourceCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
65
|
customValidation: z.ZodOptional<z.ZodString>;
|
|
66
66
|
validationMessage: z.ZodOptional<z.ZodString>;
|
|
67
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
info: "info";
|
|
69
|
+
warning: "warning";
|
|
70
|
+
error: "error";
|
|
71
|
+
critical: "critical";
|
|
72
|
+
}>>;
|
|
67
73
|
}, z.core.$strip>>;
|
|
68
74
|
isDefaultForType: z.ZodOptional<z.ZodBoolean>;
|
|
69
75
|
}, z.core.$strip>;
|
|
@@ -124,6 +130,12 @@ export declare const handleGroupManifestSchema: z.ZodObject<{
|
|
|
124
130
|
forbiddenSourceCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
131
|
customValidation: z.ZodOptional<z.ZodString>;
|
|
126
132
|
validationMessage: z.ZodOptional<z.ZodString>;
|
|
133
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
info: "info";
|
|
135
|
+
warning: "warning";
|
|
136
|
+
error: "error";
|
|
137
|
+
critical: "critical";
|
|
138
|
+
}>>;
|
|
127
139
|
}, z.core.$strip>>;
|
|
128
140
|
isDefaultForType: z.ZodOptional<z.ZodBoolean>;
|
|
129
141
|
}, z.core.$strip>>;
|
|
@@ -178,6 +190,12 @@ export declare const handleGroupOverrideSchema: z.ZodObject<{
|
|
|
178
190
|
forbiddenSourceCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
179
191
|
customValidation: z.ZodOptional<z.ZodString>;
|
|
180
192
|
validationMessage: z.ZodOptional<z.ZodString>;
|
|
193
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
194
|
+
info: "info";
|
|
195
|
+
warning: "warning";
|
|
196
|
+
error: "error";
|
|
197
|
+
critical: "critical";
|
|
198
|
+
}>>;
|
|
181
199
|
}, z.core.$strip>>;
|
|
182
200
|
isDefaultForType: z.ZodOptional<z.ZodBoolean>;
|
|
183
201
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-definition/handle.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,oBAAoB;;;;;EAA6C,CAAC;AAK/E,eAAO,MAAM,gBAAgB;;;EAA+B,CAAC;AAK7D,eAAO,MAAM,uBAAuB;;;;EAA0C,CAAC;AAE/E,eAAO,MAAM,yCAAyC;;;;;;;iBAkBpD,CAAC;AAKH,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"handle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-definition/handle.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,oBAAoB;;;;;EAA6C,CAAC;AAK/E,eAAO,MAAM,gBAAgB;;;EAA+B,CAAC;AAK7D,eAAO,MAAM,uBAAuB;;;;EAA0C,CAAC;AAE/E,eAAO,MAAM,yCAAyC;;;;;;;iBAkBpD,CAAC;AAKH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8D/B,CAAC;AAKH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWpC,CAAC;AAMH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASpC,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC"}
|
|
@@ -102,6 +102,12 @@ export declare const nodeManifestSchema: z.ZodObject<{
|
|
|
102
102
|
forbiddenSourceCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
103
103
|
customValidation: z.ZodOptional<z.ZodString>;
|
|
104
104
|
validationMessage: z.ZodOptional<z.ZodString>;
|
|
105
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
info: "info";
|
|
107
|
+
warning: "warning";
|
|
108
|
+
error: "error";
|
|
109
|
+
critical: "critical";
|
|
110
|
+
}>>;
|
|
105
111
|
}, z.core.$strip>>;
|
|
106
112
|
isDefaultForType: z.ZodOptional<z.ZodBoolean>;
|
|
107
113
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-manifest.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-definition/node-manifest.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,eAAe;;;;EAA4C,CAAC;AAKzE,eAAO,MAAM,uBAAuB;;iBAGlC,CAAC;AAKH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;iBA2BpC,CAAC;AAKH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"node-manifest.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-definition/node-manifest.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,eAAe;;;;EAA4C,CAAC;AAKzE,eAAO,MAAM,uBAAuB;;iBAGlC,CAAC;AAKH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;iBA2BpC,CAAC;AAKH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2D7B,CAAC;AAGH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -98,6 +98,12 @@ export declare const nodeSchema: z.ZodObject<{
|
|
|
98
98
|
forbiddenSourceCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
99
99
|
customValidation: z.ZodOptional<z.ZodString>;
|
|
100
100
|
validationMessage: z.ZodOptional<z.ZodString>;
|
|
101
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
info: "info";
|
|
103
|
+
warning: "warning";
|
|
104
|
+
error: "error";
|
|
105
|
+
critical: "critical";
|
|
106
|
+
}>>;
|
|
101
107
|
}, z.core.$strip>>;
|
|
102
108
|
isDefaultForType: z.ZodOptional<z.ZodBoolean>;
|
|
103
109
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-instance/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,QAAQ;;;;;;;;;;kCAeG,CAAC;AAKzB,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/node-instance/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,QAAQ;;;;;;;;;;kCAeG,CAAC;AAKzB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCrB,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -65,6 +65,7 @@ export declare const defaultWorkflowManifest: {
|
|
|
65
65
|
forbiddenSourceCategories?: string[] | undefined;
|
|
66
66
|
customValidation?: string | undefined;
|
|
67
67
|
validationMessage?: string | undefined;
|
|
68
|
+
severity?: "info" | "warning" | "error" | "critical" | undefined;
|
|
68
69
|
} | undefined;
|
|
69
70
|
isDefaultForType?: boolean | undefined;
|
|
70
71
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/storybook-utils/manifests/index.ts"],"names":[],"mappings":"AAGA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AAKnC,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/storybook-utils/manifests/index.ts"],"names":[],"mappings":"AAGA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AAKnC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAInC,CAAC"}
|
|
@@ -28,12 +28,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
BreakpointIndicator: ()=>BreakpointIndicator,
|
|
29
29
|
ValidationErrorIndicator: ()=>ValidationErrorIndicator,
|
|
30
30
|
resolveAdornments: ()=>resolveAdornments,
|
|
31
|
-
ExecutionStatusIndicator: ()=>ExecutionStatusIndicator
|
|
31
|
+
ExecutionStatusIndicator: ()=>ExecutionStatusIndicator,
|
|
32
|
+
ValidationWarningIndicator: ()=>ValidationWarningIndicator
|
|
32
33
|
});
|
|
33
34
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
35
|
const external_index_cjs_namespaceObject = require("../index.cjs");
|
|
35
|
-
const index_cjs_namespaceObject = require("../../material/
|
|
36
|
-
const
|
|
36
|
+
const index_cjs_namespaceObject = require("../../material/index.cjs");
|
|
37
|
+
const components_index_cjs_namespaceObject = require("../../material/components/index.cjs");
|
|
37
38
|
const external_react_namespaceObject = require("react");
|
|
38
39
|
const ExecutionStatusIcon_cjs_namespaceObject = require("../components/ExecutionStatusIcon/ExecutionStatusIcon.cjs");
|
|
39
40
|
const validation_cjs_namespaceObject = require("../types/validation.cjs");
|
|
@@ -70,7 +71,7 @@ function ExecutionStatusIndicatorInternal({ status, count }) {
|
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
73
|
function PinnedOutputIndicator() {
|
|
73
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
74
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApTooltip, {
|
|
74
75
|
content: "Node output is mocked",
|
|
75
76
|
placement: "bottom",
|
|
76
77
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
@@ -87,14 +88,14 @@ function PinnedOutputIndicator() {
|
|
|
87
88
|
}
|
|
88
89
|
const ExecutionStatusIndicator = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(ExecutionStatusIndicatorInternal);
|
|
89
90
|
function ValidationErrorIndicator({ message }) {
|
|
90
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
91
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApTooltip, {
|
|
91
92
|
content: message || 'Validation error',
|
|
92
93
|
placement: "bottom",
|
|
93
94
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
94
95
|
style: {
|
|
95
96
|
display: 'inline-flex'
|
|
96
97
|
},
|
|
97
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
98
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(components_index_cjs_namespaceObject.ApIcon, {
|
|
98
99
|
name: "error",
|
|
99
100
|
size: "16px",
|
|
100
101
|
color: "var(--uix-canvas-error-icon)"
|
|
@@ -102,6 +103,22 @@ function ValidationErrorIndicator({ message }) {
|
|
|
102
103
|
})
|
|
103
104
|
});
|
|
104
105
|
}
|
|
106
|
+
function ValidationWarningIndicator({ message }) {
|
|
107
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApTooltip, {
|
|
108
|
+
content: message || 'Validation warning',
|
|
109
|
+
placement: "bottom",
|
|
110
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
111
|
+
style: {
|
|
112
|
+
display: 'inline-flex'
|
|
113
|
+
},
|
|
114
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(components_index_cjs_namespaceObject.ApIcon, {
|
|
115
|
+
name: "warning",
|
|
116
|
+
size: "16px",
|
|
117
|
+
color: "var(--uix-canvas-warning-icon)"
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
}
|
|
105
122
|
const getDefaultAdornments = (context)=>{
|
|
106
123
|
const executionState = context.executionState;
|
|
107
124
|
const status = 'object' == typeof executionState ? executionState?.status : executionState;
|
|
@@ -110,14 +127,26 @@ const getDefaultAdornments = (context)=>{
|
|
|
110
127
|
const isExecutionStartPoint = 'object' == typeof executionState && executionState?.isExecutionStartPoint;
|
|
111
128
|
const isOutputPinned = 'object' == typeof executionState && executionState?.isOutputPinned;
|
|
112
129
|
const hasValidationError = context.validationState?.validationStatus === validation_cjs_namespaceObject.ValidationErrorSeverity.ERROR || context.validationState?.validationStatus === validation_cjs_namespaceObject.ValidationErrorSeverity.CRITICAL;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
130
|
+
const hasValidationWarning = context.validationState?.validationStatus === validation_cjs_namespaceObject.ValidationErrorSeverity.WARNING;
|
|
131
|
+
const getTopRight = ()=>{
|
|
132
|
+
if (status && 'None' !== status) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ExecutionStatusIndicator, {
|
|
133
|
+
status: status,
|
|
134
|
+
count: count
|
|
135
|
+
});
|
|
136
|
+
if (hasValidationError) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ValidationErrorIndicator, {
|
|
137
|
+
message: context.validationState?.validationError?.message
|
|
138
|
+
});
|
|
139
|
+
if (hasValidationWarning) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ValidationWarningIndicator, {
|
|
116
140
|
message: context.validationState?.validationError?.message
|
|
117
|
-
})
|
|
141
|
+
});
|
|
142
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ExecutionStatusIndicator, {
|
|
118
143
|
status: status,
|
|
119
144
|
count: count
|
|
120
|
-
})
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
return {
|
|
148
|
+
topLeft: hasBreakpoint ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreakpointIndicator, {}) : void 0,
|
|
149
|
+
topRight: getTopRight(),
|
|
121
150
|
bottomLeft: isExecutionStartPoint ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ExecutionStartPointIndicator, {}) : void 0,
|
|
122
151
|
bottomRight: isOutputPinned ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PinnedOutputIndicator, {}) : void 0
|
|
123
152
|
};
|
|
@@ -129,12 +158,14 @@ exports.BreakpointIndicator = __webpack_exports__.BreakpointIndicator;
|
|
|
129
158
|
exports.ExecutionStartPointIndicator = __webpack_exports__.ExecutionStartPointIndicator;
|
|
130
159
|
exports.ExecutionStatusIndicator = __webpack_exports__.ExecutionStatusIndicator;
|
|
131
160
|
exports.ValidationErrorIndicator = __webpack_exports__.ValidationErrorIndicator;
|
|
161
|
+
exports.ValidationWarningIndicator = __webpack_exports__.ValidationWarningIndicator;
|
|
132
162
|
exports.resolveAdornments = __webpack_exports__.resolveAdornments;
|
|
133
163
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
134
164
|
"BreakpointIndicator",
|
|
135
165
|
"ExecutionStartPointIndicator",
|
|
136
166
|
"ExecutionStatusIndicator",
|
|
137
167
|
"ValidationErrorIndicator",
|
|
168
|
+
"ValidationWarningIndicator",
|
|
138
169
|
"resolveAdornments"
|
|
139
170
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
140
171
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -15,6 +15,9 @@ export declare const ExecutionStatusIndicator: import("react").MemoExoticCompone
|
|
|
15
15
|
export declare function ValidationErrorIndicator({ message }: {
|
|
16
16
|
message?: string;
|
|
17
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function ValidationWarningIndicator({ message }: {
|
|
19
|
+
message?: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
export declare function resolveAdornments(context: NodeStatusContext): NodeAdornments;
|
|
19
22
|
export {};
|
|
20
23
|
//# 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":"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;
|
|
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;AAED,wBAAgB,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,2CAQ3E;AA0CD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,kBAG3D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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";
|
|
4
3
|
import { ApTooltip } from "../../material/index.js";
|
|
4
|
+
import { ApIcon } from "../../material/components/index.js";
|
|
5
5
|
import { memo } from "react";
|
|
6
6
|
import { getExecutionStatusColor } from "../components/ExecutionStatusIcon/ExecutionStatusIcon.js";
|
|
7
7
|
import { ValidationErrorSeverity } from "../types/validation.js";
|
|
@@ -70,6 +70,22 @@ function ValidationErrorIndicator({ message }) {
|
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
function ValidationWarningIndicator({ message }) {
|
|
74
|
+
return /*#__PURE__*/ jsx(ApTooltip, {
|
|
75
|
+
content: message || 'Validation warning',
|
|
76
|
+
placement: "bottom",
|
|
77
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
78
|
+
style: {
|
|
79
|
+
display: 'inline-flex'
|
|
80
|
+
},
|
|
81
|
+
children: /*#__PURE__*/ jsx(ApIcon, {
|
|
82
|
+
name: "warning",
|
|
83
|
+
size: "16px",
|
|
84
|
+
color: "var(--uix-canvas-warning-icon)"
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
}
|
|
73
89
|
const getDefaultAdornments = (context)=>{
|
|
74
90
|
const executionState = context.executionState;
|
|
75
91
|
const status = 'object' == typeof executionState ? executionState?.status : executionState;
|
|
@@ -78,14 +94,26 @@ const getDefaultAdornments = (context)=>{
|
|
|
78
94
|
const isExecutionStartPoint = 'object' == typeof executionState && executionState?.isExecutionStartPoint;
|
|
79
95
|
const isOutputPinned = 'object' == typeof executionState && executionState?.isOutputPinned;
|
|
80
96
|
const hasValidationError = context.validationState?.validationStatus === ValidationErrorSeverity.ERROR || context.validationState?.validationStatus === ValidationErrorSeverity.CRITICAL;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
97
|
+
const hasValidationWarning = context.validationState?.validationStatus === ValidationErrorSeverity.WARNING;
|
|
98
|
+
const getTopRight = ()=>{
|
|
99
|
+
if (status && 'None' !== status) return /*#__PURE__*/ jsx(ExecutionStatusIndicator, {
|
|
100
|
+
status: status,
|
|
101
|
+
count: count
|
|
102
|
+
});
|
|
103
|
+
if (hasValidationError) return /*#__PURE__*/ jsx(ValidationErrorIndicator, {
|
|
104
|
+
message: context.validationState?.validationError?.message
|
|
105
|
+
});
|
|
106
|
+
if (hasValidationWarning) return /*#__PURE__*/ jsx(ValidationWarningIndicator, {
|
|
84
107
|
message: context.validationState?.validationError?.message
|
|
85
|
-
})
|
|
108
|
+
});
|
|
109
|
+
return /*#__PURE__*/ jsx(ExecutionStatusIndicator, {
|
|
86
110
|
status: status,
|
|
87
111
|
count: count
|
|
88
|
-
})
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
return {
|
|
115
|
+
topLeft: hasBreakpoint ? /*#__PURE__*/ jsx(BreakpointIndicator, {}) : void 0,
|
|
116
|
+
topRight: getTopRight(),
|
|
89
117
|
bottomLeft: isExecutionStartPoint ? /*#__PURE__*/ jsx(ExecutionStartPointIndicator, {}) : void 0,
|
|
90
118
|
bottomRight: isOutputPinned ? /*#__PURE__*/ jsx(PinnedOutputIndicator, {}) : void 0
|
|
91
119
|
};
|
|
@@ -93,4 +121,4 @@ const getDefaultAdornments = (context)=>{
|
|
|
93
121
|
function resolveAdornments(context) {
|
|
94
122
|
return getDefaultAdornments(context);
|
|
95
123
|
}
|
|
96
|
-
export { BreakpointIndicator, ExecutionStartPointIndicator, ExecutionStatusIndicator, ValidationErrorIndicator, resolveAdornments };
|
|
124
|
+
export { BreakpointIndicator, ExecutionStartPointIndicator, ExecutionStatusIndicator, ValidationErrorIndicator, ValidationWarningIndicator, resolveAdornments };
|