From 24ef4034b642b095652cfae71d93a9049ca10092 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Tue, 28 May 2024 12:16:38 -0300 Subject: [PATCH] Refactor: Revamp utils Folder Structure --- .../components/csvSelect/index.tsx | 40 ++++++++++++++ .../IOModal/components/IOFieldView/index.tsx | 53 +++---------------- src/frontend/src/modals/baseModal/index.tsx | 3 +- .../extraSidebarComponent/index.tsx | 34 ++++++------ 4 files changed, 64 insertions(+), 66 deletions(-) create mode 100644 src/frontend/src/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx new file mode 100644 index 000000000..5adb156ef --- /dev/null +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/components/csvSelect/index.tsx @@ -0,0 +1,40 @@ +import { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectTrigger, + SelectValue, +} from "../../../../../../components/ui/select"; + +export default function CsvSelect({ node, handleChangeSelect }): JSX.Element { + return ( + <> +
+ Expand the ouptut to see the CSV +
+
+ CSV separator + +
+ + ); +} diff --git a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx index 050f1acbb..9d955336d 100644 --- a/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx +++ b/src/frontend/src/modals/IOModal/components/IOFieldView/index.tsx @@ -5,17 +5,10 @@ import CsvOutputComponent from "../../../../components/csvOutputComponent"; import InputListComponent from "../../../../components/inputListComponent"; import PdfViewer from "../../../../components/pdfViewer"; import RecordsOutputComponent from "../../../../components/recordsOutputComponent"; -import { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectTrigger, - SelectValue, -} from "../../../../components/ui/select"; import { Textarea } from "../../../../components/ui/textarea"; import { PDFViewConstant } from "../../../../constants/constants"; import { InputOutput } from "../../../../constants/enums"; +import TextOutputView from "../../../../shared/components/textOutputView"; import useFlowStore from "../../../../stores/flowStore"; import { IOFieldViewProps } from "../../../../types/components"; import { @@ -24,6 +17,7 @@ import { } from "../../../../utils/reactflowUtils"; import IOFileInput from "./components/FileInput"; import IoJsonInput from "./components/JSONInput"; +import CsvSelect from "./components/csvSelect"; import IOKeyPairInput from "./components/keyPairInput"; export default function IOFieldView({ @@ -164,19 +158,7 @@ export default function IOFieldView({ switch (fieldType) { case "TextOutput": return ( -