Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cm-select

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cm-select - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

27

bundles/cm-select.umd.js

@@ -251,3 +251,2 @@ (function (global, factory) {

this.idsSelection = new core.EventEmitter();
// oldSelected: any;
this.q = '';

@@ -275,7 +274,2 @@ this.tempSelected = [];

CheckboxComponent.prototype.ngOnInit = function () {
// this.oldSelected = this.selected;
// this.oldSelected.forEach(ele => {
// ele.checked = true;
// });
// this.selected = [];
this.options = new Options(this.options);

@@ -295,3 +289,3 @@ this.items = deepCopyArray(this.items);

this.tempSelected = __spread(this.selected);
this.newSelected = this.selected;
this.newSelected = JSON.parse(JSON.stringify(this.selected));
}

@@ -301,4 +295,6 @@ };

var _this = this;
console.log(this.selected);
console.log(this.selectedIds);
this.items = deepCopyArray(this.items);
if (this.selected && this.selected.length) {
if (this.selected && this.selected.length > 0) {
this.selected.forEach(function (s) {

@@ -324,3 +320,3 @@ var e_1, _a;

}
else if (this.selectedIds && this.selectedIds.length) {
else if (this.selectedIds && this.selectedIds.length > 0) {
this.selectedIds.forEach(function (id) {

@@ -333,2 +329,3 @@ var e_2, _a;

item.checked = true;
_this.selected.push(item);
break;

@@ -347,2 +344,5 @@ }

}
console.log('Coming near set selected items');
console.log(this.items);
console.log(this.selected);
};

@@ -382,11 +382,2 @@ CheckboxComponent.prototype.clearSelections = function () {

else {
// if (this.oldSelected.length > 0) {
// this.selected = [...this.selected, ...this.oldSelected];
// this.selected = this.selected.filter((thing, index) => {
// return index === this.selected.findIndex(obj => {
// return JSON.stringify(obj) === JSON.stringify(thing);
// });
// });
// this.oldSelected = [];
// }
if (this.newSelected) {

@@ -393,0 +384,0 @@ this.changed.emit(this.newSelected);

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("cm-select",["exports","@angular/core","@angular/common","@angular/forms","rxjs","rxjs/operators"],e):e((t=t||self)["cm-select"]={},t.ng.core,t.ng.common,t.ng.forms,t.rxjs,t.rxjs.operators)}(this,function(t,e,n,i,o,p){"use strict";function r(t,e,n,i){var o,p=arguments.length,r=p<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(p<3?o(r):p>3?o(e,n,r):o(e,n))||r);return p>3&&r&&Object.defineProperty(e,n,r),r}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,p=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(i=p.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=p["return"])&&n.call(p)}finally{if(o)throw o.error}}return r}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}var l=function(){function t(){}return t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=r([e.Injectable({providedIn:"root"}),a("design:paramtypes",[])],t)}(),m=function(t){this.filter=!!t&&t.filter,this.image=!!t&&t.image,this.imageUrlKey=t?t.imageUrl:null,this.single=!!t&&t.single,this.top=t?t.top:32,this.loadingText=t?t.loadingText||"Loading ...":"Loading..."},g=function(){function t(){this.bindLabel="name",this.bindValue="id",this.items=[],this.selected=[],this.selectedIds=[],this.loading=!1,this.search=new e.EventEmitter,this.changed=new e.EventEmitter,this.idsChanged=new e.EventEmitter,this.selection=new e.EventEmitter,this.idsSelection=new e.EventEmitter}return t.prototype.ngOnInit=function(){this.options=new m(this.options)},t.prototype.onChange=function(t){this.changed.emit(t)},t.prototype.onIdsChanged=function(t){this.idsChanged.emit(t)},t.prototype.onSearch=function(t){this.search.emit(t)},t.prototype.onSelection=function(t){this.selection.emit(t)},t.prototype.onSelectionChanged=function(t){this.idsSelection.emit(t)},r([e.Input(),a("design:type",m)],t.prototype,"options",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindLabel",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindValue",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"items",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selected",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selectedIds",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"loading",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"search",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"changed",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsChanged",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"selection",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsSelection",void 0),t=r([e.Component({selector:"cm-select",template:'<cm-select-checkbox [items]="items" [bindLabel]="bindLabel" [bindValue]="bindValue" [options]="options"\n [selected]="selected" [selectedIds]="selectedIds" [loading]="loading" (search)="onSearch($event)"\n (changed)="onChange($event)" (idsChanged)="onIdsChanged($event)" (selection)="onSelection($event)" (idsSelection)="onSelectionChanged($event)">\n</cm-select-checkbox>\n'}),a("design:paramtypes",[])],t)}(),h=function(t){if(!t)return t;var e=[];return t.forEach(function(t){Array.isArray(t)?e.push(h(t)):"object"==typeof t?e.push(u(t)):e.push(t)}),e},u=function(t){var e,n;if(!t)return t;var i=Object.keys(t);if(!i.length)return t;var o={};try{for(var p=d(i),r=p.next();!r.done;r=p.next()){var a=r.value;Array.isArray(t[a])?o[a]=h(t[a]):"object"==typeof t[a]?o[a]=u(t[a]):o[a]=t[a]}}catch(c){e={error:c}}finally{try{r&&!r.done&&(n=p["return"])&&n.call(p)}finally{if(e)throw e.error}}return o},f=function(){function t(){this.bindLabel="name",this.bindValue="id",this.items=[],this.loading=!1,this.selected=[],this.selectedIds=[],this.search=new e.EventEmitter,this.changed=new e.EventEmitter,this.idsChanged=new e.EventEmitter,this.selection=new e.EventEmitter,this.idsSelection=new e.EventEmitter,this.q="",this.tempSelected=[],this.newSelected=[]}return t.prototype.clickedOutside=function(t){if(this.options.single)this.checkedItem=null;else{var e=this.tempSelected.map(function(t){return t.id});this.items.forEach(function(t){e.includes(t.id)?t.checked=!0:"checked"in t&&(t.checked=!1)}),this.selected=s(this.tempSelected)}},t.prototype.ngOnInit=function(){this.options=new m(this.options),this.items=h(this.items),this.setSelectedItems(),this.newSelected=[],this.selected&&(this.tempSelected=s(this.selected))},t.prototype.ngOnChanges=function(t){t.items&&this.setSelectedItems(),t.selected&&this.selected&&this.selected.length>1&&(this.tempSelected=s(this.selected),this.newSelected=this.selected)},t.prototype.setSelectedItems=function(){var t=this;this.items=h(this.items),this.selected&&this.selected.length?this.selected.forEach(function(e){var n,i;try{for(var o=d(t.items),p=o.next();!p.done;p=o.next()){var r=p.value;if(r.id===e.id){r.checked=!0;break}}}catch(a){n={error:a}}finally{try{p&&!p.done&&(i=o["return"])&&i.call(o)}finally{if(n)throw n.error}}}):this.selectedIds&&this.selectedIds.length&&this.selectedIds.forEach(function(e){var n,i;try{for(var o=d(t.items),p=o.next();!p.done;p=o.next()){var r=p.value;if(r.id===e){r.checked=!0;break}}}catch(a){n={error:a}}finally{try{p&&!p.done&&(i=o["return"])&&i.call(o)}finally{if(n)throw n.error}}})},t.prototype.clearSelections=function(){this.tempSelected=[],this.items.forEach(function(t){return t.checked=!1}),this.selected=[],this.newSelected=[],this.emitChange()},t.prototype.applySelections=function(){this.options.single&&(this.selected=this.checkedItem),this.emitChange(this.selected)},t.prototype.emitChange=function(t){this.options.single?(t?(this.changed.emit(this.selected),this.idsChanged.emit(t.id)):(this.changed.emit(null),this.idsChanged.emit(null)),this.selected?(this.selection.emit(this.selected),this.idsSelection.emit(this.selected.map(function(t){return+t.id}))):(this.selection.emit(null),this.idsSelection.emit(null))):(this.newSelected?(this.changed.emit(this.newSelected),this.idsChanged.emit(this.newSelected.map(function(t){return+t.id}))):(this.changed.emit([]),this.idsChanged.emit([])),this.selected?(this.selection.emit(this.selected),this.idsSelection.emit(this.selected.map(function(t){return+t.id}))):(this.selection.emit([]),this.idsSelection.emit([]))),this.newSelected=JSON.parse(JSON.stringify(this.selected))},t.prototype.onSearch=function(t){this.search.emit(t)},t.prototype.onItemChange=function(t){var e=this;t.checked?(this.selected&&this.selected.length>0||(this.selected=[]),this.selected.push(t),this.newSelected.push(t)):(this.selected=this.selected.filter(function(e){return e.id!==t.id}),this.newSelected=this.newSelected.filter(function(e){return e.id!==t.id})),this.selected=this.selected.filter(function(t,n){return n===e.selected.findIndex(function(e){return JSON.stringify(e)===JSON.stringify(t)})}),this.newSelected=this.newSelected.filter(function(t,n){return n===e.newSelected.findIndex(function(e){return JSON.stringify(e)===JSON.stringify(t)})})},r([e.Input(),a("design:type",m)],t.prototype,"options",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindLabel",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindValue",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"items",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"loading",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selected",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selectedIds",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"search",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"changed",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsChanged",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"selection",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsSelection",void 0),r([e.HostListener("document:click",["$event"]),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"clickedOutside",null),t=r([e.Component({selector:"cm-select-checkbox",template:'<div class="checkbox-container select-container" [style.top.px]="options.top" (click)="$event.stopPropagation();">\n <div class="select-container__header" *ngIf="options.filter">\n <input libSearchInput class="search-input" type="text" [(ngModel)]="q" placeholder="Search" [text]="q" (inputChanged)="onSearch($event)">\n </div>\n <div class="select-container__body">\n <ng-container *ngIf="!loading">\n <ng-container *ngFor="let item of items | filter: {field: bindLabel, value: q}; let i = index;">\n <div class="checkbox-option">\n <ng-container *ngIf="options.single">\n <input class="app-radio-checkbox mr10" type="radio" [id]="item.id" [(ngModel)]="checkedItem" [value]="item">\n </ng-container>\n <ng-container *ngIf="!options.single">\n <input class="app-checkbox mr10" type="checkbox" [id]="item.id" [(ngModel)]="item.checked" (ngModelChange)="onItemChange(item)">\n </ng-container>\n <img class="checkbox-image" [src]="item[options.imageUrlKey]" [alt]="item[bindLabel] + \' image\'" *ngIf="options.image">\n <label class="checbox-label" [for]="item.id">{{ item[bindLabel] }}</label>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="loading">\n {{ options.loadingText }}\n </ng-container>\n </div>\n <div class="select-container__footer">\n <button class="app-btn transparent" (click)="clearSelections()">Clear</button>\n <button class="app-btn primary" (click)="applySelections()">Apply</button>\n </div>\n</div>\n ',styles:['@charset "UTF-8";.app-btn{border:none;outline:0;cursor:pointer;font-size:14px;font-weight:700;border-radius:24px;padding:5px 16px;text-align:center;transition-duration:.2s}.app-btn.primary{background-color:teal;color:#fff}.app-btn.primary:hover{background-color:#006767}.app-btn.secondary{background-color:#de851d;color:#fff}.app-btn.secondary:hover{background-color:#c7771a}.app-btn.outline{background-color:#fff;border:1px solid #caccd1;color:#1d2129}.app-btn.outline:hover{background-color:#f2f2f2}.app-btn.transparent{background-color:transparent;border:none;color:#1d2129}.app-btn.transparent:hover{background-color:#f2f2f2}.app-btn:active,.app-btn:focus{outline:0}.app-btn:disabled{pointer-events:none;cursor:not-allowed;background-color:rgba(29,33,41,.2);color:#fff}input.app-checkbox[type=checkbox]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px;margin-left:0}input.app-checkbox[type=checkbox]:after{content:"";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px}input.app-checkbox[type=checkbox]:checked:after{background:#1d2129;content:"✓";color:#fff;border:none;font-size:14px}input.app-radio-checkbox[type=radio]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px}input.app-radio-checkbox[type=radio]:after{content:"";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px;left:-1px;top:1px}input.app-radio-checkbox[type=radio]:checked:after{background:#1d2129;content:"✓";color:#fff;border:none;font-size:14px}.select-container{width:325px;background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(29,33,41,.3);z-index:999;position:absolute;color:#1d2129;left:0}.select-container__header{padding:0 24px}.select-container__body{height:200px;overflow-y:auto;padding:0 24px}.select-container__footer{background:#f3f4f7;color:#1d2129;height:50px;display:flex;align-items:center;justify-content:flex-end;bottom:0;padding:0 24px}.p0{padding:0!important}.p10{padding:10px!important}.p15{padding:15px!important}.p20{padding:20px!important}.p30{padding:30px!important}.p40{padding:40px!important}.p50{padding:50px!important}.p60{padding:60px!important}.p70{padding:70px!important}.p80{padding:80px!important}.p90{padding:90px!important}.p100{padding:100px!important}.p110{padding:110px!important}.p120{padding:120px!important}.p130{padding:130px!important}.p140{padding:140px!important}.pt10{padding-top:10px!important}.pt15{padding-top:15px!important}.pt20{padding-top:20px!important}.pt30{padding-top:30px!important}.pt40{padding-top:40px!important}.pt50{padding-top:50px!important}.pt60{padding-top:60px!important}.pt70{padding-top:70px!important}.pt80{padding-top:80px!important}.pt90{padding-top:90px!important}.pt100{padding-top:100px!important}.pt110{padding-top:110px!important}.pt120{padding-top:120px!important}.pt130{padding-top:130px!important}.pt140{padding-top:140px!important}.pb0{padding-bottom:0!important}.pb10{padding-bottom:10px!important}.pb15{padding-bottom:15px!important}.pb20{padding-bottom:20px!important}.pb30{padding-bottom:30px!important}.pb40{padding-bottom:40px!important}.pb50{padding-bottom:50px!important}.pb60{padding-bottom:60px!important}.pb70{padding-bottom:70px!important}.pb80{padding-bottom:80px!important}.pb90{padding-bottom:90px!important}.pb100{padding-bottom:100px!important}.pb110{padding-bottom:110px!important}.pb120{padding-bottom:120px!important}.pb130{padding-bottom:130px!important}.pb140{padding-bottom:140px!important}.pl0{padding-left:0!important}.pl3{padding-left:3px!important}.pl5{padding-left:5px!important}.pl10{padding-left:10px!important}.pl20{padding-left:20px!important}.pl30{padding-left:30px}.pl40{padding-left:40px}.pl50{padding-left:50px}.pl60{padding-left:60px}.pl70{padding-left:70px}.pl80{padding-left:80px}.pl90{padding-left:90px}.pl100{padding-left:100px}.pr0{padding-right:0!important}.pr5{padding-right:5px!important}.pr10{padding-right:10px!important}.pr20{padding-right:20px!important}.pr30{padding-right:30px!important}.pr40{padding-right:40px}.pr50{padding-right:50px}.pr60{padding-right:60px}.pr70{padding-right:70px}.pr80{padding-right:80px}.pr90{padding-right:90px}.pr100{padding-right:100px}.pr110{padding-right:110px}.pr120{padding-right:120px}@media (min-width:1200px){.pl-lg-50{padding-left:50px}.pl-lg-80{padding-left:80px}}@media (min-width:992px){.pt-md-50{padding-top:50px}}.mr-auto{margin:auto;float:none}.mt0{margin-top:0!important}.mt5{margin-top:5px!important}.mt10{margin-top:10px!important}.mt20{margin-top:20px!important}.mt30{margin-top:30px!important}.mt40{margin-top:40px!important}.mt50{margin-top:50px!important}.mt60{margin-top:60px!important}.mt70{margin-top:70px!important}.mt80{margin-top:80px!important}.mt90{margin-top:90px!important}.mt100{margin-top:100px!important}.mt110{margin-top:110px!important}.mt120{margin-top:120px!important}.mb0{margin-bottom:0!important}.mb5{margin-bottom:5px!important}.mb10{margin-bottom:10px!important}.mb15{margin-bottom:15px!important}.mb20{margin-bottom:20px!important}.mb30{margin-bottom:30px!important}.mb40{margin-bottom:40px!important}.mb50{margin-bottom:50px}.mb60{margin-bottom:60px}.mb70{margin-bottom:70px}.mb80{margin-bottom:80px}.mb90{margin-bottom:90px}.mb100{margin-bottom:100px}.mb110{margin-bottom:110px}.mb120{margin-bottom:120px}.ml0{margin-left:0!important}.ml15{margin-left:5px}.ml10{margin-left:10px}.ml20{margin-left:20px}.ml30{margin-left:30px}.ml40{margin-left:40px}.ml50{margin-left:50px}.ml60{margin-left:60px}.ml70{margin-left:70px}.ml80{margin-left:80px}.ml90{margin-left:90px}.ml100{margin-left:100px}.ml110{margin-left:110px}.mr0{margin-right:0!important}.mr5{margin-left:5px!important}.mr10{margin-right:10px!important}.mr15{margin-right:15px!important}.mr20{margin-right:20px!important}.mr30{margin-right:30px!important}.mr40{margin-right:40px!important}.mr50{margin-right:50px!important}.mr60{margin-right:60px!important}.mr70{margin-right:70px!important}.mr80{margin-right:80px!important}.mr90{margin-right:90px!important}.mr100{margin-right:100px}.mr110{margin-right:110px}.checkbox-container .select-container__header{display:flex;background-color:#f3f4f7;padding:10px 24px}.checkbox-container .select-container__header .search-input{border:none;width:100%;background-color:transparent}.checkbox-container .select-container__header .search-input:focus{outline:0}.checkbox-container .select-container__body .checkbox-option{text-align:left;font-size:14px;display:flex;align-items:center;margin:8px 0}']}),a("design:paramtypes",[])],t)}(),x=function(){function t(){}return t.prototype.transform=function(t,e){if(!t||!e||!e.value)return t;if(e.field)try{return t.filter(function(t){return t[e.field].toLowerCase().includes(e.value.toLowerCase())})}catch(n){return null}else try{return t.filter(function(t){return t.toLowerCase().includes(e.value.toLowerCase())})}catch(n){return null}},t=r([e.Pipe({name:"filter"})],t)}(),b=function(){function t(){}return t=r([e.NgModule({declarations:[x],exports:[x]})],t)}(),y=function(){function t(t,n){this.searchInputUpdated=new o.Subject,this.inputChanged=new e.EventEmitter,this.subscribeToSearchInput()}return Object.defineProperty(t.prototype,"text",{get:function(){return this.q},set:function(t){this.q=t,this.searchInputUpdated.next(this.q)},enumerable:!0,configurable:!0}),t.prototype.subscribeToSearchInput=function(){var t=this;this.searchChangeEmitter=this.searchInputUpdated.asObservable().pipe(p.debounceTime(300),p.distinctUntilChanged()),this.searchChangeEmitter.subscribe(function(e){t.inputChanged.emit(e)})},r([e.Input(),a("design:type",String),a("design:paramtypes",[String])],t.prototype,"text",null),r([e.Output(),a("design:type",Object)],t.prototype,"inputChanged",void 0),t=r([e.Directive({selector:"[libSearchInput]"}),a("design:paramtypes",[e.ElementRef,e.Renderer2])],t)}(),v=function(){function t(){}return t=r([e.NgModule({declarations:[f,y],imports:[n.CommonModule,i.FormsModule,b],exports:[f]})],t)}(),S=function(){function t(){}return t=r([e.NgModule({declarations:[g],imports:[v],providers:[l],exports:[g]})],t)}();t.CmSelectComponent=g,t.CmSelectModule=S,t.CmSelectService=l,t.ɵa=v,t.ɵb=f,t.ɵc=y,t.ɵd=x,t.ɵe=b,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("cm-select",["exports","@angular/core","@angular/common","@angular/forms","rxjs","rxjs/operators"],e):e((t=t||self)["cm-select"]={},t.ng.core,t.ng.common,t.ng.forms,t.rxjs,t.rxjs.operators)}(this,function(t,e,n,i,o,p){"use strict";function r(t,e,n,i){var o,p=arguments.length,r=p<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(p<3?o(r):p>3?o(e,n,r):o(e,n))||r);return p>3&&r&&Object.defineProperty(e,n,r),r}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,p=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(i=p.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=p["return"])&&n.call(p)}finally{if(o)throw o.error}}return r}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}var l=function(){function t(){}return t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=r([e.Injectable({providedIn:"root"}),a("design:paramtypes",[])],t)}(),m=function(t){this.filter=!!t&&t.filter,this.image=!!t&&t.image,this.imageUrlKey=t?t.imageUrl:null,this.single=!!t&&t.single,this.top=t?t.top:32,this.loadingText=t?t.loadingText||"Loading ...":"Loading..."},g=function(){function t(){this.bindLabel="name",this.bindValue="id",this.items=[],this.selected=[],this.selectedIds=[],this.loading=!1,this.search=new e.EventEmitter,this.changed=new e.EventEmitter,this.idsChanged=new e.EventEmitter,this.selection=new e.EventEmitter,this.idsSelection=new e.EventEmitter}return t.prototype.ngOnInit=function(){this.options=new m(this.options)},t.prototype.onChange=function(t){this.changed.emit(t)},t.prototype.onIdsChanged=function(t){this.idsChanged.emit(t)},t.prototype.onSearch=function(t){this.search.emit(t)},t.prototype.onSelection=function(t){this.selection.emit(t)},t.prototype.onSelectionChanged=function(t){this.idsSelection.emit(t)},r([e.Input(),a("design:type",m)],t.prototype,"options",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindLabel",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindValue",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"items",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selected",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selectedIds",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"loading",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"search",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"changed",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsChanged",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"selection",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsSelection",void 0),t=r([e.Component({selector:"cm-select",template:'<cm-select-checkbox [items]="items" [bindLabel]="bindLabel" [bindValue]="bindValue" [options]="options"\n [selected]="selected" [selectedIds]="selectedIds" [loading]="loading" (search)="onSearch($event)"\n (changed)="onChange($event)" (idsChanged)="onIdsChanged($event)" (selection)="onSelection($event)" (idsSelection)="onSelectionChanged($event)">\n</cm-select-checkbox>\n'}),a("design:paramtypes",[])],t)}(),h=function(t){if(!t)return t;var e=[];return t.forEach(function(t){Array.isArray(t)?e.push(h(t)):"object"==typeof t?e.push(u(t)):e.push(t)}),e},u=function(t){var e,n;if(!t)return t;var i=Object.keys(t);if(!i.length)return t;var o={};try{for(var p=d(i),r=p.next();!r.done;r=p.next()){var a=r.value;Array.isArray(t[a])?o[a]=h(t[a]):"object"==typeof t[a]?o[a]=u(t[a]):o[a]=t[a]}}catch(c){e={error:c}}finally{try{r&&!r.done&&(n=p["return"])&&n.call(p)}finally{if(e)throw e.error}}return o},f=function(){function t(){this.bindLabel="name",this.bindValue="id",this.items=[],this.loading=!1,this.selected=[],this.selectedIds=[],this.search=new e.EventEmitter,this.changed=new e.EventEmitter,this.idsChanged=new e.EventEmitter,this.selection=new e.EventEmitter,this.idsSelection=new e.EventEmitter,this.q="",this.tempSelected=[],this.newSelected=[]}return t.prototype.clickedOutside=function(t){if(this.options.single)this.checkedItem=null;else{var e=this.tempSelected.map(function(t){return t.id});this.items.forEach(function(t){e.includes(t.id)?t.checked=!0:"checked"in t&&(t.checked=!1)}),this.selected=s(this.tempSelected)}},t.prototype.ngOnInit=function(){this.options=new m(this.options),this.items=h(this.items),this.setSelectedItems(),this.newSelected=[],this.selected&&(this.tempSelected=s(this.selected))},t.prototype.ngOnChanges=function(t){t.items&&this.setSelectedItems(),t.selected&&this.selected&&this.selected.length>1&&(this.tempSelected=s(this.selected),this.newSelected=JSON.parse(JSON.stringify(this.selected)))},t.prototype.setSelectedItems=function(){var t=this;console.log(this.selected),console.log(this.selectedIds),this.items=h(this.items),this.selected&&this.selected.length>0?this.selected.forEach(function(e){var n,i;try{for(var o=d(t.items),p=o.next();!p.done;p=o.next()){var r=p.value;if(r.id===e.id){r.checked=!0;break}}}catch(a){n={error:a}}finally{try{p&&!p.done&&(i=o["return"])&&i.call(o)}finally{if(n)throw n.error}}}):this.selectedIds&&this.selectedIds.length>0&&this.selectedIds.forEach(function(e){var n,i;try{for(var o=d(t.items),p=o.next();!p.done;p=o.next()){var r=p.value;if(r.id===e){r.checked=!0,t.selected.push(r);break}}}catch(a){n={error:a}}finally{try{p&&!p.done&&(i=o["return"])&&i.call(o)}finally{if(n)throw n.error}}}),console.log("Coming near set selected items"),console.log(this.items),console.log(this.selected)},t.prototype.clearSelections=function(){this.tempSelected=[],this.items.forEach(function(t){return t.checked=!1}),this.selected=[],this.newSelected=[],this.emitChange()},t.prototype.applySelections=function(){this.options.single&&(this.selected=this.checkedItem),this.emitChange(this.selected)},t.prototype.emitChange=function(t){this.options.single?(t?(this.changed.emit(this.selected),this.idsChanged.emit(t.id)):(this.changed.emit(null),this.idsChanged.emit(null)),this.selected?(this.selection.emit(this.selected),this.idsSelection.emit(this.selected.map(function(t){return+t.id}))):(this.selection.emit(null),this.idsSelection.emit(null))):(this.newSelected?(this.changed.emit(this.newSelected),this.idsChanged.emit(this.newSelected.map(function(t){return+t.id}))):(this.changed.emit([]),this.idsChanged.emit([])),this.selected?(this.selection.emit(this.selected),this.idsSelection.emit(this.selected.map(function(t){return+t.id}))):(this.selection.emit([]),this.idsSelection.emit([]))),this.newSelected=JSON.parse(JSON.stringify(this.selected))},t.prototype.onSearch=function(t){this.search.emit(t)},t.prototype.onItemChange=function(t){var e=this;t.checked?(this.selected&&this.selected.length>0||(this.selected=[]),this.selected.push(t),this.newSelected.push(t)):(this.selected=this.selected.filter(function(e){return e.id!==t.id}),this.newSelected=this.newSelected.filter(function(e){return e.id!==t.id})),this.selected=this.selected.filter(function(t,n){return n===e.selected.findIndex(function(e){return JSON.stringify(e)===JSON.stringify(t)})}),this.newSelected=this.newSelected.filter(function(t,n){return n===e.newSelected.findIndex(function(e){return JSON.stringify(e)===JSON.stringify(t)})})},r([e.Input(),a("design:type",m)],t.prototype,"options",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindLabel",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"bindValue",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"items",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"loading",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selected",void 0),r([e.Input(),a("design:type",Array)],t.prototype,"selectedIds",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"search",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"changed",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsChanged",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"selection",void 0),r([e.Output(),a("design:type",e.EventEmitter)],t.prototype,"idsSelection",void 0),r([e.HostListener("document:click",["$event"]),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"clickedOutside",null),t=r([e.Component({selector:"cm-select-checkbox",template:'<div class="checkbox-container select-container" [style.top.px]="options.top" (click)="$event.stopPropagation();">\n <div class="select-container__header" *ngIf="options.filter">\n <input libSearchInput class="search-input" type="text" [(ngModel)]="q" placeholder="Search" [text]="q" (inputChanged)="onSearch($event)">\n </div>\n <div class="select-container__body">\n <ng-container *ngIf="!loading">\n <ng-container *ngFor="let item of items | filter: {field: bindLabel, value: q}; let i = index;">\n <div class="checkbox-option">\n <ng-container *ngIf="options.single">\n <input class="app-radio-checkbox mr10" type="radio" [id]="item.id" [(ngModel)]="checkedItem" [value]="item">\n </ng-container>\n <ng-container *ngIf="!options.single">\n <input class="app-checkbox mr10" type="checkbox" [id]="item.id" [(ngModel)]="item.checked" (ngModelChange)="onItemChange(item)">\n </ng-container>\n <img class="checkbox-image" [src]="item[options.imageUrlKey]" [alt]="item[bindLabel] + \' image\'" *ngIf="options.image">\n <label class="checbox-label" [for]="item.id">{{ item[bindLabel] }}</label>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="loading">\n {{ options.loadingText }}\n </ng-container>\n </div>\n <div class="select-container__footer">\n <button class="app-btn transparent" (click)="clearSelections()">Clear</button>\n <button class="app-btn primary" (click)="applySelections()">Apply</button>\n </div>\n</div>\n ',styles:['@charset "UTF-8";.app-btn{border:none;outline:0;cursor:pointer;font-size:14px;font-weight:700;border-radius:24px;padding:5px 16px;text-align:center;transition-duration:.2s}.app-btn.primary{background-color:teal;color:#fff}.app-btn.primary:hover{background-color:#006767}.app-btn.secondary{background-color:#de851d;color:#fff}.app-btn.secondary:hover{background-color:#c7771a}.app-btn.outline{background-color:#fff;border:1px solid #caccd1;color:#1d2129}.app-btn.outline:hover{background-color:#f2f2f2}.app-btn.transparent{background-color:transparent;border:none;color:#1d2129}.app-btn.transparent:hover{background-color:#f2f2f2}.app-btn:active,.app-btn:focus{outline:0}.app-btn:disabled{pointer-events:none;cursor:not-allowed;background-color:rgba(29,33,41,.2);color:#fff}input.app-checkbox[type=checkbox]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px;margin-left:0}input.app-checkbox[type=checkbox]:after{content:"";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px}input.app-checkbox[type=checkbox]:checked:after{background:#1d2129;content:"✓";color:#fff;border:none;font-size:14px}input.app-radio-checkbox[type=radio]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px}input.app-radio-checkbox[type=radio]:after{content:"";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px;left:-1px;top:1px}input.app-radio-checkbox[type=radio]:checked:after{background:#1d2129;content:"✓";color:#fff;border:none;font-size:14px}.select-container{width:325px;background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(29,33,41,.3);z-index:999;position:absolute;color:#1d2129;left:0}.select-container__header{padding:0 24px}.select-container__body{height:200px;overflow-y:auto;padding:0 24px}.select-container__footer{background:#f3f4f7;color:#1d2129;height:50px;display:flex;align-items:center;justify-content:flex-end;bottom:0;padding:0 24px}.p0{padding:0!important}.p10{padding:10px!important}.p15{padding:15px!important}.p20{padding:20px!important}.p30{padding:30px!important}.p40{padding:40px!important}.p50{padding:50px!important}.p60{padding:60px!important}.p70{padding:70px!important}.p80{padding:80px!important}.p90{padding:90px!important}.p100{padding:100px!important}.p110{padding:110px!important}.p120{padding:120px!important}.p130{padding:130px!important}.p140{padding:140px!important}.pt10{padding-top:10px!important}.pt15{padding-top:15px!important}.pt20{padding-top:20px!important}.pt30{padding-top:30px!important}.pt40{padding-top:40px!important}.pt50{padding-top:50px!important}.pt60{padding-top:60px!important}.pt70{padding-top:70px!important}.pt80{padding-top:80px!important}.pt90{padding-top:90px!important}.pt100{padding-top:100px!important}.pt110{padding-top:110px!important}.pt120{padding-top:120px!important}.pt130{padding-top:130px!important}.pt140{padding-top:140px!important}.pb0{padding-bottom:0!important}.pb10{padding-bottom:10px!important}.pb15{padding-bottom:15px!important}.pb20{padding-bottom:20px!important}.pb30{padding-bottom:30px!important}.pb40{padding-bottom:40px!important}.pb50{padding-bottom:50px!important}.pb60{padding-bottom:60px!important}.pb70{padding-bottom:70px!important}.pb80{padding-bottom:80px!important}.pb90{padding-bottom:90px!important}.pb100{padding-bottom:100px!important}.pb110{padding-bottom:110px!important}.pb120{padding-bottom:120px!important}.pb130{padding-bottom:130px!important}.pb140{padding-bottom:140px!important}.pl0{padding-left:0!important}.pl3{padding-left:3px!important}.pl5{padding-left:5px!important}.pl10{padding-left:10px!important}.pl20{padding-left:20px!important}.pl30{padding-left:30px}.pl40{padding-left:40px}.pl50{padding-left:50px}.pl60{padding-left:60px}.pl70{padding-left:70px}.pl80{padding-left:80px}.pl90{padding-left:90px}.pl100{padding-left:100px}.pr0{padding-right:0!important}.pr5{padding-right:5px!important}.pr10{padding-right:10px!important}.pr20{padding-right:20px!important}.pr30{padding-right:30px!important}.pr40{padding-right:40px}.pr50{padding-right:50px}.pr60{padding-right:60px}.pr70{padding-right:70px}.pr80{padding-right:80px}.pr90{padding-right:90px}.pr100{padding-right:100px}.pr110{padding-right:110px}.pr120{padding-right:120px}@media (min-width:1200px){.pl-lg-50{padding-left:50px}.pl-lg-80{padding-left:80px}}@media (min-width:992px){.pt-md-50{padding-top:50px}}.mr-auto{margin:auto;float:none}.mt0{margin-top:0!important}.mt5{margin-top:5px!important}.mt10{margin-top:10px!important}.mt20{margin-top:20px!important}.mt30{margin-top:30px!important}.mt40{margin-top:40px!important}.mt50{margin-top:50px!important}.mt60{margin-top:60px!important}.mt70{margin-top:70px!important}.mt80{margin-top:80px!important}.mt90{margin-top:90px!important}.mt100{margin-top:100px!important}.mt110{margin-top:110px!important}.mt120{margin-top:120px!important}.mb0{margin-bottom:0!important}.mb5{margin-bottom:5px!important}.mb10{margin-bottom:10px!important}.mb15{margin-bottom:15px!important}.mb20{margin-bottom:20px!important}.mb30{margin-bottom:30px!important}.mb40{margin-bottom:40px!important}.mb50{margin-bottom:50px}.mb60{margin-bottom:60px}.mb70{margin-bottom:70px}.mb80{margin-bottom:80px}.mb90{margin-bottom:90px}.mb100{margin-bottom:100px}.mb110{margin-bottom:110px}.mb120{margin-bottom:120px}.ml0{margin-left:0!important}.ml15{margin-left:5px}.ml10{margin-left:10px}.ml20{margin-left:20px}.ml30{margin-left:30px}.ml40{margin-left:40px}.ml50{margin-left:50px}.ml60{margin-left:60px}.ml70{margin-left:70px}.ml80{margin-left:80px}.ml90{margin-left:90px}.ml100{margin-left:100px}.ml110{margin-left:110px}.mr0{margin-right:0!important}.mr5{margin-left:5px!important}.mr10{margin-right:10px!important}.mr15{margin-right:15px!important}.mr20{margin-right:20px!important}.mr30{margin-right:30px!important}.mr40{margin-right:40px!important}.mr50{margin-right:50px!important}.mr60{margin-right:60px!important}.mr70{margin-right:70px!important}.mr80{margin-right:80px!important}.mr90{margin-right:90px!important}.mr100{margin-right:100px}.mr110{margin-right:110px}.checkbox-container .select-container__header{display:flex;background-color:#f3f4f7;padding:10px 24px}.checkbox-container .select-container__header .search-input{border:none;width:100%;background-color:transparent}.checkbox-container .select-container__header .search-input:focus{outline:0}.checkbox-container .select-container__body .checkbox-option{text-align:left;font-size:14px;display:flex;align-items:center;margin:8px 0}']}),a("design:paramtypes",[])],t)}(),x=function(){function t(){}return t.prototype.transform=function(t,e){if(!t||!e||!e.value)return t;if(e.field)try{return t.filter(function(t){return t[e.field].toLowerCase().includes(e.value.toLowerCase())})}catch(n){return null}else try{return t.filter(function(t){return t.toLowerCase().includes(e.value.toLowerCase())})}catch(n){return null}},t=r([e.Pipe({name:"filter"})],t)}(),b=function(){function t(){}return t=r([e.NgModule({declarations:[x],exports:[x]})],t)}(),y=function(){function t(t,n){this.searchInputUpdated=new o.Subject,this.inputChanged=new e.EventEmitter,this.subscribeToSearchInput()}return Object.defineProperty(t.prototype,"text",{get:function(){return this.q},set:function(t){this.q=t,this.searchInputUpdated.next(this.q)},enumerable:!0,configurable:!0}),t.prototype.subscribeToSearchInput=function(){var t=this;this.searchChangeEmitter=this.searchInputUpdated.asObservable().pipe(p.debounceTime(300),p.distinctUntilChanged()),this.searchChangeEmitter.subscribe(function(e){t.inputChanged.emit(e)})},r([e.Input(),a("design:type",String),a("design:paramtypes",[String])],t.prototype,"text",null),r([e.Output(),a("design:type",Object)],t.prototype,"inputChanged",void 0),t=r([e.Directive({selector:"[libSearchInput]"}),a("design:paramtypes",[e.ElementRef,e.Renderer2])],t)}(),v=function(){function t(){}return t=r([e.NgModule({declarations:[f,y],imports:[n.CommonModule,i.FormsModule,b],exports:[f]})],t)}(),S=function(){function t(){}return t=r([e.NgModule({declarations:[g],imports:[v],providers:[l],exports:[g]})],t)}();t.CmSelectComponent=g,t.CmSelectModule=S,t.CmSelectService=l,t.ɵa=v,t.ɵb=f,t.ɵc=y,t.ɵd=x,t.ɵe=b,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=cm-select.umd.min.js.map

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

