diff --git a/packages/client/src/components/preview/SettingsBar.svelte b/packages/client/src/components/preview/SettingsBar.svelte index ec861ab5b4..9dae1dcb22 100644 --- a/packages/client/src/components/preview/SettingsBar.svelte +++ b/packages/client/src/components/preview/SettingsBar.svelte @@ -273,6 +273,7 @@ value={option.value} icon={option.barIcon} title={option.barTitle || option.label} + disabled={!!setting.license} {component} /> {/each} @@ -281,6 +282,7 @@ prop={setting.key} options={setting.options} label={setting.label} + disabled={!!setting.license} {component} /> {/if} @@ -289,11 +291,16 @@ prop={setting.key} icon={setting.barIcon} title={setting.barTitle || setting.label} + disabled={!!setting.license} bool {component} /> {:else if setting.type === "color"} - + {/if} {#if setting.barSeparator !== false && (settings.length != idx + 1 || !isRoot)}
diff --git a/packages/client/src/components/preview/SettingsButton.svelte b/packages/client/src/components/preview/SettingsButton.svelte index a93ffb77af..16a4fe23d0 100644 --- a/packages/client/src/components/preview/SettingsButton.svelte +++ b/packages/client/src/components/preview/SettingsButton.svelte @@ -10,6 +10,7 @@ export let bool = false export let active = false export let component + export let disabled = false const dispatch = createEventDispatcher() @@ -22,6 +23,7 @@
{ if (prop) { const newValue = bool ? !currentValue : value @@ -50,4 +52,8 @@ background-color: rgba(13, 102, 208, 0.1); color: var(--spectrum-global-color-blue-600); } + .disabled { + pointer-events: none; + color: var(--spectrum-global-color-gray-400); + } diff --git a/packages/client/src/components/preview/SettingsColorPicker.svelte b/packages/client/src/components/preview/SettingsColorPicker.svelte index a292d7d838..aa4b3cb1d1 100644 --- a/packages/client/src/components/preview/SettingsColorPicker.svelte +++ b/packages/client/src/components/preview/SettingsColorPicker.svelte @@ -4,14 +4,15 @@ export let prop export let component + export let disabled = false $: currentValue = component?.[prop] -
+
{ if (prop) { builderStore.actions.updateProp(prop, e.detail) @@ -24,4 +25,7 @@ div { padding: 0 4px; } + div.disabled { + pointer-events: none; + } diff --git a/packages/client/src/components/preview/SettingsPicker.svelte b/packages/client/src/components/preview/SettingsPicker.svelte index 3900d065e8..6b354f8d65 100644 --- a/packages/client/src/components/preview/SettingsPicker.svelte +++ b/packages/client/src/components/preview/SettingsPicker.svelte @@ -6,6 +6,7 @@ export let options export let label export let component + export let disabled = false $: currentValue = component?.[prop] @@ -16,6 +17,7 @@ autoWidth placeholder={label} {options} + {disabled} value={currentValue} on:change={e => { if (prop) { diff --git a/packages/client/src/sdk.js b/packages/client/src/sdk.js index bd51924bf4..40d066f2ee 100644 --- a/packages/client/src/sdk.js +++ b/packages/client/src/sdk.js @@ -41,6 +41,7 @@ import { memo, derivedMemo, } from "@budibase/frontend-core" +import { createValidatorFromConstraints } from "components/app/forms/validation" export default { API, @@ -81,6 +82,7 @@ export default { generateGoldenSample: RowUtils.generateGoldenSample, memo, derivedMemo, + createValidatorFromConstraints, // Components Provider, diff --git a/packages/frontend-core/src/components/grid/lib/constants.js b/packages/frontend-core/src/components/grid/lib/constants.js index 81b4a2f823..fe2aa06c8e 100644 --- a/packages/frontend-core/src/components/grid/lib/constants.js +++ b/packages/frontend-core/src/components/grid/lib/constants.js @@ -7,7 +7,7 @@ export const HPadding = 40 export const ScrollBarSize = 8 export const GutterWidth = 72 export const DefaultColumnWidth = 200 -export const MinColumnWidth = 80 +export const MinColumnWidth = 56 export const NewRowID = "new" export const BlankRowID = "blank" export const GeneratedIDPrefix = "‽‽"