ng-tailwind 3.31.370 → 3.32.371

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.
@@ -1707,6 +1707,7 @@
1707
1707
  this.ngtTranslateService = ngtTranslateService;
1708
1708
  this.injector = injector;
1709
1709
  this.tooltipSize = 'max-w-xs';
1710
+ this.autoXReverse = true;
1710
1711
  if (this.ngtStylizableDirective) {
1711
1712
  this.ngtStyle = this.ngtStylizableDirective.getNgtStylizableService();
1712
1713
  }
@@ -1728,7 +1729,7 @@
1728
1729
  NgtHelperComponent.decorators = [
1729
1730
  { type: core.Component, args: [{
1730
1731
  selector: 'ngt-helper',
1731
- template: "<ngt-dropdown class=\"flex w-full hover:opacity-100\" [closeOnClick]=\"true\" [autoXReverse]='true' #dropdownRef>\n <div class=\"flex rounded-full {{ iconColor ?? 'text-green-500'}} {{ ngtStyle.compile(['px', 'text']) }}\" style=\"cursor: help;\"\n host>\n <ngt-svg *ngIf=\"icon\" [class]=\"iconSize\" [src]=\"icon\" style=\"cursor: help;\"></ngt-svg>\n\n <div *ngIf=\"!icon\" style=\"cursor: help;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path class=\"fill-current\"\n d=\"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z\" />\n </svg>\n </div>\n\n <p *ngIf=\"helpText\" class=\"cursor-pointer {{helpTextColor}}\" style=\"margin-left: 2px\">{{helpText}}</p>\n </div>\n\n <div class=\"bg-gray-100 rounded-lg hover:opacity-100 text-gray-800 {{tooltipSize}} shadow-lg {{ ngtStyle.compile(['text', 'fontCase']) }}\"\n [class.-mb-4]='dropdownRef.isYPositionReversed' container>\n <div\n class=\"{{ ngtStyle.compile(['color.bg', 'color.text']) }} flex justify-center rounded-t-lg hover:opacity-100 font-semibold border-b border-dashed border-gray-400 text-center px-6 py-1\">\n <ngt-svg *ngIf=\"iconTitle\" [src]=\"iconTitle\" style=\"margin-right: 3px\"></ngt-svg>\n {{ helpTitle || ngtTranslateService.ngtStandardHelperTitle }}\n </div>\n <div class=\"px-2 py-1 text-center hover:opacity-100\">\n <ng-content></ng-content>\n </div>\n </div>\n</ngt-dropdown>\n",
1732
+ template: "<ngt-dropdown class=\"flex w-full hover:opacity-100\" [closeOnClick]=\"true\" [autoXReverse]=\"autoXReverse\" #dropdownRef>\n <div class=\"flex rounded-full {{ iconColor ?? 'text-green-500'}} {{ ngtStyle.compile(['px', 'text']) }}\" style=\"cursor: help;\"\n host>\n <ngt-svg *ngIf=\"icon\" [class]=\"iconSize\" [src]=\"icon\" style=\"cursor: help;\"></ngt-svg>\n\n <div *ngIf=\"!icon\" style=\"cursor: help;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path class=\"fill-current\"\n d=\"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z\" />\n </svg>\n </div>\n\n <p *ngIf=\"helpText\" class=\"cursor-pointer {{helpTextColor}}\" style=\"margin-left: 2px\">{{helpText}}</p>\n </div>\n\n <div class=\"bg-gray-100 rounded-lg hover:opacity-100 text-gray-800 {{tooltipSize}} shadow-lg {{ ngtStyle.compile(['text', 'fontCase']) }}\"\n [class.-mb-4]='dropdownRef.isYPositionReversed' container>\n <div\n class=\"{{ ngtStyle.compile(['color.bg', 'color.text']) }} flex justify-center rounded-t-lg hover:opacity-100 font-semibold border-b border-dashed border-gray-400 text-center px-6 py-1\">\n <ngt-svg *ngIf=\"iconTitle\" [src]=\"iconTitle\" style=\"margin-right: 3px\"></ngt-svg>\n {{ helpTitle || ngtTranslateService.ngtStandardHelperTitle }}\n </div>\n <div class=\"px-2 py-1 text-center hover:opacity-100\">\n <ng-content></ng-content>\n </div>\n </div>\n</ngt-dropdown>\n",
1732
1733
  encapsulation: core.ViewEncapsulation.None
1733
1734
  },] }
1734
1735
  ];
