Merge pull request #15268 from Budibase/contributor-enhancements
Plugin author enhancements
This commit is contained in:
commit
5088979b18
|
@ -273,6 +273,7 @@
|
||||||
value={option.value}
|
value={option.value}
|
||||||
icon={option.barIcon}
|
icon={option.barIcon}
|
||||||
title={option.barTitle || option.label}
|
title={option.barTitle || option.label}
|
||||||
|
disabled={!!setting.license}
|
||||||
{component}
|
{component}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -281,6 +282,7 @@
|
||||||
prop={setting.key}
|
prop={setting.key}
|
||||||
options={setting.options}
|
options={setting.options}
|
||||||
label={setting.label}
|
label={setting.label}
|
||||||
|
disabled={!!setting.license}
|
||||||
{component}
|
{component}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -289,11 +291,16 @@
|
||||||
prop={setting.key}
|
prop={setting.key}
|
||||||
icon={setting.barIcon}
|
icon={setting.barIcon}
|
||||||
title={setting.barTitle || setting.label}
|
title={setting.barTitle || setting.label}
|
||||||
|
disabled={!!setting.license}
|
||||||
bool
|
bool
|
||||||
{component}
|
{component}
|
||||||
/>
|
/>
|
||||||
{:else if setting.type === "color"}
|
{:else if setting.type === "color"}
|
||||||
<SettingsColorPicker prop={setting.key} {component} />
|
<SettingsColorPicker
|
||||||
|
prop={setting.key}
|
||||||
|
{component}
|
||||||
|
disabled={!!setting.license}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{#if setting.barSeparator !== false && (settings.length != idx + 1 || !isRoot)}
|
{#if setting.barSeparator !== false && (settings.length != idx + 1 || !isRoot)}
|
||||||
<div class="divider" />
|
<div class="divider" />
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
export let bool = false
|
export let bool = false
|
||||||
export let active = false
|
export let active = false
|
||||||
export let component
|
export let component
|
||||||
|
export let disabled = false
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
<div
|
<div
|
||||||
{title}
|
{title}
|
||||||
class:active
|
class:active
|
||||||
|
class:disabled
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (prop) {
|
if (prop) {
|
||||||
const newValue = bool ? !currentValue : value
|
const newValue = bool ? !currentValue : value
|
||||||
|
@ -50,4 +52,8 @@
|
||||||
background-color: rgba(13, 102, 208, 0.1);
|
background-color: rgba(13, 102, 208, 0.1);
|
||||||
color: var(--spectrum-global-color-blue-600);
|
color: var(--spectrum-global-color-blue-600);
|
||||||
}
|
}
|
||||||
|
.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
color: var(--spectrum-global-color-gray-400);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,14 +4,15 @@
|
||||||
|
|
||||||
export let prop
|
export let prop
|
||||||
export let component
|
export let component
|
||||||
|
export let disabled = false
|
||||||
|
|
||||||
$: currentValue = component?.[prop]
|
$: currentValue = component?.[prop]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div class:disabled>
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
size="S"
|
size="S"
|
||||||
value={currentValue}
|
value={disabled ? null : currentValue}
|
||||||
on:change={e => {
|
on:change={e => {
|
||||||
if (prop) {
|
if (prop) {
|
||||||
builderStore.actions.updateProp(prop, e.detail)
|
builderStore.actions.updateProp(prop, e.detail)
|
||||||
|
@ -24,4 +25,7 @@
|
||||||
div {
|
div {
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
|
div.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
export let options
|
export let options
|
||||||
export let label
|
export let label
|
||||||
export let component
|
export let component
|
||||||
|
export let disabled = false
|
||||||
|
|
||||||
$: currentValue = component?.[prop]
|
$: currentValue = component?.[prop]
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
autoWidth
|
autoWidth
|
||||||
placeholder={label}
|
placeholder={label}
|
||||||
{options}
|
{options}
|
||||||
|
{disabled}
|
||||||
value={currentValue}
|
value={currentValue}
|
||||||
on:change={e => {
|
on:change={e => {
|
||||||
if (prop) {
|
if (prop) {
|
||||||
|
|
|
@ -41,6 +41,7 @@ import {
|
||||||
memo,
|
memo,
|
||||||
derivedMemo,
|
derivedMemo,
|
||||||
} from "@budibase/frontend-core"
|
} from "@budibase/frontend-core"
|
||||||
|
import { createValidatorFromConstraints } from "components/app/forms/validation"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
API,
|
API,
|
||||||
|
@ -81,6 +82,7 @@ export default {
|
||||||
generateGoldenSample: RowUtils.generateGoldenSample,
|
generateGoldenSample: RowUtils.generateGoldenSample,
|
||||||
memo,
|
memo,
|
||||||
derivedMemo,
|
derivedMemo,
|
||||||
|
createValidatorFromConstraints,
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
Provider,
|
Provider,
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const HPadding = 40
|
||||||
export const ScrollBarSize = 8
|
export const ScrollBarSize = 8
|
||||||
export const GutterWidth = 72
|
export const GutterWidth = 72
|
||||||
export const DefaultColumnWidth = 200
|
export const DefaultColumnWidth = 200
|
||||||
export const MinColumnWidth = 80
|
export const MinColumnWidth = 56
|
||||||
export const NewRowID = "new"
|
export const NewRowID = "new"
|
||||||
export const BlankRowID = "blank"
|
export const BlankRowID = "blank"
|
||||||
export const GeneratedIDPrefix = "‽‽"
|
export const GeneratedIDPrefix = "‽‽"
|
||||||
|
|
Loading…
Reference in New Issue