ng-tailwind 4.2.25 → 4.2.27

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.
@@ -2989,6 +2989,9 @@ class NgtSelectComponent extends NgtBaseNgModel {
2989
2989
  if (!this.items) {
2990
2990
  this.items = [];
2991
2991
  }
2992
+ if (this.canAutoSelectUniqueOption()) {
2993
+ this.onNativeChange(this.items[0]);
2994
+ }
2992
2995
  this.ngSelectItems = new Observable((observer) => {
2993
2996
  this.ngSearchObserver = observer;
2994
2997
  observer.next(this.items);
@@ -3105,10 +3108,9 @@ class NgtSelectComponent extends NgtBaseNgModel {
3105
3108
  this.subscriptions = [];
3106
3109
  }
3107
3110
  canAutoSelectUniqueOption(response) {
3108
- return !this.value
3109
- && this.autoSelectUniqueOption
3110
- && Array.isArray(response.data)
3111
- && response.data?.length === 1;
3111
+ return !this.value && this.autoSelectUniqueOption
3112
+ && ((Array.isArray(response?.data) && response?.data?.length === 1)
3113
+ || (!response && Array.isArray(this.items) && this.items?.length == 1));
3112
3114
  }
3113
3115
  }
3114
3116
  NgtSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtSelectComponent, deps: [{ token: NgtStylizableDirective, optional: true, self: true }, { token: i0.Injector }, { token: i2$2.ControlContainer, host: true, optional: true }, { token: NgtFormComponent, optional: true, skipSelf: true }, { token: NgtHttpService }, { token: i0.ChangeDetectorRef }, { token: NgtTranslateService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
@@ -7414,11 +7416,12 @@ class NgtDropzoneComponent extends NgtBaseNgModel {
7414
7416
  if (attachments && attachments.length && attachments[0]) {
7415
7417
  let temporaryResource = [];
7416
7418
  let observables = [];
7417
- attachments.forEach(attachment => {
7419
+ attachments.forEach((attachment) => {
7418
7420
  if (!(attachment instanceof File) && !attachment.loaded) {
7419
7421
  this.loading = true;
7420
7422
  attachment['loaded'] = true;
7421
- observables.push(this.ngtAttachmentHttpService.thumbnail(attachment).pipe(map((response) => {
7423
+ observables.push(this.ngtAttachmentHttpService.preview(attachment)
7424
+ .pipe(map((response) => {
7422
7425
  temporaryResource.push({
7423
7426
  id: response.data.getApiId(),
7424
7427
  file: response.data.getAttribute('file')