From 0d0d96f5da8092c28d3d4010912a119cbd4f0808 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 15 Sep 2023 08:46:35 +0100 Subject: [PATCH] Remove last usage of legacy context util and update data providers to be able to use any data providers on the screen --- .../builder/src/builderStore/componentUtils.js | 2 +- packages/builder/src/builderStore/dataBinding.js | 14 -------------- .../settings/controls/DataSourceSelect.svelte | 16 +++++++++------- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/packages/builder/src/builderStore/componentUtils.js b/packages/builder/src/builderStore/componentUtils.js index da27a43c7a..363d61cf66 100644 --- a/packages/builder/src/builderStore/componentUtils.js +++ b/packages/builder/src/builderStore/componentUtils.js @@ -97,7 +97,7 @@ export const findAllComponents = rootComponent => { } /** - * Finds the closes parent component which matches certain criteria + * Finds the closest parent component which matches certain criteria */ export const findClosestMatchingComponent = ( rootComponent, diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index d6d02ab979..44a690f26c 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -258,20 +258,6 @@ export const getComponentContexts = ( return Object.values(map) } -/** - * Gets all data provider components above a component. - */ -export const getContextProviderComponents = ( - asset, - componentId, - type, - options = { includeSelf: false } -) => { - return getComponentContexts(asset, componentId, type, options).map( - entry => entry.component - ) -} - /** * Gets all data provider components above a component. */ diff --git a/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte b/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte index d70929469a..aba5af00a5 100644 --- a/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte +++ b/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte @@ -1,5 +1,5 @@