Merge branch 'develop' into chore/update_ts
This commit is contained in:
commit
6cd1deb19a
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.10.12-alpha.5",
|
"version": "2.10.12-alpha.7",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -83,8 +83,7 @@
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
return value.split(",").map(x => x.trim())
|
||||||
return [value]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === "json") {
|
if (type === "json") {
|
||||||
|
@ -146,7 +145,7 @@
|
||||||
placeholder={placeholders[schema.type]}
|
placeholder={placeholders[schema.type]}
|
||||||
panel={AutomationBindingPanel}
|
panel={AutomationBindingPanel}
|
||||||
value={Array.isArray(value[field])
|
value={Array.isArray(value[field])
|
||||||
? value[field].join(" ")
|
? value[field].join(",")
|
||||||
: value[field]}
|
: value[field]}
|
||||||
on:change={e => onChange(e, field, schema.type)}
|
on:change={e => onChange(e, field, schema.type)}
|
||||||
label={field}
|
label={field}
|
||||||
|
|
|
@ -55,9 +55,14 @@
|
||||||
bind:value={value[field]}
|
bind:value={value[field]}
|
||||||
label={field}
|
label={field}
|
||||||
options={schema.constraints.inclusion}
|
options={schema.constraints.inclusion}
|
||||||
|
on:change={e => onChange(e, field)}
|
||||||
/>
|
/>
|
||||||
{:else if schema.type === "longform"}
|
{:else if schema.type === "longform"}
|
||||||
<TextArea label={field} bind:value={value[field]} />
|
<TextArea
|
||||||
|
label={field}
|
||||||
|
bind:value={value[field]}
|
||||||
|
on:change={e => onChange(e, field)}
|
||||||
|
/>
|
||||||
{:else if schema.type === "json"}
|
{:else if schema.type === "json"}
|
||||||
<span>
|
<span>
|
||||||
<Label>{field}</Label>
|
<Label>{field}</Label>
|
||||||
|
@ -73,7 +78,11 @@
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
{:else if schema.type === "link"}
|
{:else if schema.type === "link"}
|
||||||
<LinkedRowSelector bind:linkedRows={value[field]} {schema} />
|
<LinkedRowSelector
|
||||||
|
bind:linkedRows={value[field]}
|
||||||
|
{schema}
|
||||||
|
on:change={e => onChange(e, field)}
|
||||||
|
/>
|
||||||
{:else if schema.type === "string" || schema.type === "number"}
|
{:else if schema.type === "string" || schema.type === "number"}
|
||||||
<svelte:component
|
<svelte:component
|
||||||
this={isTestModal ? ModalBindableInput : DrawerBindableInput}
|
this={isTestModal ? ModalBindableInput : DrawerBindableInput}
|
||||||
|
|
|
@ -3,10 +3,13 @@
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
import { Select, Label, Multiselect } from "@budibase/bbui"
|
import { Select, Label, Multiselect } from "@budibase/bbui"
|
||||||
import { capitalise } from "../../helpers"
|
import { capitalise } from "../../helpers"
|
||||||
|
import { createEventDispatcher } from "svelte"
|
||||||
|
|
||||||
export let schema
|
export let schema
|
||||||
export let linkedRows = []
|
export let linkedRows = []
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
let rows = []
|
let rows = []
|
||||||
let linkedIds = (Array.isArray(linkedRows) ? linkedRows : [])?.map(
|
let linkedIds = (Array.isArray(linkedRows) ? linkedRows : [])?.map(
|
||||||
row => row?._id || row
|
row => row?._id || row
|
||||||
|
@ -44,7 +47,10 @@
|
||||||
options={rows}
|
options={rows}
|
||||||
getOptionLabel={getPrettyName}
|
getOptionLabel={getPrettyName}
|
||||||
getOptionValue={row => row._id}
|
getOptionValue={row => row._id}
|
||||||
on:change={e => (linkedIds = e.detail ? [e.detail] : [])}
|
on:change={e => {
|
||||||
|
linkedIds = e.detail ? [e.detail] : []
|
||||||
|
dispatch("change", linkedIds)
|
||||||
|
}}
|
||||||
{label}
|
{label}
|
||||||
sort
|
sort
|
||||||
/>
|
/>
|
||||||
|
@ -56,5 +62,6 @@
|
||||||
getOptionLabel={getPrettyName}
|
getOptionLabel={getPrettyName}
|
||||||
getOptionValue={row => row._id}
|
getOptionValue={row => row._id}
|
||||||
sort
|
sort
|
||||||
|
on:change={() => dispatch("change", linkedIds)}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -38,14 +38,12 @@
|
||||||
hoverable
|
hoverable
|
||||||
on:click={store.undo}
|
on:click={store.undo}
|
||||||
disabled={!$store.canUndo}
|
disabled={!$store.canUndo}
|
||||||
tooltip="Undo latest change"
|
|
||||||
/>
|
/>
|
||||||
<Icon
|
<Icon
|
||||||
name="Redo"
|
name="Redo"
|
||||||
hoverable
|
hoverable
|
||||||
on:click={store.redo}
|
on:click={store.redo}
|
||||||
disabled={!$store.canRedo}
|
disabled={!$store.canRedo}
|
||||||
tooltip="Redo latest undo"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue