Merge branch 'dev' into feat/shadUI
This commit is contained in:
commit
741c5a8cd4
4 changed files with 16 additions and 84 deletions
21
src/frontend/package-lock.json
generated
21
src/frontend/package-lock.json
generated
|
|
@ -567,8 +567,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@floating-ui/react-dom": {
|
"node_modules/@floating-ui/react-dom": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.0.tgz",
|
"license": "MIT",
|
||||||
"integrity": "sha512-Ke0oU3SeuABC2C4OFu2mSAwHIP5WUiV98O9YWoHV4Q5aT6E9k06DV0Khi5uYspR8xmmBk08t8ZDcz3TR3ARkEg==",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@floating-ui/dom": "^1.2.7"
|
"@floating-ui/dom": "^1.2.7"
|
||||||
},
|
},
|
||||||
|
|
@ -925,8 +924,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@radix-ui/react-arrow": {
|
"node_modules/@radix-ui/react-arrow": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz",
|
"license": "MIT",
|
||||||
"integrity": "sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.13.10",
|
"@babel/runtime": "^7.13.10",
|
||||||
"@radix-ui/react-primitive": "1.0.3"
|
"@radix-ui/react-primitive": "1.0.3"
|
||||||
|
|
@ -1149,8 +1147,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@radix-ui/react-popper": {
|
"node_modules/@radix-ui/react-popper": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.2.tgz",
|
"license": "MIT",
|
||||||
"integrity": "sha512-1CnGGfFi/bbqtJZZ0P/NQY20xdG3E0LALJaLUEoKwPLwl6PPPfbeiCqMVQnhoFRAxjJj4RpBRJzDmUgsex2tSg==",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.13.10",
|
"@babel/runtime": "^7.13.10",
|
||||||
"@floating-ui/react-dom": "^2.0.0",
|
"@floating-ui/react-dom": "^2.0.0",
|
||||||
|
|
@ -1293,8 +1290,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@radix-ui/react-tooltip": {
|
"node_modules/@radix-ui/react-tooltip": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.6.tgz",
|
"license": "MIT",
|
||||||
"integrity": "sha512-DmNFOiwEc2UDigsYj6clJENma58OelxD24O4IODoZ+3sQc3Zb+L8w1EP+y9laTuKCLAysPw4fD6/v0j4KNV8rg==",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.13.10",
|
"@babel/runtime": "^7.13.10",
|
||||||
"@radix-ui/primitive": "1.0.1",
|
"@radix-ui/primitive": "1.0.1",
|
||||||
|
|
@ -1409,8 +1405,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@radix-ui/react-use-rect": {
|
"node_modules/@radix-ui/react-use-rect": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz",
|
"license": "MIT",
|
||||||
"integrity": "sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.13.10",
|
"@babel/runtime": "^7.13.10",
|
||||||
"@radix-ui/rect": "1.0.1"
|
"@radix-ui/rect": "1.0.1"
|
||||||
|
|
@ -1444,8 +1439,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@radix-ui/react-visually-hidden": {
|
"node_modules/@radix-ui/react-visually-hidden": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz",
|
"license": "MIT",
|
||||||
"integrity": "sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.13.10",
|
"@babel/runtime": "^7.13.10",
|
||||||
"@radix-ui/react-primitive": "1.0.3"
|
"@radix-ui/react-primitive": "1.0.3"
|
||||||
|
|
@ -1467,8 +1461,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@radix-ui/rect": {
|
"node_modules/@radix-ui/rect": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.1.tgz",
|
"license": "MIT",
|
||||||
"integrity": "sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.13.10"
|
"@babel/runtime": "^7.13.10"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export default function ParameterComponent({
|
||||||
|
|
||||||
refHtml.current = groupedObj.map((item, i) => (
|
refHtml.current = groupedObj.map((item, i) => (
|
||||||
<span
|
<span
|
||||||
key={item}
|
key={i}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
i > 0 ? "items-center flex mt-3" : "items-center flex"
|
i > 0 ? "items-center flex mt-3" : "items-center flex"
|
||||||
)}
|
)}
|
||||||
|
|
@ -86,7 +86,7 @@ export default function ParameterComponent({
|
||||||
{item.type.split(", ").length > 2
|
{item.type.split(", ").length > 2
|
||||||
? item.type.split(", ").map((el, i) => (
|
? item.type.split(", ").map((el, i) => (
|
||||||
<>
|
<>
|
||||||
<span key={el}>
|
<span key={i}>
|
||||||
{i == item.type.split(", ").length - 1
|
{i == item.type.split(", ").length - 1
|
||||||
? el
|
? el
|
||||||
: (el += `, `)}
|
: (el += `, `)}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import { TabsContext } from "../../../../contexts/tabsContext";
|
||||||
import { useReactFlow } from "reactflow";
|
import { useReactFlow } from "reactflow";
|
||||||
import EditNodeModal from "../../../../modals/EditNodeModal";
|
import EditNodeModal from "../../../../modals/EditNodeModal";
|
||||||
import TooltipReact from "../../../../components/ReactTooltipComponent";
|
import TooltipReact from "../../../../components/ReactTooltipComponent";
|
||||||
|
import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
||||||
|
|
||||||
const NodeToolbarComponent = (props) => {
|
const NodeToolbarComponent = (props) => {
|
||||||
const [nodeLength, setNodeLength] = useState(
|
const [nodeLength, setNodeLength] = useState(
|
||||||
|
|
@ -40,12 +41,7 @@ const NodeToolbarComponent = (props) => {
|
||||||
<>
|
<>
|
||||||
<div className="h-10 w-26">
|
<div className="h-10 w-26">
|
||||||
<span className="isolate inline-flex rounded-md shadow-sm">
|
<span className="isolate inline-flex rounded-md shadow-sm">
|
||||||
<TooltipReact
|
<ShadTooltip delayDuration={1000} content="Delete" side="top">
|
||||||
delayShow={1000}
|
|
||||||
selector="Delete"
|
|
||||||
htmlContent="Delete"
|
|
||||||
position="top"
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
className="hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative inline-flex items-center rounded-l-md bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
|
className="hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative inline-flex items-center rounded-l-md bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -54,59 +50,9 @@ const NodeToolbarComponent = (props) => {
|
||||||
>
|
>
|
||||||
<TrashIcon className="w-5 h-5 dark:text-gray-300"></TrashIcon>
|
<TrashIcon className="w-5 h-5 dark:text-gray-300"></TrashIcon>
|
||||||
</button>
|
</button>
|
||||||
</TooltipReact>
|
</ShadTooltip>
|
||||||
|
|
||||||
<TooltipReact
|
<ShadTooltip delayDuration={1000} content="Duplicate" side="top">
|
||||||
delayShow={1000}
|
|
||||||
selector="Settings"
|
|
||||||
htmlContent="Settings"
|
|
||||||
position="top"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
className={classNames(
|
|
||||||
Object.keys(props.data.node.template).some(
|
|
||||||
(t) =>
|
|
||||||
props.data.node.template[t].advanced &&
|
|
||||||
props.data.node.template[t].show
|
|
||||||
)
|
|
||||||
? "hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative -ml-px inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10"
|
|
||||||
: "hidden"
|
|
||||||
)}
|
|
||||||
onClick={(event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
props.openPopUp(<NodeModal data={props.data} />);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className=" absolute right-1 top-[-2px] text-red-600">
|
|
||||||
{Object.keys(props.data.node.template).some(
|
|
||||||
(t) =>
|
|
||||||
props.data.node.template[t].advanced &&
|
|
||||||
props.data.node.template[t].required
|
|
||||||
)
|
|
||||||
? " *"
|
|
||||||
: ""}
|
|
||||||
</div>
|
|
||||||
<Cog6ToothIcon
|
|
||||||
className={classNames(
|
|
||||||
Object.keys(props.data.node.template).some(
|
|
||||||
(t) =>
|
|
||||||
props.data.node.template[t].advanced &&
|
|
||||||
props.data.node.template[t].show
|
|
||||||
)
|
|
||||||
? ""
|
|
||||||
: "hidden",
|
|
||||||
"w-5 h-5 dark:text-gray-300"
|
|
||||||
)}
|
|
||||||
></Cog6ToothIcon>
|
|
||||||
</button>
|
|
||||||
</TooltipReact>
|
|
||||||
|
|
||||||
<TooltipReact
|
|
||||||
delayShow={1000}
|
|
||||||
selector="Duplicate"
|
|
||||||
htmlContent="Duplicate"
|
|
||||||
position="top"
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
className={classNames(
|
className={classNames(
|
||||||
nodeLength > 0
|
nodeLength > 0
|
||||||
|
|
@ -132,15 +78,10 @@ const NodeToolbarComponent = (props) => {
|
||||||
>
|
>
|
||||||
<Square2StackIcon className="w-5 h-5 dark:text-gray-300"></Square2StackIcon>
|
<Square2StackIcon className="w-5 h-5 dark:text-gray-300"></Square2StackIcon>
|
||||||
</button>
|
</button>
|
||||||
</TooltipReact>
|
</ShadTooltip>
|
||||||
|
|
||||||
{nodeLength > 0 && (
|
{nodeLength > 0 && (
|
||||||
<TooltipReact
|
<ShadTooltip delayDuration={1000} content="Edit" side="top">
|
||||||
delayShow={1000}
|
|
||||||
selector="Edit"
|
|
||||||
htmlContent="Edit"
|
|
||||||
position="top"
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
className="hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative -ml-px inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 rounded-r-md"
|
className="hover:dark:hover:bg-[#242f47] text-gray-700 transition-all duration-500 ease-in-out dark:bg-gray-800 dark:text-gray-300 shadow-md relative -ml-px inline-flex items-center bg-white px-2 py-2 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 rounded-r-md"
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
|
|
@ -150,7 +91,7 @@ const NodeToolbarComponent = (props) => {
|
||||||
>
|
>
|
||||||
<PencilSquareIcon className="w-5 h-5 dark:text-gray-300"></PencilSquareIcon>
|
<PencilSquareIcon className="w-5 h-5 dark:text-gray-300"></PencilSquareIcon>
|
||||||
</button>
|
</button>
|
||||||
</TooltipReact>
|
</ShadTooltip>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/*
|
{/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue