How to use the ember-bootstrap/utils/cp/overrideable function in ember-bootstrap

To help you get started, we’ve selected a few ember-bootstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kaliber5 / ember-bootstrap / addon / components / base / bs-nav / item.js View on Github external
})
  disabled;

  _disabled = false;

  /**
   * Render the nav item as active.
   * By default it will look at any nested `link-to` components and make itself active if there is an active link
   * (i.e. the link points to the current route).
   * See the [link-to API](http://emberjs.com/api/classes/Ember.Templates.helpers.html#toc_handling-current-route)
   *
   * @property active
   * @type boolean
   * @public
   */
  @overrideableCP('_active', function() {
    return this.get('_active');
  })
  active;

  _active = false;

  /**
   * Collection of all `Ember.LinkComponent`s that are children
   *
   * @property childLinks
   * @private
   */
  @filter('children', function(view) {
    return view instanceof LinkComponent;
  })
  childLinks;
github kaliber5 / ember-bootstrap / addon / components / base / bs-carousel / slide.js View on Github external
@namespace Components
  @extends Ember.Component
  @public
 */
export default Component.extend(ComponentChild, {
  classNameBindings: ['active'],
  layout,

  /**
   * Defines slide visibility.
   *
   * @property active
   * @type boolean
   * @private
   */
  active: overrideableCP('isCurrentSlide', 'presentationState', function() {
    return this.get('isCurrentSlide') && this.get('presentationState') === null;
  }),

  /**
   * @private
   * @property isCurrentSlide
   * @type boolean
   */
  isCurrentSlide: computed('currentSlide', function() {
    return this.get('currentSlide') === this;
  }).readOnly(),

  /**
   * @private
   * @property isFollowingSlide
   * @type boolean
github kaliber5 / ember-bootstrap / addon / components / base / bs-nav / item.js View on Github external
@public
 */
@templateLayout(layout)
@classNameBindings('disabled', 'active')
@tagName('li')
export default class NavItem extends Component.extend(ComponentParent) {
  /**
   * Render the nav item as disabled (see [Bootstrap docs](http://getbootstrap.com/components/#nav-disabled-links)).
   * By default it will look at any nested `link-to` components and make itself disabled if there is a disabled link.
   * See the [link-to API](http://emberjs.com/api/classes/Ember.Templates.helpers.html#toc_disabling-the-code-link-to-code-component)
   *
   * @property disabled
   * @type boolean
   * @public
   */
  @overrideableCP('_disabled', function() {
    return this.get('_disabled');
  })
  disabled;

  _disabled = false;

  /**
   * Render the nav item as active.
   * By default it will look at any nested `link-to` components and make itself active if there is an active link
   * (i.e. the link points to the current route).
   * See the [link-to API](http://emberjs.com/api/classes/Ember.Templates.helpers.html#toc_handling-current-route)
   *
   * @property active
   * @type boolean
   * @public
   */