From 5a42476aa6bfb4b594752f4a0dd5b742d618b9b0 Mon Sep 17 00:00:00 2001 From: Mateusz Russak Date: Mon, 19 Feb 2024 16:15:20 +0100 Subject: [PATCH] refactor: move components to subfolders by category --- ui/src/core/templateMap.ts | 85 ++++++++++--------- .../{ => content}/CoreDataframe.vue | 8 +- .../{ => content}/CoreHeading.vue | 8 +- .../{ => content}/CoreIcon.vue | 10 +-- .../{ => content}/CoreImage.vue | 10 +-- .../{ => content}/CoreMessage.vue | 10 +-- .../{ => content}/CoreMetric.vue | 8 +- .../{ => content}/CorePlotlyGraph.vue | 8 +- .../{ => content}/CoreText.vue | 10 +-- .../{ => content}/CoreVegaLiteChart.vue | 8 +- .../{ => content}/CoreVideoPlayer.vue | 6 +- .../{ => layout}/CoreColumn.vue | 12 +-- .../{ => layout}/CoreColumns.vue | 6 +- .../{ => layout}/CoreHeader.vue | 8 +- .../{ => layout}/CoreHorizontalStack.vue | 8 +- .../{ => layout}/CoreSection.vue | 10 +-- .../{ => layout}/CoreSeparator.vue | 4 +- .../{ => layout}/CoreSidebar.vue | 10 +-- .../core_components/{ => layout}/CoreTab.vue | 12 +-- .../core_components/{ => layout}/CoreTabs.vue | 6 +- .../{ => other}/CoreButton.vue | 10 +-- .../core_components/{ => other}/CoreHtml.vue | 6 +- .../{ => other}/CorePagination.vue | 8 +- .../{ => other}/CoreRepeater.vue | 4 +- .../core_components/{ => other}/CoreTimer.vue | 6 +- .../{ => other}/CoreWebcamCapture.vue | 8 +- .../core_components/{ => root}/CorePage.vue | 10 +-- .../core_components/{ => root}/CoreRoot.vue | 10 +-- 28 files changed, 156 insertions(+), 153 deletions(-) rename ui/src/core_components/{ => content}/CoreDataframe.vue (98%) rename ui/src/core_components/{ => content}/CoreHeading.vue (85%) rename ui/src/core_components/{ => content}/CoreIcon.vue (84%) rename ui/src/core_components/{ => content}/CoreImage.vue (92%) rename ui/src/core_components/{ => content}/CoreMessage.vue (93%) rename ui/src/core_components/{ => content}/CoreMetric.vue (93%) rename ui/src/core_components/{ => content}/CorePlotlyGraph.vue (94%) rename ui/src/core_components/{ => content}/CoreText.vue (92%) rename ui/src/core_components/{ => content}/CoreVegaLiteChart.vue (90%) rename ui/src/core_components/{ => content}/CoreVideoPlayer.vue (92%) rename ui/src/core_components/{ => layout}/CoreColumn.vue (95%) rename ui/src/core_components/{ => layout}/CoreColumns.vue (81%) rename ui/src/core_components/{ => layout}/CoreHeader.vue (83%) rename ui/src/core_components/{ => layout}/CoreHorizontalStack.vue (82%) rename ui/src/core_components/{ => layout}/CoreSection.vue (86%) rename ui/src/core_components/{ => layout}/CoreSeparator.vue (88%) rename ui/src/core_components/{ => layout}/CoreSidebar.vue (93%) rename ui/src/core_components/{ => layout}/CoreTab.vue (94%) rename ui/src/core_components/{ => layout}/CoreTabs.vue (93%) rename ui/src/core_components/{ => other}/CoreButton.vue (89%) rename ui/src/core_components/{ => other}/CoreHtml.vue (93%) rename ui/src/core_components/{ => other}/CorePagination.vue (98%) rename ui/src/core_components/{ => other}/CoreRepeater.vue (95%) rename ui/src/core_components/{ => other}/CoreTimer.vue (94%) rename ui/src/core_components/{ => other}/CoreWebcamCapture.vue (96%) rename ui/src/core_components/{ => root}/CorePage.vue (93%) rename ui/src/core_components/{ => root}/CoreRoot.vue (96%) diff --git a/ui/src/core/templateMap.ts b/ui/src/core/templateMap.ts index 5072e2760..3acb76c5f 100644 --- a/ui/src/core/templateMap.ts +++ b/ui/src/core/templateMap.ts @@ -1,52 +1,55 @@ // Maps Streamsync component types to renderable Vue components - -import CorePage from "../core_components/CorePage.vue"; -import CoreSidebar from "../core_components/CoreSidebar.vue"; -import CoreText from "../core_components/CoreText.vue"; -import CoreButton from "../core_components/CoreButton.vue"; -import CoreIcon from "../core_components/CoreIcon.vue"; -import CoreSection from "../core_components/CoreSection.vue"; -import CoreHeader from "../core_components/CoreHeader.vue"; -import CoreHeading from "../core_components/CoreHeading.vue"; -import CoreDataframe from "../core_components/CoreDataframe.vue"; -import CoreHtml from "../core_components/CoreHtml.vue"; -import CorePagination from "../core_components/CorePagination.vue"; -import CoreRepeater from "../core_components/CoreRepeater.vue"; -import CoreColumn from "../core_components/CoreColumn.vue"; -import CoreColumns from "../core_components/CoreColumns.vue"; -import CoreHorizontalStack from "../core_components/CoreHorizontalStack.vue"; -import CoreSeparator from "../core_components/CoreSeparator.vue"; -import CoreTab from "../core_components/CoreTab.vue"; -import CoreTabs from "../core_components/CoreTabs.vue"; -import CoreImage from "../core_components/CoreImage.vue"; -import CorePDF from "../core_components/embed/CorePDF.vue"; -import CoreIFrame from "../core_components/embed/CoreIFrame.vue"; -import CoreGoogleMaps from "../core_components/embed/CoreGoogleMaps.vue"; -import CoreTimer from "../core_components/CoreTimer.vue"; -import CoreWebcamCapture from "../core_components/CoreWebcamCapture.vue"; -import CoreVegaLiteChart from "../core_components/CoreVegaLiteChart.vue"; -import CorePlotlyGraph from "../core_components/CorePlotlyGraph.vue"; -import CoreRoot from "../core_components/CoreRoot.vue"; -import CoreTextInput from "../core_components/input/CoreTextInput.vue"; -import CoreTextareaInput from "../core_components/input/CoreTextareaInput.vue"; -import CoreNumberInput from "../core_components/input/CoreNumberInput.vue"; -import CoreSliderInput from "../core_components/input/CoreSliderInput.vue"; +// content +import CoreDataframe from "../core_components/content/CoreDataframe.vue"; +import CoreHeading from "../core_components/content/CoreHeading.vue"; +import CoreIcon from "../core_components/content/CoreIcon.vue"; +import CoreImage from "../core_components/content/CoreImage.vue"; +import CoreMessage from "../core_components/content/CoreMessage.vue"; +import CoreMetric from "../core_components/content/CoreMetric.vue"; +import CorePlotlyGraph from "../core_components/content/CorePlotlyGraph.vue"; +import CoreText from "../core_components/content/CoreText.vue"; +import CoreVegaLiteChart from "../core_components/content/CoreVegaLiteChart.vue"; +import CoreVideoPlayer from "../core_components/content/CoreVideoPlayer.vue"; +// input +import CoreCheckboxInput from "../core_components/input/CoreCheckboxInput.vue"; import CoreDateInput from "../core_components/input/CoreDateInput.vue"; -import CoreRadioInput from "../core_components/input/CoreRadioInput.vue"; import CoreDropdownInput from "../core_components/input/CoreDropdownInput.vue"; -import CoreSelectInput from "../core_components/input/CoreSelectInput.vue"; -import CoreMultiselectInput from "../core_components/input/CoreMultiselectInput.vue"; -import CoreCheckboxInput from "../core_components/input/CoreCheckboxInput.vue"; import CoreFileInput from "../core_components/input/CoreFileInput.vue"; -import CoreMetric from "../core_components/CoreMetric.vue"; -import CoreMessage from "../core_components/CoreMessage.vue"; -import CoreVideoPlayer from "../core_components/CoreVideoPlayer.vue"; +import CoreMultiselectInput from "../core_components/input/CoreMultiselectInput.vue"; +import CoreNumberInput from "../core_components/input/CoreNumberInput.vue"; +import CoreRadioInput from "../core_components/input/CoreRadioInput.vue"; +import CoreSelectInput from "../core_components/input/CoreSelectInput.vue"; +import CoreSliderInput from "../core_components/input/CoreSliderInput.vue"; +import CoreTextInput from "../core_components/input/CoreTextInput.vue"; +import CoreTextareaInput from "../core_components/input/CoreTextareaInput.vue"; +// layout +import CoreColumn from "../core_components/layout/CoreColumn.vue"; +import CoreColumns from "../core_components/layout/CoreColumns.vue"; +import CoreHeader from "../core_components/layout/CoreHeader.vue"; +import CoreHorizontalStack from "../core_components/layout/CoreHorizontalStack.vue"; +import CoreSection from "../core_components/layout/CoreSection.vue"; +import CoreSeparator from "../core_components/layout/CoreSeparator.vue"; +import CoreSidebar from "../core_components/layout/CoreSidebar.vue"; +import CoreTab from "../core_components/layout/CoreTab.vue"; +import CoreTabs from "../core_components/layout/CoreTabs.vue"; +// other +import CoreButton from "../core_components/other/CoreButton.vue"; +import CoreHtml from "../core_components/other/CoreHtml.vue"; +import CorePagination from "../core_components/other/CorePagination.vue"; +import CoreRepeater from "../core_components/other/CoreRepeater.vue"; +import CoreTimer from "../core_components/other/CoreTimer.vue"; +import CoreWebcamCapture from "../core_components/other/CoreWebcamCapture.vue"; +// embed +import CorePDF from "../core_components/embed/CorePDF.vue"; +import CoreIFrame from "../core_components/embed/CoreIFrame.vue"; +import CoreGoogleMaps from "../core_components/embed/CoreGoogleMaps.vue"; +// root +import CorePage from "../core_components/root/CorePage.vue"; +import CoreRoot from "../core_components/root/CoreRoot.vue"; import { StreamsyncComponentDefinition } from "../streamsyncTypes"; import { h } from "vue"; - - const templateMap = { root: CoreRoot, page: CorePage, diff --git a/ui/src/core_components/CoreDataframe.vue b/ui/src/core_components/content/CoreDataframe.vue similarity index 98% rename from ui/src/core_components/CoreDataframe.vue rename to ui/src/core_components/content/CoreDataframe.vue index e4f9c36f4..f39c4533e 100644 --- a/ui/src/core_components/CoreDataframe.vue +++ b/ui/src/core_components/content/CoreDataframe.vue @@ -100,13 +100,13 @@ \ No newline at end of file + diff --git a/ui/src/core_components/CoreImage.vue b/ui/src/core_components/content/CoreImage.vue similarity index 92% rename from ui/src/core_components/CoreImage.vue rename to ui/src/core_components/content/CoreImage.vue index 4fa88bed6..45ea33468 100644 --- a/ui/src/core_components/CoreImage.vue +++ b/ui/src/core_components/content/CoreImage.vue @@ -16,9 +16,9 @@ \ No newline at end of file + diff --git a/ui/src/core_components/CoreRepeater.vue b/ui/src/core_components/other/CoreRepeater.vue similarity index 95% rename from ui/src/core_components/CoreRepeater.vue rename to ui/src/core_components/other/CoreRepeater.vue index c2c20afab..91fc47607 100644 --- a/ui/src/core_components/CoreRepeater.vue +++ b/ui/src/core_components/other/CoreRepeater.vue @@ -1,7 +1,7 @@