From f8adb6429ce14022bd570077e5902cc6498f5488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Tue, 23 Feb 2021 13:14:30 +0100 Subject: [PATCH 1/4] adds option to allow dot notation in column names --- packages/builder/package.json | 2 +- .../builder/src/components/backend/DataTable/Table.svelte | 1 + packages/builder/yarn.lock | 8 ++++---- packages/standard-components/package.json | 2 +- packages/standard-components/src/grid/Component.svelte | 1 + packages/standard-components/yarn.lock | 8 ++++---- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index fdcb9ae4a1..5555ec52ff 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -67,7 +67,7 @@ "@budibase/client": "^0.7.8", "@budibase/colorpicker": "1.0.1", "@budibase/string-templates": "^0.7.8", - "@budibase/svelte-ag-grid": "^0.0.16", + "@budibase/svelte-ag-grid": "^1.0.4", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "0.7.0", "codemirror": "^5.59.0", diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index fa04829634..27d908eedd 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -37,6 +37,7 @@ rowSelection: allowEditing ? "multiple" : false, rowMultiSelectWithClick: true, suppressRowClickSelection: false, + suppressFieldDotNotation: true, paginationAutoPageSize: true, pagination: true, enableRangeSelection: true, diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock index 7bdcd1431e..7930081cdc 100644 --- a/packages/builder/yarn.lock +++ b/packages/builder/yarn.lock @@ -838,10 +838,10 @@ resolved "https://registry.yarnpkg.com/@budibase/colorpicker/-/colorpicker-1.0.1.tgz#940c180e7ebba0cb0756c4c8ef13f5dfab58e810" integrity sha512-+DTHYhU0sTi5RfCyd7AAvMsLFwyF/wgs0owf7KyQU+ZILRW+YsWa7OQMz+hKQfgVAmvzwrNz8ATiBlG3Ac6Asg== -"@budibase/svelte-ag-grid@^0.0.16": - version "0.0.16" - resolved "https://registry.yarnpkg.com/@budibase/svelte-ag-grid/-/svelte-ag-grid-0.0.16.tgz#1b91dc1e27dad034b827dc7b258fa16d3d3bf68f" - integrity sha512-Yxnfe03Mo7VhuB4wJSGNoc8jaorH9lertptPt2halef9Z93kkYwdwpldnWVzQT07YdX6soPaVLhupxKrI5Hvtw== +"@budibase/svelte-ag-grid@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@budibase/svelte-ag-grid/-/svelte-ag-grid-1.0.4.tgz#41cceec4bde2c4aea8b9da8f610fe36055c7709f" + integrity sha512-JZm6qujxnZpqw7Twbegr6se4sHhyWzN0Cibrk5bVBH32hBgzD6dd33fxwrjHKkWFxjys9wRT+cqYgYVlSt9E3w== dependencies: ag-grid-community "^24.0.0" diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index a571dc9bb0..38107e1c49 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -41,7 +41,7 @@ "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.1.0", "@budibase/bbui": "^1.58.13", - "@budibase/svelte-ag-grid": "^0.0.16", + "@budibase/svelte-ag-grid": "^1.0.4", "@spectrum-css/actionbutton": "^1.0.0-beta.1", "@spectrum-css/button": "^3.0.0-beta.6", "@spectrum-css/checkbox": "^3.0.0-beta.6", diff --git a/packages/standard-components/src/grid/Component.svelte b/packages/standard-components/src/grid/Component.svelte index 2958282293..49754a86a5 100644 --- a/packages/standard-components/src/grid/Component.svelte +++ b/packages/standard-components/src/grid/Component.svelte @@ -52,6 +52,7 @@ filter: true, }, rowSelection: canEdit ? "multiple" : false, + suppressFieldDotNotation: true, suppressRowClickSelection: !canEdit, paginationAutoPageSize: true, pagination, diff --git a/packages/standard-components/yarn.lock b/packages/standard-components/yarn.lock index d27a13883e..8a026bd592 100644 --- a/packages/standard-components/yarn.lock +++ b/packages/standard-components/yarn.lock @@ -56,10 +56,10 @@ svelte-portal "^1.0.0" turndown "^7.0.0" -"@budibase/svelte-ag-grid@^0.0.16": - version "0.0.16" - resolved "https://registry.yarnpkg.com/@budibase/svelte-ag-grid/-/svelte-ag-grid-0.0.16.tgz#1b91dc1e27dad034b827dc7b258fa16d3d3bf68f" - integrity sha512-Yxnfe03Mo7VhuB4wJSGNoc8jaorH9lertptPt2halef9Z93kkYwdwpldnWVzQT07YdX6soPaVLhupxKrI5Hvtw== +"@budibase/svelte-ag-grid@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@budibase/svelte-ag-grid/-/svelte-ag-grid-1.0.4.tgz#41cceec4bde2c4aea8b9da8f610fe36055c7709f" + integrity sha512-JZm6qujxnZpqw7Twbegr6se4sHhyWzN0Cibrk5bVBH32hBgzD6dd33fxwrjHKkWFxjys9wRT+cqYgYVlSt9E3w== dependencies: ag-grid-community "^24.0.0" From 2f749c49d51c622d0185b19f2719c076f7394a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Tue, 23 Feb 2021 15:20:24 +0100 Subject: [PATCH 2/4] remove unused things --- .../src/components/automation/SetupPanel/SetupPanel.svelte | 1 - .../src/components/design/PropertiesPanel/BindingPanel.svelte | 4 ---- 2 files changed, 5 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/SetupPanel.svelte b/packages/builder/src/components/automation/SetupPanel/SetupPanel.svelte index 97e536e2ed..b687fea5fe 100644 --- a/packages/builder/src/components/automation/SetupPanel/SetupPanel.svelte +++ b/packages/builder/src/components/automation/SetupPanel/SetupPanel.svelte @@ -9,7 +9,6 @@ $: instanceId = $backendUiStore.selectedDatabase._id $: automation = $automationStore.selectedAutomation?.automation - $: name = automation?.name ?? "" $: automationLive = automation?.live function setAutomationLive(live) { diff --git a/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte b/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte index 01d7be89e9..00cf25c995 100644 --- a/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte @@ -54,10 +54,6 @@ dispatch("update", originalValue) bindingDrawer.close() } - - function updateValue({ detail }) { - value = detail.value - }
From 082c238b578ca2cca9843f72c78903bf8ee29ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Tue, 23 Feb 2021 16:43:03 +0100 Subject: [PATCH 3/4] work on converting popover to drawer --- .../SetupPanel/AutomationBindingPanel.svelte | 203 ++++++++++++++++++ .../SetupPanel/AutomationBlockSetup.svelte | 22 +- .../SetupPanel/GenericBindingPopover.svelte | 5 +- .../automation/SetupPanel/RowSelector.svelte | 9 +- .../components/common/BindableInput.svelte | 76 ++++--- .../common/DrawerBindableInput.svelte | 6 +- 6 files changed, 274 insertions(+), 47 deletions(-) create mode 100644 packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte new file mode 100644 index 0000000000..12f4efc110 --- /dev/null +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte @@ -0,0 +1,203 @@ + + +
+
+ Available bindings + + + + {#each categories as [categoryName, bindings]} + {categoryName} + + {#each bindings.filter(binding => + binding.label.match(searchRgx) + ) as binding} +
addToText(binding)}> + {binding.label} + {binding.type} +
+
+ {binding.description || ''} +
+
+ {/each} + {/each} + Helpers + + {#each helpers.filter(helper => helper.label.match(searchRgx) || helper.description.match(searchRgx)) as helper} +
addToText(helper)}> + {helper.label} +
+
+ {@html helper.description || ''} +
+
{helper.example || ''}
+
+ {/each} +
+
+