@main-class/componentes 1.19.13 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/main-class-componentes-core.umd.js +34 -9
- package/bundles/main-class-componentes-core.umd.js.map +1 -1
- package/bundles/main-class-componentes-core.umd.min.js +1 -1
- package/bundles/main-class-componentes-core.umd.min.js.map +1 -1
- package/bundles/main-class-componentes-input.umd.js +25 -21
- package/bundles/main-class-componentes-input.umd.js.map +1 -1
- package/bundles/main-class-componentes-input.umd.min.js +1 -1
- package/bundles/main-class-componentes-input.umd.min.js.map +1 -1
- package/bundles/main-class-componentes-misc.umd.js +14 -12
- package/bundles/main-class-componentes-misc.umd.js.map +1 -1
- package/bundles/main-class-componentes-misc.umd.min.js +1 -1
- package/bundles/main-class-componentes-misc.umd.min.js.map +1 -1
- package/bundles/main-class-componentes-model.umd.js +13 -5
- package/bundles/main-class-componentes-model.umd.js.map +1 -1
- package/bundles/main-class-componentes-model.umd.min.js +1 -1
- package/bundles/main-class-componentes-model.umd.min.js.map +1 -1
- package/core/main-class-componentes-core.metadata.json +1 -1
- package/core/src/validator/valida-modulo11.service.d.ts +10 -2
- package/esm2015/core/src/validator/valida-modulo11.service.js +35 -10
- package/esm2015/input/src/select-many-checkbox/select-many-checkbox.component.js +10 -6
- package/esm2015/misc/src/cnpj/cnpj-model.directive.js +2 -2
- package/esm2015/misc/src/cnpj/cnpj.directive.js +2 -2
- package/esm2015/misc/src/cnpj/cnpjs.pipe.js +2 -2
- package/esm2015/misc/src/cpf-cnpj/cpf-cnpj-model.directive.js +5 -5
- package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.directive.js +6 -4
- package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.pipe.js +3 -3
- package/esm2015/model/src/masked-model.directive.js +14 -6
- package/fesm2015/main-class-componentes-core.js +34 -9
- package/fesm2015/main-class-componentes-core.js.map +1 -1
- package/fesm2015/main-class-componentes-input.js +9 -5
- package/fesm2015/main-class-componentes-input.js.map +1 -1
- package/fesm2015/main-class-componentes-misc.js +14 -12
- package/fesm2015/main-class-componentes-misc.js.map +1 -1
- package/fesm2015/main-class-componentes-model.js +13 -5
- package/fesm2015/main-class-componentes-model.js.map +1 -1
- package/model/main-class-componentes-model.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var P=function(e,t){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function j(e,t){function n(){this.constructor=e}P(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function $(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[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,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}function D(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function T(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function V(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(T(arguments[t]));return e}var _=function(e){function t(t,n,o,r,i,a){var l=e.call(this,t,n,o,r)||this;return l.adapter=i,l.formats=a,l.type="date",l}return j(t,e),Object.defineProperty(t.prototype,"empty",{get:function(){return!this.$maskedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maskedValue",{get:function(){return this.$maskedValue},set:function(e){this.$maskedValue!==e&&(this.onTouched(),this.$maskedValue=e,e&&e.match(new RegExp("^"+this.mask.replace(/#/g,"\\d")+"$"))?this.innerValue=this.adapter.parse(e,this.format).toDate():this.innerValue=void 0,this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mask",{get:function(){switch(this.type){case"date":return"##/##/####";case"time":return"##:##"}return"##/##/#### ##:##"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){switch(this.type){case"date":return this.formats.display.dateInput;case"time":return this.formats.display.timeInput}return this.formats.display.datetimeInput},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.innerValue},set:function(e){this.innerValue!==e&&(this.onTouched(),e?(this.innerValue=e instanceof Date?e:e.toDate(),this.$maskedValue=this.adapter.format(k(this.innerValue),this.format)):(this.innerValue=void 0,this.$maskedValue=""),this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),t.prototype.writeValue=function(e){this.innerValue=e,this.$maskedValue=e?this.adapter.format(k(e),this.format):"",this.stateChanges.next()},t}(q);_.decorators=[{type:o.Component,args:[{selector:"mcl-input-datetime",template:'<div class="dateinput">\n <input matInput autocomplete="false" [disabled]="disabled" ngModel\n [readonly]="readonly" [(mclModel)]="maskedValue" [mask]="mask"\n (focus)="focused = true" (blur)="focused = false" [keepMask]="true"\n />\n <mat-datetimepicker [disabled]="disabled || readonly"\n [type]="type" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]="pickerData"></mat-datetimepicker-toggle>\n</div>\n<input class="hidden" [(ngModel)]="value" [matDatetimepicker]="pickerData" />\n',providers:[{provide:c.MatFormFieldControl,useExisting:_}],styles:[".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}"]}]}],_.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]},{type:u.DatetimeAdapter,decorators:[{type:o.Inject,args:[u.DatetimeAdapter]}]},{type:void 0,decorators:[{type:o.Inject,args:[u.MAT_DATETIME_FORMATS]}]}]},_.propDecorators={type:[{type:o.Input}],readonly:[{type:o.Input}],name:[{type:o.Input}],picker:[{type:o.ViewChild,args:["pickerData"]}]};var A=function(){function e(){}return e.prototype.validate=function(e){return e.value&&isNaN(e.value)?{date:!0}:null},e}();A.decorators=[{type:o.Directive,args:[{selector:"[mclInputDatetimeValidator],mcl-input-datetime",providers:[{provide:t.NG_VALIDATORS,useExisting:A,multi:!0}]}]}],A.ctorParameters=function(){return[]};var E={parse:{dateInput:"L",monthInput:"MMMM",timeInput:"LT",datetimeInput:"L LT"},display:{dateInput:"L",monthInput:"MMMM",datetimeInput:"L LT",timeInput:"LT",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY",popupHeaderDateLabel:"ddd, DD MMM"}},B=function(){};B.decorators=[{type:o.NgModule,args:[{declarations:[_,A],imports:[a.CommonModule,l.MatInputModule,t.FormsModule,d.MatDatepickerModule,u.MatDatetimepickerModule,s.MomentDatetimeModule,h.ModelModule],exports:[_,A],providers:[{provide:r.MAT_DATE_LOCALE,useExisting:o.LOCALE_ID},{provide:u.DatetimeAdapter,useClass:s.MomentDatetimeAdapter},{provide:u.MAT_DATETIME_FORMATS,useValue:E}]}]}];var L=function(){function e(t,r,i,a,l,u){this.errorStateMatcher=t,this.ngControl=r,this.parentForm=i,this.changeDetectorRef=a,this.parentFormGroup=l,this.arquivoService=u,this.$disabled=!1,this.$required=!1,this.template="preview",this.selectCancel=new o.EventEmitter,this.stateChanges=new n.Subject,this.change=new o.EventEmitter,this.id="input-fileupload-"+e.nextId++,this.describedBy="",this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"focused",{get:function(){return this.value&&(this.multiple?this.value.find((function(e){return e.loading})):this.value.loading)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"input-fileupload"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.upload=function(e){var t=this;return new n.Observable((function(n){if(!t.validaFormato(e.nome))return e.error={fileFormat:!0},n.error("Formato inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next();if(t.limite){var o=t.parseLimite();if(e.length>o)return e.error={fileSize:{limite:t.limite}},n.error("Tamanho inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next()}t.arquivoService.upload(e.file).subscribe((function(o){"conclusao"===o.type?(e.progresso=void 0,t.multiple?(t.value=V((t.value||[]).map((function(t){return t===e?o.attachment:t}))),t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next()):(t.value=o.attachment,t.onChange(o.attachment),t.change.emit(o.attachment),t.stateChanges.next()),n.next(),n.complete()):"progresso"===o.type&&(e.progresso=o.progresso,t.stateChanges.next())}),(function(o){e.error={fileError:!0},t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next(),n.error(o)}))}))},e.prototype.parseLimite=function(){var e=Number(this.limite.replace(/\D+/g,""));return this.limite.toUpperCase().indexOf("GB")>=0&&(e=1024*e*1024*1024),this.limite.toUpperCase().indexOf("MB")>=0&&(e=1024*e*1024),this.limite.toUpperCase().indexOf("KB")>=0&&(e*=1024),e},e.prototype.validaFormato=function(e){var t,n;if(this.accept){var o=[];o="string"==typeof this.accept?[this.accept]:this.accept;try{for(var r=D(o),i=r.next();!i.done;i=r.next()){var a=i.value;if(e.toLowerCase().indexOf(a.toLowerCase())===e.length-a.length)return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!1}return!0},e.prototype.uploadNext=function(){var e,t,n=this;if(this.multiple){if(this.value)try{for(var o=D(this.value),r=o.next();!r.done;r=o.next()){var i=r.value;if(i.loading&&!i.error){this.upload(i).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}));break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}else this.value&&this.value.loading&&!this.value.error&&this.upload(this.value).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}))},e.prototype.onFileChange=function(e){var t,n;if(this.onTouched(),e.target.files&&e.target.files.length){if(this.multiple){var o=[];try{for(var r=D(e.target.files),i=r.next();!i.done;i=r.next()){var a=i.value;o.push({file:a,loading:!0,nome:a.name,length:a.size})}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.value=V(this.value||[],o),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()}else this.value={file:e.target.files[0],length:e.target.files[0].size,loading:!0,nome:e.target.files[0].name},this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next();this.uploadNext()}else this.selectCancel.emit();e.target.value=""},e.prototype.openFileChooser=function(){this.disabled||this.input.nativeElement.click()},e.prototype.remover=function(e){return t=this,n=void 0,r=function(){return $(this,(function(t){return this.value&&(this.multiple?Array.isArray(this.value)&&(this.value.splice(this.value.indexOf(e),1),this.value.length?(this.value=V(this.value),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())),[2]}))},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function l(e){try{u(r.throw(e))}catch(e){i(e)}}function u(t){t.done?e(t.value):new o((function(e){e(t.value)})).then(a,l)}u((r=r.apply(t,n||[])).next())}));var t,n,o,r},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){e?this.multiple?(this.value=e.map((function(e){return"string"==typeof e?{url:e}:e})),this.stateChanges.next()):"string"==typeof e?(this.value={url:e},this.stateChanges.next()):(this.value=e,this.stateChanges.next()):(this.value=e,this.stateChanges.next())},e}();L.nextId=0,L.decorators=[{type:o.Component,args:[{selector:"mcl-input-fileupload",template:'<div *ngIf="multiple && template == \'chips\'" class="chips">\r\n <mat-chip-list *ngIf="value?.length">\r\n <mat-chip [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}"\r\n *ngFor="let arquivo of value">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n {{ arquivo.nome || arquivo.filename }}\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n<div *ngIf="multiple && template == \'preview\'" class="previews">\r\n <div *ngIf="value?.length" fxLayout="row wrap" fxLayoutGap="20px" fxFlexAlign="center">\r\n <div *ngFor="let arquivo of value">\r\n <div class="preview" [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}">\r\n <mcl-preview-arquivo [group]="value" [arquivo]="arquivo"></mcl-preview-arquivo>\r\n\r\n <div class="footer" *ngIf="!disabled">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n\r\n<div *ngIf="template == \'manual\'">\r\n <input type="file" [disabled]="disabled" (change)="onFileChange($event)" #input\r\n [multiple]="multiple" style="display: none"/>\r\n</div>\r\n\r\n<ng-container *ngIf="!multiple && template != \'manual\'">\r\n <input #input type="file" style="display: none"\r\n (change)="onFileChange($event)"/>\r\n\r\n <div class="input">\r\n <button mat-icon-button type="button"\r\n (click)="openFileChooser()"\r\n *ngIf="!value"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button"\r\n [mclDownloadArquivo]="value"\r\n *ngIf="value && !value.loading && !value.error"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.error" disabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.loading && !value?.error" disabled>\r\n <mat-spinner [value]="value.progresso"\r\n [diameter]="24"></mat-spinner>\r\n </button>\r\n <input matInput readonly (click)="openFileChooser()" [required]="required"\r\n *ngIf="!value" value="Selecione um arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.loading && !value.error" value="Submetendo arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.error" [value]="value?.nome || value?.filename"/>\r\n <input matInput readonly [mclDownloadArquivo]="value" [required]="required"\r\n *ngIf="value && !value.loading" [value]="value?.nome || value?.filename"/>\r\n <button mat-icon-button type="button" matSuffix\r\n matTooltip="Remover" (click)="remover(value)"\r\n *ngIf="value && (!value.loading || value?.error) && !disabled">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n</ng-container>\r\n',providers:[{provide:c.MatFormFieldControl,useExisting:L}],styles:["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}.preview .footer>mat-icon,.preview .footer>mat-spinner,mat-chip>mat-icon,mat-chip>mat-spinner{margin-right:5px;vertical-align:middle}.preview .footer a,mat-chip a{padding:5px}.preview .footer a mat-icon,mat-chip a mat-icon{margin-left:10px;vertical-align:middle}.preview.error,mat-chip.error{color:red}.preview.success,mat-chip.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer a,.preview .footer mat-icon{flex:1}.input{display:flex}.input input{flex:1 1 auto}"]}]}],L.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:o.ChangeDetectorRef},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]},{type:void 0,decorators:[{type:o.Inject,args:[f.ARQUIVO_MANAGER_SERVICE]}]}]},L.propDecorators={multiple:[{type:o.Input}],limite:[{type:o.Input}],accept:[{type:o.Input}],template:[{type:o.Input}],input:[{type:o.ViewChild,args:["input"]}],selectCancel:[{type:o.Output}],stateChanges:[{type:o.Output,args:["change"]}],change:[{type:o.Output}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var N=function(){function e(){}return e.prototype.validate=function(e){if(e.value)if(this.multiple&&Array.isArray(e.value)){var t=e.value.find((function(e){return e.loading&&e.error}));if(t)return t.error;if(e.value.find((function(e){return e.loading})))return{fileUploading:!0}}else{if(e.value.loading&&e.value.error)return e.value.error;if(e.value.loading)return{fileUploading:!0}}},e}();N.decorators=[{type:o.Directive,args:[{selector:"mcl-input-fileupload,[mclFileupload]",providers:[{provide:t.NG_VALIDATORS,useExisting:N,multi:!0}]}]}],N.propDecorators={multiple:[{type:o.Input}]};var G=function(){};G.decorators=[{type:o.NgModule,args:[{declarations:[L,N],exports:[L,N],imports:[a.CommonModule,t.FormsModule,m.MatChipsModule,g.MatProgressSpinnerModule,y.MatIconModule,v.FlexLayoutModule,f.ArquivoModule,b.MatButtonModule,l.MatInputModule,C.MatTooltipModule]}]}];var R=function(){function e(e,t,o){void 0===o&&(o=!1),this.pool=e,this.value=t,this.subject=new n.BehaviorSubject(o)}return Object.defineProperty(e.prototype,"model",{get:function(){return this.pool.model()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observable",{get:function(){return this.subject},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.subject.next(e)},e.prototype.dispose=function(){this.subject.complete()},e.prototype.touched=function(){this.pool.touched()},e}(),z=function(){function e(e){this.name=e,this._nodes=new n.BehaviorSubject([]),this._touch=new n.Subject,this._groups=[],this.lastValues=[]}return e.prototype.model=function(){return this._nodes.pipe(x.switchMap((function(e){return n.combineLatest(e.map((function(e){return e.observable.pipe(x.map((function(t){return{selected:t,value:e.value}})))})))}))).pipe(x.map((function(e){var t=e.filter((function(e){return e.selected})).map((function(e){return e.value}));return t.length?t:void 0})))},e.prototype.touch=function(){return this._touch},e.prototype.all=function(){return this._nodes.pipe(x.switchMap((function(e){return n.combineLatest(e.map((function(e){return e.observable})))}))).pipe(x.map((function(e){var t,n;if(e.length){var o=e[0];try{for(var r=D(e),i=r.next();!i.done;i=r.next()){if(i.value!==o)return}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return o}return!1})))},Object.defineProperty(e.prototype,"empty",{get:function(){return!this._nodes.value.length&&!this._groups.length},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._nodes.complete(),this._touch.complete()},e.prototype.touched=function(){this._touch.next(void 0)},e.prototype.register=function(e){var t=!!this.lastValues&&this.lastValues.indexOf(e)>=0,n=new R(this,e,t);return this._nodes.next(V(this._nodes.value,[n])),n},e.prototype.unregister=function(e){this._nodes.next(this._nodes.value.filter((function(t){return t!==e}))),e.dispose()},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){this._groups.splice(this._groups.indexOf(e),1)},e.prototype.writeValue=function(e){e!==this.lastValues&&(this.lastValues=e||[],e?this._nodes.value.forEach((function(t){t.setSelected(e.indexOf(t.value)>=0)})):this._nodes.value.forEach((function(e){e.setSelected(!1)})))},e.prototype.setAll=function(e){this._nodes.value.forEach((function(t){return t.setSelected(e)}))},e}(),H=function(){function e(){this.nodes={}}return e.prototype.getPool=function(e){return this.nodes[e]||(this.nodes[e]=new z(e)),this.nodes[e]},e.prototype.registerGroup=function(e,t){var n=this.getPool(e);return n.registerGroup(t),n},e.prototype.unregisterGroup=function(e,t){this.nodes[e]&&(this.nodes[e].unregisterGroup(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.unregister=function(e,t){this.nodes[e]&&(this.nodes[e].unregister(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.register=function(e,t){return this.getPool(e).register(t)},e.prototype.setAll=function(e,t){this.nodes[e]&&this.nodes[e].setAll(t)},e.prototype.writeValue=function(e,t){var n;null===(n=this.getPool(e))||void 0===n||n.writeValue(t)},e}();H.decorators=[{type:o.Injectable}];var U=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new o.EventEmitter}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this.pool=this.fotonOptionCheckboxService.getPool(e),this.selected=this.pool.all()},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.pool.touched(),this.fotonOptionCheckboxService.setAll(this.name,e),this.change.emit()},e}();U.decorators=[{type:o.Component,args:[{selector:"mcl-option-checkbox[select-all-option]",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],U.ctorParameters=function(){return[{type:H}]},U.propDecorators={disabled:[{type:o.Input}],change:[{type:o.Output}],name:[{type:o.Input}]};var Y=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new o.EventEmitter}return e.prototype.setSelected=function(e){this.node&&(this.node.touched(),this.node.setSelected(e),this.change.emit())},Object.defineProperty(e.prototype,"value",{get:function(){return this.node?this.node.value:void 0},set:function(e){e!=this.value&&(this.node?this.node.value=e:this._value=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){e===this.name||this.node||(this.node=this.fotonOptionCheckboxService.register(e,this._value),this.selected=this.node.observable,this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.fotonOptionCheckboxService.unregister(this.name,this.node)},e}();Y.decorators=[{type:o.Component,args:[{selector:"mcl-option-checkbox:not([select-all-option])",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],Y.ctorParameters=function(){return[{type:H}]},Y.propDecorators={disabled:[{type:o.Input}],change:[{type:o.Output}],value:[{type:o.Input}],name:[{type:o.Input}]};var W=function(){function e(e){this.optionCheckboxService=e,this.change=new o.EventEmitter,this.touched=new o.EventEmitter,this.onTouchedCallback=function(){},this.onChangeCallback=function(){}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){var t=this;e===this.name||this.pool||(this.pool=this.optionCheckboxService.registerGroup(e,this),this.pool.touch().subscribe((function(){t.onTouchedCallback(),t.touched.emit()})),this.pool.model().subscribe((function(e){clearTimeout(t.callbackTimeout),t.callbackTimeout=setTimeout((function(){t.onChangeCallback(e),t.change.emit(e)}))})),this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.optionCheckboxService.unregisterGroup(this.name,this)},e.prototype.writeValue=function(e){this.optionCheckboxService.writeValue(this.name,e)},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e}();W.decorators=[{type:o.Component,args:[{selector:"mcl-option-checkbox-group",template:"",providers:[{provide:t.NG_VALUE_ACCESSOR,useExisting:W,multi:!0}]}]}],W.ctorParameters=function(){return[{type:H}]},W.propDecorators={disabled:[{type:o.Input}],change:[{type:o.Output}],touched:[{type:o.Output}],name:[{type:o.Input}]};var K=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[H]}},e}();K.decorators=[{type:o.NgModule,args:[{declarations:[Y,U,W],exports:[Y,U,W],imports:[a.CommonModule,t.FormsModule,O.MatCheckboxModule]}]}];var Q=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Q.decorators=[{type:o.Component,args:[{selector:"mcl-select-item",template:"",styles:[""]}]}],Q.ctorParameters=function(){return[]},Q.propDecorators={label:[{type:o.Input}],value:[{type:o.Input}]};var J=function(){function e(o,r,i,a){var l=this;this.errorStateMatcher=o,this.ngControl=r,this.parentForm=i,this.parentFormGroup=a,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.focused=!1,this.filterCtrl=new t.FormControl,this.stateChanges=new n.Subject,this.id="select-chips-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.opcoesFiltradas=this.filterCtrl.valueChanges.pipe(x.startWith(null),x.map((function(e){return l._filter(e)})))}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e,this.filterCtrl.setValue(this.filterCtrl.value)},e.prototype.add=function(e){this.onTouched();var t=e.input,n=e.value,o=I.StringUtil.normalize(n||""),r=this.opcoes.toArray().find((function(e){return I.StringUtil.normalize(e.label)===o}));r&&(this.value&&this.value.find((function(e){return e===r.value}))||(this.value=V(this.value||[],[r.value]),this.onChange(this.value)),t&&(t.value=""),this.filterCtrl.setValue(null))},e.prototype.remove=function(e){if(this.onTouched(),this.value){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.value.length||(this.value=void 0),this.onChange(this.value)}},e.prototype.selected=function(e){this.onTouched(),this.value&&this.value.find((function(t){return t===e.option.value}))||(this.value=V(this.value||[],[e.option.value]),this.onChange(this.value)),this.filterInput.nativeElement.value="",this.filterCtrl.setValue(null)},e.prototype._filter=function(e){var t=this,n=e&&I.StringUtil.normalize(e);return this.opcoes.toArray().filter((function(e){return!t.value||t.value.indexOf(e.value)<0})).filter((function(e){return!n||I.StringUtil.normalize(e.label).indexOf(n)>=0}))},e}();J.nextId=0,J.decorators=[{type:o.Component,args:[{selector:"mcl-select-chips",template:'<mat-chip-list #chipList >\n <mat-chip\n *ngFor="let item of value"\n [removable]="!disabled"\n (removed)="remove(item)">\n {{item}}\n <mat-icon matChipRemove *ngIf="!disabled" >cancel</mat-icon>\n </mat-chip>\n <input\n [placeholder]="placeholder"\n #filterInput required\n (focusin)="focused = true"\n (focusout)="focused = false"\n [formControl]="filterCtrl"\n [matAutocomplete]="filterAutocomplete"\n [matChipInputFor]="chipList"\n (matChipInputTokenEnd)="add($event)">\n</mat-chip-list>\n<mat-autocomplete #filterAutocomplete="matAutocomplete" (optionSelected)="selected($event)">\n <mat-option *ngFor="let opcao of opcoesFiltradas | async" [value]="opcao.value">\n {{opcao.label}}\n </mat-option>\n</mat-autocomplete>\n',providers:[{provide:c.MatFormFieldControl,useExisting:J}],styles:[""]}]}],J.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},J.propDecorators={input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],filterInput:[{type:o.ViewChild,args:["filterInput"]}],filterAutocomplete:[{type:o.ViewChild,args:["filterAutocomplete"]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var X=function(){};X.decorators=[{type:o.NgModule,args:[{declarations:[Q],exports:[Q],imports:[a.CommonModule]}]}];var Z=function(){};Z.decorators=[{type:o.NgModule,args:[{declarations:[J],exports:[J,X],imports:[a.CommonModule,m.MatChipsModule,y.MatIconModule,t.ReactiveFormsModule,M.MatAutocompleteModule,X]}]}];var ee=function(){function e(r,i,a,l){var u=this;this.errorStateMatcher=r,this.ngControl=i,this.parentForm=a,this.parentFormGroup=l,this.$disabled=!1,this.$required=!1,this.focused=!1,this.filterCtrl=new t.FormControl,this.stateChanges=new n.Subject,this.id="select-chips-autocomplete-"+e.nextId++,this.describedBy="",this.search=new o.EventEmitter,this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.filterCtrl.valueChanges.pipe(x.startWith(null),x.map((function(e){return u._filter(e)})))}return e.prototype.ngAfterViewInit=function(){var e=this;this.opcoesFiltradas=this.opcoes.changes.pipe(x.map((function(){return e.opcoes.toArray()})))},Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips-autocomplete"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e,this.filterCtrl.setValue(this.filterCtrl.value)},e.prototype.add=function(e){this.onTouched();var t=e.input,n=e.value,o=I.StringUtil.normalize(n||""),r=this.opcoes.toArray().find((function(e){return I.StringUtil.normalize(e.label)===o}));r&&(this.value&&this.value.find((function(e){return e===r.value}))||(this.value=V(this.value||[],[r.value]),this.onChange(this.value)),t&&(t.value=""),this.filterCtrl.setValue(null))},e.prototype.remove=function(e){if(this.onTouched(),this.value){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.value.length||(this.value=void 0),this.onChange(this.value)}},e.prototype.selected=function(e){this.onTouched(),this.value&&this.value.find((function(t){return t===e.option.value}))||(this.value=V(this.value||[],[e.option.value]),this.onChange(this.value)),this.filterInput.nativeElement.value="",this.filterCtrl.setValue(null)},e.prototype._filter=function(e){this.search.emit(e)},e}();ee.nextId=0,ee.decorators=[{type:o.Component,args:[{selector:"mcl-select-chips-autocomplete",template:'<mat-chip-list #chipList >\n <mat-chip\n *ngFor="let item of value"\n [removable]="!disabled"\n (removed)="remove(item)">\n {{item}}\n <mat-icon matChipRemove *ngIf="!disabled" >cancel</mat-icon>\n </mat-chip>\n <input\n [placeholder]="placeholder"\n #filterInput required\n (focusin)="focused = true"\n (focusout)="focused = false"\n [formControl]="filterCtrl"\n [matAutocomplete]="filterAutocomplete"\n [matChipInputFor]="chipList"\n (matChipInputTokenEnd)="add($event)">\n</mat-chip-list>\n<mat-autocomplete #filterAutocomplete="matAutocomplete" (optionSelected)="selected($event)">\n <mat-option *ngFor="let opcao of opcoesFiltradas | async" [value]="opcao.value">\n {{opcao.label}}\n </mat-option>\n</mat-autocomplete>\n',providers:[{provide:c.MatFormFieldControl,useExisting:ee}],styles:[""]}]}],ee.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},ee.propDecorators={input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],filterInput:[{type:o.ViewChild,args:["filterInput"]}],filterAutocomplete:[{type:o.ViewChild,args:["filterAutocomplete"]}],search:[{type:o.Output}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var te=function(){};te.decorators=[{type:o.NgModule,args:[{declarations:[ee],exports:[ee,X],imports:[a.CommonModule,y.MatIconModule,t.ReactiveFormsModule,M.MatAutocompleteModule,X,m.MatChipsModule]}]}];var ne=function(){function e(t,o,r,i){this.errorStateMatcher=t,this.ngControl=o,this.parentForm=r,this.parentFormGroup=i,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="grid",this.layoutColumns=3,this.stateChanges=new n.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return e.prototype.ngAfterViewInit=function(){var e=this;this.opcoes.changes.subscribe((function(){e.updateOpcoes()}))},Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.updateOpcoes(e),this.$value=e},e.prototype.change=function(e,t){e._selected=t,this.value=this.opcoesToValue()},e.prototype.updateOpcoes=function(e){var t,n;void 0===e&&(e=this.value);try{for(var o=D(this.opcoes),r=o.next();!r.done;r=o.next()){var i=r.value;i._selected=e&&e.indexOf(i.value)>=0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.opcoesToValue=function(){var e,t,n=[];try{for(var o=D(this.opcoes),r=o.next();!r.done;r=o.next()){var i=r.value;i._selected&&n.push(i.value)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n.length?n:void 0},e}();ne.nextId=0,ne.decorators=[{type:o.Component,args:[{selector:"mcl-select-many-checkbox",template:"<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? (((opcoes.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"opcao._selected\"\n (change)=\"change(opcao, $event.checked)\"\n *ngFor=\"let opcao of opcoes\">\n {{opcao.label}}\n </mat-checkbox>\n\n</div>\n",providers:[{provide:c.MatFormFieldControl,useExisting:ne}],styles:[".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.grid,.mat-checkbox-container.vertical{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width:750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.grid,.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical{flex-direction:column}}"]}]}],ne.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},ne.propDecorators={layout:[{type:o.Input}],layoutColumns:[{type:o.Input}],input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var oe=function(){};oe.decorators=[{type:o.NgModule,args:[{declarations:[ne],exports:[ne,X],imports:[a.CommonModule,t.FormsModule,X,O.MatCheckboxModule]}]}];var re=function(){function e(t,o,r,i){this.errorStateMatcher=t,this.ngControl=o,this.parentForm=r,this.parentFormGroup=i,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="vertical",this.stateChanges=new n.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e},e}();re.nextId=0,re.decorators=[{type:o.Component,args:[{selector:"mcl-select-radio",template:'<mat-radio-group\n [ngClass]="{\'vertical\':layout === \'vertical\',\'horizontal\':layout ===\'horizontal\'}"\n [required]="required"\n [disabled]="disabled"\n [(ngModel)]="value">\n <mat-radio-button *ngFor="let opcao of opcoes"\n [value]="opcao.value">{{opcao.label}}</mat-radio-button>\n</mat-radio-group>\n',providers:[{provide:c.MatFormFieldControl,useExisting:re}],styles:["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width:750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}"]}]}],re.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},re.propDecorators={layout:[{type:o.Input}],input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var ie=function(){};ie.decorators=[{type:o.NgModule,args:[{declarations:[re],exports:[re,X],imports:[a.CommonModule,t.FormsModule,X,w.MatRadioModule]}]}];var ae=function(e){function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a.preferredContries=["br"],a.blur=new o.EventEmitter,a.alwaysShowCountry=!1,a}return j(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.$innerValue},set:function(e){this.$innerValue=e,this.stateChanges.next(),this.onChange(null==e?void 0:e.replace(/[^\d+]/g,""))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty||this.alwaysShowCountry},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),t.prototype.onFocus=function(){this.focused=!0,this.stateChanges.next()},t.prototype.onBlur=function(){this.focused=!1,this.stateChanges.next(),this.blur.emit()},t.prototype.writeValue=function(e){this.value=e},t}(q);ae.decorators=[{type:o.Component,args:[{selector:"mcl-input-telefone-intl",template:'<div class="input">\n <lac-mat-country-selector\n [ngClass]="{\'hidden\': !focused && !value && !alwaysShowCountry}"\n [preferredCountries]="preferredContries"\n [selectorFor]="input"\n searchPlaceholder="Filtrar paises..."></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]="value"\n (focusin)="onFocus()" (focusout)="onBlur()"></lac-mat-tel-input>\n</div>\n',providers:[{provide:c.MatFormFieldControl,useExisting:ae}],styles:[".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}"]}]}],ae.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},ae.propDecorators={preferredContries:[{type:o.Input}],readonly:[{type:o.Input}],blur:[{type:o.Output}],alwaysShowCountry:[{type:o.Input}],telInput:[{type:o.ViewChild,args:["input"]}]};var le=function(){function e(){}return e.prototype.validate=function(e){return F.phoneNumberValidator(e)},e}();le.decorators=[{type:o.Directive,args:[{selector:"mcl-input-telefone-intl,[mclInputTelefoneIntl]",providers:[{provide:t.NG_VALIDATORS,useExisting:le,multi:!0}]}]}],le.ctorParameters=function(){return[]};var ue=function(){};ue.decorators=[{type:o.NgModule,args:[{declarations:[ae,le],exports:[ae,le],imports:[a.CommonModule,t.FormsModule,F.LacMatTelInputModule]}]}],e.AbstractMatFormFieldControl=q,e.AllOptionCheckboxComponent=U,e.InputDatetimeComponent=_,e.InputDatetimeModule=B,e.InputFileUploadComponent=L,e.InputFileUploadValidatorDirective=N,e.InputFileuploadModule=G,e.InputTelefoneInternacionalComponent=ae,e.InputTelefoneInternacionalModule=ue,e.InputTelefoneInternacionalValidatorDirective=le,e.OptionCheckboxComponent=Y,e.OptionCheckboxGroupComponent=W,e.OptionCheckboxModule=K,e.SelectChipsAutocompleteComponent=ee,e.SelectChipsAutocompleteModule=te,e.SelectChipsComponent=J,e.SelectChipsModule=Z,e.SelectItemComponent=Q,e.SelectItemModule=X,e.SelectManyCheckboxComponent=ne,e.SelectManyCheckboxModule=oe,e.SelectRadioComponent=re,e.SelectRadioModule=ie,e.ɵ0=E,e.ɵa=A,e.ɵb=H,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
|
+
var P=function(e,t){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function j(e,t){function n(){this.constructor=e}P(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function $(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[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,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}function D(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function T(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function V(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(T(arguments[t]));return e}var _=function(e){function t(t,n,o,r,i,a){var l=e.call(this,t,n,o,r)||this;return l.adapter=i,l.formats=a,l.type="date",l}return j(t,e),Object.defineProperty(t.prototype,"empty",{get:function(){return!this.$maskedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maskedValue",{get:function(){return this.$maskedValue},set:function(e){this.$maskedValue!==e&&(this.onTouched(),this.$maskedValue=e,e&&e.match(new RegExp("^"+this.mask.replace(/#/g,"\\d")+"$"))?this.innerValue=this.adapter.parse(e,this.format).toDate():this.innerValue=void 0,this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mask",{get:function(){switch(this.type){case"date":return"##/##/####";case"time":return"##:##"}return"##/##/#### ##:##"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){switch(this.type){case"date":return this.formats.display.dateInput;case"time":return this.formats.display.timeInput}return this.formats.display.datetimeInput},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.innerValue},set:function(e){this.innerValue!==e&&(this.onTouched(),e?(this.innerValue=e instanceof Date?e:e.toDate(),this.$maskedValue=this.adapter.format(k(this.innerValue),this.format)):(this.innerValue=void 0,this.$maskedValue=""),this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),t.prototype.writeValue=function(e){this.innerValue=e,this.$maskedValue=e?this.adapter.format(k(e),this.format):"",this.stateChanges.next()},t}(q);_.decorators=[{type:o.Component,args:[{selector:"mcl-input-datetime",template:'<div class="dateinput">\n <input matInput autocomplete="false" [disabled]="disabled" ngModel\n [readonly]="readonly" [(mclModel)]="maskedValue" [mask]="mask"\n (focus)="focused = true" (blur)="focused = false" [keepMask]="true"\n />\n <mat-datetimepicker [disabled]="disabled || readonly"\n [type]="type" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]="pickerData"></mat-datetimepicker-toggle>\n</div>\n<input class="hidden" [(ngModel)]="value" [matDatetimepicker]="pickerData" />\n',providers:[{provide:c.MatFormFieldControl,useExisting:_}],styles:[".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}"]}]}],_.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]},{type:u.DatetimeAdapter,decorators:[{type:o.Inject,args:[u.DatetimeAdapter]}]},{type:void 0,decorators:[{type:o.Inject,args:[u.MAT_DATETIME_FORMATS]}]}]},_.propDecorators={type:[{type:o.Input}],readonly:[{type:o.Input}],name:[{type:o.Input}],picker:[{type:o.ViewChild,args:["pickerData"]}]};var A=function(){function e(){}return e.prototype.validate=function(e){return e.value&&isNaN(e.value)?{date:!0}:null},e}();A.decorators=[{type:o.Directive,args:[{selector:"[mclInputDatetimeValidator],mcl-input-datetime",providers:[{provide:t.NG_VALIDATORS,useExisting:A,multi:!0}]}]}],A.ctorParameters=function(){return[]};var E={parse:{dateInput:"L",monthInput:"MMMM",timeInput:"LT",datetimeInput:"L LT"},display:{dateInput:"L",monthInput:"MMMM",datetimeInput:"L LT",timeInput:"LT",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY",popupHeaderDateLabel:"ddd, DD MMM"}},B=function(){};B.decorators=[{type:o.NgModule,args:[{declarations:[_,A],imports:[a.CommonModule,l.MatInputModule,t.FormsModule,d.MatDatepickerModule,u.MatDatetimepickerModule,s.MomentDatetimeModule,h.ModelModule],exports:[_,A],providers:[{provide:r.MAT_DATE_LOCALE,useExisting:o.LOCALE_ID},{provide:u.DatetimeAdapter,useClass:s.MomentDatetimeAdapter},{provide:u.MAT_DATETIME_FORMATS,useValue:E}]}]}];var L=function(){function e(t,r,i,a,l,u){this.errorStateMatcher=t,this.ngControl=r,this.parentForm=i,this.changeDetectorRef=a,this.parentFormGroup=l,this.arquivoService=u,this.$disabled=!1,this.$required=!1,this.template="preview",this.selectCancel=new o.EventEmitter,this.stateChanges=new n.Subject,this.change=new o.EventEmitter,this.id="input-fileupload-"+e.nextId++,this.describedBy="",this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"focused",{get:function(){return this.value&&(this.multiple?this.value.find((function(e){return e.loading})):this.value.loading)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"input-fileupload"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.upload=function(e){var t=this;return new n.Observable((function(n){if(!t.validaFormato(e.nome))return e.error={fileFormat:!0},n.error("Formato inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next();if(t.limite){var o=t.parseLimite();if(e.length>o)return e.error={fileSize:{limite:t.limite}},n.error("Tamanho inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next()}t.arquivoService.upload(e.file).subscribe((function(o){"conclusao"===o.type?(e.progresso=void 0,t.multiple?(t.value=V((t.value||[]).map((function(t){return t===e?o.attachment:t}))),t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next()):(t.value=o.attachment,t.onChange(o.attachment),t.change.emit(o.attachment),t.stateChanges.next()),n.next(),n.complete()):"progresso"===o.type&&(e.progresso=o.progresso,t.stateChanges.next())}),(function(o){e.error={fileError:!0},t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next(),n.error(o)}))}))},e.prototype.parseLimite=function(){var e=Number(this.limite.replace(/\D+/g,""));return this.limite.toUpperCase().indexOf("GB")>=0&&(e=1024*e*1024*1024),this.limite.toUpperCase().indexOf("MB")>=0&&(e=1024*e*1024),this.limite.toUpperCase().indexOf("KB")>=0&&(e*=1024),e},e.prototype.validaFormato=function(e){var t,n;if(this.accept){var o=[];o="string"==typeof this.accept?[this.accept]:this.accept;try{for(var r=D(o),i=r.next();!i.done;i=r.next()){var a=i.value;if(e.toLowerCase().indexOf(a.toLowerCase())===e.length-a.length)return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!1}return!0},e.prototype.uploadNext=function(){var e,t,n=this;if(this.multiple){if(this.value)try{for(var o=D(this.value),r=o.next();!r.done;r=o.next()){var i=r.value;if(i.loading&&!i.error){this.upload(i).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}));break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}else this.value&&this.value.loading&&!this.value.error&&this.upload(this.value).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}))},e.prototype.onFileChange=function(e){var t,n;if(this.onTouched(),e.target.files&&e.target.files.length){if(this.multiple){var o=[];try{for(var r=D(e.target.files),i=r.next();!i.done;i=r.next()){var a=i.value;o.push({file:a,loading:!0,nome:a.name,length:a.size})}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.value=V(this.value||[],o),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()}else this.value={file:e.target.files[0],length:e.target.files[0].size,loading:!0,nome:e.target.files[0].name},this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next();this.uploadNext()}else this.selectCancel.emit();e.target.value=""},e.prototype.openFileChooser=function(){this.disabled||this.input.nativeElement.click()},e.prototype.remover=function(e){return t=this,n=void 0,r=function(){return $(this,(function(t){return this.value&&(this.multiple?Array.isArray(this.value)&&(this.value.splice(this.value.indexOf(e),1),this.value.length?(this.value=V(this.value),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())),[2]}))},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function l(e){try{u(r.throw(e))}catch(e){i(e)}}function u(t){t.done?e(t.value):new o((function(e){e(t.value)})).then(a,l)}u((r=r.apply(t,n||[])).next())}));var t,n,o,r},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){e?this.multiple?(this.value=e.map((function(e){return"string"==typeof e?{url:e}:e})),this.stateChanges.next()):"string"==typeof e?(this.value={url:e},this.stateChanges.next()):(this.value=e,this.stateChanges.next()):(this.value=e,this.stateChanges.next())},e}();L.nextId=0,L.decorators=[{type:o.Component,args:[{selector:"mcl-input-fileupload",template:'<div *ngIf="multiple && template == \'chips\'" class="chips">\r\n <mat-chip-list *ngIf="value?.length">\r\n <mat-chip [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}"\r\n *ngFor="let arquivo of value">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n {{ arquivo.nome || arquivo.filename }}\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n<div *ngIf="multiple && template == \'preview\'" class="previews">\r\n <div *ngIf="value?.length" fxLayout="row wrap" fxLayoutGap="20px" fxFlexAlign="center">\r\n <div *ngFor="let arquivo of value">\r\n <div class="preview" [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}">\r\n <mcl-preview-arquivo [group]="value" [arquivo]="arquivo"></mcl-preview-arquivo>\r\n\r\n <div class="footer" *ngIf="!disabled">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n\r\n<div *ngIf="template == \'manual\'">\r\n <input type="file" [disabled]="disabled" (change)="onFileChange($event)" #input\r\n [multiple]="multiple" style="display: none"/>\r\n</div>\r\n\r\n<ng-container *ngIf="!multiple && template != \'manual\'">\r\n <input #input type="file" style="display: none"\r\n (change)="onFileChange($event)"/>\r\n\r\n <div class="input">\r\n <button mat-icon-button type="button"\r\n (click)="openFileChooser()"\r\n *ngIf="!value"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button"\r\n [mclDownloadArquivo]="value"\r\n *ngIf="value && !value.loading && !value.error"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.error" disabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.loading && !value?.error" disabled>\r\n <mat-spinner [value]="value.progresso"\r\n [diameter]="24"></mat-spinner>\r\n </button>\r\n <input matInput readonly (click)="openFileChooser()" [required]="required"\r\n *ngIf="!value" value="Selecione um arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.loading && !value.error" value="Submetendo arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.error" [value]="value?.nome || value?.filename"/>\r\n <input matInput readonly [mclDownloadArquivo]="value" [required]="required"\r\n *ngIf="value && !value.loading" [value]="value?.nome || value?.filename"/>\r\n <button mat-icon-button type="button" matSuffix\r\n matTooltip="Remover" (click)="remover(value)"\r\n *ngIf="value && (!value.loading || value?.error) && !disabled">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n</ng-container>\r\n',providers:[{provide:c.MatFormFieldControl,useExisting:L}],styles:["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}.preview .footer>mat-icon,.preview .footer>mat-spinner,mat-chip>mat-icon,mat-chip>mat-spinner{margin-right:5px;vertical-align:middle}.preview .footer a,mat-chip a{padding:5px}.preview .footer a mat-icon,mat-chip a mat-icon{margin-left:10px;vertical-align:middle}.preview.error,mat-chip.error{color:red}.preview.success,mat-chip.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer a,.preview .footer mat-icon{flex:1}.input{display:flex}.input input{flex:1 1 auto}"]}]}],L.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:o.ChangeDetectorRef},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]},{type:void 0,decorators:[{type:o.Inject,args:[f.ARQUIVO_MANAGER_SERVICE]}]}]},L.propDecorators={multiple:[{type:o.Input}],limite:[{type:o.Input}],accept:[{type:o.Input}],template:[{type:o.Input}],input:[{type:o.ViewChild,args:["input"]}],selectCancel:[{type:o.Output}],stateChanges:[{type:o.Output,args:["change"]}],change:[{type:o.Output}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var N=function(){function e(){}return e.prototype.validate=function(e){if(e.value)if(this.multiple&&Array.isArray(e.value)){var t=e.value.find((function(e){return e.loading&&e.error}));if(t)return t.error;if(e.value.find((function(e){return e.loading})))return{fileUploading:!0}}else{if(e.value.loading&&e.value.error)return e.value.error;if(e.value.loading)return{fileUploading:!0}}},e}();N.decorators=[{type:o.Directive,args:[{selector:"mcl-input-fileupload,[mclFileupload]",providers:[{provide:t.NG_VALIDATORS,useExisting:N,multi:!0}]}]}],N.propDecorators={multiple:[{type:o.Input}]};var G=function(){};G.decorators=[{type:o.NgModule,args:[{declarations:[L,N],exports:[L,N],imports:[a.CommonModule,t.FormsModule,m.MatChipsModule,g.MatProgressSpinnerModule,y.MatIconModule,v.FlexLayoutModule,f.ArquivoModule,b.MatButtonModule,l.MatInputModule,C.MatTooltipModule]}]}];var R=function(){function e(e,t,o){void 0===o&&(o=!1),this.pool=e,this.value=t,this.subject=new n.BehaviorSubject(o)}return Object.defineProperty(e.prototype,"model",{get:function(){return this.pool.model()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observable",{get:function(){return this.subject},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.subject.next(e)},e.prototype.dispose=function(){this.subject.complete()},e.prototype.touched=function(){this.pool.touched()},e}(),z=function(){function e(e){this.name=e,this._nodes=new n.BehaviorSubject([]),this._touch=new n.Subject,this._groups=[],this.lastValues=[]}return e.prototype.model=function(){return this._nodes.pipe(x.switchMap((function(e){return n.combineLatest(e.map((function(e){return e.observable.pipe(x.map((function(t){return{selected:t,value:e.value}})))})))}))).pipe(x.map((function(e){var t=e.filter((function(e){return e.selected})).map((function(e){return e.value}));return t.length?t:void 0})))},e.prototype.touch=function(){return this._touch},e.prototype.all=function(){return this._nodes.pipe(x.switchMap((function(e){return n.combineLatest(e.map((function(e){return e.observable})))}))).pipe(x.map((function(e){var t,n;if(e.length){var o=e[0];try{for(var r=D(e),i=r.next();!i.done;i=r.next()){if(i.value!==o)return}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return o}return!1})))},Object.defineProperty(e.prototype,"empty",{get:function(){return!this._nodes.value.length&&!this._groups.length},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._nodes.complete(),this._touch.complete()},e.prototype.touched=function(){this._touch.next(void 0)},e.prototype.register=function(e){var t=!!this.lastValues&&this.lastValues.indexOf(e)>=0,n=new R(this,e,t);return this._nodes.next(V(this._nodes.value,[n])),n},e.prototype.unregister=function(e){this._nodes.next(this._nodes.value.filter((function(t){return t!==e}))),e.dispose()},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){this._groups.splice(this._groups.indexOf(e),1)},e.prototype.writeValue=function(e){e!==this.lastValues&&(this.lastValues=e||[],e?this._nodes.value.forEach((function(t){t.setSelected(e.indexOf(t.value)>=0)})):this._nodes.value.forEach((function(e){e.setSelected(!1)})))},e.prototype.setAll=function(e){this._nodes.value.forEach((function(t){return t.setSelected(e)}))},e}(),H=function(){function e(){this.nodes={}}return e.prototype.getPool=function(e){return this.nodes[e]||(this.nodes[e]=new z(e)),this.nodes[e]},e.prototype.registerGroup=function(e,t){var n=this.getPool(e);return n.registerGroup(t),n},e.prototype.unregisterGroup=function(e,t){this.nodes[e]&&(this.nodes[e].unregisterGroup(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.unregister=function(e,t){this.nodes[e]&&(this.nodes[e].unregister(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.register=function(e,t){return this.getPool(e).register(t)},e.prototype.setAll=function(e,t){this.nodes[e]&&this.nodes[e].setAll(t)},e.prototype.writeValue=function(e,t){var n;null===(n=this.getPool(e))||void 0===n||n.writeValue(t)},e}();H.decorators=[{type:o.Injectable}];var U=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new o.EventEmitter}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this.pool=this.fotonOptionCheckboxService.getPool(e),this.selected=this.pool.all()},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.pool.touched(),this.fotonOptionCheckboxService.setAll(this.name,e),this.change.emit()},e}();U.decorators=[{type:o.Component,args:[{selector:"mcl-option-checkbox[select-all-option]",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],U.ctorParameters=function(){return[{type:H}]},U.propDecorators={disabled:[{type:o.Input}],change:[{type:o.Output}],name:[{type:o.Input}]};var Y=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new o.EventEmitter}return e.prototype.setSelected=function(e){this.node&&(this.node.touched(),this.node.setSelected(e),this.change.emit())},Object.defineProperty(e.prototype,"value",{get:function(){return this.node?this.node.value:void 0},set:function(e){e!=this.value&&(this.node?this.node.value=e:this._value=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){e===this.name||this.node||(this.node=this.fotonOptionCheckboxService.register(e,this._value),this.selected=this.node.observable,this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.fotonOptionCheckboxService.unregister(this.name,this.node)},e}();Y.decorators=[{type:o.Component,args:[{selector:"mcl-option-checkbox:not([select-all-option])",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],Y.ctorParameters=function(){return[{type:H}]},Y.propDecorators={disabled:[{type:o.Input}],change:[{type:o.Output}],value:[{type:o.Input}],name:[{type:o.Input}]};var W=function(){function e(e){this.optionCheckboxService=e,this.change=new o.EventEmitter,this.touched=new o.EventEmitter,this.onTouchedCallback=function(){},this.onChangeCallback=function(){}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){var t=this;e===this.name||this.pool||(this.pool=this.optionCheckboxService.registerGroup(e,this),this.pool.touch().subscribe((function(){t.onTouchedCallback(),t.touched.emit()})),this.pool.model().subscribe((function(e){clearTimeout(t.callbackTimeout),t.callbackTimeout=setTimeout((function(){t.onChangeCallback(e),t.change.emit(e)}))})),this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.optionCheckboxService.unregisterGroup(this.name,this)},e.prototype.writeValue=function(e){this.optionCheckboxService.writeValue(this.name,e)},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e}();W.decorators=[{type:o.Component,args:[{selector:"mcl-option-checkbox-group",template:"",providers:[{provide:t.NG_VALUE_ACCESSOR,useExisting:W,multi:!0}]}]}],W.ctorParameters=function(){return[{type:H}]},W.propDecorators={disabled:[{type:o.Input}],change:[{type:o.Output}],touched:[{type:o.Output}],name:[{type:o.Input}]};var K=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[H]}},e}();K.decorators=[{type:o.NgModule,args:[{declarations:[Y,U,W],exports:[Y,U,W],imports:[a.CommonModule,t.FormsModule,O.MatCheckboxModule]}]}];var Q=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();Q.decorators=[{type:o.Component,args:[{selector:"mcl-select-item",template:"",styles:[""]}]}],Q.ctorParameters=function(){return[]},Q.propDecorators={label:[{type:o.Input}],value:[{type:o.Input}]};var J=function(){function e(o,r,i,a){var l=this;this.errorStateMatcher=o,this.ngControl=r,this.parentForm=i,this.parentFormGroup=a,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.focused=!1,this.filterCtrl=new t.FormControl,this.stateChanges=new n.Subject,this.id="select-chips-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.opcoesFiltradas=this.filterCtrl.valueChanges.pipe(x.startWith(null),x.map((function(e){return l._filter(e)})))}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e,this.filterCtrl.setValue(this.filterCtrl.value)},e.prototype.add=function(e){this.onTouched();var t=e.input,n=e.value,o=I.StringUtil.normalize(n||""),r=this.opcoes.toArray().find((function(e){return I.StringUtil.normalize(e.label)===o}));r&&(this.value&&this.value.find((function(e){return e===r.value}))||(this.value=V(this.value||[],[r.value]),this.onChange(this.value)),t&&(t.value=""),this.filterCtrl.setValue(null))},e.prototype.remove=function(e){if(this.onTouched(),this.value){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.value.length||(this.value=void 0),this.onChange(this.value)}},e.prototype.selected=function(e){this.onTouched(),this.value&&this.value.find((function(t){return t===e.option.value}))||(this.value=V(this.value||[],[e.option.value]),this.onChange(this.value)),this.filterInput.nativeElement.value="",this.filterCtrl.setValue(null)},e.prototype._filter=function(e){var t=this,n=e&&I.StringUtil.normalize(e);return this.opcoes.toArray().filter((function(e){return!t.value||t.value.indexOf(e.value)<0})).filter((function(e){return!n||I.StringUtil.normalize(e.label).indexOf(n)>=0}))},e}();J.nextId=0,J.decorators=[{type:o.Component,args:[{selector:"mcl-select-chips",template:'<mat-chip-list #chipList >\n <mat-chip\n *ngFor="let item of value"\n [removable]="!disabled"\n (removed)="remove(item)">\n {{item}}\n <mat-icon matChipRemove *ngIf="!disabled" >cancel</mat-icon>\n </mat-chip>\n <input\n [placeholder]="placeholder"\n #filterInput required\n (focusin)="focused = true"\n (focusout)="focused = false"\n [formControl]="filterCtrl"\n [matAutocomplete]="filterAutocomplete"\n [matChipInputFor]="chipList"\n (matChipInputTokenEnd)="add($event)">\n</mat-chip-list>\n<mat-autocomplete #filterAutocomplete="matAutocomplete" (optionSelected)="selected($event)">\n <mat-option *ngFor="let opcao of opcoesFiltradas | async" [value]="opcao.value">\n {{opcao.label}}\n </mat-option>\n</mat-autocomplete>\n',providers:[{provide:c.MatFormFieldControl,useExisting:J}],styles:[""]}]}],J.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},J.propDecorators={input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],filterInput:[{type:o.ViewChild,args:["filterInput"]}],filterAutocomplete:[{type:o.ViewChild,args:["filterAutocomplete"]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var X=function(){};X.decorators=[{type:o.NgModule,args:[{declarations:[Q],exports:[Q],imports:[a.CommonModule]}]}];var Z=function(){};Z.decorators=[{type:o.NgModule,args:[{declarations:[J],exports:[J,X],imports:[a.CommonModule,m.MatChipsModule,y.MatIconModule,t.ReactiveFormsModule,M.MatAutocompleteModule,X]}]}];var ee=function(){function e(r,i,a,l){var u=this;this.errorStateMatcher=r,this.ngControl=i,this.parentForm=a,this.parentFormGroup=l,this.$disabled=!1,this.$required=!1,this.focused=!1,this.filterCtrl=new t.FormControl,this.stateChanges=new n.Subject,this.id="select-chips-autocomplete-"+e.nextId++,this.describedBy="",this.search=new o.EventEmitter,this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.filterCtrl.valueChanges.pipe(x.startWith(null),x.map((function(e){return u._filter(e)})))}return e.prototype.ngAfterViewInit=function(){var e=this;this.opcoesFiltradas=this.opcoes.changes.pipe(x.map((function(){return e.opcoes.toArray()})))},Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips-autocomplete"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e,this.filterCtrl.setValue(this.filterCtrl.value)},e.prototype.add=function(e){this.onTouched();var t=e.input,n=e.value,o=I.StringUtil.normalize(n||""),r=this.opcoes.toArray().find((function(e){return I.StringUtil.normalize(e.label)===o}));r&&(this.value&&this.value.find((function(e){return e===r.value}))||(this.value=V(this.value||[],[r.value]),this.onChange(this.value)),t&&(t.value=""),this.filterCtrl.setValue(null))},e.prototype.remove=function(e){if(this.onTouched(),this.value){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.value.length||(this.value=void 0),this.onChange(this.value)}},e.prototype.selected=function(e){this.onTouched(),this.value&&this.value.find((function(t){return t===e.option.value}))||(this.value=V(this.value||[],[e.option.value]),this.onChange(this.value)),this.filterInput.nativeElement.value="",this.filterCtrl.setValue(null)},e.prototype._filter=function(e){this.search.emit(e)},e}();ee.nextId=0,ee.decorators=[{type:o.Component,args:[{selector:"mcl-select-chips-autocomplete",template:'<mat-chip-list #chipList >\n <mat-chip\n *ngFor="let item of value"\n [removable]="!disabled"\n (removed)="remove(item)">\n {{item}}\n <mat-icon matChipRemove *ngIf="!disabled" >cancel</mat-icon>\n </mat-chip>\n <input\n [placeholder]="placeholder"\n #filterInput required\n (focusin)="focused = true"\n (focusout)="focused = false"\n [formControl]="filterCtrl"\n [matAutocomplete]="filterAutocomplete"\n [matChipInputFor]="chipList"\n (matChipInputTokenEnd)="add($event)">\n</mat-chip-list>\n<mat-autocomplete #filterAutocomplete="matAutocomplete" (optionSelected)="selected($event)">\n <mat-option *ngFor="let opcao of opcoesFiltradas | async" [value]="opcao.value">\n {{opcao.label}}\n </mat-option>\n</mat-autocomplete>\n',providers:[{provide:c.MatFormFieldControl,useExisting:ee}],styles:[""]}]}],ee.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},ee.propDecorators={input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],filterInput:[{type:o.ViewChild,args:["filterInput"]}],filterAutocomplete:[{type:o.ViewChild,args:["filterAutocomplete"]}],search:[{type:o.Output}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var te=function(){};te.decorators=[{type:o.NgModule,args:[{declarations:[ee],exports:[ee,X],imports:[a.CommonModule,y.MatIconModule,t.ReactiveFormsModule,M.MatAutocompleteModule,X,m.MatChipsModule]}]}];var ne=function(){function e(t,o,r,i){this.errorStateMatcher=t,this.ngControl=o,this.parentForm=r,this.parentFormGroup=i,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="grid",this.layoutColumns=3,this.stateChanges=new n.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return e.prototype.ngAfterViewInit=function(){var e=this;this.opcoes.changes.subscribe((function(){e.updateOpcoes()}))},Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.updateOpcoes(e),this.$value=e},e.prototype.change=function(e,t){e._selected=t,this.value=this.opcoesToValue()},e.prototype.updateOpcoes=function(e){var t,n;if(void 0===e&&(e=this.value),this.opcoes)try{for(var o=D(this.opcoes),r=o.next();!r.done;r=o.next()){var i=r.value;i._selected=e&&e.indexOf(i.value)>=0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.opcoesToValue=function(){var e,t,n=[];if(this.opcoes)try{for(var o=D(this.opcoes),r=o.next();!r.done;r=o.next()){var i=r.value;i._selected&&n.push(i.value)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n.length?n:void 0},e}();ne.nextId=0,ne.decorators=[{type:o.Component,args:[{selector:"mcl-select-many-checkbox",template:"<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? (((opcoes.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"opcao._selected\"\n (change)=\"change(opcao, $event.checked)\"\n *ngFor=\"let opcao of opcoes\">\n {{opcao.label}}\n </mat-checkbox>\n\n</div>\n",providers:[{provide:c.MatFormFieldControl,useExisting:ne}],styles:[".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.grid,.mat-checkbox-container.vertical{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width:750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.grid,.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical{flex-direction:column}}"]}]}],ne.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},ne.propDecorators={layout:[{type:o.Input}],layoutColumns:[{type:o.Input}],input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var oe=function(){};oe.decorators=[{type:o.NgModule,args:[{declarations:[ne],exports:[ne,X],imports:[a.CommonModule,t.FormsModule,X,O.MatCheckboxModule]}]}];var re=function(){function e(t,o,r,i){this.errorStateMatcher=t,this.ngControl=o,this.parentForm=r,this.parentFormGroup=i,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="vertical",this.stateChanges=new n.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e},e}();re.nextId=0,re.decorators=[{type:o.Component,args:[{selector:"mcl-select-radio",template:'<mat-radio-group\n [ngClass]="{\'vertical\':layout === \'vertical\',\'horizontal\':layout ===\'horizontal\'}"\n [required]="required"\n [disabled]="disabled"\n [(ngModel)]="value">\n <mat-radio-button *ngFor="let opcao of opcoes"\n [value]="opcao.value">{{opcao.label}}</mat-radio-button>\n</mat-radio-group>\n',providers:[{provide:c.MatFormFieldControl,useExisting:re}],styles:["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width:750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}"]}]}],re.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},re.propDecorators={layout:[{type:o.Input}],input:[{type:o.ViewChild,args:["input"]}],id:[{type:o.HostBinding}],describedBy:[{type:o.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:o.ContentChildren,args:[Q]}],shouldLabelFloat:[{type:o.HostBinding,args:["class.floating"]}],placeholder:[{type:o.Input}],required:[{type:o.Input}],disabled:[{type:o.Input}]};var ie=function(){};ie.decorators=[{type:o.NgModule,args:[{declarations:[re],exports:[re,X],imports:[a.CommonModule,t.FormsModule,X,w.MatRadioModule]}]}];var ae=function(e){function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a.preferredContries=["br"],a.blur=new o.EventEmitter,a.alwaysShowCountry=!1,a}return j(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.$innerValue},set:function(e){this.$innerValue=e,this.stateChanges.next(),this.onChange(null==e?void 0:e.replace(/[^\d+]/g,""))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty||this.alwaysShowCountry},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),t.prototype.onFocus=function(){this.focused=!0,this.stateChanges.next()},t.prototype.onBlur=function(){this.focused=!1,this.stateChanges.next(),this.blur.emit()},t.prototype.writeValue=function(e){this.value=e},t}(q);ae.decorators=[{type:o.Component,args:[{selector:"mcl-input-telefone-intl",template:'<div class="input">\n <lac-mat-country-selector\n [ngClass]="{\'hidden\': !focused && !value && !alwaysShowCountry}"\n [preferredCountries]="preferredContries"\n [selectorFor]="input"\n searchPlaceholder="Filtrar paises..."></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]="value"\n (focusin)="onFocus()" (focusout)="onBlur()"></lac-mat-tel-input>\n</div>\n',providers:[{provide:c.MatFormFieldControl,useExisting:ae}],styles:[".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}"]}]}],ae.ctorParameters=function(){return[{type:r.ErrorStateMatcher},{type:t.NgControl,decorators:[{type:o.Optional},{type:o.Self}]},{type:t.NgForm,decorators:[{type:o.Optional}]},{type:t.FormGroupDirective,decorators:[{type:o.Optional}]}]},ae.propDecorators={preferredContries:[{type:o.Input}],readonly:[{type:o.Input}],blur:[{type:o.Output}],alwaysShowCountry:[{type:o.Input}],telInput:[{type:o.ViewChild,args:["input"]}]};var le=function(){function e(){}return e.prototype.validate=function(e){return F.phoneNumberValidator(e)},e}();le.decorators=[{type:o.Directive,args:[{selector:"mcl-input-telefone-intl,[mclInputTelefoneIntl]",providers:[{provide:t.NG_VALIDATORS,useExisting:le,multi:!0}]}]}],le.ctorParameters=function(){return[]};var ue=function(){};ue.decorators=[{type:o.NgModule,args:[{declarations:[ae,le],exports:[ae,le],imports:[a.CommonModule,t.FormsModule,F.LacMatTelInputModule]}]}],e.AbstractMatFormFieldControl=q,e.AllOptionCheckboxComponent=U,e.InputDatetimeComponent=_,e.InputDatetimeModule=B,e.InputFileUploadComponent=L,e.InputFileUploadValidatorDirective=N,e.InputFileuploadModule=G,e.InputTelefoneInternacionalComponent=ae,e.InputTelefoneInternacionalModule=ue,e.InputTelefoneInternacionalValidatorDirective=le,e.OptionCheckboxComponent=Y,e.OptionCheckboxGroupComponent=W,e.OptionCheckboxModule=K,e.SelectChipsAutocompleteComponent=ee,e.SelectChipsAutocompleteModule=te,e.SelectChipsComponent=J,e.SelectChipsModule=Z,e.SelectItemComponent=Q,e.SelectItemModule=X,e.SelectManyCheckboxComponent=ne,e.SelectManyCheckboxModule=oe,e.SelectRadioComponent=re,e.SelectRadioModule=ie,e.ɵ0=E,e.ɵa=A,e.ɵb=H,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
17
17
|
//# sourceMappingURL=main-class-componentes-input.umd.min.js.map
|