UNPKG

ngx-tree-select

Version:

Angular component for select with tree items.

88 lines 2.73 kB
import { ExpandMode } from './expand-mode'; var SelectOption = /** @class */ (function () { function SelectOption() { this.idProperty = 'id'; this.textProperty = 'text'; this.childProperty = null; this.allowMultiple = false; this.closeOnSelection = true; this.items = []; this.isOpen = false; this.filter = ''; this.filterCaseSensitive = false; this.allowParentSelection = false; this.restructureWhenChildSameName = false; this.expandMode = ExpandMode.None; } /** * @return {?} */ SelectOption.prototype.isHierarchy = function () { return this.childProperty && this.childProperty.trim().length > 0; }; Object.defineProperty(SelectOption.prototype, "filterExpandMode", { /** * @return {?} */ get: function () { if (this.filter !== '') { return ExpandMode.All; } else { return this.expandMode; } }, enumerable: true, configurable: true }); /** * @return {?} */ SelectOption.prototype.displayCheckbox = function () { return this.allowMultiple && this.isHierarchy(); }; /** * @return {?} */ SelectOption.prototype.isValid = function () { // Check id property value return this.idProperty && this.idProperty.trim().length > 0 && // Check text property value this.textProperty && this.textProperty.trim().length > 0 && // Check items value this.items && Array.isArray(this.items) && this.items.length > 0; }; return SelectOption; }()); export { SelectOption }; function SelectOption_tsickle_Closure_declarations() { /** @type {?} */ SelectOption.prototype.idProperty; /** @type {?} */ SelectOption.prototype.textProperty; /** @type {?} */ SelectOption.prototype.childProperty; /** @type {?} */ SelectOption.prototype.allowMultiple; /** @type {?} */ SelectOption.prototype.closeOnSelection; /** @type {?} */ SelectOption.prototype.items; /** @type {?} */ SelectOption.prototype.model; /** @type {?} */ SelectOption.prototype.isOpen; /** @type {?} */ SelectOption.prototype.filter; /** @type {?} */ SelectOption.prototype.filterCaseSensitive; /** @type {?} */ SelectOption.prototype.allowParentSelection; /** @type {?} */ SelectOption.prototype.restructureWhenChildSameName; /** @type {?} */ SelectOption.prototype.maxVisibleItemCount; /** @type {?} */ SelectOption.prototype.expandMode; } //# sourceMappingURL=select-option.js.map