@uipath/apollo-react 4.39.0 → 4.39.2
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 +2 -1
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +2 -1
- package/dist/canvas/components/GroupNode/GroupNode.cjs +2 -1
- package/dist/canvas/components/GroupNode/GroupNode.d.ts.map +1 -1
- package/dist/canvas/components/GroupNode/GroupNode.js +2 -1
- package/dist/canvas/components/LoopNode/LoopCanvasNode.cjs +2 -1
- package/dist/canvas/components/LoopNode/LoopCanvasNode.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopCanvasNode.js +2 -1
- package/dist/canvas/components/LoopNode/LoopNode.cjs +2 -1
- package/dist/canvas/components/LoopNode/LoopNode.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.js +2 -1
- package/dist/canvas/components/StageNode/StageNode.cjs +2 -1
- package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.js +2 -1
- package/dist/canvas/components/StickyNoteNode/StickyNoteNode.cjs +33 -5
- package/dist/canvas/components/StickyNoteNode/StickyNoteNode.d.ts.map +1 -1
- package/dist/canvas/components/StickyNoteNode/StickyNoteNode.js +33 -5
- package/dist/canvas/components/TriggerNode/TriggerNode.cjs +2 -1
- package/dist/canvas/components/TriggerNode/TriggerNode.d.ts.map +1 -1
- package/dist/canvas/components/TriggerNode/TriggerNode.js +2 -1
- package/dist/canvas/utils/nodePropsEqual.cjs +48 -0
- package/dist/canvas/utils/nodePropsEqual.d.ts +2 -0
- package/dist/canvas/utils/nodePropsEqual.d.ts.map +1 -0
- package/dist/canvas/utils/nodePropsEqual.js +14 -0
- package/package.json +4 -4
|
@@ -36,6 +36,7 @@ const adornment_resolver_cjs_namespaceObject = require("../../utils/adornment-re
|
|
|
36
36
|
const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
|
|
37
37
|
const manifest_resolver_cjs_namespaceObject = require("../../utils/manifest-resolver.cjs");
|
|
38
38
|
const NodeUtils_cjs_namespaceObject = require("../../utils/NodeUtils.cjs");
|
|
39
|
+
const nodePropsEqual_cjs_namespaceObject = require("../../utils/nodePropsEqual.cjs");
|
|
39
40
|
const toolbar_resolver_cjs_namespaceObject = require("../../utils/toolbar-resolver.cjs");
|
|
40
41
|
const BaseCanvasModeProvider_cjs_namespaceObject = require("../BaseCanvas/BaseCanvasModeProvider.cjs");
|
|
41
42
|
const CanvasThemeContext_cjs_namespaceObject = require("../BaseCanvas/CanvasThemeContext.cjs");
|
|
@@ -524,7 +525,7 @@ const BaseNodeComponent = (props)=>{
|
|
|
524
525
|
});
|
|
525
526
|
return nodeContent;
|
|
526
527
|
};
|
|
527
|
-
const BaseNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(BaseNodeComponent);
|
|
528
|
+
const BaseNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(BaseNodeComponent, nodePropsEqual_cjs_namespaceObject.areNodePropsEqualIgnoringPosition);
|
|
528
529
|
exports.BaseNode = __webpack_exports__.BaseNode;
|
|
529
530
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
530
531
|
"BaseNode"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AA4ChF,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AAupB1B,eAAO,MAAM,QAAQ,8CAjnBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAinBmB,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { resolveAdornments } from "../../utils/adornment-resolver.js";
|
|
|
8
8
|
import { CanvasIcon, getIcon } from "../../utils/icon-registry.js";
|
|
9
9
|
import { resolveDisplay, resolveHandles } from "../../utils/manifest-resolver.js";
|
|
10
10
|
import { selectIsConnecting } from "../../utils/NodeUtils.js";
|
|
11
|
+
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
11
12
|
import { resolveToolbar } from "../../utils/toolbar-resolver.js";
|
|
12
13
|
import { useBaseCanvasMode } from "../BaseCanvas/BaseCanvasModeProvider.js";
|
|
13
14
|
import { useCanvasTheme } from "../BaseCanvas/CanvasThemeContext.js";
|
|
@@ -496,5 +497,5 @@ const BaseNodeComponent = (props)=>{
|
|
|
496
497
|
});
|
|
497
498
|
return nodeContent;
|
|
498
499
|
};
|
|
499
|
-
const BaseNode = /*#__PURE__*/ memo(BaseNodeComponent);
|
|
500
|
+
const BaseNode = /*#__PURE__*/ memo(BaseNodeComponent, areNodePropsEqualIgnoringPosition);
|
|
500
501
|
export { BaseNode };
|
|
@@ -31,6 +31,7 @@ const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
|
31
31
|
const external_react_namespaceObject = require("react");
|
|
32
32
|
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
33
33
|
const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
|
|
34
|
+
const nodePropsEqual_cjs_namespaceObject = require("../../utils/nodePropsEqual.cjs");
|
|
34
35
|
const external_GroupNode_styles_cjs_namespaceObject = require("./GroupNode.styles.cjs");
|
|
35
36
|
const external_GroupNodeConfigContext_cjs_namespaceObject = require("./GroupNodeConfigContext.cjs");
|
|
36
37
|
const minWidth = 12 * external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
@@ -239,7 +240,7 @@ const GroupNodeComponent = ({ id, data, selected })=>{
|
|
|
239
240
|
]
|
|
240
241
|
});
|
|
241
242
|
};
|
|
242
|
-
const GroupNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(GroupNodeComponent);
|
|
243
|
+
const GroupNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(GroupNodeComponent, nodePropsEqual_cjs_namespaceObject.areNodePropsEqualIgnoringPosition);
|
|
243
244
|
exports.GroupNode = __webpack_exports__.GroupNode;
|
|
244
245
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
245
246
|
"GroupNode"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/GroupNode/GroupNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"GroupNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/GroupNode/GroupNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAmB1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,IAAI,EAAE,aAAa,CAAC;CACrB;AA2LD,eAAO,MAAM,SAAS,+DArL8B,cAAc,6CAqLkB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { NodeResizeControl, useReactFlow } from "../../xyflow/react.js";
|
|
|
3
3
|
import { memo, useCallback } from "react";
|
|
4
4
|
import { GRID_SPACING } from "../../constants.js";
|
|
5
5
|
import { CanvasIcon } from "../../utils/icon-registry.js";
|
|
6
|
+
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
6
7
|
import { BottomCornerIndicators, GroupContainer, GroupContent, GroupControls, GroupHeader, GroupHeaderButton, GroupHeaderSeparator, GroupIconWrapper, GroupTitle, ResizeHandle, TopCornerIndicators } from "./GroupNode.styles.js";
|
|
7
8
|
import { useGroupNodeConfig } from "./GroupNodeConfigContext.js";
|
|
8
9
|
const minWidth = 12 * GRID_SPACING;
|
|
@@ -211,5 +212,5 @@ const GroupNodeComponent = ({ id, data, selected })=>{
|
|
|
211
212
|
]
|
|
212
213
|
});
|
|
213
214
|
};
|
|
214
|
-
const GroupNode = /*#__PURE__*/ memo(GroupNodeComponent);
|
|
215
|
+
const GroupNode = /*#__PURE__*/ memo(GroupNodeComponent, areNodePropsEqualIgnoringPosition);
|
|
215
216
|
export { GroupNode };
|
|
@@ -30,6 +30,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
31
31
|
const external_react_namespaceObject = require("react");
|
|
32
32
|
const index_cjs_namespaceObject = require("../../core/index.cjs");
|
|
33
|
+
const nodePropsEqual_cjs_namespaceObject = require("../../utils/nodePropsEqual.cjs");
|
|
33
34
|
const external_LoopNode_cjs_namespaceObject = require("./LoopNode.cjs");
|
|
34
35
|
const external_LoopNode_helpers_cjs_namespaceObject = require("./LoopNode.helpers.cjs");
|
|
35
36
|
const external_LoopNodePreview_cjs_namespaceObject = require("./LoopNodePreview.cjs");
|
|
@@ -65,7 +66,7 @@ function LoopCanvasNodeComponent(props) {
|
|
|
65
66
|
onAddFirstChild: containerPreviewHandles ? handleAddFirstChild : void 0
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
|
-
const LoopCanvasNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(LoopCanvasNodeComponent);
|
|
69
|
+
const LoopCanvasNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(LoopCanvasNodeComponent, nodePropsEqual_cjs_namespaceObject.areNodePropsEqualIgnoringPosition);
|
|
69
70
|
exports.LoopCanvasNode = __webpack_exports__.LoopCanvasNode;
|
|
70
71
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
71
72
|
"LoopCanvasNode"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoopCanvasNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/LoopNode/LoopCanvasNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"LoopCanvasNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/LoopNode/LoopCanvasNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAOhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,iBAAS,uBAAuB,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,2CAkCpE;AAED,eAAO,MAAM,cAAc,qEAAmE,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useReactFlow } from "../../xyflow/react.js";
|
|
3
3
|
import { memo, useCallback, useMemo } from "react";
|
|
4
4
|
import { useOptionalNodeTypeRegistry } from "../../core/index.js";
|
|
5
|
+
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
5
6
|
import { LoopNode } from "./LoopNode.js";
|
|
6
7
|
import { resolveContainerPreviewConnectionHandles } from "./LoopNode.helpers.js";
|
|
7
8
|
import { showCenteredContainerPreview } from "./LoopNodePreview.js";
|
|
@@ -37,5 +38,5 @@ function LoopCanvasNodeComponent(props) {
|
|
|
37
38
|
onAddFirstChild: containerPreviewHandles ? handleAddFirstChild : void 0
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
const LoopCanvasNode = /*#__PURE__*/ memo(LoopCanvasNodeComponent);
|
|
41
|
+
const LoopCanvasNode = /*#__PURE__*/ memo(LoopCanvasNodeComponent, areNodePropsEqualIgnoringPosition);
|
|
41
42
|
export { LoopCanvasNode };
|
|
@@ -40,6 +40,7 @@ const container_cjs_namespaceObject = require("../../utils/container.cjs");
|
|
|
40
40
|
const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
|
|
41
41
|
const manifest_resolver_cjs_namespaceObject = require("../../utils/manifest-resolver.cjs");
|
|
42
42
|
const NodeUtils_cjs_namespaceObject = require("../../utils/NodeUtils.cjs");
|
|
43
|
+
const nodePropsEqual_cjs_namespaceObject = require("../../utils/nodePropsEqual.cjs");
|
|
43
44
|
const toolbar_resolver_cjs_namespaceObject = require("../../utils/toolbar-resolver.cjs");
|
|
44
45
|
const BaseCanvasModeProvider_cjs_namespaceObject = require("../BaseCanvas/BaseCanvasModeProvider.cjs");
|
|
45
46
|
const ConnectedHandlesContext_cjs_namespaceObject = require("../BaseCanvas/ConnectedHandlesContext.cjs");
|
|
@@ -396,7 +397,7 @@ function LoopNodeComponent(props) {
|
|
|
396
397
|
]
|
|
397
398
|
});
|
|
398
399
|
}
|
|
399
|
-
const LoopNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(LoopNodeComponent);
|
|
400
|
+
const LoopNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(LoopNodeComponent, nodePropsEqual_cjs_namespaceObject.areNodePropsEqualIgnoringPosition);
|
|
400
401
|
function Header({ title, icon, loading, isParallel, label, iterationPillState, nodeWidth, hasTopLeftAdornment, hasTopRightAdornment }) {
|
|
401
402
|
const titleContent = loading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
402
403
|
className: "h-5 w-28 animate-pulse rounded bg-(--canvas-background-overlay)"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoopNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/LoopNode/LoopNode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoopNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/LoopNode/LoopNode.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAA+B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAsInF,iBAAS,iBAAiB,CAAC,KAAK,EAAE,aAAa,2CAwR9C;AAED,eAAO,MAAM,QAAQ,+DAA6D,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { DEFAULT_CONTAINER_HEIGHT, DEFAULT_CONTAINER_MIN_HEIGHT, DEFAULT_CONTAIN
|
|
|
12
12
|
import { CanvasIcon } from "../../utils/icon-registry.js";
|
|
13
13
|
import { resolveDisplay, resolveHandles } from "../../utils/manifest-resolver.js";
|
|
14
14
|
import { selectIsConnecting, snapToGrid } from "../../utils/NodeUtils.js";
|
|
15
|
+
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
15
16
|
import { resolveToolbar } from "../../utils/toolbar-resolver.js";
|
|
16
17
|
import { useBaseCanvasMode } from "../BaseCanvas/BaseCanvasModeProvider.js";
|
|
17
18
|
import { useConnectedHandles } from "../BaseCanvas/ConnectedHandlesContext.js";
|
|
@@ -368,7 +369,7 @@ function LoopNodeComponent(props) {
|
|
|
368
369
|
]
|
|
369
370
|
});
|
|
370
371
|
}
|
|
371
|
-
const LoopNode = /*#__PURE__*/ memo(LoopNodeComponent);
|
|
372
|
+
const LoopNode = /*#__PURE__*/ memo(LoopNodeComponent, areNodePropsEqualIgnoringPosition);
|
|
372
373
|
function Header({ title, icon, loading, isParallel, label, iterationPillState, nodeWidth, hasTopLeftAdornment, hasTopRightAdornment }) {
|
|
373
374
|
const titleContent = loading ? /*#__PURE__*/ jsx("div", {
|
|
374
375
|
className: "h-5 w-28 animate-pulse rounded bg-(--canvas-background-overlay)"
|
|
@@ -28,6 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
const external_react_namespaceObject = require("react");
|
|
31
|
+
const nodePropsEqual_cjs_namespaceObject = require("../../utils/nodePropsEqual.cjs");
|
|
31
32
|
const index_cjs_namespaceObject = require("../FloatingCanvasPanel/index.cjs");
|
|
32
33
|
const external_NodeContextMenu_index_cjs_namespaceObject = require("../NodeContextMenu/index.cjs");
|
|
33
34
|
const hooks_index_cjs_namespaceObject = require("../NodePropertiesPanel/hooks/index.cjs");
|
|
@@ -202,7 +203,7 @@ const StageNodeInner = (props)=>{
|
|
|
202
203
|
]
|
|
203
204
|
});
|
|
204
205
|
};
|
|
205
|
-
const StageNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(StageNodeInner);
|
|
206
|
+
const StageNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(StageNodeInner, nodePropsEqual_cjs_namespaceObject.areNodePropsEqualIgnoringPosition);
|
|
206
207
|
exports.StageNode = __webpack_exports__.StageNode;
|
|
207
208
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
208
209
|
"StageNode"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StageNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,mBAAmB,CAAC;AAgM5E,eAAO,MAAM,SAAS,8CA1LS,cAAc,6CA0LmC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
3
4
|
import { FloatingCanvasPanel } from "../FloatingCanvasPanel/index.js";
|
|
4
5
|
import { NodeContextMenu } from "../NodeContextMenu/index.js";
|
|
5
6
|
import { useSetNodeSelection } from "../NodePropertiesPanel/hooks/index.js";
|
|
@@ -174,5 +175,5 @@ const StageNodeInner = (props)=>{
|
|
|
174
175
|
]
|
|
175
176
|
});
|
|
176
177
|
};
|
|
177
|
-
const StageNode = /*#__PURE__*/ memo(StageNodeInner);
|
|
178
|
+
const StageNode = /*#__PURE__*/ memo(StageNodeInner, areNodePropsEqualIgnoringPosition);
|
|
178
179
|
export { StageNode };
|
|
@@ -41,6 +41,7 @@ const external_index_cjs_namespaceObject = require("../../index.cjs");
|
|
|
41
41
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
42
42
|
const external_motion_react_namespaceObject = require("motion/react");
|
|
43
43
|
const external_react_namespaceObject = require("react");
|
|
44
|
+
const external_react_dom_namespaceObject = require("react-dom");
|
|
44
45
|
const external_react_markdown_namespaceObject = require("react-markdown");
|
|
45
46
|
var external_react_markdown_default = /*#__PURE__*/ __webpack_require__.n(external_react_markdown_namespaceObject);
|
|
46
47
|
const external_remark_breaks_namespaceObject = require("remark-breaks");
|
|
@@ -68,6 +69,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
68
69
|
const [isColorPickerOpen, setIsColorPickerOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
69
70
|
const [localContent, setLocalContent] = (0, external_react_namespaceObject.useState)(data.content || '');
|
|
70
71
|
const textAreaRef = (0, external_react_namespaceObject.useRef)(null);
|
|
72
|
+
const skipBlurRef = (0, external_react_namespaceObject.useRef)(null);
|
|
71
73
|
const { ref: markdownRef, scrollCaptureProps } = (0, external_useScrollCapture_cjs_namespaceObject.useScrollCapture)();
|
|
72
74
|
const colorButtonRef = (0, external_react_namespaceObject.useRef)(null);
|
|
73
75
|
const [activeFormats, setActiveFormats] = (0, external_react_namespaceObject.useState)({
|
|
@@ -131,10 +133,15 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
131
133
|
const handleBlur = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
132
134
|
setIsEditing(false);
|
|
133
135
|
if (readOnly) return;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
const content = textAreaRef.current?.value ?? localContent;
|
|
137
|
+
if (skipBlurRef.current === content) {
|
|
138
|
+
skipBlurRef.current = null;
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (content !== data.content) {
|
|
142
|
+
onContentChange?.(content);
|
|
136
143
|
updateNodeData(id, {
|
|
137
|
-
content
|
|
144
|
+
content
|
|
138
145
|
});
|
|
139
146
|
}
|
|
140
147
|
}, [
|
|
@@ -146,6 +153,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
146
153
|
readOnly
|
|
147
154
|
]);
|
|
148
155
|
const handleChange = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
156
|
+
skipBlurRef.current = null;
|
|
149
157
|
setLocalContent(e.target.value);
|
|
150
158
|
}, []);
|
|
151
159
|
const handleFormat = (0, external_react_namespaceObject.useCallback)((result)=>{
|
|
@@ -170,6 +178,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
170
178
|
const shortcutKeyDown = (0, external_useMarkdownShortcuts_cjs_namespaceObject.useMarkdownShortcuts)(textAreaRef, handleFormat);
|
|
171
179
|
const handleKeyDown = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
172
180
|
if ('Escape' === e.key) {
|
|
181
|
+
skipBlurRef.current = textAreaRef.current?.value ?? localContent;
|
|
173
182
|
setIsEditing(false);
|
|
174
183
|
setLocalContent(data.content || '');
|
|
175
184
|
textAreaRef.current?.blur();
|
|
@@ -193,16 +202,35 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
193
202
|
shortcutKeyDown(e);
|
|
194
203
|
}, [
|
|
195
204
|
data.content,
|
|
205
|
+
localContent,
|
|
196
206
|
shortcutKeyDown,
|
|
197
207
|
handleFormat
|
|
198
208
|
]);
|
|
199
209
|
const handleResizeStart = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
200
|
-
if (isEditing)
|
|
210
|
+
if (isEditing) {
|
|
211
|
+
const content = textAreaRef.current?.value ?? localContent;
|
|
212
|
+
if (!readOnly && content !== data.content) {
|
|
213
|
+
skipBlurRef.current = content;
|
|
214
|
+
(0, external_react_dom_namespaceObject.flushSync)(()=>{
|
|
215
|
+
onContentChange?.(content);
|
|
216
|
+
updateNodeData(id, {
|
|
217
|
+
content
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
textAreaRef.current?.blur();
|
|
222
|
+
}
|
|
201
223
|
setIsResizing(true);
|
|
202
224
|
onResizeStart?.();
|
|
203
225
|
}, [
|
|
226
|
+
data.content,
|
|
227
|
+
id,
|
|
204
228
|
isEditing,
|
|
205
|
-
|
|
229
|
+
localContent,
|
|
230
|
+
onContentChange,
|
|
231
|
+
onResizeStart,
|
|
232
|
+
readOnly,
|
|
233
|
+
updateNodeData
|
|
206
234
|
]);
|
|
207
235
|
const handleResizeEnd = (0, external_react_namespaceObject.useCallback)((_event, params)=>{
|
|
208
236
|
setIsResizing(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAkC1E,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAiB,MAAM,wBAAwB,CAAC;AAM7F,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAwcD,eAAO,MAAM,cAAc,kMAtbxB,mBAAmB,6CAsbqC,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { CanvasIcon } from "../../index.js";
|
|
|
4
4
|
import { NodeResizeControl, useReactFlow } from "../../xyflow/react.js";
|
|
5
5
|
import { AnimatePresence } from "motion/react";
|
|
6
6
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { flushSync } from "react-dom";
|
|
7
8
|
import react_markdown from "react-markdown";
|
|
8
9
|
import remark_breaks from "remark-breaks";
|
|
9
10
|
import remark_gfm from "remark-gfm";
|
|
@@ -28,6 +29,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
28
29
|
const [isColorPickerOpen, setIsColorPickerOpen] = useState(false);
|
|
29
30
|
const [localContent, setLocalContent] = useState(data.content || '');
|
|
30
31
|
const textAreaRef = useRef(null);
|
|
32
|
+
const skipBlurRef = useRef(null);
|
|
31
33
|
const { ref: markdownRef, scrollCaptureProps } = useScrollCapture();
|
|
32
34
|
const colorButtonRef = useRef(null);
|
|
33
35
|
const [activeFormats, setActiveFormats] = useState({
|
|
@@ -91,10 +93,15 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
91
93
|
const handleBlur = useCallback(()=>{
|
|
92
94
|
setIsEditing(false);
|
|
93
95
|
if (readOnly) return;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
const content = textAreaRef.current?.value ?? localContent;
|
|
97
|
+
if (skipBlurRef.current === content) {
|
|
98
|
+
skipBlurRef.current = null;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (content !== data.content) {
|
|
102
|
+
onContentChange?.(content);
|
|
96
103
|
updateNodeData(id, {
|
|
97
|
-
content
|
|
104
|
+
content
|
|
98
105
|
});
|
|
99
106
|
}
|
|
100
107
|
}, [
|
|
@@ -106,6 +113,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
106
113
|
readOnly
|
|
107
114
|
]);
|
|
108
115
|
const handleChange = useCallback((e)=>{
|
|
116
|
+
skipBlurRef.current = null;
|
|
109
117
|
setLocalContent(e.target.value);
|
|
110
118
|
}, []);
|
|
111
119
|
const handleFormat = useCallback((result)=>{
|
|
@@ -130,6 +138,7 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
130
138
|
const shortcutKeyDown = useMarkdownShortcuts(textAreaRef, handleFormat);
|
|
131
139
|
const handleKeyDown = useCallback((e)=>{
|
|
132
140
|
if ('Escape' === e.key) {
|
|
141
|
+
skipBlurRef.current = textAreaRef.current?.value ?? localContent;
|
|
133
142
|
setIsEditing(false);
|
|
134
143
|
setLocalContent(data.content || '');
|
|
135
144
|
textAreaRef.current?.blur();
|
|
@@ -153,16 +162,35 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
153
162
|
shortcutKeyDown(e);
|
|
154
163
|
}, [
|
|
155
164
|
data.content,
|
|
165
|
+
localContent,
|
|
156
166
|
shortcutKeyDown,
|
|
157
167
|
handleFormat
|
|
158
168
|
]);
|
|
159
169
|
const handleResizeStart = useCallback(()=>{
|
|
160
|
-
if (isEditing)
|
|
170
|
+
if (isEditing) {
|
|
171
|
+
const content = textAreaRef.current?.value ?? localContent;
|
|
172
|
+
if (!readOnly && content !== data.content) {
|
|
173
|
+
skipBlurRef.current = content;
|
|
174
|
+
flushSync(()=>{
|
|
175
|
+
onContentChange?.(content);
|
|
176
|
+
updateNodeData(id, {
|
|
177
|
+
content
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
textAreaRef.current?.blur();
|
|
182
|
+
}
|
|
161
183
|
setIsResizing(true);
|
|
162
184
|
onResizeStart?.();
|
|
163
185
|
}, [
|
|
186
|
+
data.content,
|
|
187
|
+
id,
|
|
164
188
|
isEditing,
|
|
165
|
-
|
|
189
|
+
localContent,
|
|
190
|
+
onContentChange,
|
|
191
|
+
onResizeStart,
|
|
192
|
+
readOnly,
|
|
193
|
+
updateNodeData
|
|
166
194
|
]);
|
|
167
195
|
const handleResizeEnd = useCallback((_event, params)=>{
|
|
168
196
|
setIsResizing(false);
|
|
@@ -30,6 +30,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
31
31
|
const external_react_namespaceObject = require("react");
|
|
32
32
|
const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
|
|
33
|
+
const nodePropsEqual_cjs_namespaceObject = require("../../utils/nodePropsEqual.cjs");
|
|
33
34
|
const ConnectedHandlesContext_cjs_namespaceObject = require("../BaseCanvas/ConnectedHandlesContext.cjs");
|
|
34
35
|
const useButtonHandles_cjs_namespaceObject = require("../ButtonHandle/useButtonHandles.cjs");
|
|
35
36
|
const external_CanvasTooltip_cjs_namespaceObject = require("../CanvasTooltip.cjs");
|
|
@@ -96,7 +97,7 @@ const TriggerNodeComponent = (props)=>{
|
|
|
96
97
|
]
|
|
97
98
|
});
|
|
98
99
|
};
|
|
99
|
-
const TriggerNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(TriggerNodeComponent);
|
|
100
|
+
const TriggerNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(TriggerNodeComponent, nodePropsEqual_cjs_namespaceObject.areNodePropsEqualIgnoringPosition);
|
|
100
101
|
exports.TriggerNode = __webpack_exports__.TriggerNode;
|
|
101
102
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
102
103
|
"TriggerNode"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/TriggerNode/TriggerNode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TriggerNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/TriggerNode/TriggerNode.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAgE5D,eAAO,MAAM,WAAW,8CA9Da,gBAAgB,6CA8DmC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Position, useStore } from "../../xyflow/react.js";
|
|
3
3
|
import { memo, useCallback, useMemo, useState } from "react";
|
|
4
4
|
import { CanvasIcon } from "../../utils/icon-registry.js";
|
|
5
|
+
import { areNodePropsEqualIgnoringPosition } from "../../utils/nodePropsEqual.js";
|
|
5
6
|
import { useConnectedHandles } from "../BaseCanvas/ConnectedHandlesContext.js";
|
|
6
7
|
import { useButtonHandles } from "../ButtonHandle/useButtonHandles.js";
|
|
7
8
|
import { CanvasTooltip } from "../CanvasTooltip.js";
|
|
@@ -68,5 +69,5 @@ const TriggerNodeComponent = (props)=>{
|
|
|
68
69
|
]
|
|
69
70
|
});
|
|
70
71
|
};
|
|
71
|
-
const TriggerNode = /*#__PURE__*/ memo(TriggerNodeComponent);
|
|
72
|
+
const TriggerNode = /*#__PURE__*/ memo(TriggerNodeComponent, areNodePropsEqualIgnoringPosition);
|
|
72
73
|
export { TriggerNode };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
areNodePropsEqualIgnoringPosition: ()=>areNodePropsEqualIgnoringPosition
|
|
28
|
+
});
|
|
29
|
+
function areNodePropsEqualIgnoringPosition(prevProps, nextProps) {
|
|
30
|
+
if (prevProps === nextProps) return true;
|
|
31
|
+
const prev = prevProps;
|
|
32
|
+
const next = nextProps;
|
|
33
|
+
const prevKeys = Object.keys(prev);
|
|
34
|
+
const nextKeys = Object.keys(next);
|
|
35
|
+
if (prevKeys.length !== nextKeys.length) return false;
|
|
36
|
+
for (const key of prevKeys)if ('positionAbsoluteX' !== key && 'positionAbsoluteY' !== key) {
|
|
37
|
+
if (!Object.prototype.hasOwnProperty.call(next, key)) return false;
|
|
38
|
+
if (!Object.is(prev[key], next[key])) return false;
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
exports.areNodePropsEqualIgnoringPosition = __webpack_exports__.areNodePropsEqualIgnoringPosition;
|
|
43
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
44
|
+
"areNodePropsEqualIgnoringPosition"
|
|
45
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
46
|
+
Object.defineProperty(exports, '__esModule', {
|
|
47
|
+
value: true
|
|
48
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodePropsEqual.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/nodePropsEqual.ts"],"names":[],"mappings":"AAkBA,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CA8B/F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function areNodePropsEqualIgnoringPosition(prevProps, nextProps) {
|
|
2
|
+
if (prevProps === nextProps) return true;
|
|
3
|
+
const prev = prevProps;
|
|
4
|
+
const next = nextProps;
|
|
5
|
+
const prevKeys = Object.keys(prev);
|
|
6
|
+
const nextKeys = Object.keys(next);
|
|
7
|
+
if (prevKeys.length !== nextKeys.length) return false;
|
|
8
|
+
for (const key of prevKeys)if ('positionAbsoluteX' !== key && 'positionAbsoluteY' !== key) {
|
|
9
|
+
if (!Object.prototype.hasOwnProperty.call(next, key)) return false;
|
|
10
|
+
if (!Object.is(prev[key], next[key])) return false;
|
|
11
|
+
}
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
export { areNodePropsEqualIgnoringPosition };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "4.39.
|
|
3
|
+
"version": "4.39.2",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"html-to-image": "^1.11.11",
|
|
187
187
|
"katex": "^0.16.27",
|
|
188
188
|
"lodash": "^4.18.1",
|
|
189
|
-
"lucide-react": "^0.
|
|
189
|
+
"lucide-react": "^0.577.0",
|
|
190
190
|
"luxon": "^3.7.1",
|
|
191
191
|
"mermaid": "^11.15.0",
|
|
192
192
|
"motion": "^12.23.12",
|
|
@@ -205,8 +205,8 @@
|
|
|
205
205
|
"use-sync-external-store": "^1.2.0",
|
|
206
206
|
"zod": "^4.3.5",
|
|
207
207
|
"zustand": "^5.0.9",
|
|
208
|
-
"@uipath/apollo-
|
|
209
|
-
"@uipath/apollo-
|
|
208
|
+
"@uipath/apollo-wind": "2.18.0",
|
|
209
|
+
"@uipath/apollo-core": "5.9.1"
|
|
210
210
|
},
|
|
211
211
|
"devDependencies": {
|
|
212
212
|
"@lingui/cli": "^5.6.1",
|