@3kles/kles-material-table-v2 21.6.0 → 21.7.1

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.
@@ -24,7 +24,7 @@ import * as i24 from '@angular/cdk/drag-drop';
24
24
  import { CdkDragHandle, DragDropModule } from '@angular/cdk/drag-drop';
25
25
  import * as i25 from '@angular/material/progress-spinner';
26
26
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
27
- import { Subject, BehaviorSubject, combineLatest, startWith, of, auditTime, switchMap, concat, catchError, map, filter, take, defer, defaultIfEmpty, merge, debounceTime, distinctUntilChanged, scan, concatMap, withLatestFrom, shareReplay } from 'rxjs';
27
+ import { Subject, BehaviorSubject, combineLatest, startWith, of, auditTime, switchMap, concat, catchError, map, filter, take, defer, defaultIfEmpty, fromEvent, skip, merge, debounceTime, distinctUntilChanged, scan, concatMap, withLatestFrom, shareReplay } from 'rxjs';
28
28
  import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
29
29
  import * as _ from 'lodash';
30
30
  import ___default from 'lodash';
@@ -97,6 +97,7 @@ const ROW_DRAG_DROP = new InjectionToken('ROW_DRAG_DROP');
97
97
  const DRAG_DROP_CONFIG = new InjectionToken('DRAG_DROP_CONFIG');
98
98
  const KLES_DRAG_DROP_ROW_CONTEXT = new InjectionToken('KLES_DRAG_DROP_ROW_CONTEXT');
99
99
  const PAGINATOR_CONFIG = new InjectionToken('PAGINATOR_CONFIG');
100
+ const INFINITE_SCROLL_CONFIG = new InjectionToken('INFINITE_SCROLL_CONFIG');
100
101
  const SORT_CONFIG = new InjectionToken('SORT_CONFIG');
101
102
  const HEADER_SERVICE = new InjectionToken('HEADER_SERVICE');
102
103
  const LOADER_SERVICE = new InjectionToken('LOADER_SERVICE');
@@ -3231,14 +3232,128 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
3231
3232
  type: Injectable
3232
3233
  }] });
3233
3234
 
3235
+ class InfiniteScrollService {
3236
+ constructor(config, loaderConfig, loader, linesService, paginatorStore, sortStore, filterStore, form, scrollbarService, eventsService, destroyRef) {
3237
+ this.config = config;
3238
+ this.loaderConfig = loaderConfig;
3239
+ this.loader = loader;
3240
+ this.linesService = linesService;
3241
+ this.paginatorStore = paginatorStore;
3242
+ this.sortStore = sortStore;
3243
+ this.filterStore = filterStore;
3244
+ this.form = form;
3245
+ this.scrollbarService = scrollbarService;
3246
+ this.eventsService = eventsService;
3247
+ this.destroyRef = destroyRef;
3248
+ this.registered = false;
3249
+ this.loading = false;
3250
+ this.lastLoadedPage = 0;
3251
+ this._loadingMore = signal(false, ...(ngDevMode ? [{ debugName: "_loadingMore" }] : /* istanbul ignore next */ []));
3252
+ this.loadingMore = this._loadingMore.asReadonly();
3253
+ }
3254
+ register(element) {
3255
+ this.element = element;
3256
+ if (this.registered)
3257
+ return;
3258
+ this.registered = true;
3259
+ fromEvent(element, 'scroll', { passive: true })
3260
+ .pipe(auditTime(this.config.scrollDebounceTime ?? 100), takeUntilDestroyed(this.destroyRef))
3261
+ .subscribe(() => this.loadNextPageIfNeeded());
3262
+ this.loader
3263
+ .load()
3264
+ .pipe(takeUntilDestroyed(this.destroyRef))
3265
+ .subscribe((response) => {
3266
+ this.loading = response.loading;
3267
+ if (!response.loading) {
3268
+ this._loadingMore.set(false);
3269
+ if (!response.error) {
3270
+ this.lastLoadedPage = this.paginatorStore.snapshot().page;
3271
+ this.checkViewportAfterRender();
3272
+ }
3273
+ }
3274
+ });
3275
+ this.sortStore.sort$.pipe(skip(1), takeUntilDestroyed(this.destroyRef)).subscribe(() => this.reset());
3276
+ this.filterStore.filters$.pipe(skip(1), takeUntilDestroyed(this.destroyRef)).subscribe(() => this.reset());
3277
+ this.eventsService.events$
3278
+ .pipe(filter((event) => event.type === 'refresh'), takeUntilDestroyed(this.destroyRef))
3279
+ .subscribe(() => this.reset());
3280
+ const params$ = this.loaderConfig.lines.params?.();
3281
+ params$?.pipe(skip(1), takeUntilDestroyed(this.destroyRef)).subscribe(() => this.reset());
3282
+ }
3283
+ loadNextPageIfNeeded() {
3284
+ const element = this.element;
3285
+ if (!element || this.loading || this._loadingMore())
3286
+ return;
3287
+ const remaining = element.scrollHeight - element.scrollTop - element.clientHeight;
3288
+ if (remaining > (this.config.scrollThreshold ?? 200))
3289
+ return;
3290
+ const loadedRows = this.form.getRows().length;
3291
+ const total = this.linesService.total();
3292
+ if (total === 0 || loadedRows >= total)
3293
+ return;
3294
+ const previousPage = this.lastLoadedPage;
3295
+ const pageSize = this.paginatorStore.snapshot().perPage;
3296
+ const pageIndex = previousPage + 1;
3297
+ this._loadingMore.set(true);
3298
+ this.paginatorStore.setPage({ page: pageIndex, perPage: pageSize });
3299
+ this.eventsService.emit('pageChange', {
3300
+ pageIndex,
3301
+ previousPageIndex: previousPage,
3302
+ pageSize,
3303
+ totalItems: total,
3304
+ });
3305
+ }
3306
+ reset() {
3307
+ const pagination = this.paginatorStore.snapshot();
3308
+ this.lastLoadedPage = 0;
3309
+ this._loadingMore.set(false);
3310
+ this.scrollbarService.toTop('instant');
3311
+ if (pagination.page !== 0) {
3312
+ this.paginatorStore.setPage({ page: 0, perPage: pagination.perPage });
3313
+ }
3314
+ }
3315
+ checkViewportAfterRender() {
3316
+ if (typeof requestAnimationFrame === 'function') {
3317
+ requestAnimationFrame(() => this.loadNextPageIfNeeded());
3318
+ }
3319
+ }
3320
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteScrollService, deps: [{ token: INFINITE_SCROLL_CONFIG }, { token: LOADER_CONFIG }, { token: LOADER_SERVICE }, { token: LINES_SERVICE }, { token: PaginatorStore }, { token: SortStore }, { token: FilterStore }, { token: KlesForm }, { token: ScrollbarService }, { token: EventsService }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
3321
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteScrollService }); }
3322
+ }
3323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteScrollService, decorators: [{
3324
+ type: Injectable
3325
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
3326
+ type: Inject,
3327
+ args: [INFINITE_SCROLL_CONFIG]
3328
+ }] }, { type: undefined, decorators: [{
3329
+ type: Inject,
3330
+ args: [LOADER_CONFIG]
3331
+ }] }, { type: undefined, decorators: [{
3332
+ type: Inject,
3333
+ args: [LOADER_SERVICE]
3334
+ }] }, { type: undefined, decorators: [{
3335
+ type: Inject,
3336
+ args: [LINES_SERVICE]
3337
+ }] }, { type: PaginatorStore }, { type: SortStore }, { type: FilterStore }, { type: KlesForm }, { type: ScrollbarService }, { type: EventsService }, { type: i0.DestroyRef }] });
3338
+
3234
3339
  class InfiniteScrollTableComponent {
3235
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteScrollTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3236
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: InfiniteScrollTableComponent, isStandalone: true, selector: "kles-infinite-scroll-table", ngImport: i0, template: "" }); }
3340
+ constructor(infiniteScrollService) {
3341
+ this.infiniteScrollService = infiniteScrollService;
3342
+ this.loadingMore = infiniteScrollService.loadingMore;
3343
+ }
3344
+ ngAfterViewInit() {
3345
+ this.infiniteScrollService.register(this.table.formElemRef.nativeElement);
3346
+ }
3347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteScrollTableComponent, deps: [{ token: InfiniteScrollService }], target: i0.ɵɵFactoryTarget.Component }); }
3348
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: InfiniteScrollTableComponent, isStandalone: true, selector: "kles-infinite-scroll-table", viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true, static: true }], ngImport: i0, template: "<kles-table></kles-table>\n\n@if (loadingMore()) {\n <div class=\"loading-more-indicator\" role=\"status\" aria-label=\"Loading more rows\">\n <mat-spinner [diameter]=\"24\"></mat-spinner>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;position:relative;height:100%;overflow:hidden}kles-table{min-height:0;flex:1 1 auto}.loading-more-indicator{position:absolute;inset-inline-start:50%;bottom:24px;z-index:600;display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--mat-sys-outline-variant);border-radius:50%;background:var(--mat-sys-surface-container-high);box-shadow:var(--mat-sys-level3);transform:translate(-50%);pointer-events:none}\n"], dependencies: [{ kind: "component", type: TableComponent, selector: "kles-table" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i25.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
3237
3349
  }
3238
3350
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteScrollTableComponent, decorators: [{
3239
3351
  type: Component,
3240
- args: [{ selector: 'kles-infinite-scroll-table', standalone: true, imports: [], template: "" }]
3241
- }] });
3352
+ args: [{ selector: 'kles-infinite-scroll-table', standalone: true, imports: [TableComponent, MatProgressSpinnerModule], template: "<kles-table></kles-table>\n\n@if (loadingMore()) {\n <div class=\"loading-more-indicator\" role=\"status\" aria-label=\"Loading more rows\">\n <mat-spinner [diameter]=\"24\"></mat-spinner>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;position:relative;height:100%;overflow:hidden}kles-table{min-height:0;flex:1 1 auto}.loading-more-indicator{position:absolute;inset-inline-start:50%;bottom:24px;z-index:600;display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--mat-sys-outline-variant);border-radius:50%;background:var(--mat-sys-surface-container-high);box-shadow:var(--mat-sys-level3);transform:translate(-50%);pointer-events:none}\n"] }]
3353
+ }], ctorParameters: () => [{ type: InfiniteScrollService }], propDecorators: { table: [{
3354
+ type: ViewChild,
3355
+ args: [TableComponent, { static: true }]
3356
+ }] } });
3242
3357
 
