{#if !noPreview}
{ opened = e.detail }} on:reorder={(e) => { schema.order = e.detail schema = schema dispatch('change', schema) }} on:change={() => { schema = schema dispatch('change', schema) }} {lightweightMode} prettifyHeader={isAppInput} />
{/if} {#if jsonEnabled}
{ schemaString = JSON.stringify(schema, null, '\t') editor?.setCode(schemaString) }} />
{/if} {#if !jsonView}
{#if keys.length > 0} {#each keys as argName, i (argName)}
{ if (opened === argName) { opened = undefined } else { opened = argName } }} >
{argName} {#if !uiOnly}
{/if}
{#if schema.required?.includes(argName)} Required {/if} {#if !uiOnly} {/if}
{#if opened === argName}
{#if !schemaSkippedValues.includes(argName) && Object.keys(schema?.properties ?? {}).includes(argName)} {#if typeof args == 'object' && schema?.properties[argName]} { schema = schema // console.log('schema', schema) dispatch('change', schema) }} > {#if isFlowInput || isAppInput} {/if} {#if isFlowInput || isAppInput} { if (event.detail.required) { schema.required = schema.required ?? [] schema.required.push(argName) } else { schema.required = schema.required?.filter((x) => x !== argName) } dispatch('change', schema) }} on:schemaChange={(e) => { schema = schema dispatch('change', schema) }} /> {/if} {/if} {/if}
{/if}
{/each} {:else if !shouldHideNoInputs}
No inputs
{/if}
{:else}
{ try { schema = JSON.parse(schemaString) dispatch('change', schema) error = '' } catch (err) { error = err.message } }} bind:code={schemaString} lang="json" autoHeight automaticLayout />
{#if !emptyString(error)}
{error}
{:else}

{/if}
{/if} {#if !noVariablePicker} { if (pickForField) { args[pickForField] = '$var:' + path } }} itemName="Variable" tooltip="Variables are dynamic values that have a key associated to them and can be retrieved during the execution of a Script or Flow." documentationLink="https://www.windmill.dev/docs/core_concepts/variables_and_secrets" extraField="path" loadItems={async () => (await VariableService.listVariable({ workspace: $workspaceStore ?? '' })).map((x) => ({ name: x.path, ...x }))} >
{/if}