From fcacb641f638f13b44ef9e6ffa48bb7ca897e047 Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 25 Jan 2024 17:32:35 +0000 Subject: [PATCH 1/7] Updated state action parsing for nested component types --- .../builder/src/builderStore/dataBinding.js | 48 +++++++++++++++++-- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 52368a0723..7a9f912c8b 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -1035,11 +1035,48 @@ export const getAllStateVariables = () => { getAllAssets().forEach(asset => { findAllMatchingComponents(asset.props, component => { const settings = getComponentSettings(component._component) - settings - .filter(setting => setting.type === "event") - .forEach(setting => { - eventSettings.push(component[setting.key]) - }) + + const parseEventSettings = (settings, comp) => { + settings + .filter(setting => setting.type === "event") + .forEach(setting => { + eventSettings.push(comp[setting.key]) + }) + } + + const parseComponentSettings = (settings, component) => { + // Parse the nested button configurations + settings + .filter(setting => setting.type === "buttonConfiguration") + .forEach(setting => { + const buttonConfig = component[setting.key] + + if (Array.isArray(buttonConfig)) { + buttonConfig.forEach(button => { + const nestedSettings = getComponentSettings(button._component) + parseEventSettings(nestedSettings, button) + }) + } + }) + + parseEventSettings(settings, component) + } + + // Parse the base component settings + parseComponentSettings(settings, component) + + // Parse step configuration + const stepSetting = settings.find( + setting => setting.type === "stepConfiguration" + ) + const steps = stepSetting ? component[stepSetting.key] : [] + const stepDefinition = getComponentSettings( + "@budibase/standard-components/multistepformblockstep" + ) + + steps.forEach(step => { + parseComponentSettings(stepDefinition, step) + }) }) }) @@ -1067,6 +1104,7 @@ export const getAllStateVariables = () => { } }) }) + console.log("STATE BINDINGS ", Array.from(bindingSet)) return Array.from(bindingSet) } From a524e0c2c4754b8bddbaf2f72de002b5e95259ae Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 25 Jan 2024 17:43:21 +0000 Subject: [PATCH 2/7] Update account portal --- packages/account-portal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/account-portal b/packages/account-portal index 1b9fa56fd7..30543f2f88 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 1b9fa56fd7b0991b4963de9f3e8b4711abdcae71 +Subproject commit 30543f2f88578d0cbfc993926b7e3b447019c3f6 From fbe9c41bee1f4ad5e026f10d09babc4a8d67d74e Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 26 Jan 2024 10:13:25 +0000 Subject: [PATCH 3/7] Removed comment --- packages/builder/src/builderStore/dataBinding.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 7a9f912c8b..b03065f153 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -1104,7 +1104,6 @@ export const getAllStateVariables = () => { } }) }) - console.log("STATE BINDINGS ", Array.from(bindingSet)) return Array.from(bindingSet) } From dcb5a1097b42753331d11a8a4b67735863b7824b Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 26 Jan 2024 10:19:22 +0000 Subject: [PATCH 4/7] Update account portal --- packages/account-portal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/account-portal b/packages/account-portal index 30543f2f88..e9af6686ba 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 30543f2f88578d0cbfc993926b7e3b447019c3f6 +Subproject commit e9af6686ba135c367e9145a53d26c68325b9bf68 From 8ec299e924ca14cbf33dec5dd5c3c3bb43e42a69 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Fri, 26 Jan 2024 10:21:45 +0000 Subject: [PATCH 5/7] Cannot select relationship field value in design section (#12876) * Revert "Quick fix, if compare isn't set then don't try to use it at all." This reverts commit b8c7da02e28f5fa0fbae4125b69be5ec1cd86778. * Revert "Quick fix for all usages of compare function in select." This reverts commit b4be6daea6a5fac4e16a7ce2436638ae903ba942. * Don't force fetch rows on fieldApi change * Revert "Revert "Quick fix for all usages of compare function in select."" This reverts commit 8cb5e2b5695cf575d63a6a241802f6f28b1f8079. * Revert "Revert "Quick fix, if compare isn't set then don't try to use it at all."" This reverts commit 0c09d5878b7de8860a66f9ce9caa74147c23bc71. * update account portal --- packages/account-portal | 2 +- .../src/components/app/forms/RelationshipField.svelte | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/account-portal b/packages/account-portal index 1b9fa56fd7..e9af6686ba 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 1b9fa56fd7b0991b4963de9f3e8b4711abdcae71 +Subproject commit e9af6686ba135c367e9145a53d26c68325b9bf68 diff --git a/packages/client/src/components/app/forms/RelationshipField.svelte b/packages/client/src/components/app/forms/RelationshipField.svelte index 9d0503be8e..7cd571f6d9 100644 --- a/packages/client/src/components/app/forms/RelationshipField.svelte +++ b/packages/client/src/components/app/forms/RelationshipField.svelte @@ -108,16 +108,13 @@ } } - $: forceFetchRows(filter, fieldApi) + $: forceFetchRows(filter) $: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue) const forceFetchRows = async () => { - if (!fieldApi) { - return - } // if the filter has changed, then we need to reset the options, clear the selection, and re-fetch optionsObj = {} - fieldApi.setValue([]) + fieldApi?.setValue([]) selectedValue = [] debouncedFetchRows(searchTerm, primaryDisplay, defaultValue) } From 97af9b2ec069ef37623c08d182df74f45aab2f87 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 26 Jan 2024 10:26:57 +0000 Subject: [PATCH 6/7] Bump version to 2.15.7 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 4049d5d734..65f04ecf2c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.15.6", + "version": "2.15.7", "npmClient": "yarn", "packages": [ "packages/*", From 7849e2d27e0e148b07d062a490007b6183b122ca Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 26 Jan 2024 12:05:05 +0000 Subject: [PATCH 7/7] Update account portal --- packages/account-portal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/account-portal b/packages/account-portal index e9af6686ba..dd9cec2275 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit e9af6686ba135c367e9145a53d26c68325b9bf68 +Subproject commit dd9cec22751405e042ba0fe58e3c05f7223c3723