0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-23 09:50:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-mapper-input.hbs
2023-09-14 14:18:47 +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 this.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 this.input}}>
{{d-icon "times"}}
</a>