0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2025-02-01 10:57:03 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-mapper-input.hbs

55 Zeilen
1,2 KiB
Handlebars

2020-04-05 11:37:09 +10:00
{{wizard-mapper-connector
connector=input.type
connectors=inputTypes
2020-04-15 15:22:21 +10:00
inputTypes=true
inputType=inputType
connectorType="type"
2020-04-20 19:41:13 +10:00
options=options
onUpdate=onUpdate}}
2020-03-22 04:30:11 +11:00
2020-03-23 16:41:04 +11:00
{{#if hasPairs}}
2020-04-01 16:03:26 +11:00
<div class="mapper-pairs mapper-block">
2020-03-23 16:41:04 +11:00
{{#each input.pairs as |pair|}}
2020-04-01 16:03:26 +11:00
{{wizard-mapper-pair
2020-03-23 16:41:04 +11:00
pair=pair
last=pair.last
2020-03-24 20:35:46 +11:00
inputType=inputType
2020-03-23 16:41:04 +11:00
options=options
2021-04-12 19:49:53 +05:30
removePair=(action "removePair")
2020-04-20 19:41:13 +10:00
onUpdate=onUpdate}}
2020-03-23 16:41:04 +11:00
{{/each}}
2021-04-12 19:49:53 +05:30
2020-04-07 17:54:30 +10:00
{{#if canAddPair}}
2021-04-12 19:49:53 +05:30
<a role="button" {{action "addPair"}} class="add-pair">
{{d-icon "plus"}}
2020-03-24 20:35:46 +11:00
</a>
2020-03-23 16:41:04 +11:00
{{/if}}
</div>
2020-03-24 20:35:46 +11:00
{{/if}}
2018-05-24 15:34:58 +10:00
2020-04-01 16:03:26 +11:00
{{#if hasOutput}}
{{#if hasPairs}}
2020-04-02 16:21:57 +11:00
{{wizard-mapper-connector
2020-04-06 18:36:38 +10:00
connector=input.output_connector
2020-04-15 15:22:21 +10:00
connectors=connectors
connectorType="output"
inputType=inputType
2020-04-20 19:41:13 +10:00
options=options
onUpdate=onUpdate}}
2020-03-24 20:35:46 +11:00
{{/if}}
2020-03-22 04:30:11 +11:00
2020-04-01 16:03:26 +11:00
<div class="output mapper-block">
{{wizard-mapper-selector
2021-04-12 19:49:53 +05:30
selectorType="output"
2020-04-06 11:54:16 +10:00
inputType=input.type
2020-03-22 04:30:11 +11:00
value=input.output
activeType=input.output_type
2020-04-20 19:41:13 +10:00
options=options
onUpdate=onUpdate}}
2020-03-22 04:30:11 +11:00
</div>
{{/if}}
2021-04-12 19:49:53 +05:30
<a role="button" class="remove-input" {{action remove input}}>
{{d-icon "times"}}
2020-03-24 20:35:46 +11:00
</a>