Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
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;
*/
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
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')}`
options.forEach((optionOrGroup) => {
if (isGroup(optionOrGroup)) {
flatOptions = flatOptions.concat(optionOrGroup.options);
} else {
flatOptions.push(optionOrGroup);
}
});
function normalizeOption(option) {
if (isString(option)) {
return normalizeStringOption(option);
} else if (isGroup(option)) {
let { title, options } = option;
return {
title,
options: options.map((option) => {
return isString(option) ? normalizeStringOption(option) : option;
}),
};
}
return option;
}
ariaDescribedBy: computed('error', 'helpText', function() {
let { error, helpText, id } = this.getProperties('error', 'helpText', 'id');
let describedBy = [];
if (error) {
describedBy.push(errorId(id));
}
if (helpText) {
describedBy.push(helpTextId(id));
}
return describedBy.length ? describedBy.join(' ') : undefined;
}).readOnly(),
describedBy: computed('error', 'helpText', function() {
let { error, helpText, _id: id } = this.getProperties(
'error',
'helpText',
'_id'
);
let describedBy = [];
if (helpText) {
describedBy.push(helpTextId(id));
}
if (error) {
describedBy.push(errorId(id));
}
return describedBy.length ? describedBy.join(' ') : undefined;
}).readOnly(),
describedBy: computed('error', 'helpText', function() {
let { error, helpText, _id: id } = this.getProperties(
'error',
'helpText',
'_id'
);
let describedBy = [];
if (helpText) {
describedBy.push(helpTextId(id));
}
if (error) {
describedBy.push(errorId(id));
}
return describedBy.length ? describedBy.join(' ') : undefined;
}).readOnly(),
ariaDescribedBy: computed('error', 'helpText', function() {
let { error, helpText, id } = this.getProperties('error', 'helpText', 'id');
let describedBy = [];
if (error) {
describedBy.push(errorId(id));
}
if (helpText) {
describedBy.push(helpTextId(id));
}
return describedBy.length ? describedBy.join(' ') : undefined;
}).readOnly(),
import Component from '@ember/component';
import { computed, get } from '@ember/object';
import layout from '../../templates/components/polaris-resource-list/filter-control';
import { context } from '@smile-io/ember-polaris/components/polaris-resource-list';
import { FilterType } from '@smile-io/ember-polaris/components/polaris-resource-list/filter-control/filter-value-selector';
export default Component.extend(context.ConsumerMixin, {
tagName: '',
layout,
/**
* @property searchValue
* @type {String}
* @default null
* @public
*/
searchValue: null,
/**
* @property appliedFilters
* @type {Object[]}
* @default null