1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/templates/components/wizard-mapper-input.hbs
2023-09-14 14:05:55 +01:00

58 Zeilen
Kein EOL
1,3 KiB
Handlebars

{{wizard-mapper-connector
connector=this.input.type
connectors=this.inputTypes
inputTypes=true
inputType=this.inputType
connectorType="type"
options=this.options
onUpdate=this.onUpdate
}}
{{#if hasPairs}}
<div class="mapper-pairs mapper-block">
{{#each input.pairs as |pair|}}
{{wizard-mapper-pair
pair=pair
last=pair.last
inputType=this.inputType
options=this.options
removePair=(action "removePair")
onUpdate=this.onUpdate
}}
{{/each}}
{{#if canAddPair}}
<a role="button" {{action "addPair"}} class="add-pair">
{{d-icon "plus"}}
</a>
{{/if}}
</div>
{{/if}}
{{#if hasOutput}}
{{#if hasPairs}}
{{wizard-mapper-connector
connector=this.input.output_connector
connectors=this.connectors
connectorType="output"
inputType=this.inputType
options=this.options
onUpdate=this.onUpdate
}}
{{/if}}
<div class="output mapper-block">
{{wizard-mapper-selector
selectorType="output"
inputType=this.input.type
value=this.input.output
activeType=this.input.output_type
options=this.options
onUpdate=this.onUpdate
}}
</div>
{{/if}}
<a role="button" class="remove-input" {{action remove input}}>
{{d-icon "times"}}
</a>