refactor: Remove unnused code
This commit is contained in:
parent
7a9abc2af5
commit
2fc55105db
4 changed files with 0 additions and 188 deletions
|
|
@ -4,7 +4,6 @@ import "ace-builds/src-noconflict/theme-github";
|
|||
import "ace-builds/src-noconflict/theme-twilight";
|
||||
import { useContext, useEffect, useRef, useState } from "react";
|
||||
import { PopUpContext } from "../../contexts/popUpContext";
|
||||
// import "ace-builds/webpack-resolver";
|
||||
import { Check, Clipboard } from "lucide-react";
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
|
||||
|
|
@ -379,7 +378,6 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
|
|||
"int")
|
||||
)
|
||||
.map((n, i) => {
|
||||
//console.log(t.data.node.template[n]);
|
||||
|
||||
return (
|
||||
<TableRow
|
||||
|
|
@ -723,34 +721,6 @@ export default function ApiModal({ flow }: { flow: FlowType }) {
|
|||
)}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/*
|
||||
<div className="flex flex-col gap-5 bg-muted">
|
||||
<Table className="table-fixed bg-muted outline-1">
|
||||
<TableHeader className="border-gray-200 text-gray-500 text-xs font-medium h-10">
|
||||
<TableRow className="dark:border-b-muted">
|
||||
<TableHead className="h-5 text-center">
|
||||
TWEAK
|
||||
</TableHead>
|
||||
<TableHead className="p-0 h-5 text-center">
|
||||
VALUE
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{invoices.map((invoice) => (
|
||||
<TableRow className="p-0 text-center text-gray-900 text-sm">
|
||||
<TableCell className="p-2 text-center text-gray-900 text-sm truncate">
|
||||
{invoice.paymentStatus}
|
||||
</TableCell>
|
||||
<TableCell className="p-2 text-center text-gray-900 text-sm truncate">
|
||||
{invoice.paymentMethod}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ export default function Page({ flow }: { flow: FlowType }) {
|
|||
lastSelection
|
||||
) {
|
||||
event.preventDefault();
|
||||
// addFlow(newFlow, false);
|
||||
}
|
||||
};
|
||||
const handleMouseMove = (event) => {
|
||||
|
|
|
|||
|
|
@ -129,99 +129,6 @@ const NodeToolbarComponent = (props) => {
|
|||
/>
|
||||
</button>
|
||||
</ShadTooltip>
|
||||
|
||||
{/*
|
||||
<Menu as="div" className="relative inline-block text-left z-100">
|
||||
<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-muted focus:z-10 rounded-r-md">
|
||||
<div>
|
||||
<Menu.Button className="flex items-center">
|
||||
<EllipsisVerticalIcon
|
||||
className="w-5 h-5 "
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</Menu.Button>
|
||||
</div>
|
||||
|
||||
<Transition
|
||||
as={Fragment}
|
||||
enter="transition ease-out duration-100"
|
||||
enterFrom="transform opacity-0 scale-95"
|
||||
enterTo="transform opacity-100 scale-100"
|
||||
leave="transition ease-in duration-75"
|
||||
leaveFrom="transform opacity-100 scale-100"
|
||||
leaveTo="transform opacity-0 scale-95"
|
||||
>
|
||||
<Menu.Items className="absolute z-40 mt-2 w-56 origin-top-right rounded-md bg-background shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none top-[28px]">
|
||||
<div className="py-1">
|
||||
<Menu.Item>
|
||||
{({ active }) => (
|
||||
<button
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
props.openPopUp(
|
||||
<EditNodeModal data={props.data} />
|
||||
);
|
||||
}}
|
||||
className={classNames(
|
||||
active
|
||||
? "bg-muted text-gray-900"
|
||||
: "text-foreground",
|
||||
"w-full group flex items-center px-4 py-2 text-sm"
|
||||
)}
|
||||
>
|
||||
<Settings
|
||||
className="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Edit
|
||||
</button>
|
||||
)}
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
{({ active }) => (
|
||||
<button
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
console.log(
|
||||
reactFlowInstance.getNode(props.data.id)
|
||||
);
|
||||
paste(
|
||||
{
|
||||
nodes: [
|
||||
reactFlowInstance.getNode(props.data.id),
|
||||
],
|
||||
edges: [],
|
||||
},
|
||||
{
|
||||
x: 50,
|
||||
y: 10,
|
||||
paneX: reactFlowInstance.getNode(props.data.id)
|
||||
.position.x,
|
||||
paneY: reactFlowInstance.getNode(props.data.id)
|
||||
.position.y,
|
||||
}
|
||||
);
|
||||
}}
|
||||
className={classNames(
|
||||
active
|
||||
? "bg-muted text-gray-900"
|
||||
: "text-foreground",
|
||||
"w-full group flex items-center px-4 py-2 text-sm"
|
||||
)}
|
||||
>
|
||||
<DocumentDuplicateIcon
|
||||
className="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Duplicate
|
||||
</button>
|
||||
)}
|
||||
</Menu.Item>
|
||||
</div>
|
||||
</Menu.Items>
|
||||
</Transition>
|
||||
</button>
|
||||
</Menu> */}
|
||||
</span>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -68,58 +68,28 @@ import { Connection, Edge, Node, ReactFlowInstance } from "reactflow";
|
|||
import { twMerge } from "tailwind-merge";
|
||||
import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "./flow_constants";
|
||||
import { AirbyteIcon } from "./icons/Airbyte";
|
||||
import SvgAirbyte from "./icons/Airbyte/Airbyte";
|
||||
import { AnthropicIcon } from "./icons/Anthropic";
|
||||
import SvgAnthropicBox from "./icons/Anthropic/AnthropicBox";
|
||||
import { BingIcon } from "./icons/Bing";
|
||||
import SvgBing from "./icons/Bing/Bing";
|
||||
import { ChromaIcon } from "./icons/ChromaIcon";
|
||||
import SvgChroma from "./icons/ChromaIcon/Chroma";
|
||||
import { CohereIcon } from "./icons/Cohere";
|
||||
import SvgCohere from "./icons/Cohere/Cohere";
|
||||
import { EvernoteIcon } from "./icons/Evernote";
|
||||
import SvgEvernoteIcon from "./icons/Evernote/EvernoteIcon";
|
||||
import { FBIcon } from "./icons/FacebookMessenger";
|
||||
import SvgFacebookMessengerLogo2020 from "./icons/FacebookMessenger/FacebookMessengerLogo2020";
|
||||
import { GitBookIcon } from "./icons/GitBook";
|
||||
import SvgGitbookSvgrepoCom from "./icons/GitBook/GitbookSvgrepoCom";
|
||||
import { GoogleIcon } from "./icons/Google";
|
||||
import SvgGoogle from "./icons/Google/Google";
|
||||
import { HuggingFaceIcon } from "./icons/HuggingFace";
|
||||
import SvgHfLogo from "./icons/HuggingFace/HfLogo";
|
||||
import { IFixIcon } from "./icons/IFixIt";
|
||||
import SvgIfixitSeeklogocom from "./icons/IFixIt/IfixitSeeklogoCom";
|
||||
import { MetaIcon } from "./icons/Meta";
|
||||
import SvgMetaIcon from "./icons/Meta/MetaIcon";
|
||||
import { MidjourneyIcon } from "./icons/Midjorney";
|
||||
import SvgMidjourneyEmblem from "./icons/Midjorney/MidjourneyEmblem";
|
||||
import { MongoDBIcon } from "./icons/MongoDB";
|
||||
import SvgMongodbIcon from "./icons/MongoDB/MongodbIcon";
|
||||
import { NotionIcon } from "./icons/Notion";
|
||||
import SvgNotionLogo from "./icons/Notion/NotionLogo";
|
||||
import { OpenAiIcon } from "./icons/OpenAi";
|
||||
import SvgOpenAi from "./icons/OpenAi/OpenAi";
|
||||
import { PineconeIcon } from "./icons/Pinecone";
|
||||
import SvgPineconeLogo from "./icons/Pinecone/PineconeLogo";
|
||||
import SvgPowerPoint from "./icons/PowerPoint/PowerPoint";
|
||||
import { QDrantIcon } from "./icons/QDrant";
|
||||
import SvgQDrant from "./icons/QDrant/QDrant";
|
||||
import SvgReadthedocsioIcon from "./icons/ReadTheDocs/ReadthedocsioIcon";
|
||||
import { SearxIcon } from "./icons/Searx";
|
||||
import SvgSearxLogo from "./icons/Searx/SearxLogo";
|
||||
import SvgSerper from "./icons/Serper/Serper";
|
||||
import { SlackIcon } from "./icons/Slack";
|
||||
import SvgSlackIcon from "./icons/Slack/SlackIcon";
|
||||
import { VertexAIIcon } from "./icons/VertexAI";
|
||||
import SvgVertexAi from "./icons/VertexAI/VertexAi";
|
||||
import SvgWeaviate from "./icons/Weaviate/Weaviate";
|
||||
import SvgWikipedia from "./icons/Wikipedia/Wikipedia";
|
||||
import SvgWolfram from "./icons/Wolfram/Wolfram";
|
||||
import SvgWord from "./icons/Word/Word";
|
||||
import { HackerNewsIcon } from "./icons/hackerNews";
|
||||
import SvgYCombinatorLogo from "./icons/hackerNews/YCombinatorLogo";
|
||||
import { SupabaseIcon } from "./icons/supabase";
|
||||
import SvgSupabaseIcon from "./icons/supabase/SupabaseIcon";
|
||||
import { APITemplateType } from "./types/api";
|
||||
import { IVarHighlightType } from "./types/components";
|
||||
import { FlowType, NodeType } from "./types/flow";
|
||||
|
|
@ -135,39 +105,6 @@ export enum TypeModal {
|
|||
PROMPT = 2,
|
||||
}
|
||||
|
||||
export const svgIcons = {
|
||||
/* Airbyte: SvgAirbyte,
|
||||
Anthropic: SvgAnthropicBox,
|
||||
Bing: SvgBing,
|
||||
Chroma: SvgChroma,
|
||||
Cohere: SvgCohere,
|
||||
Evernote: SvgEvernoteIcon,
|
||||
FacebookMessenger: SvgFacebookMessengerLogo2020,
|
||||
GitBook: SvgGitbookSvgrepoCom,
|
||||
Google: SvgGoogle,
|
||||
HackerNews: SvgYCombinatorLogo,
|
||||
HuggingFace: SvgHfLogo,
|
||||
IFixIt: SvgIfixitSeeklogocom,
|
||||
Meta: SvgMetaIcon,
|
||||
MidJorney: SvgMidjourneyEmblem,
|
||||
MongoDB: SvgMongodbIcon,
|
||||
Notion: SvgNotionLogo,
|
||||
OpenAi: SvgOpenAi,
|
||||
Pinecone: SvgPineconeLogo,
|
||||
PowerPoint: SvgPowerPoint,
|
||||
QDrant: SvgQDrant,
|
||||
ReadTheDocs: SvgReadthedocsioIcon,
|
||||
Searx: SvgSearxLogo,
|
||||
Serper: SvgSerper,
|
||||
Slack: SvgSlackIcon,
|
||||
Supabase: SvgSupabaseIcon,
|
||||
VertexAI: SvgVertexAi,
|
||||
Weaviate: SvgWeaviate,
|
||||
Wikipedia: SvgWikipedia,
|
||||
Wolfram: SvgWolfram,
|
||||
Word: SvgWord, */
|
||||
};
|
||||
|
||||
export const textColors = {
|
||||
white: "text-white",
|
||||
red: "text-red-700",
|
||||
|
|
@ -356,7 +293,6 @@ export const nodeIconsLucide = {
|
|||
Copy,
|
||||
Upload,
|
||||
};
|
||||
/* Trash2 */
|
||||
|
||||
export const gradients = [
|
||||
"bg-gradient-to-br from-gray-800 via-rose-700 to-violet-900",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue