@main-class/componentes 1.20.4 → 1.21.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 +3 -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-dialog.umd.js +2 -2
- package/bundles/main-class-componentes-dialog.umd.js.map +1 -1
- package/bundles/main-class-componentes-dialog.umd.min.js +1 -1
- package/bundles/main-class-componentes-dialog.umd.min.js.map +1 -1
- package/bundles/main-class-componentes-input.umd.js +2 -2
- 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-loader.umd.js +1 -1
- package/bundles/main-class-componentes-loader.umd.min.js +1 -1
- package/bundles/main-class-componentes-loader.umd.min.js.map +1 -1
- package/bundles/main-class-componentes-model.umd.js +2 -1
- 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/dialog/main-class-componentes-dialog.metadata.json +1 -1
- package/esm2015/core/src/validator/valida-modulo11.service.js +4 -10
- package/esm2015/dialog/src/dialog-confirmacao/dialog-confirmacao.component.js +3 -3
- package/esm2015/input/index.js +2 -1
- package/esm2015/input/main-class-componentes-input.js +2 -3
- package/esm2015/loader/src/loader.component.js +1 -1
- package/esm2015/model/src/masked-model.directive.js +3 -2
- package/fesm2015/main-class-componentes-core.js +3 -9
- package/fesm2015/main-class-componentes-core.js.map +1 -1
- package/fesm2015/main-class-componentes-dialog.js +2 -2
- package/fesm2015/main-class-componentes-dialog.js.map +1 -1
- package/fesm2015/main-class-componentes-input.js +1 -1
- package/fesm2015/main-class-componentes-input.js.map +1 -1
- package/fesm2015/main-class-componentes-loader.js +1 -1
- package/fesm2015/main-class-componentes-model.js +2 -1
- package/fesm2015/main-class-componentes-model.js.map +1 -1
- package/input/index.d.ts +1 -0
- package/input/main-class-componentes-input.d.ts +1 -2
- package/input/main-class-componentes-input.metadata.json +1 -1
- package/loader/main-class-componentes-loader.metadata.json +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;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})}));
|
|
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.InputDatetimeValidatorDirective=A,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=H,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
17
17
|
//# sourceMappingURL=main-class-componentes-input.umd.min.js.map
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
])
|
|
112
112
|
],
|
|
113
113
|
exportAs: 'loader',
|
|
114
|
-
styles: [".preloader{left:0;bottom:0;top:0;right:0;opacity:1;width:100%;height:100%;background:hsla(0,0%,100%,.8)}.preloader:not(.preloader-component){position:fixed;z-index:
|
|
114
|
+
styles: [".preloader{left:0;bottom:0;top:0;right:0;opacity:1;width:100%;height:100%;background:hsla(0,0%,100%,.8)}.preloader:not(.preloader-component){position:fixed;z-index:1200}.preloader.preloader-component{position:absolute;z-index:10}.preloader .cssload-speeding-wheel{position:absolute;top:calc(50% - 25px);left:calc(50% - 15px);width:30px;height:30px;margin:0 auto;border-bottom:3px solid var(--lib-color-primary,#2b6777);border-top:3px solid var(--lib-color-primary,#2b6777);border-radius:50%;border-left:3px solid transparent;border-right:3px solid transparent;animation:cssload-spin .6s linear infinite}@keyframes cssload-spin{to{transform:rotate(1turn)}}.preloader-text{display:block;text-align:center;width:100%;height:30px;color:var(--lib-color-on-surface-variant,#6b7280);font-size:13px;position:relative;top:calc(50% + 15px)}"]
|
|
115
115
|
},] }
|
|
116
116
|
];
|
|
117
117
|
LoaderComponent.ctorParameters = function () { return [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/animations"),require("rxjs"),require("rxjs/operators"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("@main-class/componentes/loader",["exports","@angular/core","@angular/common","@angular/animations","rxjs","rxjs/operators","@ngx-translate/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["main-class"]=e["main-class"]||{},e["main-class"].componentes=e["main-class"].componentes||{},e["main-class"].componentes.loader={}),e.ng.core,e.ng.common,e.ng.animations,e.rxjs,e.rxjs.operators,e.core$1)}(this,(function(e,t,o,n,r,i,a){"use strict";var s=function(){function e(e){this.parent=e,this.$shown=!1,this.labelLoading="Aguarde...",this.showOnInit=!1}return e.prototype.ngOnInit=function(){this.$shown=this.showOnInit},Object.defineProperty(e.prototype,"shown",{get:function(){return this.$shown},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.$component},set:function(e){this.$component!==e&&("boolean"==typeof this.$component?this.parent&&this.$component&&this.parent.nativeElement.parentElement.classList.remove("component-loading"):this.$component&&this.$component.classList.remove("component-loading"),"boolean"==typeof e?this.parent&&e&&this.parent.nativeElement.parentElement.classList.add("component-loading"):e&&e.classList.add("component-loading"),this.$component=e)},enumerable:!1,configurable:!0}),e.prototype.listen=function(e){var t=this;return this.buscando&&this.buscando.unsubscribe(),new r.Observable((function(o){return t.show(),t.buscando=r.from(e).pipe(i.delay(300)).subscribe((function(e){t.buscando&&(t.hide(),t.buscando=void 0),o.next(e)}),(function(e){t.buscando&&(t.hide(),t.buscando=void 0),o.error(e)}),(function(){return o.complete()})),function(){t.buscando&&(t.buscando.unsubscribe(),t.hide(),t.buscando=void 0)}}))},Object.defineProperty(e.prototype,"visibility",{get:function(){return this.$shown?"shown":"hidden"},enumerable:!1,configurable:!0}),e.prototype.show=function(){this.$shown=!0},e.prototype.hide=function(){this.$shown=!1},e}();s.decorators=[{type:t.Component,args:[{selector:"mcl-loader",template:'<div #loader class="preloader" [ngClass]="{\'preloader-component\':component}" [@visibility]="visibility">\n <div class="cssload-speeding-wheel"></div>\n <p class="preloader-text">{{\'mcl.loader.aguarde\' | translate}}</p>\n</div>\n',animations:[n.trigger("visibility",[n.state("shown",n.style({opacity:.75,display:"block"})),n.state("hidden",n.style({opacity:0,display:"none"})),n.transition("* => *",n.animate(".3s"))])],exportAs:"loader",styles:[".preloader{left:0;bottom:0;top:0;right:0;opacity:1;width:100%;height:100%;background:hsla(0,0%,100%,.8)}.preloader:not(.preloader-component){position:fixed;z-index:1200}.preloader.preloader-component{position:absolute;z-index:10}.preloader .cssload-speeding-wheel{position:absolute;top:calc(50% - 25px);left:calc(50% - 15px);width:30px;height:30px;margin:0 auto;border-bottom:3px solid var(--lib-color-primary,#2b6777);border-top:3px solid var(--lib-color-primary,#2b6777);border-radius:50%;border-left:3px solid transparent;border-right:3px solid transparent;animation:cssload-spin .6s linear infinite}@keyframes cssload-spin{to{transform:rotate(1turn)}}.preloader-text{display:block;text-align:center;width:100%;height:30px;color:var(--lib-color-on-surface-variant,#6b7280);font-size:13px;position:relative;top:calc(50% + 15px)}"]}]}],s.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Host},{type:t.Optional}]}]},s.propDecorators={progresso:[{type:t.Input}],$shown:[{type:t.Input,args:["show"]}],loader:[{type:t.ViewChild,args:["loader"]}],labelLoading:[{type:t.Input}],showOnInit:[{type:t.Input}],component:[{type:t.Input}]};var c=function(){function e(){this.executando=!1,this.ajaxCount=[]}return e.prototype.init=function(e){this.loader||(this.loader=e)},e.prototype.incrementaAJAX=function(e){var t=this;void 0===e&&(e=!1),this.executando=this.executando||e;var o=String(1e10*Math.random());return this.ajaxCount.push(o),this.loader&&this.executando&&this.ajaxCount.length>0&&!this.loader.shown&&setTimeout((function(){t.executando&&t.ajaxCount.length>0&&!t.loader.shown&&t.loader.show()}),150),o},e.prototype.decrementaAJAX=function(e){var t=this,o=this.ajaxCount.indexOf(e);o>=0&&(this.ajaxCount.splice(o,1),setTimeout((function(){t.ajaxCount.length<=0&&t.loader&&t.loader.shown&&(t.loader.hide(),t.executando=!1)}),500))},e.prototype.listen=function(e){return this.executando=!0,this.doExecuta(r.from(e))},e.prototype.doExecuta=function(e){var t=this;return new r.Observable((function(o){var n=t.incrementaAJAX(),r=e.subscribe((function(e){o.next(e)}),(function(e){t.decrementaAJAX(n),o.error(e)}),(function(){t.decrementaAJAX(n),o.complete()}));return function(){t.decrementaAJAX(n),r.unsubscribe()}}))},e}();c.decorators=[{type:t.Injectable}],c.ctorParameters=function(){return[]};var p=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[c]}},e}();p.decorators=[{type:t.NgModule,args:[{declarations:[s],exports:[s],imports:[o.CommonModule,a.TranslateModule]}]}],e.LoaderComponent=s,e.LoaderModule=p,e.LoaderService=c,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=main-class-componentes-loader.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../projects/main-class/componentes/loader/src/loader.component.ts","../../../../projects/main-class/componentes/loader/src/loader.service.ts","../../../../projects/main-class/componentes/loader/src/loader.module.ts"],"names":["LoaderComponent","parent","this","$shown","labelLoading","showOnInit","prototype","ngOnInit","Object","defineProperty","$component","component","nativeElement","parentElement","classList","remove","add","listen","observable","_this","buscando","unsubscribe","Observable","observer","show","from","pipe","delay","subscribe","t","hide","undefined","next","err","error","complete","Component","args","selector","template","animations","trigger","state","style","opacity","display","transition","animate","exportAs","ElementRef","decorators","type","Host","Optional","Input","ViewChild","LoaderService","executando","ajaxCount","init","loader","incrementaAJAX","token","String","Math","random","push","length","shown","setTimeout","decrementaAJAX","index","indexOf","splice","call","doExecuta","subscriber","unsubs","resp","Injectable","LoaderModule","forRoot","ngModule","providers","NgModule","declarations","exports","imports","CommonModule","TranslateModule"],"mappings":"ivBA6BE,SAAAA,EAAwCC,GAAAC,KAAAD,OAAAA,EAPjBC,KAAAC,QAAS,EAIvBD,KAAAE,aAAe,aACfF,KAAAG,YAAa,SAKtBL,EAAAM,UAAAC,SAAA,WACEL,KAA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A,6OAEAC,WAAY,CACVC,EAAAA,QAAQ,aAAc,CACpBC,EAAAA,MAAM,QAASC,EAAAA,MAAM,CAACC,QAAS,IAAMC,QAAS,WAC9CH,EAAAA,MAAM,SAAUC,EAAAA,MAAM,CAACC,QAAS,EAAGC,QAAS,UAC5CC,EAAAA,WAAW,SAAUC,EAAAA,QAAQ,WAGjCC,SAAU,
|
|
1
|
+
{"version":3,"sources":["../../../../projects/main-class/componentes/loader/src/loader.component.ts","../../../../projects/main-class/componentes/loader/src/loader.service.ts","../../../../projects/main-class/componentes/loader/src/loader.module.ts"],"names":["LoaderComponent","parent","this","$shown","labelLoading","showOnInit","prototype","ngOnInit","Object","defineProperty","$component","component","nativeElement","parentElement","classList","remove","add","listen","observable","_this","buscando","unsubscribe","Observable","observer","show","from","pipe","delay","subscribe","t","hide","undefined","next","err","error","complete","Component","args","selector","template","animations","trigger","state","style","opacity","display","transition","animate","exportAs","ElementRef","decorators","type","Host","Optional","Input","ViewChild","LoaderService","executando","ajaxCount","init","loader","incrementaAJAX","token","String","Math","random","push","length","shown","setTimeout","decrementaAJAX","index","indexOf","splice","call","doExecuta","subscriber","unsubs","resp","Injectable","LoaderModule","forRoot","ngModule","providers","NgModule","declarations","exports","imports","CommonModule","TranslateModule"],"mappings":"ivBA6BE,SAAAA,EAAwCC,GAAAC,KAAAD,OAAAA,EAPjBC,KAAAC,QAAS,EAIvBD,KAAAE,aAAe,aACfF,KAAAG,YAAa,SAKtBL,EAAAM,UAAAC,SAAA,WACEL,KAAKC,OAASD,KAAKG,YAGrBG,OAAAC,eAAWT,EAAAM,UAAA,QAAK,KAAhB,WACE,OAAOJ,KAAKC,wCAGdK,OAAAC,eAAIT,EAAAM,UAAA,YAAS,KAAb,WACE,OAAOJ,KAAKQ,gBAGd,SAAuBC,GACjBT,KAAKQ,aAAeC,IACS,kBAApBT,KAAKQ,WACVR,KAAKD,QAAUC,KAAKQ,YACtBR,KAAKD,OAAOW,cAAcC,cAAcC,UAAUC,OAAO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d,EAAQ3C,EAAK0C,iBAEbgB,EAASH,EAAK9C,WAAU,SAAAkD,GAC5BF,EAAW5C,KAAK8C,MACf,SAAA7C,GACDd,EAAKmD,eAAeR,GAEpBc,EAAW1C,MAAMD,MAChB,WACDd,EAAKmD,eAAeR,GAEpBc,EAAWzC,cAGb,OAAO,WACLhB,EAAKmD,eAAeR,GAEpBe,EAAOxD,4CApFd0D,EAAAA,oECQD,SAAAC,YACSA,EAAAC,QAAP,WACE,MAAO,CACLC,SAAUF,EACVG,UAAW,CACT3B,8BAjBP4B,EAAAA,SAAQ/C,KAAA,CAAC,CACRgD,aAAc,CACZrF,GAEFsF,QAAS,CACPtF,GAEFuF,QAAS,CACPC,EAAAA,aACAC,EAAAA","sourcesContent":["import {Component, ElementRef, Host, Input, OnInit, Optional, ViewChild} from '@angular/core';\nimport {animate, state, style, transition, trigger} from '@angular/animations';\nimport {from, Observable, Subscription} from 'rxjs';\nimport {LoaderBase} from './loader.service';\nimport {delay} from 'rxjs/operators';\n\n@Component({\n selector: 'mcl-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n animations: [\n trigger('visibility', [\n state('shown', style({opacity: 0.75, display: 'block'})),\n state('hidden', style({opacity: 0, display: 'none'})),\n transition('* => *', animate('.3s'))\n ])\n ],\n exportAs: 'loader'\n})\nexport class LoaderComponent implements LoaderBase, OnInit {\n\n @Input() progresso;\n @Input('show') private $shown = false;\n @ViewChild('loader') loader: ElementRef;\n\n private $component: HTMLElement | boolean;\n @Input() labelLoading = 'Aguarde...';\n @Input() showOnInit = false;\n\n constructor(@Host() @Optional() private parent: ElementRef) {\n }\n\n ngOnInit(): void {\n this.$shown = this.showOnInit;\n }\n\n public get shown(): boolean {\n return this.$shown;\n }\n\n get component() {\n return this.$component;\n }\n\n @Input() set component(component: HTMLElement | boolean) {\n if (this.$component !== component) {\n if (typeof this.$component === 'boolean') {\n if (this.parent && this.$component) {\n this.parent.nativeElement.parentElement.classList.remove('component-loading');\n }\n } else {\n if (this.$component) {\n this.$component.classList.remove('component-loading');\n }\n }\n\n if (typeof component === 'boolean') {\n if (this.parent && component) {\n this.parent.nativeElement.parentElement.classList.add('component-loading');\n }\n } else {\n if (component) {\n component.classList.add('component-loading');\n }\n\n }\n\n this.$component = component;\n }\n\n }\n\n private buscando: Subscription;\n\n listen<T>(observable: Observable<T> | Promise<T>): Observable<T> {\n if (this.buscando) {\n this.buscando.unsubscribe();\n }\n\n return new Observable(observer => {\n this.show();\n\n this.buscando = from(observable)\n .pipe(delay(300))\n .subscribe(t => {\n if (this.buscando) {\n this.hide();\n this.buscando = undefined;\n }\n observer.next(t);\n },\n err => {\n if (this.buscando) {\n this.hide();\n this.buscando = undefined;\n }\n\n observer.error(err);\n }, () => observer.complete()\n );\n\n return () => {\n if (this.buscando) {\n this.buscando.unsubscribe();\n\n this.hide();\n this.buscando = undefined;\n }\n };\n });\n }\n\n get visibility() {\n return this.$shown ? 'shown' : 'hidden';\n }\n\n public show() {\n this.$shown = true;\n }\n\n public hide() {\n this.$shown = false;\n }\n\n\n}\n","import {Injectable} from '@angular/core';\nimport {from, Observable} from 'rxjs';\n\nexport interface LoaderBase {\n shown: boolean;\n\n show();\n\n hide();\n}\n\n@Injectable()\nexport class LoaderService {\n\n constructor() {\n }\n\n private executando = false;\n private ajaxCount = [];\n\n private loader: LoaderBase;\n\n init(loader: LoaderBase) {\n if (this.loader) {\n return;\n }\n\n this.loader = loader;\n }\n\n incrementaAJAX(executando: boolean = false): string {\n this.executando = this.executando || executando;\n\n const token = String(Math.random() * 1E10);\n\n this.ajaxCount.push(token);\n\n if (this.loader && this.executando &&\n this.ajaxCount.length > 0 && !this.loader.shown) {\n setTimeout(() => {\n\n if (this.executando && this.ajaxCount.length > 0 && !this.loader.shown) {\n this.loader.show();\n }\n\n }, 150);\n }\n\n return token;\n }\n\n decrementaAJAX(token: string) {\n const index = this.ajaxCount.indexOf(token);\n if (index >= 0) {\n this.ajaxCount.splice(index, 1);\n\n setTimeout(() => {\n if (this.ajaxCount.length <= 0) {\n if (this.loader &&\n this.loader.shown) {\n this.loader.hide();\n this.executando = false;\n }\n }\n }, 500);\n }\n }\n\n\n public listen<T>(call: Observable<T> | Promise<T>): Observable<T> {\n this.executando = true;\n\n return this.doExecuta(from(call));\n }\n\n private doExecuta<T>(call: Observable<T>): Observable<T> {\n return new Observable<T>(subscriber => {\n\n const token = this.incrementaAJAX();\n\n const unsubs = call.subscribe(resp => {\n subscriber.next(resp);\n }, err => {\n this.decrementaAJAX(token);\n\n subscriber.error(err);\n }, () => {\n this.decrementaAJAX(token);\n\n subscriber.complete();\n });\n\n return () => {\n this.decrementaAJAX(token);\n\n unsubs.unsubscribe();\n };\n });\n }\n\n}\n\n","import {ModuleWithProviders, NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {LoaderComponent} from './loader.component';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {LoaderService} from './loader.service';\n\n\n@NgModule({\n declarations: [\n LoaderComponent\n ],\n exports: [\n LoaderComponent\n ],\n imports: [\n CommonModule,\n TranslateModule\n ]\n})\nexport class LoaderModule {\n static forRoot(): ModuleWithProviders<LoaderModule> {\n return {\n ngModule: LoaderModule,\n providers: [\n LoaderService\n ]\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-class-componentes-model.umd.js","sources":["../../../../projects/main-class/componentes/model/src/masked-model.directive.ts","../../../../projects/main-class/componentes/model/src/model.module.ts","../../../../projects/main-class/componentes/model/main-class-componentes-model.ts"],"sourcesContent":["import {Directive, EventEmitter, HostListener, Input, Output} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {Observable} from 'rxjs';\n\nexport function doApplyMask(val: string | undefined, mask: string): string {\n let valorFormatado = '';\n\n if (val !== null && val !== undefined && val.length) {\n\n if (mask) {\n for (let idx = 0; idx < val.length && mask.length > valorFormatado.length;) {\n const maskChar = mask.charAt(valorFormatado.length);\n if (maskChar === '#' || maskChar === 'A') {\n const valChar = val.charAt(idx);\n const isNum = valChar.match(/\\d/);\n const isAlpha = valChar.match(/[a-zA-Z]/);\n\n if (maskChar === '#' && isNum) {\n valorFormatado += valChar;\n } else if (maskChar === 'A' && (isNum || isAlpha)) {\n valorFormatado += valChar;\n }\n idx++;\n } else {\n valorFormatado += mask.charAt(valorFormatado.length);\n }\n }\n } else {\n valorFormatado = val;\n }\n\n }\n\n return valorFormatado;\n}\n\nexport function doRemoveMask(val: string | undefined, mask: string): string {\n if (val !== null && val !== undefined) {\n if (mask) {\n const hasAlpha = mask.includes('A');\n const unmasked = hasAlpha ? val.toString().replace(/[^0-9a-zA-Z]/g, '') : val.toString().replace(/\\D/g, '');\n const digits = mask.replace(/[^#A]/g, '');\n\n if (unmasked.length > digits.length) {\n return unmasked.substring(0, digits.length);\n } else {\n return unmasked;\n }\n }\n\n return val;\n }\n return undefined;\n}\n\n\n@Directive({\n selector: '[mclModel][ngModel][mask]',\n})\nexport class MaskedModelDirective {\n\n private value: string | undefined = null;\n private displayValue: string | undefined = null;\n\n private $mask: string;\n\n @Input()\n public keepMask: boolean;\n\n @Output()\n public mclModelChange = new EventEmitter<string | undefined>();\n\n private delay(ms: number = 0): Observable<void> {\n return new Observable(observer => {\n const timeout = setTimeout(() => observer.next(), ms);\n return () => clearTimeout(timeout);\n });\n }\n\n private processValue(displayValue: string | undefined) {\n return this.keepMask ? displayValue : this.removeMask(displayValue);\n }\n\n get mask() {\n return this.$mask;\n }\n\n @Input() set mask(mask: string) {\n if (mask !== this.$mask) {\n this.$mask = mask;\n this.defineValue();\n }\n }\n\n @Input('mclModel')\n public set maskValue(value: string | undefined) {\n if (value !== this.value) {\n this.value = value;\n this.defineValue();\n }\n }\n\n @HostListener('input', ['$event'])\n public onInput(event: { target: { value?: string } }): void {\n const target = event.target;\n const value = target.value;\n this.onValueChange(value);\n }\n\n constructor(private ngControl: NgControl) {\n }\n\n private updateValue(value: string | undefined) {\n this.value = value;\n this.mclModelChange.emit(value);\n this.delay().subscribe(\n () => this.ngControl.control.updateValueAndValidity()\n );\n }\n\n private defineValue() {\n let value: string = this.value;\n let displayValue: string = null;\n\n if (this.mask) {\n if (value != null) {\n displayValue = this.applyMask(value);\n value = this.processValue(displayValue);\n }\n } else {\n displayValue = this.value;\n }\n\n this.delay().subscribe(() => {\n if (this.displayValue !== displayValue) {\n this.displayValue = displayValue;\n this.ngControl.control.setValue(displayValue);\n this.delay().subscribe(() => {\n if (value !== this.value) {\n return this.updateValue(value);\n }\n });\n }\n });\n }\n\n private onValueChange(newValue: string | undefined) {\n if (newValue !== this.displayValue) {\n let displayValue = newValue;\n let value = newValue;\n\n if ((newValue == null) || (newValue.trim() === '')) {\n value = null;\n } else if (this.mask) {\n displayValue = this.applyMask(newValue);\n value = this.processValue(displayValue);\n }\n\n this.displayValue = displayValue;\n\n if (newValue !== displayValue) {\n this.ngControl.control.setValue(displayValue);\n }\n\n if (value !== this.value) {\n this.updateValue(value);\n }\n }\n }\n\n protected removeMask(value): string {\n return doRemoveMask(value, this.mask);\n }\n\n protected applyMask(value): string {\n return doApplyMask(value, this.mask);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MaskedModelDirective} from './masked-model.directive';\n\n\n@NgModule({\n declarations: [\n MaskedModelDirective\n ],\n exports: [\n MaskedModelDirective\n ],\n imports: [\n CommonModule,\n ]\n})\nexport class ModelModule {\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EventEmitter","Observable","Directive","NgControl","Input","Output","HostListener","NgModule","CommonModule"],"mappings":";;;;;;aAIgB,WAAW,CAAC,GAAuB,EAAE,IAAY;QAC/D,IAAI,cAAc,GAAG,EAAE,CAAC;QAExB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,EAAE;YAEnD,IAAI,IAAI,EAAE;gBACR,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG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AAK;4BAOLA,UAAK,SAAC,UAAU;0BAQhBE,iBAAY,SAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;;QCtFnC;;;;;gBAXCC,aAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,oBAAoB;qBACrB;oBACD,OAAO,EAAE;wBACP,oBAAoB;qBACrB;oBACD,OAAO,EAAE;wBACPC,mBAAY;qBACb;iBACF;;;ICfD;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"main-class-componentes-model.umd.js","sources":["../../../../projects/main-class/componentes/model/src/masked-model.directive.ts","../../../../projects/main-class/componentes/model/src/model.module.ts","../../../../projects/main-class/componentes/model/main-class-componentes-model.ts"],"sourcesContent":["import {Directive, EventEmitter, HostListener, Input, Output} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {Observable} from 'rxjs';\n\nexport function doApplyMask(val: string | undefined, mask: string): string {\n let valorFormatado = '';\n\n if (val !== null && val !== undefined && val.length) {\n\n if (mask) {\n for (let idx = 0; idx < val.length && mask.length > valorFormatado.length;) {\n const maskChar = mask.charAt(valorFormatado.length);\n if (maskChar === '#' || maskChar === 'A') {\n const valChar = val.charAt(idx);\n const isNum = valChar.match(/\\d/);\n const isAlpha = valChar.match(/[a-zA-Z]/);\n\n if (maskChar === '#' && isNum) {\n valorFormatado += valChar;\n } else if (maskChar === 'A' && (isNum || isAlpha)) {\n // CNPJ alfanumérico é definido em maiúsculas pela Receita Federal\n valorFormatado += valChar.toUpperCase();\n }\n idx++;\n } else {\n valorFormatado += mask.charAt(valorFormatado.length);\n }\n }\n } else {\n valorFormatado = val;\n }\n\n }\n\n return valorFormatado;\n}\n\nexport function doRemoveMask(val: string | undefined, mask: string): string {\n if (val !== null && val !== undefined) {\n if (mask) {\n const hasAlpha = mask.includes('A');\n const unmasked = hasAlpha ? val.toString().replace(/[^0-9a-zA-Z]/g, '') : val.toString().replace(/\\D/g, '');\n const digits = mask.replace(/[^#A]/g, '');\n\n if (unmasked.length > digits.length) {\n return unmasked.substring(0, digits.length);\n } else {\n return unmasked;\n }\n }\n\n return val;\n }\n return undefined;\n}\n\n\n@Directive({\n selector: '[mclModel][ngModel][mask]',\n})\nexport class MaskedModelDirective {\n\n private value: string | undefined = null;\n private displayValue: string | undefined = null;\n\n private $mask: string;\n\n @Input()\n public keepMask: boolean;\n\n @Output()\n public mclModelChange = new EventEmitter<string | undefined>();\n\n private delay(ms: number = 0): Observable<void> {\n return new Observable(observer => {\n const timeout = setTimeout(() => observer.next(), ms);\n return () => clearTimeout(timeout);\n });\n }\n\n private processValue(displayValue: string | undefined) {\n return this.keepMask ? displayValue : this.removeMask(displayValue);\n }\n\n get mask() {\n return this.$mask;\n }\n\n @Input() set mask(mask: string) {\n if (mask !== this.$mask) {\n this.$mask = mask;\n this.defineValue();\n }\n }\n\n @Input('mclModel')\n public set maskValue(value: string | undefined) {\n if (value !== this.value) {\n this.value = value;\n this.defineValue();\n }\n }\n\n @HostListener('input', ['$event'])\n public onInput(event: { target: { value?: string } }): void {\n const target = event.target;\n const value = target.value;\n this.onValueChange(value);\n }\n\n constructor(private ngControl: NgControl) {\n }\n\n private updateValue(value: string | undefined) {\n this.value = value;\n this.mclModelChange.emit(value);\n this.delay().subscribe(\n () => this.ngControl.control.updateValueAndValidity()\n );\n }\n\n private defineValue() {\n let value: string = this.value;\n let displayValue: string = null;\n\n if (this.mask) {\n if (value != null) {\n displayValue = this.applyMask(value);\n value = this.processValue(displayValue);\n }\n } else {\n displayValue = this.value;\n }\n\n this.delay().subscribe(() => {\n if (this.displayValue !== displayValue) {\n this.displayValue = displayValue;\n this.ngControl.control.setValue(displayValue);\n this.delay().subscribe(() => {\n if (value !== this.value) {\n return this.updateValue(value);\n }\n });\n }\n });\n }\n\n private onValueChange(newValue: string | undefined) {\n if (newValue !== this.displayValue) {\n let displayValue = newValue;\n let value = newValue;\n\n if ((newValue == null) || (newValue.trim() === '')) {\n value = null;\n } else if (this.mask) {\n displayValue = this.applyMask(newValue);\n value = this.processValue(displayValue);\n }\n\n this.displayValue = displayValue;\n\n if (newValue !== displayValue) {\n this.ngControl.control.setValue(displayValue);\n }\n\n if (value !== this.value) {\n this.updateValue(value);\n }\n }\n }\n\n protected removeMask(value): string {\n return doRemoveMask(value, this.mask);\n }\n\n protected applyMask(value): string {\n return doApplyMask(value, this.mask);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MaskedModelDirective} from './masked-model.directive';\n\n\n@NgModule({\n declarations: [\n MaskedModelDirective\n ],\n exports: [\n MaskedModelDirective\n ],\n imports: [\n CommonModule,\n ]\n})\nexport class ModelModule {\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EventEmitter","Observable","Directive","NgControl","Input","Output","HostListener","NgModule","CommonModule"],"mappings":";;;;;;aAIgB,WAAW,CAAC,GAAuB,EAAE,IAAY;QAC/D,IAAI,cAAc,GAAG,EAAE,CAAC;QAExB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,EAAE;YAEnD,IAAI,IAAI,EAAE;gBACR,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,GAAG;oBAC1E,IAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBACpD,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,EAAE;wBACxC,IAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBAChC,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;wBAClC,IAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;wBAE1C,IAAI,QAAQ,KAAK,GAAG,IAAI,KAAK,EAAE;4BAC7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BAAM,IAAI,IAAI,CAAC,IAAI,EAAE;oBACpB,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;oBACxC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;iBACzC;gBAED,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;gBAEjC,IAAI,QAAQ,KAAK,YAAY,EAAE;oBAC7B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;iBAC/C;gBAED,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;oBACxB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;iBACzB;aACF;SACF;QAES,yCAAU,GAAV,UAAW,KAAK;YACxB,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;SACvC;QAES,wCAAS,GAAT,UAAU,KAAK;YACvB,OAAO,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;SACtC;;;;gBAxHFC,cAAS,SAAC;oBACT,QAAQ,EAAE,2BAA2B;iBACtC;;;gBA1DOC,eAAS;;;2BAkEdC,UAAK;iCAGLC,WAAM;uBAkBND,UAAK;4BAOLA,UAAK,SAAC,UAAU;0BAQhBE,iBAAY,SAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;;QCvFnC;;;;;gBAXCC,aAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,oBAAoB;qBACrB;oBACD,OAAO,EAAE;wBACP,oBAAoB;qBACrB;oBACD,OAAO,EAAE;wBACPC,mBAAY;qBACb;iBACF;;;ICfD;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs")):"function"==typeof define&&define.amd?define("@main-class/componentes/model",["exports","@angular/core","@angular/common","@angular/forms","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["main-class"]=e["main-class"]||{},e["main-class"].componentes=e["main-class"].componentes||{},e["main-class"].componentes.model={}),e.ng.core,e.ng.common,e.ng.forms,e.rxjs)}(this,(function(e,t,n,o,a){"use strict";function r(e,t){var n="";if(null!=e&&e.length)if(t)for(var o=0;o<e.length&&t.length>n.length;){var a=t.charAt(n.length);if("#"===a||"A"===a){var r=e.charAt(o),s=r.match(/\d/),l=r.match(/[a-zA-Z]/);
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs")):"function"==typeof define&&define.amd?define("@main-class/componentes/model",["exports","@angular/core","@angular/common","@angular/forms","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["main-class"]=e["main-class"]||{},e["main-class"].componentes=e["main-class"].componentes||{},e["main-class"].componentes.model={}),e.ng.core,e.ng.common,e.ng.forms,e.rxjs)}(this,(function(e,t,n,o,a){"use strict";function r(e,t){var n="";if(null!=e&&e.length)if(t)for(var o=0;o<e.length&&t.length>n.length;){var a=t.charAt(n.length);if("#"===a||"A"===a){var r=e.charAt(o),s=r.match(/\d/),l=r.match(/[a-zA-Z]/);"#"===a&&s?n+=r:"A"===a&&(s||l)&&(n+=r.toUpperCase()),o++}else n+=t.charAt(n.length)}else n=e;return n}function s(e,t){if(null!=e){if(t){var n=t.includes("A")?e.toString().replace(/[^0-9a-zA-Z]/g,""):e.toString().replace(/\D/g,""),o=t.replace(/[^#A]/g,"");return n.length>o.length?n.substring(0,o.length):n}return e}}var l=function(){function e(e){this.ngControl=e,this.value=null,this.displayValue=null,this.mclModelChange=new t.EventEmitter}return e.prototype.delay=function(e){return void 0===e&&(e=0),new a.Observable((function(t){var n=setTimeout((function(){return t.next()}),e);return function(){return clearTimeout(n)}}))},e.prototype.processValue=function(e){return this.keepMask?e:this.removeMask(e)},Object.defineProperty(e.prototype,"mask",{get:function(){return this.$mask},set:function(e){e!==this.$mask&&(this.$mask=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{set:function(e){e!==this.value&&(this.value=e,this.defineValue())},enumerable:!1,configurable:!0}),e.prototype.onInput=function(e){var t=e.target.value;this.onValueChange(t)},e.prototype.updateValue=function(e){var t=this;this.value=e,this.mclModelChange.emit(e),this.delay().subscribe((function(){return t.ngControl.control.updateValueAndValidity()}))},e.prototype.defineValue=function(){var e=this,t=this.value,n=null;this.mask?null!=t&&(n=this.applyMask(t),t=this.processValue(n)):n=this.value,this.delay().subscribe((function(){e.displayValue!==n&&(e.displayValue=n,e.ngControl.control.setValue(n),e.delay().subscribe((function(){if(t!==e.value)return e.updateValue(t)})))}))},e.prototype.onValueChange=function(e){if(e!==this.displayValue){var t=e,n=e;null==e||""===e.trim()?n=null:this.mask&&(t=this.applyMask(e),n=this.processValue(t)),this.displayValue=t,e!==t&&this.ngControl.control.setValue(t),n!==this.value&&this.updateValue(n)}},e.prototype.removeMask=function(e){return s(e,this.mask)},e.prototype.applyMask=function(e){return r(e,this.mask)},e}();l.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][mask]"}]}],l.ctorParameters=function(){return[{type:o.NgControl}]},l.propDecorators={keepMask:[{type:t.Input}],mclModelChange:[{type:t.Output}],mask:[{type:t.Input}],maskValue:[{type:t.Input,args:["mclModel"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}]};var i=function(){};i.decorators=[{type:t.NgModule,args:[{declarations:[l],exports:[l],imports:[n.CommonModule]}]}],e.MaskedModelDirective=l,e.ModelModule=i,e.doApplyMask=r,e.doRemoveMask=s,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=main-class-componentes-model.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../projects/main-class/componentes/model/src/masked-model.directive.ts","../../../../projects/main-class/componentes/model/src/model.module.ts"],"names":["doApplyMask","val","mask","valorFormatado","length","idx","maskChar","charAt","valChar","isNum","match","isAlpha","doRemoveMask","unmasked","includes","toString","replace","digits","substring","MaskedModelDirective","ngControl","this","value","displayValue","mclModelChange","EventEmitter","prototype","delay","ms","Observable","observer","timeout","setTimeout","next","clearTimeout","processValue","keepMask","removeMask","Object","defineProperty","$mask","defineValue","onInput","event","target","onValueChange","updateValue","_this","emit","subscribe","control","updateValueAndValidity","applyMask","setValue","newValue","trim","Directive","args","selector","NgControl","Input","Output","HostListener","NgModule","declarations","exports","imports","CommonModule"],"mappings":"0lBAIgBA,EAAYC,EAAyBC,GACnD,IAAIC,EAAiB,GAErB,GAAIF,MAAAA,GAAqCA,EAAIG,OAE3C,GAAIF,EACF,IAAK,IAAIG,EAAM,EAAGA,EAAMJ,EAAIG,QAAUF,EAAKE,OAASD,EAAeC,QAAS,CAC1E,IAAME,EAAWJ,EAAKK,OAAOJ,EAAeC,QAC5C,GAAiB,MAAbE,GAAiC,MAAbA,EAAkB,CACxC,IAAME,EAAUP,EAAIM,OAAOF,GACrBI,EAAQD,EAAQE,MAAM,MACtBC,EAAUH,EAAQE,MAAM,
|
|
1
|
+
{"version":3,"sources":["../../../../projects/main-class/componentes/model/src/masked-model.directive.ts","../../../../projects/main-class/componentes/model/src/model.module.ts"],"names":["doApplyMask","val","mask","valorFormatado","length","idx","maskChar","charAt","valChar","isNum","match","isAlpha","toUpperCase","doRemoveMask","unmasked","includes","toString","replace","digits","substring","MaskedModelDirective","ngControl","this","value","displayValue","mclModelChange","EventEmitter","prototype","delay","ms","Observable","observer","timeout","setTimeout","next","clearTimeout","processValue","keepMask","removeMask","Object","defineProperty","$mask","defineValue","onInput","event","target","onValueChange","updateValue","_this","emit","subscribe","control","updateValueAndValidity","applyMask","setValue","newValue","trim","Directive","args","selector","NgControl","Input","Output","HostListener","NgModule","declarations","exports","imports","CommonModule"],"mappings":"0lBAIgBA,EAAYC,EAAyBC,GACnD,IAAIC,EAAiB,GAErB,GAAIF,M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B,KAKbH,EAAAO,UAAAW,WAAA,SAAWf,GACnB,OAAOV,EAAaU,EAAOD,KAAKpB,OAGxBkB,EAAAO,UAAA0B,UAAA,SAAU9B,GAClB,OAAOvB,EAAYuB,EAAOD,KAAKpB,gCAvHlCuD,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,yEAzDJC,EAAAA,+CAkELC,EAAAA,8BAGAC,EAAAA,qBAkBAD,EAAAA,yBAOAA,EAAAA,MAAKH,KAAA,CAAC,6BAQNK,EAAAA,aAAYL,KAAA,CAAC,QAAS,CAAC,oBCvF1B,iCAXCM,EAAAA,SAAQN,KAAA,CAAC,CACRO,aAAc,CACZ7C,GAEF8C,QAAS,CACP9C,GAEF+C,QAAS,CACPC,EAAAA","sourcesContent":["import {Directive, EventEmitter, HostListener, Input, Output} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {Observable} from 'rxjs';\n\nexport function doApplyMask(val: string | undefined, mask: string): string {\n let valorFormatado = '';\n\n if (val !== null && val !== undefined && val.length) {\n\n if (mask) {\n for (let idx = 0; idx < val.length && mask.length > valorFormatado.length;) {\n const maskChar = mask.charAt(valorFormatado.length);\n if (maskChar === '#' || maskChar === 'A') {\n const valChar = val.charAt(idx);\n const isNum = valChar.match(/\\d/);\n const isAlpha = valChar.match(/[a-zA-Z]/);\n\n if (maskChar === '#' && isNum) {\n valorFormatado += valChar;\n } else if (maskChar === 'A' && (isNum || isAlpha)) {\n // CNPJ alfanumérico é definido em maiúsculas pela Receita Federal\n valorFormatado += valChar.toUpperCase();\n }\n idx++;\n } else {\n valorFormatado += mask.charAt(valorFormatado.length);\n }\n }\n } else {\n valorFormatado = val;\n }\n\n }\n\n return valorFormatado;\n}\n\nexport function doRemoveMask(val: string | undefined, mask: string): string {\n if (val !== null && val !== undefined) {\n if (mask) {\n const hasAlpha = mask.includes('A');\n const unmasked = hasAlpha ? val.toString().replace(/[^0-9a-zA-Z]/g, '') : val.toString().replace(/\\D/g, '');\n const digits = mask.replace(/[^#A]/g, '');\n\n if (unmasked.length > digits.length) {\n return unmasked.substring(0, digits.length);\n } else {\n return unmasked;\n }\n }\n\n return val;\n }\n return undefined;\n}\n\n\n@Directive({\n selector: '[mclModel][ngModel][mask]',\n})\nexport class MaskedModelDirective {\n\n private value: string | undefined = null;\n private displayValue: string | undefined = null;\n\n private $mask: string;\n\n @Input()\n public keepMask: boolean;\n\n @Output()\n public mclModelChange = new EventEmitter<string | undefined>();\n\n private delay(ms: number = 0): Observable<void> {\n return new Observable(observer => {\n const timeout = setTimeout(() => observer.next(), ms);\n return () => clearTimeout(timeout);\n });\n }\n\n private processValue(displayValue: string | undefined) {\n return this.keepMask ? displayValue : this.removeMask(displayValue);\n }\n\n get mask() {\n return this.$mask;\n }\n\n @Input() set mask(mask: string) {\n if (mask !== this.$mask) {\n this.$mask = mask;\n this.defineValue();\n }\n }\n\n @Input('mclModel')\n public set maskValue(value: string | undefined) {\n if (value !== this.value) {\n this.value = value;\n this.defineValue();\n }\n }\n\n @HostListener('input', ['$event'])\n public onInput(event: { target: { value?: string } }): void {\n const target = event.target;\n const value = target.value;\n this.onValueChange(value);\n }\n\n constructor(private ngControl: NgControl) {\n }\n\n private updateValue(value: string | undefined) {\n this.value = value;\n this.mclModelChange.emit(value);\n this.delay().subscribe(\n () => this.ngControl.control.updateValueAndValidity()\n );\n }\n\n private defineValue() {\n let value: string = this.value;\n let displayValue: string = null;\n\n if (this.mask) {\n if (value != null) {\n displayValue = this.applyMask(value);\n value = this.processValue(displayValue);\n }\n } else {\n displayValue = this.value;\n }\n\n this.delay().subscribe(() => {\n if (this.displayValue !== displayValue) {\n this.displayValue = displayValue;\n this.ngControl.control.setValue(displayValue);\n this.delay().subscribe(() => {\n if (value !== this.value) {\n return this.updateValue(value);\n }\n });\n }\n });\n }\n\n private onValueChange(newValue: string | undefined) {\n if (newValue !== this.displayValue) {\n let displayValue = newValue;\n let value = newValue;\n\n if ((newValue == null) || (newValue.trim() === '')) {\n value = null;\n } else if (this.mask) {\n displayValue = this.applyMask(newValue);\n value = this.processValue(displayValue);\n }\n\n this.displayValue = displayValue;\n\n if (newValue !== displayValue) {\n this.ngControl.control.setValue(displayValue);\n }\n\n if (value !== this.value) {\n this.updateValue(value);\n }\n }\n }\n\n protected removeMask(value): string {\n return doRemoveMask(value, this.mask);\n }\n\n protected applyMask(value): string {\n return doApplyMask(value, this.mask);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MaskedModelDirective} from './masked-model.directive';\n\n\n@NgModule({\n declarations: [\n MaskedModelDirective\n ],\n exports: [\n MaskedModelDirective\n ],\n imports: [\n CommonModule,\n ]\n})\nexport class ModelModule {\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"DialogModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"DialogConfirmacaoComponent"},{"__symbolic":"reference","name":"DialogIframeComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":18,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":23,"character":4}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"DialogModule"},"providers":[{"__symbolic":"reference","name":"DialogService"}]}}}},"DialogService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":13,"character":20}]}],"confirma":[{"__symbolic":"method"}],"informa":[{"__symbolic":"method"}],"iframe":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"DialogConfirmacaoData":{"__symbolic":"interface"},"DialogConfirmacaoComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"mcl-dialog-confirmacao","template":"<div mat-dialog-title>\n {{titulo | translate}}\n</div>\n\n<form (ngSubmit)=\"confirma(form)\" #form=\"ngForm\">\n <div mat-dialog-content>\n\n <p [innerHTML]=\"mensagem | translate\"></p>\n\n </div>\n\n <div mat-dialog-actions>\n <button mat-
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"DialogModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"DialogConfirmacaoComponent"},{"__symbolic":"reference","name":"DialogIframeComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":18,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":23,"character":4}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"DialogModule"},"providers":[{"__symbolic":"reference","name":"DialogService"}]}}}},"DialogService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":13,"character":20}]}],"confirma":[{"__symbolic":"method"}],"informa":[{"__symbolic":"method"}],"iframe":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"DialogConfirmacaoData":{"__symbolic":"interface"},"DialogConfirmacaoComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"mcl-dialog-confirmacao","template":"<div mat-dialog-title>\n {{titulo | translate}}\n</div>\n\n<form (ngSubmit)=\"confirma(form)\" #form=\"ngForm\">\n <div mat-dialog-content>\n\n <p [innerHTML]=\"mensagem | translate\"></p>\n\n </div>\n\n <div mat-dialog-actions>\n <button mat-button type=\"button\" mat-dialog-close *ngIf=\"cancelLabel\">\n {{cancelLabel | translate}}\n </button>\n <button mat-flat-button color=\"accent\">\n {{okLabel | translate}}\n </button>\n </div>\n</form>\n","styles":[":host{display:block;min-width:300px;max-width:420px}.mat-dialog-content{width:auto;max-width:none;min-width:auto;min-height:0;text-align:left;line-height:1.5}[mat-dialog-title]{text-align:left}[mat-dialog-actions]{justify-content:flex-end;flex-direction:row;gap:8px}@media (max-width:750px){:host{min-width:0;max-width:85vw}}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":19,"character":12}]}],null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnInit":[{"__symbolic":"method"}],"confirma":[{"__symbolic":"method"}]}},"DialogIframData":{"__symbolic":"interface"},"DialogIframeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"mcl-dialog-iframe","template":"<div mat-dialog-title >\n <h2>{{titulo}}</h2>\n <button mat-icon-button mat-dialog-close class=\"pull-right\" tabindex=\"-1\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div mat-dialog-content>\n <iframe #iframe width=\"560\" height=\"315\" [src]=\"url\" (close)=\"close()\" frameborder=\"0\"\n ></iframe>\n</div>\n","styles":["[mat-dialog-title]{display:flex}[mat-dialog-title] h2{font-size:25px;flex:1 1 auto;margin:0 0 20px}[mat-dialog-title] mat-icon{vertical-align:middle}mat-dialog-content{margin:-24px;width:calc(100% + 48px);padding:0}mat-dialog-content iframe{width:100%;height:60vh;border:0}"]}]}],"members":{"iframe":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":19,"character":3},"arguments":["iframe"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":22,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":22,"character":12}]}],null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/platform-browser","name":"DomSanitizer","line":24,"character":15}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"returnValue":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}]}},"closeDialogIframe":{"__symbolic":"function"}},"origins":{"DialogModule":"./src/dialog.module","DialogService":"./src/dialog.service","DialogConfirmacaoData":"./src/dialog-confirmacao/dialog-confirmacao.component","DialogConfirmacaoComponent":"./src/dialog-confirmacao/dialog-confirmacao.component","DialogIframData":"./src/dialog-iframe/dialog-iframe.component","DialogIframeComponent":"./src/dialog-iframe/dialog-iframe.component","closeDialogIframe":"./src/dialog-iframe/dialog-iframe.component"},"importAs":"@main-class/componentes/dialog"}
|