@annalib/anna-core 18.2.20 → 18.2.22

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.
@@ -5323,6 +5323,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
5323
5323
  }]
5324
5324
  }], ctorParameters: function () { return []; } });
5325
5325
 
5326
+ class FixedRowsPopupTableDirective {
5327
+ constructor(el, renderer) {
5328
+ this.el = el;
5329
+ this.renderer = renderer;
5330
+ this.popupRowHeight = 37.5;
5331
+ this.popupHeaderHeight = 38;
5332
+ this.maxRowsRenderedWithoutScrollForPopup = 10;
5333
+ }
5334
+ onWindowResize() {
5335
+ this.setPopUpTableHeight();
5336
+ }
5337
+ ngOnInit() {
5338
+ this.setPopUpTableHeight();
5339
+ }
5340
+ setPopUpTableHeight() {
5341
+ const viewportHeight = window.innerHeight;
5342
+ const maxNoOfRowsToDisplay = viewportHeight < 740 ? 5 : 10;
5343
+ this.maxRowsRenderedWithoutScrollForPopup = maxNoOfRowsToDisplay;
5344
+ let totalPopupTableHeight = this.maxRowsRenderedWithoutScrollForPopup * this.popupRowHeight + this.popupHeaderHeight;
5345
+ let tableHeightForPopup = (this.tableDataLength < this.maxRowsRenderedWithoutScrollForPopup) ? ((this.popupRowHeight) * (this.tableDataLength ? this.tableDataLength : 1)) + this.popupHeaderHeight : totalPopupTableHeight;
5346
+ this.renderer.setStyle(this.el.nativeElement, 'height', `calc(${tableHeightForPopup}px)`);
5347
+ }
5348
+ }
5349
+ FixedRowsPopupTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FixedRowsPopupTableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
5350
+ FixedRowsPopupTableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FixedRowsPopupTableDirective, selector: "[fixedRowsInPopupTable]", inputs: { popupRowHeight: "popupRowHeight", popupHeaderHeight: "popupHeaderHeight", tableDataLength: "tableDataLength" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0 });
5351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FixedRowsPopupTableDirective, decorators: [{
5352
+ type: Directive,
5353
+ args: [{
5354
+ selector: '[fixedRowsInPopupTable]'
5355
+ }]
5356
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { popupRowHeight: [{
5357
+ type: Input
5358
+ }], popupHeaderHeight: [{
5359
+ type: Input
5360
+ }], tableDataLength: [{
5361
+ type: Input
5362
+ }], onWindowResize: [{
5363
+ type: HostListener,
5364
+ args: ['window:resize']
5365
+ }] } });
5366
+
5326
5367
  // Angular import statements
5327
5368
  class AnnaCoreModule {
5328
5369
  }
@@ -5353,7 +5394,8 @@ AnnaCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
5353
5394
  AnnaColumnCheckboxFilterComponent,
5354
5395
  AnnaDeletedOrderIconTemplateComponent,
5355
5396
  AnnaColumnSliderFilterComponent,
5356
- AnnaDateFormatterPipe], imports: [CommonModule,
5397
+ AnnaDateFormatterPipe,
5398
+ FixedRowsPopupTableDirective], imports: [CommonModule,
5357
5399
  NgbModule,
5358
5400
  FormsModule,
5359
5401
  MatRadioModule,
@@ -5387,7 +5429,8 @@ AnnaCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
5387
5429
  DigitOnlyDirective,
5388
5430
  AnnaDeletedOrderIconTemplateComponent,
5389
5431
  AnnaColumnSliderFilterComponent,
5390
- AnnaDateFormatterPipe] });
5432
+ AnnaDateFormatterPipe,
5433
+ FixedRowsPopupTableDirective] });
5391
5434
  AnnaCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AnnaCoreModule, imports: [CommonModule,
5392
5435
  NgbModule,
5393
5436
  FormsModule,
@@ -5435,7 +5478,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
5435
5478
  AnnaColumnCheckboxFilterComponent,
5436
5479
  AnnaDeletedOrderIconTemplateComponent,
5437
5480
  AnnaColumnSliderFilterComponent,
5438
- AnnaDateFormatterPipe
5481
+ AnnaDateFormatterPipe,
5482
+ FixedRowsPopupTableDirective
5439
5483
  ],
