From 272e85f6961b6b4898e7110fd6a87f980557fdc9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 18 Jan 2024 15:35:58 +0100 Subject: [PATCH 01/11] Add test --- packages/string-templates/test/hbsToJs.spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/string-templates/test/hbsToJs.spec.js b/packages/string-templates/test/hbsToJs.spec.js index 8a74cae526..5d5b6c6d0b 100644 --- a/packages/string-templates/test/hbsToJs.spec.js +++ b/packages/string-templates/test/hbsToJs.spec.js @@ -127,4 +127,12 @@ describe("Test that the string processing works correctly", () => { "return `average: ${var1} add: ${var2}`;", ]) }) + + it("should handle uuids", () => { + const response = convertToJS("This is: {{ uuid }}") + checkLines(response, [ + "const var1 = helpers.uuid();", + "return `This is: ${var1}`;", + ]) + }) }) From 5bc5f71549e9e6fc0b2609121235f97dabd7dba9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 18 Jan 2024 15:39:39 +0100 Subject: [PATCH 02/11] Fix uuid --- packages/string-templates/src/conversion/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/string-templates/src/conversion/index.js b/packages/string-templates/src/conversion/index.js index bbe0c33942..30e2510b55 100644 --- a/packages/string-templates/src/conversion/index.js +++ b/packages/string-templates/src/conversion/index.js @@ -112,7 +112,7 @@ module.exports.convertHBSBlock = (block, blockNumber) => { const list = getHelperList() for (let layer of layers) { const parts = splitBySpace(layer) - if (value || parts.length > 1) { + if (value || parts.length > 1 || list[parts[0]]) { // first of layer should always be the helper const helper = parts.splice(0, 1) if (list[helper]) { From 7c19d1846086c7a17f4be925c2dff50a919dc221 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 19 Jan 2024 11:07:58 +0000 Subject: [PATCH 03/11] small automation fixes --- .../automation/AutomationBuilder/FlowChart/ActionModal.svelte | 2 +- .../components/automation/AutomationBuilder/TestDisplay.svelte | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte index ef591d5635..fbc79b967c 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte @@ -43,7 +43,7 @@ }, TRIGGER_AUTOMATION_RUN: { disabled: !triggerAutomationRunEnabled, - message: collectDisabledMessage(), + message: "Please upgrade to a paid plan", }, } } diff --git a/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte b/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte index 9fbc4b6bc1..b504ef5faf 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte @@ -35,6 +35,7 @@ } } } + $: console.log(filteredResults?.[0]?.outputs)
@@ -77,7 +78,7 @@
- {#if filteredResults?.[idx]?.inputs} + {#if filteredResults?.[idx]?.outputs} Date: Fri, 19 Jan 2024 11:09:40 +0000 Subject: [PATCH 04/11] remove log --- .../components/automation/AutomationBuilder/TestDisplay.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte b/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte index b504ef5faf..2cad22c820 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte @@ -35,7 +35,6 @@ } } } - $: console.log(filteredResults?.[0]?.outputs)
From ecd8e0433676d63cefd2099f0a43099e562456ad Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 19 Jan 2024 11:12:18 +0000 Subject: [PATCH 05/11] update submodules --- packages/account-portal | 2 +- packages/pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/account-portal b/packages/account-portal index 1bc0128714..11469c40d7 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 1bc012871496ff55e376931b620075b565e34d09 +Subproject commit 11469c40d73ea58f2aec80c12c1946289b67c6f2 diff --git a/packages/pro b/packages/pro index 9d80daaa5b..31f11bcd33 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 9d80daaa5b79da68730d6c5f497f629c47a78ef8 +Subproject commit 31f11bcd3323d2105a83ebfdee8facc2900bb879 From 87be6230575647e3f4eb4f2678711e78a04b0bf8 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:26:13 +0000 Subject: [PATCH 06/11] Remove auto naming of columns (#12816) * Remove auto column naming * Let enter key save edit table name * update submodules --- .../DataTable/modals/CreateEditColumn.svelte | 21 ------------------- .../popovers/EditTablePopover.svelte | 19 ++++++++++------- yarn.lock | 5 +++++ 3 files changed, 16 insertions(+), 29 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 936eb614d6..0328759908 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -172,22 +172,6 @@ } } } - if (!savingColumn && !originalName) { - let highestNumber = 0 - Object.keys(table.schema).forEach(columnName => { - const columnNumber = extractColumnNumber(columnName) - if (columnNumber > highestNumber) { - highestNumber = columnNumber - } - return highestNumber - }) - - if (highestNumber >= 1) { - editableColumn.name = `Column 0${highestNumber + 1}` - } else { - editableColumn.name = "Column 01" - } - } if (!savingColumn) { editableColumn.fieldId = makeFieldId( @@ -389,11 +373,6 @@ deleteColName = "" } - function extractColumnNumber(columnName) { - const match = columnName.match(/Column (\d+)/) - return match ? parseInt(match[1]) : 0 - } - function getAllowedTypes() { if ( originalName && diff --git a/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte b/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte index 18c0d460a8..f4b2a2fc25 100644 --- a/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte +++ b/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte @@ -17,7 +17,7 @@ export let table - let editorModal + let editorModal, editTableNameModal let confirmDeleteDialog let error = "" @@ -101,18 +101,21 @@ - +
editTableNameModal.confirm()}> + +
Date: Fri, 19 Jan 2024 11:32:13 +0000 Subject: [PATCH 07/11] Support custom validation rules for ejected block fields (#12799) --- .../components/app/blocks/CardsBlock.svelte | 2 +- .../components/app/blocks/TableBlock.svelte | 2 +- .../src/components/app/forms/Form.svelte | 4 +-- .../src/components/app/forms/InnerForm.svelte | 35 +++++++++---------- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/packages/client/src/components/app/blocks/CardsBlock.svelte b/packages/client/src/components/app/blocks/CardsBlock.svelte index 3e48247f92..e0985a8979 100644 --- a/packages/client/src/components/app/blocks/CardsBlock.svelte +++ b/packages/client/src/components/app/blocks/CardsBlock.svelte @@ -88,7 +88,7 @@ {#if title || enrichedSearchColumns?.length || showTitleButton} diff --git a/packages/client/src/components/app/forms/InnerForm.svelte b/packages/client/src/components/app/forms/InnerForm.svelte index 9d0db43bf4..55c9c938c3 100644 --- a/packages/client/src/components/app/forms/InnerForm.svelte +++ b/packages/client/src/components/app/forms/InnerForm.svelte @@ -11,7 +11,7 @@ export let size export let schema export let table - export let disableValidation = false + export let disableSchemaValidation = false export let editAutoColumns = false // We export this store so that when we remount the inner form we can still @@ -156,17 +156,16 @@ if (!field) { return } - // Create validation function based on field schema - const schemaConstraints = schema?.[field]?.constraints - const validator = disableValidation + const schemaConstraints = disableSchemaValidation ? null - : createValidatorFromConstraints( - schemaConstraints, - validationRules, - field, - table - ) + : schema?.[field]?.constraints + const validator = createValidatorFromConstraints( + schemaConstraints, + validationRules, + field, + table + ) // Sanitise the default value to ensure it doesn't contain invalid data defaultValue = sanitiseValue(defaultValue, schema?.[field], type) @@ -332,15 +331,15 @@ const { value, error } = fieldState // Create new validator - const schemaConstraints = schema?.[field]?.constraints - const validator = disableValidation + const schemaConstraints = disableSchemaValidation ? null - : createValidatorFromConstraints( - schemaConstraints, - validationRules, - field, - table - ) + : schema?.[field]?.constraints + const validator = createValidatorFromConstraints( + schemaConstraints, + validationRules, + field, + table + ) // Update validator fieldInfo.update(state => { From 2f410cf0b69d8913b7bf4ec50ada30032b0863b3 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 19 Jan 2024 11:34:43 +0000 Subject: [PATCH 08/11] Bump version to 2.15.1 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index f058050495..5fe9a6b261 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.15.0", + "version": "2.15.1", "npmClient": "yarn", "packages": [ "packages/*", From 50078f4f0f85b7a67bd549c9b73f7a165df62aa4 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 19 Jan 2024 14:59:08 +0000 Subject: [PATCH 09/11] Fix issue where flagClient could be undefined when running outside of test mode --- packages/server/src/utilities/redis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utilities/redis.ts b/packages/server/src/utilities/redis.ts index d833ed2c10..a4154b7b95 100644 --- a/packages/server/src/utilities/redis.ts +++ b/packages/server/src/utilities/redis.ts @@ -94,7 +94,7 @@ export async function setTestFlag(id: string) { } export async function checkTestFlag(id: string) { - const flag = await flagClient.get(id) + const flag = await flagClient?.get(id) return !!(flag && flag.testing) } From 331a4e83a82a784ea653a502dd3f584db49372f3 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 19 Jan 2024 15:13:04 +0000 Subject: [PATCH 10/11] submodules --- packages/account-portal | 2 +- packages/pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/account-portal b/packages/account-portal index 11469c40d7..05c90ce551 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 11469c40d73ea58f2aec80c12c1946289b67c6f2 +Subproject commit 05c90ce55144e260da6688335c16783eab79bf96 diff --git a/packages/pro b/packages/pro index 31f11bcd33..ce7722ed44 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 31f11bcd3323d2105a83ebfdee8facc2900bb879 +Subproject commit ce7722ed4474718596b465dcfd49bef36cab2e42 From c48f71ab76a3fff26bc0afde62563ffe328b786e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 19 Jan 2024 15:42:36 +0000 Subject: [PATCH 11/11] Bump version to 2.15.2 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 5fe9a6b261..3ab56dc0b1 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.15.1", + "version": "2.15.2", "npmClient": "yarn", "packages": [ "packages/*",