@acorex/components 7.9.0 → 7.10.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.
Files changed (46) hide show
  1. package/common/lib/classes/datalist.class.d.ts +21 -0
  2. package/common/lib/classes/datasource.class.d.ts +31 -14
  3. package/data-table/index.d.ts +1 -0
  4. package/data-table/lib/data-table.component.d.ts +2 -2
  5. package/data-table/lib/data-table.module.d.ts +9 -7
  6. package/data-table/lib/data-table2.component.d.ts +37 -0
  7. package/drawer/lib/drawer.component.d.ts +2 -1
  8. package/esm2022/common/lib/classes/datalist.class.mjs +44 -2
  9. package/esm2022/common/lib/classes/datasource.class.mjs +18 -11
  10. package/esm2022/data-table/index.mjs +2 -1
  11. package/esm2022/data-table/lib/data-table.component.mjs +3 -4
  12. package/esm2022/data-table/lib/data-table.module.mjs +6 -4
  13. package/esm2022/data-table/lib/data-table2.component.mjs +118 -0
  14. package/esm2022/drawer/lib/drawer-container.component.mjs +1 -1
  15. package/esm2022/drawer/lib/drawer.component.mjs +8 -8
  16. package/esm2022/list/lib/list.component.mjs +5 -48
  17. package/esm2022/popup/lib/popup.interface.mjs +1 -1
  18. package/esm2022/popup/lib/popup.service.mjs +3 -1
  19. package/esm2022/progress-bar/lib/progress-bar.component.mjs +50 -5
  20. package/esm2022/select-box/lib/select-box.component.mjs +4 -5
  21. package/esm2022/selection-list/lib/selection-list.component.mjs +16 -4
  22. package/esm2022/uploader/lib/uploader-list.component.mjs +2 -2
  23. package/fesm2022/acorex-components-common.mjs +62 -12
  24. package/fesm2022/acorex-components-common.mjs.map +1 -1
  25. package/fesm2022/acorex-components-data-table.mjs +119 -9
  26. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  27. package/fesm2022/acorex-components-drawer.mjs +7 -7
  28. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  29. package/fesm2022/acorex-components-list.mjs +5 -48
  30. package/fesm2022/acorex-components-list.mjs.map +1 -1
  31. package/fesm2022/acorex-components-popup.mjs +2 -0
  32. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  33. package/fesm2022/acorex-components-progress-bar.mjs +49 -4
  34. package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
  35. package/fesm2022/acorex-components-select-box.mjs +3 -4
  36. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  37. package/fesm2022/acorex-components-selection-list.mjs +15 -3
  38. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  39. package/fesm2022/acorex-components-uploader.mjs +1 -1
  40. package/fesm2022/acorex-components-uploader.mjs.map +1 -1
  41. package/list/lib/list.component.d.ts +2 -22
  42. package/package.json +1 -1
  43. package/popup/lib/popup.interface.d.ts +3 -1
  44. package/progress-bar/lib/progress-bar.component.d.ts +12 -2
  45. package/select-box/lib/select-box.component.d.ts +4 -4
  46. package/selection-list/lib/selection-list.component.d.ts +4 -1
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, Output, NgModule } from '@angular/core';
3
- import { MXBaseComponent, AXPagedComponent } from '@acorex/components/common';
2
+ import { Directive, Input, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, Output, ViewChild, NgModule } from '@angular/core';
3
+ import { MXBaseComponent, AXPagedComponent, convertArrayToDataSource, AXListDataSource } from '@acorex/components/common';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import * as i2 from '@acorex/components/result';
@@ -9,6 +9,9 @@ import * as i3 from '@acorex/core/translation';
9
9
  import { AXTranslationModule } from '@acorex/core/translation';
10
10
  import { AXDecoratorModule } from '@acorex/components/decorators';
11
11
  import { AXLoadingModule } from '@acorex/components/loading';
12
+ import * as i2$1 from '@angular/cdk/scrolling';
13
+ import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
14
+ import _ from 'lodash';
12
15
 