5440
5484
  imports: [
5441
5485
  CommonModule,
@@ -5483,7 +5527,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
5483
5527
  DigitOnlyDirective,
5484
5528
  AnnaDeletedOrderIconTemplateComponent,
5485
5529
  AnnaColumnSliderFilterComponent,
5486
- AnnaDateFormatterPipe
5530
+ AnnaDateFormatterPipe,
5531
+ FixedRowsPopupTableDirective
5487
5532
  ]
5488
5533
  }]
5489
5534
  }] });
@@ -5664,5 +5709,5 @@ OrderSources.WOZ = "WOZ";
5664
5709
  * Generated bundle index. Do not edit.
5665
5710
  */
5666
5711
 
5667
- export { AllSelectedStatus, AnnaBuyerApprovalIconTemplateComponent, AnnaCalendarFilterComponent, AnnaColumnCheckboxFilterComponent, AnnaColumnDateRangeFilterComponent, AnnaColumnSliderFilterComponent, AnnaColumnTimeFilterComponent, AnnaConvertZeroOrNullOrUndefinedPipe, AnnaCoreModule, AnnaDateFormatterPipe, AnnaDateTimeFormatService, AnnaDeletedOrderIconTemplateComponent, AnnaFilterSearchedTextPipe, AnnaFilterService, AnnaFixedRowSizeTableVirtualScrollStrategy, AnnaFixedRowSizeTableVirtualScrollStrategyDirective, AnnaGlobalConfigService, AnnaGtHelperService, AnnaIconColumnComponent, AnnaLiveIconTemplateComponent, AnnaNoDataComponent, AnnaNonEditableGenericTableComponent, AnnaNotifyIconTemplateComponent, AnnaNumberFormatService, AnnaPayForPerformanceIconTemplateComponent, AnnaPersistingFilterService, AnnaRejectedIconTemplateComponent, AnnaReplaceCharPipe, AnnaSortComponent, AnnaSortService, AnnaTableVirtualScrollViewportComponent, AnnaTypeofDataPipe, AnnaVirtualTableDirective, AnnaWeekCalendarComponent, ClickableItem, Constants, Days, DigitOnlyDirective, ErrorCodes, OrderSources, SortTypeEnum, TooltipModel, UserActivationStatus, fixedSizeVirtualScrollStrategyFactory, radioButtonModel, showEllipsisTextOnHoverDirective, tooltipModelForColumnLevelFiltering };
5712
+ export { AllSelectedStatus, AnnaBuyerApprovalIconTemplateComponent, AnnaCalendarFilterComponent, AnnaColumnCheckboxFilterComponent, AnnaColumnDateRangeFilterComponent, AnnaColumnSliderFilterComponent, AnnaColumnTimeFilterComponent, AnnaConvertZeroOrNullOrUndefinedPipe, AnnaCoreModule, AnnaDateFormatterPipe, AnnaDateTimeFormatService, AnnaDeletedOrderIconTemplateComponent, AnnaFilterSearchedTextPipe, AnnaFilterService, AnnaFixedRowSizeTableVirtualScrollStrategy, AnnaFixedRowSizeTableVirtualScrollStrategyDirective, AnnaGlobalConfigService, AnnaGtHelperService, AnnaIconColumnComponent, AnnaLiveIconTemplateComponent, AnnaNoDataComponent, AnnaNonEditableGenericTableComponent, AnnaNotifyIconTemplateComponent, AnnaNumberFormatService, AnnaPayForPerformanceIconTemplateComponent, AnnaPersistingFilterService, AnnaRejectedIconTemplateComponent, AnnaReplaceCharPipe, AnnaSortComponent, AnnaSortService, AnnaTableVirtualScrollViewportComponent, AnnaTypeofDataPipe, AnnaVirtualTableDirective, AnnaWeekCalendarComponent, ClickableItem, Constants, Days, DigitOnlyDirective, ErrorCodes, FixedRowsPopupTableDirective, OrderSources, SortTypeEnum, TooltipModel, UserActivationStatus, fixedSizeVirtualScrollStrategyFactory, radioButtonModel, showEllipsisTextOnHoverDirective, tooltipModelForColumnLevelFiltering };
5668
5713
  //# sourceMappingURL=annalib-anna-core.mjs.map