From b94ed3d23b3d156bc853ec5b8625a55f7666c5ba Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 10 Feb 2022 16:41:43 +0000 Subject: [PATCH] Add new setting component for configuring table column order and display names --- .../ColumnEditor/ColumnDrawer.svelte | 145 ++++++++++++++++++ .../ColumnEditor/ColumnEditor.svelte | 64 ++++++++ .../NavigationEditor/NavigationEditor.svelte | 2 +- .../PropertyControls/componentSettings.js | 2 + 4 files changed, 212 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte index e69de29bb2..00927d522d 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnDrawer.svelte @@ -0,0 +1,145 @@ + + + +
+ + {#if columns?.length} +
+ {#each columns as column (column.id)} +
+
(dragDisabled = false)} + > + +
+ + removeColumn(column.id)} + /> +
+ {/each} +
+ {/if} +
+ +
+
+
+
+ + diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnEditor.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnEditor.svelte index e69de29bb2..8cebf5a657 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnEditor.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ColumnEditor/ColumnEditor.svelte @@ -0,0 +1,64 @@ + + +Configure columns + + + Configure the columns in your table. + + + + diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte index 40357f50be..33a82d1886 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte @@ -15,7 +15,7 @@ } -Configure Links +Configure links Configure the links in your navigation bar. diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/componentSettings.js b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/componentSettings.js index 15aa670fa9..23a0a312bc 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/componentSettings.js +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/componentSettings.js @@ -18,6 +18,7 @@ import OptionsEditor from "./OptionsEditor/OptionsEditor.svelte" import FormFieldSelect from "./FormFieldSelect.svelte" import ValidationEditor from "./ValidationEditor/ValidationEditor.svelte" import DrawerBindableCombobox from "components/common/bindings/DrawerBindableCombobox.svelte" +import ColumnEditor from "./ColumnEditor/ColumnEditor.svelte" const componentMap = { text: DrawerBindableCombobox, @@ -40,6 +41,7 @@ const componentMap = { navigation: NavigationEditor, filter: FilterEditor, url: URLSelect, + columns: ColumnEditor, "field/string": FormFieldSelect, "field/number": FormFieldSelect, "field/options": FormFieldSelect,