UNPKG

@sd-angular/core

Version:

Sd Angular Core Lib

16 lines (14 loc) 22.2 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/icon"),require("@angular/material/tooltip"),require("@angular/material/progress-spinner"),require("@angular/cdk/keycodes"),require("rxjs/operators"),require("uuid"),require("object-hash"),require("@angular/forms"),require("rxjs"),require("@angular/material/autocomplete"),require("@sd-angular/core/common"),require("@angular/material/input"),require("@angular/material/form-field"),require("@sd-angular/core/translate"),require("@angular/material/chips")):"function"==typeof define&&define.amd?define("@sd-angular/core/chip",["exports","@angular/core","@angular/common","@angular/material/icon","@angular/material/tooltip","@angular/material/progress-spinner","@angular/cdk/keycodes","rxjs/operators","uuid","object-hash","@angular/forms","rxjs","@angular/material/autocomplete","@sd-angular/core/common","@angular/material/input","@angular/material/form-field","@sd-angular/core/translate","@angular/material/chips"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["sd-angular"]=e["sd-angular"]||{},e["sd-angular"].core=e["sd-angular"].core||{},e["sd-angular"].core.chip={}),e.ng.core,e.ng.common,e.ng.material.icon,e.ng.material.tooltip,e.ng.material.progressSpinner,e.ng.cdk.keycodes,e.rxjs.operators,e.uuid,e.hash,e.ng.forms,e.rxjs,e.ng.material.autocomplete,e["sd-angular"].core.common,e.ng.material.input,e.ng.material.formField,e["sd-angular"].core.translate,e.ng.material.chips)}(this,(function(e,t,n,r,o,i,a,l,s,u,c,d,p,m,f,h,g,v){"use strict";function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=C(u); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function y(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))}function w(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}Object.create;function F(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function M(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(F(arguments[t]));return e}Object.create;function I(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function x(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}var O,S,V,k,T,j,E,P,q,A,D,R,W,L,_=function(e){this.templateRef=e};_.decorators=[{type:t.Directive,args:[{selector:"[sdChipDisplayDef]"}]}],_.ctorParameters=function(){return[{type:t.TemplateRef}]};var B=function(){function e(e){this.formControl=e}return e.prototype.isErrorState=function(e,t){var n,r,o,i=t&&t.submitted;return!(!(null===(n=this.formControl)||void 0===n?void 0:n.invalid)||!((null===(r=this.formControl)||void 0===r?void 0:r.dirty)||(null===(o=this.formControl)||void 0===o?void 0:o.touched)||i))},e}(),N=function(){function e(e,n){var r=this;this.ref=e,this.formConfig=n,O.set(this,s.v4()),this.separatorKeysCodes=[a.ENTER,a.COMMA],this.selectable=!0,S.set(this,void 0),V.set(this,void 0),this.removable=!0,this.disableErrorMessage=!1,this.loading=!1,k.set(this,void 0),T.set(this,{}),j.set(this,{}),E.set(this,200),P.set(this,new d.BehaviorSubject([])),this.limit=50,q.set(this,[]),A.set(this,void 0),this.required=!1,this.modelChange=new t.EventEmitter,this.sdChange=new t.EventEmitter,this.sdUpdate=new t.EventEmitter,this.chipSelected=new t.EventEmitter,this.isBluring=!1,this.isFocused=!1,this.inputControl=new c.FormControl,this.formControl=new m.SdFormControl,this.matcher=new B(this.formControl),D.set(this,new d.Subscription),R.set(this,(function(){r.formControl.clearValidators(),r.formControl.clearAsyncValidators();var e=[];r.required&&e.push(c.Validators.required),r.min>0&&e.push(c.Validators.minLength(r.min)),r.max>0&&e.push(c.Validators.maxLength(r.max)),r.formControl.setValidators(e),r.formControl.setAsyncValidators([]),r.formControl.updateValueAndValidity()})),W.set(this,(function(e,t){return y(r,void 0,void 0,(function(){var n,r,o,i=this;return w(this,(function(a){switch(a.label){case 0:return e=(null==e?void 0:e.toString())||"",n=b.default({checksum:this.cacheChecksum||null,searchText:e}),void 0!==I(this,j)[n]?[3,2]:(this.loading=!0,[4,t(e).catch((function(){return[]})).finally((function(){return i.loading=!1}))]);case 1:r=a.sent(),o=Array.toObject(r,this.valueField),x(this,T,Object.assign(Object.assign({},I(this,T)),o)),I(this,j)[n]=r.union(this.valueField),a.label=2;case 2:return[4,I(this,L).call(this,this.formControl.value,t)];case 3:return[2,M(a.sent(),I(this,j)[n]).union(this.valueField)]}}))}))})),L.set(this,(function(e,t){return y(r,void 0,void 0,(function(){var n,r,o,i,a=this;return w(this,(function(l){switch(l.label){case 0:return(null==e?void 0:e.toString())?(n=Array.isArray(e)?e:[e],this.valueField||this.displayField?(this.loading=!0,n.some((function(e){return void 0===I(a,T)[e]}))?[4,t(e,!0).catch((function(){return[]})).finally((function(){return a.loading=!1}))]:[3,2]):[2,n]):[2,[]];case 1:r=l.sent(),o=Array.toObject(r,this.valueField),i=Array.toObject(n.map((function(e){var t,n;return(t={})[null==e?void 0:e.toString()]=((n={})[a.valueField]=e,n[a.displayField]=e,n),t})),this.valueField),x(this,T,Object.assign(Object.assign(Object.assign({},i),I(this,T)),o)),l.label=2;case 2:return[2,n.map((function(e){var t,n;return null!==(n=I(a,T)[null==e?void 0:e.toString()])&&void 0!==n?n:((t={})[a.valueField]=e,t[a.displayField]=e,t)}))]}}))}))})),this.onAdd=function(e){var t,n,o,i,a,l,s=(null!==(t=e.value)&&void 0!==t?t:"").toString().trim();if(s)if(r.valueField&&r.displayField){if(l=I(r,A).find((function(e){return e[r.displayField]===s})))(u=null!==(n=r.formControl.value)&&void 0!==n?n:[]).push(l[r.valueField]),r.formControl.setValue(u),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value);else if(I(r,V)){(u=null!==(o=r.formControl.value)&&void 0!==o?o:[]).push(s),r.formControl.setValue(u),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value)}}else if(l=I(r,A).find((function(e){return e===s})))(u=null!==(i=r.formControl.value)&&void 0!==i?i:[]).push(l),r.formControl.setValue(u),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value);else if(I(r,V)){var u;(u=null!==(a=r.formControl.value)&&void 0!==a?a:[]).push(s),r.formControl.setValue(u),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value)}r.input.nativeElement.value="",r.inputControl.setValue("")},this.onAdd2=function(e){var t,n,o=(null!==(t=e.value)&&void 0!==t?t:"").toString().toLowerCase().trim();if(o){var i=I(r,A).find((function(e){return e[r.valueField]&&e[r.valueField].toString().toLowerCase().trim()===o}));if(i){var a=null!==(n=r.formControl.value)&&void 0!==n?n:[];a.includes(i[r.valueField])||a.push(i[r.valueField]),r.formControl.setValue(a)}}r.inputControl.setValue("")},this.onClickChip=function(e,t){e.stopPropagation(),e.stopImmediatePropagation(),r.formControl.disabled||(t.isSelected=!t.isSelected,r.focus())},this.onRemove=function(e){var t,n=null!==(t=r.formControl.value)&&void 0!==t?t:[];"string"==typeof e||"number"==typeof e?(r.formControl.setValue(n.filter((function(t){return e!==t}))),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value)):r.valueField&&(r.formControl.setValue(n.filter((function(t){return(null==e?void 0:e[r.valueField])!==t}))),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value)),r.inputControl.setValue(""),r.focus()},this.select=function(e){r.chipSelected.emit(e),r.focus()},this.onSelect=function(e){var t,n=e.option.value,o=null!==(t=r.formControl.value)&&void 0!==t?t:[];if(n){if("string"==typeof n||"number"==typeof n)o.includes(n)||(o.push(n),r.formControl.setValue(o),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value),setTimeout((function(){var e;null===(e=r.autocompleteTrigger)||void 0===e||e.openPanel()}),0));else if(r.valueField){var i=(null==n?void 0:n[r.valueField])||null;o.includes(i)||(o.push(i),r.formControl.setValue(o),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value),setTimeout((function(){var e;null===(e=r.autocompleteTrigger)||void 0===e||e.openPanel()}),0))}r.input.nativeElement.value="",r.inputControl.setValue("",{emitEvent:!1})}},this.onFocus=function(){r.isFocused=!0,r.isBluring=!1,r.inputControl.setValue("")},this.onBlur=function(){r.isBluring=!0,setTimeout((function(){r.isBluring&&(r.isFocused=!1,r.inputControl.setValue("",{emitEvent:!1}))}),100)},this.onClick=function(){var e;(null===(e=r.sdView)||void 0===e?void 0:e.templateRef)&&(r.formControl.disabled||r.isFocused||r.focus())},this.focus=function(){r.isFocused=!0,r.isBluring=!1,setTimeout((function(){var e,t,n;null===(e=r.autocompleteTrigger)||void 0===e||e.openPanel(),null===(n=null===(t=r.input)||void 0===t?void 0:t.nativeElement)||void 0===n||n.focus()}),100)},this.onClear=function(e){var t;null==e||e.stopPropagation(),r.inputControl.setValue(""),r.formControl.setValue([]),r.modelChange.emit(r.formControl.value),r.sdChange.emit(r.formControl.value),null===(t=r.autocompleteTrigger)||void 0===t||t.openPanel(),r.ref.detectChanges()},this.getSelectedItems=function(){return I(r,q)}}return Object.defineProperty(e.prototype,"name",{set:function(e){e&&x(this,O,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"form",{set:function(e){e&&(e instanceof c.NgForm?x(this,S,e.form):x(this,S,e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"addable",{set:function(e){x(this,V,""===e||e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_removable",{set:function(e){this.removable=""===e||e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_disableErrorMessage",{set:function(e){this.disableErrorMessage=""===e||e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{set:function(e){x(this,E,0),e?Array.isArray(e)?I(this,P).next(e.filter((function(e){return null!=e}))):(x(this,E,500),I(this,P).next(e)):I(this,P).next([]),this.formControl.updateValueAndValidity()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"model",{set:function(e){Array.isArray(e)||(e=[]),this.formControl.setValue(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_required",{set:function(e){this.required=""===e||e,I(this,R).call(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pMin",{set:function(e){this.min=+e||0,I(this,R).call(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pMax",{set:function(e){this.max=+e||0,I(this,R).call(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{set:function(e){(e=""===e||e)?(this.formControl.disable(),this.inputControl.disable()):(this.formControl.enable(),this.inputControl.enable())},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e;this.appearance=this.appearance||(null===(e=this.formConfig)||void 0===e?void 0:e.appearance)},e.prototype.ngAfterViewInit=function(){var e,t=this;I(this,D).add(this.formControl.sdChanges.subscribe((function(){t.ref.markForCheck()}))),x(this,k,d.combineLatest([I(this,P).asObservable(),this.inputControl.valueChanges.pipe(l.startWith(""),l.debounceTime(I(this,E))),this.formControl.valueChanges.pipe(l.startWith(this.formControl.value))]).pipe(l.switchMap((function(e){var n=F(e,1)[0];return y(t,void 0,void 0,(function(){var e,t,r,o=this;return w(this,(function(i){switch(i.label){case 0:return e=this.inputControl.value,t=this.formControl.value||[],"function"!=typeof n?[3,2]:[4,I(this,W).call(this,e,n)];case 1:return[2,i.sent()];case 2:return x(this,T,n.toObject(this.valueField)),r=!!this.valueField&&!!this.displayField,x(this,A,n.filter((function(n){var i=r?n[o.valueField]:n,a=r?n[o.displayField]:n;return!(!String.aliasIncludes(i,e)&&!String.aliasIncludes(a,e))||t.some((function(e){return e===i}))}))),[2,I(this,A)]}}))}))})))),this.selectedItems=d.combineLatest([I(this,P).asObservable(),this.formControl.valueChanges.pipe(l.startWith(this.formControl.value))]).pipe(l.switchMap((function(e){var n=F(e,2),r=n[0],o=n[1];return y(t,void 0,void 0,(function(){var e,t,n,i=this;return w(this,(function(a){switch(a.label){case 0:return o=this.formControl.value,this.valueField?"function"!=typeof r?[3,2]:(t=x,n=[this,q],[4,I(this,L).call(this,o,r)]):(x(this,q,this.formControl.value),[2,I(this,q)]);case 1:return t.apply(void 0,n.concat([a.sent()])),[2,I(this,q)];case 2:return x(this,q,null===(e=this.formControl.value||[])||void 0===e?void 0:e.map((function(e){var t;return(null==r?void 0:r.find((function(t){return t[i.valueField]===e})))||((t={})[i.valueField]=e,t[i.displayField]=e,t)}))),[2,I(this,q)]}}))}))}))),this.filteredItems=I(this,k).pipe(l.map((function(e){return e.filter((function(e){var n=t.formControl.value||[];return t.valueField?!n.includes(null==e?void 0:e[t.valueField]):!n.includes(e)})).paging(t.limit)}))),null===(e=I(this,S))||void 0===e||e.addControl(I(this,O),this.formControl)},e.prototype.ngOnDestroy=function(){var e;null===(e=I(this,S))||void 0===e||e.removeControl(I(this,O)),I(this,D).unsubscribe()},e}();O=new WeakMap,S=new WeakMap,V=new WeakMap,k=new WeakMap,T=new WeakMap,j=new WeakMap,E=new WeakMap,P=new WeakMap,q=new WeakMap,A=new WeakMap,D=new WeakMap,R=new WeakMap,W=new WeakMap,L=new WeakMap,N.decorators=[{type:t.Component,args:[{selector:"sd-chip",template:'<ng-container *ngIf="!appearance && sdLabelDef?.templateRef">\r\n <ng-container *ngTemplateOutlet="sdLabelDef.templateRef">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf="!appearance && label && !sdLabelDef?.templateRef" class="d-block mb-0 T14M">{{label}} <span class="text-danger mb-2"\r\n *ngIf="required">*</span></label>\r\n<div class="d-flex align-items-center" [class.sd-view]="sdView?.templateRef" [class.c-focused]="isFocused"\r\n [class.c-disabled]="formControl.disabled" (click)="onClick()">\r\n <ng-container *ngIf="sdView?.templateRef && !autocompleteTrigger?.panelOpen && !isFocused; else default">\r\n <ng-container *ngTemplateOutlet="sdView.templateRef;context: { value: formControl.value}">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class="c-md" [ngClass]="{\'c-sm\': size === \'sm\', \'no-padding-wrapper\': disableErrorMessage}"\r\n [appearance]="appearance || \'outline\'">\r\n <mat-label *ngIf="appearance && label">{{ label }}</mat-label>\r\n <mat-chip-list [formControl]="formControl" #chipList>\r\n <ng-container *ngFor="let item of selectedItems | async">\r\n <mat-chip *ngIf="item" [selectable]="selectable" [removable]="removable" (removed)="onRemove(item)"\r\n [selected]="item.isSelected" (selectionChange)="select(item)" [disabled]="inputControl.disabled"\r\n (click)="onClickChip($event, item)">\r\n <span>{{item[displayField] || item[valueField] || item}}</span>\r\n <mat-icon *ngIf="!inputControl.disabled && item | sdRemovableChip:removable" matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n </ng-container>\r\n <input #autocompleteTrigger [formControl]="inputControl" [placeholder]="placeholder || (appearance ? label : \'\')"\r\n [matAutocomplete]="auto" [matChipInputFor]="chipList" [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\r\n (matChipInputTokenEnd)="onAdd($event)" autocomplete="off" [errorStateMatcher]="matcher" (focus)="onFocus()"\r\n (blur)="onBlur()" [required]="required" matInput #input>\r\n </mat-chip-list>\r\n <mat-autocomplete #auto="matAutocomplete" (optionSelected)="onSelect($event)">\r\n <mat-option *ngFor="let item of filteredItems | async" [value]="item" matTooltipPosition="above"\r\n [matTooltip]="displayField ? item[displayField] : item">\r\n <ng-container *ngIf="sdChipDisplay?.templateRef">\r\n <ng-container *ngTemplateOutlet="sdChipDisplay.templateRef;context:{item: item}">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="!sdChipDisplay?.templateRef">\r\n {{ displayField ? item[displayField] : item }}\r\n </ng-container>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf="formControl?.errors?.required">\r\n <ng-container *ngIf="!disableErrorMessage">{{ "This field is required" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=" formControl?.errors?.minlength">\r\n <ng-container *ngIf="!disableErrorMessage">{{\'Min length\' | sdTranslate}} {{min}}\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=" formControl?.errors?.maxlength">\r\n <ng-container *ngIf="!disableErrorMessage">{{\'Max length\' | sdTranslate}} {{max}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep mat-form-field.c-md .mat-form-field-infix{min-height:43.5px;padding:2px 0}:host ::ng-deep mat-form-field.c-md .mat-standard-chip{min-height:26px;padding:7px 10px}:host ::ng-deep mat-form-field.c-md .mat-standard-chip.mat-chip-with-trailing-icon{padding:7px 7px 7px 10px}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}"]}]}],N.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Inject,args:[m.FORM_CONFIG]},{type:t.Optional}]}]},N.propDecorators={name:[{type:t.Input}],appearance:[{type:t.Input}],size:[{type:t.Input}],form:[{type:t.Input}],addable:[{type:t.Input}],label:[{type:t.Input}],valueField:[{type:t.Input}],displayField:[{type:t.Input}],placeholder:[{type:t.Input}],_removable:[{type:t.Input,args:["removable"]}],_disableErrorMessage:[{type:t.Input,args:["disableErrorMessage"]}],items:[{type:t.Input}],limit:[{type:t.Input}],cacheChecksum:[{type:t.Input}],model:[{type:t.Input}],_required:[{type:t.Input,args:["required"]}],pMin:[{type:t.Input,args:["min"]}],pMax:[{type:t.Input,args:["max"]}],modelChange:[{type:t.Output}],disabled:[{type:t.Input}],sdChange:[{type:t.Output}],sdUpdate:[{type:t.Output}],chipSelected:[{type:t.Output}],input:[{type:t.ViewChild,args:["input"]}],matAutocomplete:[{type:t.ViewChild,args:["auto"]}],chipList:[{type:t.ViewChild,args:["chipList",{static:!0}]}],autocompleteTrigger:[{type:t.ViewChild,args:[p.MatAutocompleteTrigger,{read:p.MatAutocompleteTrigger}]}],sdView:[{type:t.ContentChild,args:[m.SdViewDefDirective]}],sdChipDisplay:[{type:t.ContentChild,args:[_]}],sdLabelDef:[{type:t.ContentChild,args:[m.SdLabelDefDirective]}]};var K=function(){function e(){}return e.prototype.transform=function(e,t){return"boolean"==typeof t?t:t(e)},e}();K.decorators=[{type:t.Pipe,args:[{name:"sdRemovableChip"}]}],K.ctorParameters=function(){return[]};var $=function(){};$.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,c.FormsModule,c.ReactiveFormsModule,f.MatInputModule,o.MatTooltipModule,h.MatFormFieldModule,p.MatAutocompleteModule,r.MatIconModule,i.MatProgressSpinnerModule,v.MatChipsModule,g.SdTranslateModule,m.SdCommonModule],declarations:[N,_,K],exports:[m.SdCommonModule,N,_]}]}],e.SdChip=N,e.SdChipDisplayDef=_,e.SdChipModule=$,e.ɵa=K,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=sd-angular-core-chip.umd.min.js.map