ng-tailwind 3.31.370 → 3.32.370

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.
@@ -7235,6 +7235,7 @@
7235
7235
  });
7236
7236
  return _this;
7237
7237
  }
7238
+ ;
7238
7239
  NgtDropzoneComponent.prototype.ngOnChanges = function (changes) {
7239
7240
  if (changes.previewType) {
7240
7241
  this.previewType = getEnumFromString(changes.previewType.currentValue, exports.NgtDropzonePreviewType);
@@ -7357,16 +7358,20 @@
7357
7358
  };
7358
7359
  NgtDropzoneComponent.prototype.uploadFiles = function (files) {
7359
7360
  return __awaiter(this, void 0, void 0, function () {
7360
- var temporaryFiles_1, temporaryAttachments_1, observables_1;
7361
+ var temporaryFiles_1, temporaryAttachments_1, observables_1, unacceptedFiles_1;
7361
7362
  var _this = this;
7362
7363
  return __generator(this, function (_a) {
7363
7364
  if (files && files.length) {
7364
7365
  temporaryFiles_1 = [];
7365
7366
  temporaryAttachments_1 = [];
7366
7367
  observables_1 = [];
7368
+ unacceptedFiles_1 = [];
7367
7369
  this.loading = true;
7368
7370
  this.onFileUploadInit.emit();
7369
7371
  files.forEach(function (file) {
7372
+ if (file.type.includes(_this.unacceptedFiles)) {
7373
+ return unacceptedFiles_1.push(file);
7374
+ }
7370
7375
  observables_1.push(_this.ngtAttachmentHttpService.upload(_this.remoteResource, file).pipe(operators.map(function (response) {
7371
7376
  if (response && response.data) {
7372
7377
  if (response.data.attributes && response.data.attributes.data) {
@@ -7382,6 +7387,10 @@
7382
7387
  }
7383
7388
  })));
7384
7389
  });
7390
+ if (!observables_1.length && unacceptedFiles_1.length) {
7391
+ this.loading = false;
7392
+ return [2 /*return*/, this.onFileSelectError.emit(exports.NgtDropzoneErrorType.TYPE)];
7393
+ }
7385
7394
  this.subscriptions.push(rxjs.forkJoin(observables_1).subscribe(function (response) {
7386
7395
  var _a;
7387
7396
  (_a = _this.uploadedResources).push.apply(_a, __spreadArray([], __read(temporaryFiles_1)));
@@ -7393,6 +7402,9 @@
7393
7402
  }
7394
7403
  _this.onFileUploaded.emit();
7395
7404
  _this.loading = false;
7405
+ if (unacceptedFiles_1.length) {
7406
+ _this.onFileSelectError.emit(exports.NgtDropzoneErrorType.TYPE);
7407
+ }
7396
7408
  }, function (error) {
7397
7409
  _this.onFileUploadFail.emit(error);
7398
7410
  _this.loading = false;
@@ -7594,6 +7606,7 @@
7594
7606
  canDownloadFile: [{ type: core.Input }],
7595
7607
  verticalExpandable: [{ type: core.Input }],
7596
7608
  acceptedFiles: [{ type: core.Input }],
7609
+ unacceptedFiles: [{ type: core.Input }],
7597
7610
  maxFileSize: [{ type: core.Input }],
7598
7611
  previewType: [{ type: core.Input }],
7599
7612
  isRequired: [{ type: core.Input }],