13
16
  class AXDataColumnComponent {
14
17
  constructor() {
@@ -37,7 +40,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
37
40
  class AXDataTableComponent extends MXBaseComponent {
38
41
  constructor() {
39
42
  super(...arguments);
40
- this._columns = {};
41
43
  this.onPageChanged = new EventEmitter();
42
44
  this.showHeader = true;
43
45
  this._pageSize = 20;
@@ -140,11 +142,11 @@ class AXDataTableComponent extends MXBaseComponent {
140
142
  this._fetchData();
141
143
  }
142
144
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
143
- 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 td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\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 }); }
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 }); }
144
146
  }
145
147
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableComponent, decorators: [{
146
148
  type: Component,
147
- 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 td,ax-data-table table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
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"] }]
148
150
  }], propDecorators: { _columns: [{
149
151
  type: ContentChildren,
150
152
  args: [AXDataColumnComponent]
@@ -164,11 +166,119 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
164
166
  type: Input
165
167
  }] } });
166
168
 
167
- const COMPONENT = [AXDataTableComponent, AXDataColumnComponent];
168
- const MODULES = [CommonModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule];
169
+ class AXDataTable2Component extends MXBaseComponent {
170
+ constructor() {
171
+ super(...arguments);
172
+ this.onPageChanged = new EventEmitter();
173
+ this.showHeader = true;
174
+ this._pageSize = 20;
175
+ this.fetchDataMode = 'auto';
176
+ this.dataSource = convertArrayToDataSource([]);
177
+ this.isLoading = true;
178
+ this.hasItems = false;
179
+ this.lastIndex = 0;
180
+ this.itemHeight = 40;
181
+ this.width = "100%";
182
+ this.onScrolledIndexChanged = new EventEmitter();
183
+ }
184
+ get pageSize() {
185
+ return this._pageSize;
186
+ }
187
+ set pageSize(v) {
188
+ this._pageSize = v;
189
+ }
190
+ trackByIdx(i) {
191
+ return i;
192
+ }
193
+ ngOnInit() {
194
+ super.ngOnInit();
195
+ this.listDataSource = new AXListDataSource({
196
+ source: this.dataSource,
197
+ });
198
+ this.listDataSource.source
199
+ .onLoadingChanged
200
+ .subscribe((data) => {
201
+ this.isLoading = data;
202
+ });
203
+ this.listDataSource.source
204
+ .onChanged
205
+ .subscribe((data) => {
206
+ this.hasItems = data.totalCount > 0;
207
+ setTimeout(() => {
208
+ this.render();
209
+ }, 100);
210
+ });
211
+ }
212
+ _handleOnscrolledIndexChange(e) {
213
+ this.lastIndex = e;
214
+ this.onScrolledIndexChanged.emit({
215
+ component: this,
216
+ index: this.lastIndex,
217
+ isUserInteraction: true,
218
+ });
219
+ }
220
+ ngDoCheck() {
221
+ if (this.headerContainer) {
222
+ const headerContainer = this.headerContainer.nativeElement;
223
+ const left = this.getHostElement().querySelector('.cdk-virtual-scrollable').scrollLeft;
224
+ headerContainer.scrollLeft = left;
225
+ }
226
+ if (this.columns && this.columns.length) {
227
+ const sum = _.sum(this.columns.toArray().map(c => typeof c.width == 'number' ? c.width : Number(c.width.replace('px', ''))));
228
+ this.width = `${Math.max(sum, this.getHostElement().clientWidth - 5)}px`;
229
+ //console.log(this.width);
230
+ }
231
+ }
232
+ render() {
233
+ this.viewport.checkViewportSize();
234
+ this.viewport.scrollToIndex(this.lastIndex);
235
+ this.cdr.markForCheck();
236
+ }
237
+ refresh() {
238
+ this.dataSource.refresh();
239
+ }
240
+ 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 }); }
242
+ }
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTable2Component, decorators: [{
244
+ 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"] }]
246
+ }], propDecorators: { columns: [{
247
+ type: ContentChildren,
248
+ args: [AXDataColumnComponent]
249
+ }], onPageChanged: [{
250
+ type: Output
251
+ }], rowTemplate: [{
252
+ type: Input
253
+ }], emptyTemplate: [{
254
+ type: Input
255
+ }], loadingTemplate: [{
256
+ type: Input
257
+ }], showHeader: [{
258
+ type: Input
259
+ }], pageSize: [{
260
+ type: Input
261
+ }], fetchDataMode: [{
262
+ type: Input
263
+ }], dataSource: [{
264
+ type: Input
265
+ }], itemHeight: [{
266
+ type: Input
267
+ }], viewport: [{
268
+ type: ViewChild,
269
+ args: [CdkVirtualScrollViewport]
270
+ }], onScrolledIndexChanged: [{
271
+ type: Output
272
+ }], headerContainer: [{
273
+ type: ViewChild,
274
+ args: ['headerContainer']
275
+ }] } });
276
+
277
+ const COMPONENT = [AXDataTableComponent, AXDataTable2Component, AXDataColumnComponent];
278
+ const MODULES = [CommonModule, ScrollingModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule];
169
279
  class AXDataTableModule {
170
280
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
171
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, declarations: [AXDataTableComponent, AXDataColumnComponent], imports: [CommonModule, AXTranslationModule, AXResultModule, AXLoadingModule, AXDecoratorModule], exports: [AXDataTableComponent, AXDataColumnComponent] }); }
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] }); }
172
282
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, imports: [MODULES] }); }
173
283
  }
