myrta-ui 13.0.12 → 13.0.14

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.
@@ -13440,9 +13440,7 @@ class InputFileComponent {
13440
13440
  file: file
13441
13441
  };
13442
13442
  if (!this._checkForUpload(data)) {
13443
- if (!this.autoUpload) {
13444
- this.filesChanged.emit(this.files);
13445
- }
13443
+ this.filesChanged.emit(this.files);
13446
13444
  return;
13447
13445
  }
13448
13446
  const formData = this._createFormData();
@@ -13478,9 +13476,9 @@ class InputFileComponent {
13478
13476
  if (data.execution) {
13479
13477
  data.execution.unsubscribe();
13480
13478
  }
13479
+ // ВАЖНО: эмитим ВСЕ файлы, включая файлы с ошибками
13481
13480
  if (this.files.every(s => !s.uploading)) {
13482
- const completedFiles = this.files.filter(s => !s.error);
13483
- this.filesChanged.emit(completedFiles);
13481
+ this.filesChanged.emit(this.files);
13484
13482
  }
13485
13483
  }
13486
13484
  }
@@ -13515,7 +13513,9 @@ class InputFileComponent {
13515
13513
  data.uploading = false;
13516
13514
  return false;
13517
13515
  }
13518
- if (this.allowedExtensions.length > 0 && !this.allowedExtensions.some(s => data.file && data.file.name.toLowerCase().endsWith(s.toLowerCase()))) {
13516
+ if (this.allowedExtensions.length > 0 &&
13517
+ data.file &&
13518
+ !this.allowedExtensions.some(s => data.file.name.toLowerCase().endsWith(s.toLowerCase()))) {
13519
13519
  data.error = this.messageInvalidFileFormat;
13520
13520
  data.uploading = false;
13521
13521
  return false;