Socket
Socket
Sign inDemoInstall

angular2-multiselect-dropdown

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-multiselect-dropdown - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

2

bundles/angular2-multiselect-dropdown.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular2-multiselect-dropdown",["exports","@angular/core","rxjs","@angular/forms","@angular/common"],t):t(e["angular2-multiselect-dropdown"]={},e.ng.core,e.rxjs,e.ng.forms,e.ng.common)}(this,function(e,n,t,i,s){"use strict";var r=function I(e,t){this.status=e,this.body=t},l=function(){function e(e){this._elementRef=e,this.clickOutside=new n.EventEmitter}return e.prototype.onClick=function(e,t){t&&(this._elementRef.nativeElement.contains(t)||this.clickOutside.emit(e))},e.decorators=[{type:n.Directive,args:[{selector:"[clickOutside]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={clickOutside:[{type:n.Output}],onClick:[{type:n.HostListener,args:["document:click",["$event","$event.target"]]},{type:n.HostListener,args:["document:touchstart",["$event","$event.target"]]}]},e}(),o=function(){function e(e){this._elementRef=e,this.scroll=new n.EventEmitter}return e.prototype.onClick=function(e,t){this.scroll.emit(e)},e.decorators=[{type:n.Directive,args:[{selector:"[scroll]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={scroll:[{type:n.Output}],onClick:[{type:n.HostListener,args:["scroll",["$event"]]}]},e}(),a=function(){function e(e){this.el=e}return e.prototype.ngOnInit=function(){this.el.nativeElement.style.top=this.styleVal},e.prototype.ngOnChanges=function(){this.el.nativeElement.style.top=this.styleVal},e.decorators=[{type:n.Directive,args:[{selector:"[styleProp]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={styleVal:[{type:n.Input,args:["styleProp"]}]},e}(),c=function(){function e(e){this.el=e}return e.prototype.ngOnInit=function(){this.height&&(this.el.nativeElement.style.bottom=parseInt(this.height+15+"")+"px")},e.prototype.ngOnChanges=function(){this.height&&(this.el.nativeElement.style.bottom=parseInt(this.height+15+"")+"px")},e.decorators=[{type:n.Directive,args:[{selector:"[setPosition]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={height:[{type:n.Input,args:["setPosition"]}]},e}(),h=function(){function e(){this.filteredData=[],this.subject=new t.Subject}return e.prototype.setData=function(e){this.filteredData=e,this.subject.next(e)},e.prototype.getData=function(){return this.subject.asObservable()},e.prototype.getFilteredData=function(){return this.filteredData&&0<this.filteredData.length?this.filteredData:[]},e.decorators=[{type:n.Injectable}],e}(),d=function(){function e(e){this.ds=e,this.filteredList=[]}return e.prototype.transform=function(e,t,i){var n=this;return e&&t?(this.filteredList=e.filter(function(e){return n.applyFilter(e,t,i)}),this.ds.setData(this.filteredList),this.filteredList):(this.ds.setData(e),e)},e.prototype.applyFilter=function(e,t,i){var n=!1;if(0<i.length)if(e.grpTitle)n=!0;else for(var s=0;s<i.length;s++)t&&e[i[s]]&&""!=e[i[s]]&&0<=e[i[s]].toString().toLowerCase().indexOf(t.toLowerCase())&&(n=!0);else if(e.grpTitle)n=!0;else for(var r in e)t&&e[r]&&0<=e[r].toString().toLowerCase().indexOf(t.toLowerCase())&&(n=!0);return n},e.decorators=[{type:n.Pipe,args:[{name:"listFilter",pure:!0}]}],e.ctorParameters=function(){return[{type:h}]},e}(),p=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-item",template:""}]}],e.ctorParameters=function(){return[]},e.propDecorators={template:[{type:n.ContentChild,args:[n.TemplateRef]}]},e}(),g=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-badge",template:""}]}],e.ctorParameters=function(){return[]},e.propDecorators={template:[{type:n.ContentChild,args:[n.TemplateRef]}]},e}(),u=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-search",template:""}]}],e.ctorParameters=function(){return[]},e.propDecorators={template:[{type:n.ContentChild,args:[n.TemplateRef]}]},e}(),m=function(){function e(e){this.viewContainer=e}return e.prototype.ngOnInit=function(){this.view=this.viewContainer.createEmbeddedView(this.data.template,{$implicit:this.data,item:this.item})},e.prototype.ngOnDestroy=function(){this.view.destroy()},e.decorators=[{type:n.Component,args:[{selector:"c-templateRenderer",template:""}]}],e.ctorParameters=function(){return[{type:n.ViewContainerRef}]},e.propDecorators={data:[{type:n.Input}],item:[{type:n.Input}]},e}(),f=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-icon",template:'<svg *ngIf="name == \'remove\'" width="100%" height="100%" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 47.971 47.971" style="enable-background:new 0 0 47.971 47.971;" xml:space="preserve">\n <g>\n <path d="M28.228,23.986L47.092,5.122c1.172-1.171,1.172-3.071,0-4.242c-1.172-1.172-3.07-1.172-4.242,0L23.986,19.744L5.121,0.88\n c-1.172-1.172-3.07-1.172-4.242,0c-1.172,1.171-1.172,3.071,0,4.242l18.865,18.864L0.879,42.85c-1.172,1.171-1.172,3.071,0,4.242\n C1.465,47.677,2.233,47.97,3,47.97s1.535-0.293,2.121-0.879l18.865-18.864L42.85,47.091c0.586,0.586,1.354,0.879,2.121,0.879\n s1.535-0.293,2.121-0.879c1.172-1.171,1.172-3.071,0-4.242L28.228,23.986z"/>\n </g>\n </svg>\n <svg *ngIf="name == \'angle-down\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">\n<g>\n\t<g id="_x31_0_34_">\n\t\t<g>\n\t\t\t<path d="M604.501,134.782c-9.999-10.05-26.222-10.05-36.221,0L306.014,422.558L43.721,134.782\n\t\t\t\tc-9.999-10.05-26.223-10.05-36.222,0s-9.999,26.35,0,36.399l279.103,306.241c5.331,5.357,12.422,7.652,19.386,7.296\n\t\t\t\tc6.988,0.356,14.055-1.939,19.386-7.296l279.128-306.268C614.5,161.106,614.5,144.832,604.501,134.782z"/>\n\t\t</g>\n\t</g>\n</g>\n</svg>\n<svg *ngIf="name == \'angle-up\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">\n<g>\n\t<g id="_x39__30_">\n\t\t<g>\n\t\t\t<path d="M604.501,440.509L325.398,134.956c-5.331-5.357-12.423-7.627-19.386-7.27c-6.989-0.357-14.056,1.913-19.387,7.27\n\t\t\t\tL7.499,440.509c-9.999,10.024-9.999,26.298,0,36.323s26.223,10.024,36.222,0l262.293-287.164L568.28,476.832\n\t\t\t\tc9.999,10.024,26.222,10.024,36.221,0C614.5,466.809,614.5,450.534,604.501,440.509z"/>\n\t\t</g>\n\t</g>\n</g>\n\n</svg>\n<svg *ngIf="name == \'search\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="100%" height="100%" viewBox="0 0 615.52 615.52" style="enable-background:new 0 0 615.52 615.52;"\n\t xml:space="preserve">\n<g>\n\t<g>\n\t\t<g id="Search__x28_and_thou_shall_find_x29_">\n\t\t\t<g>\n\t\t\t\t<path d="M602.531,549.736l-184.31-185.368c26.679-37.72,42.528-83.729,42.528-133.548C460.75,103.35,357.997,0,231.258,0\n\t\t\t\t\tC104.518,0,1.765,103.35,1.765,230.82c0,127.47,102.753,230.82,229.493,230.82c49.53,0,95.271-15.944,132.78-42.777\n\t\t\t\t\tl184.31,185.366c7.482,7.521,17.292,11.291,27.102,11.291c9.812,0,19.62-3.77,27.083-11.291\n\t\t\t\t\tC617.496,589.188,617.496,564.777,602.531,549.736z M355.9,319.763l-15.042,21.273L319.7,356.174\n\t\t\t\t\tc-26.083,18.658-56.667,28.526-88.442,28.526c-84.365,0-152.995-69.035-152.995-153.88c0-84.846,68.63-153.88,152.995-153.88\n\t\t\t\t\ts152.996,69.034,152.996,153.88C384.271,262.769,374.462,293.526,355.9,319.763z"/>\n\t\t\t</g>\n\t\t</g>\n\t</g>\n</g>\n\n</svg>\n<svg *ngIf="name == \'clear\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 51.976 51.976" style="enable-background:new 0 0 51.976 51.976;" xml:space="preserve">\n<g>\n\t<path d="M44.373,7.603c-10.137-10.137-26.632-10.138-36.77,0c-10.138,10.138-10.137,26.632,0,36.77s26.632,10.138,36.77,0\n\t\tC54.51,34.235,54.51,17.74,44.373,7.603z M36.241,36.241c-0.781,0.781-2.047,0.781-2.828,0l-7.425-7.425l-7.778,7.778\n\t\tc-0.781,0.781-2.047,0.781-2.828,0c-0.781-0.781-0.781-2.047,0-2.828l7.778-7.778l-7.425-7.425c-0.781-0.781-0.781-2.048,0-2.828\n\t\tc0.781-0.781,2.047-0.781,2.828,0l7.425,7.425l7.071-7.071c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828\n\t\tl-7.071,7.071l7.425,7.425C37.022,34.194,37.022,35.46,36.241,36.241z"/>\n</g>\n</svg>',encapsulation:n.ViewEncapsulation.None}]}],e.propDecorators={name:[{type:n.Input}]},e}(),v=function(){function e(e,t,i){this.element=e,this.renderer=t,this.zone=i,this.window=window,this._enableUnequalChildrenSizes=!1,this.useMarginInsteadOfTranslate=!1,this._bufferAmount=0,this.scrollAnimationTime=750,this.resizeBypassRefreshTheshold=5,this._checkResizeInterval=1e3,this._items=[],this.compareItems=function(e,t){return e===t},this.update=new n.EventEmitter,this.vsUpdate=new n.EventEmitter,this.change=new n.EventEmitter,this.vsChange=new n.EventEmitter,this.start=new n.EventEmitter,this.vsStart=new n.EventEmitter,this.end=new n.EventEmitter,this.vsEnd=new n.EventEmitter,this.calculatedScrollbarWidth=0,this.calculatedScrollbarHeight=0,this.padding=0,this.previousViewPort={},this.cachedPageSize=0,this.previousScrollNumberElements=0,this.horizontal=!1,this.scrollThrottlingTime=0,this.resetWrapGroupDimensions()}return Object.defineProperty(e.prototype,"viewPortIndices",{get:function(){var e=this.previousViewPort||{};return{startIndex:e.startIndex||0,endIndex:e.endIndex||0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableUnequalChildrenSizes",{get:function(){return this._enableUnequalChildrenSizes},set:function(e){this._enableUnequalChildrenSizes!==e&&(this._enableUnequalChildrenSizes=e,this.minMeasuredChildWidth=undefined,this.minMeasuredChildHeight=undefined)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferAmount",{get:function(){return Math.max(this._bufferAmount,this.enableUnequalChildrenSizes?5:0)},set:function(e){this._bufferAmount=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollThrottlingTime",{get:function(){return this._scrollThrottlingTime},set:function(e){var t=this;this._scrollThrottlingTime=e,this.refresh_throttled=this.throttleTrailing(function(){t.refresh_internal(!1)},this._scrollThrottlingTime)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checkResizeInterval",{get:function(){return this._checkResizeInterval},set:function(e){this._checkResizeInterval!==e&&(this._checkResizeInterval=e,this.addScrollEventHandlers())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(e){e!==this._items&&(this._items=e||[],this.refresh_internal(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e,this.updateDirection()},enumerable:!0,configurable:!0}),e.prototype.revertParentOverscroll=function(){var e=this.getScrollElement();e&&this.oldParentScrollOverflow&&(e.style["overflow-y"]=this.oldParentScrollOverflow.y,e.style["overflow-x"]=this.oldParentScrollOverflow.x),this.oldParentScrollOverflow=undefined},Object.defineProperty(e.prototype,"parentScroll",{get:function(){return this._parentScroll},set:function(e){if(this._parentScroll!==e){this.revertParentOverscroll(),this._parentScroll=e,this.addScrollEventHandlers();var t=this.getScrollElement();t!==this.element.nativeElement&&(this.oldParentScrollOverflow={x:t.style["overflow-x"],y:t.style["overflow-y"]},t.style["overflow-y"]=this.horizontal?"visible":"auto",t.style["overflow-x"]=this.horizontal?"auto":"visible")}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.addScrollEventHandlers()},e.prototype.ngOnDestroy=function(){this.removeScrollEventHandlers(),this.revertParentOverscroll()},e.prototype.ngOnChanges=function(e){var t=this.cachedItemsLength!==this.items.length;this.cachedItemsLength=this.items.length;var i=!e.items||!e.items.previousValue||0===e.items.previousValue.length;this.refresh_internal(t||i)},e.prototype.ngDoCheck=function(){this.cachedItemsLength!==this.items.length&&(this.cachedItemsLength=this.items.length,this.refresh_internal(!0))},e.prototype.refresh=function(){this.refresh_internal(!0)},e.prototype.scrollInto=function(e,t,i,n,s){void 0===t&&(t=!0),void 0===i&&(i=0),void 0===n&&(n=undefined),void 0===s&&(s=undefined);var r=this.items.indexOf(e);-1!==r&&this.scrollToIndex(r,t,i,n,s)},e.prototype.scrollToIndex=function(i,n,s,e,r){var l=this;void 0===n&&(n=!0),void 0===s&&(s=0),void 0===e&&(e=undefined),void 0===r&&(r=undefined);var o=5,a=function(){if(--o<=0)r&&r();else{var e=l.calculateDimensions(),t=Math.min(Math.max(i,0),e.itemCount-1);l.previousViewPort.startIndex!==t?l.scrollToIndex_internal(i,n,s,0,a):r&&r()}};this.scrollToIndex_internal(i,n,s,e,a)},e.prototype.scrollToIndex_internal=function(e,t,i,n,s){void 0===t&&(t=!0),void 0===i&&(i=0),void 0===n&&(n=undefined),void 0===s&&(s=undefined),n=n===undefined?this.scrollAnimationTime:n;var r=this.getScrollElement(),l=this.getElementsOffset(),o=this.calculateDimensions(),a=this.calculatePadding(e,o,!1)+l+i;if(t||(a-=o.wrapGroupsPerPage*o[this._childScrollDim]),!n)return this.renderer.setProperty(r,this._scrollType,a),void this.refresh_internal(!1,s)},e.prototype.checkScrollElementResized=function(){var e,t=this.getScrollElement().getBoundingClientRect();if(this.previousScrollBoundingRect){var i=Math.abs(t.width-this.previousScrollBoundingRect.width),n=Math.abs(t.height-this.previousScrollBoundingRect.height);e=i>this.resizeBypassRefreshTheshold||n>this.resizeBypassRefreshTheshold}else e=!0;e&&0<(this.previousScrollBoundingRect=t).width&&0<t.height&&this.refresh_internal(!1)},e.prototype.updateDirection=function(){this.horizontal?(this._invisiblePaddingProperty="width",this._offsetType="offsetLeft",this._pageOffsetType="pageXOffset",this._childScrollDim="childWidth",this._marginDir="margin-left",this._translateDir="translateX",this._scrollType="scrollLeft"):(this._invisiblePaddingProperty="height",this._offsetType="offsetTop",this._pageOffsetType="pageYOffset",this._childScrollDim="childHeight",this._marginDir="margin-top",this._translateDir="translateY",this._scrollType="scrollTop")},e.prototype.throttleTrailing=function(i,n){var s=undefined;return function(){var e=this,t=arguments;s||(n<=0?i.apply(e,t):s=setTimeout(function(){s=undefined,i.apply(e,t)},n))}},e.prototype.refresh_internal=function(r,l,o){var a=this;void 0===l&&(l=undefined),void 0===o&&(o=2),this.zone.runOutsideAngular(function(){requestAnimationFrame(function(){r&&a.resetWrapGroupDimensions();var e=a.calculateViewport(),t=r||e.startIndex!==a.previousViewPort.startIndex,i=r||e.endIndex!==a.previousViewPort.endIndex,n=e.scrollLength!==a.previousViewPort.scrollLength,s=e.padding!==a.previousViewPort.padding;if(a.previousViewPort=e,n&&a.renderer.setStyle(a.invisiblePaddingElementRef.nativeElement,a._invisiblePaddingProperty,e.scrollLength+"px"),s&&(a.useMarginInsteadOfTranslate?a.renderer.setStyle(a.contentElementRef.nativeElement,a._marginDir,e.padding+"px"):(a.renderer.setStyle(a.contentElementRef.nativeElement,"transform",a._translateDir+"("+e.padding+"px)"),a.renderer.setStyle(a.contentElementRef.nativeElement,"webkitTransform",a._translateDir+"("+e.padding+"px)"))),t||i)a.zone.run(function(){a.viewPortItems=0<=e.startIndexWithBuffer&&0<=e.endIndexWithBuffer?a.items.slice(e.startIndexWithBuffer,e.endIndexWithBuffer+1):[],a.update.emit(a.viewPortItems),a.vsUpdate.emit(a.viewPortItems),t&&(a.start.emit({start:e.startIndex,end:e.endIndex}),a.vsStart.emit({start:e.startIndex,end:e.endIndex})),i&&(a.end.emit({start:e.startIndex,end:e.endIndex}),a.vsEnd.emit({start:e.startIndex,end:e.endIndex})),(t||i)&&(a.change.emit({start:e.startIndex,end:e.endIndex}),a.vsChange.emit({start:e.startIndex,end:e.endIndex})),0<o?a.refresh_internal(!1,l,o-1):l&&l()});else{if(0<o&&(n||s))return void a.refresh_internal(!1,l,o-1);l&&l()}})})},e.prototype.getScrollElement=function(){return this.parentScroll instanceof Window?document.scrollingElement||document.documentElement||document.body:this.parentScroll||this.element.nativeElement},e.prototype.addScrollEventHandlers=function(){var e=this,t=this.getScrollElement();this.removeScrollEventHandlers(),this.zone.runOutsideAngular(function(){e.parentScroll instanceof Window?(e.disposeScrollHandler=e.renderer.listen("window","scroll",e.refresh_throttled),e.disposeResizeHandler=e.renderer.listen("window","resize",e.refresh_throttled)):(e.disposeScrollHandler=e.renderer.listen(t,"scroll",e.refresh_throttled),0<e._checkResizeInterval&&(e.checkScrollElementResizedTimer=setInterval(function(){e.checkScrollElementResized()},e._checkResizeInterval)))})},e.prototype.removeScrollEventHandlers=function(){this.checkScrollElementResizedTimer&&clearInterval(this.checkScrollElementResizedTimer),this.disposeScrollHandler&&(this.disposeScrollHandler(),this.disposeScrollHandler=undefined),this.disposeResizeHandler&&(this.disposeResizeHandler(),this.disposeResizeHandler=undefined)},e.prototype.getElementsOffset=function(){var e=0;if(this.containerElementRef&&this.containerElementRef.nativeElement&&(e+=this.containerElementRef.nativeElement[this._offsetType]),this.parentScroll){var t=this.getScrollElement(),i=this.element.nativeElement.getBoundingClientRect(),n=t.getBoundingClientRect();this.horizontal?e+=i.left-n.left:e+=i.top-n.top,this.parentScroll instanceof Window||(e+=t[this._scrollType])}return e},e.prototype.countItemsPerWrapGroup=function(){var e=this.horizontal?"offsetLeft":"offsetTop",t=(this.containerElementRef&&this.containerElementRef.nativeElement||this.contentElementRef.nativeElement).children,i=t?t.length:0;if(0===i)return 1;for(var n=t[0][e],s=1;s<i&&n===t[s][e];)++s;return s},e.prototype.getScrollPosition=function(){var e=undefined;this.parentScroll instanceof Window&&(e=(void 0)[this._pageOffsetType]);return e||this.getScrollElement()[this._scrollType]||0},e.prototype.resetWrapGroupDimensions=function(){var e=this.wrapGroupDimensions;if(this.wrapGroupDimensions={maxChildSizePerWrapGroup:[],numberOfKnownWrapGroupChildSizes:0,sumOfKnownWrapGroupChildWidths:0,sumOfKnownWrapGroupChildHeights:0},this.enableUnequalChildrenSizes&&e&&0!==e.numberOfKnownWrapGroupChildSizes)for(var t=this.countItemsPerWrapGroup(),i=0;i<e.maxChildSizePerWrapGroup.length;++i){var n=e.maxChildSizePerWrapGroup[i];if(n&&n.items&&n.items.length){if(n.items.length!==t)return;for(var s=!1,r=t*i,l=0;l<t;++l)if(!this.compareItems(n.items[l],this.items[r+l])){s=!0;break}s||(++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths+=n.childWidth||0,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights+=n.childHeight||0,this.wrapGroupDimensions.maxChildSizePerWrapGroup[i]=n)}}},e.prototype.calculateDimensions=function(){var e=this.getScrollElement(),t=this.items.length;this.calculatedScrollbarHeight=Math.max(Math.min(e.offsetHeight-e.clientHeight,25),this.calculatedScrollbarHeight),this.calculatedScrollbarWidth=Math.max(Math.min(e.offsetWidth-e.clientWidth,25),this.calculatedScrollbarWidth);var i,n,s,r=e.offsetWidth-(this.scrollbarWidth||this.calculatedScrollbarWidth||(this.horizontal?0:25)),l=e.offsetHeight-(this.scrollbarHeight||this.calculatedScrollbarHeight||(this.horizontal?25:0)),o=this.containerElementRef&&this.containerElementRef.nativeElement||this.contentElementRef.nativeElement,a=this.countItemsPerWrapGroup();if(this.enableUnequalChildrenSizes){for(var c=e[this._scrollType]-(this.previousViewPort?this.previousViewPort.padding:0),h=this.previousViewPort.startIndexWithBuffer||0,d=Math.ceil(h/a),p=0,g=0,u=0,m=0,f=i=0;f<o.children.length;++f){++h;k=o.children[f].getBoundingClientRect();if(p=Math.max(p,k.width),g=Math.max(g,k.height),h%a==0){var v=this.wrapGroupDimensions.maxChildSizePerWrapGroup[d];v&&(--this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths-=v.childWidth||0,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights-=v.childHeight||0),++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;var b=this.items.slice(h-a,h);if(this.wrapGroupDimensions.maxChildSizePerWrapGroup[d]={childWidth:p,childHeight:g,items:b},this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths+=p,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights+=g,this.horizontal){var y=Math.min(p,Math.max(r-u,0));if(0<c)y-=x=Math.min(c,y),c-=x;u+=y,0<y&&u<=r&&++i}else{var x,w=Math.min(g,Math.max(l-m,0));if(0<c)w-=x=Math.min(c,w),c-=x;m+=w,0<w&&m<=l&&++i}++d,g=p=0}}var S=this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths/this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,I=this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights/this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;n=this.childWidth||S||r,s=this.childHeight||I||l,this.horizontal?u<r&&(i+=Math.ceil((r-u)/n)):m<l&&(i+=Math.ceil((l-m)/s))}else{if(0<o.children.length){this.childWidth&&this.childHeight||(!this.minMeasuredChildWidth&&0<r&&(this.minMeasuredChildWidth=r),!this.minMeasuredChildHeight&&0<l&&(this.minMeasuredChildHeight=l));var k=o.children[0].getBoundingClientRect();this.minMeasuredChildWidth=Math.min(this.minMeasuredChildWidth,k.width),this.minMeasuredChildHeight=Math.min(this.minMeasuredChildHeight,k.height)}n=this.childWidth||this.minMeasuredChildWidth||r,s=this.childHeight||this.minMeasuredChildHeight||l;var C=Math.max(Math.ceil(r/n),1),E=Math.max(Math.ceil(l/s),1);i=this.horizontal?C:E}var T=a*i,D=t/T,z=Math.ceil(t/a),P=0,A=this.horizontal?n:s;if(this.enableUnequalChildrenSizes){var O=0;for(f=0;f<z;++f){var _=this.wrapGroupDimensions.maxChildSizePerWrapGroup[f]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[f][this._childScrollDim];_?P+=_:++O}P+=Math.round(O*A)}else P=z*A;return{itemCount:t,itemsPerWrapGroup:a,wrapGroupsPerPage:i,itemsPerPage:T,pageCount_fractional:D,childWidth:n,childHeight:s,scrollLength:P}},e.prototype.calculatePadding=function(e,t,i){if(0===t.itemCount)return 0;var n=t[this._childScrollDim],s=Math.ceil(e/t.itemsPerWrapGroup)||0;if(!this.enableUnequalChildrenSizes)return n*s;for(var r=0,l=0,o=0;o<s;++o){var a=this.wrapGroupDimensions.maxChildSizePerWrapGroup[o]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[o][this._childScrollDim];a?l+=a:++r}return l+=Math.round(r*n)},e.prototype.calculatePageInfo=function(e,t){var i=0;if(this.enableUnequalChildrenSizes)for(var n=Math.ceil(t.itemCount/t.itemsPerWrapGroup),s=0,r=t[this._childScrollDim],l=0;l<n;++l){var o=this.wrapGroupDimensions.maxChildSizePerWrapGroup[l]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[l][this._childScrollDim];if(e<(s+=o||r)){i=l/n;break}}else i=e/t.scrollLength;var a=Math.min(Math.max(i*t.pageCount_fractional,0),t.pageCount_fractional)*t.itemsPerPage,c=t.itemCount-t.itemsPerPage-1,h=Math.min(Math.floor(a),c);h-=h%t.itemsPerWrapGroup;var d=Math.ceil(a)+t.itemsPerPage-1;d+=t.itemsPerWrapGroup-(d+1)%t.itemsPerWrapGroup,isNaN(h)&&(h=0),isNaN(d)&&(d=0),h=Math.min(Math.max(h,0),t.itemCount-1),d=Math.min(Math.max(d,0),t.itemCount-1);var p=this.bufferAmount*t.itemsPerWrapGroup;return{startIndex:h,endIndex:d,startIndexWithBuffer:Math.min(Math.max(h-p,0),t.itemCount-1),endIndexWithBuffer:Math.min(Math.max(d+p,0),t.itemCount-1)}},e.prototype.calculateViewport=function(){var e=this.calculateDimensions(),t=this.getElementsOffset(),i=this.getScrollPosition();i>e.scrollLength&&!(this.parentScroll instanceof Window)?i=e.scrollLength:i-=t,i=Math.max(0,i);var n=this.calculatePageInfo(i,e),s=this.calculatePadding(n.startIndexWithBuffer,e,!0),r=e.scrollLength;return{startIndex:n.startIndex,endIndex:n.endIndex,startIndexWithBuffer:n.startIndexWithBuffer,endIndexWithBuffer:n.endIndexWithBuffer,padding:Math.round(s),scrollLength:Math.round(r)}},e.decorators=[{type:n.Component,args:[{selector:"virtual-scroll,[virtualScroll]",exportAs:"virtualScroll",template:'\n <div class="total-padding" #invisiblePadding></div>\n <div class="scrollable-content" #content>\n <ng-content></ng-content>\n </div>\n ',host:{"[class.horizontal]":"horizontal","[class.vertical]":"!horizontal","[class.selfScroll]":"!parentScroll"},styles:["\n :host {\n position: relative;\n\t display: block;\n -webkit-overflow-scrolling: touch;\n }\n\t\n\t:host.horizontal.selfScroll {\n overflow-y: visible;\n overflow-x: auto;\n\t}\n\t:host.vertical.selfScroll {\n overflow-y: auto;\n overflow-x: visible;\n\t}\n\t\n .scrollable-content {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100vw;\n max-height: 100vh;\n position: absolute;\n }\n\n\t.scrollable-content ::ng-deep > * {\n\t\tbox-sizing: border-box;\n\t}\n\t\n\t:host.horizontal {\n\t\twhite-space: nowrap;\n\t}\n\t\n\t:host.horizontal .scrollable-content {\n\t\tdisplay: flex;\n\t}\n\t\n\t:host.horizontal .scrollable-content ::ng-deep > * {\n\t\tflex-shrink: 0;\n\t\tflex-grow: 0;\n\t\twhite-space: initial;\n\t}\n\t\n .total-padding {\n width: 1px;\n opacity: 0;\n }\n \n :host.horizontal .total-padding {\n height: 100%;\n }\n "]}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2},{type:n.NgZone}]},e.propDecorators={enableUnequalChildrenSizes:[{type:n.Input}],useMarginInsteadOfTranslate:[{type:n.Input}],scrollbarWidth:[{type:n.Input}],scrollbarHeight:[{type:n.Input}],childWidth:[{type:n.Input}],childHeight:[{type:n.Input}],bufferAmount:[{type:n.Input}],scrollAnimationTime:[{type:n.Input}],resizeBypassRefreshTheshold:[{type:n.Input}],scrollThrottlingTime:[{type:n.Input}],checkResizeInterval:[{type:n.Input}],items:[{type:n.Input}],compareItems:[{type:n.Input}],horizontal:[{type:n.Input}],parentScroll:[{type:n.Input}],update:[{type:n.Output}],vsUpdate:[{type:n.Output}],change:[{type:n.Output}],vsChange:[{type:n.Output}],start:[{type:n.Output}],vsStart:[{type:n.Output}],end:[{type:n.Output}],vsEnd:[{type:n.Output}],contentElementRef:[{type:n.ViewChild,args:["content",{read:n.ElementRef}]}],invisiblePaddingElementRef:[{type:n.ViewChild,args:["invisiblePadding",{read:n.ElementRef}]}],containerElementRef:[{type:n.ContentChild,args:["container",{read:n.ElementRef}]}]},e}(),b={provide:i.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return w}),multi:!0},y={provide:i.NG_VALIDATORS,useExisting:n.forwardRef(function(){return w}),multi:!0},x=function(){},w=function(){function e(e,t,i){this._elementRef=e,this.cdr=t,this.ds=i,this.onSelect=new n.EventEmitter,this.onDeSelect=new n.EventEmitter,this.onSelectAll=new n.EventEmitter,this.onDeSelectAll=new n.EventEmitter,this.onOpen=new n.EventEmitter,this.onClose=new n.EventEmitter,this.onScrollToEnd=new n.EventEmitter,this.onFilterSelectAll=new n.EventEmitter,this.onFilterDeSelectAll=new n.EventEmitter,this.onAddFilterNewItem=new n.EventEmitter,this.isActive=!1,this.isSelectAll=!1,this.isFilterSelectAll=!1,this.isInfiniteFilterSelectAll=!1,this.chunkIndex=[],this.cachedItems=[],this.groupCachedItems=[],this.itemHeight=41.6,this.filterLength=0,this.infiniteFilterLength=0,this.defaultSettings={singleSelection:!1,text:"Select",enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"UnSelect All",filterSelectAllText:"Select all filtered results",filterUnSelectAllText:"UnSelect all filtered results",enableSearchFilter:!1,searchBy:[],maxHeight:300,badgeShowLimit:999999999999,classes:"",disabled:!1,searchPlaceholderText:"Search",showCheckbox:!0,noDataLabel:"No Data Available",searchAutofocus:!0,lazyLoading:!1,labelKey:"itemName",primaryKey:"id",position:"bottom",enableFilterSelectAll:!0,selectGroup:!1,addNewItemOnFilter:!1,addNewButtonText:"Add"},this.filteredList=[],this.onTouchedCallback=x,this.onChangeCallback=x}return e.prototype.ngOnInit=function(){var t=this;this.settings=Object.assign(this.defaultSettings,this.settings),this.settings.groupBy&&(this.groupedData=this.transformData(this.data,this.settings.groupBy),this.groupCachedItems=this.cloneArray(this.groupedData)),this.cachedItems=this.cloneArray(this.data),"top"==this.settings.position&&setTimeout(function(){t.selectedListHeight={val:0},t.selectedListHeight.val=t.selectedListElem.nativeElement.clientHeight}),this.subscription=this.ds.getData().subscribe(function(e){if(e){var i=0;e.forEach(function(e,t){e.hasOwnProperty("grpTitle")||i++}),t.filterLength=i,t.onFilterChange(e)}})},e.prototype.ngOnChanges=function(e){e.data&&!e.data.firstChange&&(this.settings.groupBy&&(this.groupedData=this.transformData(this.data,this.settings.groupBy),0==this.data.length&&(this.selectedItems=[])),this.cachedItems=this.cloneArray(this.data)),e.settings&&!e.settings.firstChange&&(this.settings=Object.assign(this.defaultSettings,this.settings)),e.loading&&console.log(this.loading)},e.prototype.ngDoCheck=function(){this.selectedItems&&(0==this.selectedItems.length||0==this.data.length||this.selectedItems.length<this.data.length)&&(this.isSelectAll=!1)},e.prototype.ngAfterViewInit=function(){this.settings.lazyLoading},e.prototype.ngAfterViewChecked=function(){this.selectedListElem.nativeElement.clientHeight&&"top"==this.settings.position&&this.selectedListHeight&&(this.selectedListHeight.val=this.selectedListElem.nativeElement.clientHeight,this.cdr.detectChanges())},e.prototype.onItemClick=function(e,t,i){if(this.settings.disabled)return!1;var n=this.isSelected(e),s=this.selectedItems.length<this.settings.limitSelection;n?(this.removeSelected(e),this.onDeSelect.emit(e)):this.settings.limitSelection?s&&(this.addSelected(e),this.onSelect.emit(e)):(this.addSelected(e),this.onSelect.emit(e)),(this.isSelectAll||this.data.length>this.selectedItems.length)&&(this.isSelectAll=!1),this.data.length==this.selectedItems.length&&(this.isSelectAll=!0),this.settings.groupBy&&this.updateGroupInfo(e)},e.prototype.validate=function(e){return null},e.prototype.writeValue=function(e){if(e!==undefined&&null!==e)if(this.settings.singleSelection)try{if(1<e.length)throw this.selectedItems=[e[0]],new r(404,{msg:"Single Selection Mode, Selected Items cannot have more than one item."});this.selectedItems=e}catch(t){console.error(t.body.msg)}else this.settings.limitSelection?this.selectedItems=e.slice(0,this.settings.limitSelection):this.selectedItems=e,this.selectedItems.length===this.data.length&&0<this.data.length&&(this.isSelectAll=!0);else this.selectedItems=[]},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e.prototype.trackByFn=function(e,t){return t[this.settings.primaryKey]},e.prototype.isSelected=function(t){var i=this,n=!1;return this.selectedItems&&this.selectedItems.forEach(function(e){t[i.settings.primaryKey]===e[i.settings.primaryKey]&&(n=!0)}),n},e.prototype.addSelected=function(e){this.settings.singleSelection?(this.selectedItems=[],this.selectedItems.push(e),this.closeDropdown()):this.selectedItems.push(e),this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems)},e.prototype.removeSelected=function(t){var i=this;this.selectedItems&&this.selectedItems.forEach(function(e){t[i.settings.primaryKey]===e[i.settings.primaryKey]&&i.selectedItems.splice(i.selectedItems.indexOf(e),1)}),this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems)},e.prototype.toggleDropdown=function(e){var t=this;if(this.settings.disabled)return!1;this.isActive=!this.isActive,this.isActive?(this.settings.searchAutofocus&&this.searchInput&&this.settings.enableSearchFilter&&!this.searchTempl&&setTimeout(function(){t.searchInput.nativeElement.focus()},0),this.onOpen.emit(!0)):this.onClose.emit(!1),e.preventDefault()},e.prototype.closeDropdown=function(){this.searchInput&&this.settings.lazyLoading&&(this.searchInput.nativeElement.value=""),this.searchInput&&(this.searchInput.nativeElement.value=""),this.filter="",this.isActive=!1,this.onClose.emit(!1)},e.prototype.toggleSelectAll=function(){this.isSelectAll?(this.settings.groupBy&&this.groupedData.forEach(function(e){e.selected=!1}),this.selectedItems=[],this.isSelectAll=!1,this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems),this.onDeSelectAll.emit(this.selectedItems)):(this.selectedItems=[],this.settings.groupBy&&this.groupedData.forEach(function(e){e.selected=!0}),this.selectedItems=this.data.slice(),this.isSelectAll=!0,this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems),this.onSelectAll.emit(this.selectedItems))},e.prototype.toggleFilterSelectAll=function(){var t=this;if(this.isFilterSelectAll){var i=[];this.settings.groupBy?this.groupedData.forEach(function(e){e.value.forEach(function(e){t.isSelected(e)&&(t.removeSelected(e),i.push(e))})}):this.ds.getFilteredData().forEach(function(e){t.isSelected(e)&&(t.removeSelected(e),i.push(e))}),this.isFilterSelectAll=!1,this.onFilterDeSelectAll.emit(i)}else{var n=[];this.settings.groupBy?this.groupedData.forEach(function(e){e.value.forEach(function(e){t.isSelected(e)||(t.addSelected(e),n.push(e))})}):this.ds.getFilteredData().forEach(function(e){t.isSelected(e)||(t.addSelected(e),n.push(e))}),this.isFilterSelectAll=!0,this.onFilterSelectAll.emit(n)}},e.prototype.toggleInfiniteFilterSelectAll=function(){var t=this;this.isInfiniteFilterSelectAll?(this.data.forEach(function(e){t.isSelected(e)&&t.removeSelected(e)}),this.isInfiniteFilterSelectAll=!1):(this.data.forEach(function(e){t.isSelected(e)||t.addSelected(e)}),this.isInfiniteFilterSelectAll=!0)},e.prototype.clearSearch=function(){this.settings.groupBy?(this.filter="",this.groupedData=[],this.groupedData=this.cloneArray(this.groupCachedItems)):(this.filter="",this.isFilterSelectAll=!1)},e.prototype.onFilterChange=function(e){var t=this;(this.filter&&""==this.filter||0==e.length)&&(this.isFilterSelectAll=!1);var i=0;e.forEach(function(e){!e.hasOwnProperty("grpTitle")&&t.isSelected(e)&&i++}),0<i&&this.filterLength==i?this.isFilterSelectAll=!0:0<i&&this.filterLength!=i&&(this.isFilterSelectAll=!1),this.cdr.detectChanges()},e.prototype.cloneArray=function(e){if(Array.isArray(e))return JSON.parse(JSON.stringify(e));if("object"==typeof e)throw"Cannot clone array containing an object!";return e},e.prototype.updateGroupInfo=function(i){var n=this;this.groupedData.forEach(function(e){var t=0;e.grpTitle&&i[n.settings.groupBy]==e[n.settings.groupBy]&&e.list&&e.list.forEach(function(e){n.isSelected(e)&&t++}),e.list&&t===e.list.length?e.selected=!0:e.selected=!1})},e.prototype.transformData=function(e,i){var n=this,s=e.reduce(function(e,t){return e[t[i]]?e[t[i]].push(t):e[t[i]]=[t],e},{}),r=[];return Object.keys(s).map(function(e){var t={grpTitle:!0};t[n.settings.labelKey]=e,t[n.settings.groupBy]=e,t.selected=!1,t.list=[],s[e].forEach(function(e){t.list.push(e)}),r.push(t),t.list.forEach(function(e){r.push(e)})}),r},e.prototype.filterInfiniteList=function(i){var t=this,n=[];if(this.settings.groupBy?this.groupedData=this.groupCachedItems.slice():this.data=this.cachedItems.slice(),(null!=i.target.value||""!=i.target.value)&&!this.settings.groupBy){if(0<this.settings.searchBy.length)for(var s=0;s<this.settings.searchBy.length;s++)this.data.filter(function(e){0<=e[t.settings.searchBy[s].toString()].toString().toLowerCase().indexOf(i.target.value.toString().toLowerCase())&&n.push(e)});else this.data.filter(function(e){for(var t in e)if(0<=e[t].toString().toLowerCase().indexOf(i.target.value.toString().toLowerCase())){n.push(e);break}});this.data=[],this.data=n,this.infiniteFilterLength=this.data.length}""!=i.target.value.toString()&&this.settings.groupBy?(this.groupedData.filter(function(e){if(e.hasOwnProperty("grpTitle"))n.push(e);else for(var t in e)if(0<=e[t].toString().toLowerCase().indexOf(i.target.value.toString().toLowerCase())){n.push(e);break}}),this.groupedData=[],this.groupedData=n,this.infiniteFilterLength=this.groupedData.length):""==i.target.value.toString()&&0<this.cachedItems.length&&(this.data=[],this.data=this.cachedItems,this.infiniteFilterLength=0)},e.prototype.resetInfiniteSearch=function(){this.filter="",this.isInfiniteFilterSelectAll=!1,this.data=[],this.data=this.cachedItems,this.groupedData=this.groupCachedItems,this.infiniteFilterLength=0},e.prototype.onScrollEnd=function(e){this.onScrollToEnd.emit(e)},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.prototype.selectGroup=function(e){var t=this;e.selected?(e.selected=!1,e.list.forEach(function(e){t.removeSelected(e)})):(e.selected=!0,e.list.forEach(function(e){t.isSelected(e)||t.addSelected(e)}))},e.prototype.addFilterNewItem=function(){this.onAddFilterNewItem.emit(this.filter),this.filterPipe=new d(this.ds),this.filterPipe.transform(this.data,this.filter,this.settings.searchBy)},e.decorators=[{type:n.Component,args:[{selector:"angular2-multiselect",template:'<div class="cuppa-dropdown" (clickOutside)="closeDropdown()">\r\n <div class="selected-list" #selectedList>\r\n <div class="c-btn" (click)="toggleDropdown($event)" [ngClass]="{\'disabled\': settings.disabled}" [attr.tabindex]="0">\r\n\r\n <span *ngIf="selectedItems?.length == 0">{{settings.text}}</span>\r\n <span *ngIf="settings.singleSelection && !badgeTempl">\r\n <span *ngFor="let item of selectedItems;trackBy: trackByFn.bind(this);">\r\n {{item[settings.labelKey]}}\r\n </span>\r\n </span>\r\n <span class="c-list" *ngIf="selectedItems?.length > 0 && settings.singleSelection && badgeTempl ">\r\n <div class="c-token" *ngFor="let item of selectedItems;trackBy: trackByFn.bind(this);let k = index">\r\n <span *ngIf="!badgeTempl" class="c-label">{{item[settings.labelKey]}}</span>\r\n\r\n <span *ngIf="badgeTempl" class="c-label">\r\n <c-templateRenderer [data]="badgeTempl" [item]="item"></c-templateRenderer>\r\n </span>\r\n <span class="c-remove" (click)="onItemClick(item,k,$event)">\r\n <c-icon [name]="\'remove\'"></c-icon>\r\n </span>\r\n </div>\r\n </span>\r\n <div class="c-list" *ngIf="selectedItems?.length > 0 && !settings.singleSelection">\r\n <div class="c-token" *ngFor="let item of selectedItems;trackBy: trackByFn.bind(this);let k = index" [hidden]="k > settings.badgeShowLimit-1">\r\n <span *ngIf="!badgeTempl" class="c-label">{{item[settings.labelKey]}}</span>\r\n <span *ngIf="badgeTempl" class="c-label">\r\n <c-templateRenderer [data]="badgeTempl" [item]="item"></c-templateRenderer>\r\n </span>\r\n <span class="c-remove" (click)="onItemClick(item,k,$event)">\r\n <c-icon [name]="\'remove\'"></c-icon>\r\n </span>\r\n </div>\r\n </div>\r\n <span class="countplaceholder" *ngIf="selectedItems?.length > settings.badgeShowLimit">+{{selectedItems?.length - settings.badgeShowLimit }}</span>\r\n <span *ngIf="!isActive" class="c-angle-down">\r\n <c-icon [name]="\'angle-down\'"></c-icon>\r\n </span>\r\n <span *ngIf="isActive" class="c-angle-up">\r\n <c-icon [name]="\'angle-up\'"></c-icon>\r\n\r\n </span>\r\n </div>\r\n</div>\r\n<div [setPosition]="selectedListHeight?.val" class="dropdown-list" [ngClass]="{\'dropdown-list-top\': settings.position == \'top\'}"\r\n [hidden]="!isActive">\r\n <div [ngClass]="{\'arrow-up\': settings.position == \'bottom\', \'arrow-down\': settings.position == \'top\'}" class="arrow-2"></div>\r\n <div [ngClass]="{\'arrow-up\': settings.position == \'bottom\', \'arrow-down\': settings.position == \'top\'}"></div>\r\n <div class="list-area">\r\n <div class="pure-checkbox select-all" *ngIf="settings.enableCheckAll && !settings.singleSelection && !settings.limitSelection && data?.length > 0"\r\n (click)="toggleSelectAll()">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelectAll" [disabled]="settings.limitSelection == selectedItems?.length"\r\n />\r\n <label>\r\n <span [hidden]="isSelectAll">{{settings.selectAllText}}</span>\r\n <span [hidden]="!isSelectAll">{{settings.unSelectAllText}}</span>\r\n </label>\r\n <img class="loading-icon" *ngIf="loading" src="assets/img/loading.gif"/>\r\n </div>\r\n <div class="list-filter" *ngIf="settings.enableSearchFilter">\r\n <span class="c-search">\r\n <c-icon [name]="\'search\'"></c-icon>\r\n </span>\r\n <span *ngIf="!settings.lazyLoading" [hidden]="filter == undefined || filter?.length == 0" class="c-clear" (click)="clearSearch()">\r\n <c-icon [name]="\'clear\'"></c-icon>\r\n </span>\r\n <span *ngIf="settings.lazyLoading" [hidden]="filter == undefined || filter?.length == 0" class="c-clear" (click)="resetInfiniteSearch()">\r\n <c-icon [name]="\'clear\'"></c-icon>\r\n </span>\r\n\r\n <input class="c-input" *ngIf="!settings.lazyLoading && !searchTempl" #searchInput type="text" [placeholder]="settings.searchPlaceholderText"\r\n [(ngModel)]="filter">\r\n <input class="c-input" *ngIf="settings.lazyLoading && !searchTempl" #searchInput type="text" [placeholder]="settings.searchPlaceholderText"\r\n [(ngModel)]="filter" (keyup)="filterInfiniteList($event)">\r\n \x3c!-- <input class="c-input" *ngIf="!settings.lazyLoading && !searchTempl && settings.groupBy" #searchInput type="text" [placeholder]="settings.searchPlaceholderText"\r\n [(ngModel)]="filter" (keyup)="filterGroupList($event)">--\x3e\r\n <c-templateRenderer *ngIf="searchTempl" [data]="searchTempl" [item]="item"></c-templateRenderer>\r\n </div>\r\n <div class="filter-select-all" *ngIf="!settings.lazyLoading && settings.enableFilterSelectAll">\r\n <div class="pure-checkbox select-all" *ngIf="filter?.length > 0 && filterLength > 0" (click)="toggleFilterSelectAll()">\r\n <input type="checkbox" [checked]="isFilterSelectAll" [disabled]="settings.limitSelection == selectedItems?.length" />\r\n <label>\r\n <span [hidden]="isFilterSelectAll">{{settings.filterSelectAllText}}</span>\r\n <span [hidden]="!isFilterSelectAll">{{settings.filterUnSelectAllText}}</span>\r\n </label>\r\n </div>\r\n <label class="nodata-label" *ngIf="filterLength == 0" [hidden]="filter == undefined || filter?.length == 0">{{settings.noDataLabel}}</label>\r\n <div class="btn-container" *ngIf="settings.addNewItemOnFilter && filterLength == 0" [hidden]="filter == undefined || filter?.length == 0">\r\n <button class="c-btn btn-iceblue" (click)="addFilterNewItem()">{{settings.addNewButtonText}}</button>\r\n </div>\r\n </div>\r\n <div class="filter-select-all" *ngIf="settings.lazyLoading && settings.enableFilterSelectAll">\r\n <div class="pure-checkbox select-all" *ngIf="filter?.length > 0 && infiniteFilterLength > 0" (click)="toggleInfiniteFilterSelectAll()">\r\n <input type="checkbox" [checked]="isInfiniteFilterSelectAll" [disabled]="settings.limitSelection == selectedItems?.length"\r\n />\r\n <label>\r\n <span [hidden]="isInfiniteFilterSelectAll">{{settings.filterSelectAllText}}</span>\r\n <span [hidden]="!isInfiniteFilterSelectAll">{{settings.filterUnSelectAllText}}</span>\r\n </label>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf="!settings.groupBy && !settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of data | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf="!settings.groupBy && settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="data" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of viewPortItems | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item.id}} {{item[settings.labelKey]}}</label>\r\n </li>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="!settings.groupBy && !settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of data | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf="!settings.groupBy && settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="data" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of viewPortItems | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="settings.groupBy && settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="groupedData" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of viewPortItems | listFilter:filter : settings.searchBy; let i = index;">\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n <li *ngIf="item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </span>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="settings.groupBy && !settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of groupedData | listFilter:filter : settings.searchBy; let i = index;">\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n <li *ngIf="item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </span>\r\n </ul>\r\n </div>\r\n <div *ngIf="settings.groupBy && settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="groupedData" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of viewPortItems; let i = index;">\r\n <li *ngIf="item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle, \'selected-item\': isSelected(item) == true }" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && !item.grpTitle" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle, \'selected-item\': isSelected(item) == true }" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && !item.grpTitle" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n </span>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="settings.groupBy && !settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of groupedData | listFilter:filter : settings.searchBy; let i = index;">\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && !item.grpTitle" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n <li *ngIf="item.grpTitle && !settings.selectGroup" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && settings.selectGroup" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n <li (click)="selectGroup(item)" *ngIf="item.grpTitle && settings.selectGroup" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && settings.selectGroup" type="checkbox" [checked]="item.selected" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n </span>\r\n </ul>\r\n </div>\r\n <h5 class="list-message" *ngIf="data?.length == 0">{{settings.noDataLabel}}</h5>\r\n </div>\r\n</div>\r\n</div>',host:{"[class]":"defaultSettings.classes"},providers:[b,y],encapsulation:n.ViewEncapsulation.None,styles:["virtual-scroll{display:block;width:100%}.cuppa-dropdown{position:relative}.c-btn{display:inline-block;border-width:1px;line-height:1.25;border-radius:3px;font-size:14px;padding:5px 10px;cursor:pointer}.c-btn.disabled{background:#ccc}.selected-list .c-list{float:left;padding:0;margin:0;width:calc(100% - 20px)}.selected-list .c-list .c-token{list-style:none;padding:2px 25px 2px 8px;border-radius:2px;margin-right:4px;margin-top:2px;float:left;position:relative}.selected-list .c-list .c-token .c-label{display:block;float:left}.selected-list .c-list .c-token .c-remove{position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:10px}.selected-list .c-list .c-token .c-remove svg{fill:#fff}.selected-list .fa-angle-down,.selected-list .fa-angle-up{font-size:15pt;position:absolute;right:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.selected-list .c-angle-down,.selected-list .c-angle-up{width:15px;height:15px;position:absolute;right:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.selected-list .c-angle-down svg,.selected-list .c-angle-up svg{fill:#333}.selected-list .countplaceholder{position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.selected-list .c-btn{width:100%;padding:10px;cursor:pointer;display:flex;position:relative}.selected-list .c-btn .c-icon{position:absolute;right:5px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.dropdown-list{position:absolute;padding-top:14px;width:100%;z-index:9999}.dropdown-list ul{padding:0;list-style:none;overflow:auto;margin:0}.dropdown-list ul li{padding:10px;cursor:pointer;text-align:left}.dropdown-list ul li:first-child{padding-top:10px}.dropdown-list ul li:last-child{padding-bottom:10px}.dropdown-list ::-webkit-scrollbar{width:8px}.dropdown-list ::-webkit-scrollbar-thumb{background:#ccc;border-radius:5px}.dropdown-list ::-webkit-scrollbar-track{background:#f2f2f2}.arrow-down,.arrow-up{width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-bottom:15px solid #fff;margin-left:15px;position:absolute;top:0}.arrow-down{bottom:-14px;top:unset;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.arrow-2{border-bottom:15px solid #ccc;top:-1px}.arrow-down.arrow-2{top:unset;bottom:-16px}.list-area{border:1px solid #ccc;border-radius:3px;background:#fff;margin:0}.select-all{padding:10px;border-bottom:1px solid #ccc;text-align:left}.list-filter{border-bottom:1px solid #ccc;position:relative;padding-left:35px;height:35px}.list-filter input{border:0;width:100%;height:100%;padding:0}.list-filter input:focus{outline:0}.list-filter .c-search{position:absolute;top:9px;left:10px;width:15px;height:15px}.list-filter .c-search svg{fill:#888}.list-filter .c-clear{position:absolute;top:10px;right:10px;width:15px;height:15px}.list-filter .c-clear svg{fill:#888}.pure-checkbox input[type=checkbox]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{background-color:#f2f2f2}.pure-checkbox input[type=checkbox]:active+label:before{transition-duration:0s}.pure-checkbox input[type=checkbox]+label{position:relative;padding-left:2em;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;margin:0;font-weight:300}.pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:'';position:absolute;top:50%;left:0;width:14px;height:14px;margin-top:-9px;text-align:center;transition:.4s}.pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:'';position:absolute;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50%;transform-origin:50%;transition:transform .2s ease-out,-webkit-transform .2s ease-out;background-color:transparent;top:50%;left:4px;width:8px;height:3px;margin-top:-4px;border-style:solid;border-color:#fff;border-width:0 0 3px 3px;-o-border-image:none;border-image:none;-webkit-transform:rotate(-45deg) scale(0);transform:rotate(-45deg) scale(0)}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.pure-checkbox input[type=checkbox]:disabled:focus+label:before .pure-checkbox input[type=checkbox]:disabled:hover+label:before{background-color:inherit}.pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.pure-checkbox input[type=radio]:checked+label:after{-webkit-transform:scale(1);transform:scale(1)}.pure-checkbox input[type=radio]+label:before{border-radius:50%}.pure-checkbox input[type=checkbox]:checked+label:after{content:'';transition:transform .2s ease-out,-webkit-transform .2s ease-out;-webkit-transform:rotate(-45deg) scale(1);transform:rotate(-45deg) scale(1)}.list-message{text-align:center;margin:0;padding:15px 0;font-size:initial}.list-grp{padding:0 15px!important}.list-grp h4{text-transform:capitalize;margin:15px 0 0;font-size:14px;font-weight:700}.list-grp>li{padding-left:15px!important}.grp-item{padding-left:30px!important}.grp-title{padding-bottom:0!important}.grp-title label{margin-bottom:0!important;font-weight:800;text-transform:capitalize}.grp-title:hover{background:0 0!important}.loading-icon{width:20px;float:right}.nodata-label{width:100%;text-align:center;padding:10px 0 0}.btn-container{text-align:center;padding:0 5px 10px}"]}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.ChangeDetectorRef},{type:h}]},e.propDecorators={data:[{type:n.Input}],settings:[{type:n.Input}],loading:[{type:n.Input}],onSelect:[{type:n.Output,args:["onSelect"]}],onDeSelect:[{type:n.Output,args:["onDeSelect"]}],onSelectAll:[{type:n.Output,args:["onSelectAll"]}],onDeSelectAll:[{type:n.Output,args:["onDeSelectAll"]}],onOpen:[{type:n.Output,args:["onOpen"]}],onClose:[{type:n.Output,args:["onClose"]}],onScrollToEnd:[{type:n.Output,args:["onScrollToEnd"]}],onFilterSelectAll:[{type:n.Output,args:["onFilterSelectAll"]}],onFilterDeSelectAll:[{type:n.Output,args:["onFilterDeSelectAll"]}],onAddFilterNewItem:[{type:n.Output,args:["onAddFilterNewItem"]}],itemTempl:[{type:n.ContentChild,args:[p]}],badgeTempl:[{type:n.ContentChild,args:[g]}],searchTempl:[{type:n.ContentChild,args:[u]}],searchInput:[{type:n.ViewChild,args:["searchInput"]}],selectedListElem:[{type:n.ViewChild,args:["selectedList"]}]},e}(),S=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[s.CommonModule,i.FormsModule],declarations:[w,l,o,a,d,p,m,g,u,c,v,f],exports:[w,l,o,a,d,p,m,g,u,c,v,f],providers:[h]}]}],e}();e.AngularMultiSelect=w,e.ClickOutsideDirective=l,e.ListFilterPipe=d,e.Item=p,e.TemplateRenderer=m,e.AngularMultiSelectModule=S,e.ɵc=o,e.ɵe=c,e.ɵd=a,e.ɵf=g,e.ɵh=f,e.ɵg=u,e.ɵb=y,e.ɵa=b,e.ɵi=h,e.ɵj=v,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular2-multiselect-dropdown",["exports","@angular/core","rxjs","@angular/forms","@angular/common"],t):t(e["angular2-multiselect-dropdown"]={},e.ng.core,e.rxjs,e.ng.forms,e.ng.common)}(this,function(e,n,t,i,s){"use strict";var r=function I(e,t){this.status=e,this.body=t},l=function(){function e(e){this._elementRef=e,this.clickOutside=new n.EventEmitter}return e.prototype.onClick=function(e,t){t&&(this._elementRef.nativeElement.contains(t)||this.clickOutside.emit(e))},e.decorators=[{type:n.Directive,args:[{selector:"[clickOutside]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={clickOutside:[{type:n.Output}],onClick:[{type:n.HostListener,args:["document:click",["$event","$event.target"]]},{type:n.HostListener,args:["document:touchstart",["$event","$event.target"]]}]},e}(),o=function(){function e(e){this._elementRef=e,this.scroll=new n.EventEmitter}return e.prototype.onClick=function(e,t){this.scroll.emit(e)},e.decorators=[{type:n.Directive,args:[{selector:"[scroll]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={scroll:[{type:n.Output}],onClick:[{type:n.HostListener,args:["scroll",["$event"]]}]},e}(),a=function(){function e(e){this.el=e}return e.prototype.ngOnInit=function(){this.el.nativeElement.style.top=this.styleVal},e.prototype.ngOnChanges=function(){this.el.nativeElement.style.top=this.styleVal},e.decorators=[{type:n.Directive,args:[{selector:"[styleProp]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={styleVal:[{type:n.Input,args:["styleProp"]}]},e}(),c=function(){function e(e){this.el=e}return e.prototype.ngOnInit=function(){this.height&&(this.el.nativeElement.style.bottom=parseInt(this.height+15+"")+"px")},e.prototype.ngOnChanges=function(){this.height&&(this.el.nativeElement.style.bottom=parseInt(this.height+15+"")+"px")},e.decorators=[{type:n.Directive,args:[{selector:"[setPosition]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef}]},e.propDecorators={height:[{type:n.Input,args:["setPosition"]}]},e}(),h=function(){function e(){this.filteredData=[],this.subject=new t.Subject}return e.prototype.setData=function(e){this.filteredData=e,this.subject.next(e)},e.prototype.getData=function(){return this.subject.asObservable()},e.prototype.getFilteredData=function(){return this.filteredData&&0<this.filteredData.length?this.filteredData:[]},e.decorators=[{type:n.Injectable}],e}(),d=function(){function e(e){this.ds=e,this.filteredList=[]}return e.prototype.transform=function(e,t,i){var n=this;return e&&t?(this.filteredList=e.filter(function(e){return n.applyFilter(e,t,i)}),this.ds.setData(this.filteredList),this.filteredList):(this.ds.setData(e),e)},e.prototype.applyFilter=function(e,t,i){var n=!1;if(0<i.length)if(e.grpTitle)n=!0;else for(var s=0;s<i.length;s++)t&&e[i[s]]&&""!=e[i[s]]&&0<=e[i[s]].toString().toLowerCase().indexOf(t.toLowerCase())&&(n=!0);else if(e.grpTitle)n=!0;else for(var r in e)t&&e[r]&&0<=e[r].toString().toLowerCase().indexOf(t.toLowerCase())&&(n=!0);return n},e.decorators=[{type:n.Pipe,args:[{name:"listFilter",pure:!0}]}],e.ctorParameters=function(){return[{type:h}]},e}(),p=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-item",template:""}]}],e.ctorParameters=function(){return[]},e.propDecorators={template:[{type:n.ContentChild,args:[n.TemplateRef]}]},e}(),g=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-badge",template:""}]}],e.ctorParameters=function(){return[]},e.propDecorators={template:[{type:n.ContentChild,args:[n.TemplateRef]}]},e}(),u=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-search",template:""}]}],e.ctorParameters=function(){return[]},e.propDecorators={template:[{type:n.ContentChild,args:[n.TemplateRef]}]},e}(),m=function(){function e(e){this.viewContainer=e}return e.prototype.ngOnInit=function(){this.view=this.viewContainer.createEmbeddedView(this.data.template,{$implicit:this.data,item:this.item})},e.prototype.ngOnDestroy=function(){this.view.destroy()},e.decorators=[{type:n.Component,args:[{selector:"c-templateRenderer",template:""}]}],e.ctorParameters=function(){return[{type:n.ViewContainerRef}]},e.propDecorators={data:[{type:n.Input}],item:[{type:n.Input}]},e}(),f=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"c-icon",template:'<svg *ngIf="name == \'remove\'" width="100%" height="100%" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 47.971 47.971" style="enable-background:new 0 0 47.971 47.971;" xml:space="preserve">\n <g>\n <path d="M28.228,23.986L47.092,5.122c1.172-1.171,1.172-3.071,0-4.242c-1.172-1.172-3.07-1.172-4.242,0L23.986,19.744L5.121,0.88\n c-1.172-1.172-3.07-1.172-4.242,0c-1.172,1.171-1.172,3.071,0,4.242l18.865,18.864L0.879,42.85c-1.172,1.171-1.172,3.071,0,4.242\n C1.465,47.677,2.233,47.97,3,47.97s1.535-0.293,2.121-0.879l18.865-18.864L42.85,47.091c0.586,0.586,1.354,0.879,2.121,0.879\n s1.535-0.293,2.121-0.879c1.172-1.171,1.172-3.071,0-4.242L28.228,23.986z"/>\n </g>\n </svg>\n <svg *ngIf="name == \'angle-down\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">\n<g>\n\t<g id="_x31_0_34_">\n\t\t<g>\n\t\t\t<path d="M604.501,134.782c-9.999-10.05-26.222-10.05-36.221,0L306.014,422.558L43.721,134.782\n\t\t\t\tc-9.999-10.05-26.223-10.05-36.222,0s-9.999,26.35,0,36.399l279.103,306.241c5.331,5.357,12.422,7.652,19.386,7.296\n\t\t\t\tc6.988,0.356,14.055-1.939,19.386-7.296l279.128-306.268C614.5,161.106,614.5,144.832,604.501,134.782z"/>\n\t\t</g>\n\t</g>\n</g>\n</svg>\n<svg *ngIf="name == \'angle-up\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">\n<g>\n\t<g id="_x39__30_">\n\t\t<g>\n\t\t\t<path d="M604.501,440.509L325.398,134.956c-5.331-5.357-12.423-7.627-19.386-7.27c-6.989-0.357-14.056,1.913-19.387,7.27\n\t\t\t\tL7.499,440.509c-9.999,10.024-9.999,26.298,0,36.323s26.223,10.024,36.222,0l262.293-287.164L568.28,476.832\n\t\t\t\tc9.999,10.024,26.222,10.024,36.221,0C614.5,466.809,614.5,450.534,604.501,440.509z"/>\n\t\t</g>\n\t</g>\n</g>\n\n</svg>\n<svg *ngIf="name == \'search\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="100%" height="100%" viewBox="0 0 615.52 615.52" style="enable-background:new 0 0 615.52 615.52;"\n\t xml:space="preserve">\n<g>\n\t<g>\n\t\t<g id="Search__x28_and_thou_shall_find_x29_">\n\t\t\t<g>\n\t\t\t\t<path d="M602.531,549.736l-184.31-185.368c26.679-37.72,42.528-83.729,42.528-133.548C460.75,103.35,357.997,0,231.258,0\n\t\t\t\t\tC104.518,0,1.765,103.35,1.765,230.82c0,127.47,102.753,230.82,229.493,230.82c49.53,0,95.271-15.944,132.78-42.777\n\t\t\t\t\tl184.31,185.366c7.482,7.521,17.292,11.291,27.102,11.291c9.812,0,19.62-3.77,27.083-11.291\n\t\t\t\t\tC617.496,589.188,617.496,564.777,602.531,549.736z M355.9,319.763l-15.042,21.273L319.7,356.174\n\t\t\t\t\tc-26.083,18.658-56.667,28.526-88.442,28.526c-84.365,0-152.995-69.035-152.995-153.88c0-84.846,68.63-153.88,152.995-153.88\n\t\t\t\t\ts152.996,69.034,152.996,153.88C384.271,262.769,374.462,293.526,355.9,319.763z"/>\n\t\t\t</g>\n\t\t</g>\n\t</g>\n</g>\n\n</svg>\n<svg *ngIf="name == \'clear\'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 51.976 51.976" style="enable-background:new 0 0 51.976 51.976;" xml:space="preserve">\n<g>\n\t<path d="M44.373,7.603c-10.137-10.137-26.632-10.138-36.77,0c-10.138,10.138-10.137,26.632,0,36.77s26.632,10.138,36.77,0\n\t\tC54.51,34.235,54.51,17.74,44.373,7.603z M36.241,36.241c-0.781,0.781-2.047,0.781-2.828,0l-7.425-7.425l-7.778,7.778\n\t\tc-0.781,0.781-2.047,0.781-2.828,0c-0.781-0.781-0.781-2.047,0-2.828l7.778-7.778l-7.425-7.425c-0.781-0.781-0.781-2.048,0-2.828\n\t\tc0.781-0.781,2.047-0.781,2.828,0l7.425,7.425l7.071-7.071c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828\n\t\tl-7.071,7.071l7.425,7.425C37.022,34.194,37.022,35.46,36.241,36.241z"/>\n</g>\n</svg>',encapsulation:n.ViewEncapsulation.None}]}],e.propDecorators={name:[{type:n.Input}]},e}(),v=function(){function e(e,t,i){this.element=e,this.renderer=t,this.zone=i,this.window=window,this._enableUnequalChildrenSizes=!1,this.useMarginInsteadOfTranslate=!1,this._bufferAmount=0,this.scrollAnimationTime=750,this.resizeBypassRefreshTheshold=5,this._checkResizeInterval=1e3,this._items=[],this.compareItems=function(e,t){return e===t},this.update=new n.EventEmitter,this.vsUpdate=new n.EventEmitter,this.change=new n.EventEmitter,this.vsChange=new n.EventEmitter,this.start=new n.EventEmitter,this.vsStart=new n.EventEmitter,this.end=new n.EventEmitter,this.vsEnd=new n.EventEmitter,this.calculatedScrollbarWidth=0,this.calculatedScrollbarHeight=0,this.padding=0,this.previousViewPort={},this.cachedPageSize=0,this.previousScrollNumberElements=0,this.horizontal=!1,this.scrollThrottlingTime=0,this.resetWrapGroupDimensions()}return Object.defineProperty(e.prototype,"viewPortIndices",{get:function(){var e=this.previousViewPort||{};return{startIndex:e.startIndex||0,endIndex:e.endIndex||0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableUnequalChildrenSizes",{get:function(){return this._enableUnequalChildrenSizes},set:function(e){this._enableUnequalChildrenSizes!==e&&(this._enableUnequalChildrenSizes=e,this.minMeasuredChildWidth=undefined,this.minMeasuredChildHeight=undefined)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferAmount",{get:function(){return Math.max(this._bufferAmount,this.enableUnequalChildrenSizes?5:0)},set:function(e){this._bufferAmount=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollThrottlingTime",{get:function(){return this._scrollThrottlingTime},set:function(e){var t=this;this._scrollThrottlingTime=e,this.refresh_throttled=this.throttleTrailing(function(){t.refresh_internal(!1)},this._scrollThrottlingTime)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checkResizeInterval",{get:function(){return this._checkResizeInterval},set:function(e){this._checkResizeInterval!==e&&(this._checkResizeInterval=e,this.addScrollEventHandlers())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(e){e!==this._items&&(this._items=e||[],this.refresh_internal(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e,this.updateDirection()},enumerable:!0,configurable:!0}),e.prototype.revertParentOverscroll=function(){var e=this.getScrollElement();e&&this.oldParentScrollOverflow&&(e.style["overflow-y"]=this.oldParentScrollOverflow.y,e.style["overflow-x"]=this.oldParentScrollOverflow.x),this.oldParentScrollOverflow=undefined},Object.defineProperty(e.prototype,"parentScroll",{get:function(){return this._parentScroll},set:function(e){if(this._parentScroll!==e){this.revertParentOverscroll(),this._parentScroll=e,this.addScrollEventHandlers();var t=this.getScrollElement();t!==this.element.nativeElement&&(this.oldParentScrollOverflow={x:t.style["overflow-x"],y:t.style["overflow-y"]},t.style["overflow-y"]=this.horizontal?"visible":"auto",t.style["overflow-x"]=this.horizontal?"auto":"visible")}},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.addScrollEventHandlers()},e.prototype.ngOnDestroy=function(){this.removeScrollEventHandlers(),this.revertParentOverscroll()},e.prototype.ngOnChanges=function(e){var t=this.cachedItemsLength!==this.items.length;this.cachedItemsLength=this.items.length;var i=!e.items||!e.items.previousValue||0===e.items.previousValue.length;this.refresh_internal(t||i)},e.prototype.ngDoCheck=function(){this.cachedItemsLength!==this.items.length&&(this.cachedItemsLength=this.items.length,this.refresh_internal(!0))},e.prototype.refresh=function(){this.refresh_internal(!0)},e.prototype.scrollInto=function(e,t,i,n,s){void 0===t&&(t=!0),void 0===i&&(i=0),void 0===n&&(n=undefined),void 0===s&&(s=undefined);var r=this.items.indexOf(e);-1!==r&&this.scrollToIndex(r,t,i,n,s)},e.prototype.scrollToIndex=function(i,n,s,e,r){var l=this;void 0===n&&(n=!0),void 0===s&&(s=0),void 0===e&&(e=undefined),void 0===r&&(r=undefined);var o=5,a=function(){if(--o<=0)r&&r();else{var e=l.calculateDimensions(),t=Math.min(Math.max(i,0),e.itemCount-1);l.previousViewPort.startIndex!==t?l.scrollToIndex_internal(i,n,s,0,a):r&&r()}};this.scrollToIndex_internal(i,n,s,e,a)},e.prototype.scrollToIndex_internal=function(e,t,i,n,s){void 0===t&&(t=!0),void 0===i&&(i=0),void 0===n&&(n=undefined),void 0===s&&(s=undefined),n=n===undefined?this.scrollAnimationTime:n;var r=this.getScrollElement(),l=this.getElementsOffset(),o=this.calculateDimensions(),a=this.calculatePadding(e,o,!1)+l+i;if(t||(a-=o.wrapGroupsPerPage*o[this._childScrollDim]),!n)return this.renderer.setProperty(r,this._scrollType,a),void this.refresh_internal(!1,s)},e.prototype.checkScrollElementResized=function(){var e,t=this.getScrollElement().getBoundingClientRect();if(this.previousScrollBoundingRect){var i=Math.abs(t.width-this.previousScrollBoundingRect.width),n=Math.abs(t.height-this.previousScrollBoundingRect.height);e=i>this.resizeBypassRefreshTheshold||n>this.resizeBypassRefreshTheshold}else e=!0;e&&0<(this.previousScrollBoundingRect=t).width&&0<t.height&&this.refresh_internal(!1)},e.prototype.updateDirection=function(){this.horizontal?(this._invisiblePaddingProperty="width",this._offsetType="offsetLeft",this._pageOffsetType="pageXOffset",this._childScrollDim="childWidth",this._marginDir="margin-left",this._translateDir="translateX",this._scrollType="scrollLeft"):(this._invisiblePaddingProperty="height",this._offsetType="offsetTop",this._pageOffsetType="pageYOffset",this._childScrollDim="childHeight",this._marginDir="margin-top",this._translateDir="translateY",this._scrollType="scrollTop")},e.prototype.throttleTrailing=function(i,n){var s=undefined;return function(){var e=this,t=arguments;s||(n<=0?i.apply(e,t):s=setTimeout(function(){s=undefined,i.apply(e,t)},n))}},e.prototype.refresh_internal=function(r,l,o){var a=this;void 0===l&&(l=undefined),void 0===o&&(o=2),this.zone.runOutsideAngular(function(){requestAnimationFrame(function(){r&&a.resetWrapGroupDimensions();var e=a.calculateViewport(),t=r||e.startIndex!==a.previousViewPort.startIndex,i=r||e.endIndex!==a.previousViewPort.endIndex,n=e.scrollLength!==a.previousViewPort.scrollLength,s=e.padding!==a.previousViewPort.padding;if(a.previousViewPort=e,n&&a.renderer.setStyle(a.invisiblePaddingElementRef.nativeElement,a._invisiblePaddingProperty,e.scrollLength+"px"),s&&(a.useMarginInsteadOfTranslate?a.renderer.setStyle(a.contentElementRef.nativeElement,a._marginDir,e.padding+"px"):(a.renderer.setStyle(a.contentElementRef.nativeElement,"transform",a._translateDir+"("+e.padding+"px)"),a.renderer.setStyle(a.contentElementRef.nativeElement,"webkitTransform",a._translateDir+"("+e.padding+"px)"))),t||i)a.zone.run(function(){a.viewPortItems=0<=e.startIndexWithBuffer&&0<=e.endIndexWithBuffer?a.items.slice(e.startIndexWithBuffer,e.endIndexWithBuffer+1):[],a.update.emit(a.viewPortItems),a.vsUpdate.emit(a.viewPortItems),t&&(a.start.emit({start:e.startIndex,end:e.endIndex}),a.vsStart.emit({start:e.startIndex,end:e.endIndex})),i&&(a.end.emit({start:e.startIndex,end:e.endIndex}),a.vsEnd.emit({start:e.startIndex,end:e.endIndex})),(t||i)&&(a.change.emit({start:e.startIndex,end:e.endIndex}),a.vsChange.emit({start:e.startIndex,end:e.endIndex})),0<o?a.refresh_internal(!1,l,o-1):l&&l()});else{if(0<o&&(n||s))return void a.refresh_internal(!1,l,o-1);l&&l()}})})},e.prototype.getScrollElement=function(){return this.parentScroll instanceof Window?document.scrollingElement||document.documentElement||document.body:this.parentScroll||this.element.nativeElement},e.prototype.addScrollEventHandlers=function(){var e=this,t=this.getScrollElement();this.removeScrollEventHandlers(),this.zone.runOutsideAngular(function(){e.parentScroll instanceof Window?(e.disposeScrollHandler=e.renderer.listen("window","scroll",e.refresh_throttled),e.disposeResizeHandler=e.renderer.listen("window","resize",e.refresh_throttled)):(e.disposeScrollHandler=e.renderer.listen(t,"scroll",e.refresh_throttled),0<e._checkResizeInterval&&(e.checkScrollElementResizedTimer=setInterval(function(){e.checkScrollElementResized()},e._checkResizeInterval)))})},e.prototype.removeScrollEventHandlers=function(){this.checkScrollElementResizedTimer&&clearInterval(this.checkScrollElementResizedTimer),this.disposeScrollHandler&&(this.disposeScrollHandler(),this.disposeScrollHandler=undefined),this.disposeResizeHandler&&(this.disposeResizeHandler(),this.disposeResizeHandler=undefined)},e.prototype.getElementsOffset=function(){var e=0;if(this.containerElementRef&&this.containerElementRef.nativeElement&&(e+=this.containerElementRef.nativeElement[this._offsetType]),this.parentScroll){var t=this.getScrollElement(),i=this.element.nativeElement.getBoundingClientRect(),n=t.getBoundingClientRect();this.horizontal?e+=i.left-n.left:e+=i.top-n.top,this.parentScroll instanceof Window||(e+=t[this._scrollType])}return e},e.prototype.countItemsPerWrapGroup=function(){var e=this.horizontal?"offsetLeft":"offsetTop",t=(this.containerElementRef&&this.containerElementRef.nativeElement||this.contentElementRef.nativeElement).children,i=t?t.length:0;if(0===i)return 1;for(var n=t[0][e],s=1;s<i&&n===t[s][e];)++s;return s},e.prototype.getScrollPosition=function(){var e=undefined;this.parentScroll instanceof Window&&(e=(void 0)[this._pageOffsetType]);return e||this.getScrollElement()[this._scrollType]||0},e.prototype.resetWrapGroupDimensions=function(){var e=this.wrapGroupDimensions;if(this.wrapGroupDimensions={maxChildSizePerWrapGroup:[],numberOfKnownWrapGroupChildSizes:0,sumOfKnownWrapGroupChildWidths:0,sumOfKnownWrapGroupChildHeights:0},this.enableUnequalChildrenSizes&&e&&0!==e.numberOfKnownWrapGroupChildSizes)for(var t=this.countItemsPerWrapGroup(),i=0;i<e.maxChildSizePerWrapGroup.length;++i){var n=e.maxChildSizePerWrapGroup[i];if(n&&n.items&&n.items.length){if(n.items.length!==t)return;for(var s=!1,r=t*i,l=0;l<t;++l)if(!this.compareItems(n.items[l],this.items[r+l])){s=!0;break}s||(++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths+=n.childWidth||0,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights+=n.childHeight||0,this.wrapGroupDimensions.maxChildSizePerWrapGroup[i]=n)}}},e.prototype.calculateDimensions=function(){var e=this.getScrollElement(),t=this.items.length;this.calculatedScrollbarHeight=Math.max(Math.min(e.offsetHeight-e.clientHeight,25),this.calculatedScrollbarHeight),this.calculatedScrollbarWidth=Math.max(Math.min(e.offsetWidth-e.clientWidth,25),this.calculatedScrollbarWidth);var i,n,s,r=e.offsetWidth-(this.scrollbarWidth||this.calculatedScrollbarWidth||(this.horizontal?0:25)),l=e.offsetHeight-(this.scrollbarHeight||this.calculatedScrollbarHeight||(this.horizontal?25:0)),o=this.containerElementRef&&this.containerElementRef.nativeElement||this.contentElementRef.nativeElement,a=this.countItemsPerWrapGroup();if(this.enableUnequalChildrenSizes){for(var c=e[this._scrollType]-(this.previousViewPort?this.previousViewPort.padding:0),h=this.previousViewPort.startIndexWithBuffer||0,d=Math.ceil(h/a),p=0,g=0,u=0,m=0,f=i=0;f<o.children.length;++f){++h;k=o.children[f].getBoundingClientRect();if(p=Math.max(p,k.width),g=Math.max(g,k.height),h%a==0){var v=this.wrapGroupDimensions.maxChildSizePerWrapGroup[d];v&&(--this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths-=v.childWidth||0,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights-=v.childHeight||0),++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;var b=this.items.slice(h-a,h);if(this.wrapGroupDimensions.maxChildSizePerWrapGroup[d]={childWidth:p,childHeight:g,items:b},this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths+=p,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights+=g,this.horizontal){var y=Math.min(p,Math.max(r-u,0));if(0<c)y-=x=Math.min(c,y),c-=x;u+=y,0<y&&u<=r&&++i}else{var x,w=Math.min(g,Math.max(l-m,0));if(0<c)w-=x=Math.min(c,w),c-=x;m+=w,0<w&&m<=l&&++i}++d,g=p=0}}var S=this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths/this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,I=this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights/this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;n=this.childWidth||S||r,s=this.childHeight||I||l,this.horizontal?u<r&&(i+=Math.ceil((r-u)/n)):m<l&&(i+=Math.ceil((l-m)/s))}else{if(0<o.children.length){this.childWidth&&this.childHeight||(!this.minMeasuredChildWidth&&0<r&&(this.minMeasuredChildWidth=r),!this.minMeasuredChildHeight&&0<l&&(this.minMeasuredChildHeight=l));var k=o.children[0].getBoundingClientRect();this.minMeasuredChildWidth=Math.min(this.minMeasuredChildWidth,k.width),this.minMeasuredChildHeight=Math.min(this.minMeasuredChildHeight,k.height)}n=this.childWidth||this.minMeasuredChildWidth||r,s=this.childHeight||this.minMeasuredChildHeight||l;var C=Math.max(Math.ceil(r/n),1),E=Math.max(Math.ceil(l/s),1);i=this.horizontal?C:E}var T=a*i,D=t/T,z=Math.ceil(t/a),P=0,A=this.horizontal?n:s;if(this.enableUnequalChildrenSizes){var O=0;for(f=0;f<z;++f){var _=this.wrapGroupDimensions.maxChildSizePerWrapGroup[f]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[f][this._childScrollDim];_?P+=_:++O}P+=Math.round(O*A)}else P=z*A;return{itemCount:t,itemsPerWrapGroup:a,wrapGroupsPerPage:i,itemsPerPage:T,pageCount_fractional:D,childWidth:n,childHeight:s,scrollLength:P}},e.prototype.calculatePadding=function(e,t,i){if(0===t.itemCount)return 0;var n=t[this._childScrollDim],s=Math.ceil(e/t.itemsPerWrapGroup)||0;if(!this.enableUnequalChildrenSizes)return n*s;for(var r=0,l=0,o=0;o<s;++o){var a=this.wrapGroupDimensions.maxChildSizePerWrapGroup[o]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[o][this._childScrollDim];a?l+=a:++r}return l+=Math.round(r*n)},e.prototype.calculatePageInfo=function(e,t){var i=0;if(this.enableUnequalChildrenSizes)for(var n=Math.ceil(t.itemCount/t.itemsPerWrapGroup),s=0,r=t[this._childScrollDim],l=0;l<n;++l){var o=this.wrapGroupDimensions.maxChildSizePerWrapGroup[l]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[l][this._childScrollDim];if(e<(s+=o||r)){i=l/n;break}}else i=e/t.scrollLength;var a=Math.min(Math.max(i*t.pageCount_fractional,0),t.pageCount_fractional)*t.itemsPerPage,c=t.itemCount-t.itemsPerPage-1,h=Math.min(Math.floor(a),c);h-=h%t.itemsPerWrapGroup;var d=Math.ceil(a)+t.itemsPerPage-1;d+=t.itemsPerWrapGroup-(d+1)%t.itemsPerWrapGroup,isNaN(h)&&(h=0),isNaN(d)&&(d=0),h=Math.min(Math.max(h,0),t.itemCount-1),d=Math.min(Math.max(d,0),t.itemCount-1);var p=this.bufferAmount*t.itemsPerWrapGroup;return{startIndex:h,endIndex:d,startIndexWithBuffer:Math.min(Math.max(h-p,0),t.itemCount-1),endIndexWithBuffer:Math.min(Math.max(d+p,0),t.itemCount-1)}},e.prototype.calculateViewport=function(){var e=this.calculateDimensions(),t=this.getElementsOffset(),i=this.getScrollPosition();i>e.scrollLength&&!(this.parentScroll instanceof Window)?i=e.scrollLength:i-=t,i=Math.max(0,i);var n=this.calculatePageInfo(i,e),s=this.calculatePadding(n.startIndexWithBuffer,e,!0),r=e.scrollLength;return{startIndex:n.startIndex,endIndex:n.endIndex,startIndexWithBuffer:n.startIndexWithBuffer,endIndexWithBuffer:n.endIndexWithBuffer,padding:Math.round(s),scrollLength:Math.round(r)}},e.decorators=[{type:n.Component,args:[{selector:"virtual-scroll,[virtualScroll]",exportAs:"virtualScroll",template:'\n <div class="total-padding" #invisiblePadding></div>\n <div class="scrollable-content" #content>\n <ng-content></ng-content>\n </div>\n ',host:{"[class.horizontal]":"horizontal","[class.vertical]":"!horizontal","[class.selfScroll]":"!parentScroll"},styles:["\n :host {\n position: relative;\n\t display: block;\n -webkit-overflow-scrolling: touch;\n }\n\t\n\t:host.horizontal.selfScroll {\n overflow-y: visible;\n overflow-x: auto;\n\t}\n\t:host.vertical.selfScroll {\n overflow-y: auto;\n overflow-x: visible;\n\t}\n\t\n .scrollable-content {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100vw;\n max-height: 100vh;\n position: absolute;\n }\n\n\t.scrollable-content ::ng-deep > * {\n\t\tbox-sizing: border-box;\n\t}\n\t\n\t:host.horizontal {\n\t\twhite-space: nowrap;\n\t}\n\t\n\t:host.horizontal .scrollable-content {\n\t\tdisplay: flex;\n\t}\n\t\n\t:host.horizontal .scrollable-content ::ng-deep > * {\n\t\tflex-shrink: 0;\n\t\tflex-grow: 0;\n\t\twhite-space: initial;\n\t}\n\t\n .total-padding {\n width: 1px;\n opacity: 0;\n }\n \n :host.horizontal .total-padding {\n height: 100%;\n }\n "]}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2},{type:n.NgZone}]},e.propDecorators={enableUnequalChildrenSizes:[{type:n.Input}],useMarginInsteadOfTranslate:[{type:n.Input}],scrollbarWidth:[{type:n.Input}],scrollbarHeight:[{type:n.Input}],childWidth:[{type:n.Input}],childHeight:[{type:n.Input}],bufferAmount:[{type:n.Input}],scrollAnimationTime:[{type:n.Input}],resizeBypassRefreshTheshold:[{type:n.Input}],scrollThrottlingTime:[{type:n.Input}],checkResizeInterval:[{type:n.Input}],items:[{type:n.Input}],compareItems:[{type:n.Input}],horizontal:[{type:n.Input}],parentScroll:[{type:n.Input}],update:[{type:n.Output}],vsUpdate:[{type:n.Output}],change:[{type:n.Output}],vsChange:[{type:n.Output}],start:[{type:n.Output}],vsStart:[{type:n.Output}],end:[{type:n.Output}],vsEnd:[{type:n.Output}],contentElementRef:[{type:n.ViewChild,args:["content",{read:n.ElementRef}]}],invisiblePaddingElementRef:[{type:n.ViewChild,args:["invisiblePadding",{read:n.ElementRef}]}],containerElementRef:[{type:n.ContentChild,args:["container",{read:n.ElementRef}]}]},e}(),b={provide:i.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return w}),multi:!0},y={provide:i.NG_VALIDATORS,useExisting:n.forwardRef(function(){return w}),multi:!0},x=function(){},w=function(){function e(e,t,i){this._elementRef=e,this.cdr=t,this.ds=i,this.onSelect=new n.EventEmitter,this.onDeSelect=new n.EventEmitter,this.onSelectAll=new n.EventEmitter,this.onDeSelectAll=new n.EventEmitter,this.onOpen=new n.EventEmitter,this.onClose=new n.EventEmitter,this.onScrollToEnd=new n.EventEmitter,this.onFilterSelectAll=new n.EventEmitter,this.onFilterDeSelectAll=new n.EventEmitter,this.onAddFilterNewItem=new n.EventEmitter,this.isActive=!1,this.isSelectAll=!1,this.isFilterSelectAll=!1,this.isInfiniteFilterSelectAll=!1,this.chunkIndex=[],this.cachedItems=[],this.groupCachedItems=[],this.itemHeight=41.6,this.filterLength=0,this.infiniteFilterLength=0,this.defaultSettings={singleSelection:!1,text:"Select",enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"UnSelect All",filterSelectAllText:"Select all filtered results",filterUnSelectAllText:"UnSelect all filtered results",enableSearchFilter:!1,searchBy:[],maxHeight:300,badgeShowLimit:999999999999,classes:"",disabled:!1,searchPlaceholderText:"Search",showCheckbox:!0,noDataLabel:"No Data Available",searchAutofocus:!0,lazyLoading:!1,labelKey:"itemName",primaryKey:"id",position:"bottom",enableFilterSelectAll:!0,selectGroup:!1,addNewItemOnFilter:!1,addNewButtonText:"Add"},this.filteredList=[],this.onTouchedCallback=x,this.onChangeCallback=x}return e.prototype.ngOnInit=function(){var t=this;this.settings=Object.assign(this.defaultSettings,this.settings),this.settings.groupBy&&(this.groupedData=this.transformData(this.data,this.settings.groupBy),this.groupCachedItems=this.cloneArray(this.groupedData)),this.cachedItems=this.cloneArray(this.data),"top"==this.settings.position&&setTimeout(function(){t.selectedListHeight={val:0},t.selectedListHeight.val=t.selectedListElem.nativeElement.clientHeight}),this.subscription=this.ds.getData().subscribe(function(e){if(e){var i=0;e.forEach(function(e,t){e.hasOwnProperty("grpTitle")||i++}),t.filterLength=i,t.onFilterChange(e)}})},e.prototype.ngOnChanges=function(e){e.data&&!e.data.firstChange&&(this.settings.groupBy&&(this.groupedData=this.transformData(this.data,this.settings.groupBy),0==this.data.length&&(this.selectedItems=[])),this.cachedItems=this.cloneArray(this.data)),e.settings&&!e.settings.firstChange&&(this.settings=Object.assign(this.defaultSettings,this.settings)),e.loading&&console.log(this.loading)},e.prototype.ngDoCheck=function(){this.selectedItems&&(0==this.selectedItems.length||0==this.data.length||this.selectedItems.length<this.data.length)&&(this.isSelectAll=!1)},e.prototype.ngAfterViewInit=function(){this.settings.lazyLoading},e.prototype.ngAfterViewChecked=function(){this.selectedListElem.nativeElement.clientHeight&&"top"==this.settings.position&&this.selectedListHeight&&(this.selectedListHeight.val=this.selectedListElem.nativeElement.clientHeight,this.cdr.detectChanges())},e.prototype.onItemClick=function(e,t,i){if(this.settings.disabled)return!1;var n=this.isSelected(e),s=this.selectedItems.length<this.settings.limitSelection;n?(this.removeSelected(e),this.onDeSelect.emit(e)):this.settings.limitSelection?s&&(this.addSelected(e),this.onSelect.emit(e)):(this.addSelected(e),this.onSelect.emit(e)),(this.isSelectAll||this.data.length>this.selectedItems.length)&&(this.isSelectAll=!1),this.data.length==this.selectedItems.length&&(this.isSelectAll=!0),this.settings.groupBy&&this.updateGroupInfo(e)},e.prototype.validate=function(e){return null},e.prototype.writeValue=function(e){if(e!==undefined&&null!==e&&""!==e)if(this.settings.singleSelection)try{if(1<e.length)throw this.selectedItems=[e[0]],new r(404,{msg:"Single Selection Mode, Selected Items cannot have more than one item."});this.selectedItems=e}catch(t){console.error(t.body.msg)}else this.settings.limitSelection?this.selectedItems=e.slice(0,this.settings.limitSelection):this.selectedItems=e,this.selectedItems.length===this.data.length&&0<this.data.length&&(this.isSelectAll=!0);else this.selectedItems=[]},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e.prototype.trackByFn=function(e,t){return t[this.settings.primaryKey]},e.prototype.isSelected=function(t){var i=this,n=!1;return this.selectedItems&&this.selectedItems.forEach(function(e){t[i.settings.primaryKey]===e[i.settings.primaryKey]&&(n=!0)}),n},e.prototype.addSelected=function(e){this.settings.singleSelection?(this.selectedItems=[],this.selectedItems.push(e),this.closeDropdown()):this.selectedItems.push(e),this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems)},e.prototype.removeSelected=function(t){var i=this;this.selectedItems&&this.selectedItems.forEach(function(e){t[i.settings.primaryKey]===e[i.settings.primaryKey]&&i.selectedItems.splice(i.selectedItems.indexOf(e),1)}),this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems)},e.prototype.toggleDropdown=function(e){var t=this;if(this.settings.disabled)return!1;this.isActive=!this.isActive,this.isActive?(this.settings.searchAutofocus&&this.searchInput&&this.settings.enableSearchFilter&&!this.searchTempl&&setTimeout(function(){t.searchInput.nativeElement.focus()},0),this.onOpen.emit(!0)):this.onClose.emit(!1),e.preventDefault()},e.prototype.closeDropdown=function(){this.searchInput&&this.settings.lazyLoading&&(this.searchInput.nativeElement.value=""),this.searchInput&&(this.searchInput.nativeElement.value=""),this.filter="",this.isActive=!1,this.onClose.emit(!1)},e.prototype.toggleSelectAll=function(){this.isSelectAll?(this.settings.groupBy&&this.groupedData.forEach(function(e){e.selected=!1}),this.selectedItems=[],this.isSelectAll=!1,this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems),this.onDeSelectAll.emit(this.selectedItems)):(this.selectedItems=[],this.settings.groupBy&&this.groupedData.forEach(function(e){e.selected=!0}),this.selectedItems=this.data.slice(),this.isSelectAll=!0,this.onChangeCallback(this.selectedItems),this.onTouchedCallback(this.selectedItems),this.onSelectAll.emit(this.selectedItems))},e.prototype.toggleFilterSelectAll=function(){var t=this;if(this.isFilterSelectAll){var i=[];this.settings.groupBy?this.groupedData.forEach(function(e){e.value.forEach(function(e){t.isSelected(e)&&(t.removeSelected(e),i.push(e))})}):this.ds.getFilteredData().forEach(function(e){t.isSelected(e)&&(t.removeSelected(e),i.push(e))}),this.isFilterSelectAll=!1,this.onFilterDeSelectAll.emit(i)}else{var n=[];this.settings.groupBy?this.groupedData.forEach(function(e){e.value.forEach(function(e){t.isSelected(e)||(t.addSelected(e),n.push(e))})}):this.ds.getFilteredData().forEach(function(e){t.isSelected(e)||(t.addSelected(e),n.push(e))}),this.isFilterSelectAll=!0,this.onFilterSelectAll.emit(n)}},e.prototype.toggleInfiniteFilterSelectAll=function(){var t=this;this.isInfiniteFilterSelectAll?(this.data.forEach(function(e){t.isSelected(e)&&t.removeSelected(e)}),this.isInfiniteFilterSelectAll=!1):(this.data.forEach(function(e){t.isSelected(e)||t.addSelected(e)}),this.isInfiniteFilterSelectAll=!0)},e.prototype.clearSearch=function(){this.settings.groupBy?(this.filter="",this.groupedData=[],this.groupedData=this.cloneArray(this.groupCachedItems)):(this.filter="",this.isFilterSelectAll=!1)},e.prototype.onFilterChange=function(e){var t=this;(this.filter&&""==this.filter||0==e.length)&&(this.isFilterSelectAll=!1);var i=0;e.forEach(function(e){!e.hasOwnProperty("grpTitle")&&t.isSelected(e)&&i++}),0<i&&this.filterLength==i?this.isFilterSelectAll=!0:0<i&&this.filterLength!=i&&(this.isFilterSelectAll=!1),this.cdr.detectChanges()},e.prototype.cloneArray=function(e){if(Array.isArray(e))return JSON.parse(JSON.stringify(e));if("object"==typeof e)throw"Cannot clone array containing an object!";return e},e.prototype.updateGroupInfo=function(i){var n=this;this.groupedData.forEach(function(e){var t=0;e.grpTitle&&i[n.settings.groupBy]==e[n.settings.groupBy]&&e.list&&e.list.forEach(function(e){n.isSelected(e)&&t++}),e.list&&t===e.list.length?e.selected=!0:e.selected=!1})},e.prototype.transformData=function(e,i){var n=this,s=e.reduce(function(e,t){return e[t[i]]?e[t[i]].push(t):e[t[i]]=[t],e},{}),r=[];return Object.keys(s).map(function(e){var t={grpTitle:!0};t[n.settings.labelKey]=e,t[n.settings.groupBy]=e,t.selected=!1,t.list=[],s[e].forEach(function(e){t.list.push(e)}),r.push(t),t.list.forEach(function(e){r.push(e)})}),r},e.prototype.filterInfiniteList=function(i){var t=this,n=[];if(this.settings.groupBy?this.groupedData=this.groupCachedItems.slice():this.data=this.cachedItems.slice(),(null!=i.target.value||""!=i.target.value)&&!this.settings.groupBy){if(0<this.settings.searchBy.length)for(var s=0;s<this.settings.searchBy.length;s++)this.data.filter(function(e){0<=e[t.settings.searchBy[s].toString()].toString().toLowerCase().indexOf(i.target.value.toString().toLowerCase())&&n.push(e)});else this.data.filter(function(e){for(var t in e)if(0<=e[t].toString().toLowerCase().indexOf(i.target.value.toString().toLowerCase())){n.push(e);break}});this.data=[],this.data=n,this.infiniteFilterLength=this.data.length}""!=i.target.value.toString()&&this.settings.groupBy?(this.groupedData.filter(function(e){if(e.hasOwnProperty("grpTitle"))n.push(e);else for(var t in e)if(0<=e[t].toString().toLowerCase().indexOf(i.target.value.toString().toLowerCase())){n.push(e);break}}),this.groupedData=[],this.groupedData=n,this.infiniteFilterLength=this.groupedData.length):""==i.target.value.toString()&&0<this.cachedItems.length&&(this.data=[],this.data=this.cachedItems,this.infiniteFilterLength=0)},e.prototype.resetInfiniteSearch=function(){this.filter="",this.isInfiniteFilterSelectAll=!1,this.data=[],this.data=this.cachedItems,this.groupedData=this.groupCachedItems,this.infiniteFilterLength=0},e.prototype.onScrollEnd=function(e){this.onScrollToEnd.emit(e)},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.prototype.selectGroup=function(e){var t=this;e.selected?(e.selected=!1,e.list.forEach(function(e){t.removeSelected(e)})):(e.selected=!0,e.list.forEach(function(e){t.isSelected(e)||t.addSelected(e)}))},e.prototype.addFilterNewItem=function(){this.onAddFilterNewItem.emit(this.filter),this.filterPipe=new d(this.ds),this.filterPipe.transform(this.data,this.filter,this.settings.searchBy)},e.decorators=[{type:n.Component,args:[{selector:"angular2-multiselect",template:'<div class="cuppa-dropdown" (clickOutside)="closeDropdown()">\r\n <div class="selected-list" #selectedList>\r\n <div class="c-btn" (click)="toggleDropdown($event)" [ngClass]="{\'disabled\': settings.disabled}" [attr.tabindex]="0">\r\n\r\n <span *ngIf="selectedItems?.length == 0">{{settings.text}}</span>\r\n <span *ngIf="settings.singleSelection && !badgeTempl">\r\n <span *ngFor="let item of selectedItems;trackBy: trackByFn.bind(this);">\r\n {{item[settings.labelKey]}}\r\n </span>\r\n </span>\r\n <span class="c-list" *ngIf="selectedItems?.length > 0 && settings.singleSelection && badgeTempl ">\r\n <div class="c-token" *ngFor="let item of selectedItems;trackBy: trackByFn.bind(this);let k = index">\r\n <span *ngIf="!badgeTempl" class="c-label">{{item[settings.labelKey]}}</span>\r\n\r\n <span *ngIf="badgeTempl" class="c-label">\r\n <c-templateRenderer [data]="badgeTempl" [item]="item"></c-templateRenderer>\r\n </span>\r\n <span class="c-remove" (click)="onItemClick(item,k,$event)">\r\n <c-icon [name]="\'remove\'"></c-icon>\r\n </span>\r\n </div>\r\n </span>\r\n <div class="c-list" *ngIf="selectedItems?.length > 0 && !settings.singleSelection">\r\n <div class="c-token" *ngFor="let item of selectedItems;trackBy: trackByFn.bind(this);let k = index" [hidden]="k > settings.badgeShowLimit-1">\r\n <span *ngIf="!badgeTempl" class="c-label">{{item[settings.labelKey]}}</span>\r\n <span *ngIf="badgeTempl" class="c-label">\r\n <c-templateRenderer [data]="badgeTempl" [item]="item"></c-templateRenderer>\r\n </span>\r\n <span class="c-remove" (click)="onItemClick(item,k,$event)">\r\n <c-icon [name]="\'remove\'"></c-icon>\r\n </span>\r\n </div>\r\n </div>\r\n <span class="countplaceholder" *ngIf="selectedItems?.length > settings.badgeShowLimit">+{{selectedItems?.length - settings.badgeShowLimit }}</span>\r\n <span *ngIf="!isActive" class="c-angle-down">\r\n <c-icon [name]="\'angle-down\'"></c-icon>\r\n </span>\r\n <span *ngIf="isActive" class="c-angle-up">\r\n <c-icon [name]="\'angle-up\'"></c-icon>\r\n\r\n </span>\r\n </div>\r\n</div>\r\n<div [setPosition]="selectedListHeight?.val" class="dropdown-list" [ngClass]="{\'dropdown-list-top\': settings.position == \'top\'}"\r\n [hidden]="!isActive">\r\n <div [ngClass]="{\'arrow-up\': settings.position == \'bottom\', \'arrow-down\': settings.position == \'top\'}" class="arrow-2"></div>\r\n <div [ngClass]="{\'arrow-up\': settings.position == \'bottom\', \'arrow-down\': settings.position == \'top\'}"></div>\r\n <div class="list-area">\r\n <div class="pure-checkbox select-all" *ngIf="settings.enableCheckAll && !settings.singleSelection && !settings.limitSelection && data?.length > 0"\r\n (click)="toggleSelectAll()">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelectAll" [disabled]="settings.limitSelection == selectedItems?.length"\r\n />\r\n <label>\r\n <span [hidden]="isSelectAll">{{settings.selectAllText}}</span>\r\n <span [hidden]="!isSelectAll">{{settings.unSelectAllText}}</span>\r\n </label>\r\n <img class="loading-icon" *ngIf="loading" src="assets/img/loading.gif"/>\r\n </div>\r\n <div class="list-filter" *ngIf="settings.enableSearchFilter">\r\n <span class="c-search">\r\n <c-icon [name]="\'search\'"></c-icon>\r\n </span>\r\n <span *ngIf="!settings.lazyLoading" [hidden]="filter == undefined || filter?.length == 0" class="c-clear" (click)="clearSearch()">\r\n <c-icon [name]="\'clear\'"></c-icon>\r\n </span>\r\n <span *ngIf="settings.lazyLoading" [hidden]="filter == undefined || filter?.length == 0" class="c-clear" (click)="resetInfiniteSearch()">\r\n <c-icon [name]="\'clear\'"></c-icon>\r\n </span>\r\n\r\n <input class="c-input" *ngIf="!settings.lazyLoading && !searchTempl" #searchInput type="text" [placeholder]="settings.searchPlaceholderText"\r\n [(ngModel)]="filter">\r\n <input class="c-input" *ngIf="settings.lazyLoading && !searchTempl" #searchInput type="text" [placeholder]="settings.searchPlaceholderText"\r\n [(ngModel)]="filter" (keyup)="filterInfiniteList($event)">\r\n \x3c!-- <input class="c-input" *ngIf="!settings.lazyLoading && !searchTempl && settings.groupBy" #searchInput type="text" [placeholder]="settings.searchPlaceholderText"\r\n [(ngModel)]="filter" (keyup)="filterGroupList($event)">--\x3e\r\n <c-templateRenderer *ngIf="searchTempl" [data]="searchTempl" [item]="item"></c-templateRenderer>\r\n </div>\r\n <div class="filter-select-all" *ngIf="!settings.lazyLoading && settings.enableFilterSelectAll">\r\n <div class="pure-checkbox select-all" *ngIf="filter?.length > 0 && filterLength > 0" (click)="toggleFilterSelectAll()">\r\n <input type="checkbox" [checked]="isFilterSelectAll" [disabled]="settings.limitSelection == selectedItems?.length" />\r\n <label>\r\n <span [hidden]="isFilterSelectAll">{{settings.filterSelectAllText}}</span>\r\n <span [hidden]="!isFilterSelectAll">{{settings.filterUnSelectAllText}}</span>\r\n </label>\r\n </div>\r\n <label class="nodata-label" *ngIf="filterLength == 0" [hidden]="filter == undefined || filter?.length == 0">{{settings.noDataLabel}}</label>\r\n <div class="btn-container" *ngIf="settings.addNewItemOnFilter && filterLength == 0" [hidden]="filter == undefined || filter?.length == 0">\r\n <button class="c-btn btn-iceblue" (click)="addFilterNewItem()">{{settings.addNewButtonText}}</button>\r\n </div>\r\n </div>\r\n <div class="filter-select-all" *ngIf="settings.lazyLoading && settings.enableFilterSelectAll">\r\n <div class="pure-checkbox select-all" *ngIf="filter?.length > 0 && infiniteFilterLength > 0" (click)="toggleInfiniteFilterSelectAll()">\r\n <input type="checkbox" [checked]="isInfiniteFilterSelectAll" [disabled]="settings.limitSelection == selectedItems?.length"\r\n />\r\n <label>\r\n <span [hidden]="isInfiniteFilterSelectAll">{{settings.filterSelectAllText}}</span>\r\n <span [hidden]="!isInfiniteFilterSelectAll">{{settings.filterUnSelectAllText}}</span>\r\n </label>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf="!settings.groupBy && !settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of data | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf="!settings.groupBy && settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="data" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of viewPortItems | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item.id}} {{item[settings.labelKey]}}</label>\r\n </li>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="!settings.groupBy && !settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of data | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf="!settings.groupBy && settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="data" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n\r\n <ul class="lazyContainer">\r\n <li *ngFor="let item of viewPortItems | listFilter:filter : settings.searchBy; let i = index;" (click)="onItemClick(item,i,$event)"\r\n class="pure-checkbox" [ngClass]="{\'selected-item\': isSelected(item) == true }">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="settings.groupBy && settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="groupedData" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of viewPortItems | listFilter:filter : settings.searchBy; let i = index;">\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n <li *ngIf="item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </span>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="settings.groupBy && !settings.lazyLoading && itemTempl != undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of groupedData | listFilter:filter : settings.searchBy; let i = index;">\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n <li *ngIf="item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label></label>\r\n <c-templateRenderer [data]="itemTempl" [item]="item"></c-templateRenderer>\r\n </li>\r\n </span>\r\n </ul>\r\n </div>\r\n <div *ngIf="settings.groupBy && settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <virtual-scroll [items]="groupedData" (vsUpdate)="viewPortItems = $event" (vsEnd)="onScrollEnd($event)" [ngStyle]="{\'height\': settings.maxHeight+\'px\'}">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of viewPortItems; let i = index;">\r\n <li *ngIf="item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle, \'selected-item\': isSelected(item) == true }" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && !item.grpTitle" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle, \'selected-item\': isSelected(item) == true }" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && !item.grpTitle" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n </span>\r\n </ul>\r\n </virtual-scroll>\r\n </div>\r\n <div *ngIf="settings.groupBy && !settings.lazyLoading && itemTempl == undefined" [style.maxHeight]="settings.maxHeight+\'px\'" style="overflow: auto;">\r\n <ul class="lazyContainer">\r\n <span *ngFor="let item of groupedData | listFilter:filter : settings.searchBy; let i = index;">\r\n <li (click)="onItemClick(item,i,$event)" *ngIf="!item.grpTitle" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && !item.grpTitle" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n <li *ngIf="item.grpTitle && !settings.selectGroup" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && settings.selectGroup" type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n <li (click)="selectGroup(item)" *ngIf="item.grpTitle && settings.selectGroup" [ngClass]="{\'grp-title\': item.grpTitle,\'grp-item\': !item.grpTitle}" class="pure-checkbox">\r\n <input *ngIf="settings.showCheckbox && settings.selectGroup" type="checkbox" [checked]="item.selected" [disabled]="settings.limitSelection == selectedItems?.length && !isSelected(item)"\r\n />\r\n <label>{{item[settings.labelKey]}}</label>\r\n </li>\r\n </span>\r\n </ul>\r\n </div>\r\n <h5 class="list-message" *ngIf="data?.length == 0">{{settings.noDataLabel}}</h5>\r\n </div>\r\n</div>\r\n</div>',host:{"[class]":"defaultSettings.classes"},providers:[b,y],encapsulation:n.ViewEncapsulation.None,styles:["virtual-scroll{display:block;width:100%}.cuppa-dropdown{position:relative}.c-btn{display:inline-block;border-width:1px;line-height:1.25;border-radius:3px;font-size:14px;padding:5px 10px;cursor:pointer}.c-btn.disabled{background:#ccc}.selected-list .c-list{float:left;padding:0;margin:0;width:calc(100% - 20px)}.selected-list .c-list .c-token{list-style:none;padding:2px 25px 2px 8px;border-radius:2px;margin-right:4px;margin-top:2px;float:left;position:relative}.selected-list .c-list .c-token .c-label{display:block;float:left}.selected-list .c-list .c-token .c-remove{position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:10px}.selected-list .c-list .c-token .c-remove svg{fill:#fff}.selected-list .fa-angle-down,.selected-list .fa-angle-up{font-size:15pt;position:absolute;right:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.selected-list .c-angle-down,.selected-list .c-angle-up{width:15px;height:15px;position:absolute;right:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.selected-list .c-angle-down svg,.selected-list .c-angle-up svg{fill:#333}.selected-list .countplaceholder{position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.selected-list .c-btn{width:100%;padding:10px;cursor:pointer;display:flex;position:relative}.selected-list .c-btn .c-icon{position:absolute;right:5px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.dropdown-list{position:absolute;padding-top:14px;width:100%;z-index:9999}.dropdown-list ul{padding:0;list-style:none;overflow:auto;margin:0}.dropdown-list ul li{padding:10px;cursor:pointer;text-align:left}.dropdown-list ul li:first-child{padding-top:10px}.dropdown-list ul li:last-child{padding-bottom:10px}.dropdown-list ::-webkit-scrollbar{width:8px}.dropdown-list ::-webkit-scrollbar-thumb{background:#ccc;border-radius:5px}.dropdown-list ::-webkit-scrollbar-track{background:#f2f2f2}.arrow-down,.arrow-up{width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-bottom:15px solid #fff;margin-left:15px;position:absolute;top:0}.arrow-down{bottom:-14px;top:unset;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.arrow-2{border-bottom:15px solid #ccc;top:-1px}.arrow-down.arrow-2{top:unset;bottom:-16px}.list-area{border:1px solid #ccc;border-radius:3px;background:#fff;margin:0}.select-all{padding:10px;border-bottom:1px solid #ccc;text-align:left}.list-filter{border-bottom:1px solid #ccc;position:relative;padding-left:35px;height:35px}.list-filter input{border:0;width:100%;height:100%;padding:0}.list-filter input:focus{outline:0}.list-filter .c-search{position:absolute;top:9px;left:10px;width:15px;height:15px}.list-filter .c-search svg{fill:#888}.list-filter .c-clear{position:absolute;top:10px;right:10px;width:15px;height:15px}.list-filter .c-clear svg{fill:#888}.pure-checkbox input[type=checkbox]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{background-color:#f2f2f2}.pure-checkbox input[type=checkbox]:active+label:before{transition-duration:0s}.pure-checkbox input[type=checkbox]+label{position:relative;padding-left:2em;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;margin:0;font-weight:300}.pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:'';position:absolute;top:50%;left:0;width:14px;height:14px;margin-top:-9px;text-align:center;transition:.4s}.pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:'';position:absolute;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50%;transform-origin:50%;transition:transform .2s ease-out,-webkit-transform .2s ease-out;background-color:transparent;top:50%;left:4px;width:8px;height:3px;margin-top:-4px;border-style:solid;border-color:#fff;border-width:0 0 3px 3px;-o-border-image:none;border-image:none;-webkit-transform:rotate(-45deg) scale(0);transform:rotate(-45deg) scale(0)}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.pure-checkbox input[type=checkbox]:disabled:focus+label:before .pure-checkbox input[type=checkbox]:disabled:hover+label:before{background-color:inherit}.pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.pure-checkbox input[type=radio]:checked+label:after{-webkit-transform:scale(1);transform:scale(1)}.pure-checkbox input[type=radio]+label:before{border-radius:50%}.pure-checkbox input[type=checkbox]:checked+label:after{content:'';transition:transform .2s ease-out,-webkit-transform .2s ease-out;-webkit-transform:rotate(-45deg) scale(1);transform:rotate(-45deg) scale(1)}.list-message{text-align:center;margin:0;padding:15px 0;font-size:initial}.list-grp{padding:0 15px!important}.list-grp h4{text-transform:capitalize;margin:15px 0 0;font-size:14px;font-weight:700}.list-grp>li{padding-left:15px!important}.grp-item{padding-left:30px!important}.grp-title{padding-bottom:0!important}.grp-title label{margin-bottom:0!important;font-weight:800;text-transform:capitalize}.grp-title:hover{background:0 0!important}.loading-icon{width:20px;float:right}.nodata-label{width:100%;text-align:center;padding:10px 0 0}.btn-container{text-align:center;padding:0 5px 10px}"]}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.ChangeDetectorRef},{type:h}]},e.propDecorators={data:[{type:n.Input}],settings:[{type:n.Input}],loading:[{type:n.Input}],onSelect:[{type:n.Output,args:["onSelect"]}],onDeSelect:[{type:n.Output,args:["onDeSelect"]}],onSelectAll:[{type:n.Output,args:["onSelectAll"]}],onDeSelectAll:[{type:n.Output,args:["onDeSelectAll"]}],onOpen:[{type:n.Output,args:["onOpen"]}],onClose:[{type:n.Output,args:["onClose"]}],onScrollToEnd:[{type:n.Output,args:["onScrollToEnd"]}],onFilterSelectAll:[{type:n.Output,args:["onFilterSelectAll"]}],onFilterDeSelectAll:[{type:n.Output,args:["onFilterDeSelectAll"]}],onAddFilterNewItem:[{type:n.Output,args:["onAddFilterNewItem"]}],itemTempl:[{type:n.ContentChild,args:[p]}],badgeTempl:[{type:n.ContentChild,args:[g]}],searchTempl:[{type:n.ContentChild,args:[u]}],searchInput:[{type:n.ViewChild,args:["searchInput"]}],selectedListElem:[{type:n.ViewChild,args:["selectedList"]}]},e}(),S=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[s.CommonModule,i.FormsModule],declarations:[w,l,o,a,d,p,m,g,u,c,v,f],exports:[w,l,o,a,d,p,m,g,u,c,v,f],providers:[h]}]}],e}();e.AngularMultiSelect=w,e.ClickOutsideDirective=l,e.ListFilterPipe=d,e.Item=p,e.TemplateRenderer=m,e.AngularMultiSelectModule=S,e.ɵc=o,e.ɵe=c,e.ɵd=a,e.ɵf=g,e.ɵh=f,e.ɵg=u,e.ɵb=y,e.ɵa=b,e.ɵi=h,e.ɵj=v,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=angular2-multiselect-dropdown.umd.min.js.map
{
"name": "angular2-multiselect-dropdown",
"version": "4.1.0",
"version": "4.1.1",
"description": "Angular 2 and angular 4/6 multiselect dropdown component.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc