[{"__symbolic":"module","version":3,"metadata":{"ThfUploadComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@totvs/thf-core/components/thf-field-base","name":"ThfUploadBaseComponent"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"thf-upload","template":"<thf-field-container [t-label]=\"label\" [t-help]=\"help\" [t-opcional]=\"!required\"> <div class=\"thf-upload\"> <div (click)=\"onClick()\"> <input type=\"file\" [name]=\"name\" [id]=\"id\" (change)=\"onFileChange($event)\" [accept]=\"fileRestrictions?.allowedExtensions\" [multiple]=\"isMultiple\" class=\"thf-upload-input\" [disabled]=\"hasAnyFileUploading(currentFiles) || !url || disabled\"> <div for=\"file\" class=\"thf-upload-button\" [ngClass]=\"{'thf-upload-button-disabled': hasAnyFileUploading(currentFiles) || !url || disabled}\"> Selecionar arquivo </div> </div> <div class=\"thf-upload-progress\" *ngFor=\"let file of currentFiles\" [id]=\"file.uid\"> <div class=\"thf-upload-progress-status\"></div> <div class=\"thf-upload-filename-foreground\"> <div class=\"thf-upload-filename\"> <span class=\"thf-icon {{ getThfIcon(file) }}\"></span> {{ file.name }} - {{ getFileSize(file.size) }} </div> <div (click)=\"removeFile(file)\" *ngIf=\"isStatusFile('None', file)\"> <span class=\"thf-upload-action\"> Excluir </span> </div> <div (click)=\"stopUpload(file)\" *ngIf=\"isStatusFile('Uploading', file)\"> <span class=\"thf-upload-action\"> Cancelar </span> </div> <div (click)=\"uploadFiles([file])\" *ngIf=\"isStatusFile('Error', file)\"> <span class=\"thf-upload-action\"> Tentar Novamente </span> </div> </div> </div> <thf-button *ngIf=\"!autoUpload && currentFiles?.length > 0\" [t-disabled]=\"hasAnyFileUploading(currentFiles)\" t-primary=\"true\" t-label=\"Iniciar envio\" (t-click)=\"uploadFiles(currentFiles)\"> </thf-button> </div> </thf-field-container> ","providers":[{"__symbolic":"reference","module":"./thf-upload.service","name":"ThfUploadService"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./thf-upload.service","name":"ThfUploadService"},{"__symbolic":"reference","module":"@angular/forms","name":"NgControl"}]}],"onClick":[{"__symbolic":"method"}],"onFileChange":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"uploadFiles":[{"__symbolic":"method"}],"stopUpload":[{"__symbolic":"method"}],"stopUploadHandler":[{"__symbolic":"method"}],"uploadingHandler":[{"__symbolic":"method"}],"successHandler":[{"__symbolic":"method"}],"errorHandler":[{"__symbolic":"method"}],"isStatusFile":[{"__symbolic":"method"}],"hasAnyFileUploading":[{"__symbolic":"method"}],"getThfIcon":[{"__symbolic":"method"}],"setUploadStatus":[{"__symbolic":"method"}],"setProgressStatus":[{"__symbolic":"method"}],"removeFile":[{"__symbolic":"method"}],"getFileSize":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"addFileNameClass":[{"__symbolic":"method"}],"removeFileNameClass":[{"__symbolic":"method"}],"parseFiles":[{"__symbolic":"method"}],"checkRestrictions":[{"__symbolic":"method"}],"isAllowedExtension":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ThfUploadComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@totvs/thf-core/components/thf-field-base","name":"ThfUploadBaseComponent"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"thf-upload","template":"<thf-field-container [t-label]=\"label\" [t-help]=\"help\" [t-opcional]=\"!required\"> <div class=\"thf-upload\"> <div (click)=\"onClick()\"> <input type=\"file\" [name]=\"name\" [id]=\"id\" (change)=\"onFileChange($event)\" [accept]=\"fileRestrictions?.allowedExtensions\" [multiple]=\"isMultiple\" class=\"thf-upload-input\" [disabled]=\"hasAnyFileUploading(currentFiles) || !url || disabled\"> <div for=\"file\" class=\"thf-upload-button\" [ngClass]=\"{'thf-upload-button-disabled': hasAnyFileUploading(currentFiles) || !url || disabled}\"> Selecionar arquivo </div> </div> <div class=\"thf-upload-progress\" *ngFor=\"let file of currentFiles\" [id]=\"file.uid\"> <div class=\"thf-upload-progress-status\"></div> <div class=\"thf-upload-filename-foreground\"> <div class=\"thf-upload-filename\"> <span class=\"thf-icon {{ getThfIcon(file) }}\"></span> {{ file.name }} - {{ getFileSize(file.size) }} </div> <div (click)=\"removeFile(file)\" *ngIf=\"isStatusFile('None', file)\"> <span class=\"thf-upload-action\"> Excluir </span> </div> <div (click)=\"stopUpload(file)\" *ngIf=\"isStatusFile('Uploading', file)\"> <span class=\"thf-upload-action\"> Cancelar </span> </div> <div (click)=\"uploadFiles([file])\" *ngIf=\"isStatusFile('Error', file)\"> <span class=\"thf-upload-action\"> Tentar Novamente </span> </div> </div> </div> <thf-button *ngIf=\"!autoUpload && currentFiles?.length > 0\" [t-disabled]=\"hasAnyFileUploading(currentFiles)\" t-primary=\"true\" t-label=\"Iniciar envio\" (t-click)=\"uploadFiles(currentFiles)\"> </thf-button> </div> </thf-field-container> ","providers":[{"__symbolic":"reference","module":"./thf-upload.service","name":"ThfUploadService"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./thf-upload.service","name":"ThfUploadService"},{"__symbolic":"reference","module":"@angular/forms","name":"NgControl"}]}],"onClick":[{"__symbolic":"method"}],"onFileChange":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"uploadFiles":[{"__symbolic":"method"}],"stopUpload":[{"__symbolic":"method"}],"stopUploadHandler":[{"__symbolic":"method"}],"uploadingHandler":[{"__symbolic":"method"}],"successHandler":[{"__symbolic":"method"}],"errorHandler":[{"__symbolic":"method"}],"isStatusFile":[{"__symbolic":"method"}],"hasAnyFileUploading":[{"__symbolic":"method"}],"getThfIcon":[{"__symbolic":"method"}],"setUploadStatus":[{"__symbolic":"method"}],"setProgressStatus":[{"__symbolic":"method"}],"removeFile":[{"__symbolic":"method"}],"getFileSize":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"addFileNameClass":[{"__symbolic":"method"}],"removeFileNameClass":[{"__symbolic":"method"}],"parseFiles":[{"__symbolic":"method"}],"checkRestrictions":[{"__symbolic":"method"}],"isAllowedExtension":[{"__symbolic":"method"}]}}}}]