@acorex/components 7.10.2 → 7.11.0

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.
@@ -7,11 +7,16 @@ import * as i2 from '@acorex/components/result';
7
7
  import { AXResultModule } from '@acorex/components/result';
8
8
  import * as i3 from '@acorex/core/translation';
9
9
  import { AXTranslationModule } from '@acorex/core/translation';
10
+ import * as i4 from '@acorex/components/decorators';
10
11
  import { AXDecoratorModule } from '@acorex/components/decorators';
11
12
  import { AXLoadingModule } from '@acorex/components/loading';
12
13
  import * as i2$1 from '@angular/cdk/scrolling';
13
14
  import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
14
15
  import _ from 'lodash';
16
+ import * as i5 from '@acorex/components/skeleton';
17
+ import { AXSkeletonModule } from '@acorex/components/skeleton';
18
+ import * as i6 from '@acorex/components/button';
19
+ import { AXButtonModule } from '@acorex/components/button';
15
20
 
16
21
  class AXDataColumnComponent {
17
22
  constructor() {
@@ -142,11 +147,11 @@ class AXDataTableComponent extends MXBaseComponent {
142
147
  this._fetchData();
143
148
  }
144
149
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
145
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTableComponent, selector: "ax-data-table", inputs: { rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", showHeader: "showHeader", pageSize: "pageSize", fetchDataMode: "fetchDataMode", items: "items" }, outputs: { onPageChanged: "onPageChanged" }, providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }], queries: [{ propertyName: "_columns", predicate: AXDataColumnComponent }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-wrapper\">\n <!-- [axIsLoading]=\"isLoading\" -->\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.AXResultComponent, selector: "ax-result", inputs: ["type", "caption", "description"] }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
150
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTableComponent, selector: "ax-data-table", inputs: { rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", showHeader: "showHeader", pageSize: "pageSize", fetchDataMode: "fetchDataMode", items: "items" }, outputs: { onPageChanged: "onPageChanged" }, providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }], queries: [{ propertyName: "_columns", predicate: AXDataColumnComponent }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-wrapper\">\n <!-- [axIsLoading]=\"isLoading\" -->\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.875rem}ax-data-table2 .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:nth-child(odd){background-color:rgba(var(--ax-color-on-surface),.7)}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.AXResultComponent, selector: "ax-result", inputs: ["type", "caption", "description"] }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
146
151
  }
147
152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableComponent, decorators: [{
148
153
  type: Component,
149
- args: [{ selector: 'ax-data-table', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }], template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-wrapper\">\n <!-- [axIsLoading]=\"isLoading\" -->\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"] }]
154
+ args: [{ selector: 'ax-data-table', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }], template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-wrapper\">\n <!-- [axIsLoading]=\"isLoading\" -->\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.875rem}ax-data-table2 .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:nth-child(odd){background-color:rgba(var(--ax-color-on-surface),.7)}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"] }]
150
155
  }], propDecorators: { _columns: [{
151
156
  type: ContentChildren,
152
157
  args: [AXDataColumnComponent]
@@ -176,9 +181,13 @@ class AXDataTable2Component extends MXBaseComponent {
176
181
  this.dataSource = convertArrayToDataSource([]);
177
182
  this.isLoading = true;
178
183
  this.hasItems = false;
184
+ this.totalRows = 0;
185
+ this.startRowIndex = 0;
186
+ this.endRowIndex = 0;
179
187
  this.lastIndex = 0;
180
188
  this.itemHeight = 40;
181
189
  this.width = "100%";
190
+ this.height = "100%";
182
191
  this.onScrolledIndexChanged = new EventEmitter();
183
192
  }
184
193
  get pageSize() {
@@ -203,6 +212,7 @@ class AXDataTable2Component extends MXBaseComponent {
203
212
  this.listDataSource.source
204
213
  .onChanged
205
214
  .subscribe((data) => {
215
+ this.totalRows = data.totalCount;
206
216
  this.hasItems = data.totalCount > 0;
207
217
  setTimeout(() => {
208
218
  this.render();
@@ -226,8 +236,9 @@ class AXDataTable2Component extends MXBaseComponent {
226
236
  if (this.columns && this.columns.length) {
227
237
  const sum = _.sum(this.columns.toArray().map(c => typeof c.width == 'number' ? c.width : Number(c.width.replace('px', ''))));
228
238
  this.width = `${Math.max(sum, this.getHostElement().clientWidth - 5)}px`;
229
- //console.log(this.width);
230
239
  }
240
+ this.height = `calc(100% - ${((this.headerContainer?.nativeElement.clientHeight ?? 0) + (this.footerContainer?.nativeElement.clientHeight ?? 0))}px)`;
241
+ this.startRowIndex = (this.listDataSource?.range.start ?? 0) + this.pageSize;
231
242
  }
232
243
  render() {
233
244
  this.viewport.checkViewportSize();
@@ -238,11 +249,11 @@ class AXDataTable2Component extends MXBaseComponent {
238
249
  this.dataSource.refresh();
239
250
  }
240
251
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTable2Component, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
241
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTable2Component, selector: "ax-data-table2", inputs: { rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", loadingTemplate: "loadingTemplate", showHeader: "showHeader", pageSize: "pageSize", fetchDataMode: "fetchDataMode", dataSource: "dataSource", itemHeight: "itemHeight" }, outputs: { onPageChanged: "onPageChanged", onScrolledIndexChanged: "onScrolledIndexChanged" }, providers: [{ provide: AXPagedComponent, useExisting: AXDataTable2Component }], queries: [{ propertyName: "columns", predicate: AXDataColumnComponent }], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "headerContainer", first: true, predicate: ["headerContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-table-header\" #headerContainer>\n <table tabindex=\"0\" *ngIf=\"showHeader\" [style.width]=\"width\">\n <thead>\n <tr>\n <th *ngFor=\"let c of columns\" [style.width]=\"c.width\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n <th>&nbsp;</th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement style=\"height: calc(100% - 52px);\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <!-- <ng-container *ngIf=\"hasItems;else emptyTpl\"> -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index;\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n {{item[c.valueField]}}\n </ng-container>\n </td>\n </ng-template>\n </ng-container>\n <td>&nbsp;</td>\n </tr>\n </ng-template>\n </ng-container>\n <!-- </ng-container> -->\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n ...\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>\n\n<!-- \n<div class=\"ax-wrapper\">\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{item[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template> \n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content> -->", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i2$1.CdkVirtualScrollableElement, selector: "[cdkVirtualScrollingElement]" }, { kind: "component", type: i2.AXResultComponent, selector: "ax-result", inputs: ["type", "caption", "description"] }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
252
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTable2Component, selector: "ax-data-table2", inputs: { rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", loadingTemplate: "loadingTemplate", showHeader: "showHeader", pageSize: "pageSize", fetchDataMode: "fetchDataMode", dataSource: "dataSource", itemHeight: "itemHeight" }, outputs: { onPageChanged: "onPageChanged", onScrolledIndexChanged: "onScrolledIndexChanged" }, providers: [{ provide: AXPagedComponent, useExisting: AXDataTable2Component }], queries: [{ propertyName: "columns", predicate: AXDataColumnComponent }], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "headerContainer", first: true, predicate: ["headerContainer"], descendants: true }, { propertyName: "footerContainer", first: true, predicate: ["footerContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-table-header\" #headerContainer>\n <table tabindex=\"0\" *ngIf=\"showHeader\" [style.width]=\"width\">\n <thead>\n <tr>\n <th *ngFor=\"let c of columns\" [style.width]=\"c.width\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n <th>&nbsp;</th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement [style.height]=\"height\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <!-- <ng-container *ngIf=\"hasItems;else emptyTpl\"> -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index;\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n {{item[c.valueField]}}\n </ng-container>\n </td>\n </ng-template>\n </ng-container>\n <td>&nbsp;</td>\n </tr>\n </ng-template>\n </ng-container>\n <!-- </ng-container> -->\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<div class=\"ax-table-footer\" #footerContainer>\n <div class=\"ax-table-info\">\n <div>\n Showing <span style=\"font-weight: 600;\">{{startRowIndex}}</span> of <span\n style=\"font-weight: 600;\">{{totalRows}}</span>\n </div>\n <ax-button look=\"blank\">\n <ax-icon icon=\"ax-icon ax-icon-refresh\"></ax-icon>\n </ax-button>\n </div>\n <ng-content select=\"ax-footer\">\n </ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <ax-skeleton [animated]=\"true\" class=\"ax-w-1/2 ax-h-4 ax-rounded\"></ax-skeleton>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.875rem}ax-data-table2 .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:nth-child(odd){background-color:rgba(var(--ax-color-on-surface),.7)}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i2$1.CdkVirtualScrollableElement, selector: "[cdkVirtualScrollingElement]" }, { kind: "component", type: i2.AXResultComponent, selector: "ax-result", inputs: ["type", "caption", "description"] }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i5.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: i6.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
242
253
  }
243
254
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTable2Component, decorators: [{
244
255
  type: Component,
245
- args: [{ selector: 'ax-data-table2', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXPagedComponent, useExisting: AXDataTable2Component }], template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-table-header\" #headerContainer>\n <table tabindex=\"0\" *ngIf=\"showHeader\" [style.width]=\"width\">\n <thead>\n <tr>\n <th *ngFor=\"let c of columns\" [style.width]=\"c.width\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n <th>&nbsp;</th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement style=\"height: calc(100% - 52px);\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <!-- <ng-container *ngIf=\"hasItems;else emptyTpl\"> -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index;\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n {{item[c.valueField]}}\n </ng-container>\n </td>\n </ng-template>\n </ng-container>\n <td>&nbsp;</td>\n </tr>\n </ng-template>\n </ng-container>\n <!-- </ng-container> -->\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n ...\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>\n\n<!-- \n<div class=\"ax-wrapper\">\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{item[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template> \n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content> -->", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"] }]
256
+ args: [{ selector: 'ax-data-table2', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXPagedComponent, useExisting: AXDataTable2Component }], template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-table-header\" #headerContainer>\n <table tabindex=\"0\" *ngIf=\"showHeader\" [style.width]=\"width\">\n <thead>\n <tr>\n <th *ngFor=\"let c of columns\" [style.width]=\"c.width\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n <th>&nbsp;</th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement [style.height]=\"height\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <!-- <ng-container *ngIf=\"hasItems;else emptyTpl\"> -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index;\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n {{item[c.valueField]}}\n </ng-container>\n </td>\n </ng-template>\n </ng-container>\n <td>&nbsp;</td>\n </tr>\n </ng-template>\n </ng-container>\n <!-- </ng-container> -->\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<div class=\"ax-table-footer\" #footerContainer>\n <div class=\"ax-table-info\">\n <div>\n Showing <span style=\"font-weight: 600;\">{{startRowIndex}}</span> of <span\n style=\"font-weight: 600;\">{{totalRows}}</span>\n </div>\n <ax-button look=\"blank\">\n <ax-icon icon=\"ax-icon ax-icon-refresh\"></ax-icon>\n </ax-button>\n </div>\n <ng-content select=\"ax-footer\">\n </ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <ax-skeleton [animated]=\"true\" class=\"ax-w-1/2 ax-h-4 ax-rounded\"></ax-skeleton>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>", styles: ["ax-data-table{display:flex;flex-direction:column;border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:transparent}ax-data-table .ax-wrapper{display:flex;flex:1 1 0%;overflow:auto}ax-data-table>ax-header{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table>ax-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table table{position:relative;border:0}ax-data-table table thead{position:sticky;top:0}ax-data-table table tbody{height:100%}ax-data-table table td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-data-table2{border-radius:var(--ax-rounded-border-default);border:1px solid;border-color:rgba(var(--ax-color-border-default));height:100%;font-size:.875rem;overflow-y:hidden;overflow-x:hidden}ax-data-table2 table{table-layout:fixed}ax-data-table2 .ax-table-header{border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);background-color:rgba(var(--ax-color-on-surface));border-collapse:collapse;overflow:hidden}ax-data-table2 .ax-table-header th{text-transform:uppercase;font-weight:500;text-align:start;padding:.875rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table2 .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.875rem}ax-data-table2 .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}ax-data-table2 .ax-table-body{border-collapse:collapse}ax-data-table2 .ax-table-body tr:nth-child(odd){background-color:rgba(var(--ax-color-on-surface),.7)}ax-data-table2 .ax-table-body tr:last-child td{border-block-end:none}ax-data-table2 .ax-table-body td{text-align:start;padding:.875rem 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table2 .ax-table-body td:last-child{border-inline-end:0px solid}\n"] }]
246
257
  }], propDecorators: { columns: [{
247
258
  type: ContentChildren,
248
259
  args: [AXDataColumnComponent]
@@ -272,13 +283,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
272
283
  }], headerContainer: [{
273
284
  type: ViewChild,
274
285
  args: ['headerContainer']
286
+ }], footerContainer: [{
287
+ type: ViewChild,
288
+ args: ['footerContainer']
275
289
  }] } });
276
290
 
277
291
  const COMPONENT = [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent];
278
- const MODULES = [CommonModule, ScrollingModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule];
292
+ const MODULES = [CommonModule, ScrollingModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule, AXSkeletonModule, AXButtonModule];
279
293
  class AXDataTableModule {
280
294
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
281
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, declarations: [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent], imports: [CommonModule, ScrollingModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule], exports: [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent] }); }
295
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, declarations: [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent], imports: [CommonModule, ScrollingModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule, AXSkeletonModule, AXButtonModule], exports: [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent] }); }
282
296
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, imports: [MODULES] }); }
283
297
  }
