0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 12:22:54 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-mapper-pair.js.es6
Angus McLeod 2046648862 various
2020-04-01 21:58:30 +11:00

15 Zeilen
Kein EOL
563 B
JavaScript

import { connectorContent } from '../lib/mapper';
import { gt, or, alias } from "@ember/object/computed";
import { computed, observes } from "@ember/object";
export default Ember.Component.extend({
classNameBindings: [':mapper-pair', 'hasConnector::no-connector'],
firstPair: gt('pair.index', 0),
showRemove: alias('firstPair'),
showJoin: computed('pair.pairCount', function() {
return this.pair.index < (this.pair.pairCount - 1);
}),
connectors: computed(function() {
return connectorContent('pair', this.inputType, this.options);
})
});