3243
3358
  class SelectionLoaderService {
3244
3359
  constructor(selectionConfig) {
@@ -4365,6 +4480,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
4365
4480
  type: Inject,
4366
4481
  args: [LOADER_SERVICE]
4367
4482
  }] }, { type: KlesForm }, { type: ColumnsService }, { type: RowFormFactory }, { type: ExtraRowService }, { type: PaginatorService }, { type: EventsService }] });
4483
+ class LinesInfiniteService {
4484
+ constructor(loader, fm, columnsService, rowFactory, extraRowService, paginatorStore, eventsService) {
4485
+ this.loader = loader;
4486
+ this.fm = fm;
4487
+ this.columnsService = columnsService;
4488
+ this.rowFactory = rowFactory;
4489
+ this.extraRowService = extraRowService;
4490
+ this.paginatorStore = paginatorStore;
4491
+ this.eventsService = eventsService;
4492
+ this.destroyRef = inject(DestroyRef);
4493
+ this._total = 0;
4494
+ this._loaded = new EventEmitter();
4495
+ this._loading = new EventEmitter();
4496
+ }
4497
+ register() {
4498
+ this.loader
4499
+ .load()
4500
+ .pipe(takeUntilDestroyed(this.destroyRef))
4501
+ .subscribe((response) => {
4502
+ if (response.loading) {
4503
+ this._loading.emit();
4504
+ this.eventsService.emit('loadStart');
4505
+ return;
4506
+ }
4507
+ if (response.error) {
4508
+ this.eventsService.emit('loadError', {
4509
+ error: response.error,
4510
+ message: response.error?.message,
4511
+ });
4512
+ return;
4513
+ }
4514
+ const rows = this.rowFactory.createRows(this.columnsService
4515
+ .columns()
4516
+ .map((column) => ({ ...column.cell?.field, name: column.columnDef }))
4517
+ .concat(this.extraRowService.extraFields()), response.items ?? []);
4518
+ if (this.paginatorStore.snapshot().page === 0) {
4519
+ this.fm.setRows(rows);
4520
+ }
4521
+ else {
4522
+ this.fm.insertRows(rows);
4523
+ }
4524
+ this._total = response.total ?? 0;
4525
+ this._loaded.emit();
4526
+ this.eventsService.emit('loadSuccess', {
4527
+ total: this._total,
4528
+ values: response.items ?? [],
4529
+ rawValues: this.fm.getRows().getRawValue(),
4530
+ rows: this.fm.getRows().controls,
4531
+ });
4532
+ });
4533
+ }
4534
+ total() {
4535
+ return this._total;
4536
+ }
4537
+ loaded() {
4538
+ return this._loaded;
4539
+ }
4540
+ loading() {
4541
+ return this._loading;
4542
+ }
4543
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: LinesInfiniteService, deps: [{ token: LOADER_SERVICE }, { token: KlesForm }, { token: ColumnsService }, { token: RowFormFactory }, { token: ExtraRowService }, { token: PaginatorStore }, { token: EventsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4544
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: LinesInfiniteService }); }
4545
+ }
4546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: LinesInfiniteService, decorators: [{
4547
+ type: Injectable
4548
+ }], ctorParameters: () => [{ type: LoaderLazyService, decorators: [{
4549
+ type: Inject,
4550
+ args: [LOADER_SERVICE]
4551
+ }] }, { type: KlesForm }, { type: ColumnsService }, { type: RowFormFactory }, { type: ExtraRowService }, { type: PaginatorStore }, { type: EventsService }] });
4368
4552
 
