From ed5fb4b830b4d2cc9fdfd5ce89c88e078b8e92e9 Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 21 Apr 2020 14:20:57 +0100 Subject: [PATCH] New component panel structure - template update --- .../ComponentSelectionList.svelte | 90 ++++- .../userInterface/ComponentTab/Tab.svelte | 13 +- .../OldComponentSelectionList.svelte | 335 ++++++++++++++++++ .../userInterface/temporaryPanelStructure.js | 8 +- 4 files changed, 436 insertions(+), 10 deletions(-) create mode 100644 packages/builder/src/components/userInterface/OldComponentSelectionList.svelte diff --git a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte index 8afddfbe24..12159f675c 100644 --- a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte +++ b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte @@ -1,11 +1,78 @@
@@ -19,10 +86,29 @@ {/each}
- +
+ (selectedComponent = null)} + onOk={onTemplateInstanceChosen}> + {#each templateInstances.map(i => i.name) as instance} +
+ +
+ {/each} +
+ diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 1ade6134e9..51e95049b5 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -140,7 +140,6 @@ export default { description: 'A component that generates a table from your data.', icon: 'ri-archive-drawer-fill', commonProps: {}, - modelRequired: true, type: [] }, { @@ -148,7 +147,12 @@ export default { description: 'A component that generates a form from your data.', icon: 'ri-file-edit-fill', commonProps: {}, - modelRequired: true, + component: "@budibase/materialdesign-components/Form", + template: { + component: "@budibase/materialdesign-components/Form", + description: "Form for saving a record", + name: "@budibase/materialdesign-components/recordForm", + }, type: [] } ]