From dae550c21e00b4a97b74a137b743dc9c2fecc558 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 25 Oct 2024 16:24:40 +0100 Subject: [PATCH] Tidy up import data modal and change to be a detail popover --- .../DataTable/buttons/ImportButton.svelte | 92 ++++++++++-- .../DataTable/modals/ImportModal.svelte | 61 -------- .../TableNavigator/TableDataImport.svelte | 134 ++++++++---------- 3 files changed, 145 insertions(+), 142 deletions(-) delete mode 100644 packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte diff --git a/packages/builder/src/components/backend/DataTable/buttons/ImportButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/ImportButton.svelte index 88c57daa21..5e9850b290 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/ImportButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/ImportButton.svelte @@ -1,17 +1,91 @@ - - Import - - - - + + + + Import + + + + Import rows to an existing table from a CSV or JSON file. Only columns from + the file which exist in the table will be imported. + + + + + +
+ +
+
diff --git a/packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte b/packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte deleted file mode 100644 index 1696c6ba03..0000000000 --- a/packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Import rows to an existing table from a CSV or JSON file. Only columns from - the file which exist in the table will be imported. - - - - - - diff --git a/packages/builder/src/components/backend/TableNavigator/TableDataImport.svelte b/packages/builder/src/components/backend/TableNavigator/TableDataImport.svelte index 5804dc3172..7743762877 100644 --- a/packages/builder/src/components/backend/TableNavigator/TableDataImport.svelte +++ b/packages/builder/src/components/backend/TableNavigator/TableDataImport.svelte @@ -1,5 +1,5 @@ -
- - -
-{#if rawRows.length > 0 && !error} -
- {#each Object.entries(schema) as [name, column]} -
- {column.name} - +
-
+ + {#if rawRows.length > 0 && !error} +
+ {#each Object.entries(schema) as [name, column]} +
+ {column.name} + -
-{/if} + {/if} +