@ng-select/ng-select
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -1,3 +0,3 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/forms","@angular/common"],t):t(e.ngSelect=e.ngSelect||{},e.ng.core,e.ng.forms,e.ng.common)}(this,function(e,t,i,n){"use strict";function o(e){var t=function(e){return c[e]||e};return e.replace(/[^\u0000-\u007E]/g,t)}var s=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[ng-option-tmp]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),r=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[ng-display-tmp]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),a=function(){function e(e){var i=this;this.element=e,this.items=[],this.bufferAmount=0,this.update=new t.EventEmitter,this.change=new t.EventEmitter,this.start=new t.EventEmitter,this.end=new t.EventEmitter,this.startupLoop=!0,this.refreshHandler=function(){i.refresh()}}return Object.defineProperty(e.prototype,"parentScroll",{get:function(){return this._parentScroll},set:function(e){this._parentScroll!==e&&(this.removeParentEventHandlers(this._parentScroll),this._parentScroll=e,this.addParentEventHandlers(this._parentScroll))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this.items&&this.items.length>20},enumerable:!0,configurable:!0}),e.prototype.onScroll=function(){if(!this.enabled)return void this.update.emit(this.items);this.refresh()},e.prototype.ngOnInit=function(){this.scrollbarWidth=0,this.scrollbarHeight=0},e.prototype.ngOnDestroy=function(){this.removeParentEventHandlers(this.parentScroll)},e.prototype.ngOnChanges=function(e){this.previousStart=void 0,this.previousEnd=void 0;var t=e.items||{};(void 0!==e.items&&void 0===t.previousValue||void 0!==t.previousValue&&0===t.previousValue.length)&&(this.startupLoop=!0),this.items=t.currentValue,this.refresh()},e.prototype.refresh=function(){var e=this;if(!this.enabled)return void this.update.emit(this.items);requestAnimationFrame(function(){return e.calculateItems()})},e.prototype.scrollInto=function(e){var t=this.parentScroll instanceof Window?document.body:this.parentScroll||this.element.nativeElement,i=(this.items||[]).indexOf(e);if(!(i<0||i>=(this.items||[]).length)){var n=this.calculateDimensions();t.scrollTop=Math.floor(i/n.itemsPerRow)*n.childHeight-n.childHeight*Math.min(i,this.bufferAmount),this.refresh()}},e.prototype.addParentEventHandlers=function(e){e&&(e.addEventListener("scroll",this.refreshHandler),e instanceof Window&&e.addEventListener("resize",this.refreshHandler))},e.prototype.removeParentEventHandlers=function(e){e&&(e.removeEventListener("scroll",this.refreshHandler),e instanceof Window&&e.removeEventListener("resize",this.refreshHandler))},e.prototype.countItemsPerRow=function(){var e,t,i=this.contentElementRef.nativeElement.children;for(t=0;t<i.length&&(void 0===e||e===i[t].offsetTop);t++)e=i[t].offsetTop;return t},e.prototype.getElementsOffset=function(){var e=0;return this.containerElementRef&&this.containerElementRef.nativeElement&&(e+=this.containerElementRef.nativeElement.offsetTop),this.parentScroll&&(e+=this.element.nativeElement.offsetTop),e},e.prototype.calculateDimensions=function(){var e,t=this.parentScroll instanceof Window?document.body:this.parentScroll||this.element.nativeElement,i=this.items||[],n=i.length,o=t.clientWidth-this.scrollbarWidth,s=t.clientHeight-this.scrollbarHeight;if(void 0===this.childWidth||void 0===this.childHeight){var r=this.contentElementRef.nativeElement;this.containerElementRef&&this.containerElementRef.nativeElement&&(r=this.containerElementRef.nativeElement),e=r.children[0]?r.children[0].getBoundingClientRect():{width:o,height:s}}var a=this.childWidth||e.width,l=this.childHeight||e.height,p=Math.max(1,this.countItemsPerRow()),c=Math.max(1,Math.floor(o/a)),h=Math.max(1,Math.floor(s/l)),d=Math.max(0,t.scrollTop);return 1===h&&Math.floor(d/this.scrollHeight*n)+c>=n&&(p=c),{itemCount:n,viewWidth:o,viewHeight:s,childWidth:a,childHeight:l,itemsPerRow:p,itemsPerCol:h,itemsPerRowByCalc:c}},e.prototype.calculateItems=function(){var e=this.parentScroll instanceof Window?document.body:this.parentScroll||this.element.nativeElement,t=this.calculateDimensions(),i=this.items||[],n=this.getElementsOffset();this.scrollHeight=t.childHeight*t.itemCount/t.itemsPerRow,e.scrollTop>this.scrollHeight&&(e.scrollTop=this.scrollHeight+n);var o=Math.max(0,e.scrollTop-n),s=o/this.scrollHeight*t.itemCount/t.itemsPerRow,r=Math.min(t.itemCount,Math.ceil(s)*t.itemsPerRow+t.itemsPerRow*(t.itemsPerCol+1)),a=r,l=r%t.itemsPerRow;l&&(a=r+t.itemsPerRow-l);var p=Math.max(0,a-t.itemsPerCol*t.itemsPerRow-t.itemsPerRow),c=Math.min(p,Math.floor(s)*t.itemsPerRow);this.topPadding=t.childHeight*Math.ceil(c/t.itemsPerRow)-t.childHeight*Math.min(c,this.bufferAmount),c=isNaN(c)?-1:c,r=isNaN(r)?-1:r,c-=this.bufferAmount,c=Math.max(0,c),r+=this.bufferAmount,r=Math.min(i.length,r),c!==this.previousStart||r!==this.previousEnd?(this.update.emit(i.slice(c,r)),c!==this.previousStart&&!1===this.startupLoop&&this.start.emit({start:c,end:r}),r!==this.previousEnd&&!1===this.startupLoop&&this.end.emit({start:c,end:r}),this.previousStart=c,this.previousEnd=r,!0===this.startupLoop?this.refresh():this.change.emit({start:c,end:r})):!0===this.startupLoop&&(this.startupLoop=!1,this.refresh())},e.decorators=[{type:t.Component,args:[{selector:"virtual-scroll,[virtualScroll]",exportAs:"virtualScroll",template:"\n <div *ngIf=\"enabled\" class=\"total-padding\" [style.height]=\"scrollHeight + 'px'\"></div>\n <div #content\n [class.scrollable-content]=\"enabled\"\n [style.transform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\"\n [style.webkitTransform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\">\n <ng-content></ng-content>\n </div>\n ",host:{"[style.overflow-y]":"parentScroll ? 'hidden' : 'auto'"},styles:["\n :host {\n overflow: hidden;\n position: relative;\n display: block;\n -webkit-overflow-scrolling: touch;\n }\n\n .scrollable-content {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n }\n\n .total-padding {\n width: 1px;\n opacity: 0;\n }\n "]}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={items:[{type:t.Input}],scrollbarWidth:[{type:t.Input}],scrollbarHeight:[{type:t.Input}],childWidth:[{type:t.Input}],childHeight:[{type:t.Input}],bufferAmount:[{type:t.Input}],update:[{type:t.Output}],change:[{type:t.Output}],start:[{type:t.Output}],end:[{type:t.Output}],contentElementRef:[{type:t.ViewChild,args:["content",{read:t.ElementRef}]}],containerElementRef:[{type:t.ContentChild,args:["container"]}],parentScroll:[{type:t.Input}],onScroll:[{type:t.HostListener,args:["scroll"]}]},e}(),l=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],exports:[a],declarations:[a]}]}],e.ctorParameters=function(){return[]},e}(),p={};p.Tab=9,p.Enter=13,p.Esc=27,p.Space=32,p.ArrowUp=38,p.ArrowDown=40,p[p.Tab]="Tab",p[p.Enter]="Enter",p[p.Esc]="Esc",p[p.Space]="Space",p[p.ArrowUp]="ArrowUp",p[p.ArrowDown]="ArrowDown";var c={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},h=function(){function e(e,t){this.items=[],this.filteredItems=[],this.markedItem=null,this._markedItemIndex=-1,this._selected=[],this.items=e,this.filteredItems=e.slice(),this._multiple=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this._multiple?this._selected:this._selected[0]||null},enumerable:!0,configurable:!0}),e.prototype.select=function(e){this._multiple||this.clearSelected(),this._selected.push(e),e.selected=!0},e.prototype.unSelect=function(e){this._selected=this._selected.filter(function(t){return t!==e}),e.selected=!1},e.prototype.clearSelected=function(){this._selected.forEach(function(e){e.selected=!1,e.marked=!1}),this._selected=[]},e.prototype.filter=function(e,t){this.unmarkCurrentItem();var i=this.getDefaultFilterFunc(e,t);this.filteredItems=e?this.items.filter(function(e){return i(e)}):this.items,this.markItem(0)},e.prototype.clearFilter=function(){this.filteredItems=this.items.slice()},e.prototype.markNextItem=function(){this.stepToItem(1)},e.prototype.markPreviousItem=function(){this.stepToItem(-1)},e.prototype.markSelection=function(){if(0!==this.filteredItems.length){var e=this._selected[this._selected.length-1],t=e?this.filteredItems.indexOf(e):0;this.markItem(t)}},e.prototype.unmarkCurrentItem=function(){this.markedItem&&(this.markedItem.marked=!1)},e.prototype.getNextItemIndex=function(e){return e>0?this._markedItemIndex===this.filteredItems.length-1?0:this._markedItemIndex+1:0===this._markedItemIndex?this.filteredItems.length-1:this._markedItemIndex-1},e.prototype.stepToItem=function(e){if(0!==this.filteredItems.length){for(this._markedItemIndex=this.getNextItemIndex(e),this.unmarkCurrentItem(),this.markedItem=this.filteredItems[this._markedItemIndex];this.markedItem.disabled;)this.stepToItem(e);this.markedItem.marked=!0}},e.prototype.getDefaultFilterFunc=function(e,t){return function(i){return o(i[t]).toUpperCase().indexOf(o(e).toUpperCase())>-1}},e.prototype.markItem=function(e){this._markedItemIndex=e,this.markedItem=this.filteredItems[this._markedItemIndex],this.markedItem&&(this.markedItem.marked=!0)},e}(),d={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return u}),multi:!0},u=function(){function e(e,i){this.changeDetectorRef=e,this.elementRef=i,this.clearable=!0,this.multiple=!1,this.onBlur=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onChange=new t.EventEmitter,this.onOpen=new t.EventEmitter,this.onClose=new t.EventEmitter,this.onSearch=new t.EventEmitter,this.isOpen=!1,this.isFocused=!1,this.isDisabled=!1,this.itemsList=new h([],!1),this.viewPortItems=[],this.isLoading=!1,this.filterValue=null,this._openClicked=!1,this.propagateChange=function(e){}}return Object.defineProperty(e.prototype,"single",{get:function(){return!this.multiple},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.itemsList.items},set:function(e){this.itemsList=new h(e||[],this.multiple),this.isTypeahead()&&this.handleItemsChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.itemsList.value},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.bindLabel=this.bindLabel||"label"},e.prototype.ngOnDestroy=function(){this.changeDetectorRef.detach()},e.prototype.handleKeyDown=function(e){if(p[e.which])switch(e.which){case p.ArrowDown:this.handleArrowDown(e);break;case p.ArrowUp:this.handleArrowUp(e);break;case p.Space:this.handleSpace(e);break;case p.Enter:this.handleEnter(e);break;case p.Tab:this.handleTab(e);break;case p.Esc:this.close()}},e.prototype.handleDocumentClick=function(e){if(this._openClicked)return void(this._openClicked=!1);if(!this.elementRef.nativeElement.contains(e.target)){var t=this.getDropdownMenu();t&&t.contains(e.target)||(this.isFocused&&this.onInputBlur(e),this.isOpen&&this.close())}},e.prototype.clear=function(){this.clearable&&(this.itemsList.clearSelected(),this.clearSearch(),this.notifyModelChanged())},e.prototype.writeValue=function(e){var t=this;this.itemsList.clearSelected(),e&&(this.multiple?e.forEach(function(e){t.selectWriteValue(e)}):this.selectWriteValue(e)),this.detectChanges()},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.open=function(){this.isDisabled||this.isOpen||(this._openClicked=!0,this.isOpen=!0,this.itemsList.markSelection(),this.focusSearchInput(),this.onOpen.emit())},e.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.clearSearch(),this.itemsList.unmarkCurrentItem(),this.onClose.emit())},e.prototype.getLabelValue=function(e){return e?e[this.bindLabel]:""},e.prototype.getDisplayTemplateContext=function(){return this.itemsList.value?{item:this.itemsList.value}:{item:{}}},e.prototype.getOptionTemplateContext=function(e,t,i,n,o,s){return{item:e||{},index:t,first:i,last:n,even:o,odd:s}},e.prototype.toggle=function(e){!e||e.disabled||this.isDisabled||(this.multiple&&e.selected?this.unSelect(e):this.select(e))},e.prototype.select=function(e){e.selected||(this.itemsList.select(e),this.updateModel(),this.multiple||this.close())},e.prototype.unSelect=function(e){this.itemsList.unSelect(e),this.updateModel()},e.prototype.showPlaceholder=function(){return this.placeholder&&!this.isValueSet(this.value)&&!this.filterValue},e.prototype.showValue=function(){return!this.filterValue&&this.isValueSet(this.value)},e.prototype.showClear=function(){return this.clearable&&this.isValueSet(this.value)&&!this.isDisabled},e.prototype.showFilter=function(){return!this.isDisabled},e.prototype.showNoItemsFound=function(){var e=0===this.itemsList.filteredItems.length;return e&&!this.isTypeahead()||e&&this.isTypeahead()&&this.filterValue&&!this.isLoading},e.prototype.showTypeToSearch=function(){return 0===this.itemsList.filteredItems.length&&this.isTypeahead()&&!this.filterValue&&!this.isLoading},e.prototype.onFilter=function(e){this.isOpen||this.open(),this.filterValue=e.target.value,this.isTypeahead()?(this.isLoading=!0,this.typeahead.next(this.filterValue)):this.itemsList.filter(this.filterValue,this.bindLabel)},e.prototype.onInputFocus=function(e){this.isFocused=!0,this.onFocus.emit(e)},e.prototype.onInputBlur=function(e){this.isFocused=!1,this.onBlur.emit(e)},e.prototype.validateWriteValue=function(e){if(e instanceof Object&&this.bindValue)throw new Error("Binding object with bindValue is not allowed.")},e.prototype.handleItemsChange=function(){this.isLoading=!1,this.itemsList.markSelection()},e.prototype.selectWriteValue=function(e){var t=this;this.validateWriteValue(e);var i=-1;this.bindValue?i=this.itemsList.items.findIndex(function(i){return i[t.bindValue]===e}):(i=this.itemsList.items.indexOf(e),i=i>-1?i:this.itemsList.items.findIndex(function(i){return i[t.bindLabel]===e[t.bindLabel]})),i>-1&&this.itemsList.select(this.itemsList.items[i])},e.prototype.updateModel=function(){this.notifyModelChanged(),this.changeDetectorRef.markForCheck()},e.prototype.clearSearch=function(){this.filterValue=null,this.itemsList.clearFilter()},e.prototype.focusSearchInput=function(){var e=this;setTimeout(function(){e.filterInput.nativeElement.focus()})},e.prototype.scrollToMarked=function(){this.dropdownList.scrollInto(this.itemsList.markedItem)},e.prototype.handleTab=function(e){this.isOpen&&this.toggle(this.itemsList.markedItem)},e.prototype.handleEnter=function(e){this.isOpen&&this.toggle(this.itemsList.markedItem),e.preventDefault()},e.prototype.handleSpace=function(e){this.isOpen||(this.open(),e.preventDefault())},e.prototype.handleArrowDown=function(e){this.isOpen?(this.itemsList.markNextItem(),this.scrollToMarked()):this.open(),e.preventDefault()},e.prototype.handleArrowUp=function(e){this.itemsList.markPreviousItem(),this.scrollToMarked(),e.preventDefault()},e.prototype.notifyModelChanged=function(){var e=this,t=this.itemsList.value;if(t)if(this.bindValue){var i=Array.isArray(t)?t.map(function(t){return t[e.bindValue]}):t[this.bindValue];this.propagateChange(i)}else this.propagateChange(t);else this.propagateChange(null);this.onChange.emit(t)},e.prototype.getDropdownMenu=function(){return this.isOpen&&this.dropdownList?this.elementRef.nativeElement.querySelector(".as-menu-outer"):null},e.prototype.isTypeahead=function(){return this.typeahead&&this.typeahead.observers.length>0},e.prototype.detectChanges=function(){this.changeDetectorRef.destroyed||this.changeDetectorRef.detectChanges()},e.prototype.isValueSet=function(e){return this.multiple?!!e&&e.length>0:!!e},e.decorators=[{type:t.Component,args:[{selector:"ng-select",template:'<div (click)="open()" class="as-control"> <span class="as-multi-value-wrapper"> <span class="as-placeholder" *ngIf="showPlaceholder()">{{placeholder}}</span> <ng-container *ngIf="!multiple;else multipleValue"> <div class="as-value" *ngIf="showValue()"> <span class="as-value-label" role="option" aria-selected="true"> <ng-template *ngIf="displayTemplateRef" [ngTemplateOutlet]="displayTemplateRef.template" [ngOutletContext]="getDisplayTemplateContext()"> </ng-template> <span *ngIf="!displayTemplateRef">{{getLabelValue(value)}}</span> </span> </div> </ng-container> <ng-template #multipleValue> <div class="as-value" *ngFor="let item of value"> <span class="as-value-label" aria-selected="true">{{getLabelValue(item)}}</span> <span class="as-clear" (click)="unSelect(item)" aria-hidden="true">×</span> </div> </ng-template> <div *ngIf="showFilter()" class="as-input"> <input #filterInput [value]="filterValue" (input)="onFilter($event)" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" role="combobox" aria-expanded="false" aria-owns="" aria-haspopup="false"> </div> </span> <spinner class="as-spinner-zone" *ngIf="isLoading"></spinner> <span *ngIf="showClear()" (click)="clear()" class="as-clear-zone" title="Clear all" aria-label="Clear all"> <span class="as-clear" aria-hidden="true">×</span> </span> <span class="as-arrow-zone"> <span class="as-arrow"></span> </span> </div> <div class="as-menu-outer" [ngStyle]="{\'visibility\': isOpen ? \'visible\' : \'hidden\'}"> <virtual-scroll role="listbox" class="as-menu" [bufferAmount]="4" [items]="itemsList.filteredItems" (update)="viewPortItems = $event"> <div class="as-option" role="option" (click)="toggle(item)" *ngFor="let item of viewPortItems; let index = index; let first = first; let last = last; let even = even; let odd = odd" [class.disabled]="item.disabled" [class.selected]="item.selected" [class.marked]="item.marked"> <span *ngIf="!optionTemplateRef">{{item[bindLabel]}}</span> <ng-template *ngIf="optionTemplateRef" [ngTemplateOutlet]="optionTemplateRef.template" [ngOutletContext]="getOptionTemplateContext(item, index, first, last, even, odd)"> </ng-template> </div> </virtual-scroll> <div class="as-menu" *ngIf="showNoItemsFound()"> <div class="as-option disabled"> No items found </div> </div> <div class="as-menu" *ngIf="showTypeToSearch()"> <div class="as-option disabled"> Type to search </div> </div> </div> ',styles:["ng-select { position: relative; display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select div, ng-select input, ng-select span, ng-select virtual-scroll { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select virtual-scroll { display: block; height: auto; } ng-select.opened > .as-control { border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #fff; border-color: #b3b3b3 #ccc #d9d9d9; } ng-select.opened > .as-control .as-arrow { top: -2px; border-color: transparent transparent #999; border-width: 0 5px 5px; } ng-select.opened > .as-control .as-arrow:hover { border-color: transparent transparent #666; } ng-select.opened .as-menu-outer { visibility: visible; } ng-select.focused:not(.opened) > .as-control { border-color: #007eff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1); } ng-select.disabled > .as-control { background-color: #f9f9f9; } ng-select .as-control { background-color: #fff; border-radius: 4px; border: 1px solid #ccc; color: #333; cursor: default; display: table; border-spacing: 0; border-collapse: separate; height: 36px; outline: none; overflow: hidden; position: relative; width: 100%; } ng-select .as-control:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); } ng-select .as-placeholder, ng-select.as-single > .as-control .as-value { bottom: 0; color: #aaa; left: 0; line-height: 34px; padding-left: 10px; padding-right: 10px; position: absolute; right: 0; top: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ng-select .as-placeholder .as-value-label, ng-select.as-single > .as-control .as-value .as-value-label { color: #333; } ng-select.as-multiple.disabled > .as-control .as-value { background-color: #f9f9f9; border: 1px solid #e3e3e3; } ng-select.as-multiple.disabled > .as-control .as-value .as-clear { display: none; } ng-select.as-multiple > .as-control .as-value { background-color: #f5faff; border-radius: 2px; border: 1px solid #c2e0ff; border: 1px solid rgba(0, 126, 255, 0.24); display: inline-block; font-size: 0.9em; line-height: 1.4; margin-left: 5px; margin-top: 5px; vertical-align: top; } ng-select.as-multiple > .as-control .as-value .as-clear { cursor: pointer; border-bottom-left-radius: 2px; border-top-left-radius: 2px; border-left: 1px solid #c2e0ff; border-left: 1px solid rgba(0, 126, 255, 0.24); padding: 1px 5px 3px; } ng-select.as-multiple > .as-control .as-value .as-value-label { border-bottom-right-radius: 2px; border-top-right-radius: 2px; cursor: default; padding: 2px 5px; } ng-select .as-input { height: 34px; padding-left: 10px; padding-right: 10px; vertical-align: middle; display: inline-block; } ng-select .as-input > input { min-width: 5px; box-sizing: content-box; background: none transparent; border: 0 none; box-shadow: none; cursor: default; display: inline-block; font-family: inherit; font-size: inherit; margin: 0; outline: none; line-height: 14px; /* For IE 8 compatibility */ padding: 8px 0 12px; /* For IE 8 compatibility */ -webkit-appearance: none; } ng-select .as-menu-outer { visibility: hidden; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: #fff; border: 1px solid #ccc; border-top-color: #e6e6e6; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); box-sizing: border-box; margin-top: -1px; max-height: 242px; position: absolute; top: 100%; width: 100%; z-index: 1; -webkit-overflow-scrolling: touch; } ng-select .as-menu { max-height: 240px; overflow-y: auto; } ng-select .as-option { box-sizing: border-box; background-color: #fff; color: #666666; cursor: pointer; display: block; padding: 8px 10px; } ng-select .as-option:last-child { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } ng-select .as-option.selected { background-color: #f5faff; color: #333; } ng-select .as-option.marked { background-color: #ebf5ff; color: #333; } ng-select .as-option:not(.disabled):hover { background-color: #ebf5ff; color: #333; } ng-select .as-option.disabled { color: #cccccc; cursor: default; } ng-select .as-clear-zone { -webkit-animation: Select-animation-fadeIn 200ms; -o-animation: Select-animation-fadeIn 200ms; animation: Select-animation-fadeIn 200ms; color: #999; cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 17px; } ng-select .as-clear-zone .as-clear { display: inline-block; font-size: 18px; line-height: 1; } ng-select .as-clear-zone .as-clear:hover { color: #D0021B; } ng-select .as-spinner-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; padding-top: 5px; } ng-select .as-arrow-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; } ng-select .as-arrow-zone .as-arrow { border-color: #999 transparent transparent; border-style: solid; border-width: 5px 5px 2.5px; display: inline-block; height: 0; width: 0; position: relative; } ng-select .as-arrow-zone .as-arrow:hover { border-top-color: #666; } "],providers:[d],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{role:"dropdown"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef}]},e.propDecorators={optionTemplateRef:[{type:t.ContentChild,args:[s]}],displayTemplateRef:[{type:t.ContentChild,args:[r]}],dropdownList:[{type:t.ViewChild,args:[a]}],filterInput:[{type:t.ViewChild,args:["filterInput"]}],bindLabel:[{type:t.Input}],bindValue:[{type:t.Input}],clearable:[{type:t.Input}],placeholder:[{type:t.Input}],typeahead:[{type:t.Input}],multiple:[{type:t.Input},{type:t.HostBinding,args:["class.as-multiple"]}],onBlur:[{type:t.Output,args:["blur"]}],onFocus:[{type:t.Output,args:["focus"]}],onChange:[{type:t.Output,args:["change"]}],onOpen:[{type:t.Output,args:["open"]}],onClose:[{type:t.Output,args:["close"]}],onSearch:[{type:t.Output,args:["search"]}],single:[{type:t.HostBinding,args:["class.as-single"]}],isOpen:[{type:t.HostBinding,args:["class.opened"]}],isFocused:[{type:t.HostBinding,args:["class.focused"]}],isDisabled:[{type:t.HostBinding,args:["class.disabled"]}],items:[{type:t.Input}],handleKeyDown:[{type:t.HostListener,args:["keydown",["$event"]]}],handleDocumentClick:[{type:t.HostListener,args:["document:click",["$event"]]}]},e}(),m=function(){function e(e){this.elementRef=e}return e.prototype.ngOnInit=function(){this.elementRef.nativeElement.onFocus()},e.decorators=[{type:t.Directive,args:[{selector:"[angSearchFocus]"}]}],e.ctorParameters=function(){return[{ | ||
type:t.ElementRef}]},e}(),f=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"spinner",template:'\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n width="20px" height="20px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">\n <path fill="#777" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">\n <animateTransform attributeType="xml"\n attributeName="transform"\n type="rotate"\n from="0 25 25"\n to="360 25 25"\n dur="0.6s"\n repeatCount="indefinite"/>\n </path>\n </svg>'}]}],e.ctorParameters=function(){return[]},e}(),g=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[u,s,r,m,f],imports:[i.FormsModule,n.CommonModule,l],exports:[u,s,r]}]}],e.ctorParameters=function(){return[]},e}();e.NgSelectComponent=u,e.NgSelectModule=g,e.ɵe=m,e.ɵb=r,e.ɵa=s,e.ɵf=f,e.ɵc=a,e.ɵd=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/forms","@angular/common"],t):t(e.ngSelect=e.ngSelect||{},e.ng.core,e.ng.forms,e.ng.common)}(this,function(e,t,i,n){"use strict";function o(e){var t=function(e){return p[e]||e};return e.replace(/[^\u0000-\u007E]/g,t)}var s=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[ng-option-tmp]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),r=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[ng-label-tmp]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),a=function(){function e(e){var i=this;this.element=e,this.items=[],this.bufferAmount=0,this.update=new t.EventEmitter,this.change=new t.EventEmitter,this.start=new t.EventEmitter,this.end=new t.EventEmitter,this.startupLoop=!0,this.refreshHandler=function(){i.refresh()}}return Object.defineProperty(e.prototype,"parentScroll",{get:function(){return this._parentScroll},set:function(e){this._parentScroll!==e&&(this.removeParentEventHandlers(this._parentScroll),this._parentScroll=e,this.addParentEventHandlers(this._parentScroll))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this.items&&this.items.length>20},enumerable:!0,configurable:!0}),e.prototype.onScroll=function(){if(!this.enabled)return void this.update.emit(this.items);this.refresh()},e.prototype.ngOnInit=function(){this.scrollbarWidth=0,this.scrollbarHeight=0},e.prototype.ngOnDestroy=function(){this.removeParentEventHandlers(this.parentScroll)},e.prototype.ngOnChanges=function(e){this.previousStart=void 0,this.previousEnd=void 0;var t=e.items||{};(void 0!==e.items&&void 0===t.previousValue||void 0!==t.previousValue&&0===t.previousValue.length)&&(this.startupLoop=!0),this.items=t.currentValue,this.refresh()},e.prototype.refresh=function(){var e=this;if(!this.enabled)return void this.update.emit(this.items);requestAnimationFrame(function(){return e.calculateItems()})},e.prototype.scrollInto=function(e){var t=this.parentScroll instanceof Window?document.body:this.parentScroll||this.element.nativeElement,i=(this.items||[]).indexOf(e);if(!(i<0||i>=(this.items||[]).length)){var n=this.calculateDimensions(),o=Math.floor(n.viewHeight/n.childHeight)-1;t.scrollTop=Math.floor(i/n.itemsPerRow)*n.childHeight-n.childHeight*Math.min(i,o),this.refresh()}},e.prototype.addParentEventHandlers=function(e){e&&(e.addEventListener("scroll",this.refreshHandler),e instanceof Window&&e.addEventListener("resize",this.refreshHandler))},e.prototype.removeParentEventHandlers=function(e){e&&(e.removeEventListener("scroll",this.refreshHandler),e instanceof Window&&e.removeEventListener("resize",this.refreshHandler))},e.prototype.countItemsPerRow=function(){var e,t,i=this.contentElementRef.nativeElement.children;for(t=0;t<i.length&&(void 0===e||e===i[t].offsetTop);t++)e=i[t].offsetTop;return t},e.prototype.getElementsOffset=function(){var e=0;return this.containerElementRef&&this.containerElementRef.nativeElement&&(e+=this.containerElementRef.nativeElement.offsetTop),this.parentScroll&&(e+=this.element.nativeElement.offsetTop),e},e.prototype.calculateDimensions=function(){var e,t=this.parentScroll instanceof Window?document.body:this.parentScroll||this.element.nativeElement,i=this.items||[],n=i.length,o=t.clientWidth-this.scrollbarWidth,s=t.clientHeight-this.scrollbarHeight;if(void 0===this.childWidth||void 0===this.childHeight){var r=this.contentElementRef.nativeElement;this.containerElementRef&&this.containerElementRef.nativeElement&&(r=this.containerElementRef.nativeElement),e=r.children[0]?r.children[0].getBoundingClientRect():{width:o,height:s}}var a=this.childWidth||e.width,l=this.childHeight||e.height,c=Math.max(1,this.countItemsPerRow()),p=Math.max(1,Math.floor(o/a)),h=Math.max(1,Math.floor(s/l)),u=Math.max(0,t.scrollTop);return 1===h&&Math.floor(u/this.scrollHeight*n)+p>=n&&(c=p),{itemCount:n,viewWidth:o,viewHeight:s,childWidth:a,childHeight:l,itemsPerRow:c,itemsPerCol:h,itemsPerRowByCalc:p}},e.prototype.calculateItems=function(){var e=this.parentScroll instanceof Window?document.body:this.parentScroll||this.element.nativeElement,t=this.calculateDimensions(),i=this.items||[],n=this.getElementsOffset();this.scrollHeight=t.childHeight*t.itemCount/t.itemsPerRow,e.scrollTop>this.scrollHeight&&(e.scrollTop=this.scrollHeight+n);var o=Math.max(0,e.scrollTop-n),s=o/this.scrollHeight*t.itemCount/t.itemsPerRow,r=Math.min(t.itemCount,Math.ceil(s)*t.itemsPerRow+t.itemsPerRow*(t.itemsPerCol+1)),a=r,l=r%t.itemsPerRow;l&&(a=r+t.itemsPerRow-l);var c=Math.max(0,a-t.itemsPerCol*t.itemsPerRow-t.itemsPerRow),p=Math.min(c,Math.floor(s)*t.itemsPerRow);this.topPadding=t.childHeight*Math.ceil(p/t.itemsPerRow)-t.childHeight*Math.min(p,this.bufferAmount),p=isNaN(p)?-1:p,r=isNaN(r)?-1:r,p-=this.bufferAmount,p=Math.max(0,p),r+=this.bufferAmount,r=Math.min(i.length,r),p!==this.previousStart||r!==this.previousEnd?(this.update.emit(i.slice(p,r)),p!==this.previousStart&&!1===this.startupLoop&&this.start.emit({start:p,end:r}),r!==this.previousEnd&&!1===this.startupLoop&&this.end.emit({start:p,end:r}),this.previousStart=p,this.previousEnd=r,!0===this.startupLoop?this.refresh():this.change.emit({start:p,end:r})):!0===this.startupLoop&&(this.startupLoop=!1,this.refresh())},e.decorators=[{type:t.Component,args:[{selector:"virtual-scroll,[virtualScroll]",exportAs:"virtualScroll",template:"\n <div *ngIf=\"enabled\" class=\"total-padding\" [style.height]=\"scrollHeight + 'px'\"></div>\n <div #content\n [class.scrollable-content]=\"enabled\"\n [style.transform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\"\n [style.webkitTransform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\">\n <ng-content></ng-content>\n </div>\n ",host:{"[style.overflow-y]":"parentScroll ? 'hidden' : 'auto'"},styles:["\n :host {\n overflow: hidden;\n position: relative;\n display: block;\n -webkit-overflow-scrolling: touch;\n }\n\n .scrollable-content {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n }\n\n .total-padding {\n width: 1px;\n opacity: 0;\n }\n "]}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={items:[{type:t.Input}],scrollbarWidth:[{type:t.Input}],scrollbarHeight:[{type:t.Input}],childWidth:[{type:t.Input}],childHeight:[{type:t.Input}],bufferAmount:[{type:t.Input}],update:[{type:t.Output}],change:[{type:t.Output}],start:[{type:t.Output}],end:[{type:t.Output}],contentElementRef:[{type:t.ViewChild,args:["content",{read:t.ElementRef}]}],containerElementRef:[{type:t.ContentChild,args:["container"]}],parentScroll:[{type:t.Input}],onScroll:[{type:t.HostListener,args:["scroll"]}]},e}(),l=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],exports:[a],declarations:[a]}]}],e.ctorParameters=function(){return[]},e}(),c={};c.Tab=9,c.Enter=13,c.Esc=27,c.Space=32,c.ArrowUp=38,c.ArrowDown=40,c.BackSpace=8,c[c.Tab]="Tab",c[c.Enter]="Enter",c[c.Esc]="Esc",c[c.Space]="Space",c[c.ArrowUp]="ArrowUp",c[c.ArrowDown]="ArrowDown",c[c.BackSpace]="BackSpace";var p={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},h=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},u=function(){function e(e,t){this.items=[],this.filteredItems=[],this._markedIndex=-1,this._selected=[],this.items=this.mapItems(e),this.filteredItems=this.items.slice(),this._multiple=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this._multiple?this._selected:this._selected[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markedItem",{get:function(){return this.filteredItems[this._markedIndex]},enumerable:!0,configurable:!0}),e.prototype.select=function(e){this._multiple||this.clearSelected(),this._selected.push(e),e.selected=!0},e.prototype.unselect=function(e){this._selected=this._selected.filter(function(t){return t!==e}),e.selected=!1},e.prototype.unSelectLastItem=function(){0!==this._selected.length&&(this._selected[this._selected.length-1].selected=!1,this._selected.splice(this._selected.length-1,1))},e.prototype.clearSelected=function(){this._selected.forEach(function(e){e.selected=!1,e.marked=!1}),this._selected=[]},e.prototype.filter=function(e,t){var i=this.getDefaultFilterFunc(e,t);this.filteredItems=e?this.items.filter(function(e){return i(e)}):this.items,this._markedIndex=0},e.prototype.clearFilter=function(){this.filteredItems=this.items.slice()},e.prototype.markNextItem=function(){this.stepToItem(1)},e.prototype.markPreviousItem=function(){this.stepToItem(-1)},e.prototype.markItem=function(e){void 0===e&&(e=null),0!==this.filteredItems.length&&(e=e||this.lastSelectedItem,this._markedIndex=e?this.filteredItems.indexOf(e):0)},e.prototype.getNextItemIndex=function(e){return e>0?this._markedIndex===this.filteredItems.length-1?0:this._markedIndex+1:0===this._markedIndex?this.filteredItems.length-1:this._markedIndex-1},e.prototype.stepToItem=function(e){if(0!==this.filteredItems.length)for(this._markedIndex=this.getNextItemIndex(e);this.markedItem.disabled;)this.stepToItem(e)},e.prototype.getDefaultFilterFunc=function(e,t){return function(i){return o(i[t]).toUpperCase().indexOf(o(e).toUpperCase())>-1}},Object.defineProperty(e.prototype,"lastSelectedItem",{get:function(){return this._selected[this._selected.length-1]},enumerable:!0,configurable:!0}),e.prototype.mapItems=function(e){return e.map(function(e,t){return h({index:t},e)})},e}(),d={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return m}),multi:!0},m=function(){function e(e,i){this.changeDetectorRef=e,this.elementRef=i,this.clearable=!0,this.multiple=!1,this.onBlur=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onChange=new t.EventEmitter,this.onOpen=new t.EventEmitter,this.onClose=new t.EventEmitter,this.onSearch=new t.EventEmitter,this.isOpen=!1,this.isFocused=!1,this.isDisabled=!1,this.itemsList=new u([],!1),this.viewPortItems=[],this.isLoading=!1,this.filterValue=null,this._openClicked=!1,this.propagateChange=function(e){}}return Object.defineProperty(e.prototype,"single",{get:function(){return!this.multiple},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.itemsList.items},set:function(e){this.itemsList=new u(e||[],this.multiple),this.isTypeahead()&&this.handleItemsChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.itemsList.value},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.bindLabel=this.bindLabel||"label"},e.prototype.ngOnDestroy=function(){this.changeDetectorRef.detach()},e.prototype.handleKeyDown=function(e){if(c[e.which])switch(e.which){case c.ArrowDown:this.handleArrowDown(e);break;case c.ArrowUp:this.handleArrowUp(e);break;case c.Space:this.handleSpace(e);break;case c.Enter:this.handleEnter(e);break;case c.Tab:this.handleTab(e);break;case c.Esc:this.close();break;case c.BackSpace:this.handleBackspace()}},e.prototype.handleDocumentClick=function(e){if(this._openClicked)return void(this._openClicked=!1);if(!this.elementRef.nativeElement.contains(e.target)){var t=this.getDropdownMenu();t&&t.contains(e.target)||(this.isFocused&&this.onInputBlur(e),this.isOpen&&this.close())}},e.prototype.clear=function(){this.clearable&&(this.itemsList.clearSelected(),this.clearSearch(),this.notifyModelChanged())},e.prototype.writeValue=function(e){var t=this;this.itemsList.clearSelected(),e&&(this.multiple?e.forEach(function(e){t.selectWriteValue(e)}):this.selectWriteValue(e)),this.detectChanges()},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.open=function(){this.isDisabled||this.isOpen||(this._openClicked=!0,this.isOpen=!0,this.itemsList.markItem(),this.scrollToMarked(),this.focusSearchInput(),this.onOpen.emit())},e.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.clearSearch(),this.onClose.emit())},e.prototype.getLabelValue=function(e){return e?e[this.bindLabel]:""},e.prototype.getDisplayTemplateContext=function(){return this.itemsList.value?{item:this.itemsList.value}:{item:{}}},e.prototype.toggle=function(e){!e||e.disabled||this.isDisabled||(this.multiple&&e.selected?this.unselect(e):this.select(e))},e.prototype.select=function(e){e.selected||(this.itemsList.select(e),this.updateModel(),this.multiple||this.close())},e.prototype.unselect=function(e){this.itemsList.unselect(e),this.updateModel()},e.prototype.showPlaceholder=function(){return this.placeholder&&!this.isValueSet(this.value)&&!this.filterValue},e.prototype.showValue=function(){return!this.filterValue&&this.isValueSet(this.value)},e.prototype.showClear=function(){return this.clearable&&(this.isValueSet(this.value)||this.filterValue)&&!this.isDisabled},e.prototype.showFilter=function(){return!this.isDisabled},e.prototype.showNoItemsFound=function(){var e=0===this.itemsList.filteredItems.length;return e&&!this.isTypeahead()||e&&this.isTypeahead()&&this.filterValue&&!this.isLoading},e.prototype.showTypeToSearch=function(){return 0===this.itemsList.filteredItems.length&&this.isTypeahead()&&!this.filterValue&&!this.isLoading},e.prototype.onFilter=function(e){this.isOpen||this.open(),this.filterValue=e.target.value,this.isTypeahead()?(this.isLoading=!0,this.typeahead.next(this.filterValue)):this.itemsList.filter(this.filterValue,this.bindLabel)},e.prototype.onInputFocus=function(e){this.isFocused=!0,this.onFocus.emit(e)},e.prototype.onInputBlur=function(e){this.isFocused=!1,this.onBlur.emit(e)},e.prototype.onItemHover=function(e){this.itemsList.markItem(e)},e.prototype.validateWriteValue=function(e){if(e instanceof Object&&this.bindValue)throw new Error("Binding object with bindValue is not allowed.")},e.prototype.handleItemsChange=function(){this.isLoading=!1,this.itemsList.markItem()},e.prototype.selectWriteValue=function(e){var t=this;this.validateWriteValue(e);var i=-1;this.bindValue?i=this.itemsList.items.findIndex(function(i){return i[t.bindValue]===e}):(i=this.itemsList.items.indexOf(e),i=i>-1?i:this.itemsList.items.findIndex(function(i){return i[t.bindLabel]===e[t.bindLabel]})),i>-1&&this.itemsList.select(this.itemsList.items[i])},e.prototype.updateModel=function(){this.notifyModelChanged(),this.changeDetectorRef.markForCheck()},e.prototype.clearSearch=function(){this.filterValue=null,this.itemsList.clearFilter()},e.prototype.focusSearchInput=function(){var e=this;setTimeout(function(){e.filterInput.nativeElement.focus()})},e.prototype.scrollToMarked=function(){this.dropdownList.scrollInto(this.itemsList.markedItem)},e.prototype.handleTab=function(e){this.isOpen&&this.toggle(this.itemsList.markedItem)},e.prototype.handleEnter=function(e){this.isOpen&&this.toggle(this.itemsList.markedItem),e.preventDefault()},e.prototype.handleSpace=function(e){this.isOpen||(this.open(),e.preventDefault())},e.prototype.handleArrowDown=function(e){this.isOpen?(this.itemsList.markNextItem(),this.scrollToMarked()):this.open(),e.preventDefault()},e.prototype.handleArrowUp=function(e){this.itemsList.markPreviousItem(),this.scrollToMarked(),e.preventDefault()},e.prototype.handleBackspace=function(){if(this.multiple)this.unSelectLastItem();else{if(this.filterValue)return;this.clear()}},e.prototype.unSelectLastItem=function(){this.itemsList.unSelectLastItem(),this.updateModel()},e.prototype.notifyModelChanged=function(){var e=this,t=this.itemsList.value;if(t)if(this.bindValue){var i=Array.isArray(t)?t.map(function(t){return t[e.bindValue]}):t[this.bindValue];this.propagateChange(i)}else this.propagateChange(t);else this.propagateChange(null);this.onChange.emit(t)},e.prototype.getDropdownMenu=function(){return this.isOpen&&this.dropdownList?this.elementRef.nativeElement.querySelector(".as-menu-outer"):null},e.prototype.isTypeahead=function(){return this.typeahead&&this.typeahead.observers.length>0},e.prototype.detectChanges=function(){this.changeDetectorRef.destroyed||this.changeDetectorRef.detectChanges()},e.prototype.isValueSet=function(e){return this.multiple?!!e&&e.length>0:!!e},e.decorators=[{type:t.Component,args:[{selector:"ng-select",template:'<div (click)="open()" class="as-control"> <span class="as-multi-value-wrapper"> <span class="as-placeholder" *ngIf="showPlaceholder()">{{placeholder}}</span> <ng-container *ngIf="!multiple;else multipleValue"> <div class="as-value" *ngIf="showValue()"> <span class="as-value-label" role="option" aria-selected="true"> <ng-template *ngIf="labelTemplate" [ngTemplateOutlet]="labelTemplate" [ngTemplateOutletContext]="getDisplayTemplateContext()"> </ng-template> <span *ngIf="!labelTemplate">{{getLabelValue(value)}}</span> </span> </div> </ng-container> <ng-template #multipleValue> <div class="as-value" *ngFor="let item of value"> <span class="as-value-label" aria-selected="true">{{getLabelValue(item)}}</span> <span class="as-clear" (click)="unselect(item)" aria-hidden="true">×</span> </div> </ng-template> <div *ngIf="showFilter()" class="as-input"> <input #filterInput [value]="filterValue" (input)="onFilter($event)" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" role="combobox" aria-expanded="false" aria-owns="" aria-haspopup="false"> </div> </span> <spinner class="as-spinner-zone" *ngIf="isLoading"></spinner> <span *ngIf="showClear()" (click)="clear()" class="as-clear-zone" title="Clear all" aria-label="Clear all"> <span class="as-clear" aria-hidden="true">×</span> </span> <span class="as-arrow-zone"> <span class="as-arrow"></span> </span> </div> <div class="as-menu-outer"> <virtual-scroll role="listbox" class="as-menu" [bufferAmount]="4" [items]="itemsList.filteredItems" (update)="viewPortItems = $event"> <div class="as-option" role="option" (click)="toggle(item)" (mouseover)="onItemHover(item)" *ngFor="let item of viewPortItems;" [class.disabled]="item.disabled" [class.selected]="item.selected" [class.marked]="item === itemsList.markedItem"> <span *ngIf="!optionTemplate">{{item[bindLabel]}}</span> <ng-template *ngIf="optionTemplate" [ngTemplateOutlet]="optionTemplate" [ngTemplateOutletContext]="{ item: item, index: item.index }"> </ng-template> </div> </virtual-scroll> <div class="as-menu" *ngIf="showNoItemsFound()"> <div class="as-option disabled"> No items found </div> </div> <div class="as-menu" *ngIf="showTypeToSearch()"> <div class="as-option disabled"> Type to search </div> </div> </div> ',styles:["ng-select { position: relative; display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select div, ng-select input, ng-select span, ng-select virtual-scroll { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select virtual-scroll { display: block; height: auto; } ng-select.opened > .as-control { border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #fff; border-color: #b3b3b3 #ccc #d9d9d9; } ng-select.opened > .as-control .as-arrow { top: -2px; border-color: transparent transparent #999; border-width: 0 5px 5px; } ng-select.opened > .as-control .as-arrow:hover { border-color: transparent transparent #666; } ng-select.opened .as-menu-outer { visibility: visible; } ng-select.focused:not(.opened) > .as-control { border-color: #007eff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1); } ng-select.disabled > .as-control { background-color: #f9f9f9; } ng-select .as-control { background-color: #fff; border-radius: 4px; border: 1px solid #ccc; color: #333; cursor: default; display: table; border-spacing: 0; border-collapse: separate; height: 36px; outline: none; overflow: hidden; position: relative; width: 100%; } ng-select .as-control:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); } ng-select .as-placeholder, ng-select.as-single > .as-control .as-value { bottom: 0; color: #aaa; left: 0; line-height: 34px; padding-left: 10px; padding-right: 10px; position: absolute; right: 0; top: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ng-select .as-placeholder .as-value-label, ng-select.as-single > .as-control .as-value .as-value-label { color: #333; } ng-select.as-multiple.disabled > .as-control .as-value { background-color: #f9f9f9; border: 1px solid #e3e3e3; } ng-select.as-multiple.disabled > .as-control .as-value .as-clear { display: none; } ng-select.as-multiple > .as-control .as-value { background-color: #f5faff; border-radius: 2px; border: 1px solid #c2e0ff; border: 1px solid rgba(0, 126, 255, 0.24); display: inline-block; font-size: 0.9em; line-height: 1.4; margin-left: 5px; margin-top: 5px; vertical-align: top; } ng-select.as-multiple > .as-control .as-value .as-clear { cursor: pointer; border-bottom-left-radius: 2px; border-top-left-radius: 2px; border-left: 1px solid #c2e0ff; border-left: 1px solid rgba(0, 126, 255, 0.24); padding: 1px 5px 3px; } ng-select.as-multiple > .as-control .as-value .as-value-label { border-bottom-right-radius: 2px; border-top-right-radius: 2px; cursor: default; padding: 2px 5px; } ng-select .as-input { height: 34px; padding-left: 10px; padding-right: 10px; vertical-align: middle; display: inline-block; } ng-select .as-input > input { min-width: 5px; box-sizing: content-box; background: none transparent; border: 0 none; box-shadow: none; cursor: default; display: inline-block; font-family: inherit; font-size: inherit; margin: 0; outline: none; line-height: 14px; /* For IE 8 compatibility */ padding: 8px 0 12px; /* For IE 8 compatibility */ -webkit-appearance: none; } ng-select .as-menu-outer { visibility: hidden; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: #fff; border: 1px solid #ccc; border-top-color: #e6e6e6; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); box-sizing: border-box; margin-top: -1px; max-height: 242px; position: absolute; top: 100%; width: 100%; z-index: 1; -webkit-overflow-scrolling: touch; } ng-select .as-menu { max-height: 240px; overflow-y: auto; } ng-select .as-option { box-sizing: border-box; background-color: #fff; color: #666666; cursor: pointer; display: block; padding: 8px 10px; } ng-select .as-option:last-child { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } ng-select .as-option.selected { background-color: #f5faff; color: #333; } ng-select .as-option.marked { background-color: #ebf5ff; color: #333; } ng-select .as-option.disabled { color: #cccccc; cursor: default; } ng-select .as-clear-zone { -webkit-animation: Select-animation-fadeIn 200ms; -o-animation: Select-animation-fadeIn 200ms; animation: Select-animation-fadeIn 200ms; color: #999; cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 17px; } ng-select .as-clear-zone .as-clear { display: inline-block; font-size: 18px; line-height: 1; } ng-select .as-clear-zone .as-clear:hover { color: #D0021B; } ng-select .as-spinner-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; padding-top: 5px; } ng-select .as-arrow-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; } ng-select .as-arrow-zone .as-arrow { border-color: #999 transparent transparent; border-style: solid; border-width: 5px 5px 2.5px; display: inline-block; height: 0; width: 0; position: relative; } ng-select .as-arrow-zone .as-arrow:hover { border-top-color: #666; } "],providers:[d],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{role:"dropdown"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef}]},e.propDecorators={optionTemplate:[{type:t.ContentChild,args:[s,{read:t.TemplateRef}]}],labelTemplate:[{type:t.ContentChild,args:[r,{read:t.TemplateRef}]}],dropdownList:[{type:t.ViewChild,args:[a]}],filterInput:[{type:t.ViewChild,args:["filterInput"]}],bindLabel:[{type:t.Input}],bindValue:[{type:t.Input}],clearable:[{type:t.Input}],placeholder:[{type:t.Input}],typeahead:[{type:t.Input}],multiple:[{type:t.Input},{type:t.HostBinding,args:["class.as-multiple"]}],onBlur:[{type:t.Output,args:["blur"]}],onFocus:[{type:t.Output,args:["focus"]}],onChange:[{type:t.Output,args:["change"]}],onOpen:[{type:t.Output,args:["open"]}],onClose:[{type:t.Output,args:["close"]}],onSearch:[{type:t.Output,args:["search"]}],single:[{type:t.HostBinding,args:["class.as-single"]}],isOpen:[{type:t.HostBinding,args:["class.opened"]}],isFocused:[{type:t.HostBinding,args:["class.focused"]}],isDisabled:[{type:t.HostBinding,args:["class.disabled"]}],items:[{type:t.Input}], | ||
handleKeyDown:[{type:t.HostListener,args:["keydown",["$event"]]}],handleDocumentClick:[{type:t.HostListener,args:["document:click",["$event"]]}]},e}(),f=function(){function e(e){this.elementRef=e}return e.prototype.ngOnInit=function(){this.elementRef.nativeElement.onFocus()},e.decorators=[{type:t.Directive,args:[{selector:"[angSearchFocus]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e}(),g=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"spinner",template:'\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n width="20px" height="20px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">\n <path fill="#777" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">\n <animateTransform attributeType="xml"\n attributeName="transform"\n type="rotate"\n from="0 25 25"\n to="360 25 25"\n dur="0.6s"\n repeatCount="indefinite"/>\n </path>\n </svg>'}]}],e.ctorParameters=function(){return[]},e}(),b=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[m,s,r,f,g],imports:[i.FormsModule,n.CommonModule,l],exports:[m,s,r]}]}],e.ctorParameters=function(){return[]},e}();e.NgSelectComponent=m,e.NgSelectModule=b,e.ɵe=f,e.ɵb=r,e.ɵa=s,e.ɵf=g,e.ɵc=a,e.ɵd=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ng-select.umd.min.js.map |
@@ -6,4 +6,4 @@ /** | ||
export { AngSearchFocusDirective as ɵe } from './src/ng-search-focus.directive'; | ||
export { NgDisplayDirective as ɵb, NgOptionDirective as ɵa } from './src/ng-templates.directive'; | ||
export { NgLabelTemplateDirective as ɵb, NgOptionTemplateDirective as ɵa } from './src/ng-templates.directive'; | ||
export { SpinnerComponent as ɵf } from './src/spinner.component'; | ||
export { VirtualScrollComponent as ɵc, VirtualScrollModule as ɵd } from './src/virtual-scroll.component'; |
183
ng-select.js
@@ -5,3 +5,3 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, NgModule, Output, TemplateRef, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core'; | ||
class NgOptionDirective { | ||
class NgOptionTemplateDirective { | ||
/** | ||
@@ -14,3 +14,3 @@ * @param {?} template | ||
} | ||
NgOptionDirective.decorators = [ | ||
NgOptionTemplateDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[ng-option-tmp]' },] }, | ||
@@ -21,6 +21,6 @@ ]; | ||
*/ | ||
NgOptionDirective.ctorParameters = () => [ | ||
NgOptionTemplateDirective.ctorParameters = () => [ | ||
{ type: TemplateRef, }, | ||
]; | ||
class NgDisplayDirective { | ||
class NgLabelTemplateDirective { | ||
/** | ||
@@ -33,4 +33,4 @@ * @param {?} template | ||
} | ||
NgDisplayDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[ng-display-tmp]' },] }, | ||
NgLabelTemplateDirective.decorators = [ | ||
{ type: Directive, args: [{ selector: '[ng-label-tmp]' },] }, | ||
]; | ||
@@ -40,3 +40,3 @@ /** | ||
*/ | ||
NgDisplayDirective.ctorParameters = () => [ | ||
NgLabelTemplateDirective.ctorParameters = () => [ | ||
{ type: TemplateRef, }, | ||
@@ -149,5 +149,6 @@ ]; | ||
} | ||
let /** @type {?} */ d = this.calculateDimensions(); | ||
const /** @type {?} */ d = this.calculateDimensions(); | ||
const /** @type {?} */ buffer = Math.floor(d.viewHeight / d.childHeight) - 1; | ||
el.scrollTop = (Math.floor(index / d.itemsPerRow) * d.childHeight) | ||
- (d.childHeight * Math.min(index, this.bufferAmount)); | ||
- (d.childHeight * Math.min(index, buffer)); | ||
this.refresh(); | ||
@@ -384,2 +385,3 @@ } | ||
KeyCode.ArrowDown = 40; | ||
KeyCode.BackSpace = 8; | ||
KeyCode[KeyCode.Tab] = "Tab"; | ||
@@ -391,2 +393,3 @@ KeyCode[KeyCode.Enter] = "Enter"; | ||
KeyCode[KeyCode.ArrowDown] = "ArrowDown"; | ||
KeyCode[KeyCode.BackSpace] = "BackSpace"; | ||
@@ -1253,7 +1256,6 @@ const diacritics = { | ||
this.filteredItems = []; | ||
this.markedItem = null; | ||
this._markedItemIndex = -1; | ||
this._markedIndex = -1; | ||
this._selected = []; | ||
this.items = items; | ||
this.filteredItems = [...items]; | ||
this.items = this.mapItems(items); | ||
this.filteredItems = [...this.items]; | ||
this._multiple = multiple; | ||
@@ -1271,2 +1273,8 @@ } | ||
/** | ||
* @return {?} | ||
*/ | ||
get markedItem() { | ||
return this.filteredItems[this._markedIndex]; | ||
} | ||
/** | ||
* @param {?} item | ||
@@ -1286,3 +1294,3 @@ * @return {?} | ||
*/ | ||
unSelect(item) { | ||
unselect(item) { | ||
this._selected = this._selected.filter(x => x !== item); | ||
@@ -1294,2 +1302,12 @@ item.selected = false; | ||
*/ | ||
unSelectLastItem() { | ||
if (this._selected.length === 0) { | ||
return; | ||
} | ||
this._selected[this._selected.length - 1].selected = false; | ||
this._selected.splice(this._selected.length - 1, 1); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
clearSelected() { | ||
@@ -1308,6 +1326,5 @@ this._selected.forEach((item) => { | ||
filter(term, bindLabel) { | ||
this.unmarkCurrentItem(); | ||
const /** @type {?} */ filterFuncVal = this.getDefaultFilterFunc(term, bindLabel); | ||
this.filteredItems = term ? this.items.filter(val => filterFuncVal(val)) : this.items; | ||
this.markItem(0); | ||
this._markedIndex = 0; | ||
} | ||
@@ -1333,30 +1350,27 @@ /** | ||
/** | ||
* @param {?=} item | ||
* @return {?} | ||
*/ | ||
markSelection() { | ||
markItem(item = null) { | ||
if (this.filteredItems.length === 0) { | ||
return; | ||
} | ||
const /** @type {?} */ lastSelected = this._selected[this._selected.length - 1]; | ||
const /** @type {?} */ index = lastSelected ? this.filteredItems.indexOf(lastSelected) : 0; | ||
this.markItem(index); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
unmarkCurrentItem() { | ||
if (this.markedItem) { | ||
this.markedItem.marked = false; | ||
item = item || this.lastSelectedItem; | ||
if (item) { | ||
this._markedIndex = this.filteredItems.indexOf(item); | ||
} | ||
else { | ||
this._markedIndex = 0; | ||
} | ||
} | ||
/** | ||
* @param {?} delta | ||
* @param {?} steps | ||
* @return {?} | ||
*/ | ||
getNextItemIndex(delta) { | ||
if (delta > 0) { | ||
return (this._markedItemIndex === this.filteredItems.length - 1) ? 0 : (this._markedItemIndex + 1); | ||
getNextItemIndex(steps) { | ||
if (steps > 0) { | ||
return (this._markedIndex === this.filteredItems.length - 1) ? 0 : (this._markedIndex + 1); | ||
} | ||
else { | ||
return (this._markedItemIndex === 0) ? (this.filteredItems.length - 1) : (this._markedItemIndex - 1); | ||
return (this._markedIndex === 0) ? (this.filteredItems.length - 1) : (this._markedIndex - 1); | ||
} | ||
@@ -1372,9 +1386,6 @@ } | ||
} | ||
this._markedItemIndex = this.getNextItemIndex(steps); | ||
this.unmarkCurrentItem(); | ||
this.markedItem = this.filteredItems[this._markedItemIndex]; | ||
this._markedIndex = this.getNextItemIndex(steps); | ||
while (this.markedItem.disabled) { | ||
this.stepToItem(steps); | ||
} | ||
this.markedItem.marked = true; // TODO: do we need marked property on model? | ||
} | ||
@@ -1394,12 +1405,16 @@ /** | ||
/** | ||
* @param {?} index | ||
* @return {?} | ||
*/ | ||
markItem(index) { | ||
this._markedItemIndex = index; | ||
this.markedItem = this.filteredItems[this._markedItemIndex]; | ||
if (this.markedItem) { | ||
this.markedItem.marked = true; | ||
} | ||
get lastSelectedItem() { | ||
return this._selected[this._selected.length - 1]; | ||
} | ||
/** | ||
* @param {?} items | ||
* @return {?} | ||
*/ | ||
mapItems(items) { | ||
return items.map((item, index) => { | ||
return Object.assign({ index: index }, item); | ||
}); | ||
} | ||
} | ||
@@ -1504,2 +1519,5 @@ | ||
break; | ||
case KeyCode.BackSpace: | ||
this.handleBackspace(); | ||
break; | ||
} | ||
@@ -1593,3 +1611,4 @@ } | ||
this.isOpen = true; | ||
this.itemsList.markSelection(); | ||
this.itemsList.markItem(); | ||
this.scrollToMarked(); | ||
this.focusSearchInput(); | ||
@@ -1607,3 +1626,2 @@ this.onOpen.emit(); | ||
this.clearSearch(); | ||
this.itemsList.unmarkCurrentItem(); | ||
this.onClose.emit(); | ||
@@ -1626,23 +1644,4 @@ } | ||
* @param {?} item | ||
* @param {?} index | ||
* @param {?} first | ||
* @param {?} last | ||
* @param {?} even | ||
* @param {?} odd | ||
* @return {?} | ||
*/ | ||
getOptionTemplateContext(item, index, first, last, even, odd) { | ||
return { | ||
item: item || {}, | ||
index: index, | ||
first: first, | ||
last: last, | ||
even: even, | ||
odd: odd | ||
}; | ||
} | ||
/** | ||
* @param {?} item | ||
* @return {?} | ||
*/ | ||
toggle(item) { | ||
@@ -1653,3 +1652,3 @@ if (!item || item.disabled || this.isDisabled) { | ||
if (this.multiple && item.selected) { | ||
this.unSelect(item); | ||
this.unselect(item); | ||
} | ||
@@ -1678,4 +1677,4 @@ else { | ||
*/ | ||
unSelect(item) { | ||
this.itemsList.unSelect(item); | ||
unselect(item) { | ||
this.itemsList.unselect(item); | ||
this.updateModel(); | ||
@@ -1699,3 +1698,3 @@ } | ||
showClear() { | ||
return this.clearable && this.isValueSet(this.value) && !this.isDisabled; | ||
return this.clearable && (this.isValueSet(this.value) || this.filterValue) && !this.isDisabled; | ||
} | ||
@@ -1757,2 +1756,9 @@ /** | ||
/** | ||
* @param {?} item | ||
* @return {?} | ||
*/ | ||
onItemHover(item) { | ||
this.itemsList.markItem(item); | ||
} | ||
/** | ||
* @param {?} value | ||
@@ -1771,3 +1777,3 @@ * @return {?} | ||
this.isLoading = false; | ||
this.itemsList.markSelection(); | ||
this.itemsList.markItem(); | ||
} | ||
@@ -1877,2 +1883,23 @@ /** | ||
*/ | ||
handleBackspace() { | ||
if (this.multiple) { | ||
this.unSelectLastItem(); | ||
} | ||
else { | ||
if (this.filterValue) { | ||
return; | ||
} | ||
this.clear(); | ||
} | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
unSelectLastItem() { | ||
this.itemsList.unSelectLastItem(); | ||
this.updateModel(); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
notifyModelChanged() { | ||
@@ -1931,4 +1958,4 @@ const /** @type {?} */ value = this.itemsList.value; | ||
selector: 'ng-select', | ||
template: "<div (click)=\"open()\" class=\"as-control\"> <span class=\"as-multi-value-wrapper\"> <span class=\"as-placeholder\" *ngIf=\"showPlaceholder()\">{{placeholder}}</span> <ng-container *ngIf=\"!multiple;else multipleValue\"> <div class=\"as-value\" *ngIf=\"showValue()\"> <span class=\"as-value-label\" role=\"option\" aria-selected=\"true\"> <ng-template *ngIf=\"displayTemplateRef\" [ngTemplateOutlet]=\"displayTemplateRef.template\" [ngOutletContext]=\"getDisplayTemplateContext()\"> </ng-template> <span *ngIf=\"!displayTemplateRef\">{{getLabelValue(value)}}</span> </span> </div> </ng-container> <ng-template #multipleValue> <div class=\"as-value\" *ngFor=\"let item of value\"> <span class=\"as-value-label\" aria-selected=\"true\">{{getLabelValue(item)}}</span> <span class=\"as-clear\" (click)=\"unSelect(item)\" aria-hidden=\"true\">×</span> </div> </ng-template> <div *ngIf=\"showFilter()\" class=\"as-input\"> <input #filterInput [value]=\"filterValue\" (input)=\"onFilter($event)\" (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" role=\"combobox\" aria-expanded=\"false\" aria-owns=\"\" aria-haspopup=\"false\"> </div> </span> <spinner class=\"as-spinner-zone\" *ngIf=\"isLoading\"></spinner> <span *ngIf=\"showClear()\" (click)=\"clear()\" class=\"as-clear-zone\" title=\"Clear all\" aria-label=\"Clear all\"> <span class=\"as-clear\" aria-hidden=\"true\">×</span> </span> <span class=\"as-arrow-zone\"> <span class=\"as-arrow\"></span> </span> </div> <div class=\"as-menu-outer\" [ngStyle]=\"{'visibility': isOpen ? 'visible' : 'hidden'}\"> <virtual-scroll role=\"listbox\" class=\"as-menu\" [bufferAmount]=\"4\" [items]=\"itemsList.filteredItems\" (update)=\"viewPortItems = $event\"> <div class=\"as-option\" role=\"option\" (click)=\"toggle(item)\" *ngFor=\"let item of viewPortItems; let index = index; let first = first; let last = last; let even = even; let odd = odd\" [class.disabled]=\"item.disabled\" [class.selected]=\"item.selected\" [class.marked]=\"item.marked\"> <span *ngIf=\"!optionTemplateRef\">{{item[bindLabel]}}</span> <ng-template *ngIf=\"optionTemplateRef\" [ngTemplateOutlet]=\"optionTemplateRef.template\" [ngOutletContext]=\"getOptionTemplateContext(item, index, first, last, even, odd)\"> </ng-template> </div> </virtual-scroll> <div class=\"as-menu\" *ngIf=\"showNoItemsFound()\"> <div class=\"as-option disabled\"> No items found </div> </div> <div class=\"as-menu\" *ngIf=\"showTypeToSearch()\"> <div class=\"as-option disabled\"> Type to search </div> </div> </div> ", | ||
styles: ["ng-select { position: relative; display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select div, ng-select input, ng-select span, ng-select virtual-scroll { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select virtual-scroll { display: block; height: auto; } ng-select.opened > .as-control { border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #fff; border-color: #b3b3b3 #ccc #d9d9d9; } ng-select.opened > .as-control .as-arrow { top: -2px; border-color: transparent transparent #999; border-width: 0 5px 5px; } ng-select.opened > .as-control .as-arrow:hover { border-color: transparent transparent #666; } ng-select.opened .as-menu-outer { visibility: visible; } ng-select.focused:not(.opened) > .as-control { border-color: #007eff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1); } ng-select.disabled > .as-control { background-color: #f9f9f9; } ng-select .as-control { background-color: #fff; border-radius: 4px; border: 1px solid #ccc; color: #333; cursor: default; display: table; border-spacing: 0; border-collapse: separate; height: 36px; outline: none; overflow: hidden; position: relative; width: 100%; } ng-select .as-control:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); } ng-select .as-placeholder, ng-select.as-single > .as-control .as-value { bottom: 0; color: #aaa; left: 0; line-height: 34px; padding-left: 10px; padding-right: 10px; position: absolute; right: 0; top: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ng-select .as-placeholder .as-value-label, ng-select.as-single > .as-control .as-value .as-value-label { color: #333; } ng-select.as-multiple.disabled > .as-control .as-value { background-color: #f9f9f9; border: 1px solid #e3e3e3; } ng-select.as-multiple.disabled > .as-control .as-value .as-clear { display: none; } ng-select.as-multiple > .as-control .as-value { background-color: #f5faff; border-radius: 2px; border: 1px solid #c2e0ff; border: 1px solid rgba(0, 126, 255, 0.24); display: inline-block; font-size: 0.9em; line-height: 1.4; margin-left: 5px; margin-top: 5px; vertical-align: top; } ng-select.as-multiple > .as-control .as-value .as-clear { cursor: pointer; border-bottom-left-radius: 2px; border-top-left-radius: 2px; border-left: 1px solid #c2e0ff; border-left: 1px solid rgba(0, 126, 255, 0.24); padding: 1px 5px 3px; } ng-select.as-multiple > .as-control .as-value .as-value-label { border-bottom-right-radius: 2px; border-top-right-radius: 2px; cursor: default; padding: 2px 5px; } ng-select .as-input { height: 34px; padding-left: 10px; padding-right: 10px; vertical-align: middle; display: inline-block; } ng-select .as-input > input { min-width: 5px; box-sizing: content-box; background: none transparent; border: 0 none; box-shadow: none; cursor: default; display: inline-block; font-family: inherit; font-size: inherit; margin: 0; outline: none; line-height: 14px; /* For IE 8 compatibility */ padding: 8px 0 12px; /* For IE 8 compatibility */ -webkit-appearance: none; } ng-select .as-menu-outer { visibility: hidden; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: #fff; border: 1px solid #ccc; border-top-color: #e6e6e6; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); box-sizing: border-box; margin-top: -1px; max-height: 242px; position: absolute; top: 100%; width: 100%; z-index: 1; -webkit-overflow-scrolling: touch; } ng-select .as-menu { max-height: 240px; overflow-y: auto; } ng-select .as-option { box-sizing: border-box; background-color: #fff; color: #666666; cursor: pointer; display: block; padding: 8px 10px; } ng-select .as-option:last-child { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } ng-select .as-option.selected { background-color: #f5faff; color: #333; } ng-select .as-option.marked { background-color: #ebf5ff; color: #333; } ng-select .as-option:not(.disabled):hover { background-color: #ebf5ff; color: #333; } ng-select .as-option.disabled { color: #cccccc; cursor: default; } ng-select .as-clear-zone { -webkit-animation: Select-animation-fadeIn 200ms; -o-animation: Select-animation-fadeIn 200ms; animation: Select-animation-fadeIn 200ms; color: #999; cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 17px; } ng-select .as-clear-zone .as-clear { display: inline-block; font-size: 18px; line-height: 1; } ng-select .as-clear-zone .as-clear:hover { color: #D0021B; } ng-select .as-spinner-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; padding-top: 5px; } ng-select .as-arrow-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; } ng-select .as-arrow-zone .as-arrow { border-color: #999 transparent transparent; border-style: solid; border-width: 5px 5px 2.5px; display: inline-block; height: 0; width: 0; position: relative; } ng-select .as-arrow-zone .as-arrow:hover { border-top-color: #666; } "], | ||
template: "<div (click)=\"open()\" class=\"as-control\"> <span class=\"as-multi-value-wrapper\"> <span class=\"as-placeholder\" *ngIf=\"showPlaceholder()\">{{placeholder}}</span> <ng-container *ngIf=\"!multiple;else multipleValue\"> <div class=\"as-value\" *ngIf=\"showValue()\"> <span class=\"as-value-label\" role=\"option\" aria-selected=\"true\"> <ng-template *ngIf=\"labelTemplate\" [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"getDisplayTemplateContext()\"> </ng-template> <span *ngIf=\"!labelTemplate\">{{getLabelValue(value)}}</span> </span> </div> </ng-container> <ng-template #multipleValue> <div class=\"as-value\" *ngFor=\"let item of value\"> <span class=\"as-value-label\" aria-selected=\"true\">{{getLabelValue(item)}}</span> <span class=\"as-clear\" (click)=\"unselect(item)\" aria-hidden=\"true\">×</span> </div> </ng-template> <div *ngIf=\"showFilter()\" class=\"as-input\"> <input #filterInput [value]=\"filterValue\" (input)=\"onFilter($event)\" (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" role=\"combobox\" aria-expanded=\"false\" aria-owns=\"\" aria-haspopup=\"false\"> </div> </span> <spinner class=\"as-spinner-zone\" *ngIf=\"isLoading\"></spinner> <span *ngIf=\"showClear()\" (click)=\"clear()\" class=\"as-clear-zone\" title=\"Clear all\" aria-label=\"Clear all\"> <span class=\"as-clear\" aria-hidden=\"true\">×</span> </span> <span class=\"as-arrow-zone\"> <span class=\"as-arrow\"></span> </span> </div> <div class=\"as-menu-outer\"> <virtual-scroll role=\"listbox\" class=\"as-menu\" [bufferAmount]=\"4\" [items]=\"itemsList.filteredItems\" (update)=\"viewPortItems = $event\"> <div class=\"as-option\" role=\"option\" (click)=\"toggle(item)\" (mouseover)=\"onItemHover(item)\" *ngFor=\"let item of viewPortItems;\" [class.disabled]=\"item.disabled\" [class.selected]=\"item.selected\" [class.marked]=\"item === itemsList.markedItem\"> <span *ngIf=\"!optionTemplate\">{{item[bindLabel]}}</span> <ng-template *ngIf=\"optionTemplate\" [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{ item: item, index: item.index }\"> </ng-template> </div> </virtual-scroll> <div class=\"as-menu\" *ngIf=\"showNoItemsFound()\"> <div class=\"as-option disabled\"> No items found </div> </div> <div class=\"as-menu\" *ngIf=\"showTypeToSearch()\"> <div class=\"as-option disabled\"> Type to search </div> </div> </div> ", | ||
styles: ["ng-select { position: relative; display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select div, ng-select input, ng-select span, ng-select virtual-scroll { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select virtual-scroll { display: block; height: auto; } ng-select.opened > .as-control { border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #fff; border-color: #b3b3b3 #ccc #d9d9d9; } ng-select.opened > .as-control .as-arrow { top: -2px; border-color: transparent transparent #999; border-width: 0 5px 5px; } ng-select.opened > .as-control .as-arrow:hover { border-color: transparent transparent #666; } ng-select.opened .as-menu-outer { visibility: visible; } ng-select.focused:not(.opened) > .as-control { border-color: #007eff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1); } ng-select.disabled > .as-control { background-color: #f9f9f9; } ng-select .as-control { background-color: #fff; border-radius: 4px; border: 1px solid #ccc; color: #333; cursor: default; display: table; border-spacing: 0; border-collapse: separate; height: 36px; outline: none; overflow: hidden; position: relative; width: 100%; } ng-select .as-control:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); } ng-select .as-placeholder, ng-select.as-single > .as-control .as-value { bottom: 0; color: #aaa; left: 0; line-height: 34px; padding-left: 10px; padding-right: 10px; position: absolute; right: 0; top: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ng-select .as-placeholder .as-value-label, ng-select.as-single > .as-control .as-value .as-value-label { color: #333; } ng-select.as-multiple.disabled > .as-control .as-value { background-color: #f9f9f9; border: 1px solid #e3e3e3; } ng-select.as-multiple.disabled > .as-control .as-value .as-clear { display: none; } ng-select.as-multiple > .as-control .as-value { background-color: #f5faff; border-radius: 2px; border: 1px solid #c2e0ff; border: 1px solid rgba(0, 126, 255, 0.24); display: inline-block; font-size: 0.9em; line-height: 1.4; margin-left: 5px; margin-top: 5px; vertical-align: top; } ng-select.as-multiple > .as-control .as-value .as-clear { cursor: pointer; border-bottom-left-radius: 2px; border-top-left-radius: 2px; border-left: 1px solid #c2e0ff; border-left: 1px solid rgba(0, 126, 255, 0.24); padding: 1px 5px 3px; } ng-select.as-multiple > .as-control .as-value .as-value-label { border-bottom-right-radius: 2px; border-top-right-radius: 2px; cursor: default; padding: 2px 5px; } ng-select .as-input { height: 34px; padding-left: 10px; padding-right: 10px; vertical-align: middle; display: inline-block; } ng-select .as-input > input { min-width: 5px; box-sizing: content-box; background: none transparent; border: 0 none; box-shadow: none; cursor: default; display: inline-block; font-family: inherit; font-size: inherit; margin: 0; outline: none; line-height: 14px; /* For IE 8 compatibility */ padding: 8px 0 12px; /* For IE 8 compatibility */ -webkit-appearance: none; } ng-select .as-menu-outer { visibility: hidden; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: #fff; border: 1px solid #ccc; border-top-color: #e6e6e6; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); box-sizing: border-box; margin-top: -1px; max-height: 242px; position: absolute; top: 100%; width: 100%; z-index: 1; -webkit-overflow-scrolling: touch; } ng-select .as-menu { max-height: 240px; overflow-y: auto; } ng-select .as-option { box-sizing: border-box; background-color: #fff; color: #666666; cursor: pointer; display: block; padding: 8px 10px; } ng-select .as-option:last-child { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } ng-select .as-option.selected { background-color: #f5faff; color: #333; } ng-select .as-option.marked { background-color: #ebf5ff; color: #333; } ng-select .as-option.disabled { color: #cccccc; cursor: default; } ng-select .as-clear-zone { -webkit-animation: Select-animation-fadeIn 200ms; -o-animation: Select-animation-fadeIn 200ms; animation: Select-animation-fadeIn 200ms; color: #999; cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 17px; } ng-select .as-clear-zone .as-clear { display: inline-block; font-size: 18px; line-height: 1; } ng-select .as-clear-zone .as-clear:hover { color: #D0021B; } ng-select .as-spinner-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; padding-top: 5px; } ng-select .as-arrow-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; } ng-select .as-arrow-zone .as-arrow { border-color: #999 transparent transparent; border-style: solid; border-width: 5px 5px 2.5px; display: inline-block; height: 0; width: 0; position: relative; } ng-select .as-arrow-zone .as-arrow:hover { border-top-color: #666; } "], | ||
providers: [NGB_ANG_SELECT_VALUE_ACCESSOR], | ||
@@ -1950,4 +1977,4 @@ encapsulation: ViewEncapsulation.None, | ||
NgSelectComponent.propDecorators = { | ||
'optionTemplateRef': [{ type: ContentChild, args: [NgOptionDirective,] },], | ||
'displayTemplateRef': [{ type: ContentChild, args: [NgDisplayDirective,] },], | ||
'optionTemplate': [{ type: ContentChild, args: [NgOptionTemplateDirective, { read: TemplateRef },] },], | ||
'labelTemplate': [{ type: ContentChild, args: [NgLabelTemplateDirective, { read: TemplateRef },] },], | ||
'dropdownList': [{ type: ViewChild, args: [VirtualScrollComponent,] },], | ||
@@ -2034,4 +2061,4 @@ 'filterInput': [{ type: ViewChild, args: ['filterInput',] },], | ||
NgSelectComponent, | ||
NgOptionDirective, | ||
NgDisplayDirective, | ||
NgOptionTemplateDirective, | ||
NgLabelTemplateDirective, | ||
AngSearchFocusDirective, | ||
@@ -2047,4 +2074,4 @@ SpinnerComponent | ||
NgSelectComponent, | ||
NgOptionDirective, | ||
NgDisplayDirective | ||
NgOptionTemplateDirective, | ||
NgLabelTemplateDirective | ||
] | ||
@@ -2062,3 +2089,3 @@ },] }, | ||
export { NgSelectComponent, NgSelectModule, AngSearchFocusDirective as ɵe, NgDisplayDirective as ɵb, NgOptionDirective as ɵa, SpinnerComponent as ɵf, VirtualScrollComponent as ɵc, VirtualScrollModule as ɵd }; | ||
export { NgSelectComponent, NgSelectModule, AngSearchFocusDirective as ɵe, NgLabelTemplateDirective as ɵb, NgOptionTemplateDirective as ɵa, SpinnerComponent as ɵf, VirtualScrollComponent as ɵc, VirtualScrollModule as ɵd }; | ||
//# sourceMappingURL=ng-select.js.map |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"NgSelectComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-select","template":"<div (click)=\"open()\" class=\"as-control\"> <span class=\"as-multi-value-wrapper\"> <span class=\"as-placeholder\" *ngIf=\"showPlaceholder()\">{{placeholder}}</span> <ng-container *ngIf=\"!multiple;else multipleValue\"> <div class=\"as-value\" *ngIf=\"showValue()\"> <span class=\"as-value-label\" role=\"option\" aria-selected=\"true\"> <ng-template *ngIf=\"displayTemplateRef\" [ngTemplateOutlet]=\"displayTemplateRef.template\" [ngOutletContext]=\"getDisplayTemplateContext()\"> </ng-template> <span *ngIf=\"!displayTemplateRef\">{{getLabelValue(value)}}</span> </span> </div> </ng-container> <ng-template #multipleValue> <div class=\"as-value\" *ngFor=\"let item of value\"> <span class=\"as-value-label\" aria-selected=\"true\">{{getLabelValue(item)}}</span> <span class=\"as-clear\" (click)=\"unSelect(item)\" aria-hidden=\"true\">×</span> </div> </ng-template> <div *ngIf=\"showFilter()\" class=\"as-input\"> <input #filterInput [value]=\"filterValue\" (input)=\"onFilter($event)\" (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" role=\"combobox\" aria-expanded=\"false\" aria-owns=\"\" aria-haspopup=\"false\"> </div> </span> <spinner class=\"as-spinner-zone\" *ngIf=\"isLoading\"></spinner> <span *ngIf=\"showClear()\" (click)=\"clear()\" class=\"as-clear-zone\" title=\"Clear all\" aria-label=\"Clear all\"> <span class=\"as-clear\" aria-hidden=\"true\">×</span> </span> <span class=\"as-arrow-zone\"> <span class=\"as-arrow\"></span> </span> </div> <div class=\"as-menu-outer\" [ngStyle]=\"{'visibility': isOpen ? 'visible' : 'hidden'}\"> <virtual-scroll role=\"listbox\" class=\"as-menu\" [bufferAmount]=\"4\" [items]=\"itemsList.filteredItems\" (update)=\"viewPortItems = $event\"> <div class=\"as-option\" role=\"option\" (click)=\"toggle(item)\" *ngFor=\"let item of viewPortItems; let index = index; let first = first; let last = last; let even = even; let odd = odd\" [class.disabled]=\"item.disabled\" [class.selected]=\"item.selected\" [class.marked]=\"item.marked\"> <span *ngIf=\"!optionTemplateRef\">{{item[bindLabel]}}</span> <ng-template *ngIf=\"optionTemplateRef\" [ngTemplateOutlet]=\"optionTemplateRef.template\" [ngOutletContext]=\"getOptionTemplateContext(item, index, first, last, even, odd)\"> </ng-template> </div> </virtual-scroll> <div class=\"as-menu\" *ngIf=\"showNoItemsFound()\"> <div class=\"as-option disabled\"> No items found </div> </div> <div class=\"as-menu\" *ngIf=\"showTypeToSearch()\"> <div class=\"as-option disabled\"> Type to search </div> </div> </div> ","styles":["ng-select { position: relative; display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select div, ng-select input, ng-select span, ng-select virtual-scroll { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select virtual-scroll { display: block; height: auto; } ng-select.opened > .as-control { border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #fff; border-color: #b3b3b3 #ccc #d9d9d9; } ng-select.opened > .as-control .as-arrow { top: -2px; border-color: transparent transparent #999; border-width: 0 5px 5px; } ng-select.opened > .as-control .as-arrow:hover { border-color: transparent transparent #666; } ng-select.opened .as-menu-outer { visibility: visible; } ng-select.focused:not(.opened) > .as-control { border-color: #007eff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1); } ng-select.disabled > .as-control { background-color: #f9f9f9; } ng-select .as-control { background-color: #fff; border-radius: 4px; border: 1px solid #ccc; color: #333; cursor: default; display: table; border-spacing: 0; border-collapse: separate; height: 36px; outline: none; overflow: hidden; position: relative; width: 100%; } ng-select .as-control:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); } ng-select .as-placeholder, ng-select.as-single > .as-control .as-value { bottom: 0; color: #aaa; left: 0; line-height: 34px; padding-left: 10px; padding-right: 10px; position: absolute; right: 0; top: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ng-select .as-placeholder .as-value-label, ng-select.as-single > .as-control .as-value .as-value-label { color: #333; } ng-select.as-multiple.disabled > .as-control .as-value { background-color: #f9f9f9; border: 1px solid #e3e3e3; } ng-select.as-multiple.disabled > .as-control .as-value .as-clear { display: none; } ng-select.as-multiple > .as-control .as-value { background-color: #f5faff; border-radius: 2px; border: 1px solid #c2e0ff; border: 1px solid rgba(0, 126, 255, 0.24); display: inline-block; font-size: 0.9em; line-height: 1.4; margin-left: 5px; margin-top: 5px; vertical-align: top; } ng-select.as-multiple > .as-control .as-value .as-clear { cursor: pointer; border-bottom-left-radius: 2px; border-top-left-radius: 2px; border-left: 1px solid #c2e0ff; border-left: 1px solid rgba(0, 126, 255, 0.24); padding: 1px 5px 3px; } ng-select.as-multiple > .as-control .as-value .as-value-label { border-bottom-right-radius: 2px; border-top-right-radius: 2px; cursor: default; padding: 2px 5px; } ng-select .as-input { height: 34px; padding-left: 10px; padding-right: 10px; vertical-align: middle; display: inline-block; } ng-select .as-input > input { min-width: 5px; box-sizing: content-box; background: none transparent; border: 0 none; box-shadow: none; cursor: default; display: inline-block; font-family: inherit; font-size: inherit; margin: 0; outline: none; line-height: 14px; /* For IE 8 compatibility */ padding: 8px 0 12px; /* For IE 8 compatibility */ -webkit-appearance: none; } ng-select .as-menu-outer { visibility: hidden; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: #fff; border: 1px solid #ccc; border-top-color: #e6e6e6; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); box-sizing: border-box; margin-top: -1px; max-height: 242px; position: absolute; top: 100%; width: 100%; z-index: 1; -webkit-overflow-scrolling: touch; } ng-select .as-menu { max-height: 240px; overflow-y: auto; } ng-select .as-option { box-sizing: border-box; background-color: #fff; color: #666666; cursor: pointer; display: block; padding: 8px 10px; } ng-select .as-option:last-child { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } ng-select .as-option.selected { background-color: #f5faff; color: #333; } ng-select .as-option.marked { background-color: #ebf5ff; color: #333; } ng-select .as-option:not(.disabled):hover { background-color: #ebf5ff; color: #333; } ng-select .as-option.disabled { color: #cccccc; cursor: default; } ng-select .as-clear-zone { -webkit-animation: Select-animation-fadeIn 200ms; -o-animation: Select-animation-fadeIn 200ms; animation: Select-animation-fadeIn 200ms; color: #999; cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 17px; } ng-select .as-clear-zone .as-clear { display: inline-block; font-size: 18px; line-height: 1; } ng-select .as-clear-zone .as-clear:hover { color: #D0021B; } ng-select .as-spinner-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; padding-top: 5px; } ng-select .as-arrow-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; } ng-select .as-arrow-zone .as-arrow { border-color: #999 transparent transparent; border-style: solid; border-width: 5px 5px 2.5px; display: inline-block; height: 0; width: 0; position: relative; } ng-select .as-arrow-zone .as-arrow:hover { border-top-color: #666; } "],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"NgSelectComponent"},"multi":true}],"encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation"},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"host":{"role":"dropdown"}}]}],"members":{"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","name":"ɵa"}]}]}],"displayTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}]}],"dropdownList":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":[{"__symbolic":"reference","name":"ɵc"}]}]}],"filterInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["filterInput"]}]}],"bindLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"bindValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"clearable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"typeahead":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"multiple":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.as-multiple"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"onChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["change"]}]}],"onOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["open"]}]}],"onClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["close"]}]}],"onSearch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["search"]}]}],"single":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.as-single"]}]}],"isOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.opened"]}]}],"isFocused":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.focused"]}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.disabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"handleKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleDocumentClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["document:click",["$event"]]}]}],"clear":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"open":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"getLabelValue":[{"__symbolic":"method"}],"getDisplayTemplateContext":[{"__symbolic":"method"}],"getOptionTemplateContext":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"unSelect":[{"__symbolic":"method"}],"showPlaceholder":[{"__symbolic":"method"}],"showValue":[{"__symbolic":"method"}],"showClear":[{"__symbolic":"method"}],"showFilter":[{"__symbolic":"method"}],"showNoItemsFound":[{"__symbolic":"method"}],"showTypeToSearch":[{"__symbolic":"method"}],"onFilter":[{"__symbolic":"method"}],"onInputFocus":[{"__symbolic":"method"}],"onInputBlur":[{"__symbolic":"method"}],"validateWriteValue":[{"__symbolic":"method"}],"handleItemsChange":[{"__symbolic":"method"}],"selectWriteValue":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"clearSearch":[{"__symbolic":"method"}],"focusSearchInput":[{"__symbolic":"method"}],"scrollToMarked":[{"__symbolic":"method"}],"handleTab":[{"__symbolic":"method"}],"handleEnter":[{"__symbolic":"method"}],"handleSpace":[{"__symbolic":"method"}],"handleArrowDown":[{"__symbolic":"method"}],"handleArrowUp":[{"__symbolic":"method"}],"notifyModelChanged":[{"__symbolic":"method"}],"getDropdownMenu":[{"__symbolic":"method"}],"isTypeahead":[{"__symbolic":"method"}],"detectChanges":[{"__symbolic":"method"}],"isValueSet":[{"__symbolic":"method"}]}},"NgSelectModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgSelectComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"}],"imports":[{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule"},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","name":"ɵd"}],"exports":[{"__symbolic":"reference","name":"NgSelectComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"}]}]}],"members":{}},"NgOption":{"__symbolic":"interface"},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ng-option-tmp]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ng-display-tmp]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"virtual-scroll,[virtualScroll]","exportAs":"virtualScroll","template":"\n <div *ngIf=\"enabled\" class=\"total-padding\" [style.height]=\"scrollHeight + 'px'\"></div>\n <div #content\n [class.scrollable-content]=\"enabled\"\n [style.transform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\"\n [style.webkitTransform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\">\n <ng-content></ng-content>\n </div>\n ","host":{"[style.overflow-y]":"parentScroll ? 'hidden' : 'auto'"},"styles":["\n :host {\n overflow: hidden;\n position: relative;\n display: block;\n -webkit-overflow-scrolling: touch;\n }\n\n .scrollable-content {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n }\n\n .total-padding {\n width: 1px;\n opacity: 0;\n }\n "]}]}],"members":{"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"scrollbarWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"scrollbarHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"childWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"childHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"bufferAmount":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"start":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"contentElementRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["content",{"read":{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}}]}]}],"containerElementRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":["container"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"parentScroll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onScroll":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["scroll"]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"refresh":[{"__symbolic":"method"}],"scrollInto":[{"__symbolic":"method"}],"addParentEventHandlers":[{"__symbolic":"method"}],"removeParentEventHandlers":[{"__symbolic":"method"}],"countItemsPerRow":[{"__symbolic":"method"}],"getElementsOffset":[{"__symbolic":"method"}],"calculateDimensions":[{"__symbolic":"method"}],"calculateItems":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"exports":[{"__symbolic":"reference","name":"ɵc"}],"declarations":[{"__symbolic":"reference","name":"ɵc"}]}]}],"members":{}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[angSearchFocus]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"spinner","template":"\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n width=\"20px\" height=\"20px\" viewBox=\"0 0 50 50\" style=\"enable-background:new 0 0 50 50;\" xml:space=\"preserve\">\n <path fill=\"#777\" d=\"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z\">\n <animateTransform attributeType=\"xml\"\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 25 25\"\n to=\"360 25 25\"\n dur=\"0.6s\"\n repeatCount=\"indefinite\"/>\n </path>\n </svg>"}]}],"members":{}}},"origins":{"NgSelectComponent":"./src/ng-select.component","NgSelectModule":"./src/ng-select.module","NgOption":"./src/ng-select.types","ɵa":"./src/ng-templates.directive","ɵb":"./src/ng-templates.directive","ɵc":"./src/virtual-scroll.component","ɵd":"./src/virtual-scroll.component","ɵe":"./src/ng-search-focus.directive","ɵf":"./src/spinner.component"},"importAs":"@ng-select/ng-select"} | ||
{"__symbolic":"module","version":3,"metadata":{"NgSelectComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-select","template":"<div (click)=\"open()\" class=\"as-control\"> <span class=\"as-multi-value-wrapper\"> <span class=\"as-placeholder\" *ngIf=\"showPlaceholder()\">{{placeholder}}</span> <ng-container *ngIf=\"!multiple;else multipleValue\"> <div class=\"as-value\" *ngIf=\"showValue()\"> <span class=\"as-value-label\" role=\"option\" aria-selected=\"true\"> <ng-template *ngIf=\"labelTemplate\" [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"getDisplayTemplateContext()\"> </ng-template> <span *ngIf=\"!labelTemplate\">{{getLabelValue(value)}}</span> </span> </div> </ng-container> <ng-template #multipleValue> <div class=\"as-value\" *ngFor=\"let item of value\"> <span class=\"as-value-label\" aria-selected=\"true\">{{getLabelValue(item)}}</span> <span class=\"as-clear\" (click)=\"unselect(item)\" aria-hidden=\"true\">×</span> </div> </ng-template> <div *ngIf=\"showFilter()\" class=\"as-input\"> <input #filterInput [value]=\"filterValue\" (input)=\"onFilter($event)\" (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" role=\"combobox\" aria-expanded=\"false\" aria-owns=\"\" aria-haspopup=\"false\"> </div> </span> <spinner class=\"as-spinner-zone\" *ngIf=\"isLoading\"></spinner> <span *ngIf=\"showClear()\" (click)=\"clear()\" class=\"as-clear-zone\" title=\"Clear all\" aria-label=\"Clear all\"> <span class=\"as-clear\" aria-hidden=\"true\">×</span> </span> <span class=\"as-arrow-zone\"> <span class=\"as-arrow\"></span> </span> </div> <div class=\"as-menu-outer\"> <virtual-scroll role=\"listbox\" class=\"as-menu\" [bufferAmount]=\"4\" [items]=\"itemsList.filteredItems\" (update)=\"viewPortItems = $event\"> <div class=\"as-option\" role=\"option\" (click)=\"toggle(item)\" (mouseover)=\"onItemHover(item)\" *ngFor=\"let item of viewPortItems;\" [class.disabled]=\"item.disabled\" [class.selected]=\"item.selected\" [class.marked]=\"item === itemsList.markedItem\"> <span *ngIf=\"!optionTemplate\">{{item[bindLabel]}}</span> <ng-template *ngIf=\"optionTemplate\" [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{ item: item, index: item.index }\"> </ng-template> </div> </virtual-scroll> <div class=\"as-menu\" *ngIf=\"showNoItemsFound()\"> <div class=\"as-option disabled\"> No items found </div> </div> <div class=\"as-menu\" *ngIf=\"showTypeToSearch()\"> <div class=\"as-option disabled\"> Type to search </div> </div> </div> ","styles":["ng-select { position: relative; display: block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select div, ng-select input, ng-select span, ng-select virtual-scroll { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ng-select virtual-scroll { display: block; height: auto; } ng-select.opened > .as-control { border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #fff; border-color: #b3b3b3 #ccc #d9d9d9; } ng-select.opened > .as-control .as-arrow { top: -2px; border-color: transparent transparent #999; border-width: 0 5px 5px; } ng-select.opened > .as-control .as-arrow:hover { border-color: transparent transparent #666; } ng-select.opened .as-menu-outer { visibility: visible; } ng-select.focused:not(.opened) > .as-control { border-color: #007eff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1); } ng-select.disabled > .as-control { background-color: #f9f9f9; } ng-select .as-control { background-color: #fff; border-radius: 4px; border: 1px solid #ccc; color: #333; cursor: default; display: table; border-spacing: 0; border-collapse: separate; height: 36px; outline: none; overflow: hidden; position: relative; width: 100%; } ng-select .as-control:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); } ng-select .as-placeholder, ng-select.as-single > .as-control .as-value { bottom: 0; color: #aaa; left: 0; line-height: 34px; padding-left: 10px; padding-right: 10px; position: absolute; right: 0; top: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ng-select .as-placeholder .as-value-label, ng-select.as-single > .as-control .as-value .as-value-label { color: #333; } ng-select.as-multiple.disabled > .as-control .as-value { background-color: #f9f9f9; border: 1px solid #e3e3e3; } ng-select.as-multiple.disabled > .as-control .as-value .as-clear { display: none; } ng-select.as-multiple > .as-control .as-value { background-color: #f5faff; border-radius: 2px; border: 1px solid #c2e0ff; border: 1px solid rgba(0, 126, 255, 0.24); display: inline-block; font-size: 0.9em; line-height: 1.4; margin-left: 5px; margin-top: 5px; vertical-align: top; } ng-select.as-multiple > .as-control .as-value .as-clear { cursor: pointer; border-bottom-left-radius: 2px; border-top-left-radius: 2px; border-left: 1px solid #c2e0ff; border-left: 1px solid rgba(0, 126, 255, 0.24); padding: 1px 5px 3px; } ng-select.as-multiple > .as-control .as-value .as-value-label { border-bottom-right-radius: 2px; border-top-right-radius: 2px; cursor: default; padding: 2px 5px; } ng-select .as-input { height: 34px; padding-left: 10px; padding-right: 10px; vertical-align: middle; display: inline-block; } ng-select .as-input > input { min-width: 5px; box-sizing: content-box; background: none transparent; border: 0 none; box-shadow: none; cursor: default; display: inline-block; font-family: inherit; font-size: inherit; margin: 0; outline: none; line-height: 14px; /* For IE 8 compatibility */ padding: 8px 0 12px; /* For IE 8 compatibility */ -webkit-appearance: none; } ng-select .as-menu-outer { visibility: hidden; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: #fff; border: 1px solid #ccc; border-top-color: #e6e6e6; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); box-sizing: border-box; margin-top: -1px; max-height: 242px; position: absolute; top: 100%; width: 100%; z-index: 1; -webkit-overflow-scrolling: touch; } ng-select .as-menu { max-height: 240px; overflow-y: auto; } ng-select .as-option { box-sizing: border-box; background-color: #fff; color: #666666; cursor: pointer; display: block; padding: 8px 10px; } ng-select .as-option:last-child { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } ng-select .as-option.selected { background-color: #f5faff; color: #333; } ng-select .as-option.marked { background-color: #ebf5ff; color: #333; } ng-select .as-option.disabled { color: #cccccc; cursor: default; } ng-select .as-clear-zone { -webkit-animation: Select-animation-fadeIn 200ms; -o-animation: Select-animation-fadeIn 200ms; animation: Select-animation-fadeIn 200ms; color: #999; cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 17px; } ng-select .as-clear-zone .as-clear { display: inline-block; font-size: 18px; line-height: 1; } ng-select .as-clear-zone .as-clear:hover { color: #D0021B; } ng-select .as-spinner-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; padding-top: 5px; } ng-select .as-arrow-zone { cursor: pointer; display: table-cell; position: relative; text-align: center; vertical-align: middle; width: 25px; padding-right: 5px; } ng-select .as-arrow-zone .as-arrow { border-color: #999 transparent transparent; border-style: solid; border-width: 5px 5px 2.5px; display: inline-block; height: 0; width: 0; position: relative; } ng-select .as-arrow-zone .as-arrow:hover { border-top-color: #666; } "],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"NgSelectComponent"},"multi":true}],"encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation"},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"},"host":{"role":"dropdown"}}]}],"members":{"optionTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","name":"ɵa"},{"read":{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef"}}]}]}],"labelTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":[{"__symbolic":"reference","name":"ɵb"},{"read":{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef"}}]}]}],"dropdownList":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":[{"__symbolic":"reference","name":"ɵc"}]}]}],"filterInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["filterInput"]}]}],"bindLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"bindValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"clearable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"typeahead":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"multiple":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.as-multiple"]}]}],"onBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["focus"]}]}],"onChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["change"]}]}],"onOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["open"]}]}],"onClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["close"]}]}],"onSearch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["search"]}]}],"single":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.as-single"]}]}],"isOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.opened"]}]}],"isFocused":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.focused"]}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding"},"arguments":["class.disabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"handleKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["keydown",["$event"]]}]}],"handleDocumentClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["document:click",["$event"]]}]}],"clear":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"open":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"getLabelValue":[{"__symbolic":"method"}],"getDisplayTemplateContext":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"unselect":[{"__symbolic":"method"}],"showPlaceholder":[{"__symbolic":"method"}],"showValue":[{"__symbolic":"method"}],"showClear":[{"__symbolic":"method"}],"showFilter":[{"__symbolic":"method"}],"showNoItemsFound":[{"__symbolic":"method"}],"showTypeToSearch":[{"__symbolic":"method"}],"onFilter":[{"__symbolic":"method"}],"onInputFocus":[{"__symbolic":"method"}],"onInputBlur":[{"__symbolic":"method"}],"onItemHover":[{"__symbolic":"method"}],"validateWriteValue":[{"__symbolic":"method"}],"handleItemsChange":[{"__symbolic":"method"}],"selectWriteValue":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"clearSearch":[{"__symbolic":"method"}],"focusSearchInput":[{"__symbolic":"method"}],"scrollToMarked":[{"__symbolic":"method"}],"handleTab":[{"__symbolic":"method"}],"handleEnter":[{"__symbolic":"method"}],"handleSpace":[{"__symbolic":"method"}],"handleArrowDown":[{"__symbolic":"method"}],"handleArrowUp":[{"__symbolic":"method"}],"handleBackspace":[{"__symbolic":"method"}],"unSelectLastItem":[{"__symbolic":"method"}],"notifyModelChanged":[{"__symbolic":"method"}],"getDropdownMenu":[{"__symbolic":"method"}],"isTypeahead":[{"__symbolic":"method"}],"detectChanges":[{"__symbolic":"method"}],"isValueSet":[{"__symbolic":"method"}]}},"NgSelectModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgSelectComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","name":"ɵf"}],"imports":[{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule"},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","name":"ɵd"}],"exports":[{"__symbolic":"reference","name":"NgSelectComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"}]}]}],"members":{}},"NgOption":{"__symbolic":"interface"},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ng-option-tmp]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ng-label-tmp]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"virtual-scroll,[virtualScroll]","exportAs":"virtualScroll","template":"\n <div *ngIf=\"enabled\" class=\"total-padding\" [style.height]=\"scrollHeight + 'px'\"></div>\n <div #content\n [class.scrollable-content]=\"enabled\"\n [style.transform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\"\n [style.webkitTransform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\">\n <ng-content></ng-content>\n </div>\n ","host":{"[style.overflow-y]":"parentScroll ? 'hidden' : 'auto'"},"styles":["\n :host {\n overflow: hidden;\n position: relative;\n display: block;\n -webkit-overflow-scrolling: touch;\n }\n\n .scrollable-content {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n }\n\n .total-padding {\n width: 1px;\n opacity: 0;\n }\n "]}]}],"members":{"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"scrollbarWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"scrollbarHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"childWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"childHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"bufferAmount":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"start":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"contentElementRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["content",{"read":{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}}]}]}],"containerElementRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild"},"arguments":["container"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"parentScroll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onScroll":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener"},"arguments":["scroll"]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"refresh":[{"__symbolic":"method"}],"scrollInto":[{"__symbolic":"method"}],"addParentEventHandlers":[{"__symbolic":"method"}],"removeParentEventHandlers":[{"__symbolic":"method"}],"countItemsPerRow":[{"__symbolic":"method"}],"getElementsOffset":[{"__symbolic":"method"}],"calculateDimensions":[{"__symbolic":"method"}],"calculateItems":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"exports":[{"__symbolic":"reference","name":"ɵc"}],"declarations":[{"__symbolic":"reference","name":"ɵc"}]}]}],"members":{}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[angSearchFocus]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"spinner","template":"\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n width=\"20px\" height=\"20px\" viewBox=\"0 0 50 50\" style=\"enable-background:new 0 0 50 50;\" xml:space=\"preserve\">\n <path fill=\"#777\" d=\"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z\">\n <animateTransform attributeType=\"xml\"\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 25 25\"\n to=\"360 25 25\"\n dur=\"0.6s\"\n repeatCount=\"indefinite\"/>\n </path>\n </svg>"}]}],"members":{}}},"origins":{"NgSelectComponent":"./src/ng-select.component","NgSelectModule":"./src/ng-select.module","NgOption":"./src/ng-select.types","ɵa":"./src/ng-templates.directive","ɵb":"./src/ng-templates.directive","ɵc":"./src/virtual-scroll.component","ɵd":"./src/virtual-scroll.component","ɵe":"./src/ng-search-focus.directive","ɵf":"./src/spinner.component"},"importAs":"@ng-select/ng-select"} |
{ | ||
"name": "@ng-select/ng-select", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Angular native ui select", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/ng-select.umd.js", |
@@ -192,3 +192,3 @@ [![npm version](https://badge.fury.io/js/%40ng-select%2Fng-select.svg)](https://badge.fury.io/js/%40ng-select%2Fng-select) | ||
To customize look of input display or option item you can use `ng-template` with `ng-display-tmp` or `ng-option-tmp` directives applied to it. | ||
To customize look of input display or option item you can use `ng-template` with `ng-label-tmp` or `ng-option-tmp` directives applied to it. | ||
```js | ||
@@ -210,3 +210,3 @@ import {Component, NgModule} from '@angular/core'; | ||
placeholder="Select album"> | ||
<ng-template ng-display-tmp let-item="item"> | ||
<ng-template ng-label-tmp let-item="item"> | ||
<b>({{item.id}})</b> {{item.title}} | ||
@@ -241,2 +241,3 @@ </ng-template> | ||
Contributions are welcome. You can start by looking at issues with label Help wanted https://github.com/ng-select/ng-select/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22 or creating new Issue with proposal or bug report. | ||
Note that we are using https://conventionalcommits.org/ commits format. | ||
@@ -276,4 +277,1 @@ ## Development | ||
``` | ||
### Commits | ||
Follow https://conventionalcommits.org/ |
@@ -5,4 +5,3 @@ import { NgOption } from './ng-select.types'; | ||
filteredItems: NgOption[]; | ||
markedItem: NgOption; | ||
private _markedItemIndex; | ||
private _markedIndex; | ||
private _selected; | ||
@@ -12,4 +11,6 @@ private _multiple; | ||
readonly value: NgOption | NgOption[]; | ||
readonly markedItem: NgOption; | ||
select(item: NgOption): void; | ||
unSelect(item: NgOption): void; | ||
unselect(item: NgOption): void; | ||
unSelectLastItem(): void; | ||
clearSelected(): void; | ||
@@ -20,8 +21,8 @@ filter(term: string, bindLabel: string): void; | ||
markPreviousItem(): void; | ||
markSelection(): void; | ||
unmarkCurrentItem(): void; | ||
private getNextItemIndex(delta); | ||
markItem(item?: NgOption): void; | ||
private getNextItemIndex(steps); | ||
private stepToItem(steps); | ||
private getDefaultFilterFunc(term, bindLabel); | ||
private markItem(index); | ||
private readonly lastSelectedItem; | ||
private mapItems(items); | ||
} |
@@ -10,4 +10,4 @@ import { OnInit, OnDestroy, ChangeDetectorRef, EventEmitter, TemplateRef, ElementRef } from '@angular/core'; | ||
private elementRef; | ||
optionTemplateRef: TemplateRef<any>; | ||
displayTemplateRef: TemplateRef<any>; | ||
optionTemplate: TemplateRef<any>; | ||
labelTemplate: TemplateRef<any>; | ||
dropdownList: VirtualScrollComponent; | ||
@@ -55,13 +55,5 @@ filterInput: any; | ||
}; | ||
getOptionTemplateContext(item: any, index: number, first: boolean, last: boolean, even: boolean, odd: boolean): { | ||
item: any; | ||
index: number; | ||
first: boolean; | ||
last: boolean; | ||
even: boolean; | ||
odd: boolean; | ||
}; | ||
toggle(item: NgOption): void; | ||
select(item: NgOption): void; | ||
unSelect(item: NgOption): void; | ||
unselect(item: NgOption): void; | ||
showPlaceholder(): boolean; | ||
@@ -76,2 +68,3 @@ showValue(): boolean; | ||
onInputBlur($event: any): void; | ||
onItemHover(item: NgOption): void; | ||
private validateWriteValue(value); | ||
@@ -89,2 +82,4 @@ private handleItemsChange(); | ||
private handleArrowUp($event); | ||
private handleBackspace(); | ||
private unSelectLastItem(); | ||
private notifyModelChanged(); | ||
@@ -91,0 +86,0 @@ private getDropdownMenu(); |
export interface NgOption { | ||
[name: string]: any; | ||
index?: number; | ||
selected?: boolean; | ||
@@ -16,2 +17,3 @@ disabled?: boolean; | ||
ArrowDown = 40, | ||
BackSpace = 8, | ||
} |
import { TemplateRef } from '@angular/core'; | ||
export declare class NgOptionDirective { | ||
export declare class NgOptionTemplateDirective { | ||
template: TemplateRef<any>; | ||
constructor(template: TemplateRef<any>); | ||
} | ||
export declare class NgDisplayDirective { | ||
export declare class NgLabelTemplateDirective { | ||
template: TemplateRef<any>; | ||
constructor(template: TemplateRef<any>); | ||
} |
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 not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
708169
6621
274