How to use the @smile-io/ember-polaris/utils/id.computedIdVariation function in @smile-io/ember-polaris

To help you get started, we’ve selected a few @smile-io/ember-polaris 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 smile-io / ember-polaris / addon / components / polaris-resource-list.js View on Github external
*/
    previousLoading: false,

    /**
     * Internal property used to recreate React implementation's
     * `componentWillReceiveProps` behaviour.
     *
     * @property previousSelectedItems
     * @type {String|String[]}
     * @private
     */
    previousSelectedItems: null,

    itemsExist: gt('items.length', 0).readOnly(),

    selectId: computedIdVariation('id', 'Select').readOnly(),

    /**
     * ID used to identify our wrapper element from other instances
     */
    wrapperId: computed(function() {
      return guidFor(this);
    }).readOnly(),

    /**
     * List of item/id tuples needed for rendering items
     */
    itemsWithId: computed('items.[]', 'idForItem', function() {
      let { items, idForItem } = this.getProperties('items', 'idForItem');
      items = items || [];
      idForItem = idForItem || defaultIdForItem;
github smile-io / ember-polaris / addon / components / polaris-sticky.js View on Github external
*/
  style: null,

  /**
   * @property placeHolderNodeId
   * @type {String}
   * @private
   */
  placeHolderNodeId: computedIdVariation('elementId', 'PlaceHolder').readOnly(),

  /**
   * @property stickyNodeId
   * @type {String}
   * @private
   */
  stickyNodeId: computedIdVariation('elementId', 'Sticky').readOnly(),

  /**
   * @property placeHolderNode
   * @type {HTMLElement}
   * @private
   */
  placeHolderNode: computed(function() {
    return this.get('element').querySelector(
      `#${this.get('placeHolderNodeId')}`
    );
  }),

  /**
   * @property stickyNode
   * @type {HTMLElement}
   * @private
github smile-io / ember-polaris / addon / components / polaris-sticky.js View on Github external
isSticky: false,

  /**
   * @property style
   * @type {String}
   * @default null
   * @private
   */
  style: null,

  /**
   * @property placeHolderNodeId
   * @type {String}
   * @private
   */
  placeHolderNodeId: computedIdVariation('elementId', 'PlaceHolder').readOnly(),

  /**
   * @property stickyNodeId
   * @type {String}
   * @private
   */
  stickyNodeId: computedIdVariation('elementId', 'Sticky').readOnly(),

  /**
   * @property placeHolderNode
   * @type {HTMLElement}
   * @private
   */
  placeHolderNode: computed(function() {
    return this.get('element').querySelector(
      `#${this.get('placeHolderNodeId')}`