diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index f2d1520878..3b26031ca1 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -1,4 +1,6 @@ import { Checkbox, Select, RadioGroup, Stepper, Input } from "@budibase/bbui" +import { licensing } from "stores/portal" +import { get } from "svelte/store" import DataSourceSelect from "./controls/DataSourceSelect/DataSourceSelect.svelte" import S3DataSourceSelect from "./controls/S3DataSourceSelect.svelte" import DataProviderSelect from "./controls/DataProviderSelect.svelte" @@ -26,7 +28,8 @@ import FieldConfiguration from "./controls/FieldConfiguration/FieldConfiguration import ButtonConfiguration from "./controls/ButtonConfiguration/ButtonConfiguration.svelte" import RelationshipFilterEditor from "./controls/RelationshipFilterEditor.svelte" import FormStepConfiguration from "./controls/FormStepConfiguration.svelte" -import FormStepControls from "components/design/settings/controls/FormStepControls.svelte" +import FormStepControls from "./controls/FormStepControls.svelte" +import PaywalledSetting from "./controls/PaywalledSetting.svelte" const componentMap = { text: DrawerBindableInput, @@ -86,11 +89,16 @@ const componentMap = { } export const getComponentForSetting = setting => { - const { type, showInBar, barStyle } = setting || {} + const { type, showInBar, barStyle, license } = setting || {} if (!type) { return null } + // Check for paywalled settings + if (license && get(licensing).isFreePlan) { + return PaywalledSetting + } + // We can show a clone of the bar settings for certain select settings if (showInBar && type === "select" && barStyle === "buttons") { return BarButtonList diff --git a/packages/builder/src/components/design/settings/controls/PaywalledSetting.svelte b/packages/builder/src/components/design/settings/controls/PaywalledSetting.svelte new file mode 100644 index 0000000000..c28bc49e3d --- /dev/null +++ b/packages/builder/src/components/design/settings/controls/PaywalledSetting.svelte @@ -0,0 +1,23 @@ + + +