formated code
This commit is contained in:
parent
2fc55105db
commit
6ee309ab22
32 changed files with 51 additions and 106 deletions
|
|
@ -4,6 +4,7 @@ import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
||||||
import CodeAreaComponent from "../../../../components/codeAreaComponent";
|
import CodeAreaComponent from "../../../../components/codeAreaComponent";
|
||||||
import Dropdown from "../../../../components/dropdownComponent";
|
import Dropdown from "../../../../components/dropdownComponent";
|
||||||
import FloatComponent from "../../../../components/floatComponent";
|
import FloatComponent from "../../../../components/floatComponent";
|
||||||
|
import IconComponent from "../../../../components/genericIconComponent";
|
||||||
import InputComponent from "../../../../components/inputComponent";
|
import InputComponent from "../../../../components/inputComponent";
|
||||||
import InputFileComponent from "../../../../components/inputFileComponent";
|
import InputFileComponent from "../../../../components/inputFileComponent";
|
||||||
import InputListComponent from "../../../../components/inputListComponent";
|
import InputListComponent from "../../../../components/inputListComponent";
|
||||||
|
|
@ -26,7 +27,6 @@ import {
|
||||||
nodeIconsLucide,
|
nodeIconsLucide,
|
||||||
nodeNames,
|
nodeNames,
|
||||||
} from "../../../../utils";
|
} from "../../../../utils";
|
||||||
import IconComponent from "../../../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function ParameterComponent({
|
export default function ParameterComponent({
|
||||||
left,
|
left,
|
||||||
|
|
@ -164,7 +164,11 @@ export default function ParameterComponent({
|
||||||
<div className="">
|
<div className="">
|
||||||
{info !== "" && (
|
{info !== "" && (
|
||||||
<ShadTooltip content={infoHtml.current}>
|
<ShadTooltip content={infoHtml.current}>
|
||||||
<IconComponent name="Info" style="relative bottom-0.5 ml-2 h-3 w-3" method="LUCIDE" />
|
<IconComponent
|
||||||
|
name="Info"
|
||||||
|
style="relative bottom-0.5 ml-2 h-3 w-3"
|
||||||
|
method="LUCIDE"
|
||||||
|
/>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { useContext, useEffect, useRef, useState } from "react";
|
||||||
import { NodeToolbar } from "reactflow";
|
import { NodeToolbar } from "reactflow";
|
||||||
import ShadTooltip from "../../components/ShadTooltipComponent";
|
import ShadTooltip from "../../components/ShadTooltipComponent";
|
||||||
import Tooltip from "../../components/TooltipComponent";
|
import Tooltip from "../../components/TooltipComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { useSSE } from "../../contexts/SSEContext";
|
import { useSSE } from "../../contexts/SSEContext";
|
||||||
import { alertContext } from "../../contexts/alertContext";
|
import { alertContext } from "../../contexts/alertContext";
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
|
|
@ -16,7 +17,6 @@ import {
|
||||||
toTitleCase,
|
toTitleCase,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import ParameterComponent from "./components/parameterComponent";
|
import ParameterComponent from "./components/parameterComponent";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function GenericNode({
|
export default function GenericNode({
|
||||||
data,
|
data,
|
||||||
|
|
@ -28,12 +28,12 @@ export default function GenericNode({
|
||||||
const { setErrorData } = useContext(alertContext);
|
const { setErrorData } = useContext(alertContext);
|
||||||
const showError = useRef(true);
|
const showError = useRef(true);
|
||||||
const { types, deleteNode } = useContext(typesContext);
|
const { types, deleteNode } = useContext(typesContext);
|
||||||
|
|
||||||
const { closePopUp, openPopUp } = useContext(PopUpContext);
|
const { closePopUp, openPopUp } = useContext(PopUpContext);
|
||||||
// any to avoid type conflict
|
// any to avoid type conflict
|
||||||
const Icon: any =
|
const Icon: any =
|
||||||
nodeIconsLucide[data.type] || nodeIconsLucide[types[data.type]];
|
nodeIconsLucide[data.type] || nodeIconsLucide[types[data.type]];
|
||||||
const name = nodeIconsLucide[data.type] ? data.type : types[data.type]
|
const name = nodeIconsLucide[data.type] ? data.type : types[data.type];
|
||||||
const [validationStatus, setValidationStatus] = useState(null);
|
const [validationStatus, setValidationStatus] = useState(null);
|
||||||
// State for outline color
|
// State for outline color
|
||||||
const { sseData, isBuilding } = useSSE();
|
const { sseData, isBuilding } = useSSE();
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Transition } from "@headlessui/react";
|
import { Transition } from "@headlessui/react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { SingleAlertComponentType } from "../../../../types/alerts";
|
|
||||||
import IconComponent from "../../../../components/genericIconComponent";
|
import IconComponent from "../../../../components/genericIconComponent";
|
||||||
|
import { SingleAlertComponentType } from "../../../../types/alerts";
|
||||||
|
|
||||||
export default function SingleAlert({
|
export default function SingleAlert({
|
||||||
dropItem,
|
dropItem,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { useContext, useRef } from "react";
|
import { useContext, useRef } from "react";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { alertContext } from "../../contexts/alertContext";
|
import { alertContext } from "../../contexts/alertContext";
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { AlertDropdownType } from "../../types/alerts";
|
import { AlertDropdownType } from "../../types/alerts";
|
||||||
import { useOnClickOutside } from "../hooks/useOnClickOutside";
|
import { useOnClickOutside } from "../hooks/useOnClickOutside";
|
||||||
import SingleAlert from "./components/singleAlertComponent";
|
import SingleAlert from "./components/singleAlertComponent";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function AlertDropdown({}: AlertDropdownType) {
|
export default function AlertDropdown({}: AlertDropdownType) {
|
||||||
const { closePopUp } = useContext(PopUpContext);
|
const { closePopUp } = useContext(PopUpContext);
|
||||||
|
|
@ -46,11 +46,7 @@ export default function AlertDropdown({}: AlertDropdownType) {
|
||||||
className="text-foreground hover:text-status-red"
|
className="text-foreground hover:text-status-red"
|
||||||
onClick={closePopUp}
|
onClick={closePopUp}
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent method="LUCIDE" name="X" style="h-5 w-5" />
|
||||||
method="LUCIDE"
|
|
||||||
name="X"
|
|
||||||
style="h-5 w-5"
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Transition } from "@headlessui/react";
|
import { Transition } from "@headlessui/react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { ErrorAlertType } from "../../types/alerts";
|
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
|
import { ErrorAlertType } from "../../types/alerts";
|
||||||
|
|
||||||
export default function ErrorAlert({
|
export default function ErrorAlert({
|
||||||
title,
|
title,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { Transition } from "@headlessui/react";
|
import { Transition } from "@headlessui/react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { NoticeAlertType } from "../../types/alerts";
|
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
|
import { NoticeAlertType } from "../../types/alerts";
|
||||||
|
|
||||||
export default function NoticeAlert({
|
export default function NoticeAlert({
|
||||||
title,
|
title,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Transition } from "@headlessui/react";
|
import { Transition } from "@headlessui/react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { SuccessAlertType } from "../../types/alerts";
|
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
|
import { SuccessAlertType } from "../../types/alerts";
|
||||||
|
|
||||||
export default function SuccessAlert({
|
export default function SuccessAlert({
|
||||||
title,
|
title,
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { useContext } from "react";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { FlowType } from "../../types/flow";
|
import { FlowType } from "../../types/flow";
|
||||||
import { gradients } from "../../utils";
|
import { gradients } from "../../utils";
|
||||||
|
import IconComponent from "../genericIconComponent";
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
CardDescription,
|
CardDescription,
|
||||||
|
|
@ -9,7 +10,6 @@ import {
|
||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "../ui/card";
|
} from "../ui/card";
|
||||||
import IconComponent from "../genericIconComponent";
|
|
||||||
|
|
||||||
export const CardComponent = ({
|
export const CardComponent = ({
|
||||||
flow,
|
flow,
|
||||||
|
|
@ -55,8 +55,7 @@ export const CardComponent = ({
|
||||||
|
|
||||||
<CardFooter>
|
<CardFooter>
|
||||||
<div className="card-component-footer-arrangement">
|
<div className="card-component-footer-arrangement">
|
||||||
<div className="card-component-footer">
|
<div className="card-component-footer"></div>
|
||||||
</div>
|
|
||||||
{button && button}
|
{button && button}
|
||||||
</div>
|
</div>
|
||||||
</CardFooter>
|
</CardFooter>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export function IconFromLucide({
|
||||||
iconColor,
|
iconColor,
|
||||||
}: IconProps): JSX.Element {
|
}: IconProps): JSX.Element {
|
||||||
const TargetIcon = nodeIconsLucide[name] ?? nodeIconsLucide["unknown"];
|
const TargetIcon = nodeIconsLucide[name] ?? nodeIconsLucide["unknown"];
|
||||||
return <TargetIcon className={ style } style={{ color: iconColor }} />;
|
return <TargetIcon className={style} style={{ color: iconColor }} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function IconComponent({
|
export default function IconComponent({
|
||||||
|
|
@ -18,7 +18,7 @@ export default function IconComponent({
|
||||||
}: IconComponentProps): JSX.Element {
|
}: IconComponentProps): JSX.Element {
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case "LUCIDE":
|
case "LUCIDE":
|
||||||
return <IconFromLucide name={name} style={ style } iconColor={ iconColor } />;
|
return <IconFromLucide name={name} style={style} iconColor={iconColor} />;
|
||||||
default:
|
default:
|
||||||
console.error("IconComponent: invalid method");
|
console.error("IconComponent: invalid method");
|
||||||
return <IconFromLucide name={"unknown"} style={"unknown"} />;
|
return <IconFromLucide name={"unknown"} style={"unknown"} />;
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ import { Link, useNavigate } from "react-router-dom";
|
||||||
import { alertContext } from "../../../../contexts/alertContext";
|
import { alertContext } from "../../../../contexts/alertContext";
|
||||||
import { undoRedoContext } from "../../../../contexts/undoRedoContext";
|
import { undoRedoContext } from "../../../../contexts/undoRedoContext";
|
||||||
import FlowSettingsModal from "../../../../modals/flowSettingsModal";
|
import FlowSettingsModal from "../../../../modals/flowSettingsModal";
|
||||||
import { Button } from "../../../ui/button";
|
|
||||||
import IconComponent from "../../../genericIconComponent";
|
import IconComponent from "../../../genericIconComponent";
|
||||||
|
import { Button } from "../../../ui/button";
|
||||||
|
|
||||||
export const MenuBar = ({ flows, tabId }) => {
|
export const MenuBar = ({ flows, tabId }) => {
|
||||||
const { updateFlow, setTabId, addFlow } = useContext(TabsContext);
|
const { updateFlow, setTabId, addFlow } = useContext(TabsContext);
|
||||||
|
|
@ -39,11 +39,7 @@ export const MenuBar = ({ flows, tabId }) => {
|
||||||
return (
|
return (
|
||||||
<div className="round-button-div">
|
<div className="round-button-div">
|
||||||
<Link to="/">
|
<Link to="/">
|
||||||
<IconComponent
|
<IconComponent name="ChevronLeft" style="w-4" method="LUCIDE" />
|
||||||
name="ChevronLeft"
|
|
||||||
style="w-4"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
<div className="header-menu-bar">
|
<div className="header-menu-bar">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { typesContext } from "../../contexts/typesContext";
|
import { typesContext } from "../../contexts/typesContext";
|
||||||
import { getRepoStars } from "../../controllers/API";
|
import { getRepoStars } from "../../controllers/API";
|
||||||
|
import IconComponent from "../genericIconComponent";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
import { Separator } from "../ui/separator";
|
import { Separator } from "../ui/separator";
|
||||||
import MenuBar from "./components/menuBar";
|
import MenuBar from "./components/menuBar";
|
||||||
import IconComponent from "../genericIconComponent";
|
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
const { flows, addFlow, tabId } = useContext(TabsContext);
|
const { flows, addFlow, tabId } = useContext(TabsContext);
|
||||||
|
|
@ -51,11 +51,7 @@ export default function Header() {
|
||||||
variant={location.pathname === "/" ? "primary" : "secondary"}
|
variant={location.pathname === "/" ? "primary" : "secondary"}
|
||||||
size="sm"
|
size="sm"
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent name="Home" method="LUCIDE" style="h-4 w-4" />
|
||||||
name="Home"
|
|
||||||
method="LUCIDE"
|
|
||||||
style="h-4 w-4"
|
|
||||||
/>
|
|
||||||
<div className="flex-1">{USER_PROJECTS_HEADER}</div>
|
<div className="flex-1">{USER_PROJECTS_HEADER}</div>
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -67,11 +63,7 @@ export default function Header() {
|
||||||
}
|
}
|
||||||
size="sm"
|
size="sm"
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent method="LUCIDE" name="Users2" style="h-4 w-4" />
|
||||||
method="LUCIDE"
|
|
||||||
name="Users2"
|
|
||||||
style="h-4 w-4"
|
|
||||||
/>
|
|
||||||
<div className="flex-1">Community Examples</div>
|
<div className="flex-1">Community Examples</div>
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,7 @@ const Checkbox = React.forwardRef<
|
||||||
<CheckboxPrimitive.Indicator
|
<CheckboxPrimitive.Indicator
|
||||||
className={cn("flex items-center justify-center text-current")}
|
className={cn("flex items-center justify-center text-current")}
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent name="Check" method="LUCIDE" style="h-4 w-4" />
|
||||||
name="Check"
|
|
||||||
method="LUCIDE"
|
|
||||||
style="h-4 w-4"
|
|
||||||
/>
|
|
||||||
</CheckboxPrimitive.Indicator>
|
</CheckboxPrimitive.Indicator>
|
||||||
</CheckboxPrimitive.Root>
|
</CheckboxPrimitive.Root>
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,7 @@ const DialogContent = React.forwardRef<
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
||||||
<IconComponent
|
<IconComponent name="X" method="LUCIDE" style="h-4 w-4" />
|
||||||
name="X"
|
|
||||||
method="LUCIDE"
|
|
||||||
style="h-4 w-4"
|
|
||||||
/>
|
|
||||||
<span className="sr-only">Close</span>
|
<span className="sr-only">Close</span>
|
||||||
</DialogPrimitive.Close>
|
</DialogPrimitive.Close>
|
||||||
</DialogPrimitive.Content>
|
</DialogPrimitive.Content>
|
||||||
|
|
|
||||||
|
|
@ -110,11 +110,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
||||||
>
|
>
|
||||||
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||||
<DropdownMenuPrimitive.ItemIndicator>
|
<DropdownMenuPrimitive.ItemIndicator>
|
||||||
<IconComponent
|
<IconComponent name="Check" style="h-4 w-4" method="LUCIDE" />
|
||||||
name="Check"
|
|
||||||
style="h-4 w-4"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
</DropdownMenuPrimitive.ItemIndicator>
|
</DropdownMenuPrimitive.ItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
||||||
|
|
@ -144,11 +144,7 @@ const MenubarCheckboxItem = React.forwardRef<
|
||||||
>
|
>
|
||||||
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||||
<MenubarPrimitive.ItemIndicator>
|
<MenubarPrimitive.ItemIndicator>
|
||||||
<IconComponent
|
<IconComponent name="Check" style="h-4 w-4" method="LUCIDE" />
|
||||||
name="Check"
|
|
||||||
style="h-4 w-4"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
</MenubarPrimitive.ItemIndicator>
|
</MenubarPrimitive.ItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@ import "ace-builds/src-noconflict/ext-language_tools";
|
||||||
import "ace-builds/src-noconflict/mode-python";
|
import "ace-builds/src-noconflict/mode-python";
|
||||||
import "ace-builds/src-noconflict/theme-github";
|
import "ace-builds/src-noconflict/theme-github";
|
||||||
import "ace-builds/src-noconflict/theme-twilight";
|
import "ace-builds/src-noconflict/theme-twilight";
|
||||||
import { useContext, useEffect, useRef, useState } from "react";
|
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
|
||||||
import { Check, Clipboard } from "lucide-react";
|
import { Check, Clipboard } from "lucide-react";
|
||||||
|
import { useContext, useEffect, useRef, useState } from "react";
|
||||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||||
import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
|
import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
|
||||||
import AccordionComponent from "../../components/AccordionComponent";
|
import AccordionComponent from "../../components/AccordionComponent";
|
||||||
|
|
@ -12,6 +11,7 @@ import ShadTooltip from "../../components/ShadTooltipComponent";
|
||||||
import CodeAreaComponent from "../../components/codeAreaComponent";
|
import CodeAreaComponent from "../../components/codeAreaComponent";
|
||||||
import Dropdown from "../../components/dropdownComponent";
|
import Dropdown from "../../components/dropdownComponent";
|
||||||
import FloatComponent from "../../components/floatComponent";
|
import FloatComponent from "../../components/floatComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import InputComponent from "../../components/inputComponent";
|
import InputComponent from "../../components/inputComponent";
|
||||||
import InputFileComponent from "../../components/inputFileComponent";
|
import InputFileComponent from "../../components/inputFileComponent";
|
||||||
import InputListComponent from "../../components/inputListComponent";
|
import InputListComponent from "../../components/inputListComponent";
|
||||||
|
|
@ -48,10 +48,10 @@ import {
|
||||||
getPythonCode,
|
getPythonCode,
|
||||||
} from "../../constants";
|
} from "../../constants";
|
||||||
import { darkContext } from "../../contexts/darkContext";
|
import { darkContext } from "../../contexts/darkContext";
|
||||||
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { FlowType } from "../../types/flow/index";
|
import { FlowType } from "../../types/flow/index";
|
||||||
import { buildTweaks, classNames } from "../../utils";
|
import { buildTweaks, classNames } from "../../utils";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function ApiModal({ flow }: { flow: FlowType }) {
|
export default function ApiModal({ flow }: { flow: FlowType }) {
|
||||||
const [open, setOpen] = useState(true);
|
const [open, setOpen] = useState(true);
|
||||||
|
|
@ -378,7 +378,6 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
|
||||||
"int")
|
"int")
|
||||||
)
|
)
|
||||||
.map((n, i) => {
|
.map((n, i) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableRow
|
<TableRow
|
||||||
key={i}
|
key={i}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { useContext, useRef, useState } from "react";
|
||||||
import CodeAreaComponent from "../../components/codeAreaComponent";
|
import CodeAreaComponent from "../../components/codeAreaComponent";
|
||||||
import Dropdown from "../../components/dropdownComponent";
|
import Dropdown from "../../components/dropdownComponent";
|
||||||
import FloatComponent from "../../components/floatComponent";
|
import FloatComponent from "../../components/floatComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import InputComponent from "../../components/inputComponent";
|
import InputComponent from "../../components/inputComponent";
|
||||||
import InputFileComponent from "../../components/inputFileComponent";
|
import InputFileComponent from "../../components/inputFileComponent";
|
||||||
import InputListComponent from "../../components/inputListComponent";
|
import InputListComponent from "../../components/inputListComponent";
|
||||||
|
|
@ -33,7 +34,6 @@ import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { typesContext } from "../../contexts/typesContext";
|
import { typesContext } from "../../contexts/typesContext";
|
||||||
import { NodeDataType } from "../../types/flow";
|
import { NodeDataType } from "../../types/flow";
|
||||||
import { classNames, limitScrollFieldsModal } from "../../utils";
|
import { classNames, limitScrollFieldsModal } from "../../utils";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function EditNodeModal({ data }: { data: NodeDataType }) {
|
export default function EditNodeModal({ data }: { data: NodeDataType }) {
|
||||||
const [open, setOpen] = useState(true);
|
const [open, setOpen] = useState(true);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
import { Fragment, useContext, useRef, useState } from "react";
|
import { Fragment, useContext, useRef, useState } from "react";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { typesContext } from "../../contexts/typesContext";
|
import { typesContext } from "../../contexts/typesContext";
|
||||||
import { NodeDataType } from "../../types/flow";
|
import { NodeDataType } from "../../types/flow";
|
||||||
|
|
@ -11,7 +12,6 @@ import {
|
||||||
toTitleCase,
|
toTitleCase,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import ModalField from "./components/ModalField";
|
import ModalField from "./components/ModalField";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function NodeModal({ data }: { data: NodeDataType }) {
|
export default function NodeModal({ data }: { data: NodeDataType }) {
|
||||||
const [open, setOpen] = useState(true);
|
const [open, setOpen] = useState(true);
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import "ace-builds/src-noconflict/theme-github";
|
||||||
import "ace-builds/src-noconflict/theme-twilight";
|
import "ace-builds/src-noconflict/theme-twilight";
|
||||||
import { useContext, useState } from "react";
|
import { useContext, useState } from "react";
|
||||||
import AceEditor from "react-ace";
|
import AceEditor from "react-ace";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { Button } from "../../components/ui/button";
|
import { Button } from "../../components/ui/button";
|
||||||
import { CODE_PROMPT_DIALOG_SUBTITLE } from "../../constants";
|
import { CODE_PROMPT_DIALOG_SUBTITLE } from "../../constants";
|
||||||
import { alertContext } from "../../contexts/alertContext";
|
import { alertContext } from "../../contexts/alertContext";
|
||||||
|
|
@ -14,7 +15,6 @@ import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { postValidateCode } from "../../controllers/API";
|
import { postValidateCode } from "../../controllers/API";
|
||||||
import { APIClassType } from "../../types/api";
|
import { APIClassType } from "../../types/api";
|
||||||
import BaseModal from "../baseModal";
|
import BaseModal from "../baseModal";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function CodeAreaModal({
|
export default function CodeAreaModal({
|
||||||
value,
|
value,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { useContext, useRef, useState } from "react";
|
import { useContext, useRef, useState } from "react";
|
||||||
import EditFlowSettings from "../../components/EditFlowSettingsComponent";
|
import EditFlowSettings from "../../components/EditFlowSettingsComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { Button } from "../../components/ui/button";
|
import { Button } from "../../components/ui/button";
|
||||||
import { Checkbox } from "../../components/ui/checkbox";
|
import { Checkbox } from "../../components/ui/checkbox";
|
||||||
import {
|
import {
|
||||||
|
|
@ -16,7 +17,6 @@ import { alertContext } from "../../contexts/alertContext";
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { removeApiKeys } from "../../utils";
|
import { removeApiKeys } from "../../utils";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function ExportModal() {
|
export default function ExportModal() {
|
||||||
const [open, setOpen] = useState(true);
|
const [open, setOpen] = useState(true);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { useContext, useRef, useState } from "react";
|
import { useContext, useRef, useState } from "react";
|
||||||
import EditFlowSettings from "../../components/EditFlowSettingsComponent";
|
import EditFlowSettings from "../../components/EditFlowSettingsComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { Button } from "../../components/ui/button";
|
import { Button } from "../../components/ui/button";
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
|
|
@ -14,7 +15,6 @@ import { SETTINGS_DIALOG_SUBTITLE } from "../../constants";
|
||||||
import { alertContext } from "../../contexts/alertContext";
|
import { alertContext } from "../../contexts/alertContext";
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function FlowSettingsModal() {
|
export default function FlowSettingsModal() {
|
||||||
const [open, setOpen] = useState(true);
|
const [open, setOpen] = useState(true);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { classNames } from "../../../utils";
|
|
||||||
import IconComponent from "../../../components/genericIconComponent";
|
import IconComponent from "../../../components/genericIconComponent";
|
||||||
|
import { classNames } from "../../../utils";
|
||||||
|
|
||||||
export default function ChatInput({
|
export default function ChatInput({
|
||||||
lockChat,
|
lockChat,
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ import remarkMath from "remark-math";
|
||||||
import MaleTechnology from "../../../assets/male-technologist.png";
|
import MaleTechnology from "../../../assets/male-technologist.png";
|
||||||
import Robot from "../../../assets/robot.png";
|
import Robot from "../../../assets/robot.png";
|
||||||
import SanitizedHTMLWrapper from "../../../components/SanitizedHTMLWrapper";
|
import SanitizedHTMLWrapper from "../../../components/SanitizedHTMLWrapper";
|
||||||
|
import IconComponent from "../../../components/genericIconComponent";
|
||||||
import { THOUGHTS_ICON } from "../../../constants";
|
import { THOUGHTS_ICON } from "../../../constants";
|
||||||
import { ChatMessageType } from "../../../types/chat";
|
import { ChatMessageType } from "../../../types/chat";
|
||||||
import { classNames } from "../../../utils";
|
import { classNames } from "../../../utils";
|
||||||
import FileCard from "../fileComponent";
|
import FileCard from "../fileComponent";
|
||||||
import { CodeBlock } from "./codeBlock";
|
import { CodeBlock } from "./codeBlock";
|
||||||
import IconComponent from "../../../components/genericIconComponent";
|
|
||||||
export default function ChatMessage({
|
export default function ChatMessage({
|
||||||
chat,
|
chat,
|
||||||
lockChat,
|
lockChat,
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,7 @@ export default function FileCard({ fileName, content, fileType }) {
|
||||||
className="h-8 w-8"
|
className="h-8 w-8"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<IconComponent
|
<IconComponent name="File" style="h-8 w-8" method="LUCIDE" />
|
||||||
name="File"
|
|
||||||
style="h-8 w-8"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
<div className="file-card-modal-footer">
|
<div className="file-card-modal-footer">
|
||||||
{" "}
|
{" "}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import ChatInput from "./chatInput";
|
||||||
import ChatMessage from "./chatMessage";
|
import ChatMessage from "./chatMessage";
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import ToggleShadComponent from "../../components/toggleShadComponent";
|
import ToggleShadComponent from "../../components/toggleShadComponent";
|
||||||
import {
|
import {
|
||||||
Accordion,
|
Accordion,
|
||||||
|
|
@ -28,7 +29,6 @@ import {
|
||||||
import { Textarea } from "../../components/ui/textarea";
|
import { Textarea } from "../../components/ui/textarea";
|
||||||
import { CHAT_FORM_DIALOG_SUBTITLE, THOUGHTS_ICON } from "../../constants";
|
import { CHAT_FORM_DIALOG_SUBTITLE, THOUGHTS_ICON } from "../../constants";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function FormModal({
|
export default function FormModal({
|
||||||
flow,
|
flow,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { useContext, useEffect, useRef, useState } from "react";
|
import { useContext, useEffect, useRef, useState } from "react";
|
||||||
import SanitizedHTMLWrapper from "../../components/SanitizedHTMLWrapper";
|
import SanitizedHTMLWrapper from "../../components/SanitizedHTMLWrapper";
|
||||||
import ShadTooltip from "../../components/ShadTooltipComponent";
|
import ShadTooltip from "../../components/ShadTooltipComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { Badge } from "../../components/ui/badge";
|
import { Badge } from "../../components/ui/badge";
|
||||||
import { Button } from "../../components/ui/button";
|
import { Button } from "../../components/ui/button";
|
||||||
import { DialogTitle } from "../../components/ui/dialog";
|
import { DialogTitle } from "../../components/ui/dialog";
|
||||||
|
|
@ -20,7 +21,6 @@ import {
|
||||||
varHighlightHTML,
|
varHighlightHTML,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import BaseModal from "../baseModal";
|
import BaseModal from "../baseModal";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function GenericModal({
|
export default function GenericModal({
|
||||||
field_name = "",
|
field_name = "",
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import { TabsContext } from "../../contexts/tabsContext";
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { CardComponent } from "../../components/cardComponent";
|
import { CardComponent } from "../../components/cardComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { getExamples } from "../../controllers/API";
|
import { getExamples } from "../../controllers/API";
|
||||||
import { FlowType } from "../../types/flow";
|
import { FlowType } from "../../types/flow";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
export default function CommunityPage() {
|
export default function CommunityPage() {
|
||||||
const { flows, setTabId, downloadFlows, uploadFlows, addFlow } =
|
const { flows, setTabId, downloadFlows, uploadFlows, addFlow } =
|
||||||
useContext(TabsContext);
|
useContext(TabsContext);
|
||||||
|
|
@ -40,11 +40,7 @@ export default function CommunityPage() {
|
||||||
<div className="community-page-arrangement">
|
<div className="community-page-arrangement">
|
||||||
<div className="community-page-nav-arrangement">
|
<div className="community-page-nav-arrangement">
|
||||||
<span className="community-page-nav-title">
|
<span className="community-page-nav-title">
|
||||||
<IconComponent
|
<IconComponent name="Users2" style="w-6" method="LUCIDE" />
|
||||||
name="Users2"
|
|
||||||
style="w-6"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
Community Examples
|
Community Examples
|
||||||
</span>
|
</span>
|
||||||
<div className="community-page-nav-button">
|
<div className="community-page-nav-button">
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Disclosure } from "@headlessui/react";
|
import { Disclosure } from "@headlessui/react";
|
||||||
import { DisclosureComponentType } from "../../../../types/components";
|
|
||||||
import IconComponent from "../../../../components/genericIconComponent";
|
import IconComponent from "../../../../components/genericIconComponent";
|
||||||
|
import { DisclosureComponentType } from "../../../../types/components";
|
||||||
|
|
||||||
export default function DisclosureComponent({
|
export default function DisclosureComponent({
|
||||||
button: { title, Icon, buttons = [] },
|
button: { title, Icon, buttons = [] },
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Search } from "lucide-react";
|
import { Search } from "lucide-react";
|
||||||
import { useContext, useState } from "react";
|
import { useContext, useState } from "react";
|
||||||
import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
||||||
|
import IconComponent from "../../../../components/genericIconComponent";
|
||||||
import { Separator } from "../../../../components/ui/separator";
|
import { Separator } from "../../../../components/ui/separator";
|
||||||
import { alertContext } from "../../../../contexts/alertContext";
|
import { alertContext } from "../../../../contexts/alertContext";
|
||||||
import { PopUpContext } from "../../../../contexts/popUpContext";
|
import { PopUpContext } from "../../../../contexts/popUpContext";
|
||||||
|
|
@ -16,7 +17,6 @@ import {
|
||||||
nodeNames,
|
nodeNames,
|
||||||
} from "../../../../utils";
|
} from "../../../../utils";
|
||||||
import DisclosureComponent from "../DisclosureComponent";
|
import DisclosureComponent from "../DisclosureComponent";
|
||||||
import IconComponent from "../../../../components/genericIconComponent";
|
|
||||||
|
|
||||||
export default function ExtraSidebar() {
|
export default function ExtraSidebar() {
|
||||||
const { data } = useContext(typesContext);
|
const { data } = useContext(typesContext);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { useContext, useState } from "react";
|
import { useContext, useState } from "react";
|
||||||
import { useReactFlow } from "reactflow";
|
import { useReactFlow } from "reactflow";
|
||||||
import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
import ShadTooltip from "../../../../components/ShadTooltipComponent";
|
||||||
|
import IconComponent from "../../../../components/genericIconComponent";
|
||||||
import { TabsContext } from "../../../../contexts/tabsContext";
|
import { TabsContext } from "../../../../contexts/tabsContext";
|
||||||
import EditNodeModal from "../../../../modals/EditNodeModal";
|
import EditNodeModal from "../../../../modals/EditNodeModal";
|
||||||
import { classNames } from "../../../../utils";
|
import { classNames } from "../../../../utils";
|
||||||
import IconComponent from "../../../../components/genericIconComponent";
|
|
||||||
|
|
||||||
const NodeToolbarComponent = (props) => {
|
const NodeToolbarComponent = (props) => {
|
||||||
const [nodeLength, setNodeLength] = useState(
|
const [nodeLength, setNodeLength] = useState(
|
||||||
|
|
@ -36,11 +36,7 @@ const NodeToolbarComponent = (props) => {
|
||||||
props.deleteNode(props.data.id);
|
props.deleteNode(props.data.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent name="Trash2" style="h-4 w-4" method="LUCIDE" />
|
||||||
name="Trash2"
|
|
||||||
style="h-4 w-4"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
||||||
|
|
@ -65,11 +61,7 @@ const NodeToolbarComponent = (props) => {
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent name="Copy" style="h-4 w-4" method="LUCIDE" />
|
||||||
name="Copy"
|
|
||||||
style="h-4 w-4"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
||||||
|
|
@ -98,11 +90,7 @@ const NodeToolbarComponent = (props) => {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent name="FileText" style="h-4 w-4 " method="LUCIDE" />
|
||||||
name="FileText"
|
|
||||||
style="h-4 w-4 "
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
</a>
|
</a>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { useContext, useEffect } from "react";
|
import { useContext, useEffect } from "react";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { CardComponent } from "../../components/cardComponent";
|
import { CardComponent } from "../../components/cardComponent";
|
||||||
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { Button } from "../../components/ui/button";
|
import { Button } from "../../components/ui/button";
|
||||||
import { USER_PROJECTS_HEADER } from "../../constants";
|
import { USER_PROJECTS_HEADER } from "../../constants";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
|
||||||
export default function HomePage() {
|
export default function HomePage() {
|
||||||
const { flows, setTabId, downloadFlows, uploadFlows, addFlow, removeFlow } =
|
const { flows, setTabId, downloadFlows, uploadFlows, addFlow, removeFlow } =
|
||||||
useContext(TabsContext);
|
useContext(TabsContext);
|
||||||
|
|
@ -16,11 +16,7 @@ export default function HomePage() {
|
||||||
<div className="main-page-panel">
|
<div className="main-page-panel">
|
||||||
<div className="main-page-nav-arrangement">
|
<div className="main-page-nav-arrangement">
|
||||||
<span className="main-page-nav-title">
|
<span className="main-page-nav-title">
|
||||||
<IconComponent
|
<IconComponent name="Home" style="w-6" method="LUCIDE" />
|
||||||
name="Home"
|
|
||||||
style="w-6"
|
|
||||||
method="LUCIDE"
|
|
||||||
/>
|
|
||||||
{USER_PROJECTS_HEADER}
|
{USER_PROJECTS_HEADER}
|
||||||
</span>
|
</span>
|
||||||
<div className="button-div-style">
|
<div className="button-div-style">
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,6 @@ export const nodeIconsLucide = {
|
||||||
retrievers: FileSearch,
|
retrievers: FileSearch,
|
||||||
unknown: HelpCircle,
|
unknown: HelpCircle,
|
||||||
|
|
||||||
|
|
||||||
Trash2,
|
Trash2,
|
||||||
X,
|
X,
|
||||||
XCircle,
|
XCircle,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue