🚀 chore(package.json): update reactflow package version to 11.9.2 for bug fixes and improvements
🐛 fix(dictAreaModal/index.tsx): prevent delete Node and close modal when user presses backspace key to improve user experience
This commit is contained in:
parent
ee800abb3a
commit
4e613117d6
3 changed files with 112 additions and 103 deletions
130
src/frontend/package-lock.json
generated
130
src/frontend/package-lock.json
generated
|
|
@ -59,7 +59,7 @@
|
|||
"react-tabs": "^6.0.2",
|
||||
"react-tooltip": "^5.21.1",
|
||||
"react18-json-view": "^0.2.3",
|
||||
"reactflow": "^11.8.3",
|
||||
"reactflow": "^11.9.2",
|
||||
"rehype-mathjax": "^4.0.3",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-math": "^5.1.1",
|
||||
|
|
@ -2587,11 +2587,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@reactflow/background": {
|
||||
"version": "11.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/background/-/background-11.3.1.tgz",
|
||||
"integrity": "sha512-FjYHXvzwwaCJJS5rRxXbU4r8xbAqEvLQkO1l4czjWgrE0VQELC93RKVI4lRpkv2RkkIwRNMvoGb6kXNbJWiU/g==",
|
||||
"version": "11.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/background/-/background-11.3.2.tgz",
|
||||
"integrity": "sha512-KOy24lz9HpaBlx5KGcpQRsbMRWWkZdFyRxFq5RfPy6BnxDx0GFZ2o2igKKVutuo2bgCQdhaqzipcOUHlEAvnbQ==",
|
||||
"dependencies": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.3",
|
||||
"zustand": "^4.4.1"
|
||||
},
|
||||
|
|
@ -2601,11 +2601,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@reactflow/controls": {
|
||||
"version": "11.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/controls/-/controls-11.2.1.tgz",
|
||||
"integrity": "sha512-mW8kz/J77tc5uRwSTSUH1OtkksaVc52Dbz7aTuF0aKZXwPHoAfRPFeet2VLQV1IdKeSab82Mqy0WTSJj6Hl15w==",
|
||||
"version": "11.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/controls/-/controls-11.2.2.tgz",
|
||||
"integrity": "sha512-VuDxm9l0B4esXzRpzKRqH7Sc1Szj+KBV1bsswaOQWDbLlGKRtIZMXjdQ9BwBf+PMJD4ANrmnGEdHxFTL6NUpbg==",
|
||||
"dependencies": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.3",
|
||||
"zustand": "^4.4.1"
|
||||
},
|
||||
|
|
@ -2615,9 +2615,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@reactflow/core": {
|
||||
"version": "11.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/core/-/core-11.9.1.tgz",
|
||||
"integrity": "sha512-qXWwB2KSWkp3MH3fhY1HL4yFBvMZ+7y9mkfk0we7wCuGNgQzWVJDwvVEpPTkyp5xyxX53sSF3UDC+UaFCB4ElA==",
|
||||
"version": "11.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/core/-/core-11.9.2.tgz",
|
||||
"integrity": "sha512-/tiE8sPShzeWFnshvi8hc1lbp1C5PLgAFl94JQdBstq94uOBTpdoI//1MN4a+fGp1xwAUP7P0IcLuWqIDZgrZg==",
|
||||
"dependencies": {
|
||||
"@types/d3": "^7.4.0",
|
||||
"@types/d3-drag": "^3.0.1",
|
||||
|
|
@ -2635,11 +2635,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@reactflow/minimap": {
|
||||
"version": "11.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/minimap/-/minimap-11.7.1.tgz",
|
||||
"integrity": "sha512-ZNHx1wURS055kYYaiFhrmGYI2UXA7Cwcjxfww4Mq3PWvIIaEFL9t34aUWoXCYm+NPFHElwC8jM7Vyp7xDR9oyg==",
|
||||
"version": "11.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/minimap/-/minimap-11.7.2.tgz",
|
||||
"integrity": "sha512-GqhJ0AoNhYf/GXI7JlWOR4THvi1nEcyo6sL6pGupJu8Ve1b8rpcTKNh4mXIerl8x0oRF8ajGvpIvh4R6rEtLoQ==",
|
||||
"dependencies": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"@types/d3-selection": "^3.0.3",
|
||||
"@types/d3-zoom": "^3.0.1",
|
||||
"classcat": "^5.0.3",
|
||||
|
|
@ -2653,11 +2653,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@reactflow/node-resizer": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-resizer/-/node-resizer-2.2.1.tgz",
|
||||
"integrity": "sha512-nUh73WHVAYsJLvgSKqKAxIPU9vUkEM5iold2zQsEOHqjfnk86m1r33fTEiw5+MPqCFHMoGzyZe2gxXUMFqg/3A==",
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-resizer/-/node-resizer-2.2.2.tgz",
|
||||
"integrity": "sha512-p8fqfEtMdXVAEdAT74GVpMeIm2v2t92LObKPFvIbOaA11vmcp+jSt45y2mPD6CxP6snzEVHXigYmGZNiujDtlQ==",
|
||||
"dependencies": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.4",
|
||||
"d3-drag": "^3.0.0",
|
||||
"d3-selection": "^3.0.0",
|
||||
|
|
@ -2669,11 +2669,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@reactflow/node-toolbar": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-toolbar/-/node-toolbar-1.3.1.tgz",
|
||||
"integrity": "sha512-YkrpB2+/9ymZ2h1nmuKytmrFlIXdiDzeDqmZnyJF2UNH/4sSo/GswPJmqiA8ETOP2oEdIkNmO9dwVpiDvWtZ5A==",
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-toolbar/-/node-toolbar-1.3.2.tgz",
|
||||
"integrity": "sha512-s8gP07HClKDidsBSrcljoK600cdVLLBK1gNK0bSVpCk3hBVKUkEGESwMf7VwpZ1oxhM3859R3pz++7lUrbmF3w==",
|
||||
"dependencies": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.3",
|
||||
"zustand": "^4.4.1"
|
||||
},
|
||||
|
|
@ -9076,16 +9076,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/reactflow": {
|
||||
"version": "11.9.1",
|
||||
"resolved": "https://registry.npmjs.org/reactflow/-/reactflow-11.9.1.tgz",
|
||||
"integrity": "sha512-lKWWWFne/o8/SShIeXXP4J/15384L0KDohH0It83gNKFgF6Yo7/EJE9p6k3CnYnOfyYETFRYb1KNOY04cSmtVA==",
|
||||
"version": "11.9.2",
|
||||
"resolved": "https://registry.npmjs.org/reactflow/-/reactflow-11.9.2.tgz",
|
||||
"integrity": "sha512-hARhGVX9rcZhtRWsjBszDpF0EefsYhCzrRCk12CsB2oqWJZPLQD4OYh5eQygr9Yi3M/i+3+rcNyPs9IsFzU5iQ==",
|
||||
"dependencies": {
|
||||
"@reactflow/background": "11.3.1",
|
||||
"@reactflow/controls": "11.2.1",
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/minimap": "11.7.1",
|
||||
"@reactflow/node-resizer": "2.2.1",
|
||||
"@reactflow/node-toolbar": "1.3.1"
|
||||
"@reactflow/background": "11.3.2",
|
||||
"@reactflow/controls": "11.2.2",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"@reactflow/minimap": "11.7.2",
|
||||
"@reactflow/node-resizer": "2.2.2",
|
||||
"@reactflow/node-toolbar": "1.3.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=17",
|
||||
|
|
@ -12873,29 +12873,29 @@
|
|||
}
|
||||
},
|
||||
"@reactflow/background": {
|
||||
"version": "11.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/background/-/background-11.3.1.tgz",
|
||||
"integrity": "sha512-FjYHXvzwwaCJJS5rRxXbU4r8xbAqEvLQkO1l4czjWgrE0VQELC93RKVI4lRpkv2RkkIwRNMvoGb6kXNbJWiU/g==",
|
||||
"version": "11.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/background/-/background-11.3.2.tgz",
|
||||
"integrity": "sha512-KOy24lz9HpaBlx5KGcpQRsbMRWWkZdFyRxFq5RfPy6BnxDx0GFZ2o2igKKVutuo2bgCQdhaqzipcOUHlEAvnbQ==",
|
||||
"requires": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.3",
|
||||
"zustand": "^4.4.1"
|
||||
}
|
||||
},
|
||||
"@reactflow/controls": {
|
||||
"version": "11.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/controls/-/controls-11.2.1.tgz",
|
||||
"integrity": "sha512-mW8kz/J77tc5uRwSTSUH1OtkksaVc52Dbz7aTuF0aKZXwPHoAfRPFeet2VLQV1IdKeSab82Mqy0WTSJj6Hl15w==",
|
||||
"version": "11.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/controls/-/controls-11.2.2.tgz",
|
||||
"integrity": "sha512-VuDxm9l0B4esXzRpzKRqH7Sc1Szj+KBV1bsswaOQWDbLlGKRtIZMXjdQ9BwBf+PMJD4ANrmnGEdHxFTL6NUpbg==",
|
||||
"requires": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.3",
|
||||
"zustand": "^4.4.1"
|
||||
}
|
||||
},
|
||||
"@reactflow/core": {
|
||||
"version": "11.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/core/-/core-11.9.1.tgz",
|
||||
"integrity": "sha512-qXWwB2KSWkp3MH3fhY1HL4yFBvMZ+7y9mkfk0we7wCuGNgQzWVJDwvVEpPTkyp5xyxX53sSF3UDC+UaFCB4ElA==",
|
||||
"version": "11.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/core/-/core-11.9.2.tgz",
|
||||
"integrity": "sha512-/tiE8sPShzeWFnshvi8hc1lbp1C5PLgAFl94JQdBstq94uOBTpdoI//1MN4a+fGp1xwAUP7P0IcLuWqIDZgrZg==",
|
||||
"requires": {
|
||||
"@types/d3": "^7.4.0",
|
||||
"@types/d3-drag": "^3.0.1",
|
||||
|
|
@ -12909,11 +12909,11 @@
|
|||
}
|
||||
},
|
||||
"@reactflow/minimap": {
|
||||
"version": "11.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/minimap/-/minimap-11.7.1.tgz",
|
||||
"integrity": "sha512-ZNHx1wURS055kYYaiFhrmGYI2UXA7Cwcjxfww4Mq3PWvIIaEFL9t34aUWoXCYm+NPFHElwC8jM7Vyp7xDR9oyg==",
|
||||
"version": "11.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/minimap/-/minimap-11.7.2.tgz",
|
||||
"integrity": "sha512-GqhJ0AoNhYf/GXI7JlWOR4THvi1nEcyo6sL6pGupJu8Ve1b8rpcTKNh4mXIerl8x0oRF8ajGvpIvh4R6rEtLoQ==",
|
||||
"requires": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"@types/d3-selection": "^3.0.3",
|
||||
"@types/d3-zoom": "^3.0.1",
|
||||
"classcat": "^5.0.3",
|
||||
|
|
@ -12923,11 +12923,11 @@
|
|||
}
|
||||
},
|
||||
"@reactflow/node-resizer": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-resizer/-/node-resizer-2.2.1.tgz",
|
||||
"integrity": "sha512-nUh73WHVAYsJLvgSKqKAxIPU9vUkEM5iold2zQsEOHqjfnk86m1r33fTEiw5+MPqCFHMoGzyZe2gxXUMFqg/3A==",
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-resizer/-/node-resizer-2.2.2.tgz",
|
||||
"integrity": "sha512-p8fqfEtMdXVAEdAT74GVpMeIm2v2t92LObKPFvIbOaA11vmcp+jSt45y2mPD6CxP6snzEVHXigYmGZNiujDtlQ==",
|
||||
"requires": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.4",
|
||||
"d3-drag": "^3.0.0",
|
||||
"d3-selection": "^3.0.0",
|
||||
|
|
@ -12935,11 +12935,11 @@
|
|||
}
|
||||
},
|
||||
"@reactflow/node-toolbar": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-toolbar/-/node-toolbar-1.3.1.tgz",
|
||||
"integrity": "sha512-YkrpB2+/9ymZ2h1nmuKytmrFlIXdiDzeDqmZnyJF2UNH/4sSo/GswPJmqiA8ETOP2oEdIkNmO9dwVpiDvWtZ5A==",
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@reactflow/node-toolbar/-/node-toolbar-1.3.2.tgz",
|
||||
"integrity": "sha512-s8gP07HClKDidsBSrcljoK600cdVLLBK1gNK0bSVpCk3hBVKUkEGESwMf7VwpZ1oxhM3859R3pz++7lUrbmF3w==",
|
||||
"requires": {
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"classcat": "^5.0.3",
|
||||
"zustand": "^4.4.1"
|
||||
}
|
||||
|
|
@ -17264,16 +17264,16 @@
|
|||
"requires": {}
|
||||
},
|
||||
"reactflow": {
|
||||
"version": "11.9.1",
|
||||
"resolved": "https://registry.npmjs.org/reactflow/-/reactflow-11.9.1.tgz",
|
||||
"integrity": "sha512-lKWWWFne/o8/SShIeXXP4J/15384L0KDohH0It83gNKFgF6Yo7/EJE9p6k3CnYnOfyYETFRYb1KNOY04cSmtVA==",
|
||||
"version": "11.9.2",
|
||||
"resolved": "https://registry.npmjs.org/reactflow/-/reactflow-11.9.2.tgz",
|
||||
"integrity": "sha512-hARhGVX9rcZhtRWsjBszDpF0EefsYhCzrRCk12CsB2oqWJZPLQD4OYh5eQygr9Yi3M/i+3+rcNyPs9IsFzU5iQ==",
|
||||
"requires": {
|
||||
"@reactflow/background": "11.3.1",
|
||||
"@reactflow/controls": "11.2.1",
|
||||
"@reactflow/core": "11.9.1",
|
||||
"@reactflow/minimap": "11.7.1",
|
||||
"@reactflow/node-resizer": "2.2.1",
|
||||
"@reactflow/node-toolbar": "1.3.1"
|
||||
"@reactflow/background": "11.3.2",
|
||||
"@reactflow/controls": "11.2.2",
|
||||
"@reactflow/core": "11.9.2",
|
||||
"@reactflow/minimap": "11.7.2",
|
||||
"@reactflow/node-resizer": "2.2.2",
|
||||
"@reactflow/node-toolbar": "1.3.2"
|
||||
}
|
||||
},
|
||||
"read-cache": {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
"react-tabs": "^6.0.2",
|
||||
"react-tooltip": "^5.21.1",
|
||||
"react18-json-view": "^0.2.3",
|
||||
"reactflow": "^11.8.3",
|
||||
"reactflow": "^11.9.2",
|
||||
"rehype-mathjax": "^4.0.3",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-math": "^5.1.1",
|
||||
|
|
|
|||
|
|
@ -26,46 +26,55 @@ export default function DictAreaModal({
|
|||
if (value) ref.current = value;
|
||||
}, [ref]);
|
||||
|
||||
//This code prevents delete Node and close modal when user press backspace key
|
||||
const handleKeyDown = (event) => {
|
||||
if (event.code === "Backspace") {
|
||||
event.stopPropagation();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<BaseModal size="medium-h-full" open={open} setOpen={setOpen}>
|
||||
<BaseModal.Trigger>{children}</BaseModal.Trigger>
|
||||
<BaseModal.Header description={CODE_DICT_DIALOG_SUBTITLE}>
|
||||
<span className="pr-2">Edit Dictionary</span>
|
||||
<IconComponent
|
||||
name="BookMarked"
|
||||
className="h-6 w-6 pl-1 text-primary "
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</BaseModal.Header>
|
||||
<BaseModal.Content>
|
||||
<div className="nopan nodrag noundo nocopy flex h-full w-full flex-col transition-all">
|
||||
<JsonView
|
||||
theme="vscode"
|
||||
dark={true}
|
||||
editable
|
||||
enableClipboard
|
||||
onEdit={(edit) => {
|
||||
ref.current = edit["src"];
|
||||
}}
|
||||
onChange={(edit) => {
|
||||
ref.current = edit["src"];
|
||||
}}
|
||||
src={ref.current}
|
||||
<div onKeyDown={handleKeyDown} className="h-full w-full">
|
||||
<BaseModal size="medium-h-full" open={open} setOpen={setOpen}>
|
||||
<BaseModal.Trigger>{children}</BaseModal.Trigger>
|
||||
<BaseModal.Header description={CODE_DICT_DIALOG_SUBTITLE}>
|
||||
<span className="pr-2">Edit Dictionary</span>
|
||||
<IconComponent
|
||||
name="BookMarked"
|
||||
className="h-6 w-6 pl-1 text-primary "
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div className="flex h-fit w-full justify-end">
|
||||
<Button
|
||||
className="mt-3"
|
||||
type="submit"
|
||||
onClick={() => {
|
||||
onChange(ref.current);
|
||||
setOpen(false);
|
||||
</BaseModal.Header>
|
||||
<BaseModal.Content>
|
||||
<div className="nopan nodrag noundo nocopy flex h-full w-full flex-col transition-all ">
|
||||
<JsonView
|
||||
theme="vscode"
|
||||
dark={true}
|
||||
editable
|
||||
enableClipboard
|
||||
onEdit={(edit) => {
|
||||
ref.current = edit["src"];
|
||||
}}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
onChange={(edit) => {
|
||||
ref.current = edit["src"];
|
||||
}}
|
||||
src={ref.current}
|
||||
/>
|
||||
<div className="flex h-fit w-full justify-end">
|
||||
<Button
|
||||
className="mt-3"
|
||||
type="submit"
|
||||
onClick={() => {
|
||||
onChange(ref.current);
|
||||
setOpen(false);
|
||||
}}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</BaseModal.Content>
|
||||
</BaseModal>
|
||||
</BaseModal.Content>
|
||||
</BaseModal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue