@uipath/apollo-react 3.50.0-pr318.cf1b844 → 3.50.0-pr319.6f7b163

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.
@@ -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;AAmMzE,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"}
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)=>{
@@ -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;;;WAyBkzE,CAAC;;yBArBjzE,GAAG;;;;CAaoB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
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"}
@@ -28,7 +28,8 @@ __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");
@@ -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)(external_material_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)(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
- return {
114
- topLeft: hasBreakpoint ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BreakpointIndicator, {}) : void 0,
115
- topRight: !status && hasValidationError ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ValidationErrorIndicator, {
130
+ const hasValidationWarning = context.validationState?.validationStatus === validation_cjs_namespaceObject.ValidationErrorSeverity.WARNING;
131
+ const getTopRight = ()=>{
132
+ if (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
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ExecutionStatusIndicator, {
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,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AE,2CAQ3E;AAwCD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,kBAG3D"}
@@ -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
- return {
82
- topLeft: hasBreakpoint ? /*#__PURE__*/ jsx(BreakpointIndicator, {}) : void 0,
83
- topRight: !status && hasValidationError ? /*#__PURE__*/ jsx(ValidationErrorIndicator, {
97
+ const hasValidationWarning = context.validationState?.validationStatus === ValidationErrorSeverity.WARNING;
98
+ const getTopRight = ()=>{
99
+ if (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
- }) : /*#__PURE__*/ jsx(ExecutionStatusIndicator, {
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "3.50.0-pr318.cf1b844",
3
+ "version": "3.50.0-pr319.6f7b163",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",