@@ -1746,7 +1747,8 @@
1746
1747
  iconSize: [{ type: core.Input }],
1747
1748
  iconColor: [{ type: core.Input }],
1748
1749
  iconTitle: [{ type: core.Input }],
1749
- tooltipSize: [{ type: core.Input }]
1750
+ tooltipSize: [{ type: core.Input }],
1751
+ autoXReverse: [{ type: core.Input }]
1750
1752
  };
1751
1753
 
1752
1754
  function uuid() {
@@ -7235,6 +7237,7 @@
7235
7237
  });
7236
7238
  return _this;
7237
7239
  }
7240
+ ;
7238
7241
  NgtDropzoneComponent.prototype.ngOnChanges = function (changes) {
7239
7242
  if (changes.previewType) {
7240
7243
  this.previewType = getEnumFromString(changes.previewType.currentValue, exports.NgtDropzonePreviewType);
@@ -7357,16 +7360,20 @@
7357
7360
  };
7358
7361
  NgtDropzoneComponent.prototype.uploadFiles = function (files) {
7359
7362
  return __awaiter(this, void 0, void 0, function () {
7360
- var temporaryFiles_1, temporaryAttachments_1, observables_1;
7363
+ var temporaryFiles_1, temporaryAttachments_1, observables_1, unacceptedFiles_1;
7361
7364
  var _this = this;
7362
7365
  return __generator(this, function (_a) {
7363
7366
  if (files && files.length) {
7364
7367
  temporaryFiles_1 = [];
7365
7368
  temporaryAttachments_1 = [];
7366
7369
  observables_1 = [];
7370
+ unacceptedFiles_1 = [];
7367
7371
  this.loading = true;
7368
7372
  this.onFileUploadInit.emit();
7369
7373
  files.forEach(function (file) {
7374
+ if (file.type.includes(_this.unacceptedFiles)) {
7375
+ return unacceptedFiles_1.push(file);
7376
+ }
7370
7377
  observables_1.push(_this.ngtAttachmentHttpService.upload(_this.remoteResource, file).pipe(operators.map(function (response) {
7371
7378
  if (response && response.data) {
7372
7379
  if (response.data.attributes && response.data.attributes.data) {
@@ -7382,6 +7389,10 @@
7382
7389
  }
7383
7390
  })));
7384
7391
  });
7392
+ if (!observables_1.length && unacceptedFiles_1.length) {
7393
+ this.loading = false;
7394
+ return [2 /*return*/, this.onFileSelectError.emit(exports.NgtDropzoneErrorType.TYPE)];
7395
+ }
7385
7396
  this.subscriptions.push(rxjs.forkJoin(observables_1).subscribe(function (response) {
7386
7397
  var _a;
7387
7398
  (_a = _this.uploadedResources).push.apply(_a, __spreadArray([], __read(temporaryFiles_1)));
@@ -7393,6 +7404,9 @@
7393
7404
  }
7394
7405
  _this.onFileUploaded.emit();
7395
7406
  _this.loading = false;
7407
+ if (unacceptedFiles_1.length) {
7408
+ _this.onFileSelectError.emit(exports.NgtDropzoneErrorType.TYPE);
7409
+ }
7396
7410
  }, function (error) {
7397
7411
  _this.onFileUploadFail.emit(error);
7398
7412
  _this.loading = false;
@@ -7594,6 +7608,7 @@
7594
7608
  canDownloadFile: [{ type: core.Input }],
7595
7609
  verticalExpandable: [{ type: core.Input }],
7596
7610
  acceptedFiles: [{ type: core.Input }],
7611
+ unacceptedFiles: [{ type: core.Input }],
7597
7612
  maxFileSize: [{ type: core.Input }],
7598
7613
  previewType: [{ type: core.Input }],
7599
7614
  isRequired: [{ type: core.Input }],