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/*", 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/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..2cad22c820 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/TestDisplay.svelte @@ -77,7 +77,7 @@
- {#if filteredResults?.[idx]?.inputs} + {#if filteredResults?.[idx]?.outputs} { - 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()}> + +
{#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 => { 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 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]) { 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}`;", + ]) + }) }) diff --git a/yarn.lock b/yarn.lock index 854db7a96a..d05b895c15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6290,6 +6290,11 @@ js-yaml "^3.10.0" tslib "^2.4.0" +"@zerodevx/svelte-json-view@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@zerodevx/svelte-json-view/-/svelte-json-view-1.0.7.tgz#abf3efa71dedcb3e9d16bc9cc61d5ea98c8d00b1" + integrity sha512-yW0MV+9BCKOwzt3h86y3xDqYdI5st+Rxk+L5pa0Utq7nlPD+VvxyhL7R1gJoLxQvWwjyAvY/fyUCFTdwDyI14w== + "@zkochan/js-yaml@0.0.6": version "0.0.6" resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826"