{"__symbolic":"module","version":4,"metadata":{"CmSelectService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"CmSelectComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"cm-select","styles":[],"template":"<cm-select-checkbox [items]=\"items\" [bindLabel]=\"bindLabel\" [bindValue]=\"bindValue\" [options]=\"options\"\n [selected]=\"selected\" [selectedIds]=\"selectedIds\" [loading]=\"loading\" (search)=\"onSearch($event)\"\n (changed)=\"onChange($event)\" (idsChanged)=\"onIdsChanged($event)\" (selection)=\"onSelection($event)\" (idsSelection)=\"onSelectionChanged($event)\">\n</cm-select-checkbox>\n"}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"bindLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"bindValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"selectedIds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"loading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"search":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":18,"character":3}}]}],"changed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"idsChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":20,"character":3}}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":3}}]}],"idsSelection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"onChange":[{"__symbolic":"method"}],"onIdsChanged":[{"__symbolic":"method"}],"onSearch":[{"__symbolic":"method"}],"onSelection":[{"__symbolic":"method"}],"onSelectionChanged":[{"__symbolic":"method"}]}},"CmSelectModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CmSelectComponent"}],"imports":[{"__symbolic":"reference","name":"ɵa"}],"providers":[{"__symbolic":"reference","name":"CmSelectService"}],"exports":[{"__symbolic":"reference","name":"CmSelectComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵc"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":15,"character":4},{"__symbolic":"reference","name":"ɵe"}],"exports":[{"__symbolic":"reference","name":"ɵb"}]}]}],"members":{}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"cm-select-checkbox","template":"<div class=\"checkbox-container select-container\" [style.top.px]=\"options.top\" (click)=\"$event.stopPropagation();\">\n <div class=\"select-container__header\" *ngIf=\"options.filter\">\n <input libSearchInput class=\"search-input\" type=\"text\" [(ngModel)]=\"q\" placeholder=\"Search\" [text]=\"q\" (inputChanged)=\"onSearch($event)\">\n </div>\n <div class=\"select-container__body\">\n <ng-container *ngIf=\"!loading\">\n <ng-container *ngFor=\"let item of items | filter: {field: bindLabel, value: q}; let i = index;\">\n <div class=\"checkbox-option\">\n <ng-container *ngIf=\"options.single\">\n <input class=\"app-radio-checkbox mr10\" type=\"radio\" [id]=\"item.id\" [(ngModel)]=\"checkedItem\" [value]=\"item\">\n </ng-container>\n <ng-container *ngIf=\"!options.single\">\n <input class=\"app-checkbox mr10\" type=\"checkbox\" [id]=\"item.id\" [(ngModel)]=\"item.checked\" (ngModelChange)=\"onItemChange(item)\">\n </ng-container>\n <img class=\"checkbox-image\" [src]=\"item[options.imageUrlKey]\" [alt]=\"item[bindLabel] + ' image'\" *ngIf=\"options.image\">\n <label class=\"checbox-label\" [for]=\"item.id\">{{ item[bindLabel] }}</label>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"loading\">\n {{ options.loadingText }}\n </ng-container>\n </div>\n <div class=\"select-container__footer\">\n <button class=\"app-btn transparent\" (click)=\"clearSelections()\">Clear</button>\n <button class=\"app-btn primary\" (click)=\"applySelections()\">Apply</button>\n </div>\n</div>\n ","styles":["@charset \"UTF-8\";.app-btn{border:none;outline:0;cursor:pointer;font-size:14px;font-weight:700;border-radius:24px;padding:5px 16px;text-align:center;transition-duration:.2s}.app-btn.primary{background-color:teal;color:#fff}.app-btn.primary:hover{background-color:#006767}.app-btn.secondary{background-color:#de851d;color:#fff}.app-btn.secondary:hover{background-color:#c7771a}.app-btn.outline{background-color:#fff;border:1px solid #caccd1;color:#1d2129}.app-btn.outline:hover{background-color:#f2f2f2}.app-btn.transparent{background-color:transparent;border:none;color:#1d2129}.app-btn.transparent:hover{background-color:#f2f2f2}.app-btn:active,.app-btn:focus{outline:0}.app-btn:disabled{pointer-events:none;cursor:not-allowed;background-color:rgba(29,33,41,.2);color:#fff}input.app-checkbox[type=checkbox]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px;margin-left:0}input.app-checkbox[type=checkbox]:after{content:\"\";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px}input.app-checkbox[type=checkbox]:checked:after{background:#1d2129;content:\"✓\";color:#fff;border:none;font-size:14px}input.app-radio-checkbox[type=radio]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px}input.app-radio-checkbox[type=radio]:after{content:\"\";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px;left:-1px;top:1px}input.app-radio-checkbox[type=radio]:checked:after{background:#1d2129;content:\"✓\";color:#fff;border:none;font-size:14px}.select-container{width:325px;background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(29,33,41,.3);z-index:999;position:absolute;color:#1d2129;left:0}.select-container__header{padding:0 24px}.select-container__body{height:200px;overflow-y:auto;padding:0 24px}.select-container__footer{background:#f3f4f7;color:#1d2129;height:50px;display:flex;align-items:center;justify-content:flex-end;bottom:0;padding:0 24px}.p0{padding:0!important}.p10{padding:10px!important}.p15{padding:15px!important}.p20{padding:20px!important}.p30{padding:30px!important}.p40{padding:40px!important}.p50{padding:50px!important}.p60{padding:60px!important}.p70{padding:70px!important}.p80{padding:80px!important}.p90{padding:90px!important}.p100{padding:100px!important}.p110{padding:110px!important}.p120{padding:120px!important}.p130{padding:130px!important}.p140{padding:140px!important}.pt10{padding-top:10px!important}.pt15{padding-top:15px!important}.pt20{padding-top:20px!important}.pt30{padding-top:30px!important}.pt40{padding-top:40px!important}.pt50{padding-top:50px!important}.pt60{padding-top:60px!important}.pt70{padding-top:70px!important}.pt80{padding-top:80px!important}.pt90{padding-top:90px!important}.pt100{padding-top:100px!important}.pt110{padding-top:110px!important}.pt120{padding-top:120px!important}.pt130{padding-top:130px!important}.pt140{padding-top:140px!important}.pb0{padding-bottom:0!important}.pb10{padding-bottom:10px!important}.pb15{padding-bottom:15px!important}.pb20{padding-bottom:20px!important}.pb30{padding-bottom:30px!important}.pb40{padding-bottom:40px!important}.pb50{padding-bottom:50px!important}.pb60{padding-bottom:60px!important}.pb70{padding-bottom:70px!important}.pb80{padding-bottom:80px!important}.pb90{padding-bottom:90px!important}.pb100{padding-bottom:100px!important}.pb110{padding-bottom:110px!important}.pb120{padding-bottom:120px!important}.pb130{padding-bottom:130px!important}.pb140{padding-bottom:140px!important}.pl0{padding-left:0!important}.pl3{padding-left:3px!important}.pl5{padding-left:5px!important}.pl10{padding-left:10px!important}.pl20{padding-left:20px!important}.pl30{padding-left:30px}.pl40{padding-left:40px}.pl50{padding-left:50px}.pl60{padding-left:60px}.pl70{padding-left:70px}.pl80{padding-left:80px}.pl90{padding-left:90px}.pl100{padding-left:100px}.pr0{padding-right:0!important}.pr5{padding-right:5px!important}.pr10{padding-right:10px!important}.pr20{padding-right:20px!important}.pr30{padding-right:30px!important}.pr40{padding-right:40px}.pr50{padding-right:50px}.pr60{padding-right:60px}.pr70{padding-right:70px}.pr80{padding-right:80px}.pr90{padding-right:90px}.pr100{padding-right:100px}.pr110{padding-right:110px}.pr120{padding-right:120px}@media (min-width:1200px){.pl-lg-50{padding-left:50px}.pl-lg-80{padding-left:80px}}@media (min-width:992px){.pt-md-50{padding-top:50px}}.mr-auto{margin:auto;float:none}.mt0{margin-top:0!important}.mt5{margin-top:5px!important}.mt10{margin-top:10px!important}.mt20{margin-top:20px!important}.mt30{margin-top:30px!important}.mt40{margin-top:40px!important}.mt50{margin-top:50px!important}.mt60{margin-top:60px!important}.mt70{margin-top:70px!important}.mt80{margin-top:80px!important}.mt90{margin-top:90px!important}.mt100{margin-top:100px!important}.mt110{margin-top:110px!important}.mt120{margin-top:120px!important}.mb0{margin-bottom:0!important}.mb5{margin-bottom:5px!important}.mb10{margin-bottom:10px!important}.mb15{margin-bottom:15px!important}.mb20{margin-bottom:20px!important}.mb30{margin-bottom:30px!important}.mb40{margin-bottom:40px!important}.mb50{margin-bottom:50px}.mb60{margin-bottom:60px}.mb70{margin-bottom:70px}.mb80{margin-bottom:80px}.mb90{margin-bottom:90px}.mb100{margin-bottom:100px}.mb110{margin-bottom:110px}.mb120{margin-bottom:120px}.ml0{margin-left:0!important}.ml15{margin-left:5px}.ml10{margin-left:10px}.ml20{margin-left:20px}.ml30{margin-left:30px}.ml40{margin-left:40px}.ml50{margin-left:50px}.ml60{margin-left:60px}.ml70{margin-left:70px}.ml80{margin-left:80px}.ml90{margin-left:90px}.ml100{margin-left:100px}.ml110{margin-left:110px}.mr0{margin-right:0!important}.mr5{margin-left:5px!important}.mr10{margin-right:10px!important}.mr15{margin-right:15px!important}.mr20{margin-right:20px!important}.mr30{margin-right:30px!important}.mr40{margin-right:40px!important}.mr50{margin-right:50px!important}.mr60{margin-right:60px!important}.mr70{margin-right:70px!important}.mr80{margin-right:80px!important}.mr90{margin-right:90px!important}.mr100{margin-right:100px}.mr110{margin-right:110px}.checkbox-container .select-container__header{display:flex;background-color:#f3f4f7;padding:10px 24px}.checkbox-container .select-container__header .search-input{border:none;width:100%;background-color:transparent}.checkbox-container .select-container__header .search-input:focus{outline:0}.checkbox-container .select-container__body .checkbox-option{text-align:left;font-size:14px;display:flex;align-items:center;margin:8px 0}"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"bindLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"bindValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"loading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"selectedIds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"search":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"changed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":20,"character":3}}]}],"idsChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":3}}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":3}}]}],"idsSelection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":3}}]}],"clickedOutside":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":31,"character":3},"arguments":["document:click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"setSelectedItems":[{"__symbolic":"method"}],"clearSelections":[{"__symbolic":"method"}],"applySelections":[{"__symbolic":"method"}],"emitChange":[{"__symbolic":"method"}],"onSearch":[{"__symbolic":"method"}],"onItemChange":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[libSearchInput]"}]}],"members":{"text":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"inputChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":23,"character":20},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":23,"character":42}]}],"subscribeToSearchInput":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":2,"character":1},"arguments":[{"name":"filter"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":30,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵd"}],"exports":[{"__symbolic":"reference","name":"ɵd"}]}]}],"members":{}}},"origins":{"CmSelectService":"./lib/cm-select.service","CmSelectComponent":"./lib/cm-select.component","CmSelectModule":"./lib/cm-select.module","ɵa":"./lib/checkbox/checkbox.module","ɵb":"./lib/checkbox/checkbox.component","ɵc":"./lib/utils/search-input.directive","ɵd":"./lib/utils/filter.pipe","ɵe":"./lib/utils/filter.pipe"},"importAs":"cm-select"}
{"__symbolic":"module","version":4,"metadata":{"CmSelectService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"CmSelectComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"cm-select","styles":[],"template":"<cm-select-checkbox [items]=\"items\" [bindLabel]=\"bindLabel\" [bindValue]=\"bindValue\" [options]=\"options\"\n [selected]=\"selected\" [selectedIds]=\"selectedIds\" [loading]=\"loading\" (search)=\"onSearch($event)\"\n (changed)=\"onChange($event)\" (idsChanged)=\"onIdsChanged($event)\" (selection)=\"onSelection($event)\" (idsSelection)=\"onSelectionChanged($event)\">\n</cm-select-checkbox>\n"}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"bindLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"bindValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"selectedIds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"loading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"search":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":18,"character":3}}]}],"changed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"idsChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":20,"character":3}}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":3}}]}],"idsSelection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"onChange":[{"__symbolic":"method"}],"onIdsChanged":[{"__symbolic":"method"}],"onSearch":[{"__symbolic":"method"}],"onSelection":[{"__symbolic":"method"}],"onSelectionChanged":[{"__symbolic":"method"}]}},"CmSelectModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CmSelectComponent"}],"imports":[{"__symbolic":"reference","name":"ɵa"}],"providers":[{"__symbolic":"reference","name":"CmSelectService"}],"exports":[{"__symbolic":"reference","name":"CmSelectComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵc"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":15,"character":4},{"__symbolic":"reference","name":"ɵe"}],"exports":[{"__symbolic":"reference","name":"ɵb"}]}]}],"members":{}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"cm-select-checkbox","template":"<div class=\"checkbox-container select-container\" [style.top.px]=\"options.top\" (click)=\"$event.stopPropagation();\">\n <div class=\"select-container__header\" *ngIf=\"options.filter\">\n <input libSearchInput class=\"search-input\" type=\"text\" [(ngModel)]=\"q\" placeholder=\"Search\" [text]=\"q\" (inputChanged)=\"onSearch($event)\">\n </div>\n <div class=\"select-container__body\">\n <ng-container *ngIf=\"!loading\">\n <ng-container *ngFor=\"let item of items | filter: {field: bindLabel, value: q}; let i = index;\">\n <div class=\"checkbox-option\">\n <ng-container *ngIf=\"options.single\">\n <input class=\"app-radio-checkbox mr10\" type=\"radio\" [id]=\"item.id\" [(ngModel)]=\"checkedItem\" [value]=\"item\">\n </ng-container>\n <ng-container *ngIf=\"!options.single\">\n <input class=\"app-checkbox mr10\" type=\"checkbox\" [id]=\"item.id\" [(ngModel)]=\"item.checked\" (ngModelChange)=\"onItemChange(item)\">\n </ng-container>\n <img class=\"checkbox-image\" [src]=\"item[options.imageUrlKey]\" [alt]=\"item[bindLabel] + ' image'\" *ngIf=\"options.image\">\n <label class=\"checbox-label\" [for]=\"item.id\">{{ item[bindLabel] }}</label>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"loading\">\n {{ options.loadingText }}\n </ng-container>\n </div>\n <div class=\"select-container__footer\">\n <button class=\"app-btn transparent\" (click)=\"clearSelections()\">Clear</button>\n <button class=\"app-btn primary\" (click)=\"applySelections()\">Apply</button>\n </div>\n</div>\n ","styles":["@charset \"UTF-8\";.app-btn{border:none;outline:0;cursor:pointer;font-size:14px;font-weight:700;border-radius:24px;padding:5px 16px;text-align:center;transition-duration:.2s}.app-btn.primary{background-color:teal;color:#fff}.app-btn.primary:hover{background-color:#006767}.app-btn.secondary{background-color:#de851d;color:#fff}.app-btn.secondary:hover{background-color:#c7771a}.app-btn.outline{background-color:#fff;border:1px solid #caccd1;color:#1d2129}.app-btn.outline:hover{background-color:#f2f2f2}.app-btn.transparent{background-color:transparent;border:none;color:#1d2129}.app-btn.transparent:hover{background-color:#f2f2f2}.app-btn:active,.app-btn:focus{outline:0}.app-btn:disabled{pointer-events:none;cursor:not-allowed;background-color:rgba(29,33,41,.2);color:#fff}input.app-checkbox[type=checkbox]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px;margin-left:0}input.app-checkbox[type=checkbox]:after{content:\"\";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px}input.app-checkbox[type=checkbox]:checked:after{background:#1d2129;content:\"✓\";color:#fff;border:none;font-size:14px}input.app-radio-checkbox[type=radio]{-webkit-font-smoothing:antialiased;text-rendering:optimizeSpeed;width:16px;height:16px;display:block;position:relative;margin-top:2px}input.app-radio-checkbox[type=radio]:after{content:\"\";vertical-align:middle;text-align:center;position:absolute;cursor:pointer;height:16px;width:16px;font-size:7px;background:#fff;border:1px solid #caccd1;border-radius:2px;line-height:16px;left:-1px;top:1px}input.app-radio-checkbox[type=radio]:checked:after{background:#1d2129;content:\"✓\";color:#fff;border:none;font-size:14px}.select-container{width:325px;background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(29,33,41,.3);z-index:999;position:absolute;color:#1d2129;left:0}.select-container__header{padding:0 24px}.select-container__body{height:200px;overflow-y:auto;padding:0 24px}.select-container__footer{background:#f3f4f7;color:#1d2129;height:50px;display:flex;align-items:center;justify-content:flex-end;bottom:0;padding:0 24px}.p0{padding:0!important}.p10{padding:10px!important}.p15{padding:15px!important}.p20{padding:20px!important}.p30{padding:30px!important}.p40{padding:40px!important}.p50{padding:50px!important}.p60{padding:60px!important}.p70{padding:70px!important}.p80{padding:80px!important}.p90{padding:90px!important}.p100{padding:100px!important}.p110{padding:110px!important}.p120{padding:120px!important}.p130{padding:130px!important}.p140{padding:140px!important}.pt10{padding-top:10px!important}.pt15{padding-top:15px!important}.pt20{padding-top:20px!important}.pt30{padding-top:30px!important}.pt40{padding-top:40px!important}.pt50{padding-top:50px!important}.pt60{padding-top:60px!important}.pt70{padding-top:70px!important}.pt80{padding-top:80px!important}.pt90{padding-top:90px!important}.pt100{padding-top:100px!important}.pt110{padding-top:110px!important}.pt120{padding-top:120px!important}.pt130{padding-top:130px!important}.pt140{padding-top:140px!important}.pb0{padding-bottom:0!important}.pb10{padding-bottom:10px!important}.pb15{padding-bottom:15px!important}.pb20{padding-bottom:20px!important}.pb30{padding-bottom:30px!important}.pb40{padding-bottom:40px!important}.pb50{padding-bottom:50px!important}.pb60{padding-bottom:60px!important}.pb70{padding-bottom:70px!important}.pb80{padding-bottom:80px!important}.pb90{padding-bottom:90px!important}.pb100{padding-bottom:100px!important}.pb110{padding-bottom:110px!important}.pb120{padding-bottom:120px!important}.pb130{padding-bottom:130px!important}.pb140{padding-bottom:140px!important}.pl0{padding-left:0!important}.pl3{padding-left:3px!important}.pl5{padding-left:5px!important}.pl10{padding-left:10px!important}.pl20{padding-left:20px!important}.pl30{padding-left:30px}.pl40{padding-left:40px}.pl50{padding-left:50px}.pl60{padding-left:60px}.pl70{padding-left:70px}.pl80{padding-left:80px}.pl90{padding-left:90px}.pl100{padding-left:100px}.pr0{padding-right:0!important}.pr5{padding-right:5px!important}.pr10{padding-right:10px!important}.pr20{padding-right:20px!important}.pr30{padding-right:30px!important}.pr40{padding-right:40px}.pr50{padding-right:50px}.pr60{padding-right:60px}.pr70{padding-right:70px}.pr80{padding-right:80px}.pr90{padding-right:90px}.pr100{padding-right:100px}.pr110{padding-right:110px}.pr120{padding-right:120px}@media (min-width:1200px){.pl-lg-50{padding-left:50px}.pl-lg-80{padding-left:80px}}@media (min-width:992px){.pt-md-50{padding-top:50px}}.mr-auto{margin:auto;float:none}.mt0{margin-top:0!important}.mt5{margin-top:5px!important}.mt10{margin-top:10px!important}.mt20{margin-top:20px!important}.mt30{margin-top:30px!important}.mt40{margin-top:40px!important}.mt50{margin-top:50px!important}.mt60{margin-top:60px!important}.mt70{margin-top:70px!important}.mt80{margin-top:80px!important}.mt90{margin-top:90px!important}.mt100{margin-top:100px!important}.mt110{margin-top:110px!important}.mt120{margin-top:120px!important}.mb0{margin-bottom:0!important}.mb5{margin-bottom:5px!important}.mb10{margin-bottom:10px!important}.mb15{margin-bottom:15px!important}.mb20{margin-bottom:20px!important}.mb30{margin-bottom:30px!important}.mb40{margin-bottom:40px!important}.mb50{margin-bottom:50px}.mb60{margin-bottom:60px}.mb70{margin-bottom:70px}.mb80{margin-bottom:80px}.mb90{margin-bottom:90px}.mb100{margin-bottom:100px}.mb110{margin-bottom:110px}.mb120{margin-bottom:120px}.ml0{margin-left:0!important}.ml15{margin-left:5px}.ml10{margin-left:10px}.ml20{margin-left:20px}.ml30{margin-left:30px}.ml40{margin-left:40px}.ml50{margin-left:50px}.ml60{margin-left:60px}.ml70{margin-left:70px}.ml80{margin-left:80px}.ml90{margin-left:90px}.ml100{margin-left:100px}.ml110{margin-left:110px}.mr0{margin-right:0!important}.mr5{margin-left:5px!important}.mr10{margin-right:10px!important}.mr15{margin-right:15px!important}.mr20{margin-right:20px!important}.mr30{margin-right:30px!important}.mr40{margin-right:40px!important}.mr50{margin-right:50px!important}.mr60{margin-right:60px!important}.mr70{margin-right:70px!important}.mr80{margin-right:80px!important}.mr90{margin-right:90px!important}.mr100{margin-right:100px}.mr110{margin-right:110px}.checkbox-container .select-container__header{display:flex;background-color:#f3f4f7;padding:10px 24px}.checkbox-container .select-container__header .search-input{border:none;width:100%;background-color:transparent}.checkbox-container .select-container__header .search-input:focus{outline:0}.checkbox-container .select-container__body .checkbox-option{text-align:left;font-size:14px;display:flex;align-items:center;margin:8px 0}"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"bindLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"bindValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"loading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"selectedIds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"search":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"changed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":20,"character":3}}]}],"idsChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":3}}]}],"selection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":3}}]}],"idsSelection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":3}}]}],"clickedOutside":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":30,"character":3},"arguments":["document:click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"setSelectedItems":[{"__symbolic":"method"}],"clearSelections":[{"__symbolic":"method"}],"applySelections":[{"__symbolic":"method"}],"emitChange":[{"__symbolic":"method"}],"onSearch":[{"__symbolic":"method"}],"onItemChange":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[libSearchInput]"}]}],"members":{"text":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"inputChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":23,"character":20},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":23,"character":42}]}],"subscribeToSearchInput":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":2,"character":1},"arguments":[{"name":"filter"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":30,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ɵd"}],"exports":[{"__symbolic":"reference","name":"ɵd"}]}]}],"members":{}}},"origins":{"CmSelectService":"./lib/cm-select.service","CmSelectComponent":"./lib/cm-select.component","CmSelectModule":"./lib/cm-select.module","ɵa":"./lib/checkbox/checkbox.module","ɵb":"./lib/checkbox/checkbox.component","ɵc":"./lib/utils/search-input.directive","ɵd":"./lib/utils/filter.pipe","ɵe":"./lib/utils/filter.pipe"},"importAs":"cm-select"}