174
284
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, decorators: [{
@@ -185,5 +295,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
185
295
  * Generated bundle index. Do not edit.
186
296
  */
187
297
 
188
- export { AXDataColumnComponent, AXDataTableComponent, AXDataTableModule };
298
+ export { AXDataColumnComponent, AXDataTable2Component, AXDataTableComponent, AXDataTableModule };
189
299
  //# sourceMappingURL=acorex-components-data-table.mjs.map
@@ -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-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> = {} as QueryList<AXDataColumnComponent>;\n\n @Output()\n onPageChanged: EventEmitter<AXValueChangedEvent<number>> = new EventEmitter<AXValueChangedEvent<number>>();\n\n @Input()\n rowTemplate?: TemplateRef<any>;\n\n @Input()\n emptyTemplate?: TemplateRef<any>;\n\n @Input()\n showHeader: boolean = true;\n\n private _pageSize: number = 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: number = 1;\n\n private _loadedItems: any[] = [];\n private _totalItems: number = 0;\n\n private _isLazy: boolean = false;\n protected _isLoading: boolean = 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 { 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';\n\nconst COMPONENT = [AXDataTableComponent, AXDataColumnComponent];\nconst MODULES = [CommonModule, 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":[],"mappings":";;;;;;;;;;;;MAKa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;QAiBE,IAAK,CAAA,KAAA,GAAoB,MAAM,CAAC;AACjC,KAAA;8GAfY,qBAAqB,EAAA,I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A,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;;;ACjBD;;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 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;A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AA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CATX,oBAAoB,EAAE,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;;;;"}
@@ -43,6 +43,7 @@ class AXDrawerComponent extends MXBaseComponent {
43
43
  this._mode = 'overlay';
44
44
  this.collapsedChange = new EventEmitter();
45
45
  this._collapsed = true;
46
+ this._loaded = false;
46
47
  }
47
48
  get location() {
48
49
  return this._location;
@@ -68,11 +69,12 @@ class AXDrawerComponent extends MXBaseComponent {
68
69
  set collapsed(v) {
69
70
  this.setOption({
70
71
  name: 'collapsed',
71
- value: v,
72
+ value: v
72
73
  });
73
74
  }
74
- ngAfterViewInit() {
75
+ ngAfterContentInit() {
75
76
  this._detectBoundingSize();
77
+ this._loaded = true;
76
78
  }
77
79
  internalOptionChanged(option) {
78
80
  this._checkProps();
@@ -107,10 +109,8 @@ class AXDrawerComponent extends MXBaseComponent {
107
109
  this.collapsed = false;
108
110
  }
109
111
  get __hostClass() {
110
- //return `ax-drawer-${this.mode} ax-drawer-${this.location} ${this.collapsed ? 'ax-collapsed' : 'ax-expanded'} ${!this._loaded ? 'ax-preload' : ''}`;
111
- return `ax-drawer-${this.mode} ax-drawer-${this.location} ${this.collapsed ? 'ax-collapsed' : 'ax-expanded'}`;
112
+ return `ax-drawer-${this.mode} ax-drawer-${this.location} ${this.collapsed ? 'ax-collapsed' : 'ax-expanded'} ${this._loaded ? 'ax-state-loaded' : ''}`;
112
113
  }
113
- // private _loaded: boolean = false;
114
114
  _addBackdrop() {
115
115
  this._zone.runOutsideAngular(() => {
116
116
  this._backdropElement = document.createElement('div');
@@ -138,7 +138,7 @@ class AXDrawerComponent extends MXBaseComponent {
138
138
  ], usesInheritance: true, ngImport: i0, template: `
139
139
  <ng-content select="ax-header"></ng-content>
140
140
  <ng-content select="ax-content"></ng-content>
141
- `, isInline: true, styles: ["ax-drawer-container{display:flex;position:relative;width:100%;height:100%;overflow:hidden}ax-drawer-container.ax-fixed{display:none;inset:0;z-index:1000}ax-drawer-container.ax-fixed.ax-visible{display:flex}ax-drawer-container .ax-backdrop{background-color:#0000004d;position:absolute;width:100%;height:100%;z-index:1;top:0;bottom:0;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer{display:flex;flex-direction:column;max-width:95%;height:100%;background-color:rgba(var(--ax-color-surface));animation-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer ax-header,ax-drawer-container ax-drawer ax-footer{padding:.75rem}ax-drawer-container ax-drawer ax-footer{border-top-width:1px}ax-drawer-container ax-drawer ax-header{border-bottom-width:1px}ax-drawer-container ax-drawer.ax-preload{animation-duration:0ms;transition-property:none}ax-drawer-container ax-drawer>ax-content{overflow:auto;flex:1 1 0%}ax-drawer-container ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-expanded{z-index:2}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container>ax-content{flex:1 1 0%;height:100%;overflow:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
141
+ `, isInline: true, styles: ["ax-drawer-container{display:flex;position:relative;width:100%;height:100%;overflow:hidden}ax-drawer-container.ax-fixed{display:none;inset:0;z-index:1000}ax-drawer-container.ax-fixed.ax-visible{display:flex}ax-drawer-container .ax-backdrop{background-color:#0000004d;position:absolute;width:100%;height:100%;z-index:1;top:0;bottom:0;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer{display:flex;flex-direction:column;max-width:95%;height:100%;background-color:rgba(var(--ax-color-surface))}ax-drawer-container ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer ax-header,ax-drawer-container ax-drawer ax-footer{padding:.75rem}ax-drawer-container ax-drawer ax-footer{border-top-width:1px}ax-drawer-container ax-drawer ax-header{border-bottom-width:1px}ax-drawer-container ax-drawer>ax-content{overflow:auto;flex:1 1 0%}ax-drawer-container ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-expanded{z-index:2}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container>ax-content{flex:1 1 0%;height:100%;overflow:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
142
142
  }
143
143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDrawerComponent, decorators: [{
144
144
  type: Component,
@@ -148,7 +148,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
148
148
  `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
149
149
  { provide: AXComponent, useExisting: AXDrawerComponent },
150
150
  { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
151
- ], styles: ["ax-drawer-container{display:flex;position:relative;width:100%;height:100%;overflow:hidden}ax-drawer-container.ax-fixed{display:none;inset:0;z-index:1000}ax-drawer-container.ax-fixed.ax-visible{display:flex}ax-drawer-container .ax-backdrop{background-color:#0000004d;position:absolute;width:100%;height:100%;z-index:1;top:0;bottom:0;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer{display:flex;flex-direction:column;max-width:95%;height:100%;background-color:rgba(var(--ax-color-surface));animation-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer ax-header,ax-drawer-container ax-drawer ax-footer{padding:.75rem}ax-drawer-container ax-drawer ax-footer{border-top-width:1px}ax-drawer-container ax-drawer ax-header{border-bottom-width:1px}ax-drawer-container ax-drawer.ax-preload{animation-duration:0ms;transition-property:none}ax-drawer-container ax-drawer>ax-content{overflow:auto;flex:1 1 0%}ax-drawer-container ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-expanded{z-index:2}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container>ax-content{flex:1 1 0%;height:100%;overflow:auto}\n"] }]
151
+ ], styles: ["ax-drawer-container{display:flex;position:relative;width:100%;height:100%;overflow:hidden}ax-drawer-container.ax-fixed{display:none;inset:0;z-index:1000}ax-drawer-container.ax-fixed.ax-visible{display:flex}ax-drawer-container .ax-backdrop{background-color:#0000004d;position:absolute;width:100%;height:100%;z-index:1;top:0;bottom:0;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer{display:flex;flex-direction:column;max-width:95%;height:100%;background-color:rgba(var(--ax-color-surface))}ax-drawer-container ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container ax-drawer ax-header,ax-drawer-container ax-drawer ax-footer{padding:.75rem}ax-drawer-container ax-drawer ax-footer{border-top-width:1px}ax-drawer-container ax-drawer ax-header{border-bottom-width:1px}ax-drawer-container ax-drawer>ax-content{overflow:auto;flex:1 1 0%}ax-drawer-container ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-expanded{z-index:2}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer-container ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0%}ax-drawer-container ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer-container>ax-content{flex:1 1 0%;height:100%;overflow:auto}\n"] }]
152
152
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { locationChange: [{
153
153
  type: Output
154
154
  }], location: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { AXDrawerComponent } from './drawer.component';\n\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer[location='start']\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n <ng-content select=\"ax-drawer[location='end']\"> </ng-content>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n ngDoCheck() {\n const host = this.getHostElement();\n Array.from(host.querySelectorAll('ax-drawer'))\n .map((c) => c['__axContext__'] as AXDrawerComponent)\n .some((c) => !c?.collapsed)\n ? host.classList.add('ax-visible')\n : host.classList.remove('ax-visible');\n }\n}\n","import {\n AXClosbaleComponent,\n AXComponent,\n MXBaseComponent,\n MXComponentOptionChanged,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n NgZone,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent {\n constructor(private _zone: NgZone) {\n super();\n }\n\n @Output()\n public locationChange: EventEmitter<AXDrawerLocation> = new EventEmitter<AXDrawerLocation>();\n\n private _location: AXDrawerLocation = 'start';\n @Input()\n public get location(): AXDrawerLocation {\n return this._location;\n }\n public set location(v: AXDrawerLocation) {\n this.setOption({\n name: 'location',\n value: v,\n });\n }\n\n @Output()\n public modeChange: EventEmitter<AXDrawerMode> = new EventEmitter<AXDrawerMode>();\n\n private _mode: AXDrawerMode = 'overlay';\n @Input()\n public get mode(): AXDrawerMode {\n return this._mode;\n }\n public set mode(v: AXDrawerMode) {\n this.setOption({\n name: 'mode',\n value: v,\n });\n }\n\n @Output()\n public collapsedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n private _collapsed = true;\n @Input()\n public get collapsed(): boolean {\n return this._collapsed;\n }\n public set collapsed(v: boolean) {\n this.setOption({\n name: 'collapsed',\n value: v,\n });\n }\n\n ngAfterViewInit(): void {\n this._detectBoundingSize();\n }\n\n override internalOptionChanged(option: MXComponentOptionChanged): void {\n this._checkProps();\n }\n\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n private _checkProps() {\n this._detectBoundingSize();\n this._removeBackdrop();\n if (this.mode == 'overlay') {\n if (!this.collapsed) {\n this._addBackdrop();\n }\n }\n }\n\n toggle() {\n this.collapsed = !this.collapsed;\n }\n\n close() {\n this.collapsed = true;\n }\n\n open() {\n this.collapsed = false;\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n //return `ax-drawer-${this.mode} ax-drawer-${this.location} ${this.collapsed ? 'ax-collapsed' : 'ax-expanded'} ${!this._loaded ? 'ax-preload' : ''}`;\n return `ax-drawer-${this.mode} ax-drawer-${this.location} ${\n this.collapsed ? 'ax-collapsed' : 'ax-expanded'\n }`;\n }\n\n private _backdropElement: HTMLElement | any;\n // private _loaded: boolean = false;\n\n private _addBackdrop() {\n this._zone.runOutsideAngular(() => {\n this._backdropElement = document.createElement('div');\n this._backdropElement.classList.add('ax-backdrop');\n this._backdropElement.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement().parentElement?.appendChild(this._backdropElement);\n });\n }\n\n private _removeBackdrop() {\n this._zone.runOutsideAngular(() => {\n if (this._backdropElement) {\n this.getHostElement().parentElement?.removeChild(this._backdropElement);\n this._backdropElement = null;\n }\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer-container.component';\nimport { AXDrawerComponent } from './drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAcM,MAAO,0BAA2B,SAAQ,eAAe,CAAA;IAC7D,SAAS,GAAA;AACP,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;aAC3C,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAsB,CAAC;aACnD,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC;cACzB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;cAChC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KACzC;8GARU,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,EAR3B,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAA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E,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { AXDrawerComponent } from './drawer.component';\n\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer[location='start']\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n <ng-content select=\"ax-drawer[location='end']\"> </ng-content>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n\n ngDoCheck() {\n const host = this.getHostElement();\n Array.from(host.querySelectorAll('ax-drawer'))\n .map((c) => c['__axContext__'] as AXDrawerComponent)\n .some((c) => !c?.collapsed)\n ? host.classList.add('ax-visible')\n : host.classList.remove('ax-visible');\n }\n\n}\n","import {\n AXClosbaleComponent,\n AXComponent,\n MXBaseComponent,\n MXComponentOptionChanged,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n NgZone,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent {\n constructor(private _zone: NgZone) {\n super();\n }\n\n @Output()\n public locationChange: EventEmitter<AXDrawerLocation> = new EventEmitter<AXDrawerLocation>();\n\n private _location: AXDrawerLocation = 'start';\n @Input()\n public get location(): AXDrawerLocation {\n return this._location;\n }\n public set location(v: AXDrawerLocation) {\n this.setOption({\n name: 'location',\n value: v,\n });\n }\n\n @Output()\n public modeChange: EventEmitter<AXDrawerMode> = new EventEmitter<AXDrawerMode>();\n\n private _mode: AXDrawerMode = 'overlay';\n @Input()\n public get mode(): AXDrawerMode {\n return this._mode;\n }\n public set mode(v: AXDrawerMode) {\n this.setOption({\n name: 'mode',\n value: v,\n });\n }\n\n @Output()\n public collapsedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n private _collapsed = true;\n @Input()\n public get collapsed(): boolean {\n return this._collapsed;\n }\n public set collapsed(v: boolean) {\n this.setOption({\n name: 'collapsed',\n value: v\n });\n }\n\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n this._loaded = true;\n }\n\n override internalOptionChanged(option: MXComponentOptionChanged): void {\n this._checkProps();\n }\n\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n private _checkProps() {\n this._detectBoundingSize();\n this._removeBackdrop();\n if (this.mode == 'overlay') {\n if (!this.collapsed) {\n this._addBackdrop();\n }\n }\n }\n\n toggle() {\n this.collapsed = !this.collapsed;\n }\n\n close() {\n this.collapsed = true;\n }\n\n open() {\n this.collapsed = false;\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode} ax-drawer-${this.location} ${this.collapsed ? 'ax-collapsed' : 'ax-expanded'} ${this._loaded ? 'ax-state-loaded' : ''}`;\n }\n\n private _backdropElement: HTMLElement;\n private _loaded = false;\n\n private _addBackdrop() {\n this._zone.runOutsideAngular(() => {\n this._backdropElement = document.createElement('div');\n this._backdropElement.classList.add('ax-backdrop');\n this._backdropElement.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement().parentElement?.appendChild(this._backdropElement);\n });\n }\n\n private _removeBackdrop() {\n this._zone.runOutsideAngular(() => {\n if (this._backdropElement) {\n this.getHostElement().parentElement?.removeChild(this._backdropElement);\n this._backdropElement = null;\n }\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer-container.component';\nimport { AXDrawerComponent } from './drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAcM,MAAO,0BAA2B,SAAQ,eAAe,CAAA;IAE7D,SAAS,GAAA;AACP,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;aAC3C,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAsB,CAAC;aACnD,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC;cACzB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;cAChC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KACzC;8GATU,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,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