284
298
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-data-table.mjs","sources":["../../../../libs/components/data-table/src/lib/data-column.directive.ts","../../../../libs/components/data-table/src/lib/data-table.component.ts","../../../../libs/components/data-table/src/lib/data-table.component.html","../../../../libs/components/data-table/src/lib/data-table2.component.ts","../../../../libs/components/data-table/src/lib/data-table2.component.html","../../../../libs/components/data-table/src/lib/data-table.module.ts","../../../../libs/components/data-table/src/acorex-components-data-table.ts"],"sourcesContent":["import { Directive, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: 'ax-data-column',\n})\nexport class AXDataColumnComponent {\n @Input()\n headerTemplate?: TemplateRef<unknown>;\n\n @Input()\n cellTemplate?: TemplateRef<unknown>;\n\n @Input()\n valueField: string;\n\n @Input()\n caption: string;\n\n @Input()\n width: string | number = 'auto';\n}\n","import {\n AXDataListFetchDataCallback,\n AXDataListItems,\n AXPagedComponent,\n AXPagedComponentInterface,\n AXValueChangedEvent,\n MXBaseComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXDataColumnComponent } from './data-column.directive';\n\n@Component({\n selector: 'ax-data-table',\n templateUrl: './data-table.component.html',\n styleUrls: ['./data-table.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }],\n})\nexport class AXDataTableComponent extends MXBaseComponent implements AXPagedComponentInterface {\n @ContentChildren(AXDataColumnComponent)\n protected _columns: QueryList<AXDataColumnComponent>;\n\n @Output()\n onPageChanged: EventEmitter<AXValueChangedEvent<number>> = new EventEmitter<AXValueChangedEvent<number>>();\n\n @Input()\n rowTemplate?: TemplateRef<unknown>;\n\n @Input()\n emptyTemplate?: TemplateRef<unknown>;\n\n @Input()\n showHeader: boolean = true;\n\n private _pageSize = 20;\n @Input()\n public get pageSize(): number {\n return this._pageSize;\n }\n public set pageSize(v: number) {\n this._pageSize = v;\n }\n\n @Input()\n fetchDataMode: 'auto' | 'manual' = 'auto';\n\n private _currentPage = 1;\n\n private _loadedItems: any[] = [];\n private _totalItems = 0;\n\n private _isLazy = false;\n\n protected _isLoading = false;\n\n get totalCount(): number {\n return this._totalItems;\n }\n\n protected get isLazy(): boolean {\n return this._isLazy;\n }\n\n protected get isLoading(): boolean {\n return this._isLoading;\n }\n\n protected get loadedCount(): number {\n return this._loadedItems?.length || 0;\n }\n\n private _items: AXDataListItems = [];\n\n @Input()\n get items(): AXDataListItems {\n return this._items;\n }\n set items(v: AXDataListItems) {\n if (Array.isArray(v)) {\n this._items = v;\n } else if (typeof v === 'function') {\n this._isLazy = true;\n this._items = v;\n } else {\n this._items = [];\n }\n }\n\n get displayItems(): any[] {\n if (Array.isArray(this.items)) {\n return (this._items || []) as any[];\n } else if (typeof this._items == 'function') {\n return this._loadedItems || [];\n }\n return [];\n }\n\n ngAfterViewInit(): void {\n if (this.fetchDataMode == 'auto') this._fetchData();\n }\n\n _fetchData(opts?: { searchQuery?: string }) {\n const skip = (this._currentPage - 1) * this.pageSize,\n take = this.pageSize;\n if (\n (this.loadedCount >= this.totalCount && this.totalCount != 0) ||\n this._isLoading ||\n !this._isLazy ||\n skip > this.totalCount\n ) {\n return;\n }\n if (this._items) {\n this._isLoading = true;\n this.cdr.markForCheck();\n const fetchFn = this._items as AXDataListFetchDataCallback;\n fetchFn({ skip, take, searchQuery: opts?.searchQuery })\n .then((c) => {\n if (Array.isArray(c)) {\n this._loadedItems = c;\n this._totalItems = c.length;\n } else {\n this._totalItems = c.total || c.items?.length || 0;\n this._loadedItems = [...new Set(c.items)];\n }\n })\n .finally(() => {\n this._isLoading = false;\n this.onPageChanged.next({\n component: this,\n isUserInteraction: false,\n name: 'page',\n value: this._currentPage,\n });\n this.cdr.markForCheck();\n });\n }\n }\n\n refresh() {\n this._totalItems = 0;\n this._loadedItems = [];\n this._fetchData();\n }\n\n goToPage(page: number) {\n this._currentPage = page;\n this._fetchData();\n }\n}\n","<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-wrapper\">\n <!-- [axIsLoading]=\"isLoading\" -->\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>","import {\n AXPagedComponent,\n AXPagedComponentInterface,\n AXValueChangedEvent,\n MXBaseComponent,\n AXListDataSource,\n convertArrayToDataSource,\n AXDataSource,\n AXEvent\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXDataColumnComponent } from './data-column.directive';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport _ from 'lodash';\n\nexport interface AXDataTableScrollIndexChanged extends AXEvent {\n index: number;\n}\n\n@Component({\n selector: 'ax-data-table2',\n templateUrl: './data-table2.component.html',\n styleUrls: ['./data-table.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXPagedComponent, useExisting: AXDataTable2Component }],\n})\nexport class AXDataTable2Component extends MXBaseComponent {\n @ContentChildren(AXDataColumnComponent)\n protected columns: QueryList<AXDataColumnComponent>;\n\n @Output()\n onPageChanged: EventEmitter<AXValueChangedEvent<number>> = new EventEmitter<AXValueChangedEvent<number>>();\n\n @Input()\n rowTemplate?: TemplateRef<unknown>;\n\n @Input()\n emptyTemplate?: TemplateRef<unknown>;\n\n\n @Input()\n loadingTemplate: TemplateRef<unknown>;\n\n @Input()\n showHeader = true;\n\n private _pageSize = 20;\n @Input()\n public get pageSize(): number {\n return this._pageSize;\n }\n public set pageSize(v: number) {\n this._pageSize = v;\n }\n\n @Input()\n fetchDataMode: 'auto' | 'manual' = 'auto';\n\n @Input()\n dataSource: AXDataSource<unknown> = convertArrayToDataSource([]);\n\n protected listDataSource: AXListDataSource<unknown>;\n protected isLoading = true;\n protected hasItems = false;\n private lastIndex = 0;\n\n @Input()\n itemHeight: number | 'auto' = 40;\n\n protected width = \"100%\"\n\n\n @ViewChild(CdkVirtualScrollViewport)\n private viewport: CdkVirtualScrollViewport;\n\n\n @Output()\n onScrolledIndexChanged: EventEmitter<AXDataTableScrollIndexChanged> =\n new EventEmitter<AXDataTableScrollIndexChanged>();\n\n trackByIdx(i) {\n return i;\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.listDataSource = new AXListDataSource<unknown>({\n source: this.dataSource,\n });\n this.listDataSource.source\n .onLoadingChanged\n .subscribe((data) => {\n this.isLoading = data;\n });\n this.listDataSource.source\n .onChanged\n .subscribe((data) => {\n this.hasItems = data.totalCount > 0;\n setTimeout(() => {\n this.render();\n }, 100);\n });\n }\n @ViewChild('headerContainer') headerContainer: ElementRef;\n\n protected _handleOnscrolledIndexChange(e: number) {\n this.lastIndex = e;\n this.onScrolledIndexChanged.emit({\n component: this,\n index: this.lastIndex,\n isUserInteraction: true,\n });\n }\n\n ngDoCheck() {\n if (this.headerContainer) {\n const headerContainer = this.headerContainer.nativeElement;\n const left = this.getHostElement().querySelector('.cdk-virtual-scrollable').scrollLeft;\n headerContainer.scrollLeft = left\n }\n if (this.columns && this.columns.length) {\n const sum = _.sum(this.columns.toArray().map(c => typeof c.width == 'number' ? c.width : Number(c.width.replace('px', ''))));\n this.width = `${Math.max(sum, this.getHostElement().clientWidth - 5)}px`;\n //console.log(this.width);\n }\n }\n\n public render() {\n this.viewport.checkViewportSize();\n this.viewport.scrollToIndex(this.lastIndex);\n this.cdr.markForCheck();\n }\n\n public refresh() {\n this.dataSource.refresh();\n }\n}\n","<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-table-header\" #headerContainer>\n <table tabindex=\"0\" *ngIf=\"showHeader\" [style.width]=\"width\">\n <thead>\n <tr>\n <th *ngFor=\"let c of columns\" [style.width]=\"c.width\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n <th>&nbsp;</th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement style=\"height: calc(100% - 52px);\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <!-- <ng-container *ngIf=\"hasItems;else emptyTpl\"> -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index;\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n {{item[c.valueField]}}\n </ng-container>\n </td>\n </ng-template>\n </ng-container>\n <td>&nbsp;</td>\n </tr>\n </ng-template>\n </ng-container>\n <!-- </ng-container> -->\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n ...\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>\n\n<!-- \n<div class=\"ax-wrapper\">\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{item[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template> \n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content> -->","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXResultModule } from '@acorex/components/result';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDataColumnComponent } from './data-column.directive';\nimport { AXDataTableComponent } from './data-table.component';\nimport { AXDataTable2Component } from './data-table2.component';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\n\nconst COMPONENT = [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent];\nconst MODULES = [CommonModule, ScrollingModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDataTableModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;MAKa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;QAiBE,IAAK,CAAA,KAAA,GAAoB,MAAM,CAAC;AACjC,KAAA;8GAfY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAArB,qBAAqB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,UAAA,EAAA,YAAA,EAAA,OAAA,EAAA,SAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC3B,iBAAA,CAAA;8BAGC,cAAc,EAAA,CAAA;sBADb,KAAK;gBAIN,YAAY,EAAA,CAAA;sBADX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,qBAAqB,EAAE,qBAAqB,CAAA,EAAA,OAAA,EAAA,CACpE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,aADpG,oBAAoB,EAAE,qBAAqB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;AASxE,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJf,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-data-table.mjs","sources":["../../../../libs/components/data-table/src/lib/data-column.directive.ts","../../../../libs/components/data-table/src/lib/data-table.component.ts","../../../../libs/components/data-table/src/lib/data-table.component.html","../../../../libs/components/data-table/src/lib/data-table2.component.ts","../../../../libs/components/data-table/src/lib/data-table2.component.html","../../../../libs/components/data-table/src/lib/data-table.module.ts","../../../../libs/components/data-table/src/acorex-components-data-table.ts"],"sourcesContent":["import { Directive, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: 'ax-data-column',\n})\nexport class AXDataColumnComponent {\n @Input()\n headerTemplate?: TemplateRef<unknown>;\n\n @Input()\n cellTemplate?: TemplateRef<unknown>;\n\n @Input()\n valueField: string;\n\n @Input()\n caption: string;\n\n @Input()\n width: string | number = 'auto';\n}\n","import {\n AXDataListFetchDataCallback,\n AXDataListItems,\n AXPagedComponent,\n AXPagedComponentInterface,\n AXValueChangedEvent,\n MXBaseComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXDataColumnComponent } from './data-column.directive';\n\n@Component({\n selector: 'ax-data-table',\n templateUrl: './data-table.component.html',\n styleUrls: ['./data-table.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }],\n})\nexport class AXDataTableComponent extends MXBaseComponent implements AXPagedComponentInterface {\n @ContentChildren(AXDataColumnComponent)\n protected _columns: QueryList<AXDataColumnComponent>;\n\n @Output()\n onPageChanged: EventEmitter<AXValueChangedEvent<number>> = new EventEmitter<AXValueChangedEvent<number>>();\n\n @Input()\n rowTemplate?: TemplateRef<unknown>;\n\n @Input()\n emptyTemplate?: TemplateRef<unknown>;\n\n @Input()\n showHeader: boolean = true;\n\n private _pageSize = 20;\n @Input()\n public get pageSize(): number {\n return this._pageSize;\n }\n public set pageSize(v: number) {\n this._pageSize = v;\n }\n\n @Input()\n fetchDataMode: 'auto' | 'manual' = 'auto';\n\n private _currentPage = 1;\n\n private _loadedItems: any[] = [];\n private _totalItems = 0;\n\n private _isLazy = false;\n\n protected _isLoading = false;\n\n get totalCount(): number {\n return this._totalItems;\n }\n\n protected get isLazy(): boolean {\n return this._isLazy;\n }\n\n protected get isLoading(): boolean {\n return this._isLoading;\n }\n\n protected get loadedCount(): number {\n return this._loadedItems?.length || 0;\n }\n\n private _items: AXDataListItems = [];\n\n @Input()\n get items(): AXDataListItems {\n return this._items;\n }\n set items(v: AXDataListItems) {\n if (Array.isArray(v)) {\n this._items = v;\n } else if (typeof v === 'function') {\n this._isLazy = true;\n this._items = v;\n } else {\n this._items = [];\n }\n }\n\n get displayItems(): any[] {\n if (Array.isArray(this.items)) {\n return (this._items || []) as any[];\n } else if (typeof this._items == 'function') {\n return this._loadedItems || [];\n }\n return [];\n }\n\n ngAfterViewInit(): void {\n if (this.fetchDataMode == 'auto') this._fetchData();\n }\n\n _fetchData(opts?: { searchQuery?: string }) {\n const skip = (this._currentPage - 1) * this.pageSize,\n take = this.pageSize;\n if (\n (this.loadedCount >= this.totalCount && this.totalCount != 0) ||\n this._isLoading ||\n !this._isLazy ||\n skip > this.totalCount\n ) {\n return;\n }\n if (this._items) {\n this._isLoading = true;\n this.cdr.markForCheck();\n const fetchFn = this._items as AXDataListFetchDataCallback;\n fetchFn({ skip, take, searchQuery: opts?.searchQuery })\n .then((c) => {\n if (Array.isArray(c)) {\n this._loadedItems = c;\n this._totalItems = c.length;\n } else {\n this._totalItems = c.total || c.items?.length || 0;\n this._loadedItems = [...new Set(c.items)];\n }\n })\n .finally(() => {\n this._isLoading = false;\n this.onPageChanged.next({\n component: this,\n isUserInteraction: false,\n name: 'page',\n value: this._currentPage,\n });\n this.cdr.markForCheck();\n });\n }\n }\n\n refresh() {\n this._totalItems = 0;\n this._loadedItems = [];\n this._fetchData();\n }\n\n goToPage(page: number) {\n this._currentPage = page;\n this._fetchData();\n }\n}\n","<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-wrapper\">\n <!-- [axIsLoading]=\"isLoading\" -->\n <table class=\"ax-table ax-table-bordered\" tabindex=\"0\">\n <thead *ngIf=\"showHeader\">\n <tr>\n <th *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"displayItems.length; else emptyTpl\">\n <ng-container *ngFor=\"let d of displayItems;let rIndex=index\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of _columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:d,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\">\n {{d[c.valueField]}}\n </td>\n </ng-template>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"_columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>\n<ng-content select=\"ax-footer\">\n</ng-content>","import {\n AXPagedComponent,\n AXPagedComponentInterface,\n AXValueChangedEvent,\n MXBaseComponent,\n AXListDataSource,\n convertArrayToDataSource,\n AXDataSource,\n AXEvent\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXDataColumnComponent } from './data-column.directive';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport _ from 'lodash';\n\nexport interface AXDataTableScrollIndexChanged extends AXEvent {\n index: number;\n}\n\n@Component({\n selector: 'ax-data-table2',\n templateUrl: './data-table2.component.html',\n styleUrls: ['./data-table.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXPagedComponent, useExisting: AXDataTable2Component }],\n})\nexport class AXDataTable2Component extends MXBaseComponent {\n @ContentChildren(AXDataColumnComponent)\n protected columns: QueryList<AXDataColumnComponent>;\n\n @Output()\n onPageChanged: EventEmitter<AXValueChangedEvent<number>> = new EventEmitter<AXValueChangedEvent<number>>();\n\n @Input()\n rowTemplate?: TemplateRef<unknown>;\n\n @Input()\n emptyTemplate?: TemplateRef<unknown>;\n\n\n @Input()\n loadingTemplate: TemplateRef<unknown>;\n\n @Input()\n showHeader = true;\n\n private _pageSize = 20;\n @Input()\n public get pageSize(): number {\n return this._pageSize;\n }\n public set pageSize(v: number) {\n this._pageSize = v;\n }\n\n @Input()\n fetchDataMode: 'auto' | 'manual' = 'auto';\n\n @Input()\n dataSource: AXDataSource<unknown> = convertArrayToDataSource([]);\n\n protected listDataSource: AXListDataSource<unknown>;\n protected isLoading = true;\n protected hasItems = false;\n protected totalRows = 0;\n protected startRowIndex = 0;\n protected endRowIndex = 0;\n private lastIndex = 0;\n\n @Input()\n itemHeight: number | 'auto' = 40;\n\n protected width = \"100%\";\n protected height = \"100%\";\n\n\n @ViewChild(CdkVirtualScrollViewport)\n private viewport: CdkVirtualScrollViewport;\n\n\n @Output()\n onScrolledIndexChanged: EventEmitter<AXDataTableScrollIndexChanged> =\n new EventEmitter<AXDataTableScrollIndexChanged>();\n\n trackByIdx(i) {\n return i;\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.listDataSource = new AXListDataSource<unknown>({\n source: this.dataSource,\n });\n this.listDataSource.source\n .onLoadingChanged\n .subscribe((data) => {\n this.isLoading = data;\n });\n this.listDataSource.source\n .onChanged\n .subscribe((data) => {\n this.totalRows = data.totalCount;\n this.hasItems = data.totalCount > 0;\n setTimeout(() => {\n this.render();\n }, 100);\n });\n }\n @ViewChild('headerContainer') headerContainer: ElementRef;\n @ViewChild('footerContainer') footerContainer: ElementRef;\n\n protected _handleOnscrolledIndexChange(e: number) {\n this.lastIndex = e;\n this.onScrolledIndexChanged.emit({\n component: this,\n index: this.lastIndex,\n isUserInteraction: true,\n });\n }\n\n ngDoCheck() {\n if (this.headerContainer) {\n const headerContainer = this.headerContainer.nativeElement;\n const left = this.getHostElement().querySelector('.cdk-virtual-scrollable').scrollLeft;\n headerContainer.scrollLeft = left\n }\n if (this.columns && this.columns.length) {\n const sum = _.sum(this.columns.toArray().map(c => typeof c.width == 'number' ? c.width : Number(c.width.replace('px', ''))));\n this.width = `${Math.max(sum, this.getHostElement().clientWidth - 5)}px`;\n }\n this.height = `calc(100% - ${((this.headerContainer?.nativeElement.clientHeight ?? 0) + (this.footerContainer?.nativeElement.clientHeight ?? 0))}px)`;\n this.startRowIndex = (this.listDataSource?.range.start ?? 0) + this.pageSize;\n }\n\n public render() {\n this.viewport.checkViewportSize();\n this.viewport.scrollToIndex(this.lastIndex);\n this.cdr.markForCheck();\n }\n\n public refresh() {\n this.dataSource.refresh();\n }\n}\n","<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-table-header\" #headerContainer>\n <table tabindex=\"0\" *ngIf=\"showHeader\" [style.width]=\"width\">\n <thead>\n <tr>\n <th *ngFor=\"let c of columns\" [style.width]=\"c.width\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n {{c.caption}}\n </ng-template>\n </th>\n <th>&nbsp;</th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement [style.height]=\"height\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <!-- <ng-container *ngIf=\"hasItems;else emptyTpl\"> -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx;let rIndex=index;\">\n <ng-template [ngIf]=\"rowTemplate\" [ngIfElse]=\"rowTpl\">\n <ng-container *ngTemplateOutlet=\"rowTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #rowTpl>\n <tr>\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <ng-container *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n {{item[c.valueField]}}\n </ng-container>\n </td>\n </ng-template>\n </ng-container>\n <td>&nbsp;</td>\n </tr>\n </ng-template>\n </ng-container>\n <!-- </ng-container> -->\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<div class=\"ax-table-footer\" #footerContainer>\n <div class=\"ax-table-info\">\n <div>\n Showing <span style=\"font-weight: 600;\">{{startRowIndex}}</span> of <span\n style=\"font-weight: 600;\">{{totalRows}}</span>\n </div>\n <ax-button look=\"blank\">\n <ax-icon icon=\"ax-icon ax-icon-refresh\"></ax-icon>\n </ax-button>\n </div>\n <ng-content select=\"ax-footer\">\n </ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <ax-skeleton [animated]=\"true\" class=\"ax-w-1/2 ax-h-4 ax-rounded\"></ax-skeleton>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXResultModule } from '@acorex/components/result';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDataColumnComponent } from './data-column.directive';\nimport { AXDataTableComponent } from './data-table.component';\nimport { AXDataTable2Component } from './data-table2.component';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXButtonModule } from '@acorex/components/button';\n\nconst COMPONENT = [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent];\nconst MODULES = [CommonModule, ScrollingModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule, AXSkeletonModule, AXButtonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDataTableModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i3","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;MAKa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;QAiBE,IAAK,CAAA,KAAA,GAAoB,MAAM,CAAC;AACjC,KAAA;8GAfY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAArB,qBAAqB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,cAAA,EAA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ects": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=16.2.0",
@@ -220,23 +220,17 @@
220
220
  "esm": "./esm2022/otp/acorex-components-otp.mjs",
221
221
  "default": "./fesm2022/acorex-components-otp.mjs"
222
222
  },
223
- "./page": {
224
- "types": "./page/index.d.ts",
225
- "esm2022": "./esm2022/page/acorex-components-page.mjs",
226
- "esm": "./esm2022/page/acorex-components-page.mjs",
227
- "default": "./fesm2022/acorex-components-page.mjs"
228
- },
229
223
  "./password-box": {
230
224
  "types": "./password-box/index.d.ts",
231
225
  "esm2022": "./esm2022/password-box/acorex-components-password-box.mjs",
232
226
  "esm": "./esm2022/password-box/acorex-components-password-box.mjs",
233
227
  "default": "./fesm2022/acorex-components-password-box.mjs"
234
228
  },
235
- "./picker": {
236
- "types": "./picker/index.d.ts",
237
- "esm2022": "./esm2022/picker/acorex-components-picker.mjs",
238
- "esm": "./esm2022/picker/acorex-components-picker.mjs",
239
- "default": "./fesm2022/acorex-components-picker.mjs"
229
+ "./page": {
230
+ "types": "./page/index.d.ts",
231
+ "esm2022": "./esm2022/page/acorex-components-page.mjs",
232
+ "esm": "./esm2022/page/acorex-components-page.mjs",
233
+ "default": "./fesm2022/acorex-components-page.mjs"
240
234
  },
241
235
  "./popover": {
242
236
  "types": "./popover/index.d.ts",
@@ -244,6 +238,12 @@
244
238
  "esm": "./esm2022/popover/acorex-components-popover.mjs",
245
239
  "default": "./fesm2022/acorex-components-popover.mjs"
246
240
  },
241
+ "./picker": {
242
+ "types": "./picker/index.d.ts",
243
+ "esm2022": "./esm2022/picker/acorex-components-picker.mjs",
244
+ "esm": "./esm2022/picker/acorex-components-picker.mjs",
245
+ "default": "./fesm2022/acorex-components-picker.mjs"
246
+ },
247
247
  "./popup": {
248
248
  "types": "./popup/index.d.ts",
249
249
  "esm2022": "./esm2022/popup/acorex-components-popup.mjs",
@@ -286,23 +286,17 @@
286
286
  "esm": "./esm2022/scheduler/acorex-components-scheduler.mjs",
287
287
  "default": "./fesm2022/acorex-components-scheduler.mjs"
288
288
  },
289
- "./search-box": {
290
- "types": "./search-box/index.d.ts",
291
- "esm2022": "./esm2022/search-box/acorex-components-search-box.mjs",
292
- "esm": "./esm2022/search-box/acorex-components-search-box.mjs",
293
- "default": "./fesm2022/acorex-components-search-box.mjs"
294
- },
295
289
  "./select-box": {
296
290
  "types": "./select-box/index.d.ts",
297
291
  "esm2022": "./esm2022/select-box/acorex-components-select-box.mjs",
298
292
  "esm": "./esm2022/select-box/acorex-components-select-box.mjs",
299
293
  "default": "./fesm2022/acorex-components-select-box.mjs"
300
294
  },
301
- "./selection-list": {
302
- "types": "./selection-list/index.d.ts",
303
- "esm2022": "./esm2022/selection-list/acorex-components-selection-list.mjs",
304
- "esm": "./esm2022/selection-list/acorex-components-selection-list.mjs",
305
- "default": "./fesm2022/acorex-components-selection-list.mjs"
295
+ "./search-box": {
296
+ "types": "./search-box/index.d.ts",
297
+ "esm2022": "./esm2022/search-box/acorex-components-search-box.mjs",
298
+ "esm": "./esm2022/search-box/acorex-components-search-box.mjs",
299
+ "default": "./fesm2022/acorex-components-search-box.mjs"
306
300
  },
307
301
  "./side-menu": {
308
302
  "types": "./side-menu/index.d.ts",
@@ -310,6 +304,12 @@
310
304
  "esm": "./esm2022/side-menu/acorex-components-side-menu.mjs",
311
305
  "default": "./fesm2022/acorex-components-side-menu.mjs"
312
306
  },
307
+ "./selection-list": {
308
+ "types": "./selection-list/index.d.ts",
309
+ "esm2022": "./esm2022/selection-list/acorex-components-selection-list.mjs",
310
+ "esm": "./esm2022/selection-list/acorex-components-selection-list.mjs",
311
+ "default": "./fesm2022/acorex-components-selection-list.mjs"
312
+ },
313
313
  "./skeleton": {
314
314
  "types": "./skeleton/index.d.ts",
315
315
  "esm2022": "./esm2022/skeleton/acorex-components-skeleton.mjs",