{#if schema} {#key query._id} {#if schema.type === QueryTypes.SQL} {:else if shouldDisplayJsonBox} {:else if schema.type === QueryTypes.FIELDS} {#if schema.urlDisplay}
{/if} {:else if query.fields.extra?.actionType === "pipeline"}
{#if !query.fields.steps?.length}

{:else} {#each query.fields.steps ?? [] as step, index}
Stage {index + 1}
{#if index > 0} { updateEditorsOnSwap(index, index - 1) const target = query.fields.steps[index - 1].key query.fields.steps[index - 1].key = query.fields.steps[index].key query.fields.steps[index].key = target }} icon="ChevronUp" /> {/if} {#if index < query.fields.steps.length - 1} { updateEditorsOnSwap(index, index + 1) const target = query.fields.steps[index + 1].key query.fields.steps[index + 1].key = query.fields.steps[index].key query.fields.steps[index].key = target }} icon="ChevronDown" /> {/if}
{ updateEditorsOnDelete(index) query.fields.steps.splice(index, 1) query.fields.steps = [...query.fields.steps] }} icon="DeleteOutline" />