Files
flights_web_raw/apps/angular/node_modules/primeng/bundles/primeng-dropdown.umd.min.js
T

16 lines
29 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/scrolling"),require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/api"),require("primeng/dom"),require("primeng/utils"),require("@angular/forms"),require("primeng/tooltip"),require("primeng/ripple")):"function"==typeof define&&define.amd?define("primeng/dropdown",["exports","@angular/cdk/scrolling","@angular/core","@angular/animations","@angular/common","primeng/api","primeng/dom","primeng/utils","@angular/forms","primeng/tooltip","primeng/ripple"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.dropdown={}),e.ng.cdk.scrolling,e.ng.core,e.ng.animations,e.ng.common,e.primeng.api,e.primeng.dom,e.primeng.utils,e.ng.forms,e.primeng.tooltip,e.primeng.ripple)}(this,(function(e,t,i,n,o,l,s,r,p,a,d){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */Object.create;function h(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c={provide:p.NG_VALUE_ACCESSOR,useExisting:i.forwardRef((function(){return y})),multi:!0},u=function(){function e(){this.onClick=new i.EventEmitter}return e.prototype.onOptionClick=function(e){this.onClick.emit({originalEvent:e,option:this.option})},e}();u.decorators=[{type:i.Component,args:[{selector:"p-dropdownItem",template:'\n <li (click)="onOptionClick($event)" role="option" pRipple\n [attr.aria-label]="option.label" [attr.aria-selected]="selected"\n [ngStyle]="{\'height\': itemSize + \'px\'}"\n [ngClass]="{\'p-dropdown-item\':true, \'p-highlight\': selected, \'p-disabled\':(option.disabled)}">\n <span *ngIf="!template">{{option.label||\'empty\'}}</span>\n <ng-container *ngTemplateOutlet="template; context: {$implicit: option}"></ng-container>\n </li>\n '}]}],u.propDecorators={option:[{type:i.Input}],selected:[{type:i.Input}],disabled:[{type:i.Input}],visible:[{type:i.Input}],itemSize:[{type:i.Input}],template:[{type:i.Input}],onClick:[{type:i.Output}]};var y=function(){function e(e,t,n,o){this.el=e,this.renderer=t,this.cd=n,this.zone=o,this.scrollHeight="200px",this.filterBy="label",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.autoDisplayFirst=!0,this.emptyFilterMessage="No results found",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.onChange=new i.EventEmitter,this.onFocus=new i.EventEmitter,this.onBlur=new i.EventEmitter,this.onClick=new i.EventEmitter,this.onShow=new i.EventEmitter,this.onHide=new i.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){},this.viewPortOffsetTop=0}return Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e&&(this.focused=!1),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach((function(t){switch(t.getType()){case"item":e.itemTemplate=t.template;break;case"selectedItem":e.selectedItemTemplate=t.template;break;case"group":e.groupTemplate=t.template;break;default:e.itemTemplate=t.template}}))},e.prototype.ngOnInit=function(){this.optionsToDisplay=this.options,this.updateSelectedOption(null)},Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){var t=this.optionLabel?r.ObjectUtils.generateSelectItems(e,this.optionLabel):e;this._options=t,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.optionsChanged=!0,this.updateFilledState(),this.filterValue&&this.filterValue.length&&this.activateFilter()},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.editable&&this.updateEditableLabel()},Object.defineProperty(e.prototype,"label",{get:function(){return this.selectedOption?this.selectedOption.label:null},enumerable:!1,configurable:!0}),e.prototype.updateEditableLabel=function(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.selectedOption.label:this.value||"")},e.prototype.onItemClick=function(e){var t=this,i=e.option;i.disabled||(this.selectItem(e,i),this.accessibleViewChild.nativeElement.focus()),setTimeout((function(){t.hide(e)}),150)},e.prototype.selectItem=function(e,t){var i=this;this.selectedOption!=t&&(this.selectedOption=t,this.value=t.value,this.filled=!0,this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e.originalEvent,value:this.value}),this.virtualScroll&&setTimeout((function(){i.viewPortOffsetTop=i.viewPort?i.viewPort.measureScrollOffset():0}),1))},e.prototype.ngAfterViewChecked=function(){var e=this;if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.virtualScroll&&this.updateVirtualScrollSelectedIndex(!0),this.zone.runOutsideAngular((function(){setTimeout((function(){e.alignOverlay()}),1)}))),this.selectedOptionUpdated&&this.itemsWrapper){if(this.virtualScroll&&this.viewPort){var t=this.viewPort.getRenderedRange();this.updateVirtualScrollSelectedIndex(!1),(t.start>this.virtualScrollSelectedIndex||t.end<this.virtualScrollSelectedIndex)&&this.viewPort.scrollToIndex(this.virtualScrollSelectedIndex)}s.DomHandler.findSingle(this.overlay,"li.p-highlight")&&s.DomHandler.scrollInView(this.itemsWrapper,s.DomHandler.findSingle(this.overlay,"li.p-highlight")),this.selectedOptionUpdated=!1}},e.prototype.writeValue=function(e){this.filter&&this.resetFilter(),this.value=e,this.updateSelectedOption(e),this.updateEditableLabel(),this.updateFilledState(),this.cd.markForCheck()},e.prototype.resetFilter=function(){this.filterValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options},e.prototype.updateSelectedOption=function(e){this.selectedOption=this.findOption(e,this.optionsToDisplay),this.autoDisplayFirst&&!this.placeholder&&!this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&!this.editable&&(this.selectedOption=this.optionsToDisplay[0]),this.selectedOptionUpdated=!0},e.prototype.registerOnChange=function(e){this.onModelChange=e},e.prototype.registerOnTouched=function(e){this.onModelTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e,this.cd.markForCheck()},e.prototype.onMouseclick=function(e){this.disabled||this.readonly||this.isInputClick(e)||(this.onClick.emit(e),this.accessibleViewChild.nativeElement.focus(),this.overlayVisible?this.hide(e):this.show(),this.cd.detectChanges())},e.prototype.isInputClick=function(e){return s.DomHandler.hasClass(e.target,"p-dropdown-clear-icon")||e.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&e.target.isSameNode(this.editableInputViewChild.nativeElement)},e.prototype.isOutsideClicked=function(e){return!(this.el.nativeElement.isSameNode(e.target)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},e.prototype.onEditableInputClick=function(){this.bindDocumentClickListener()},e.prototype.onEditableInputFocus=function(e){this.focused=!0,this.hide(e),this.onFocus.emit(e)},e.prototype.onEditableInputChange=function(e){this.value=e.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})},e.prototype.show=function(){this.overlayVisible=!0},e.prototype.onOverlayAnimationStart=function(e){switch(e.toState){case"visible":this.overlay=e.element;var t=this.virtualScroll?".cdk-virtual-scroll-viewport":".p-dropdown-items-wrapper";if(this.itemsWrapper=s.DomHandler.findSingle(this.overlay,t),this.appendOverlay(),this.autoZIndex&&(this.overlay.style.zIndex=String(this.baseZIndex+ ++s.DomHandler.zindex)),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.options&&this.options.length&&!this.virtualScroll){var i=s.DomHandler.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");i&&s.DomHandler.scrollInView(this.itemsWrapper,i)}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e);break;case"void":this.onOverlayHide()}},e.prototype.scrollToSelectedVirtualScrollElement=function(){this.virtualAutoScrolled||(this.viewPortOffsetTop?this.viewPort.scrollToOffset(this.viewPortOffsetTop):this.virtualScrollSelectedIndex>-1&&this.viewPort.scrollToIndex(this.virtualScrollSelectedIndex)),this.virtualAutoScrolled=!0},e.prototype.updateVirtualScrollSelectedIndex=function(e){this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&(e&&(this.viewPortOffsetTop=0),this.virtualScrollSelectedIndex=this.findOptionIndex(this.selectedOption.value,this.optionsToDisplay))},e.prototype.appendOverlay=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):s.DomHandler.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=s.DomHandler.getWidth(this.containerViewChild.nativeElement)+"px"))},e.prototype.restoreOverlayAppend=function(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)},e.prototype.hide=function(e){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.virtualScroll&&(this.virtualAutoScrolled=!1),this.cd.markForCheck(),this.onHide.emit(e)},e.prototype.alignOverlay=function(){this.overlay&&(this.appendTo?s.DomHandler.absolutePosition(this.overlay,this.containerViewChild.nativeElement):s.DomHandler.relativePosition(this.overlay,this.containerViewChild.nativeElement))},e.prototype.onInputFocus=function(e){this.focused=!0,this.onFocus.emit(e)},e.prototype.onInputBlur=function(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1},e.prototype.findPrevEnabledOption=function(e){var t;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(var i=e-1;0<=i;i--){if(!(n=this.optionsToDisplay[i]).disabled){t=n;break}}if(!t)for(i=this.optionsToDisplay.length-1;i>=e;i--){var n;if(!(n=this.optionsToDisplay[i]).disabled){t=n;break}}}return t},e.prototype.findNextEnabledOption=function(e){var t;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(var i=e+1;e<this.optionsToDisplay.length-1;i++){if(!(n=this.optionsToDisplay[i]).disabled){t=n;break}}if(!t)for(i=0;i<e;i++){var n;if(!(n=this.optionsToDisplay[i]).disabled){t=n;break}}}return t},e.prototype.onKeydown=function(e,t){if(!this.readonly&&this.optionsToDisplay&&null!==this.optionsToDisplay.length)switch(e.which){case 40:if(!this.overlayVisible&&e.altKey)this.show();else if(this.group){if(-1!==(n=this.selectedOption?this.findOptionGroupIndex(this.selectedOption.value,this.optionsToDisplay):-1)){var i=n.itemIndex+1;i<this.optionsToDisplay[n.groupIndex].items.length?(this.selectItem(e,this.optionsToDisplay[n.groupIndex].items[i]),this.selectedOptionUpdated=!0):this.optionsToDisplay[n.groupIndex+1]&&(this.selectItem(e,this.optionsToDisplay[n.groupIndex+1].items[0]),this.selectedOptionUpdated=!0)}else this.selectItem(e,this.optionsToDisplay[0].items[0])}else{var n=this.selectedOption?this.findOptionIndex(this.selectedOption.value,this.optionsToDisplay):-1,o=this.findNextEnabledOption(n);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){if(-1!==(n=this.selectedOption?this.findOptionGroupIndex(this.selectedOption.value,this.optionsToDisplay):-1)){var l=n.itemIndex-1;if(l>=0)this.selectItem(e,this.optionsToDisplay[n.groupIndex].items[l]),this.selectedOptionUpdated=!0;else if(l<0){var s=this.optionsToDisplay[n.groupIndex-1];s&&(this.selectItem(e,s.items[s.items.length-1]),this.selectedOptionUpdated=!0)}}}else{n=this.selectedOption?this.findOptionIndex(this.selectedOption.value,this.optionsToDisplay):-1;var r=this.findPrevEnabledOption(n);r&&(this.selectItem(e,r),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 13:(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)&&this.hide(e),e.preventDefault();break;case 27:case 9:this.hide(e);break;default:t&&this.search(e)}},e.prototype.search=function(e){var t=this;this.searchTimeout&&clearTimeout(this.searchTimeout);var i,n=e.key;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=n,this.previousSearchChar===this.currentSearchChar?this.searchValue=this.currentSearchChar:this.searchValue=this.searchValue?this.searchValue+n:n,this.group){var o=this.selectedOption?this.findOptionGroupIndex(this.selectedOption.value,this.optionsToDisplay):{groupIndex:0,itemIndex:0};i=this.searchOptionWithinGroup(o)}else{o=this.selectedOption?this.findOptionIndex(this.selectedOption.value,this.optionsToDisplay):-1;i=this.searchOption(++o)}i&&!i.disabled&&(this.selectItem(e,i),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout((function(){t.searchValue=null}),250)},e.prototype.searchOption=function(e){var t;return this.searchValue&&((t=this.searchOptionInRange(e,this.optionsToDisplay.length))||(t=this.searchOptionInRange(0,e))),t},e.prototype.searchOptionInRange=function(e,t){for(var i=e;i<t;i++){var n=this.optionsToDisplay[i];if(n.label.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))&&!n.disabled)return n}return null},e.prototype.searchOptionWithinGroup=function(e){if(this.searchValue){for(var t=e.groupIndex;t<this.optionsToDisplay.length;t++)for(var i=e.groupIndex===t?e.itemIndex+1:0;i<this.optionsToDisplay[t].items.length;i++){if((n=this.optionsToDisplay[t].items[i]).label.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))&&!n.disabled)return n}for(t=0;t<=e.groupIndex;t++)for(i=0;i<(e.groupIndex===t?e.itemIndex:this.optionsToDisplay[t].items.length);i++){var n;if((n=this.optionsToDisplay[t].items[i]).label.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))&&!n.disabled)return n}}return null},e.prototype.findOptionIndex=function(e,t){var i=-1;if(t)for(var n=0;n<t.length;n++)if(null==e&&null==t[n].value||r.ObjectUtils.equals(e,t[n].value,this.dataKey)){i=n;break}return i},e.prototype.findOptionGroupIndex=function(e,t){var i,n;if(t)for(var o=0;o<t.length&&(i=o,-1===(n=this.findOptionIndex(e,t[o].items)));o++);return-1!==n?{groupIndex:i,itemIndex:n}:-1},e.prototype.findOption=function(e,t,i){var n,o;if(this.group&&!i){var l=void 0;if(t&&t.length)try{for(var s=h(t),r=s.next();!r.done;r=s.next()){var p=r.value;if(l=this.findOption(e,p.items,!0))break}}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return l}var a=this.findOptionIndex(e,t);return-1!=a?t[a]:null},e.prototype.onFilter=function(e){var t=e.target.value;t&&t.length?(this.filterValue=t,this.activateFilter()):(this.filterValue=null,this.optionsToDisplay=this.options),this.optionsChanged=!0},e.prototype.activateFilter=function(){var e,t,i=this.filterBy.split(",");if(this.options&&this.options.length){if(this.group){var n=[];try{for(var o=h(this.options),l=o.next();!l.done;l=o.next()){var s=l.value,p=r.FilterUtils.filter(s.items,i,this.filterValue,this.filterMatchMode,this.filterLocale);p&&p.length&&n.push({label:s.label,value:s.value,items:p})}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.optionsToDisplay=n}else this.optionsToDisplay=r.FilterUtils.filter(this.options,i,this.filterValue,this.filterMatchMode,this.filterLocale);this.optionsChanged=!0}},e.prototype.applyFocus=function(){this.editable?s.DomHandler.findSingle(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():s.DomHandler.findSingle(this.el.nativeElement,"input[readonly]").focus()},e.prototype.focus=function(){this.applyFocus()},e.prototype.bindDocumentClickListener=function(){var e=this;if(!this.documentClickListener){var t=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(t,"click",(function(t){e.isOutsideClicked(t)&&(e.hide(t),e.unbindDocumentClickListener()),e.cd.markForCheck()}))}},e.prototype.unbindDocumentClickListener=function(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)},e.prototype.bindDocumentResizeListener=function(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)},e.prototype.unbindDocumentResizeListener=function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},e.prototype.onWindowResize=function(){s.DomHandler.isAndroid()||this.hide(event)},e.prototype.bindScrollListener=function(){var e=this;this.scrollHandler||(this.scrollHandler=new s.ConnectedOverlayScrollHandler(this.containerViewChild.nativeElement,(function(t){e.overlayVisible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()},e.prototype.unbindScrollListener=function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},e.prototype.updateFilledState=function(){this.filled=null!=this.selectedOption},e.prototype.clear=function(e){this.value=null,this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.updateSelectedOption(this.value),this.updateEditableLabel(),this.updateFilledState()},e.prototype.onOverlayHide=function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.itemsWrapper=null,this.onModelTouched()},e.prototype.ngOnDestroy=function(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.restoreOverlayAppend(),this.onOverlayHide()},e}();y.decorators=[{type:i.Component,args:[{selector:"p-dropdown",template:'\n <div #container [ngClass]="{\'p-dropdown p-component\':true,\n \'p-disabled\':disabled, \'p-dropdown-open\':overlayVisible, \'p-focus\':focused, \'p-dropdown-clearable\': showClear && !disabled}"\n (click)="onMouseclick($event)" [ngStyle]="style" [class]="styleClass">\n <div class="p-hidden-accessible">\n <input #in [attr.id]="inputId" type="text" [attr.aria-label]="selectedOption ? selectedOption.label : \' \'" readonly (focus)="onInputFocus($event)" aria-haspopup="listbox"\n aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible" [attr.aria-labelledby]="ariaLabelledBy" (blur)="onInputBlur($event)" (keydown)="onKeydown($event, true)"\n [disabled]="disabled" [attr.tabindex]="tabindex" [attr.autofocus]="autofocus" role="listbox">\n </div>\n <span [ngClass]="{\'p-dropdown-label p-inputtext\':true,\'p-dropdown-label-empty\':(label == null || label.length === 0)}" *ngIf="!editable && (label != null)" [pTooltip]="tooltip" [tooltipPosition]="tooltipPosition" [positionStyle]="tooltipPositionStyle" [tooltipStyleClass]="tooltipStyleClass">\n <ng-container *ngIf="!selectedItemTemplate">{{label||\'empty\'}}</ng-container>\n <ng-container *ngTemplateOutlet="selectedItemTemplate; context: {$implicit: selectedOption}"></ng-container>\n </span>\n <span [ngClass]="{\'p-dropdown-label p-inputtext p-placeholder\':true,\'p-dropdown-label-empty\': (placeholder == null || placeholder.length === 0)}" *ngIf="!editable && (label == null)">{{placeholder||\'empty\'}}</span>\n <input #editableInput type="text" [attr.maxlength]="maxlength" [attr.aria-label]="selectedOption ? selectedOption.label : \' \'" class="p-dropdown-label p-inputtext" *ngIf="editable" [disabled]="disabled" [attr.placeholder]="placeholder"\n aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible" (click)="onEditableInputClick()" (input)="onEditableInputChange($event)" (focus)="onEditableInputFocus($event)" (blur)="onInputBlur($event)">\n <i class="p-dropdown-clear-icon pi pi-times" (click)="clear($event)" *ngIf="value != null && showClear && !disabled"></i>\n <div class="p-dropdown-trigger" role="button" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible">\n <span class="p-dropdown-trigger-icon" [ngClass]="dropdownIcon"></span>\n </div>\n <div *ngIf="overlayVisible" [ngClass]="\'p-dropdown-panel p-component\'" [@overlayAnimation]="{value: \'visible\', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" (@overlayAnimation.start)="onOverlayAnimationStart($event)" [ngStyle]="panelStyle" [class]="panelStyleClass">\n <div class="p-dropdown-header" *ngIf="filter" >\n <div class="p-dropdown-filter-container" (click)="$event.stopPropagation()">\n <input #filter type="text" autocomplete="off" [value]="filterValue||\'\'" class="p-dropdown-filter p-inputtext p-component" [attr.placeholder]="filterPlaceholder"\n (keydown.enter)="$event.preventDefault()" (keydown)="onKeydown($event, false)" (input)="onFilter($event)" [attr.aria-label]="ariaFilterLabel">\n <span class="p-dropdown-filter-icon pi pi-search"></span>\n </div>\n </div>\n <div class="p-dropdown-items-wrapper" [style.max-height]="virtualScroll ? \'auto\' : (scrollHeight||\'auto\')">\n <ul class="p-dropdown-items" role="listbox">\n <ng-container *ngIf="group">\n <ng-template ngFor let-optgroup [ngForOf]="optionsToDisplay">\n <li class="p-dropdown-item-group">\n <span *ngIf="!groupTemplate">{{optgroup.label||\'empty\'}}</span>\n <ng-container *ngTemplateOutlet="groupTemplate; context: {$implicit: optgroup}"></ng-container>\n </li>\n <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: optgroup.items, selectedOption: selectedOption}"></ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngIf="!group">\n <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: optionsToDisplay, selectedOption: selectedOption}"></ng-container>\n </ng-container>\n <ng-template #itemslist let-options let-selectedOption="selectedOption">\n <ng-container *ngIf="!virtualScroll; else virtualScrollList">\n <ng-template ngFor let-option let-i="index" [ngForOf]="options">\n <p-dropdownItem [option]="option" [selected]="selectedOption == option"\n (onClick)="onItemClick($event)"\n [template]="itemTemplate"></p-dropdownItem>\n </ng-template>\n </ng-container>\n <ng-template #virtualScrollList>\n <cdk-virtual-scroll-viewport (scrolledIndexChange)="scrollToSelectedVirtualScrollElement()" #viewport [ngStyle]="{\'height\': scrollHeight}" [itemSize]="itemSize" *ngIf="virtualScroll && optionsToDisplay && optionsToDisplay.length">\n <ng-container *cdkVirtualFor="let option of options; let i = index; let c = count; let f = first; let l = last; let e = even; let o = odd">\n <p-dropdownItem [option]="option" [selected]="selectedOption == option"\n (onClick)="onItemClick($event)"\n [template]="itemTemplate"></p-dropdownItem>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n </ng-template>\n </ng-template>\n <li *ngIf="filter && (!optionsToDisplay || (optionsToDisplay && optionsToDisplay.length === 0))" class="p-dropdown-empty-message">{{emptyFilterMessage}}</li>\n </ul>\n </div>\n </div>\n </div>\n ',animations:[n.trigger("overlayAnimation",[n.transition(":enter",[n.style({opacity:0,transform:"scaleY(0.8)"}),n.animate("{{showTransitionParams}}")]),n.transition(":leave",[n.animate("{{hideTransitionParams}}",n.style({opacity:0}))])])],host:{"[class.p-inputwrapper-filled]":"filled","[class.p-inputwrapper-focus]":"focused"},providers:[c],changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,styles:[".p-dropdown{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;position:relative;user-select:none}.p-dropdown-clear-icon{margin-top:-.5rem;position:absolute;top:50%}.p-dropdown-trigger{-ms-flex-align:center;-ms-flex-negative:0;-ms-flex-pack:center;align-items:center;display:-ms-flexbox;display:flex;flex-shrink:0;justify-content:center}.p-dropdown-label{-ms-flex:1 1 auto;cursor:pointer;display:block;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:1%}.p-dropdown-label-empty{overflow:hidden;visibility:hidden}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-panel{position:absolute}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;overflow:hidden;position:relative;white-space:nowrap}.p-dropdown-items{list-style-type:none;margin:0;padding:0}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{margin-top:-.5rem;position:absolute;top:50%}.p-fluid .p-dropdown{display:-ms-flexbox;display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}"]}]}],y.ctorParameters=function(){return[{type:i.ElementRef},{type:i.Renderer2},{type:i.ChangeDetectorRef},{type:i.NgZone}]},y.propDecorators={scrollHeight:[{type:i.Input}],filter:[{type:i.Input}],name:[{type:i.Input}],style:[{type:i.Input}],panelStyle:[{type:i.Input}],styleClass:[{type:i.Input}],panelStyleClass:[{type:i.Input}],readonly:[{type:i.Input}],required:[{type:i.Input}],editable:[{type:i.Input}],appendTo:[{type:i.Input}],tabindex:[{type:i.Input}],placeholder:[{type:i.Input}],filterPlaceholder:[{type:i.Input}],filterLocale:[{type:i.Input}],inputId:[{type:i.Input}],selectId:[{type:i.Input}],dataKey:[{type:i.Input}],filterBy:[{type:i.Input}],autofocus:[{type:i.Input}],resetFilterOnHide:[{type:i.Input}],dropdownIcon:[{type:i.Input}],optionLabel:[{type:i.Input}],autoDisplayFirst:[{type:i.Input}],group:[{type:i.Input}],showClear:[{type:i.Input}],emptyFilterMessage:[{type:i.Input}],virtualScroll:[{type:i.Input}],itemSize:[{type:i.Input}],autoZIndex:[{type:i.Input}],baseZIndex:[{type:i.Input}],showTransitionOptions:[{type:i.Input}],hideTransitionOptions:[{type:i.Input}],ariaFilterLabel:[{type:i.Input}],ariaLabelledBy:[{type:i.Input}],filterMatchMode:[{type:i.Input}],maxlength:[{type:i.Input}],tooltip:[{type:i.Input}],tooltipPosition:[{type:i.Input}],tooltipPositionStyle:[{type:i.Input}],tooltipStyleClass:[{type:i.Input}],autofocusFilter:[{type:i.Input}],onChange:[{type:i.Output}],onFocus:[{type:i.Output}],onBlur:[{type:i.Output}],onClick:[{type:i.Output}],onShow:[{type:i.Output}],onHide:[{type:i.Output}],containerViewChild:[{type:i.ViewChild,args:["container"]}],filterViewChild:[{type:i.ViewChild,args:["filter"]}],accessibleViewChild:[{type:i.ViewChild,args:["in"]}],viewPort:[{type:i.ViewChild,args:[t.CdkVirtualScrollViewport]}],editableInputViewChild:[{type:i.ViewChild,args:["editableInput"]}],templates:[{type:i.ContentChildren,args:[l.PrimeTemplate]}],disabled:[{type:i.Input}],options:[{type:i.Input}]};var f=function(){};f.decorators=[{type:i.NgModule,args:[{imports:[o.CommonModule,l.SharedModule,t.ScrollingModule,a.TooltipModule,d.RippleModule],exports:[y,l.SharedModule,t.ScrollingModule],declarations:[y,u]}]}],e.DROPDOWN_VALUE_ACCESSOR=c,e.Dropdown=y,e.DropdownItem=u,e.DropdownModule=f,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=primeng-dropdown.umd.min.js.map