wizard-custom-field.js.es6 783 B

123456789101112131415161718192021
  1. import { default as computed } from 'ember-addons/ember-computed-decorators';
  2. export default Ember.Component.extend({
  3. classNames: 'wizard-custom-field',
  4. isDropdown: Ember.computed.equal('field.type', 'dropdown'),
  5. disableId: Ember.computed.not('field.isNew'),
  6. choicesTypes: ['translation', 'preset', 'custom'],
  7. choicesTranslation: Ember.computed.equal('field.choices_type', 'translation'),
  8. choicesPreset: Ember.computed.equal('field.choices_type', 'preset'),
  9. choicesCustom: Ember.computed.equal('field.choices_type', 'custom'),
  10. @computed('field.type')
  11. isInput: (type) => type === 'text' || type === 'textarea',
  12. @computed()
  13. presetChoices() {
  14. return [
  15. { id: 'categories', name: I18n.t('admin.wizard.field.choices_preset.categories') }
  16. ];
  17. },
  18. });