4369
4553
  class LoadingOrchestratorService {
4370
4554
  constructor(loader, loadingService) {
@@ -4397,6 +4581,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
4397
4581
  type: Inject,
4398
4582
  args: [LOADER_SERVICE]
4399
4583
  }] }, { type: LoadingService }] });
4584
+ class InfiniteLoadingOrchestratorService {
4585
+ constructor(loader, loadingService, form) {
4586
+ this.loader = loader;
4587
+ this.loadingService = loadingService;
4588
+ this.form = form;
4589
+ this.destroyRef = inject(DestroyRef);
4590
+ }
4591
+ register() {
4592
+ this.loader
4593
+ .load()
4594
+ .pipe(takeUntilDestroyed(this.destroyRef))
4595
+ .subscribe((response) => {
4596
+ if (response.loading && this.form.getRows().length === 0) {
4597
+ this.loadingService.start();
4598
+ }
4599
+ else {
4600
+ this.loadingService.stop();
4601
+ }
4602
+ });
4603
+ }
4604
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteLoadingOrchestratorService, deps: [{ token: LOADER_SERVICE }, { token: LoadingService }, { token: KlesForm }], target: i0.ɵɵFactoryTarget.Injectable }); }
4605
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteLoadingOrchestratorService }); }
4606
+ }
4607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: InfiniteLoadingOrchestratorService, decorators: [{
4608
+ type: Injectable
4609
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
4610
+ type: Inject,
4611
+ args: [LOADER_SERVICE]
4612
+ }] }, { type: LoadingService }, { type: KlesForm }] });
4400
4613
 
4401
4614
  class TableService {
4402
4615
  constructor(klesForm, columnsService, datasourceService, linesService, headerService, selectionService, loadingOrchestratorService, scrollbarOrchestratorService) {
@@ -4539,6 +4752,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
4539
4752
  type: Inject,
4540
4753
  args: [LINES_SERVICE]
4541
4754
  }] }, { type: ScrollbarService }] });
4755
+ class ScrollbarInfiniteOrchestratorService {
4756
+ constructor(linesService, scrollbarService) {
4757
+ this.linesService = linesService;
4758
+ this.scrollbarService = scrollbarService;
4759
+ this.destroyRef = inject(DestroyRef);
4760
+ }
4761
+ register() {
4762
+ this.linesService
4763
+ .loaded()
4764
+ .pipe(takeUntilDestroyed(this.destroyRef))
4765
+ .subscribe(() => this.scrollbarService.showScrollbar());
4766
+ }
4767
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ScrollbarInfiniteOrchestratorService, deps: [{ token: LINES_SERVICE }, { token: ScrollbarService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4768
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ScrollbarInfiniteOrchestratorService }); }
4769
+ }
4770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ScrollbarInfiniteOrchestratorService, decorators: [{
4771
+ type: Injectable
4772
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
4773
+ type: Inject,
4774
+ args: [LINES_SERVICE]
4775
+ }] }, { type: ScrollbarService }] });
4542
4776
 
4543
4777
  class DynamicTableLoaderDirective {
4544
4778
  constructor(viewContainerRef) {
@@ -4566,6 +4800,9 @@ class DynamicTableLoaderDirective {
4566
4800
  this.clearComponent();
4567
4801
  }
4568
4802
  loadComponent() {
4803
+ if (this.tableConfig().infinite && !this.tableConfig().lazy) {
4804
+ throw new Error('KlesMaterialTable: infinite scrolling requires a lazy lines loader.');
4805
+ }
4569
4806
  if (this.componentRef) {
4570
4807
  this.clearComponent();
4571
4808
  }
@@ -4594,7 +4831,13 @@ class DynamicTableLoaderDirective {
4594
4831
  }
4595
4832
  }
4596
4833
  initInjector() {
4597
- const storeProviders = [RowContextStore, SortStore, FilterStore, ...(this.tableConfig().paginator ? [PaginatorStore] : []), ExpandedRowStore];
4834
+ const storeProviders = [
4835
+ RowContextStore,
4836
+ SortStore,
4837
+ FilterStore,
4838
+ ...(this.tableConfig().paginator || this.tableConfig().infinite ? [PaginatorStore] : []),
4839
+ ExpandedRowStore,
4840
+ ];
4598
4841
  const emptyState = this.tableConfig().emptyState;
4599
4842
  const emptyStateIntl = typeof emptyState === 'object' && emptyState !== null ? emptyState.intl : undefined;
4600
4843
  const configProviders = [
@@ -4638,6 +4881,15 @@ class DynamicTableLoaderDirective {
4638
4881
  pageSizeOptions: this.tableConfig().pageSizeOptions,
4639
4882
  },
4640
4883
  },
4884
+ {
4885
+ provide: INFINITE_SCROLL_CONFIG,
4886
+ useValue: {
4887
+ infinite: this.tableConfig().infinite ?? false,
4888
+ pageSize: this.tableConfig().pageSize,
4889
+ scrollThreshold: this.tableConfig().scrollThreshold,
4890
+ scrollDebounceTime: this.tableConfig().scrollDebounceTime,
4891
+ },
4892
+ },
4641
4893
  ...(this.tableConfig().customMatPaginatorIntl
4642
4894
  ? [
4643
4895
  {
@@ -4660,20 +4912,32 @@ class DynamicTableLoaderDirective {
4660
4912
  : []),
4661
4913
  ];
4662
4914
  const orchestratorProviders = [
4663
- LoadingOrchestratorService,
4664
- ...(this.tableConfig().lazy
4915
+ this.tableConfig().infinite
4916
+ ? {
4917
+ provide: LoadingOrchestratorService,
4918
+ useClass: InfiniteLoadingOrchestratorService,
4919
+ }
4920
+ : LoadingOrchestratorService,
4921
+ ...(this.tableConfig().infinite
4665
4922
  ? [
4666
4923
  {
4667
4924
  provide: SCROLLBAR_ORCHESTRATOR_SERVICE,
4668
- useClass: ScrollbarLazyOrchestratorService,
4925
+ useClass: ScrollbarInfiniteOrchestratorService,
4669
4926
  },
4670
4927
  ]
4671
- : [
4672
- {
4673
- provide: SCROLLBAR_ORCHESTRATOR_SERVICE,
4674
- useClass: ScrollbarOrchestratorService,
4675
- },
4676
- ]),
4928
+ : this.tableConfig().lazy
4929
+ ? [
4930
+ {
4931
+ provide: SCROLLBAR_ORCHESTRATOR_SERVICE,
4932
+ useClass: ScrollbarLazyOrchestratorService,
4933
+ },
4934
+ ]
4935
+ : [
4936
+ {
4937
+ provide: SCROLLBAR_ORCHESTRATOR_SERVICE,
4938
+ useClass: ScrollbarOrchestratorService,
4939
+ },
4940
+ ]),
4677
4941
  ];
4678
4942
  const datasourceProvider = this.tableConfig().lazy
4679
4943
  ? [
@@ -4698,6 +4962,7 @@ class DynamicTableLoaderDirective {
4698
4962
  ColumnsService,
4699
4963
  FooterService,
4700
4964
  ScrollbarService,
4965
+ ...(this.tableConfig().infinite ? [InfiniteScrollService] : []),
4701
4966
  EventsService,
4702
4967
  RowService,
4703
4968
  CellService,
@@ -4722,7 +4987,7 @@ class DynamicTableLoaderDirective {
4722
4987
  },
4723
4988
  {
4724
4989
  provide: LINES_SERVICE,
4725
- useClass: LinesLazyService,
4990
+ useClass: this.tableConfig().infinite ? LinesInfiniteService : LinesLazyService,
4726
4991
  },
4727
4992
  {
4728
4993
  provide: SELECTION_SERVICE,
@@ -5040,5 +5305,5 @@ var AlignCell;
5040
5305
  * Generated bundle index. Do not edit.
5041
5306
  */
5042
5307
 
5043
- export { AlignCell, COLUMNS, DATASOURCE_SERVICE, DRAG_DROP_CONFIG, EMPTY_STATE_CONFIG, EXTRA_ROWS, FOOTER, HEADER_SERVICE, KLES_DRAG_DROP_ROW_CONTEXT, KlesMaterialTableModule, KlesTableComponent, KlesTableEmptyStateComponent, KlesTableIntl, LINES_SERVICE, LOADER_CONFIG, LOADER_SERVICE, MULTI_UNFOLD, PAGINATOR_CONFIG, ROW_DRAG_DROP, SCROLLBAR_ORCHESTRATOR_SERVICE, SELECTION_CONFIG, SELECTION_SERVICE, SORT_CONFIG, SORT_SERVICE, Span, TABLE_SERVICE, TableComponent, linesLazyLoader, linesLoader, selectionConfig };
5308
+ export { AlignCell, COLUMNS, DATASOURCE_SERVICE, DRAG_DROP_CONFIG, EMPTY_STATE_CONFIG, EXTRA_ROWS, FOOTER, HEADER_SERVICE, INFINITE_SCROLL_CONFIG, KLES_DRAG_DROP_ROW_CONTEXT, KlesMaterialTableModule, KlesTableComponent, KlesTableEmptyStateComponent, KlesTableIntl, LINES_SERVICE, LOADER_CONFIG, LOADER_SERVICE, MULTI_UNFOLD, PAGINATOR_CONFIG, ROW_DRAG_DROP, SCROLLBAR_ORCHESTRATOR_SERVICE, SELECTION_CONFIG, SELECTION_SERVICE, SORT_CONFIG, SORT_SERVICE, Span, TABLE_SERVICE, TableComponent, linesLazyLoader, linesLoader, selectionConfig };
5044
5309
  //# sourceMappingURL=3kles-kles-material-table-v2.mjs.map