From 189a8ee6943ccbafd654de13d3557cf76aee86c7 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 1 Apr 2025 15:40:01 +0100 Subject: [PATCH 01/10] Readded the DrawerBindableSlot to the RowSelector as it was still needed several column types. Some UI changes to accomodate also --- .../automation/SetupPanel/RowSelector.svelte | 71 +++++++++++++++---- .../common/bindings/DrawerBindableSlot.svelte | 27 ++++--- 2 files changed, 75 insertions(+), 23 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte index 73b2aba18d..86e04a4f48 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte @@ -11,6 +11,10 @@ import { FieldType } from "@budibase/types" import RowSelectorTypes from "./RowSelectorTypes.svelte" + import { + DrawerBindableSlot, + ServerBindingPanel as AutomationBindingPanel, + } from "@/components/common/bindings" import { FIELDS } from "@/constants/backend" import { capitalise } from "@/helpers" import { memo } from "@budibase/frontend-core" @@ -234,6 +238,14 @@ ) dispatch("change", result) } + + /** + * Converts arrays into strings. The CodeEditor expects a string or encoded JS + * @param{object} fieldValue + */ + const drawerValue = fieldValue => { + return Array.isArray(fieldValue) ? fieldValue.join(",") : fieldValue + } {#each schemaFields || [] as [field, schema]} @@ -243,20 +255,55 @@ fullWidth={fullWidth || isFullWidth(schema.type)} {componentWidth} > -
- + +
+ {:else} + + onChange({ + row: { + [field]: e.detail, + }, + })} + {bindings} + allowJS={true} + updateOnChange={false} {context} - /> - + > +
+ +
+
+ {/if} {/if} {/each} diff --git a/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte b/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte index 0982fd6329..f3009f05ee 100644 --- a/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte +++ b/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte @@ -150,7 +150,7 @@
- {#if !isValid(value) && !$$slots.default} + {#if !isValid(value)}
{ if (!isJS) { dispatch("change", "") @@ -212,22 +212,27 @@ } .slot-icon { - right: 31px; + right: 31px !important; border-right: 1px solid var(--spectrum-alias-border-color); - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; + border-top-right-radius: 0px !important; + border-bottom-right-radius: 0px !important; } - .text-area-slot-icon { - border-bottom: 1px solid var(--spectrum-alias-border-color); - border-bottom-right-radius: 0px; - top: 1px; + .icon.close { + right: 1px !important; + border-right: none; + border-top-right-radius: 4px !important; + border-bottom-right-radius: 4px !important; } + + .text-area-slot-icon, .json-slot-icon { + right: 1px !important; border-bottom: 1px solid var(--spectrum-alias-border-color); - border-bottom-right-radius: 0px; + border-top-right-radius: 4px !important; + border-bottom-right-radius: 0px !important; + border-bottom-left-radius: 4px !important; top: 1px; - right: 0px; } .icon { From 916c480d0ec851935b812565928febc028259b71 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 1 Apr 2025 17:12:31 +0100 Subject: [PATCH 02/10] Ensure the CodeEditorField always displays itself when inside a bindable slot --- .../components/automation/SetupPanel/ExecuteScriptV2.svelte | 6 ++++-- .../common/bindings/DrawerBindableCodeEditorField.svelte | 3 +++ .../components/common/bindings/DrawerBindableSlot.svelte | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte b/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte index a5ba264f60..97fffa9922 100644 --- a/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte +++ b/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte @@ -7,6 +7,7 @@ import { type EnrichedBinding, FieldType } from "@budibase/types" import CodeEditorField from "@/components/common/bindings/CodeEditorField.svelte" import { DropdownPosition } from "@/components/common/CodeEditor/CodeEditor.svelte" + import DrawerBindableCodeEditorField from "@/components/common/bindings/DrawerBindableCodeEditorField.svelte" export let value: string export let context: Record | undefined = undefined @@ -27,6 +28,7 @@ allowHBS={false} updateOnChange={false} {context} + showComponent >
@@ -32,6 +33,7 @@ value = e.detail dispatch("change", value) }} + showComponent >
- {#if !isValid(value)} + {#if !isValid(value) && !showComponent} Date: Tue, 1 Apr 2025 17:20:46 +0100 Subject: [PATCH 03/10] Lint --- .../src/components/automation/SetupPanel/ExecuteScriptV2.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte b/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte index 97fffa9922..c0cdba458e 100644 --- a/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte +++ b/packages/builder/src/components/automation/SetupPanel/ExecuteScriptV2.svelte @@ -7,7 +7,6 @@ import { type EnrichedBinding, FieldType } from "@budibase/types" import CodeEditorField from "@/components/common/bindings/CodeEditorField.svelte" import { DropdownPosition } from "@/components/common/CodeEditor/CodeEditor.svelte" - import DrawerBindableCodeEditorField from "@/components/common/bindings/DrawerBindableCodeEditorField.svelte" export let value: string export let context: Record | undefined = undefined From 7074a4087abf4fed99c463ad76c23d75ffff5333 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 2 Apr 2025 09:56:01 +0100 Subject: [PATCH 04/10] Add bigint to the row types handling their own binding drawer UX --- .../src/components/automation/SetupPanel/RowSelector.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte index 86e04a4f48..77df862ac9 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelector.svelte @@ -246,6 +246,9 @@ const drawerValue = fieldValue => { return Array.isArray(fieldValue) ? fieldValue.join(",") : fieldValue } + + // The element controls their own binding drawer + const customDrawer = ["string", "number", "barcodeqr", "bigint"] {#each schemaFields || [] as [field, schema]} @@ -255,7 +258,7 @@ fullWidth={fullWidth || isFullWidth(schema.type)} {componentWidth} > - {#if ["string", "number", "barcodeqr"].includes(schema.type)} + {#if customDrawer.includes(schema.type)}
Date: Wed, 2 Apr 2025 10:31:27 +0100 Subject: [PATCH 05/10] Add license feature for PDF and update UI to account for it --- .../design/_components/NewScreen/index.svelte | 67 ++++++++++++------- .../builder/src/stores/portal/licensing.ts | 4 ++ packages/types/src/sdk/licensing/feature.ts | 1 + 3 files changed, 49 insertions(+), 23 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte index d50d284965..416299e00d 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte @@ -1,5 +1,5 @@ From ab921ec6084c482cd54e9312155dfb3498216a9d Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 3 Apr 2025 15:03:02 +0000 Subject: [PATCH 10/10] Bump version to 3.8.4 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index fd1ce425cf..34e020d48f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "3.8.3", + "version": "3.8.4", "npmClient": "yarn", "concurrency": 20, "command": {