{#if stepLayouts[block.stepId]} {#each Object.keys(stepLayouts[block.stepId] || {}) as key} {#if canShowField(stepLayouts[block.stepId].schema)} {#each stepLayouts[block.stepId][key].content as config} {#if config.title} {:else} {/if} {/each} {/if} {/each} {:else} {#each schemaProperties as [key, value]} {#if canShowField(value)} {@const label = getFieldLabel(key, value)}
{#if key !== "fields" && value.type !== "boolean" && shouldRenderField(value)}
{#if value.customType === AutomationCustomIOType.TRIGGER_FILTER} window.open( "https://docs.budibase.com/docs/row-trigger-filters", "_blank" )} size="XS" name="InfoOutline" /> {/if}
{/if}
{#if value.type === "string" && value.enum && canShowField(value)} onChange({ [key]: e.detail })} value={inputData[key]} options={Object.keys(table?.schema || {})} disabled={value.readonly} /> {:else if value.type === "attachment" || value.type === "signature_single"}
{ onChange({ [key]: null, meta: { useAttachmentBinding: e.detail, }, }) }} />
{#if !inputData?.meta?.useAttachmentBinding} onChange({ [key]: e.detail.map(({ name, value }) => ({ url: name, filename: value, })), })} object={handleAttachmentParams(inputData[key])} allowJS {bindings} keyBindings customButtonText={value.type === "attachment" ? "Add attachment" : "Add signature"} keyPlaceholder={"URL"} valuePlaceholder={"Filename"} /> {:else if isTestModal} onChange({ [key]: e.detail })} {bindings} updateOnChange={false} /> {:else} onChange({ [key]: e.detail })} {bindings} updateOnChange={false} placeholder={value.customType === "queryLimit" ? queryLimit : ""} drawerLeft="260px" /> {/if}
{:else if value.customType === AutomationCustomIOType.FILTERS || value.customType === AutomationCustomIOType.TRIGGER_FILTER} {filterCount > 0 ? "Update Filter" : "No Filter set"} { tempFilters = filters }} > (tempFilters = e.detail)} /> {:else if value.customType === "cron"} onChange({ [key]: e.detail })} cronExpression={inputData[key]} /> {:else if value.customType === "automationFields"} onChange({ [key]: e.detail })} value={inputData[key]} {bindings} /> {:else if value.customType === "queryParams"} onChange({ [key]: e.detail })} value={inputData[key]} {bindings} /> {:else if value.customType === "table"} onChange({ [key]: e.detail })} disabled={value.readonly} /> {:else if value.customType === "webhookUrl"} {:else if value.customType === "fields"} onChange({ [key]: e.detail })} {bindings} {isTestModal} /> {:else if value.customType === "triggerSchema"} onChange({ [key]: e.detail })} value={inputData[key]} /> {:else if value.customType === "code"} { // Push any pending changes when the window closes onChange({ [key]: inputData[key] }) }} >
{ // need to pass without the value inside inputData[key] = e.detail }} completions={stepCompletions} mode={codeMode} autocompleteEnabled={codeMode !== EditorModes.JS} bind:getCaretPosition bind:insertAtPos placeholder={codeMode === EditorModes.Handlebars ? "Add bindings by typing {{" : null} />
{#if editingJs}
bindingsHelpers.onSelectBinding( inputData[key], binding, { js: true, dontDecode: true, type: BindingType.RUNTIME, } )} mode="javascript" />
{/if}
{:else if value.customType === "loopOption"}