Merge branch 'develop' into correct-nginx-cors-changes

This commit is contained in:
Martin McKeaveney 2023-09-25 13:59:25 +01:00 committed by GitHub
commit 81ce8ac2ad
8 changed files with 54 additions and 35 deletions

View File

@ -1,5 +1,5 @@
{
"version": "2.10.12-alpha.3",
"version": "2.10.12-alpha.6",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -83,8 +83,7 @@
if (Array.isArray(value)) {
return value
}
return [value]
return value.split(",").map(x => x.trim())
}
if (type === "json") {
@ -146,7 +145,7 @@
placeholder={placeholders[schema.type]}
panel={AutomationBindingPanel}
value={Array.isArray(value[field])
? value[field].join(" ")
? value[field].join(",")
: value[field]}
on:change={e => onChange(e, field, schema.type)}
label={field}

View File

@ -55,9 +55,14 @@
bind:value={value[field]}
label={field}
options={schema.constraints.inclusion}
on:change={e => onChange(e, field)}
/>
{: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"}
<span>
<Label>{field}</Label>
@ -73,7 +78,11 @@
/>
</span>
{: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"}
<svelte:component
this={isTestModal ? ModalBindableInput : DrawerBindableInput}

View File

@ -3,10 +3,13 @@
import { API } from "api"
import { Select, Label, Multiselect } from "@budibase/bbui"
import { capitalise } from "../../helpers"
import { createEventDispatcher } from "svelte"
export let schema
export let linkedRows = []
const dispatch = createEventDispatcher()
let rows = []
let linkedIds = (Array.isArray(linkedRows) ? linkedRows : [])?.map(
row => row?._id || row
@ -44,7 +47,10 @@
options={rows}
getOptionLabel={getPrettyName}
getOptionValue={row => row._id}
on:change={e => (linkedIds = e.detail ? [e.detail] : [])}
on:change={e => {
linkedIds = e.detail ? [e.detail] : []
dispatch("change", linkedIds)
}}
{label}
sort
/>
@ -56,5 +62,6 @@
getOptionLabel={getPrettyName}
getOptionValue={row => row._id}
sort
on:change={() => dispatch("change", linkedIds)}
/>
{/if}

View File

@ -224,10 +224,10 @@
<span
class="app-link"
on:click={() => {
appActionPopover.hide()
if (isPublished) {
viewApp()
} else {
appActionPopover.hide()
updateAppModal.show()
}
}}

View File

@ -61,10 +61,12 @@
key: "_css",
type: "text",
})
$: settingOptions = settings.map(setting => ({
label: makeLabel(setting),
value: setting.key,
}))
$: settingOptions = settings
.filter(setting => setting.supportsConditions !== false)
.map(setting => ({
label: makeLabel(setting),
value: setting.key,
}))
$: conditions.forEach(link => {
if (!link.id) {
link.id = generate()

View File

@ -36,10 +36,7 @@
</script>
<DetailSummary name={"Conditions"} collapsible={false}>
<div class="conditionCount">{conditionText}</div>
<div>
<ActionButton on:click={openDrawer}>Configure conditions</ActionButton>
</div>
<ActionButton on:click={openDrawer}>{conditionText}</ActionButton>
</DetailSummary>
<Drawer bind:this={drawer} title="Conditions">
<svelte:fragment slot="description">
@ -48,10 +45,3 @@
<Button cta slot="buttons" on:click={() => save()}>Save</Button>
<ConditionalUIDrawer slot="body" bind:conditions={tempValue} {bindings} />
</Drawer>
<style>
.conditionCount {
font-weight: 600;
margin-top: -5px;
}
</style>

View File

@ -2539,7 +2539,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -2629,7 +2630,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -2685,7 +2687,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -2736,7 +2739,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -2841,7 +2845,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "boolean",
@ -2960,7 +2965,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -3143,7 +3149,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -3200,7 +3207,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -3301,7 +3309,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -3355,7 +3364,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "boolean",
@ -3622,7 +3632,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",
@ -3689,7 +3700,8 @@
{
"type": "text",
"label": "Default value",
"key": "defaultValue"
"key": "defaultValue",
"supportsConditions": false
},
{
"type": "event",