@@ -18,3 +18,2 @@ import * as tslib_1 from "tslib";

this.idsSelection = new EventEmitter();
// oldSelected: any;
this.q = '';

@@ -42,7 +41,2 @@ this.tempSelected = [];

ngOnInit() {
// this.oldSelected = this.selected;
// this.oldSelected.forEach(ele => {
// ele.checked = true;
// });
// this.selected = [];
this.options = new Options(this.options);

@@ -62,8 +56,10 @@ this.items = deepCopyArray(this.items);

this.tempSelected = [...this.selected];
this.newSelected = this.selected;
this.newSelected = JSON.parse(JSON.stringify(this.selected));
}
}
setSelectedItems() {
console.log(this.selected);
console.log(this.selectedIds);
this.items = deepCopyArray(this.items);
if (this.selected && this.selected.length) {
if (this.selected && this.selected.length > 0) {
this.selected.forEach(s => {

@@ -78,3 +74,3 @@ for (const item of this.items) {

}
else if (this.selectedIds && this.selectedIds.length) {
else if (this.selectedIds && this.selectedIds.length > 0) {
this.selectedIds.forEach(id => {

@@ -84,2 +80,3 @@ for (const item of this.items) {

item.checked = true;
this.selected.push(item);
break;

@@ -90,2 +87,5 @@ }

}
console.log('Coming near set selected items');
console.log(this.items);
console.log(this.selected);
}

@@ -125,11 +125,2 @@ clearSelections() {

else {
// if (this.oldSelected.length > 0) {
// this.selected = [...this.selected, ...this.oldSelected];
// this.selected = this.selected.filter((thing, index) => {
// return index === this.selected.findIndex(obj => {
// return JSON.stringify(obj) === JSON.stringify(thing);
// });
// });
// this.oldSelected = [];
// }
if (this.newSelected) {

@@ -244,2 +235,2 @@ this.changed.emit(this.newSelected);

export { CheckboxComponent };
//# sourceMapp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IEpTT04uc3RyaW5naWZ5KHRoaW5nKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbn1cbiJdfQ==

@@ -18,3 +18,2 @@ import * as tslib_1 from "tslib";

this.idsSelection = new EventEmitter();
// oldSelected: any;
this.q = '';

@@ -42,7 +41,2 @@ this.tempSelected = [];

CheckboxComponent.prototype.ngOnInit = function () {
// this.oldSelected = this.selected;
// this.oldSelected.forEach(ele => {
// ele.checked = true;
// });
// this.selected = [];
this.options = new Options(this.options);

@@ -62,3 +56,3 @@ this.items = deepCopyArray(this.items);

this.tempSelected = tslib_1.__spread(this.selected);
this.newSelected = this.selected;
this.newSelected = JSON.parse(JSON.stringify(this.selected));
}

@@ -68,4 +62,6 @@ };

var _this = this;
console.log(this.selected);
console.log(this.selectedIds);
this.items = deepCopyArray(this.items);
if (this.selected && this.selected.length) {
if (this.selected && this.selected.length > 0) {
this.selected.forEach(function (s) {

@@ -91,3 +87,3 @@ var e_1, _a;

}
else if (this.selectedIds && this.selectedIds.length) {
else if (this.selectedIds && this.selectedIds.length > 0) {
this.selectedIds.forEach(function (id) {

@@ -100,2 +96,3 @@ var e_2, _a;

item.checked = true;
_this.selected.push(item);
break;

@@ -114,2 +111,5 @@ }

}
console.log('Coming near set selected items');
console.log(this.items);
console.log(this.selected);
};

@@ -149,11 +149,2 @@ CheckboxComponent.prototype.clearSelections = function () {

else {
// if (this.oldSelected.length > 0) {
// this.selected = [...this.selected, ...this.oldSelected];
// this.selected = this.selected.filter((thing, index) => {
// return index === this.selected.findIndex(obj => {
// return JSON.stringify(obj) === JSON.stringify(thing);
// });
// });
// this.oldSelected = [];
// }
if (this.newSelected) {

@@ -270,2 +261,2 @@ this.changed.emit(this.newSelected);

export { CheckboxComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3guY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vY20tc2VsZWN0LyIsInNvdXJjZXMi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ge1xuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkob2JqKSA9PT0gSlNPTi5zdHJpbmdpZnkodGhpbmcpO1xuICAgICAgfSk7XG4gICAgfSk7XG4gICAgdGhpcy5uZXdTZWxlY3RlZCA9IHRoaXMubmV3U2VsZWN0ZWQuZmlsdGVyKCh0aGluZywgaW5kZXgpID0+IHtcbiAgICAgIHJldHVybiBpbmRleCA9PT0gdGhpcy5uZXdTZWxlY3RlZC5maW5kSW5kZXgob2JqID0+IHtcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KG9iaikgPT09IEpTT04uc3RyaW5naWZ5KHRoaW5nKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbn1cbiJdfQ==

@@ -177,3 +177,2 @@ import { __decorate, __metadata } from 'tslib';

this.idsSelection = new EventEmitter();
// oldSelected: any;
this.q = '';

@@ -201,7 +200,2 @@ this.tempSelected = [];

ngOnInit() {
// this.oldSelected = this.selected;
// this.oldSelected.forEach(ele => {
// ele.checked = true;
// });
// this.selected = [];
this.options = new Options(this.options);

@@ -221,8 +215,10 @@ this.items = deepCopyArray(this.items);

this.tempSelected = [...this.selected];
this.newSelected = this.selected;
this.newSelected = JSON.parse(JSON.stringify(this.selected));
}
}
setSelectedItems() {
console.log(this.selected);
console.log(this.selectedIds);
this.items = deepCopyArray(this.items);
if (this.selected && this.selected.length) {
if (this.selected && this.selected.length > 0) {
this.selected.forEach(s => {

@@ -237,3 +233,3 @@ for (const item of this.items) {

}
else if (this.selectedIds && this.selectedIds.length) {
else if (this.selectedIds && this.selectedIds.length > 0) {
this.selectedIds.forEach(id => {

@@ -243,2 +239,3 @@ for (const item of this.items) {

item.checked = true;
this.selected.push(item);
break;

@@ -249,2 +246,5 @@ }

}
console.log('Coming near set selected items');
console.log(this.items);
console.log(this.selected);
}

@@ -284,11 +284,2 @@ clearSelections() {

else {
// if (this.oldSelected.length > 0) {
// this.selected = [...this.selected, ...this.oldSelected];
// this.selected = this.selected.filter((thing, index) => {
// return index === this.selected.findIndex(obj => {
// return JSON.stringify(obj) === JSON.stringify(thing);
// });
// });
// this.oldSelected = [];
// }
if (this.newSelected) {

@@ -295,0 +286,0 @@ this.changed.emit(this.newSelected);

@@ -192,3 +192,2 @@ import { __decorate, __metadata, __values, __spread } from 'tslib';

this.idsSelection = new EventEmitter();
// oldSelected: any;
this.q = '';

@@ -216,7 +215,2 @@ this.tempSelected = [];

CheckboxComponent.prototype.ngOnInit = function () {
// this.oldSelected = this.selected;
// this.oldSelected.forEach(ele => {
// ele.checked = true;
// });
// this.selected = [];
this.options = new Options(this.options);

@@ -236,3 +230,3 @@ this.items = deepCopyArray(this.items);

this.tempSelected = __spread(this.selected);
this.newSelected = this.selected;
this.newSelected = JSON.parse(JSON.stringify(this.selected));
}

@@ -242,4 +236,6 @@ };

var _this = this;
console.log(this.selected);
console.log(this.selectedIds);
this.items = deepCopyArray(this.items);
if (this.selected && this.selected.length) {
if (this.selected && this.selected.length > 0) {
this.selected.forEach(function (s) {

@@ -265,3 +261,3 @@ var e_1, _a;

}
else if (this.selectedIds && this.selectedIds.length) {
else if (this.selectedIds && this.selectedIds.length > 0) {
this.selectedIds.forEach(function (id) {

@@ -274,2 +270,3 @@ var e_2, _a;

item.checked = true;
_this.selected.push(item);
break;

@@ -288,2 +285,5 @@ }

}
console.log('Coming near set selected items');
console.log(this.items);
console.log(this.selected);
};

@@ -323,11 +323,2 @@ CheckboxComponent.prototype.clearSelections = function () {

else {
// if (this.oldSelected.length > 0) {
// this.selected = [...this.selected, ...this.oldSelected];
// this.selected = this.selected.filter((thing, index) => {
// return index === this.selected.findIndex(obj => {
// return JSON.stringify(obj) === JSON.stringify(thing);
// });
// });
// this.oldSelected = [];
// }
if (this.newSelected) {

@@ -334,0 +325,0 @@ this.changed.emit(this.newSelected);

{
"name": "cm-select",
"version": "0.1.6",
"version": "0.1.7",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^8.1.0",

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 not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc