0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-27 03:20:27 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-mapper-pair.js.es6

12 Zeilen
591 B
Text

2020-04-02 07:21:57 +02:00
import { connectorContent } from '../lib/wizard-mapper';
2020-04-01 07:03:26 +02:00
import { gt, or, alias } from "@ember/object/computed";
import { computed, observes } from "@ember/object";
2020-04-05 03:37:09 +02:00
import Component from "@ember/component";
2020-04-01 07:03:26 +02:00
2020-04-05 03:37:09 +02:00
export default Component.extend({
2020-04-01 07:03:26 +02:00
classNameBindings: [':mapper-pair', 'hasConnector::no-connector'],
firstPair: gt('pair.index', 0),
showRemove: alias('firstPair'),
2020-04-05 03:37:09 +02:00
showJoin: computed('pair.pairCount', function() { return this.pair.index < (this.pair.pairCount - 1) }),
connectors: computed(function() { return connectorContent('pair', this.inputType, this.options) })
2020-04-01 07:03:26 +02:00
});