Skip to content

Commit c12902d

Browse files
refactor: remove comentários identificados pela rule S125
1 parent ba378ce commit c12902d

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

projects/ui/src/lib/components/po-field/po-combo/po-combo.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ export class PoComboComponent extends PoComboBaseComponent implements AfterViewI
599599

600600
this.verifyValidOption();
601601

602-
// caso for changeOnEnter deve limpar o selectedView para reinicia-lo
603602
this.selectedView = this.changeOnEnter && !this.selectedValue ? undefined : this.selectedView;
604603
} else {
605604
if (this.service && !this.getInputValue() && !this.isFirstFilter) {
@@ -821,7 +820,6 @@ export class PoComboComponent extends PoComboBaseComponent implements AfterViewI
821820
return this.infiniteScroll ? true : false;
822821
}
823822

824-
// Define o foco no item apropriado do listbox.
825823
private focusItem() {
826824
this.poListbox?.listboxItemList?.nativeElement.focus();
827825
setTimeout(() => {
@@ -845,7 +843,6 @@ export class PoComboComponent extends PoComboBaseComponent implements AfterViewI
845843
this.inputEl.nativeElement.focus();
846844
}
847845

848-
// Determina se o tab deve abrir o listbox.
849846
private shouldHandleTab(event: KeyboardEvent): boolean {
850847
return this.comboOpen && this.appendBox && !event.shiftKey;
851848
}

projects/ui/src/lib/components/po-field/po-upload/po-upload.component.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ export class PoUploadComponent extends PoUploadBaseComponent implements AfterVie
242242
return false;
243243
}
244244

245-
// retorna se o status do arquivo é diferente de enviado
246245
isAllowCancelEvent(status: PoUploadStatus) {
247246
return status !== PoUploadStatus.Uploaded;
248247
}
@@ -253,7 +252,6 @@ export class PoUploadComponent extends PoUploadBaseComponent implements AfterVie
253252
}
254253
}
255254

256-
// Função disparada ao selecionar algum arquivo.
257255
onFileChange(event): void {
258256
// necessário este tratamento quando para IE, pois nele o change é disparado quando o campo é limpado também
259257
if (this.calledByCleanInputValue) {
@@ -277,7 +275,6 @@ export class PoUploadComponent extends PoUploadBaseComponent implements AfterVie
277275
}
278276
}
279277

280-
// Remove o arquivo passado por parâmetro da lista dos arquivos correntes.
281278
removeFile(file): void {
282279
const index = this.currentFiles.indexOf(file);
283280
this.currentFiles.splice(index, 1);
@@ -360,7 +357,6 @@ export class PoUploadComponent extends PoUploadBaseComponent implements AfterVie
360357
return !!this.additionalHelpTooltip || this.isAdditionalHelpEventTriggered();
361358
}
362359

363-
// Caso o componente estiver no modo AutoUpload, o arquivo também será removido da lista.
364360
stopUpload(file: PoUploadFile) {
365361
this.uploadService.stopRequestByFile(file, () => {
366362
if (this.autoUpload) {
@@ -376,7 +372,6 @@ export class PoUploadComponent extends PoUploadBaseComponent implements AfterVie
376372
return file.uid;
377373
}
378374

379-
// Envia os arquivos passados por parâmetro, exceto os que já foram enviados ao serviço.
380375
uploadFiles(files: Array<PoUploadFile>) {
381376
const filesFiltered = files.filter(file => file.status !== PoUploadStatus.Uploaded);
382377
this.uploadService.upload(
@@ -424,20 +419,17 @@ export class PoUploadComponent extends PoUploadBaseComponent implements AfterVie
424419
return document.activeElement === this.uploadButton.buttonElement.nativeElement;
425420
}
426421

427-
// função disparada na resposta do sucesso ou error
428422
private responseHandler(file: PoUploadFile, status: PoUploadStatus) {
429423
file.status = status;
430424
file.percent = 100;
431425
this.cd.markForCheck();
432426
}
433427

434-
// método responsável por setar os argumentos do i18nPipe de acordo com a restrição.
435428
private setPipeArguments(literalAttributes: string, literalArguments?) {
436429
const pipeArguments = this.i18nPipe.transform(this.literals[literalAttributes], literalArguments);
437430
this.notification.information(pipeArguments);
438431
}
439432

440-
// Função disparada ao parar um envio de arquivo.
441433
private stopUploadHandler(file: PoUploadFile) {
442434
file.status = PoUploadStatus.None;
443435
file.percent = 0;
@@ -454,20 +446,17 @@ export class PoUploadComponent extends PoUploadBaseComponent implements AfterVie
454446
}
455447
}
456448

457-
// Atualiza o ngModel para os arquivos passados por parâmetro.
458449
private updateModel(files: Array<PoUploadFile>) {
459450
const modelFiles: Array<PoUploadFile> = this.mapCleanUploadFiles(files);
460451
this.onModelChange ? this.onModelChange(modelFiles) : this.ngModelChange.emit(modelFiles);
461452
}
462453

463-
// Função disparada enquanto o arquivo está sendo enviado ao serviço.
464454
private uploadingHandler(file: any, percent: number) {
465455
file.status = PoUploadStatus.Uploading;
466456
file.percent = percent;
467457
this.cd.markForCheck();
468458
}
469459

470-
// retorna os objetos do array sem as propriedades: percent e displayName
471460
private mapCleanUploadFiles(files: Array<PoUploadFile>): Array<PoUploadFile> {
472461
const mapedByUploadFile = progressFile => {
473462
const { percent, displayName, ...uploadFile } = progressFile;

0 commit comments

Comments
 (0)