From c895e9887bee9972992585c248b4e9efb0d95718 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 21 Oct 2020 09:19:26 +0100 Subject: [PATCH 01/52] Add initial work on dropdown components --- packages/builder/src/budibase.css | 8 -- .../ComponentSelectionList.svelte | 107 ++++++++++++++---- .../userInterface/FrontendNavigatePane.svelte | 8 +- .../userInterface/ItemTab/Item.svelte | 4 +- .../userInterface/ItemTab/Tab.svelte | 22 +++- .../[application]/frontend/_layout.svelte | 44 +++---- 6 files changed, 129 insertions(+), 64 deletions(-) diff --git a/packages/builder/src/budibase.css b/packages/builder/src/budibase.css index 6dc786f522..1426a7beed 100644 --- a/packages/builder/src/budibase.css +++ b/packages/builder/src/budibase.css @@ -85,14 +85,6 @@ box-sizing: border-box; } -.preview-pane { - grid-column: 2; - margin: 80px 60px; - background: #fff; - border-radius: 5px; - box-shadow: 0 0px 6px rgba(0, 0, 0, 0.05); -} - .budibase__table { border: 1px solid var(--grey-4); background: #fff; diff --git a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte index 00ce42cf61..404cfa102b 100644 --- a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte +++ b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte @@ -3,46 +3,111 @@ import { store } from "builderStore" import components from "./temporaryPanelStructure.js" import CategoryTab from "./CategoryTab.svelte" + import { Popover } from "@budibase/bbui" + import { fade, fly } from "svelte/transition" import Tab from "./ItemTab/Tab.svelte" - export let toggleTab - const categories = components.categories - let selectedCategory = categories[0] + let selectedIndex + let width + $: selectedCategory = selectedIndex == null ? null : categories[selectedIndex] + + const close = () => { + selectedIndex = null + } const onComponentChosen = component => { store.addChildComponent(component._component, component.presetProps) - toggleTab("Navigate") - // Get ID path const path = store.getPathToComponent($store.currentComponentInfo) // Go to correct URL $goto(`./:page/:screen/${path}`) + close() } -
- (selectedCategory = category)} - {selectedCategory} - {categories} /> - -
- onComponentChosen(e.detail)} - {toggleTab} /> +
+
+ {#each categories as category, idx} +
(selectedIndex = idx)} + class:active={selectedCategory === category}> + {category.name} + +
+ {/each}
+ {#if selectedCategory != null} +
+ + {/if}
diff --git a/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte b/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte index 64c3ee45f4..651cc5c6ac 100644 --- a/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte +++ b/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte @@ -4,19 +4,17 @@ import PageLayout from "components/userInterface/PageLayout.svelte" import PagesList from "components/userInterface/PagesList.svelte" import NewScreenModal from "components/userInterface/NewScreenModal.svelte" - import { Button, Spacer, Modal } from "@budibase/bbui" + import { Button, Spacer, Modal, Heading } from "@budibase/bbui" let modal +Screens - - - - diff --git a/packages/builder/src/components/userInterface/ItemTab/Item.svelte b/packages/builder/src/components/userInterface/ItemTab/Item.svelte index 7d118afe61..de04bc5208 100644 --- a/packages/builder/src/components/userInterface/ItemTab/Item.svelte +++ b/packages/builder/src/components/userInterface/ItemTab/Item.svelte @@ -14,12 +14,12 @@ display: flex; flex-direction: column; cursor: pointer; - padding: 12px 16px 16px 16px; - height: 80px; justify-content: center; align-items: center; background-color: var(--grey-1); border-radius: 5px; + width: 120px; + height: 80px; } .item-item:hover { diff --git a/packages/builder/src/components/userInterface/ItemTab/Tab.svelte b/packages/builder/src/components/userInterface/ItemTab/Tab.svelte index 090fad1dc1..db16acf3d6 100644 --- a/packages/builder/src/components/userInterface/ItemTab/Tab.svelte +++ b/packages/builder/src/components/userInterface/ItemTab/Tab.svelte @@ -25,11 +25,13 @@ {#if !list.isCategory} {/if} -{#each list.children as item} - {#if !item.showOnPages || item.showOnPages.includes($store.currentPageName)} - handleClick(item)} /> - {/if} -{/each} +
+ {#each list.children as item} + {#if !item.showOnPages || item.showOnPages.includes($store.currentPageName)} + handleClick(item)} /> + {/if} + {/each} +
diff --git a/packages/builder/src/pages/[application]/frontend/_layout.svelte b/packages/builder/src/pages/[application]/frontend/_layout.svelte index 0aae313ccd..420a1bd2ea 100644 --- a/packages/builder/src/pages/[application]/frontend/_layout.svelte +++ b/packages/builder/src/pages/[application]/frontend/_layout.svelte @@ -32,8 +32,6 @@ settingsView.show() } - let leftNavSwitcher - const lastPartOfName = c => (c ? last(c.split("/")) : "") @@ -41,21 +39,15 @@
- - -
- -
-
- -
-
- +
{#if $store.currentPageName && $store.currentPageName.length > 0} - + +
+ +
{/if}
@@ -73,34 +65,42 @@ .root { display: grid; grid-template-columns: 300px 1fr 300px; - width: 100%; background: var(--grey-1); - flex: 1; - min-height: 0; align-items: stretch; + height: calc(100vh - 60px); } .ui-nav { grid-column: 1; background-color: var(--white); - height: calc(100vh - 69px); - padding: 0; display: flex; flex-direction: column; + gap: var(--spacing-m); + padding: var(--spacing-xl); + overflow-y: auto; + border-right: 1px solid var(--grey-2); } .preview-pane { grid-column: 2; - margin: 40px; + overflow-y: auto; + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: stretch; + gap: var(--spacing-m); + } + .preview-content { background: #fff; - border-radius: 5px; + box-shadow: 0 0 12px rgba(0, 0, 0, 0.05); + flex: 1 1 auto; + margin: var(--spacing-xl) 40px; } .components-pane { grid-column: 3; background-color: var(--white); - min-height: 0px; - height: calc(100vh - 69px); + border-left: 1px solid var(--grey-2); } .nav-group-header > div:nth-child(1) { From e1c70f43db96415568f44b28b345003cd0641a8e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 15:11:22 +0100 Subject: [PATCH 02/52] Rename backend to data and frontend to design --- .../src/pages/[application]/{backend => data}/_layout.svelte | 0 .../src/pages/[application]/{backend => data}/index.svelte | 0 .../{backend => data}/table/[selectedTable]/_layout.svelte | 0 .../{backend => data}/table/[selectedTable]/index.svelte | 0 .../relationship/[selectedRow]/[selectedField]/index.svelte | 0 .../table/[selectedTable]/relationship/[selectedRow]/index.svelte | 0 .../table/[selectedTable]/relationship/index.svelte | 0 .../pages/[application]/{backend => data}/table/_layout.svelte | 0 .../src/pages/[application]/{backend => data}/table/index.svelte | 0 .../{backend => data}/view/[selectedView]/_layout.svelte | 0 .../{backend => data}/view/[selectedView]/index.svelte | 0 .../{frontend => design}/[page]/[screen]/_fallback.svelte | 0 .../{frontend => design}/[page]/[screen]/_layout.svelte | 0 .../[application]/{frontend => design}/[page]/_layout.svelte | 0 .../pages/[application]/{frontend => design}/[page]/index.svelte | 0 .../src/pages/[application]/{frontend => design}/_layout.svelte | 0 .../src/pages/[application]/{frontend => design}/index.svelte | 0 17 files changed, 0 insertions(+), 0 deletions(-) rename packages/builder/src/pages/[application]/{backend => data}/_layout.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/index.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/table/[selectedTable]/_layout.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/table/[selectedTable]/index.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/table/[selectedTable]/relationship/[selectedRow]/[selectedField]/index.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/table/[selectedTable]/relationship/[selectedRow]/index.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/table/[selectedTable]/relationship/index.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/table/_layout.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/table/index.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/view/[selectedView]/_layout.svelte (100%) rename packages/builder/src/pages/[application]/{backend => data}/view/[selectedView]/index.svelte (100%) rename packages/builder/src/pages/[application]/{frontend => design}/[page]/[screen]/_fallback.svelte (100%) rename packages/builder/src/pages/[application]/{frontend => design}/[page]/[screen]/_layout.svelte (100%) rename packages/builder/src/pages/[application]/{frontend => design}/[page]/_layout.svelte (100%) rename packages/builder/src/pages/[application]/{frontend => design}/[page]/index.svelte (100%) rename packages/builder/src/pages/[application]/{frontend => design}/_layout.svelte (100%) rename packages/builder/src/pages/[application]/{frontend => design}/index.svelte (100%) diff --git a/packages/builder/src/pages/[application]/backend/_layout.svelte b/packages/builder/src/pages/[application]/data/_layout.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/_layout.svelte rename to packages/builder/src/pages/[application]/data/_layout.svelte diff --git a/packages/builder/src/pages/[application]/backend/index.svelte b/packages/builder/src/pages/[application]/data/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/index.svelte rename to packages/builder/src/pages/[application]/data/index.svelte diff --git a/packages/builder/src/pages/[application]/backend/table/[selectedTable]/_layout.svelte b/packages/builder/src/pages/[application]/data/table/[selectedTable]/_layout.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/table/[selectedTable]/_layout.svelte rename to packages/builder/src/pages/[application]/data/table/[selectedTable]/_layout.svelte diff --git a/packages/builder/src/pages/[application]/backend/table/[selectedTable]/index.svelte b/packages/builder/src/pages/[application]/data/table/[selectedTable]/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/table/[selectedTable]/index.svelte rename to packages/builder/src/pages/[application]/data/table/[selectedTable]/index.svelte diff --git a/packages/builder/src/pages/[application]/backend/table/[selectedTable]/relationship/[selectedRow]/[selectedField]/index.svelte b/packages/builder/src/pages/[application]/data/table/[selectedTable]/relationship/[selectedRow]/[selectedField]/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/table/[selectedTable]/relationship/[selectedRow]/[selectedField]/index.svelte rename to packages/builder/src/pages/[application]/data/table/[selectedTable]/relationship/[selectedRow]/[selectedField]/index.svelte diff --git a/packages/builder/src/pages/[application]/backend/table/[selectedTable]/relationship/[selectedRow]/index.svelte b/packages/builder/src/pages/[application]/data/table/[selectedTable]/relationship/[selectedRow]/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/table/[selectedTable]/relationship/[selectedRow]/index.svelte rename to packages/builder/src/pages/[application]/data/table/[selectedTable]/relationship/[selectedRow]/index.svelte diff --git a/packages/builder/src/pages/[application]/backend/table/[selectedTable]/relationship/index.svelte b/packages/builder/src/pages/[application]/data/table/[selectedTable]/relationship/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/table/[selectedTable]/relationship/index.svelte rename to packages/builder/src/pages/[application]/data/table/[selectedTable]/relationship/index.svelte diff --git a/packages/builder/src/pages/[application]/backend/table/_layout.svelte b/packages/builder/src/pages/[application]/data/table/_layout.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/table/_layout.svelte rename to packages/builder/src/pages/[application]/data/table/_layout.svelte diff --git a/packages/builder/src/pages/[application]/backend/table/index.svelte b/packages/builder/src/pages/[application]/data/table/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/table/index.svelte rename to packages/builder/src/pages/[application]/data/table/index.svelte diff --git a/packages/builder/src/pages/[application]/backend/view/[selectedView]/_layout.svelte b/packages/builder/src/pages/[application]/data/view/[selectedView]/_layout.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/view/[selectedView]/_layout.svelte rename to packages/builder/src/pages/[application]/data/view/[selectedView]/_layout.svelte diff --git a/packages/builder/src/pages/[application]/backend/view/[selectedView]/index.svelte b/packages/builder/src/pages/[application]/data/view/[selectedView]/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/backend/view/[selectedView]/index.svelte rename to packages/builder/src/pages/[application]/data/view/[selectedView]/index.svelte diff --git a/packages/builder/src/pages/[application]/frontend/[page]/[screen]/_fallback.svelte b/packages/builder/src/pages/[application]/design/[page]/[screen]/_fallback.svelte similarity index 100% rename from packages/builder/src/pages/[application]/frontend/[page]/[screen]/_fallback.svelte rename to packages/builder/src/pages/[application]/design/[page]/[screen]/_fallback.svelte diff --git a/packages/builder/src/pages/[application]/frontend/[page]/[screen]/_layout.svelte b/packages/builder/src/pages/[application]/design/[page]/[screen]/_layout.svelte similarity index 100% rename from packages/builder/src/pages/[application]/frontend/[page]/[screen]/_layout.svelte rename to packages/builder/src/pages/[application]/design/[page]/[screen]/_layout.svelte diff --git a/packages/builder/src/pages/[application]/frontend/[page]/_layout.svelte b/packages/builder/src/pages/[application]/design/[page]/_layout.svelte similarity index 100% rename from packages/builder/src/pages/[application]/frontend/[page]/_layout.svelte rename to packages/builder/src/pages/[application]/design/[page]/_layout.svelte diff --git a/packages/builder/src/pages/[application]/frontend/[page]/index.svelte b/packages/builder/src/pages/[application]/design/[page]/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/frontend/[page]/index.svelte rename to packages/builder/src/pages/[application]/design/[page]/index.svelte diff --git a/packages/builder/src/pages/[application]/frontend/_layout.svelte b/packages/builder/src/pages/[application]/design/_layout.svelte similarity index 100% rename from packages/builder/src/pages/[application]/frontend/_layout.svelte rename to packages/builder/src/pages/[application]/design/_layout.svelte diff --git a/packages/builder/src/pages/[application]/frontend/index.svelte b/packages/builder/src/pages/[application]/design/index.svelte similarity index 100% rename from packages/builder/src/pages/[application]/frontend/index.svelte rename to packages/builder/src/pages/[application]/design/index.svelte From d3714ea9ee6f75c89d5ccf6d2ffc11fdac2ea6a6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 15:11:46 +0100 Subject: [PATCH 03/52] Update top nav border style --- .../src/pages/[application]/_reset.svelte | 58 ++++++++++--------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/packages/builder/src/pages/[application]/_reset.svelte b/packages/builder/src/pages/[application]/_reset.svelte index 87759aef97..a39fd0ce62 100644 --- a/packages/builder/src/pages/[application]/_reset.svelte +++ b/packages/builder/src/pages/[application]/_reset.svelte @@ -30,10 +30,10 @@ // e.g. if one of your screens is selected on front end, then // you browse to backend, when you click frontend, you will be // brought back to the same screen - const topItemNavigate = path => () => { - const activeTopNav = $layout.children.find(c => $isActive(c.path)) + const topItemNavigate = (path) => () => { + const activeTopNav = $layout.children.find((c) => $isActive(c.path)) if (!activeTopNav) return - store.update(state => { + store.update((state) => { if (!state.previousTopNavPath) state.previousTopNavPath = {} state.previousTopNavPath[ activeTopNav.path @@ -66,22 +66,26 @@
- + + + +
+
+ + + +
+
@@ -120,7 +124,7 @@ flex: 0 0 auto; height: 60px; background: #fff; - padding: 0px 20px 0 20px; + padding: 0 20px; display: flex; box-sizing: border-box; justify-content: space-between; @@ -166,20 +170,19 @@ font-weight: 500; } - .topnavitemright { + .topnavitemright a { cursor: pointer; color: var(--grey-7); - margin: 0 20px 0 0; - font-weight: 500; - font-size: 1rem; - height: 100%; + margin: 0 12px 0 0; display: flex; - flex: 1; + flex-direction: row; + justify-content: center; align-items: center; - box-sizing: border-box; + height: 24px; + width: 24px; } - .topnavitemright:hover { + .topnavitemright a:hover { color: var(--ink); font-weight: 500; } @@ -205,10 +208,13 @@ text-transform: capitalize; } - .help { - font-size: 24px; + i { + font-size: 18px; color: var(--grey-7); } + i:hover { + color: var(--ink); + } .beta { position: absolute; From 6bead1126483dfebb530e2265729b0737df967af Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 17:39:50 +0100 Subject: [PATCH 04/52] Update remix icons version to fix line chart icon --- packages/builder/src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/index.html b/packages/builder/src/index.html index 150d9e23b9..b4073c2d7e 100644 --- a/packages/builder/src/index.html +++ b/packages/builder/src/index.html @@ -7,7 +7,7 @@ Budibase Builder - + From 29dd32320d77db5bec6eaa71e66027f0b074a69a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 17:42:03 +0100 Subject: [PATCH 05/52] Update screen components hierarchy to use new common component styles --- .../src/components/common/NavItem.svelte | 108 ++++++++++++++++++ .../userInterface/ComponentsHierarchy.svelte | 94 +++------------ .../ComponentsHierarchyChildren.svelte | 103 +++++------------ .../userInterface/PageLayout.svelte | 67 ++--------- 4 files changed, 159 insertions(+), 213 deletions(-) create mode 100644 packages/builder/src/components/common/NavItem.svelte diff --git a/packages/builder/src/components/common/NavItem.svelte b/packages/builder/src/components/common/NavItem.svelte new file mode 100644 index 0000000000..7e21689c3f --- /dev/null +++ b/packages/builder/src/components/common/NavItem.svelte @@ -0,0 +1,108 @@ + + +
+
+ {#if withArrow} +
+ +
+ {/if} + {#if icon} +
+ {/if} +
{text}
+ {#if withActions} +
+ +
+ {/if} +
+
+ + diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index add2a99d6a..43a2c07bd9 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -1,13 +1,12 @@ -
- - - - - Master Screen -
+ {#if $store.currentPreviewItem.name === _layout.title && _layout.component.props._children} {/if} - - From 80e71bff91d0e73c0bbf613f55f798cc5845dd11 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 17:43:27 +0100 Subject: [PATCH 06/52] Update routing to use new page names --- packages/builder/src/pages/[application]/index.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/pages/[application]/index.svelte b/packages/builder/src/pages/[application]/index.svelte index 4b5dbb6a3e..553908cb2e 100644 --- a/packages/builder/src/pages/[application]/index.svelte +++ b/packages/builder/src/pages/[application]/index.svelte @@ -1,6 +1,6 @@ From 45b86353d2a247bed8c41fa4f55721e159b17646 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 17:43:52 +0100 Subject: [PATCH 07/52] Improve styles of frontend component blocks --- .../src/components/userInterface/ItemTab/Item.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/userInterface/ItemTab/Item.svelte b/packages/builder/src/components/userInterface/ItemTab/Item.svelte index de04bc5208..ce4f602f03 100644 --- a/packages/builder/src/components/userInterface/ItemTab/Item.svelte +++ b/packages/builder/src/components/userInterface/ItemTab/Item.svelte @@ -20,6 +20,7 @@ border-radius: 5px; width: 120px; height: 80px; + color: var(--grey-7); } .item-item:hover { @@ -35,16 +36,16 @@ .item-text { display: flex; flex-direction: column; + margin-top: 5px; } .item-name { - font-size: 14px; - font-weight: 400; + font-size: 12px; + font-weight: 500; text-align: center; } i { font-size: 24px; - color: var(--grey-7); } From 664aacd402cc6f2be9fa6d210a62cbdc7240ca08 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 17:44:17 +0100 Subject: [PATCH 08/52] Fix top right settings icon styles --- .../src/components/settings/Link.svelte | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/builder/src/components/settings/Link.svelte b/packages/builder/src/components/settings/Link.svelte index 3bb6d6e40d..f28dbae038 100644 --- a/packages/builder/src/components/settings/Link.svelte +++ b/packages/builder/src/components/settings/Link.svelte @@ -1,32 +1,36 @@ - - - +
+ +
From 79cca1956abace23b46760994703b3d58ed17b38 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 17:44:45 +0100 Subject: [PATCH 09/52] Make OptionSelect styles in line with other components --- .../userInterface/OptionSelect.svelte | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/components/userInterface/OptionSelect.svelte b/packages/builder/src/components/userInterface/OptionSelect.svelte index aac5c44c07..1c3ee89213 100644 --- a/packages/builder/src/components/userInterface/OptionSelect.svelte +++ b/packages/builder/src/components/userInterface/OptionSelect.svelte @@ -6,13 +6,14 @@ export let options = [] export let value = "" export let styleBindingProperty - export let onChange = value => {} + export let onChange = (value) => {} let open = null let rotate = "" let select let selectMenu let icon + let width = 0 let selectAnchor = null let dimensions = { top: 0, bottom: 0, left: 0 } @@ -22,7 +23,7 @@ let scrollTop = 0 let containerEl = null - const handleStyleBind = value => + const handleStyleBind = (value) => !!styleBindingProperty ? { style: `${styleBindingProperty}: ${value}` } : {} onMount(() => { @@ -91,12 +92,13 @@ "transform-origin": `center ${positionSide}`, [positionSide]: `${dimensions[positionSide]}px`, left: `${dimensions.left.toFixed(0)}px`, + width: `${width}px`, }) - $: isOptionsObject = options.every(o => typeof o === "object") + $: isOptionsObject = options.every((o) => typeof o === "object") $: selectedOption = isOptionsObject - ? options.find(o => o.value === value) + ? options.find((o) => o.value === value) : {} $: if (open && selectMenu) { @@ -108,6 +110,7 @@
span { color: var(--ink); font-weight: 400; - width: 140px; overflow-x: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: var(--font-size-xs); + flex: 1 1 auto; } .bb-select-anchor > i { @@ -208,7 +212,6 @@ box-sizing: border-box; flex-direction: column; opacity: 0; - width: 160px; z-index: 2; color: var(--ink); font-weight: 400; @@ -237,7 +240,7 @@ padding: 5px 0px; cursor: pointer; padding-left: 10px; - font-size: var(--font-size-s); + font-size: var(--font-size-xs); } li:hover { From 1fac774521470ee0ed21e8f41b19cdbda1626134 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 17:46:21 +0100 Subject: [PATCH 10/52] Move components to above app preview --- .../ComponentSelectionList.svelte | 48 ++++++++++++------- .../pages/[application]/design/_layout.svelte | 17 ++++--- 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte index 404cfa102b..463c8ea448 100644 --- a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte +++ b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte @@ -9,15 +9,22 @@ import Tab from "./ItemTab/Tab.svelte" const categories = components.categories - let selectedIndex + let selectedCategory let width - $: selectedCategory = selectedIndex == null ? null : categories[selectedIndex] const close = () => { - selectedIndex = null + selectedCategory = null } - const onComponentChosen = component => { + const onCategoryChosen = (category) => { + if (category.isCategory) { + selectedCategory = selectedCategory === category ? null : category + } else { + onComponentChosen(category) + } + } + + const onComponentChosen = (component) => { store.addChildComponent(component._component, component.presetProps) // Get ID path @@ -33,14 +40,15 @@
+ class:open={selectedCategory != null}> {#each categories as category, idx}
(selectedIndex = idx)} + on:click={() => onCategoryChosen(category)} class:active={selectedCategory === category}> - {category.name} - + {#if category.icon}{/if} + {category.name} + {#if category.isCategory}{/if}
{/each}
@@ -49,7 +57,7 @@ {/if}
@@ -61,33 +69,40 @@ } .container { - padding: var(--spacing-xl) 40px; + padding: var(--spacing-l) 40px; display: flex; flex-direction: row; justify-content: flex-start; align-items: center; background-color: white; z-index: 1; + width: calc(100% - 80px); + overflow: hidden; } - .container.border { - border-bottom: 1px solid var(--grey-2); + .container.open { } .category { - color: var(--ink); + color: var(--grey-7); cursor: pointer; - margin-right: var(--spacing-xl); + margin-right: var(--spacing-l); display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: var(--spacing-xs); - font-size: var(--font-size-s); + font-size: var(--font-size-xs); + } + .category span { font-weight: 500; + user-select: none; } .category.active, .category:hover { - color: var(--blue); + color: var(--ink); + } + .category i:not(:last-child) { + font-size: 16px; } .overlay { @@ -107,7 +122,6 @@ width: calc(100% - 80px); background-color: white; padding: var(--spacing-xl) 40px; - border-bottom: 1px solid var(--grey-2); box-shadow: 0 0 8px 4px rgba(0, 0, 0, 0.05); } diff --git a/packages/builder/src/pages/[application]/design/_layout.svelte b/packages/builder/src/pages/[application]/design/_layout.svelte index 420a1bd2ea..34126e3687 100644 --- a/packages/builder/src/pages/[application]/design/_layout.svelte +++ b/packages/builder/src/pages/[application]/design/_layout.svelte @@ -32,19 +32,18 @@ settingsView.show() } - const lastPartOfName = c => (c ? last(c.split("/")) : "") + const lastPartOfName = (c) => (c ? last(c.split("/")) : "")
-
{#if $store.currentPageName && $store.currentPageName.length > 0} - +
@@ -56,7 +55,6 @@
{/if} -
@@ -64,8 +62,8 @@ diff --git a/packages/builder/src/components/userInterface/SettingsView.svelte b/packages/builder/src/components/userInterface/SettingsView.svelte index d821f1f2e2..fd4733c24e 100644 --- a/packages/builder/src/components/userInterface/SettingsView.svelte +++ b/packages/builder/src/components/userInterface/SettingsView.svelte @@ -18,7 +18,7 @@ let pageScreenProps = ["title", "favicon", "description", "route"] let duplicateName = false - const propExistsOnComponentDef = prop => + const propExistsOnComponentDef = (prop) => pageScreenProps.includes(prop) || prop in componentDefinition.props function handleChange(key, data) { @@ -47,10 +47,10 @@ $: isPage = screenOrPageInstance && screenOrPageInstance.favicon $: screenOrPageDefinition = isPage ? pageDefinition : screenDefinition - const isDuplicateName = name => { + const isDuplicateName = (name) => { let duplicate = false - const lookForDuplicate = rootPops => { + const lookForDuplicate = (rootPops) => { walkProps(rootPops, (inst, cancel) => { if (inst._instanceName === name && inst._id !== componentInstance._id) { duplicate = true @@ -85,50 +85,60 @@ } -{#if screenOrPageInstance} - {#each screenOrPageDefinition as def} - - {/each} -{/if} - -{#if displayNameField} - - {#if duplicateName} - Name must be unique - {/if} -{/if} - -{#if panelDefinition && panelDefinition.length > 0} - {#each panelDefinition as definition} - {#if canRenderControl(definition.key, definition.dependsOn)} +
+ {#if screenOrPageInstance} + {#each screenOrPageDefinition as def} + bindable={false} + control={def.control} + label={def.label} + key={def.key} + value={screenOrPageInstance[def.key]} + onChange={onScreenPropChange} + props={{ ...excludeProps(def, ['control', 'label']) }} /> + {/each} + {/if} + + {#if displayNameField} + + {#if duplicateName} + Name must be unique {/if} - {/each} -{:else} -
This component does not have any settings.
-{/if} + {/if} + + {#if panelDefinition && panelDefinition.length > 0} + {#each panelDefinition as definition} + {#if canRenderControl(definition.key, definition.dependsOn)} + + {/if} + {/each} + {:else} +
This component does not have any settings.
+ {/if} +
From 62da83e27f6b873d851c5ecc5900017f37822ad4 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 18:12:15 +0100 Subject: [PATCH 15/52] Adjust screen list column padding to line up with top components bar --- packages/builder/src/pages/[application]/design/_layout.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/pages/[application]/design/_layout.svelte b/packages/builder/src/pages/[application]/design/_layout.svelte index 34126e3687..132aa5552d 100644 --- a/packages/builder/src/pages/[application]/design/_layout.svelte +++ b/packages/builder/src/pages/[application]/design/_layout.svelte @@ -74,7 +74,7 @@ display: flex; flex-direction: column; gap: var(--spacing-m); - padding: var(--spacing-xl); + padding: var(--spacing-l) var(--spacing-xl); overflow-y: auto; border-right: 1px solid var(--grey-2); } From 1c149d7d5c1b11152e668b661023e04886dcfe4e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 18:12:40 +0100 Subject: [PATCH 16/52] Move large create screen button to icon --- .../userInterface/FrontendNavigatePane.svelte | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte b/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte index 651cc5c6ac..cf53af2dd5 100644 --- a/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte +++ b/packages/builder/src/components/userInterface/FrontendNavigatePane.svelte @@ -4,20 +4,41 @@ import PageLayout from "components/userInterface/PageLayout.svelte" import PagesList from "components/userInterface/PagesList.svelte" import NewScreenModal from "components/userInterface/NewScreenModal.svelte" - import { Button, Spacer, Modal, Heading } from "@budibase/bbui" + import { Modal } from "@budibase/bbui" let modal -Screens +
+

Screens

+ +
- - - + + From 5d266c5877461dd0001e3180455c717aba201ce8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 18:14:29 +0100 Subject: [PATCH 17/52] Fix issue displaying opened status of screens --- .../src/components/userInterface/ComponentsHierarchy.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index 43a2c07bd9..dae80cf1e7 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -44,7 +44,7 @@ text={screen.props._instanceName} withArrow={screen.props._children.length} selected={$store.currentComponentInfo._id === screen.props._id} - opened={$store.currentPreviewItem.name !== screen.props._id} + opened={$store.currentPreviewItem.name === screen.props._id} on:click={() => changeScreen(screen)}>
From af19158fb64e870b377fca3f9439cdb569fac931 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 18:14:44 +0100 Subject: [PATCH 18/52] Adjust page button background to be consistent --- packages/builder/src/components/userInterface/PagesList.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/userInterface/PagesList.svelte b/packages/builder/src/components/userInterface/PagesList.svelte index 4cb1f7781b..13351c94e4 100644 --- a/packages/builder/src/components/userInterface/PagesList.svelte +++ b/packages/builder/src/components/userInterface/PagesList.svelte @@ -59,7 +59,7 @@ } .active { - background: var(--grey-3); + background: var(--grey-2); color: var(--ink); } From f56662dac4de22613b60253031a3b44ae38f570b Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 18:23:11 +0100 Subject: [PATCH 19/52] Update FlatButton and CategoryTab styles --- .../components/userInterface/CategoryTab.svelte | 6 +++--- .../userInterface/ComponentPropertiesPanel.svelte | 2 +- .../components/userInterface/FlatButton.svelte | 15 +++++++-------- .../src/pages/[application]/design/_layout.svelte | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/packages/builder/src/components/userInterface/CategoryTab.svelte b/packages/builder/src/components/userInterface/CategoryTab.svelte index 15335cbb87..3b5dce84e0 100644 --- a/packages/builder/src/components/userInterface/CategoryTab.svelte +++ b/packages/builder/src/components/userInterface/CategoryTab.svelte @@ -1,7 +1,7 @@
@@ -19,8 +19,8 @@ .tabs { display: flex; list-style: none; - font-size: 18px; - font-weight: 600; + font-size: var(--font-size-m); + font-weight: 500; } li { diff --git a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte index dead297956..7b1c794610 100644 --- a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte +++ b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte @@ -107,7 +107,7 @@ } .instance-name { - font-size: 14px; + font-size: var(--font-size-xs); font-weight: 500; color: var(--grey-7); } diff --git a/packages/builder/src/components/userInterface/FlatButton.svelte b/packages/builder/src/components/userInterface/FlatButton.svelte index f27a2902ee..3ae8eebca3 100644 --- a/packages/builder/src/components/userInterface/FlatButton.svelte +++ b/packages/builder/src/components/userInterface/FlatButton.svelte @@ -3,7 +3,7 @@ export let value = "" export let text = "" export let icon = "" - export let onClick = value => {} + export let onClick = (value) => {} export let selected = false $: useIcon = !!icon @@ -22,23 +22,22 @@ diff --git a/packages/builder/src/components/userInterface/ItemTab/Item.svelte b/packages/builder/src/components/userInterface/ItemTab/Item.svelte index ce4f602f03..e5a67118e9 100644 --- a/packages/builder/src/components/userInterface/ItemTab/Item.svelte +++ b/packages/builder/src/components/userInterface/ItemTab/Item.svelte @@ -12,20 +12,16 @@ diff --git a/packages/builder/src/components/userInterface/ItemTab/Tab.svelte b/packages/builder/src/components/userInterface/ItemTab/Tab.svelte index db16acf3d6..4e3aacb9c4 100644 --- a/packages/builder/src/components/userInterface/ItemTab/Tab.svelte +++ b/packages/builder/src/components/userInterface/ItemTab/Tab.svelte @@ -9,7 +9,7 @@ let category = list - const handleClick = item => { + const handleClick = (item) => { if (item.children && item.children.length > 0) { list = item } else { @@ -53,10 +53,12 @@ .list { display: flex; - flex-direction: row; + flex-direction: column; justify-content: flex-start; - align-items: center; - gap: var(--spacing-m); + align-items: stretch; + gap: var(--spacing-s); flex-wrap: wrap; + padding: var(--spacing-l); + min-width: 120px; } diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 78258e99f3..1c4bc632a6 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -631,7 +631,7 @@ export default { }, }, { - name: "Groupedbar", + name: "Grouped Bar", _component: "@budibase/standard-components/groupedbar", description: "Groupedbar chart", icon: "ri-bar-chart-grouped-fill", diff --git a/packages/builder/src/pages/[application]/design/_layout.svelte b/packages/builder/src/pages/[application]/design/_layout.svelte index 7bd37902ad..529d97949c 100644 --- a/packages/builder/src/pages/[application]/design/_layout.svelte +++ b/packages/builder/src/pages/[application]/design/_layout.svelte @@ -73,7 +73,7 @@ background-color: var(--white); display: flex; flex-direction: column; - gap: var(--spacing-m); + gap: var(--spacing-l); padding: var(--spacing-l) var(--spacing-xl); overflow-y: auto; border-right: 1px solid var(--grey-2); @@ -86,13 +86,13 @@ flex-direction: column; justify-content: flex-start; align-items: stretch; - gap: var(--spacing-m); + gap: var(--spacing-l); + padding: var(--spacing-l) 40px var(--spacing-xl) 40px; } .preview-content { background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, 0.05); flex: 1 1 auto; - margin: var(--spacing-xl) 40px; } .components-pane { From 5077f4f435862e5274d129cd2922bacef8daa695 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Oct 2020 20:48:46 +0100 Subject: [PATCH 21/52] Fix property group name font size until a proper fix in BBUI --- .../builder/src/components/userInterface/DesignView.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/builder/src/components/userInterface/DesignView.svelte b/packages/builder/src/components/userInterface/DesignView.svelte index 34f734ced9..3449ef4816 100644 --- a/packages/builder/src/components/userInterface/DesignView.svelte +++ b/packages/builder/src/components/userInterface/DesignView.svelte @@ -63,6 +63,12 @@ height: 100%; gap: var(--spacing-m); } + .design-view-container :global(.property-group-name .name) { + font-size: var(--font-size-xs); + } + .design-view-container :global(.property-group-container) { + padding: 4px 0; + } .design-view-state-categories { } From 3b869d2ff43e397aa77d417f7c6c95416fc0a9a2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Oct 2020 10:33:43 +0100 Subject: [PATCH 22/52] Bump BBUI version --- packages/builder/package.json | 2 +- packages/builder/yarn.lock | 259 +--------------------- packages/standard-components/package.json | 2 +- 3 files changed, 10 insertions(+), 253 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 12067716e9..25c0f9aa4a 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.44.1", + "@budibase/bbui": "^1.46.0", "@budibase/client": "^0.2.6", "@budibase/colorpicker": "^1.0.1", "@fortawesome/fontawesome-free": "^5.14.0", diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock index 5eca5c2364..46c15a2aa3 100644 --- a/packages/builder/yarn.lock +++ b/packages/builder/yarn.lock @@ -709,24 +709,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@budibase/bbui@^1.44.1": - version "1.44.1" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.44.1.tgz#1bfca2d3a40a14eb0ba136e24afb7139694b4970" - integrity sha512-joFH++mzFJZkMR3ZSv8Q8cE/qNn8o8aZGbHeO57Smiai3h2tjeTyVLuJ+yt3P1XQ8SE13epAp38kvsPosUpbkQ== +"@budibase/bbui@^1.46.0": + version "1.46.0" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.46.0.tgz#cfff5ec545a81582e16555c45987f86536b5cc99" + integrity sha512-seuaLSA6iDOzJ3eO0oHzSCTdS1otyNz+8eD5vTLW4bwRH9MZ/xl363acMQDdiCqZk619+WeSqb85fmFTTSJHNQ== dependencies: sirv-cli "^0.4.6" svelte-flatpickr "^2.4.0" svelte-portal "^1.0.0" -"@budibase/client@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@budibase/client/-/client-0.2.4.tgz#da958faa50c59f6a9c41c692b7a19d6a6ea98bc1" - integrity sha512-MsFbWcsh3t1lyLgTb4UMccjshy6jd3A77lqs1CpXjHr+2LmXwvIriLgruycAvFrtqZzYG+dGe0rWwX0auwaaZw== - dependencies: - deep-equal "^2.0.1" - mustache "^4.0.1" - regexparam "^1.3.0" - "@budibase/colorpicker@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@budibase/colorpicker/-/colorpicker-1.0.1.tgz#940c180e7ebba0cb0756c4c8ef13f5dfab58e810" @@ -1403,11 +1394,6 @@ array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" -array-filter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" - integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -1462,13 +1448,6 @@ atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" -available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" - integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== - dependencies: - array-filter "^1.0.0" - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2418,26 +2397,6 @@ decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" -deep-equal@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.4.tgz#6b0b407a074666033169df3acaf128e1c6f3eab6" - integrity sha512-BUfaXrVoCfgkOQY/b09QdO9L3XNoF2XH0A3aY9IQwQL/ZjLOe8FQgCNVl1wiolhsFo8kFdO9zdPViCPbmaJA5w== - dependencies: - es-abstract "^1.18.0-next.1" - es-get-iterator "^1.1.0" - is-arguments "^1.0.4" - is-date-object "^1.0.2" - is-regex "^1.1.1" - isarray "^2.0.5" - object-is "^1.1.3" - object-keys "^1.1.1" - object.assign "^4.1.1" - regexp.prototype.flags "^1.3.0" - side-channel "^1.0.3" - which-boxed-primitive "^1.0.1" - which-collection "^1.0.1" - which-typed-array "^1.1.2" - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -2607,54 +2566,6 @@ es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5: string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" -es-abstract@^1.17.4: - version "1.17.7" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" - integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.0, es-abstract@^1.18.0-next.1: - version "1.18.0-next.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" - integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-negative-zero "^2.0.0" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-get-iterator@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" - integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== - dependencies: - es-abstract "^1.17.4" - has-symbols "^1.0.1" - is-arguments "^1.0.4" - is-map "^2.0.1" - is-set "^2.0.1" - is-string "^1.0.5" - isarray "^2.0.5" - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -2961,7 +2872,7 @@ for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" -foreach@^2.0.5, foreach@~2.0.1: +foreach@~2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= @@ -3335,31 +3246,16 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" -is-bigint@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4" - integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g== - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" dependencies: binary-extensions "^2.0.0" -is-boolean-object@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e" - integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ== - is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -3368,11 +3264,6 @@ is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" -is-callable@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== - is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -3391,7 +3282,7 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.1, is-date-object@^1.0.2: +is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" @@ -3456,25 +3347,10 @@ is-installed-globally@^0.3.2: global-dirs "^2.0.1" is-path-inside "^3.0.1" -is-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" - integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== - is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" -is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= - -is-number-object@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" - integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -3531,18 +3407,6 @@ is-regex@^1.0.5: dependencies: has "^1.0.3" -is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - -is-set@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" - integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== - is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -3551,41 +3415,16 @@ is-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" -is-string@^1.0.4, is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== - is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" dependencies: has-symbols "^1.0.1" -is-typed-array@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d" - integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ== - dependencies: - available-typed-arrays "^1.0.0" - es-abstract "^1.17.4" - foreach "^2.0.5" - has-symbols "^1.0.1" - is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" -is-weakmap@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" - integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== - -is-weakset@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" - integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== - is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -3606,11 +3445,6 @@ isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - isbuffer@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/isbuffer/-/isbuffer-0.0.0.tgz#38c146d9df528b8bf9b0701c3d43cf12df3fc39b" @@ -4730,19 +4564,6 @@ object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" -object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-is@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81" - integrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -4774,16 +4595,6 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.1.tgz#303867a666cdd41936ecdedfb1f8f3e32a478cdd" - integrity sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.0-next.0" - has-symbols "^1.0.1" - object-keys "^1.1.1" - object.getownpropertydescriptors@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" @@ -5264,19 +5075,6 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" - integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - -regexparam@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" - integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== - regexpu-core@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" @@ -5684,14 +5482,6 @@ shortid@^2.2.15: dependencies: nanoid "^2.1.0" -side-channel@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.3.tgz#cdc46b057550bbab63706210838df5d4c19519c3" - integrity sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g== - dependencies: - es-abstract "^1.18.0-next.0" - object-inspect "^1.8.0" - signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -5918,7 +5708,7 @@ string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string.prototype.trimend@^1.0.0, string.prototype.trimend@^1.0.1: +string.prototype.trimend@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" dependencies: @@ -5941,7 +5731,7 @@ string.prototype.trimright@^2.1.1: es-abstract "^1.17.5" string.prototype.trimend "^1.0.0" -string.prototype.trimstart@^1.0.0, string.prototype.trimstart@^1.0.1: +string.prototype.trimstart@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" dependencies: @@ -6397,43 +6187,10 @@ whatwg-url@^8.0.0: tr46 "^2.0.2" webidl-conversions "^5.0.0" -which-boxed-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1" - integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ== - dependencies: - is-bigint "^1.0.0" - is-boolean-object "^1.0.0" - is-number-object "^1.0.3" - is-string "^1.0.4" - is-symbol "^1.0.2" - -which-collection@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" - integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== - dependencies: - is-map "^2.0.1" - is-set "^2.0.1" - is-weakmap "^2.0.1" - is-weakset "^2.0.1" - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which-typed-array@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2" - integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ== - dependencies: - available-typed-arrays "^1.0.2" - es-abstract "^1.17.5" - foreach "^2.0.5" - function-bind "^1.1.1" - has-symbols "^1.0.1" - is-typed-array "^1.1.3" - which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index c7261f319f..13f3e167a9 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -36,7 +36,7 @@ "gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691", "dependencies": { "@beyonk/svelte-googlemaps": "^2.2.0", - "@budibase/bbui": "^1.44.1", + "@budibase/bbui": "^1.46.0", "@budibase/svelte-ag-grid": "^0.0.13", "@fortawesome/fontawesome-free": "^5.14.0", "@svelteschool/svelte-forms": "^0.7.0", From 4e4aa5c525282051f8451f27658231e9a49a344c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Oct 2020 10:34:14 +0100 Subject: [PATCH 23/52] Standardise sizing of all settings and design properties --- .../userInterface/DesignView.svelte | 19 +- .../userInterface/DetailScreenSelect.svelte | 12 +- .../IconSelect/IconSelect.svelte | 582 +++++++++--------- .../userInterface/OptionSelect.svelte | 2 +- .../userInterface/PropertyControl.svelte | 2 +- .../userInterface/PropertyGroup.svelte | 3 +- .../PropertyPanelControls/Input.svelte | 2 +- .../userInterface/ScreenSelect.svelte | 182 +++--- .../userInterface/SettingsView.svelte | 8 +- .../userInterface/TableSelect.svelte | 2 +- .../userInterface/TableViewSelect.svelte | 326 +++++----- 11 files changed, 576 insertions(+), 564 deletions(-) diff --git a/packages/builder/src/components/userInterface/DesignView.svelte b/packages/builder/src/components/userInterface/DesignView.svelte index 3449ef4816..989eaef53b 100644 --- a/packages/builder/src/components/userInterface/DesignView.svelte +++ b/packages/builder/src/components/userInterface/DesignView.svelte @@ -48,7 +48,7 @@ {/each} {:else}
- This component does not have any design properties. + This component doesn't have any design properties.
{/if}
@@ -61,13 +61,7 @@ flex-direction: column; width: 100%; height: 100%; - gap: var(--spacing-m); - } - .design-view-container :global(.property-group-name .name) { - font-size: var(--font-size-xs); - } - .design-view-container :global(.property-group-container) { - padding: 4px 0; + gap: var(--spacing-l); } .design-view-state-categories { @@ -85,10 +79,15 @@ min-height: 0; margin: 0 -20px; padding: 0 20px; + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: stretch; + gap: var(--spacing-m); } .no-design { - font-size: var(--font-size-s); - color: var(--grey-6); + font-size: var(--font-size-xs); + color: var(--grey-5); } diff --git a/packages/builder/src/components/userInterface/DetailScreenSelect.svelte b/packages/builder/src/components/userInterface/DetailScreenSelect.svelte index 1e2908ab54..6928a72e9d 100644 --- a/packages/builder/src/components/userInterface/DetailScreenSelect.svelte +++ b/packages/builder/src/components/userInterface/DetailScreenSelect.svelte @@ -15,11 +15,11 @@ return [ ...$store.screens .filter( - screen => + (screen) => screen.props._component.endsWith("/rowdetail") || screen.route.endsWith(":id") ) - .map(screen => ({ + .map((screen) => ({ name: screen.props._instanceName, url: screen.route, sort: screen.props._component, @@ -29,7 +29,13 @@
- + diff --git a/packages/builder/src/components/userInterface/IconSelect/IconSelect.svelte b/packages/builder/src/components/userInterface/IconSelect/IconSelect.svelte index 6141702439..9fac2642d7 100644 --- a/packages/builder/src/components/userInterface/IconSelect/IconSelect.svelte +++ b/packages/builder/src/components/userInterface/IconSelect/IconSelect.svelte @@ -1,291 +1,291 @@ - - -
- -
- -
-
-
- {#each alphabet as letter, idx} - switchLetter(letter)}> - {letter} - - {#if idx !== alphabet.length - 1}-{/if} - {/each} -
-
-
- -
- -
-
-
- pageClick(false)}> - - - {pagerText} - pageClick(true)}> - - -
-
-
- {#if pagedIcons.length > 0} -
- {#if !loading} - {#each pagedIcons as icon} -
(value = icon.value)}> -
- -
-
{icon.label}
-
- {/each} - {/if} -
- {:else} -
-
- {`There is no icons for this ${searchTerm ? 'search' : 'page'}`} -
-
- {/if} -
-
- - + + +
+ +
+ +
+
+
+ {#each alphabet as letter, idx} + switchLetter(letter)}> + {letter} + + {#if idx !== alphabet.length - 1}-{/if} + {/each} +
+
+
+ +
+ +
+
+
+ pageClick(false)}> + + + {pagerText} + pageClick(true)}> + + +
+
+
+ {#if pagedIcons.length > 0} +
+ {#if !loading} + {#each pagedIcons as icon} +
(value = icon.value)}> +
+ +
+
{icon.label}
+
+ {/each} + {/if} +
+ {:else} +
+
+ {`There is no icons for this ${searchTerm ? 'search' : 'page'}`} +
+
+ {/if} +
+
+ + diff --git a/packages/builder/src/components/userInterface/OptionSelect.svelte b/packages/builder/src/components/userInterface/OptionSelect.svelte index 1c3ee89213..d1fbfecff7 100644 --- a/packages/builder/src/components/userInterface/OptionSelect.svelte +++ b/packages/builder/src/components/userInterface/OptionSelect.svelte @@ -175,7 +175,7 @@ .bb-select-anchor { cursor: pointer; display: flex; - padding: var(--spacing-m); + padding: var(--spacing-s) var(--spacing-m); background-color: var(--grey-2); border-radius: var(--border-radius-m); align-items: center; diff --git a/packages/builder/src/components/userInterface/PropertyControl.svelte b/packages/builder/src/components/userInterface/PropertyControl.svelte index c11ec6a0cb..e47d5e17a3 100644 --- a/packages/builder/src/components/userInterface/PropertyControl.svelte +++ b/packages/builder/src/components/userInterface/PropertyControl.svelte @@ -147,7 +147,7 @@ height: 90%; width: 2rem; background: var(--grey-2); - right: 10px; + right: 4px; --spacing-s: 0; border-left: 0.5px solid var(--grey-3); outline-color: var(--blue); diff --git a/packages/builder/src/components/userInterface/PropertyGroup.svelte b/packages/builder/src/components/userInterface/PropertyGroup.svelte index 37b7a11ea2..2fb304f5c8 100644 --- a/packages/builder/src/components/userInterface/PropertyGroup.svelte +++ b/packages/builder/src/components/userInterface/PropertyGroup.svelte @@ -13,7 +13,7 @@ $: style = componentInstance["_styles"][styleCategory] || {} - +
{#each properties as props} diff --git a/packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte b/packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte index 1721c1bbb2..3abdb3ecd3 100644 --- a/packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte +++ b/packages/builder/src/components/userInterface/PropertyPanelControls/Input.svelte @@ -8,4 +8,4 @@ export let name, value, placeholder, type - + diff --git a/packages/builder/src/components/userInterface/ScreenSelect.svelte b/packages/builder/src/components/userInterface/ScreenSelect.svelte index 33174355bb..fb2a24a94e 100644 --- a/packages/builder/src/components/userInterface/ScreenSelect.svelte +++ b/packages/builder/src/components/userInterface/ScreenSelect.svelte @@ -1,88 +1,94 @@ - - -
- - - {/each} - -
- - + + +
+ + + {/each} + +
+ + diff --git a/packages/builder/src/components/userInterface/SettingsView.svelte b/packages/builder/src/components/userInterface/SettingsView.svelte index fd4733c24e..be07eebcea 100644 --- a/packages/builder/src/components/userInterface/SettingsView.svelte +++ b/packages/builder/src/components/userInterface/SettingsView.svelte @@ -125,7 +125,9 @@ {/if} {/each} {:else} -
This component does not have any settings.
+
+ This component doesn't have any additional settings. +
{/if}
@@ -139,9 +141,9 @@ } .empty { - font-size: var(--font-size-s); + font-size: var(--font-size-xs); margin-top: var(--spacing-m); - color: var(--grey-6); + color: var(--grey-5); } .duplicate-name { diff --git a/packages/builder/src/components/userInterface/TableSelect.svelte b/packages/builder/src/components/userInterface/TableSelect.svelte index 6300aa2d61..d72b6031f1 100644 --- a/packages/builder/src/components/userInterface/TableSelect.svelte +++ b/packages/builder/src/components/userInterface/TableSelect.svelte @@ -6,7 +6,7 @@
- {#each $backendUiStore.tables as table} diff --git a/packages/builder/src/components/userInterface/TableViewSelect.svelte b/packages/builder/src/components/userInterface/TableViewSelect.svelte index f38fcc0a72..8adfaaf2a0 100644 --- a/packages/builder/src/components/userInterface/TableViewSelect.svelte +++ b/packages/builder/src/components/userInterface/TableViewSelect.svelte @@ -1,163 +1,163 @@ - - - - - - - - + + + + + + + + From 767846e4c492858c89ea469deae5af81586c0099 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Oct 2020 10:37:28 +0100 Subject: [PATCH 24/52] Add selected styles to component dropdowns --- .../userInterface/ComponentSelectionList.svelte | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte index 617b90edcc..59bf7548e1 100644 --- a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte +++ b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte @@ -12,7 +12,6 @@ $: anchor = selectedIndex === -1 ? null : anchors[selectedIndex] const close = () => { - selectedIndex = null popover.hide() } @@ -38,14 +37,19 @@
onCategoryChosen(category, idx)}> + on:click={() => onCategoryChosen(category, idx)} + class:active={idx === selectedIndex}> {#if category.icon}{/if} {category.name} {#if category.isCategory}{/if}
{/each}
- + (selectedIndex = null)} + bind:this={popover} + {anchor} + align="left"> onComponentChosen(e.detail)} /> @@ -76,6 +80,7 @@ font-weight: 500; user-select: none; } + .category.active, .category:hover { color: var(--ink); } From 5009a3975c2a1c1ce15d8982095c2e364248f15a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Oct 2020 10:55:12 +0100 Subject: [PATCH 25/52] Improve component dropdown responsiveness --- .../components/userInterface/ComponentSelectionList.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte index 59bf7548e1..6f9931f0b0 100644 --- a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte +++ b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte @@ -62,13 +62,14 @@ justify-content: flex-start; align-items: center; z-index: 1; - height: 24px; + min-height: 24px; + flex-wrap: wrap; + gap: var(--spacing-l); } .category { color: var(--grey-7); cursor: pointer; - margin-right: var(--spacing-l); display: flex; flex-direction: row; justify-content: flex-start; From ea946940383855ee8149ee096adf32dc26a1a35f Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Oct 2020 12:25:12 +0100 Subject: [PATCH 26/52] Remove deprecated borders on design page --- packages/builder/src/pages/[application]/design/_layout.svelte | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/builder/src/pages/[application]/design/_layout.svelte b/packages/builder/src/pages/[application]/design/_layout.svelte index 529d97949c..dcf1c9b771 100644 --- a/packages/builder/src/pages/[application]/design/_layout.svelte +++ b/packages/builder/src/pages/[application]/design/_layout.svelte @@ -76,7 +76,6 @@ gap: var(--spacing-l); padding: var(--spacing-l) var(--spacing-xl); overflow-y: auto; - border-right: 1px solid var(--grey-2); } .preview-pane { @@ -98,7 +97,6 @@ .components-pane { grid-column: 3; background-color: var(--white); - border-left: 1px solid var(--grey-2); overflow-y: auto; display: flex; flex-direction: column; From 14b13c7c52caf00ba89e13810a9bc9f3ea9e8a22 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Oct 2020 12:25:22 +0100 Subject: [PATCH 27/52] Update data page to use new styles --- .../components/backend/DataTable/Table.svelte | 73 +++++++------ .../TableNavigator/TableNavigator.svelte | 103 ++++++++++-------- .../modals/CreateTableModal.svelte | 54 ++++----- .../pages/[application]/data/_layout.svelte | 9 +- 4 files changed, 124 insertions(+), 115 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index 7bb5ac6a18..e26b68d537 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -51,19 +51,17 @@ } -
-
-

- {title} - {#if loading} -
- -
- {/if} -

-
- -
+
+
+

{title}

+ {#if loading} +
+ +
+ {/if} +
+
+
@@ -125,20 +123,44 @@ bind:currentPage pageItemCount={paginatedData.length} {ITEMS_PER_PAGE} /> - + diff --git a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte index dd691e9e80..e77fec709f 100644 --- a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte +++ b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte @@ -2,8 +2,7 @@ import { goto } from "@sveltech/routify" import { backendUiStore, store } from "builderStore" import { notifier } from "builderStore/store/notifications" - import { Button, Input, Label, ModalContent, Modal } from "@budibase/bbui" - import Spinner from "components/common/Spinner.svelte" + import { Input, Label, ModalContent } from "@budibase/bbui" import TableDataImport from "../TableDataImport.svelte" import analytics from "analytics" import screenTemplates from "builderStore/store/screenTemplates" @@ -22,15 +21,9 @@ let dataImport let error = "" - function resetState() { - name = "" - dataImport = undefined - error = "" - } - function checkValid(evt) { const tableName = evt.target.value - if ($backendUiStore.models?.some(model => model.name === tableName)) { + if ($backendUiStore.models?.some((model) => model.name === tableName)) { error = `Table with name ${tableName} already exists. Please choose another name.` return } @@ -56,8 +49,8 @@ // Create auto screens const screens = screenTemplates($store, [table]) - .filter(template => defaultScreens.includes(template.id)) - .map(template => template.create()) + .filter((template) => defaultScreens.includes(template.id)) + .map((template) => template.create()) for (let screen of screens) { // Record the table that created this screen so we can link it later screen.autoTableId = table._id @@ -74,7 +67,7 @@ } // Create autolink to newly created list page - const listPage = screens.find(screen => + const listPage = screens.find((screen) => screen.props._instanceName.endsWith("List") ) await store.createLink(listPage.route, table.name) @@ -84,23 +77,20 @@ } - - - - -
- - -
-
-
+ + +
+ + +
+
diff --git a/packages/builder/src/pages/[application]/data/_layout.svelte b/packages/builder/src/pages/[application]/data/_layout.svelte index 1ac92b84c9..d52fdffade 100644 --- a/packages/builder/src/pages/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/[application]/data/_layout.svelte @@ -18,18 +18,17 @@ .root { height: calc(100vh - 60px); display: grid; - grid-template-columns: 300px minmax(0, 1fr); - background: var(--grey-1); - line-height: 1; + grid-template-columns: 260px minmax(0, 1fr); + background: var(--grey-2); } .content { flex: 1 1 auto; - padding: var(--spacing-xl) 40px; + padding: var(--spacing-l) 40px; overflow-y: auto; } .nav { overflow-y: auto; background: var(--white); - padding: var(--spacing-xl); + padding: var(--spacing-l) var(--spacing-xl); } From 9a32997591f3bde454aaa7f5fdab6e2894d84ede Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Oct 2020 12:57:35 +0100 Subject: [PATCH 28/52] Reduce unecessary div layers --- .../CreateAutomationModal.svelte | 0 .../TableNavigator/TableNavigator.svelte | 61 ++++++++----------- .../pages/[application]/data/_layout.svelte | 5 ++ 3 files changed, 31 insertions(+), 35 deletions(-) rename packages/builder/src/components/automation/AutomationPanel/{AutomationList => }/CreateAutomationModal.svelte (100%) diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList/CreateAutomationModal.svelte b/packages/builder/src/components/automation/AutomationPanel/CreateAutomationModal.svelte similarity index 100% rename from packages/builder/src/components/automation/AutomationPanel/AutomationList/CreateAutomationModal.svelte rename to packages/builder/src/components/automation/AutomationPanel/CreateAutomationModal.svelte diff --git a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte index e521a1dfc6..0b73074e10 100644 --- a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte +++ b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte @@ -33,49 +33,40 @@ } -
- {#if $backendUiStore.selectedDatabase && $backendUiStore.selectedDatabase._id} -
-

Tables

- -
-
- {#each $backendUiStore.tables as table} +{#if $backendUiStore.selectedDatabase && $backendUiStore.selectedDatabase._id} +
+

Tables

+ +
+
+ {#each $backendUiStore.tables as table, idx} + 0} + icon="ri-table-line" + text={table.name} + selected={selectedView === `all_${table._id}`} + on:click={() => selectTable(table)}> + + + {#each Object.keys(table.views || {}) as viewName} selectTable(table)}> - + indentLevel={1} + icon="ri-eye-line" + text={viewName} + selected={selectedView === viewName} + on:click={() => onClickView(table, viewName)}> + - {#each Object.keys(table.views || {}) as viewName} - onClickView(table, viewName)}> - - - {/each} {/each} -
- {/if} -
+ {/each} +
+{/if} From 16de23eea905c33f59ae88981a53cc3c8682f985 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 26 Oct 2020 11:00:34 +0000 Subject: [PATCH 29/52] Add new common components for dropdown styles --- .../common/Dropdowns/DropdownContainer.svelte | 13 +++++ .../common/Dropdowns/DropdownItem.svelte | 57 +++++++++++++++++++ .../src/components/common/Dropdowns/index.js | 2 + 3 files changed, 72 insertions(+) create mode 100644 packages/builder/src/components/common/Dropdowns/DropdownContainer.svelte create mode 100644 packages/builder/src/components/common/Dropdowns/DropdownItem.svelte create mode 100644 packages/builder/src/components/common/Dropdowns/index.js diff --git a/packages/builder/src/components/common/Dropdowns/DropdownContainer.svelte b/packages/builder/src/components/common/Dropdowns/DropdownContainer.svelte new file mode 100644 index 0000000000..f3cea99d7b --- /dev/null +++ b/packages/builder/src/components/common/Dropdowns/DropdownContainer.svelte @@ -0,0 +1,13 @@ + + + diff --git a/packages/builder/src/components/common/Dropdowns/DropdownItem.svelte b/packages/builder/src/components/common/Dropdowns/DropdownItem.svelte new file mode 100644 index 0000000000..a94cc66e12 --- /dev/null +++ b/packages/builder/src/components/common/Dropdowns/DropdownItem.svelte @@ -0,0 +1,57 @@ + + + + + diff --git a/packages/builder/src/components/common/Dropdowns/index.js b/packages/builder/src/components/common/Dropdowns/index.js new file mode 100644 index 0000000000..a95e303ec7 --- /dev/null +++ b/packages/builder/src/components/common/Dropdowns/index.js @@ -0,0 +1,2 @@ +export { default as DropdownContainer } from "./DropdownContainer.svelte" +export { default as DropdownItem } from "./DropdownItem.svelte" From 4ff7499d2660ae31b7bb07eeeed844ebb2877518 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 26 Oct 2020 12:18:34 +0000 Subject: [PATCH 30/52] Update styles across entire automations page --- .../builderStore/store/automation/index.js | 30 ++-- .../AutomationBuilder.svelte | 84 ++------- .../AutomationBuilder/BlockList.svelte | 129 ++++++++++++++ .../{flowchart => FlowChart}/Arrow.svelte | 0 .../AutomationBlockTagline.svelte | 0 .../{flowchart => FlowChart}/FlowChart.svelte | 31 ++-- .../{flowchart => FlowChart}/FlowItem.svelte | 19 +- .../AutomationBuilder/flowchart/api.js | 0 .../AutomationBuilder/flowchart/index.js | 0 .../AutomationPanel/AutomationList.svelte | 34 ++++ .../AutomationList/AutomationList.svelte | 79 --------- .../AutomationPanel/AutomationPanel.svelte | 65 +++---- .../BlockList/AutomationBlock.svelte | 68 -------- .../BlockList/BlockList.svelte | 48 ------ .../EditAutomationPopover.svelte | 86 ++++++++++ .../automation/AutomationPanel/index.js | 3 - .../SetupPanel/AutomationBlockSetup.svelte | 66 ++++--- .../{ParamInputs => }/RowSelector.svelte | 12 +- .../automation/SetupPanel/SetupPanel.svelte | 162 +++++++----------- .../{ParamInputs => }/TableSelector.svelte | 2 +- .../components/automation/SetupPanel/index.js | 1 - .../userInterface/BindableInput.svelte | 2 +- .../[application]/automate/_layout.svelte | 30 +++- .../pages/[application]/automate/index.svelte | 2 +- .../data/table/[selectedTable]/index.svelte | 4 +- .../[application]/data/table/index.svelte | 4 +- .../data/view/[selectedView]/index.svelte | 2 +- 27 files changed, 467 insertions(+), 496 deletions(-) create mode 100644 packages/builder/src/components/automation/AutomationBuilder/BlockList.svelte rename packages/builder/src/components/automation/AutomationBuilder/{flowchart => FlowChart}/Arrow.svelte (100%) rename packages/builder/src/components/automation/AutomationBuilder/{flowchart => FlowChart}/AutomationBlockTagline.svelte (100%) rename packages/builder/src/components/automation/AutomationBuilder/{flowchart => FlowChart}/FlowChart.svelte (69%) rename packages/builder/src/components/automation/AutomationBuilder/{flowchart => FlowChart}/FlowItem.svelte (82%) delete mode 100644 packages/builder/src/components/automation/AutomationBuilder/flowchart/api.js delete mode 100644 packages/builder/src/components/automation/AutomationBuilder/flowchart/index.js create mode 100644 packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte delete mode 100644 packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte delete mode 100644 packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte delete mode 100644 packages/builder/src/components/automation/AutomationPanel/BlockList/BlockList.svelte create mode 100644 packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte delete mode 100644 packages/builder/src/components/automation/AutomationPanel/index.js rename packages/builder/src/components/automation/SetupPanel/{ParamInputs => }/RowSelector.svelte (82%) rename packages/builder/src/components/automation/SetupPanel/{ParamInputs => }/TableSelector.svelte (88%) delete mode 100644 packages/builder/src/components/automation/SetupPanel/index.js diff --git a/packages/builder/src/builderStore/store/automation/index.js b/packages/builder/src/builderStore/store/automation/index.js index e1db07053e..2c1636b359 100644 --- a/packages/builder/src/builderStore/store/automation/index.js +++ b/packages/builder/src/builderStore/store/automation/index.js @@ -3,14 +3,14 @@ import api from "../../api" import Automation from "./Automation" import { cloneDeep } from "lodash/fp" -const automationActions = store => ({ +const automationActions = (store) => ({ fetch: async () => { const responses = await Promise.all([ api.get(`/api/automations`), api.get(`/api/automations/definitions/list`), ]) - const jsonResponses = await Promise.all(responses.map(x => x.json())) - store.update(state => { + const jsonResponses = await Promise.all(responses.map((x) => x.json())) + store.update((state) => { state.automations = jsonResponses[0] state.blockDefinitions = { TRIGGER: jsonResponses[1].trigger, @@ -31,7 +31,7 @@ const automationActions = store => ({ const CREATE_AUTOMATION_URL = `/api/automations` const response = await api.post(CREATE_AUTOMATION_URL, automation) const json = await response.json() - store.update(state => { + store.update((state) => { state.automations = [...state.automations, json.automation] store.actions.select(json.automation) return state @@ -41,9 +41,9 @@ const automationActions = store => ({ const UPDATE_AUTOMATION_URL = `/api/automations` const response = await api.put(UPDATE_AUTOMATION_URL, automation) const json = await response.json() - store.update(state => { + store.update((state) => { const existingIdx = state.automations.findIndex( - existing => existing._id === automation._id + (existing) => existing._id === automation._id ) state.automations.splice(existingIdx, 1, json.automation) state.automations = state.automations @@ -56,9 +56,9 @@ const automationActions = store => ({ const DELETE_AUTOMATION_URL = `/api/automations/${_id}/${_rev}` await api.delete(DELETE_AUTOMATION_URL) - store.update(state => { + store.update((state) => { const existingIdx = state.automations.findIndex( - existing => existing._id === _id + (existing) => existing._id === _id ) state.automations.splice(existingIdx, 1) state.automations = state.automations @@ -72,24 +72,24 @@ const automationActions = store => ({ const TRIGGER_AUTOMATION_URL = `/api/automations/${_id}/trigger` return await api.post(TRIGGER_AUTOMATION_URL) }, - select: automation => { - store.update(state => { + select: (automation) => { + store.update((state) => { state.selectedAutomation = new Automation(cloneDeep(automation)) state.selectedBlock = null return state }) }, - addBlockToAutomation: block => { - store.update(state => { + addBlockToAutomation: (block) => { + store.update((state) => { const newBlock = state.selectedAutomation.addBlock(cloneDeep(block)) state.selectedBlock = newBlock return state }) }, - deleteAutomationBlock: block => { - store.update(state => { + deleteAutomationBlock: (block) => { + store.update((state) => { const idx = state.selectedAutomation.automation.definition.steps.findIndex( - x => x.id === block.id + (x) => x.id === block.id ) state.selectedAutomation.deleteBlock(block.id) diff --git a/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte b/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte index c832ddd8bc..a598c6831e 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte @@ -1,93 +1,31 @@ -
+{#if automation} + -
-
- {#if automation} - - - {/if} -
+{:else if automationCount === 0} + Create your first automation to get started +{:else}Select an automation to edit{/if} diff --git a/packages/builder/src/components/automation/AutomationBuilder/BlockList.svelte b/packages/builder/src/components/automation/AutomationBuilder/BlockList.svelte new file mode 100644 index 0000000000..d791f7f98a --- /dev/null +++ b/packages/builder/src/components/automation/AutomationBuilder/BlockList.svelte @@ -0,0 +1,129 @@ + + +
+ {#each tabs as tab, idx} +
onChangeTab(idx)} + class:active={idx === selectedIndex}> + {#if tab.icon}{/if} + {tab.label} + +
+ {/each} +
+ (selectedIndex = null)} + bind:this={popover} + {anchor} + align="left"> + + {#each blocks as [stepId, blockDefinition]} + addBlockToAutomation(stepId, blockDefinition)} /> + {/each} + + + + diff --git a/packages/builder/src/components/automation/AutomationBuilder/flowchart/Arrow.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/Arrow.svelte similarity index 100% rename from packages/builder/src/components/automation/AutomationBuilder/flowchart/Arrow.svelte rename to packages/builder/src/components/automation/AutomationBuilder/FlowChart/Arrow.svelte diff --git a/packages/builder/src/components/automation/AutomationBuilder/flowchart/AutomationBlockTagline.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/AutomationBlockTagline.svelte similarity index 100% rename from packages/builder/src/components/automation/AutomationBuilder/flowchart/AutomationBlockTagline.svelte rename to packages/builder/src/components/automation/AutomationBuilder/FlowChart/AutomationBlockTagline.svelte diff --git a/packages/builder/src/components/automation/AutomationBuilder/flowchart/FlowChart.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte similarity index 69% rename from packages/builder/src/components/automation/AutomationBuilder/flowchart/FlowChart.svelte rename to packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte index 09a0d097de..b7e3f11bcf 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/flowchart/FlowChart.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte @@ -18,16 +18,9 @@ blocks = blocks.concat(automation.definition.steps || []) } } - $: automationCount = $automationStore.automations?.length ?? 0 -{#if automationCount === 0} - Create your first automation to get started -{:else if automation == null} - Select an automation to edit -{:else if !blocks.length} - Add some steps to your automation to get started -{/if} +{#if !blocks.length}Add a trigger to your automation to get started{/if}
{#each blocks as block, idx (block.id)}
diff --git a/packages/builder/src/components/automation/AutomationBuilder/flowchart/FlowItem.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte similarity index 82% rename from packages/builder/src/components/automation/AutomationBuilder/flowchart/FlowItem.svelte rename to packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte index 2c78875eb1..85fdcf1a1d 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/flowchart/FlowItem.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte @@ -9,7 +9,12 @@ $: selected = $automationStore.selectedBlock?.id === block.id $: steps = $automationStore.selectedAutomation?.automation?.definition?.steps ?? [] - $: blockIdx = steps.findIndex(step => step.id === block.id) + $: blockIdx = steps.findIndex((step) => step.id === block.id) + $: allowDeleteTrigger = !steps.length + + function deleteStep() { + automationStore.actions.deleteAutomationBlock(block) + }
{#if block.type === 'TRIGGER'}Trigger{:else}Step {blockIdx + 1}{/if}
+ {#if block.type !== 'TRIGGER' || allowDeleteTrigger} + + {/if}

@@ -61,6 +69,7 @@ flex-direction: row; justify-content: flex-start; align-items: center; + gap: var(--spacing-xs); } header span { flex: 1 1 auto; @@ -74,7 +83,13 @@ } header i { font-size: 20px; - margin-right: 5px; + } + header i.delete { + opacity: 0.5; + } + header i.delete:hover { + cursor: pointer; + opacity: 1; } .ACTION { diff --git a/packages/builder/src/components/automation/AutomationBuilder/flowchart/api.js b/packages/builder/src/components/automation/AutomationBuilder/flowchart/api.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/builder/src/components/automation/AutomationBuilder/flowchart/index.js b/packages/builder/src/components/automation/AutomationBuilder/flowchart/index.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte new file mode 100644 index 0000000000..c4a39d69b9 --- /dev/null +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte @@ -0,0 +1,34 @@ + + +

+ {#each $automationStore.automations as automation, idx} + 0} + icon="ri-stackshare-line" + text={automation.name} + selected={automation._id === selectedAutomationId} + on:click={() => automationStore.actions.select(automation)}> + + + {/each} +
+ + diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte deleted file mode 100644 index 328c0d6122..0000000000 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte +++ /dev/null @@ -1,79 +0,0 @@ - - -
- -
    - {#each $automationStore.automations as automation} -
  • automationStore.actions.select(automation)}> - - {automation.name} -
  • - {/each} -
-
- - - - - diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte index 9a29025d56..b6a2298a22 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte @@ -1,50 +1,41 @@ - - (selectedTab = 'AUTOMATIONS')}> - Automations - - {#if $automationStore.selectedAutomation} - (selectedTab = 'ADD')}> - Steps - - {/if} - - -{#if selectedTab === 'AUTOMATIONS'} - -{:else if selectedTab === 'ADD'} - -{/if} +
+

Automations

+ +
+ + + + diff --git a/packages/builder/src/components/automation/AutomationPanel/BlockList/BlockList.svelte b/packages/builder/src/components/automation/AutomationPanel/BlockList/BlockList.svelte deleted file mode 100644 index 1455f60ef1..0000000000 --- a/packages/builder/src/components/automation/AutomationPanel/BlockList/BlockList.svelte +++ /dev/null @@ -1,48 +0,0 @@ - - -
- -
- {#each blocks as [stepId, blockDefinition]} - - {/each} -
-
- - diff --git a/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte b/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte new file mode 100644 index 0000000000..38cc4d0069 --- /dev/null +++ b/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte @@ -0,0 +1,86 @@ + + +
+ +
+ + + + + + + Are you sure you wish to delete the automation + {automation.name}? + This action cannot be undone. + + + diff --git a/packages/builder/src/components/automation/AutomationPanel/index.js b/packages/builder/src/components/automation/AutomationPanel/index.js deleted file mode 100644 index 3ba95ab3b6..0000000000 --- a/packages/builder/src/components/automation/AutomationPanel/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { default as AutomationPanel } from "./AutomationPanel.svelte" -export { default as BlockList } from "./BlockList/BlockList.svelte" -export { default as AutomationList } from "./AutomationList/AutomationList.svelte" diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 896652dbb7..9165c8411a 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -1,6 +1,6 @@ -
-
{block.name}
- {#each inputs as [key, value]} -
- - {#if value.type === 'string' && value.enum} - - {:else if value.customType === 'password'} - - {:else if value.customType === 'table'} - - {:else if value.customType === 'row'} - - {:else if value.type === 'string' || value.type === 'number'} - - {/if} -
- {/each} -
+
{block.name}
+{#each inputs as [key, value]} +
+ + {#if value.type === 'string' && value.enum} + + {:else if value.customType === 'password'} + + {:else if value.customType === 'table'} + + {:else if value.customType === 'row'} + + {:else if value.type === 'string' || value.type === 'number'} + + {/if} +
+{/each} diff --git a/packages/builder/src/components/automation/SetupPanel/ParamInputs/TableSelector.svelte b/packages/builder/src/components/automation/SetupPanel/TableSelector.svelte similarity index 88% rename from packages/builder/src/components/automation/SetupPanel/ParamInputs/TableSelector.svelte rename to packages/builder/src/components/automation/SetupPanel/TableSelector.svelte index ba0b55cc85..9727fa1d51 100644 --- a/packages/builder/src/components/automation/SetupPanel/ParamInputs/TableSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/TableSelector.svelte @@ -6,7 +6,7 @@
- {#each $backendUiStore.tables as table} diff --git a/packages/builder/src/components/automation/SetupPanel/index.js b/packages/builder/src/components/automation/SetupPanel/index.js deleted file mode 100644 index ccfbddaf1c..0000000000 --- a/packages/builder/src/components/automation/SetupPanel/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as SetupPanel } from "./SetupPanel.svelte" diff --git a/packages/builder/src/components/userInterface/BindableInput.svelte b/packages/builder/src/components/userInterface/BindableInput.svelte index 5ba0798718..bb73dfd80d 100644 --- a/packages/builder/src/components/userInterface/BindableInput.svelte +++ b/packages/builder/src/components/userInterface/BindableInput.svelte @@ -43,7 +43,7 @@ width: 24px; background: var(--grey-4); right: var(--spacing-s); - bottom: 9px; + bottom: 5px; } button:hover { background: var(--grey-5); diff --git a/packages/builder/src/pages/[application]/automate/_layout.svelte b/packages/builder/src/pages/[application]/automate/_layout.svelte index 95cf31e2c8..29915e7bd2 100644 --- a/packages/builder/src/pages/[application]/automate/_layout.svelte +++ b/packages/builder/src/pages/[application]/automate/_layout.svelte @@ -1,6 +1,7 @@ @@ -19,21 +20,32 @@
diff --git a/packages/builder/src/pages/[application]/automate/index.svelte b/packages/builder/src/pages/[application]/automate/index.svelte index 36d04677cd..1a15ed48c6 100644 --- a/packages/builder/src/pages/[application]/automate/index.svelte +++ b/packages/builder/src/pages/[application]/automate/index.svelte @@ -1,5 +1,5 @@ diff --git a/packages/builder/src/pages/[application]/data/table/[selectedTable]/index.svelte b/packages/builder/src/pages/[application]/data/table/[selectedTable]/index.svelte index b7ee09a4f3..5491f7b884 100644 --- a/packages/builder/src/pages/[application]/data/table/[selectedTable]/index.svelte +++ b/packages/builder/src/pages/[application]/data/table/[selectedTable]/index.svelte @@ -11,7 +11,7 @@ diff --git a/packages/builder/src/pages/[application]/data/table/index.svelte b/packages/builder/src/pages/[application]/data/table/index.svelte index 15ed1e299b..d1e2062f5c 100644 --- a/packages/builder/src/pages/[application]/data/table/index.svelte +++ b/packages/builder/src/pages/[application]/data/table/index.svelte @@ -27,7 +27,7 @@ diff --git a/packages/builder/src/pages/[application]/data/view/[selectedView]/index.svelte b/packages/builder/src/pages/[application]/data/view/[selectedView]/index.svelte index 3f592e6148..c1f7abc014 100644 --- a/packages/builder/src/pages/[application]/data/view/[selectedView]/index.svelte +++ b/packages/builder/src/pages/[application]/data/view/[selectedView]/index.svelte @@ -11,7 +11,7 @@ From 2114822c90f47f7e9d8b1803f35718dff54655ff Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 26 Oct 2020 12:25:26 +0000 Subject: [PATCH 31/52] Fix automation component paths --- .../automation/AutomationBuilder/AutomationBuilder.svelte | 2 +- .../components/automation/AutomationBuilder/BlockList.svelte | 2 +- .../automation/AutomationBuilder/FlowChart/FlowChart.svelte | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte b/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte index a598c6831e..ddb86174e2 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte @@ -1,6 +1,6 @@ -
tab", "props": { "className": "string" } }, "tbody": { - "name": "TableBody", + "name": "Table Body", "description": "an HTML tab", "props": { "className": "string" From caab43a312abf04cd812cd0c1f7c2935e3c4443c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 28 Oct 2020 20:28:00 +0000 Subject: [PATCH 52/52] v0.3.0 --- lerna.json | 2 +- packages/builder/package.json | 4 ++-- packages/client/package.json | 2 +- packages/server/package.json | 4 ++-- packages/standard-components/package.json | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 9d0f9c2a80..df346f7cb9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.2.6", + "version": "0.3.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index 671aaaa5c8..20c2360ae2 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.2.6", + "version": "0.3.0", "license": "AGPL-3.0", "private": true, "scripts": { @@ -64,7 +64,7 @@ }, "dependencies": { "@budibase/bbui": "^1.47.0", - "@budibase/client": "^0.2.6", + "@budibase/client": "^0.3.0", "@budibase/colorpicker": "^1.0.1", "@budibase/svelte-ag-grid": "^0.0.16", "@fortawesome/fontawesome-free": "^5.14.0", diff --git a/packages/client/package.json b/packages/client/package.json index dd5e48b905..ba8ac5d811 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.2.6", + "version": "0.3.0", "license": "MPL-2.0", "main": "dist/budibase-client.js", "module": "dist/budibase-client.esm.mjs", diff --git a/packages/server/package.json b/packages/server/package.json index b7a9aed9da..c7909e5e28 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/server", - "version": "0.2.6", + "version": "0.3.0", "description": "Budibase Web Server", "main": "src/electron.js", "repository": { @@ -40,7 +40,7 @@ "author": "Michael Shanks", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/client": "^0.2.6", + "@budibase/client": "^0.3.0", "@koa/router": "^8.0.0", "@sendgrid/mail": "^7.1.1", "@sentry/node": "^5.19.2", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 13f3e167a9..1888fa334e 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -13,7 +13,7 @@ "dev:builder": "rollup -cw" }, "devDependencies": { - "@budibase/client": "^0.2.6", + "@budibase/client": "^0.3.0", "@rollup/plugin-commonjs": "^11.1.0", "lodash": "^4.17.15", "rollup": "^2.11.2", @@ -31,7 +31,7 @@ "keywords": [ "svelte" ], - "version": "0.2.6", + "version": "0.3.0", "license": "MIT", "gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691", "dependencies": {