{"version":3,"sources":["../../node_modules/tslib/tslib.es6.js","../../src/app/components/listbox/listbox.ts"],"names":["Object","create","__values","o","s","Symbol","iterator","m","i","call","length","next","value","done","TypeError","__read","n","r","e","ar","push","error","__spread","arguments","concat","LISTBOX_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","Listbox","multi","el","cd","filterService","this","checkbox","filter","filterMatchMode","metaKeySelection","showToggleAll","onChange","EventEmitter","onClick","onDblClick","onModelChange","onModelTouched","defineProperty","prototype","_options","val","_filterValue","filterOptions","ngAfterContentInit","_this","templates","forEach","item","getType","itemTemplate","template","headerTemplate","footerTemplate","getOptionLabel","option","optionLabel","ObjectUtils","resolveFieldData","undefined","label","getOptionValue","optionValue","isOptionDisabled","optionDisabled","disabled","writeValue","markForCheck","registerOnChange","fn","registerOnTouched","setDisabledState","onOptionClick","event","readonly","multiple","onOptionClickCheckbox","onOptionClickMultiple","onOptionClickSingle","emit","originalEvent","optionTouched","onOptionTouchEnd","onOptionDoubleClick","selected","isSelected","valueChanged","metaKey","ctrlKey","removeOption","equals","dataKey","_b","_c","optionsToRender","selectedDisabledItemsLength","unselectedDisabledItemsLength","selectedEnabledItemsLength","optionsToRender_1","optionsToRender_1_1","_filteredOptions","options","hasFilter","trim","onFilter","target","filters","filterLocale","optionsToRender_2","optionsToRender_2_1","toggleAll","toggleAllDisabled","allChecked","uncheckAll","checkAll","preventDefault","opt","onOptionKeyDown","currentTarget","which","nextItem","findNextItem","focus","prevItem","findPrevItem","nextElementSibling","DomHandler","hasClass","isHidden","previousElementSibling","onHeaderCheckboxFocus","headerCheckboxFocus","onHeaderCheckboxBlur","Component","args","selector","providers","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","ElementRef","ChangeDetectorRef","FilterService","Input","Output","ViewChild","ContentChild","Header","Footer","ContentChildren","PrimeTemplate","NgModule","imports","CommonModule","SharedModule","RippleModule","exports","declarations"],"mappings":";;;;;;;;;;;;;;oFAyG6B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EAAAkB,UAAA6F,qBAAA,WACI1G,KAAKyG,qBAAsB,4BAzhBlCE,EAAAA,UAASC,KAAA,CAAC,CACPC,SAAU,YACVpF,SAAU,+pGAyCVqF,UAAW,CAACxH,GACZyH,gBAAiBC,EAAAA,wBAAwBC,OACzCC,cAAeC,EAAAA,kBAAkBC,0fA3DPC,EAAAA,kBAA6HC,EAAAA,yBAErGC,EAAAA,mDA8DjDC,EAAAA,qBAEAA,EAAAA,0BAEAA,EAAAA,yBAEAA,EAAAA,8BAEAA,EAAAA,wBAEAA,EAAAA,wBAEAA,EAAAA,wBAEAA,EAAAA,sBAEAA,EAAAA,+BAEAA,EAAAA,4BAEAA,EAAAA,gCAEAA,EAAAA,uBAEAA,EAAAA,6BAEAA,EAAAA,2BAEAA,EAAAA,2BAEAA,EAAAA,8BAEAA,EAAAA,+BAEAA,EAAAA,iCAEAA,EAAAA,wBAEAC,EAAAA,wBAEAA,EAAAA,2BAEAA,EAAAA,wCAEAC,EAAAA,UAASd,KAAA,CAAC,qCAEVe,EAAAA,aAAYf,KAAA,CAACgB,EAAAA,6BAEbD,EAAAA,aAAYf,KAAA,CAACiB,EAAAA,2BAEbC,EAAAA,gBAAelB,KAAA,CAACmB,EAAAA,gCA8BhBP,EAAAA,2BAQAA,EAAAA,eAwZL,iCALCQ,EAAAA,SAAQpB,KAAA,CAAC,CACNqB,QAAS,CAACC,EAAAA,aAAcC,EAAAA,aAAcC,EAAAA,cACtCC,QAAS,CAAC1I,EAASwI,EAAAA,cACnBG,aAAc,CAAC3I","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { NgModule, Component, ElementRef, Input, Output, EventEmitter, AfterContentInit, ContentChildren, ContentChild, QueryList, TemplateRef,forwardRef, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SharedModule, PrimeTemplate, Footer, Header, FilterService } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { ObjectUtils } from 'primeng/utils';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { RippleModule } from 'primeng/ripple'; \n\nexport const LISTBOX_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Listbox),\n multi: true\n};\n\n@Component({\n selector: 'p-listbox',\n template: `\n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n \n
\n
\n `,\n providers: [LISTBOX_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./listbox.css']\n})\nexport class Listbox implements AfterContentInit, ControlValueAccessor {\n\n @Input() multiple: boolean;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() listStyle: any;\n\n @Input() listStyleClass: string;\n\n @Input() readonly: boolean;\n\n @Input() disabled: boolean;\n\n @Input() checkbox: boolean = false;\n\n @Input() filter: boolean = false;\n\n @Input() filterMatchMode: string = 'contains';\n\n @Input() filterLocale: string;\n\n @Input() metaKeySelection: boolean = true;\n\n @Input() dataKey: string;\n\n @Input() showToggleAll: boolean = true;\n\n @Input() optionLabel: string;\n\n @Input() optionValue: string;\n\n @Input() optionDisabled: string;\n\n @Input() ariaFilterLabel: string;\n\n @Input() filterPlaceHolder: string;\n\n @Output() onChange: EventEmitter = new EventEmitter();\n\n @Output() onClick: EventEmitter = new EventEmitter();\n\n @Output() onDblClick: EventEmitter = new EventEmitter();\n\n @ViewChild('headerchkbox') headerCheckboxViewChild: ElementRef;\n\n @ContentChild(Header) headerFacet;\n\n @ContentChild(Footer) footerFacet;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n public _options: any[];\n\n public itemTemplate: TemplateRef;\n\n public headerTemplate: TemplateRef;\n\n public footerTemplate: TemplateRef;\n\n public _filterValue: string;\n\n public _filteredOptions: any[];\n\n public filtered: boolean;\n\n public value: any;\n\n public onModelChange: Function = () => { };\n\n public onModelTouched: Function = () => { };\n\n public optionTouched: boolean;\n\n public focus: boolean;\n\n public headerCheckboxFocus: boolean;\n\n constructor(public el: ElementRef, public cd: ChangeDetectorRef, public filterService: FilterService) { }\n\n @Input() get options(): any[] {\n return this._options;\n }\n\n set options(val: any[]) {\n this._options = val;\n }\n\n @Input() get filterValue(): string {\n return this._filterValue;\n }\n\n set filterValue(val: string) {\n this._filterValue = val;\n this.filterOptions();\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'item':\n this.itemTemplate = item.template;\n break;\n\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n default:\n this.itemTemplate = item.template;\n break;\n }\n });\n }\n\n getOptionLabel(option: any) {\n return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : (option.label != undefined ? option.label : option);\n }\n\n getOptionValue(option: any) {\n return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : (option.value !== undefined ? option.value : option);\n }\n\n isOptionDisabled(option: any) {\n return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : (option.disabled !== undefined ? option.disabled : false);\n }\n\n writeValue(value: any): void {\n this.value = value;\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean): void {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n onOptionClick(event: Event, option: any) {\n if (this.disabled || this.isOptionDisabled(option) || this.readonly) {\n return;\n }\n\n if (this.multiple) {\n if (this.checkbox)\n this.onOptionClickCheckbox(event, option);\n else\n this.onOptionClickMultiple(event, option);\n }\n else {\n this.onOptionClickSingle(event, option);\n }\n this.onClick.emit({\n originalEvent: event,\n option: option,\n value: this.value\n });\n this.optionTouched = false;\n }\n\n onOptionTouchEnd(option: any) {\n if (this.disabled || this.isOptionDisabled(option) || this.readonly) {\n return;\n }\n\n this.optionTouched = true;\n }\n\n onOptionDoubleClick(event: Event, option: any): any {\n if (this.disabled || this.isOptionDisabled(option) || this.readonly) {\n return;\n }\n\n this.onDblClick.emit({\n originalEvent: event,\n option: option,\n value: this.value\n })\n }\n\n onOptionClickSingle(event, option) {\n let selected = this.isSelected(option);\n let valueChanged = false;\n let metaSelection = this.optionTouched ? false : this.metaKeySelection;\n\n if (metaSelection) {\n let metaKey = (event.metaKey || event.ctrlKey);\n\n if (selected) {\n if (metaKey) {\n this.value = null;\n valueChanged = true;\n }\n }\n else {\n this.value = this.getOptionValue(option);\n valueChanged = true;\n }\n }\n else {\n this.value = selected ? null : this.getOptionValue(option);\n valueChanged = true;\n }\n\n if (valueChanged) {\n this.onModelChange(this.value);\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n }\n }\n\n onOptionClickMultiple(event, option) {\n let selected = this.isSelected(option);\n let valueChanged = false;\n let metaSelection = this.optionTouched ? false : this.metaKeySelection;\n\n if (metaSelection) {\n let metaKey = (event.metaKey || event.ctrlKey);\n\n if (selected) {\n if (metaKey) {\n this.removeOption(option);\n }\n else {\n this.value = [this.getOptionValue(option)];\n }\n valueChanged = true;\n }\n else {\n this.value = (metaKey) ? this.value || [] : [];\n this.value = [...this.value, this.getOptionValue(option)];\n valueChanged = true;\n }\n }\n else {\n if (selected) {\n this.removeOption(option);\n }\n else {\n this.value = [...this.value || [], this.getOptionValue(option)];\n }\n\n valueChanged = true;\n }\n\n if (valueChanged) {\n this.onModelChange(this.value);\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n }\n }\n\n onOptionClickCheckbox(event, option) {\n if (this.disabled || this.readonly) {\n return;\n }\n\n let selected = this.isSelected(option);\n\n if (selected) {\n this.removeOption(option);\n }\n else {\n this.value = this.value ? this.value : [];\n this.value = [...this.value, this.getOptionValue(option)];\n }\n\n this.onModelChange(this.value);\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n }\n\n removeOption(option: any): void {\n this.value = this.value.filter(val => !ObjectUtils.equals(val, this.getOptionValue(option), this.dataKey));\n }\n\n isSelected(option: any) {\n let selected = false;\n let optionValue = this.getOptionValue(option);\n\n if (this.multiple) {\n if (this.value) {\n for (let val of this.value) {\n if (ObjectUtils.equals(val, optionValue, this.dataKey)) {\n selected = true;\n break;\n }\n }\n }\n }\n else {\n selected = ObjectUtils.equals(this.value, optionValue, this.dataKey);\n }\n\n return selected;\n }\n\n get allChecked(): boolean {\n let optionsToRender = this.optionsToRender;\n if (!optionsToRender || optionsToRender.length === 0) {\n return false;\n }\n else {\n let selectedDisabledItemsLength = 0;\n let unselectedDisabledItemsLength = 0;\n let selectedEnabledItemsLength = 0;\n\n for (let option of optionsToRender) {\n let disabled = this.isOptionDisabled(option);\n let selected = this.isSelected(option);\n\n if (disabled) {\n if (selected)\n selectedDisabledItemsLength++;\n else \n unselectedDisabledItemsLength++;\n }\n else {\n if (selected)\n selectedEnabledItemsLength++;\n else\n return false;\n }\n }\n\n return (optionsToRender.length === selectedDisabledItemsLength \n || optionsToRender.length === selectedEnabledItemsLength \n || selectedEnabledItemsLength && optionsToRender.length === (selectedEnabledItemsLength + unselectedDisabledItemsLength + selectedDisabledItemsLength));\n }\n }\n\n get optionsToRender(): any[] {\n return this._filteredOptions || this.options;\n }\n\n hasFilter() {\n return this._filterValue && this._filterValue.trim().length > 0; \n }\n\n onFilter(event: KeyboardEvent) {\n this._filterValue = ( event.target).value;\n this.filterOptions();\n }\n\n filterOptions() {\n if (this.hasFilter() && this._options)\n this._filteredOptions = this._options.filter(option => this.filterService.filters[this.filterMatchMode](this.getOptionLabel(option), this._filterValue, this.filterLocale));\n else\n this._filteredOptions = null;\n }\n\n get toggleAllDisabled(): boolean {\n let optionsToRender = this.optionsToRender;\n if (!optionsToRender || optionsToRender.length === 0) {\n return true;\n }\n else {\n for (let option of optionsToRender) {\n if (!this.isOptionDisabled(option))\n return false;\n }\n\n return true;\n }\n }\n\n toggleAll(event) {\n if (this.disabled || this.toggleAllDisabled || this.readonly) {\n return;\n }\n \n let allChecked = this.allChecked; \n\n if (allChecked)\n this.uncheckAll();\n else\n this.checkAll();\n\n this.onModelChange(this.value);\n this.onChange.emit({ originalEvent: event, value: this.value });\n event.preventDefault();\n }\n\n checkAll() {\n let optionsToRender = this.optionsToRender;\n let val: any[] = [];\n\n optionsToRender.forEach(opt => {\n let optionDisabled = this.isOptionDisabled(opt); \n if (!optionDisabled || (optionDisabled && this.isSelected(opt))) {\n val.push(this.getOptionValue(opt));\n }\n });\n\n this.value = val;\n }\n\n uncheckAll() {\n let optionsToRender = this.optionsToRender;\n let val: any[] = [];\n\n optionsToRender.forEach(opt => {\n let optionDisabled = this.isOptionDisabled(opt); \n if (optionDisabled && this.isSelected(opt)) {\n val.push(this.getOptionValue(opt));\n }\n });\n\n this.value = val;\n }\n\n onOptionKeyDown(event:KeyboardEvent, option) {\n if (this.readonly) {\n return;\n }\n\n let item = event.currentTarget;\n\n switch(event.which) {\n //down\n case 40:\n var nextItem = this.findNextItem(item);\n if (nextItem) {\n nextItem.focus();\n }\n\n event.preventDefault();\n break;\n\n //up\n case 38:\n var prevItem = this.findPrevItem(item);\n if (prevItem) {\n prevItem.focus();\n }\n\n event.preventDefault();\n break;\n\n //enter\n case 13:\n this.onOptionClick(event, option);\n event.preventDefault();\n break;\n }\n }\n\n findNextItem(item) {\n let nextItem = item.nextElementSibling;\n\n if (nextItem)\n return DomHandler.hasClass(nextItem, 'p-disabled') || DomHandler.isHidden(nextItem) ? this.findNextItem(nextItem) : nextItem;\n else\n return null;\n }\n\n findPrevItem(item) {\n let prevItem = item.previousElementSibling;\n\n if (prevItem)\n return DomHandler.hasClass(prevItem, 'p-disabled') || DomHandler.isHidden(prevItem) ? this.findPrevItem(prevItem) : prevItem;\n else\n return null;\n }\n\n onHeaderCheckboxFocus() {\n this.headerCheckboxFocus = true;\n }\n\n onHeaderCheckboxBlur() {\n this.headerCheckboxFocus = false;\n }\n}\n\n@NgModule({\n imports: [CommonModule, SharedModule, RippleModule],\n exports: [Listbox, SharedModule],\n declarations: [Listbox]\n})\nexport class ListboxModule { }\n\n"]}