|
|
@ -4,14 +4,15 @@ |
|
|
import DrawerBindableInput from "../../common/bindings/DrawerBindableInput.svelte" |
|
|
import DrawerBindableInput from "../../common/bindings/DrawerBindableInput.svelte" |
|
|
import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte" |
|
|
import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte" |
|
|
import { createEventDispatcher } from "svelte" |
|
|
import { createEventDispatcher } from "svelte" |
|
|
import { automationStore } from "builderStore" |
|
|
|
|
|
import RowSelectorTypes from "./RowSelectorTypes.svelte" |
|
|
import RowSelectorTypes from "./RowSelectorTypes.svelte" |
|
|
|
|
|
import ModalBindableInput from "../../common/bindings/ModalBindableInput.svelte" |
|
|
|
|
|
|
|
|
const dispatch = createEventDispatcher() |
|
|
const dispatch = createEventDispatcher() |
|
|
|
|
|
|
|
|
export let value |
|
|
export let value |
|
|
export let bindings |
|
|
export let bindings |
|
|
export let block |
|
|
export let block |
|
|
|
|
|
export let isTestModal |
|
|
|
|
|
|
|
|
let table |
|
|
let table |
|
|
let schemaFields |
|
|
let schemaFields |
|
|
@ -103,35 +104,18 @@ |
|
|
{#each schemaFields as [field, schema]} |
|
|
{#each schemaFields as [field, schema]} |
|
|
{#if !schema.autocolumn} |
|
|
{#if !schema.autocolumn} |
|
|
{#if schema.type !== "attachment"} |
|
|
{#if schema.type !== "attachment"} |
|
|
{#if $automationStore.selectedAutomation.automation.testData} |
|
|
{#if !rowControl} |
|
|
{#if !rowControl} |
|
|
<RowSelectorTypes |
|
|
<RowSelectorTypes |
|
|
{isTestModal} |
|
|
{field} |
|
|
{field} |
|
|
{schema} |
|
|
{schema} |
|
|
{bindings} |
|
|
{bindings} |
|
|
{value} |
|
|
{value} |
|
|
{onChange} |
|
|
{onChange} |
|
|
/> |
|
|
/> |
|
|
{:else} |
|
|
|
|
|
<DrawerBindableInput |
|
|
|
|
|
placeholder={placeholders[schema.type]} |
|
|
|
|
|
panel={AutomationBindingPanel} |
|
|
|
|
|
value={Array.isArray(value[field]) |
|
|
|
|
|
? value[field].join(" ") |
|
|
|
|
|
: value[field]} |
|
|
|
|
|
on:change={e => onChange(e, field, schema.type)} |
|
|
|
|
|
label={field} |
|
|
|
|
|
type="string" |
|
|
|
|
|
{bindings} |
|
|
|
|
|
fillWidth={true} |
|
|
|
|
|
allowJS={true} |
|
|
|
|
|
updateOnChange={false} |
|
|
|
|
|
/> |
|
|
|
|
|
{/if} |
|
|
|
|
|
{:else if !rowControl} |
|
|
|
|
|
<RowSelectorTypes {field} {schema} {bindings} {value} {onChange} /> |
|
|
|
|
|
{:else} |
|
|
{:else} |
|
|
<DrawerBindableInput |
|
|
<svelte:component |
|
|
|
|
|
this={isTestModal ? ModalBindableInput : DrawerBindableInput} |
|
|
placeholder={placeholders[schema.type]} |
|
|
placeholder={placeholders[schema.type]} |
|
|
panel={AutomationBindingPanel} |
|
|
panel={AutomationBindingPanel} |
|
|
value={Array.isArray(value[field]) |
|
|
value={Array.isArray(value[field]) |
|
|
|