@acorex/components 7.11.1 → 7.11.2
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.
- package/button/lib/button-item-list.component.d.ts +6 -6
- package/button/lib/button-item.component.d.ts +9 -1
- package/data-table/index.d.ts +1 -1
- package/data-table/lib/columns/{data-column.d.ts → data-table-column.d.ts} +4 -4
- package/data-table/lib/columns/data-text-column.component.d.ts +9 -4
- package/data-table/lib/columns/row-command-column.component.d.ts +28 -21
- package/data-table/lib/columns/row-index-column.component.d.ts +9 -4
- package/data-table/lib/columns/row-select-column.component.d.ts +3 -3
- package/data-table/lib/data-table.component.d.ts +14 -5
- package/data-table/lib/data-table.module.d.ts +11 -9
- package/esm2022/button/lib/button-item-list.component.mjs +35 -10
- package/esm2022/button/lib/button-item.component.mjs +1 -1
- package/esm2022/button/lib/button.component.mjs +2 -2
- package/esm2022/common/index.mjs +1 -1
- package/esm2022/common/lib/common.module.mjs +2 -2
- package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +1 -1
- package/esm2022/data-table/index.mjs +2 -2
- package/esm2022/data-table/lib/columns/data-table-column.mjs +35 -0
- package/esm2022/data-table/lib/columns/data-text-column.component.mjs +36 -12
- package/esm2022/data-table/lib/columns/row-command-column.component.mjs +152 -64
- package/esm2022/data-table/lib/columns/row-index-column.component.mjs +34 -10
- package/esm2022/data-table/lib/columns/row-select-column.component.mjs +8 -8
- package/esm2022/data-table/lib/data-table.component.mjs +66 -18
- package/esm2022/data-table/lib/data-table.module.mjs +20 -11
- package/esm2022/dropdown/lib/dropdown-panel.component.mjs +14 -4
- package/fesm2022/acorex-components-button.mjs +33 -11
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +1 -1
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +1 -1
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +337 -148
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +13 -3
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/package.json +1 -1
- package/esm2022/data-table/lib/columns/data-column.mjs +0 -35
@@ -1,6 +1,11 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Injectable, Input, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, EventEmitter, ContentChildren, Output,
|
3
|
-
import {
|
2
|
+
import { Injectable, Input, inject, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, EventEmitter, ContentChildren, Output, ChangeDetectorRef, NgModule } from '@angular/core';
|
3
|
+
import { __decorate, __metadata } from 'tslib';
|
4
|
+
import * as i1$1 from '@acorex/core/format';
|
5
|
+
import { AXFormatService, AXFormatModule } from '@acorex/core/format';
|
6
|
+
import { Memorize } from '@acorex/core/memorize';
|
7
|
+
import * as i2$1 from '@acorex/components/common';
|
8
|
+
import { MXBaseComponent, convertArrayToDataSource, AXListDataSource, AXPagedComponent, AXCommonModule } from '@acorex/components/common';
|
4
9
|
import * as i2 from '@angular/cdk/scrolling';
|
5
10
|
import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
|
6
11
|
import sum from 'lodash-es/sum';
|
@@ -8,20 +13,21 @@ import * as i1 from '@angular/common';
|
|
8
13
|
import { CommonModule } from '@angular/common';
|
9
14
|
import * as i3 from '@acorex/components/result';
|
10
15
|
import { AXResultModule } from '@acorex/components/result';
|
11
|
-
import * as
|
16
|
+
import * as i4 from '@acorex/components/decorators';
|
12
17
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
13
18
|
import * as i5 from '@acorex/components/skeleton';
|
14
19
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
15
|
-
import * as
|
20
|
+
import * as i6 from '@acorex/components/button';
|
16
21
|
import { AXButtonModule } from '@acorex/components/button';
|
17
22
|
import * as i7 from '@acorex/core/translation';
|
18
23
|
import { AXTranslationModule } from '@acorex/core/translation';
|
19
|
-
import {
|
20
|
-
import * as
|
21
|
-
import { AXDropdownModule } from '@acorex/components/dropdown';
|
24
|
+
import { AXUnsubscriber } from '@acorex/core/utils';
|
25
|
+
import * as i3$1 from '@acorex/components/loading';
|
22
26
|
import { AXLoadingModule } from '@acorex/components/loading';
|
27
|
+
import * as i6$1 from '@acorex/components/dropdown';
|
28
|
+
import { AXDropdownModule } from '@acorex/components/dropdown';
|
23
29
|
|
24
|
-
class
|
30
|
+
class AXDataTableColumnComponent {
|
25
31
|
constructor() {
|
26
32
|
this.width = 'auto';
|
27
33
|
this.allowSorting = false;
|
@@ -31,17 +37,17 @@ class AXDataColumnComponent {
|
|
31
37
|
get cssClass() {
|
32
38
|
return null;
|
33
39
|
}
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type:
|
35
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type:
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
41
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableColumnComponent }); }
|
36
42
|
}
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type:
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableColumnComponent, decorators: [{
|
38
44
|
type: Injectable
|
39
|
-
}], propDecorators: {
|
40
|
-
type: Input
|
41
|
-
}], caption: [{
|
45
|
+
}], propDecorators: { caption: [{
|
42
46
|
type: Input
|
43
47
|
}], width: [{
|
44
48
|
type: Input
|
49
|
+
}], fixed: [{
|
50
|
+
type: Input
|
45
51
|
}], allowSorting: [{
|
46
52
|
type: Input
|
47
53
|
}], sortIndex: [{
|
@@ -54,73 +60,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
54
60
|
type: Input
|
55
61
|
}] } });
|
56
62
|
|
57
|
-
class
|
58
|
-
get template() {
|
59
|
-
return this._template;
|
60
|
-
}
|
61
|
-
get skeleton() {
|
62
|
-
return true;
|
63
|
-
}
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTextColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
65
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTextColumnComponent, selector: "ax-text-column", inputs: { width: "width", caption: "caption", headerTemplate: "headerTemplate", cellTemplate: "cellTemplate", dataField: "dataField", allowSorting: "allowSorting" }, providers: [{ provide: AXDataColumnComponent, useExisting: AXDataTextColumnComponent }], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
66
|
-
<ng-template let-row>
|
67
|
-
{{row.data[dataField]}}
|
68
|
-
</ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
69
|
-
}
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTextColumnComponent, decorators: [{
|
71
|
-
type: Component,
|
72
|
-
args: [{
|
73
|
-
selector: 'ax-text-column',
|
74
|
-
template: `
|
75
|
-
<ng-template let-row>
|
76
|
-
{{row.data[dataField]}}
|
77
|
-
</ng-template>`,
|
78
|
-
encapsulation: ViewEncapsulation.None,
|
79
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
80
|
-
providers: [{ provide: AXDataColumnComponent, useExisting: AXDataTextColumnComponent }],
|
81
|
-
inputs: ['width', 'caption', 'headerTemplate', 'cellTemplate', 'dataField', 'allowSorting']
|
82
|
-
}]
|
83
|
-
}], propDecorators: { _template: [{
|
84
|
-
type: ViewChild,
|
85
|
-
args: [TemplateRef]
|
86
|
-
}] } });
|
87
|
-
|
88
|
-
class AXRowIndexColumnComponent extends AXDataColumnComponent {
|
63
|
+
class AXDataTableTextColumnComponent extends AXDataTableColumnComponent {
|
89
64
|
constructor() {
|
90
65
|
super(...arguments);
|
91
|
-
this.
|
66
|
+
this.formatService = inject(AXFormatService);
|
92
67
|
}
|
93
68
|
get template() {
|
94
69
|
return this._template;
|
95
70
|
}
|
96
|
-
get cssClass() {
|
97
|
-
return 'ax-index-column';
|
98
|
-
}
|
99
71
|
get skeleton() {
|
100
|
-
return
|
72
|
+
return true;
|
101
73
|
}
|
102
|
-
|
103
|
-
|
74
|
+
getDisplayText(rowData, dataField) {
|
75
|
+
const value = rowData[dataField];
|
76
|
+
const options = Array.isArray(this.formatOptions) ? this.formatOptions : [this.formatOptions];
|
77
|
+
return !this.format ? value : this.formatService.format(value, this.format, ...options);
|
78
|
+
}
|
79
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableTextColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
80
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: { width: "width", caption: "caption", headerTemplate: "headerTemplate", cellTemplate: "cellTemplate", allowSorting: "allowSorting", fixed: "fixed", dataField: "dataField", format: "format", formatOptions: "formatOptions" }, providers: [{ provide: AXDataTableColumnComponent, useExisting: AXDataTableTextColumnComponent }], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
104
81
|
<ng-template let-row>
|
105
|
-
|
82
|
+
{{getDisplayText(row.data,this.dataField)}}
|
106
83
|
</ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
107
84
|
}
|
108
|
-
|
85
|
+
__decorate([
|
86
|
+
Memorize(),
|
87
|
+
__metadata("design:type", Function),
|
88
|
+
__metadata("design:paramtypes", [Object, String]),
|
89
|
+
__metadata("design:returntype", String)
|
90
|
+
], AXDataTableTextColumnComponent.prototype, "getDisplayText", null);
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableTextColumnComponent, decorators: [{
|
109
92
|
type: Component,
|
110
93
|
args: [{
|
111
|
-
selector: 'ax-
|
94
|
+
selector: 'ax-text-column',
|
112
95
|
template: `
|
113
96
|
<ng-template let-row>
|
114
|
-
|
97
|
+
{{getDisplayText(row.data,this.dataField)}}
|
115
98
|
</ng-template>`,
|
116
99
|
encapsulation: ViewEncapsulation.None,
|
117
100
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
118
|
-
providers: [{ provide:
|
119
|
-
inputs: ['width', 'caption']
|
101
|
+
providers: [{ provide: AXDataTableColumnComponent, useExisting: AXDataTableTextColumnComponent }],
|
102
|
+
inputs: ['width', 'caption', 'headerTemplate', 'cellTemplate', 'allowSorting', 'fixed'],
|
120
103
|
}]
|
121
|
-
}], propDecorators: {
|
104
|
+
}], propDecorators: { dataField: [{
|
105
|
+
type: Input
|
106
|
+
}], _template: [{
|
122
107
|
type: ViewChild,
|
123
108
|
args: [TemplateRef]
|
109
|
+
}], getDisplayText: [], format: [{
|
110
|
+
type: Input
|
111
|
+
}], formatOptions: [{
|
112
|
+
type: Input
|
124
113
|
}] } });
|
125
114
|
|
126
115
|
class AXDataTableComponent extends MXBaseComponent {
|
@@ -145,6 +134,21 @@ class AXDataTableComponent extends MXBaseComponent {
|
|
145
134
|
this.height = "100%";
|
146
135
|
this.onScrolledIndexChanged = new EventEmitter();
|
147
136
|
}
|
137
|
+
startFixedColumn() {
|
138
|
+
return this.columns?.toArray().filter(c => c.fixed == 'start') ?? [];
|
139
|
+
}
|
140
|
+
endFixedColumn() {
|
141
|
+
return this.columns?.toArray().filter(c => c.fixed == 'end') ?? [];
|
142
|
+
}
|
143
|
+
notFixedColumn() {
|
144
|
+
return this.columns?.toArray().filter(c => !c.fixed) ?? [];
|
145
|
+
}
|
146
|
+
notFixedColumnCount() {
|
147
|
+
return this.columns?.toArray().filter(c => !c.fixed).length ?? 0;
|
148
|
+
}
|
149
|
+
fixedColumnCount() {
|
150
|
+
return this.columns?.toArray().filter(c => c.fixed).length ?? 0;
|
151
|
+
}
|
148
152
|
get focusedRow() {
|
149
153
|
return this._focusedRow;
|
150
154
|
}
|
@@ -159,6 +163,12 @@ class AXDataTableComponent extends MXBaseComponent {
|
|
159
163
|
this._selectedRows = v;
|
160
164
|
this.selectedRowsChange.emit(v);
|
161
165
|
}
|
166
|
+
selectRows(...rows) {
|
167
|
+
this.selectedRows = [...this.selectedRows, ...rows];
|
168
|
+
}
|
169
|
+
unSelectRows(...rows) {
|
170
|
+
this.selectedRows = this.selectedRows.filter(c => !rows.includes(c));
|
171
|
+
}
|
162
172
|
trackByIdx(i) {
|
163
173
|
return i;
|
164
174
|
}
|
@@ -191,10 +201,11 @@ class AXDataTableComponent extends MXBaseComponent {
|
|
191
201
|
});
|
192
202
|
}
|
193
203
|
ngDoCheck() {
|
204
|
+
//this.copyFixedColumns();
|
194
205
|
if (this.headerContainer) {
|
195
206
|
const headerContainer = this.headerContainer.nativeElement;
|
196
207
|
const left = this.getHostElement().querySelector('.cdk-virtual-scrollable').scrollLeft;
|
197
|
-
headerContainer.
|
208
|
+
headerContainer.style.transform = `translateX(${-left}px)`;
|
198
209
|
}
|
199
210
|
if (this.columns && this.columns.length) {
|
200
211
|
const sumPx = sum(this.columns.toArray().map(c => typeof c.width == 'number' ? c.width : Number(c.width.replace('px', ''))));
|
@@ -207,6 +218,23 @@ class AXDataTableComponent extends MXBaseComponent {
|
|
207
218
|
if (this.startRowIndex > this.totalRows)
|
208
219
|
this.startRowIndex = this.totalRows;
|
209
220
|
}
|
221
|
+
// Function to copy fixed columns
|
222
|
+
copyFixedColumns() {
|
223
|
+
const originalRows = Array.from(this.viewport._contentWrapper.nativeElement.querySelectorAll('tr'));
|
224
|
+
const fixedColumnTable = this.getHostElement().querySelector('.ax-body-fixed-columns > table > tbody');
|
225
|
+
fixedColumnTable.querySelectorAll('tr').forEach(n => n.remove());
|
226
|
+
for (const row of originalRows) {
|
227
|
+
const fixedCells = Array.from(row.querySelectorAll('[data-fixed="start"]'));
|
228
|
+
const fixedRow = document.createElement('tr');
|
229
|
+
for (const cell of fixedCells) {
|
230
|
+
const clonedCell = cell.cloneNode(true);
|
231
|
+
fixedRow.appendChild(clonedCell);
|
232
|
+
}
|
233
|
+
fixedColumnTable.appendChild(fixedRow);
|
234
|
+
}
|
235
|
+
const scrollTop = this.getHostElement().querySelector('.cdk-virtual-scrollable').scrollTop;
|
236
|
+
fixedColumnTable.style.transform = `translateY(${-scrollTop}px)`;
|
237
|
+
}
|
210
238
|
render() {
|
211
239
|
this.viewport.checkViewportSize();
|
212
240
|
this.viewport.scrollToIndex(this.lastIndex);
|
@@ -225,33 +253,41 @@ class AXDataTableComponent extends MXBaseComponent {
|
|
225
253
|
}
|
226
254
|
}
|
227
255
|
handleColumnClick(e, column) {
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
else {
|
233
|
-
if (sort.dir == 'asc') {
|
234
|
-
sort.dir = 'desc';
|
256
|
+
if (column instanceof AXDataTableTextColumnComponent) {
|
257
|
+
const sort = this.dataSource.query.sort.find(c => c.field == column.dataField);
|
258
|
+
if (!sort) {
|
259
|
+
this.dataSource.query.sort.push({ field: column.dataField, dir: 'asc' });
|
235
260
|
}
|
236
261
|
else {
|
237
|
-
|
262
|
+
if (sort.dir == 'asc') {
|
263
|
+
sort.dir = 'desc';
|
264
|
+
}
|
265
|
+
else {
|
266
|
+
this.dataSource.query.sort = this.dataSource.query.sort.filter(c => c != sort);
|
267
|
+
}
|
238
268
|
}
|
269
|
+
this.refresh();
|
239
270
|
}
|
240
|
-
this.refresh();
|
241
271
|
}
|
242
272
|
getSort(column) {
|
243
|
-
|
244
|
-
|
273
|
+
if (column instanceof AXDataTableTextColumnComponent) {
|
274
|
+
const sort = this.dataSource.query.sort.find(c => c.field == column.dataField);
|
275
|
+
return sort ? (sort.dir == 'asc' ? 'ax-icon-arrow-long-down' : 'ax-icon-arrow-long-up') : undefined;
|
276
|
+
}
|
277
|
+
return undefined;
|
278
|
+
}
|
279
|
+
onViewChange(e) {
|
280
|
+
console.log(e);
|
245
281
|
}
|
246
282
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
247
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTableComponent, selector: "ax-data-table", inputs: { rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", loadingTemplate: "loadingTemplate", showHeader: "showHeader", fetchDataMode: "fetchDataMode", dataSource: "dataSource", focusedRow: "focusedRow", selectedRows: "selectedRows", itemHeight: "itemHeight" }, outputs: { onPageChanged: "onPageChanged", focusedRowChange: "focusedRowChange", selectedRowsChange: "selectedRowsChange", onScrolledIndexChanged: "onScrolledIndexChanged" }, providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }], queries: [{ propertyName: "columns", predicate: AXDataColumnComponent }], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "headerContainer", first: true, predicate: ["headerContainer"], descendants: true }, { propertyName: "footerContainer", first: true, predicate: ["footerContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header\">\n</ng-content>\n<div class=\"ax-table-header\" #headerContainer>\n <table tabindex=\"0\" *ngIf=\"showHeader\" [style.width]=\"width\">\n <thead>\n <tr>\n <th *ngFor=\"let c of columns\" [style.width]=\"c.width\" [class.ax-interactive]=\"c.allowSorting\"\n (click)=\"c.allowSorting ? handleColumnClick($event,c) : null\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n <div class=\"ax-caption\">\n {{c.caption}}\n <ax-icon *ngIf=\"getSort(c)\" icon=\"ax-icon {{getSort(c)}}\"></ax-icon>\n </div>\n </ng-template>\n </th>\n <th> </th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement [style.height]=\"height\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <ng-container *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 [class.ax-state-focused]=\"focusedRow && item===focusedRow\"\n [class.ax-state-selected]=\"selectedRows.includes(item)\" (click)=\"handleRowClick($event,item)\"\n [attr.data.rowIndex]=\"rIndex\">\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <div class=\"ax-content\">\n <ng-container\n *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\" [class]=\"c.cssClass\">\n <div class=\"ax-content\">\n <ng-container *ngIf=\"item || !c.skeleton;else loadingTpl\">\n <ng-container\n *ngTemplateOutlet=\"c.template; context: { $implicit: {data:item,rowIndex:rIndex} }\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-template>\n </ng-container>\n <td> </td>\n </tr>\n </ng-template>\n </ng-container>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<div class=\"ax-table-footer\" #footerContainer>\n <div class=\"ax-table-info\">\n <div>\n Showing {{startRowIndex}} of {{totalRows}} items\n </div>\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"refresh()\">\n <ax-icon icon=\"ax-icon ax-icon-refresh\"></ax-icon>\n </ax-button>\n </div>\n <ng-content select=\"ax-footer\">\n </ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <ax-skeleton [animated]=\"true\"></ax-skeleton>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>", styles: [".ax-dark ax-data-table .ax-table-body tr:hover td:not(.ax-index-column),.ax-dark ax-data-table .ax-table-body tr.ax-state-focused td:not(.ax-index-column){background-color:#ffffff4d;color:rgba(var(--ax-color-text-default))}.ax-dark ax-data-table .ax-table-body tr.ax-state-selected:not(:hover,.ax-state-focused) td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-900),.5);color:rgba(var(--ax-color-primary-fore))}ax-data-table{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-table table{table-layout:fixed}ax-data-table .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-table .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-table .ax-table-header th.ax-interactive{cursor:pointer}ax-data-table .ax-table-header th.ax-interactive:hover{background-color:#0000001a}ax-data-table .ax-table-header th .ax-caption{display:flex;gap:.5rem;align-items:center}ax-data-table .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.5rem .875rem}ax-data-table .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}ax-data-table .ax-table-body{border-collapse:collapse}ax-data-table .ax-table-body tr:nth-child(odd) td{background-color:rgba(var(--ax-color-on-surface),.7)}ax-data-table .ax-table-body tr:nth-child(odd) ax-skeleton{width:25%}ax-data-table .ax-table-body tr:hover td:not(.ax-index-column),ax-data-table .ax-table-body tr.ax-state-focused td:not(.ax-index-column){background-color:#0000001a}ax-data-table .ax-table-body tr.ax-state-selected:not(:hover,.ax-state-focused) td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-data-table .ax-table-body td{padding:.5rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table .ax-table-body td.ax-index-column{background-color:rgba(var(--ax-color-on-surface))!important}ax-data-table .ax-table-body td.ax-index-column>.ax-content{justify-content:center}ax-data-table .ax-table-body td.ax-index-column>.ax-content span{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}ax-data-table .ax-table-body td.ax-command-column>.ax-content{justify-content:center}ax-data-table .ax-table-body td.ax-command-column>.ax-content span{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;font-size:1.4rem;cursor:pointer}ax-data-table .ax-table-body td>.ax-content{display:flex;justify-content:flex-start;width:100%}ax-data-table .ax-table-body td:last-child{border-inline-end:0px solid}ax-data-table .ax-table-body td ax-skeleton{height:.875rem;border-radius:calc(var(--ax-rounded-border-default) / 1.5);width:35%}\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.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i2.CdkVirtualScrollableElement, selector: "[cdkVirtualScrollingElement]" }, { kind: "component", type: i3.AXResultComponent, selector: "ax-result", inputs: ["type", "caption", "description"] }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i5.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: i3$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
283
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXDataTableComponent, selector: "ax-data-table", inputs: { rowTemplate: "rowTemplate", emptyTemplate: "emptyTemplate", loadingTemplate: "loadingTemplate", showHeader: "showHeader", fetchDataMode: "fetchDataMode", dataSource: "dataSource", focusedRow: "focusedRow", selectedRows: "selectedRows", itemHeight: "itemHeight" }, outputs: { onPageChanged: "onPageChanged", focusedRowChange: "focusedRowChange", selectedRowsChange: "selectedRowsChange", onScrolledIndexChanged: "onScrolledIndexChanged" }, providers: [{ provide: AXPagedComponent, useExisting: AXDataTableComponent }], queries: [{ propertyName: "columns", predicate: AXDataTableColumnComponent }], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, static: true }, { propertyName: "headerContainer", first: true, predicate: ["headerContainer"], descendants: true }, { propertyName: "footerContainer", first: true, predicate: ["footerContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-header\">\n</ng-content>\n<!------------------- Header contents ------------------->\n<div class=\"ax-header-content\" *ngIf=\"showHeader\">\n <div class=\"ax-header-columns ax-header-fixed-columns\" *ngIf=\"false\">\n <table tabindex=\"0\" [style.width]=\"width\">\n <colgroup>\n <!------------------- start fixed column ------------------->\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <!------------------- not fixed column ------------------->\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col style=\"width: 10px;\">\n </colgroup>\n <thead>\n <tr>\n <!------------------- start fixed column ------------------->\n <th *ngFor=\"let c of startFixedColumn()\" [class.ax-interactive]=\"c.allowSorting\"\n (click)=\"c.allowSorting ? handleColumnClick($event,c) : null\" class=\"ax-column-fixed\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n <div class=\"ax-caption\">\n {{c.caption }}\n <ax-icon *ngIf=\"getSort(c)\" icon=\"ax-icon {{getSort(c)}}\"></ax-icon>\n </div>\n </ng-template>\n </th>\n <!------------------- not fixed column ------------------->\n <th [attr.colspan]=\"notFixedColumnCount()\">\n\n </th>\n </tr>\n </thead>\n </table>\n </div>\n <div class=\"ax-header-columns\">\n <table tabindex=\"0\" [style.width]=\"width\" #headerContainer>\n <colgroup>\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col style=\"width: auto;\">\n </colgroup>\n <thead>\n <tr>\n <th *ngFor=\"let c of startFixedColumn()\">\n </th>\n <th *ngFor=\"let c of notFixedColumn()\" [class.ax-interactive]=\"c.allowSorting\"\n (click)=\"c.allowSorting ? handleColumnClick($event,c) : null\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n <div class=\"ax-caption\">\n {{c.caption}}\n <ax-icon *ngIf=\"getSort(c)\" icon=\"ax-icon {{getSort(c)}}\"></ax-icon>\n </div>\n </ng-template>\n </th>\n <th></th>\n </tr>\n </thead>\n </table>\n </div>\n</div>\n<!------------------- Body contents ------------------->\n<div [style.height]=\"height\" class=\"ax-body-content\">\n <div class=\"ax-body-columns ax-body-fixed-columns\" *ngIf=\"false\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <colgroup>\n <!------------------- start fixed column ------------------->\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <!------------------- not fixed column ------------------->\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col>\n </colgroup>\n <tbody>\n </tbody>\n </table>\n </div>\n <div class=\"ax-body-columns\">\n <div cdkVirtualScrollingElement [style.height]=\"'100%'\">\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 <colgroup>\n <!------------------- start fixed column ------------------->\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <!------------------- not fixed column ------------------->\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col>\n </colgroup>\n <tbody>\n <ng-container\n *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx;let rIndex=index;\"\n (viewChange)=\"onViewChange($event)\">\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 [class.ax-state-focused]=\"focusedRow && item===focusedRow\" [attr.data-index]=\"rIndex\"\n [class.ax-state-selected]=\"selectedRows.includes(item)\" (click)=\"handleRowClick($event,item)\">\n <!------------------- start fixed column ------------------->\n <ng-container *ngFor=\"let c of startFixedColumn()\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <div class=\"ax-content\">\n <ng-container\n *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [class]=\"c.cssClass\" [attr.data-fixed]=\"c.fixed\"\n class=\"ax-column-fixed\">\n <div class=\"ax-content\">\n <ng-container *ngIf=\"item || !c.skeleton;else loadingTpl\">\n <ng-container\n *ngTemplateOutlet=\"c.template; context: { $implicit: {data:item,rowIndex:rIndex} }\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-template>\n </ng-container>\n <!------------------- Not fixed column ------------------->\n <ng-container *ngFor=\"let c of notFixedColumn()\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <div class=\"ax-content\">\n <ng-container\n *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [class]=\"c.cssClass\">\n <div class=\"ax-content\">\n <ng-container *ngIf=\"item || !c.skeleton;else loadingTpl\">\n <ng-container\n *ngTemplateOutlet=\"c.template; context: { $implicit: {data:item,rowIndex:rIndex} }\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-template>\n </ng-container>\n <td></td>\n </tr>\n </ng-template>\n </ng-container>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n<div class=\"ax-table-footer\" #footerContainer>\n <div class=\"ax-table-info\">\n <div>\n Showing {{startRowIndex}} of {{totalRows}} items\n </div>\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"refresh()\">\n <ax-icon icon=\"ax-icon ax-icon-refresh\"></ax-icon>\n </ax-button>\n </div>\n <ng-content select=\"ax-footer\">\n </ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <ax-skeleton [animated]=\"true\"></ax-skeleton>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>", styles: [".ax-dark ax-data-table .ax-header-content th.ax-interactive:hover{background-color:rgba(var(--ax-color-neutral-500))!important}.ax-dark ax-data-table .ax-body-content tr:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-800))!important;color:rgba(var(--ax-color-primary-fore))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-focused td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-900))!important;color:rgba(var(--ax-color-primary-fore))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-focused:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-800))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-selected td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-950))!important;color:rgba(var(--ax-color-primary-fore))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-selected:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-800))!important}ax-data-table{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-table table{table-layout:fixed}ax-data-table .ax-header-content{height:50px;overflow:hidden;position:relative}ax-data-table .ax-header-content .ax-header-fixed-columns{position:absolute;z-index:1;pointer-events:none}ax-data-table .ax-header-content .ax-header-fixed-columns th.ax-column-fixed{pointer-events:auto}ax-data-table .ax-header-content .ax-header-fixed-columns th:not(.ax-column-fixed){visibility:hidden;background-color:transparent}ax-data-table .ax-header-content .ax-header-columns{height:100%}ax-data-table .ax-header-content .ax-header-columns>table{height:100%;border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);border-collapse:collapse;overflow:hidden}ax-data-table .ax-header-content .ax-header-columns>table th{text-transform:uppercase;background-color:rgba(var(--ax-color-on-surface));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-table .ax-header-content .ax-header-columns>table th.ax-interactive{cursor:pointer}ax-data-table .ax-header-content .ax-header-columns>table th.ax-interactive:hover{background-color:rgba(var(--ax-color-neutral-200))}ax-data-table .ax-header-content .ax-header-columns>table th .ax-caption{display:flex;gap:.5rem;align-items:center}ax-data-table .ax-header-content .ax-header-columns>table th:last-child{border-inline-end:0px solid}ax-data-table .ax-body-content{position:relative}ax-data-table .ax-body-content .ax-body-fixed-columns{position:absolute;z-index:1;pointer-events:none}ax-data-table .ax-body-content .ax-body-columns{height:100%}ax-data-table .ax-body-content .ax-body-columns table{border-collapse:collapse}ax-data-table .ax-body-content .ax-body-columns table tr:nth-child(odd) td{background-color:rgba(var(--ax-color-on-surface))}ax-data-table .ax-body-content .ax-body-columns table tr:nth-child(odd) ax-skeleton{width:25%}ax-data-table .ax-body-content .ax-body-columns table tr{height:40px}ax-data-table .ax-body-content .ax-body-columns table tr:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-200))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-focused td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-focused:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-300))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-selected td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-300));color:rgba(var(--ax-color-primary-fore-lighten))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-selected:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-400));color:rgba(var(--ax-color-primary-fore))}ax-data-table .ax-body-content .ax-body-columns table td{min-width:2rem;padding:.5rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface));position:relative}ax-data-table .ax-body-content .ax-body-columns table td.ax-index-column{background-color:rgba(var(--ax-color-on-surface))!important}ax-data-table .ax-body-content .ax-body-columns table td.ax-index-column>.ax-content{justify-content:center}ax-data-table .ax-body-content .ax-body-columns table td.ax-index-column>.ax-content span{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content{position:relative}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content>div{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:0;display:flex;flex-direction:row;align-items:center;width:100%;justify-content:center}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button{background-color:transparent;border:none;color:rgba(var(--ax-color-ghost-fore));position:relative;padding:.25rem;line-height:1;border-radius:var(--ax-rounded-border-default);font-size:1rem;cursor:pointer;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:hover:not(ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:hover.ax-state-selected,ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:hover.ax-state-disabled){opacity:.75}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:active{opacity:1}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button .ax-ripple{background-color:rgba(var(--ax-color-ghost-fore),.5)!important}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button .ax-icon{font-size:1.25rem}ax-data-table .ax-body-content .ax-body-columns table td>.ax-content{display:flex;justify-content:flex-start;width:100%}ax-data-table .ax-body-content .ax-body-columns table td:last-child{border-inline-end:0px solid}ax-data-table .ax-body-content .ax-body-columns table td ax-skeleton{height:.875rem;border-radius:calc(var(--ax-rounded-border-default) / 1.5);width:35%}ax-data-table .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.5rem .875rem}ax-data-table .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}\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.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i2.CdkVirtualScrollableElement, selector: "[cdkVirtualScrollingElement]" }, { kind: "component", type: i3.AXResultComponent, selector: "ax-result", inputs: ["type", "caption", "description"] }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i5.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: i6.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
248
284
|
}
|
249
285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableComponent, decorators: [{
|
250
286
|
type: Component,
|
251
|
-
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-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\" [class.ax-interactive]=\"c.allowSorting\"\n (click)=\"c.allowSorting ? handleColumnClick($event,c) : null\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n <div class=\"ax-caption\">\n {{c.caption}}\n <ax-icon *ngIf=\"getSort(c)\" icon=\"ax-icon {{getSort(c)}}\"></ax-icon>\n </div>\n </ng-template>\n </th>\n <th> </th>\n </tr>\n </thead>\n </table>\n</div>\n<div cdkVirtualScrollingElement [style.height]=\"height\">\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <tbody>\n <ng-container *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 [class.ax-state-focused]=\"focusedRow && item===focusedRow\"\n [class.ax-state-selected]=\"selectedRows.includes(item)\" (click)=\"handleRowClick($event,item)\"\n [attr.data.rowIndex]=\"rIndex\">\n <ng-container *ngFor=\"let c of columns\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <div class=\"ax-content\">\n <ng-container\n *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [style.width]=\"c.width\" [class]=\"c.cssClass\">\n <div class=\"ax-content\">\n <ng-container *ngIf=\"item || !c.skeleton;else loadingTpl\">\n <ng-container\n *ngTemplateOutlet=\"c.template; context: { $implicit: {data:item,rowIndex:rIndex} }\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-template>\n </ng-container>\n <td> </td>\n </tr>\n </ng-template>\n </ng-container>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n</div>\n<div class=\"ax-table-footer\" #footerContainer>\n <div class=\"ax-table-info\">\n <div>\n Showing {{startRowIndex}} of {{totalRows}} items\n </div>\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"refresh()\">\n <ax-icon icon=\"ax-icon ax-icon-refresh\"></ax-icon>\n </ax-button>\n </div>\n <ng-content select=\"ax-footer\">\n </ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <ax-skeleton [animated]=\"true\"></ax-skeleton>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>", styles: [".ax-dark ax-data-table .ax-table-body tr:hover td:not(.ax-index-column),.ax-dark ax-data-table .ax-table-body tr.ax-state-focused td:not(.ax-index-column){background-color:#ffffff4d;color:rgba(var(--ax-color-text-default))}.ax-dark ax-data-table .ax-table-body tr.ax-state-selected:not(:hover,.ax-state-focused) td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-900),.5);color:rgba(var(--ax-color-primary-fore))}ax-data-table{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-table table{table-layout:fixed}ax-data-table .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-table .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-table .ax-table-header th.ax-interactive{cursor:pointer}ax-data-table .ax-table-header th.ax-interactive:hover{background-color:#0000001a}ax-data-table .ax-table-header th .ax-caption{display:flex;gap:.5rem;align-items:center}ax-data-table .ax-table-header th:last-child{border-inline-end:0px solid}ax-data-table .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.5rem .875rem}ax-data-table .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}ax-data-table .ax-table-body{border-collapse:collapse}ax-data-table .ax-table-body tr:nth-child(odd) td{background-color:rgba(var(--ax-color-on-surface),.7)}ax-data-table .ax-table-body tr:nth-child(odd) ax-skeleton{width:25%}ax-data-table .ax-table-body tr:hover td:not(.ax-index-column),ax-data-table .ax-table-body tr.ax-state-focused td:not(.ax-index-column){background-color:#0000001a}ax-data-table .ax-table-body tr.ax-state-selected:not(:hover,.ax-state-focused) td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-data-table .ax-table-body td{padding:.5rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-data-table .ax-table-body td.ax-index-column{background-color:rgba(var(--ax-color-on-surface))!important}ax-data-table .ax-table-body td.ax-index-column>.ax-content{justify-content:center}ax-data-table .ax-table-body td.ax-index-column>.ax-content span{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}ax-data-table .ax-table-body td.ax-command-column>.ax-content{justify-content:center}ax-data-table .ax-table-body td.ax-command-column>.ax-content span{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;font-size:1.4rem;cursor:pointer}ax-data-table .ax-table-body td>.ax-content{display:flex;justify-content:flex-start;width:100%}ax-data-table .ax-table-body td:last-child{border-inline-end:0px solid}ax-data-table .ax-table-body td ax-skeleton{height:.875rem;border-radius:calc(var(--ax-rounded-border-default) / 1.5);width:35%}\n"] }]
|
287
|
+
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<!------------------- Header contents ------------------->\n<div class=\"ax-header-content\" *ngIf=\"showHeader\">\n <div class=\"ax-header-columns ax-header-fixed-columns\" *ngIf=\"false\">\n <table tabindex=\"0\" [style.width]=\"width\">\n <colgroup>\n <!------------------- start fixed column ------------------->\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <!------------------- not fixed column ------------------->\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col style=\"width: 10px;\">\n </colgroup>\n <thead>\n <tr>\n <!------------------- start fixed column ------------------->\n <th *ngFor=\"let c of startFixedColumn()\" [class.ax-interactive]=\"c.allowSorting\"\n (click)=\"c.allowSorting ? handleColumnClick($event,c) : null\" class=\"ax-column-fixed\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n <div class=\"ax-caption\">\n {{c.caption }}\n <ax-icon *ngIf=\"getSort(c)\" icon=\"ax-icon {{getSort(c)}}\"></ax-icon>\n </div>\n </ng-template>\n </th>\n <!------------------- not fixed column ------------------->\n <th [attr.colspan]=\"notFixedColumnCount()\">\n\n </th>\n </tr>\n </thead>\n </table>\n </div>\n <div class=\"ax-header-columns\">\n <table tabindex=\"0\" [style.width]=\"width\" #headerContainer>\n <colgroup>\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col style=\"width: auto;\">\n </colgroup>\n <thead>\n <tr>\n <th *ngFor=\"let c of startFixedColumn()\">\n </th>\n <th *ngFor=\"let c of notFixedColumn()\" [class.ax-interactive]=\"c.allowSorting\"\n (click)=\"c.allowSorting ? handleColumnClick($event,c) : null\">\n <ng-template [ngIf]=\"c.headerTemplate\" [ngIfElse]=\"captionTpl\">\n <ng-container *ngTemplateOutlet=\"c.headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #captionTpl>\n <div class=\"ax-caption\">\n {{c.caption}}\n <ax-icon *ngIf=\"getSort(c)\" icon=\"ax-icon {{getSort(c)}}\"></ax-icon>\n </div>\n </ng-template>\n </th>\n <th></th>\n </tr>\n </thead>\n </table>\n </div>\n</div>\n<!------------------- Body contents ------------------->\n<div [style.height]=\"height\" class=\"ax-body-content\">\n <div class=\"ax-body-columns ax-body-fixed-columns\" *ngIf=\"false\">\n <table tabindex=\"0\" class=\"ax-table-body\" [style.width]=\"width\">\n <colgroup>\n <!------------------- start fixed column ------------------->\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <!------------------- not fixed column ------------------->\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col>\n </colgroup>\n <tbody>\n </tbody>\n </table>\n </div>\n <div class=\"ax-body-columns\">\n <div cdkVirtualScrollingElement [style.height]=\"'100%'\">\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 <colgroup>\n <!------------------- start fixed column ------------------->\n <col *ngFor=\"let c of startFixedColumn()\" [style.width]=\"c.width\">\n <!------------------- not fixed column ------------------->\n <col *ngFor=\"let c of notFixedColumn()\" [style.width]=\"c.width\">\n <col>\n </colgroup>\n <tbody>\n <ng-container\n *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx;let rIndex=index;\"\n (viewChange)=\"onViewChange($event)\">\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 [class.ax-state-focused]=\"focusedRow && item===focusedRow\" [attr.data-index]=\"rIndex\"\n [class.ax-state-selected]=\"selectedRows.includes(item)\" (click)=\"handleRowClick($event,item)\">\n <!------------------- start fixed column ------------------->\n <ng-container *ngFor=\"let c of startFixedColumn()\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <div class=\"ax-content\">\n <ng-container\n *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [class]=\"c.cssClass\" [attr.data-fixed]=\"c.fixed\"\n class=\"ax-column-fixed\">\n <div class=\"ax-content\">\n <ng-container *ngIf=\"item || !c.skeleton;else loadingTpl\">\n <ng-container\n *ngTemplateOutlet=\"c.template; context: { $implicit: {data:item,rowIndex:rIndex} }\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-template>\n </ng-container>\n <!------------------- Not fixed column ------------------->\n <ng-container *ngFor=\"let c of notFixedColumn()\">\n <ng-template [ngIf]=\"c.cellTemplate\" [ngIfElse]=\"cellTpl\">\n <div class=\"ax-content\">\n <ng-container\n *ngTemplateOutlet=\"c.cellTemplate;context: { $implicit: {data:item,rowIndex:rIndex} }\">\n </ng-container>\n </div>\n </ng-template>\n <ng-template #cellTpl>\n <td [attr.data-label]=\"c.caption\" tabindex=\"0\" [class]=\"c.cssClass\">\n <div class=\"ax-content\">\n <ng-container *ngIf=\"item || !c.skeleton;else loadingTpl\">\n <ng-container\n *ngTemplateOutlet=\"c.template; context: { $implicit: {data:item,rowIndex:rIndex} }\"></ng-container>\n </ng-container>\n </div>\n </td>\n </ng-template>\n </ng-container>\n <td></td>\n </tr>\n </ng-template>\n </ng-container>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n<div class=\"ax-table-footer\" #footerContainer>\n <div class=\"ax-table-info\">\n <div>\n Showing {{startRowIndex}} of {{totalRows}} items\n </div>\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"refresh()\">\n <ax-icon icon=\"ax-icon ax-icon-refresh\"></ax-icon>\n </ax-button>\n </div>\n <ng-content select=\"ax-footer\">\n </ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <ax-skeleton [animated]=\"true\"></ax-skeleton>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-template #emptyTpl>\n <tr>\n <td [attr.colspan]=\"columns.length\">\n <ng-template [ngIf]=\"emptyTemplate\" [ngIfElse]=\"defaultEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n <ng-template #defaultEmptyTemplate>\n <ax-result type=\"empty\" caption=\" {{'common.no-result-found' | trans }}\"></ax-result>\n </ng-template>\n </td>\n </tr>\n</ng-template>", styles: [".ax-dark ax-data-table .ax-header-content th.ax-interactive:hover{background-color:rgba(var(--ax-color-neutral-500))!important}.ax-dark ax-data-table .ax-body-content tr:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-800))!important;color:rgba(var(--ax-color-primary-fore))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-focused td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-900))!important;color:rgba(var(--ax-color-primary-fore))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-focused:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-800))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-selected td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-950))!important;color:rgba(var(--ax-color-primary-fore))!important}.ax-dark ax-data-table .ax-body-content tr.ax-state-selected:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-800))!important}ax-data-table{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-table table{table-layout:fixed}ax-data-table .ax-header-content{height:50px;overflow:hidden;position:relative}ax-data-table .ax-header-content .ax-header-fixed-columns{position:absolute;z-index:1;pointer-events:none}ax-data-table .ax-header-content .ax-header-fixed-columns th.ax-column-fixed{pointer-events:auto}ax-data-table .ax-header-content .ax-header-fixed-columns th:not(.ax-column-fixed){visibility:hidden;background-color:transparent}ax-data-table .ax-header-content .ax-header-columns{height:100%}ax-data-table .ax-header-content .ax-header-columns>table{height:100%;border-start-start-radius:var(--ax-rounded-border-default);border-start-end-radius:var(--ax-rounded-border-default);border-collapse:collapse;overflow:hidden}ax-data-table .ax-header-content .ax-header-columns>table th{text-transform:uppercase;background-color:rgba(var(--ax-color-on-surface));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-table .ax-header-content .ax-header-columns>table th.ax-interactive{cursor:pointer}ax-data-table .ax-header-content .ax-header-columns>table th.ax-interactive:hover{background-color:rgba(var(--ax-color-neutral-200))}ax-data-table .ax-header-content .ax-header-columns>table th .ax-caption{display:flex;gap:.5rem;align-items:center}ax-data-table .ax-header-content .ax-header-columns>table th:last-child{border-inline-end:0px solid}ax-data-table .ax-body-content{position:relative}ax-data-table .ax-body-content .ax-body-fixed-columns{position:absolute;z-index:1;pointer-events:none}ax-data-table .ax-body-content .ax-body-columns{height:100%}ax-data-table .ax-body-content .ax-body-columns table{border-collapse:collapse}ax-data-table .ax-body-content .ax-body-columns table tr:nth-child(odd) td{background-color:rgba(var(--ax-color-on-surface))}ax-data-table .ax-body-content .ax-body-columns table tr:nth-child(odd) ax-skeleton{width:25%}ax-data-table .ax-body-content .ax-body-columns table tr{height:40px}ax-data-table .ax-body-content .ax-body-columns table tr:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-200))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-focused td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-focused:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-300))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-selected td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-300));color:rgba(var(--ax-color-primary-fore-lighten))}ax-data-table .ax-body-content .ax-body-columns table tr.ax-state-selected:hover td:not(.ax-index-column){background-color:rgba(var(--ax-color-primary-400));color:rgba(var(--ax-color-primary-fore))}ax-data-table .ax-body-content .ax-body-columns table td{min-width:2rem;padding:.5rem 1rem;border-block-end:1px solid;border-inline-end:1px solid;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface));position:relative}ax-data-table .ax-body-content .ax-body-columns table td.ax-index-column{background-color:rgba(var(--ax-color-on-surface))!important}ax-data-table .ax-body-content .ax-body-columns table td.ax-index-column>.ax-content{justify-content:center}ax-data-table .ax-body-content .ax-body-columns table td.ax-index-column>.ax-content span{text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content{position:relative}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content>div{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:0;display:flex;flex-direction:row;align-items:center;width:100%;justify-content:center}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button{background-color:transparent;border:none;color:rgba(var(--ax-color-ghost-fore));position:relative;padding:.25rem;line-height:1;border-radius:var(--ax-rounded-border-default);font-size:1rem;cursor:pointer;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:hover:not(ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:hover.ax-state-selected,ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:hover.ax-state-disabled){opacity:.75}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button:active{opacity:1}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button .ax-ripple{background-color:rgba(var(--ax-color-ghost-fore),.5)!important}ax-data-table .ax-body-content .ax-body-columns table td.ax-command-column>.ax-content button .ax-icon{font-size:1.25rem}ax-data-table .ax-body-content .ax-body-columns table td>.ax-content{display:flex;justify-content:flex-start;width:100%}ax-data-table .ax-body-content .ax-body-columns table td:last-child{border-inline-end:0px solid}ax-data-table .ax-body-content .ax-body-columns table td ax-skeleton{height:.875rem;border-radius:calc(var(--ax-rounded-border-default) / 1.5);width:35%}ax-data-table .ax-table-footer{border-top:1px solid;border-color:rgba(var(--ax-color-border-default));border-collapse:collapse;overflow:hidden;padding:.5rem .875rem}ax-data-table .ax-table-footer .ax-table-info{display:flex;flex:1;flex-direction:row;justify-content:space-between;align-items:center}\n"] }]
|
252
288
|
}], propDecorators: { columns: [{
|
253
289
|
type: ContentChildren,
|
254
|
-
args: [
|
290
|
+
args: [AXDataTableColumnComponent]
|
255
291
|
}], onPageChanged: [{
|
256
292
|
type: Output
|
257
293
|
}], rowTemplate: [{
|
@@ -278,7 +314,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
278
314
|
type: Input
|
279
315
|
}], viewport: [{
|
280
316
|
type: ViewChild,
|
281
|
-
args: [CdkVirtualScrollViewport]
|
317
|
+
args: [CdkVirtualScrollViewport, { static: true }]
|
282
318
|
}], onScrolledIndexChanged: [{
|
283
319
|
type: Output
|
284
320
|
}], headerContainer: [{
|
@@ -289,7 +325,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
289
325
|
args: ['footerContainer']
|
290
326
|
}] } });
|
291
327
|
|
292
|
-
class
|
328
|
+
class AXRowIndexColumnComponent extends AXDataTableColumnComponent {
|
329
|
+
constructor() {
|
330
|
+
super(...arguments);
|
331
|
+
this.grid = inject(AXDataTableComponent);
|
332
|
+
this.unsubscriber = inject(AXUnsubscriber);
|
333
|
+
this.padZero = false;
|
334
|
+
this.formatCount = 1;
|
335
|
+
this.allowSorting = false;
|
336
|
+
}
|
337
|
+
get template() {
|
338
|
+
return this._template;
|
339
|
+
}
|
340
|
+
get cssClass() {
|
341
|
+
return 'ax-index-column';
|
342
|
+
}
|
343
|
+
ngOnInit() {
|
344
|
+
if (this.padZero) {
|
345
|
+
this.grid.dataSource.onChanged
|
346
|
+
.pipe(this.unsubscriber.takeUntilDestroy)
|
347
|
+
.subscribe(c => {
|
348
|
+
this.formatCount = c.totalCount.toString().length;
|
349
|
+
});
|
350
|
+
}
|
351
|
+
}
|
352
|
+
get skeleton() {
|
353
|
+
return false;
|
354
|
+
}
|
355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXRowIndexColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
356
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXRowIndexColumnComponent, selector: "ax-index-column", inputs: { width: "width", caption: "caption", fixed: "fixed", padZero: "padZero" }, providers: [
|
357
|
+
AXUnsubscriber,
|
358
|
+
{ provide: AXDataTableColumnComponent, useExisting: AXRowIndexColumnComponent }
|
359
|
+
], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
360
|
+
<ng-template let-row>
|
361
|
+
<span> {{(row.rowIndex + 1) | format:"number":"D"+formatCount}}</span>
|
362
|
+
</ng-template>`, isInline: true, dependencies: [{ kind: "pipe", type: i1$1.AXFormatPipe, name: "format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
363
|
+
}
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXRowIndexColumnComponent, decorators: [{
|
365
|
+
type: Component,
|
366
|
+
args: [{
|
367
|
+
selector: 'ax-index-column',
|
368
|
+
template: `
|
369
|
+
<ng-template let-row>
|
370
|
+
<span> {{(row.rowIndex + 1) | format:"number":"D"+formatCount}}</span>
|
371
|
+
</ng-template>`,
|
372
|
+
encapsulation: ViewEncapsulation.None,
|
373
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
374
|
+
providers: [
|
375
|
+
AXUnsubscriber,
|
376
|
+
{ provide: AXDataTableColumnComponent, useExisting: AXRowIndexColumnComponent }
|
377
|
+
],
|
378
|
+
inputs: ['width', 'caption', 'fixed'],
|
379
|
+
}]
|
380
|
+
}], propDecorators: { _template: [{
|
381
|
+
type: ViewChild,
|
382
|
+
args: [TemplateRef]
|
383
|
+
}], padZero: [{
|
384
|
+
type: Input
|
385
|
+
}] } });
|
386
|
+
|
387
|
+
class AXRowSelectColumnComponent extends AXDataTableColumnComponent {
|
293
388
|
constructor() {
|
294
389
|
super(...arguments);
|
295
390
|
this.grid = inject(AXDataTableComponent);
|
@@ -302,17 +397,17 @@ class AXRowSelectColumnComponent extends AXDataColumnComponent {
|
|
302
397
|
}
|
303
398
|
handleChange(item) {
|
304
399
|
if (this.isSelected(item)) {
|
305
|
-
this.grid.
|
400
|
+
this.grid.unSelectRows(item);
|
306
401
|
}
|
307
402
|
else {
|
308
|
-
this.grid.
|
403
|
+
this.grid.selectRows(item);
|
309
404
|
}
|
310
405
|
}
|
311
406
|
get skeleton() {
|
312
407
|
return false;
|
313
408
|
}
|
314
409
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXRowSelectColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
315
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXRowSelectColumnComponent, selector: "ax-select-column", inputs: { width: "width", caption: "caption" }, providers: [{ provide:
|
410
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXRowSelectColumnComponent, selector: "ax-select-column", inputs: { width: "width", caption: "caption", fixed: "fixed" }, providers: [{ provide: AXDataTableColumnComponent, useExisting: AXRowSelectColumnComponent }], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
316
411
|
<ng-template let-row>
|
317
412
|
<input
|
318
413
|
class="ax-checkbox"
|
@@ -339,78 +434,174 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
339
434
|
</ng-template>`,
|
340
435
|
encapsulation: ViewEncapsulation.None,
|
341
436
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
342
|
-
providers: [{ provide:
|
343
|
-
inputs: ['width', 'caption']
|
437
|
+
providers: [{ provide: AXDataTableColumnComponent, useExisting: AXRowSelectColumnComponent }],
|
438
|
+
inputs: ['width', 'caption', 'fixed']
|
344
439
|
}]
|
345
440
|
}], propDecorators: { _template: [{
|
346
441
|
type: ViewChild,
|
347
442
|
args: [TemplateRef]
|
348
443
|
}] } });
|
349
444
|
|
350
|
-
class
|
445
|
+
class AXBaseRowCommandColumnComponent extends AXDataTableColumnComponent {
|
351
446
|
constructor() {
|
352
447
|
super(...arguments);
|
353
448
|
this.grid = inject(AXDataTableComponent);
|
449
|
+
this.cdr = inject(ChangeDetectorRef);
|
354
450
|
this.allowSorting = false;
|
355
|
-
this._items = [];
|
356
|
-
this.items = [];
|
357
451
|
this.onItemClick = new EventEmitter();
|
358
452
|
}
|
359
|
-
get template() {
|
360
|
-
return this._template;
|
361
|
-
}
|
362
453
|
get skeleton() {
|
363
454
|
return false;
|
364
455
|
}
|
365
456
|
get cssClass() {
|
366
457
|
return 'ax-command-column';
|
367
458
|
}
|
368
|
-
|
369
|
-
|
459
|
+
}
|
460
|
+
class AXRowDropdownCommandColumnComponent extends AXBaseRowCommandColumnComponent {
|
461
|
+
constructor() {
|
462
|
+
super(...arguments);
|
463
|
+
this._items = [];
|
464
|
+
this.items = [];
|
465
|
+
}
|
466
|
+
get template() {
|
467
|
+
return this._template;
|
370
468
|
}
|
371
|
-
|
469
|
+
async handleOnOpened(rowData) {
|
372
470
|
if (Array.isArray(this.items)) {
|
373
|
-
|
471
|
+
this._items = this.items;
|
374
472
|
}
|
375
473
|
else
|
376
474
|
(typeof this.items == 'function');
|
377
475
|
{
|
378
|
-
const result = this
|
476
|
+
const result = this['items'](rowData);
|
379
477
|
if (Array.isArray(result)) {
|
380
|
-
|
478
|
+
this._items = result;
|
381
479
|
}
|
382
480
|
else if (result instanceof Promise) {
|
383
|
-
|
384
|
-
const observable = new Observable(observer => {
|
385
|
-
subscriber = observer;
|
386
|
-
});
|
387
|
-
result.then(items => {
|
388
|
-
subscriber?.next(items);
|
389
|
-
});
|
390
|
-
return observable;
|
481
|
+
this._items = await result;
|
391
482
|
}
|
392
483
|
}
|
393
|
-
|
484
|
+
this.cdr.detectChanges();
|
394
485
|
}
|
395
|
-
|
396
|
-
|
486
|
+
handleOnClosed() {
|
487
|
+
this._items = [];
|
488
|
+
}
|
489
|
+
handleOnItemClick(e, data) {
|
490
|
+
const args = {
|
491
|
+
component: this.grid,
|
492
|
+
isUserInteraction: true,
|
493
|
+
nativeEvent: e,
|
494
|
+
data,
|
495
|
+
name: e.name
|
496
|
+
};
|
497
|
+
this.onItemClick.emit(args);
|
498
|
+
}
|
499
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXRowDropdownCommandColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
500
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: { width: "width", caption: "caption", fixed: "fixed", items: "items" }, outputs: { onItemClick: "onItemClick" }, providers: [{ provide: AXDataTableColumnComponent, useExisting: AXRowDropdownCommandColumnComponent }], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
397
501
|
<ng-template let-row>
|
398
|
-
<
|
399
|
-
<
|
400
|
-
|
401
|
-
<ax-
|
402
|
-
<ng-container *
|
403
|
-
<ax-button-item
|
404
|
-
|
405
|
-
<ax-icon [icon]="item.icon"></ax-icon>
|
406
|
-
</ax-prefix>
|
407
|
-
</ax-button-item>
|
408
|
-
<ax-divider *ngIf="item.divided"></ax-divider>
|
502
|
+
<div *ngIf="row.data">
|
503
|
+
<button axRipple>
|
504
|
+
<ax-icon icon="ax-icon ax-icon-more-horizontal"></ax-icon>
|
505
|
+
<ax-dropdown-panel [adaptivityEnabled]="true" (onOpened)="handleOnOpened(row.data)" (onClosed)="handleOnClosed()">
|
506
|
+
<ng-container *ngIf="_items.length;else loading">
|
507
|
+
<ax-button-item-list (onItemClick)="handleOnItemClick($event,row.data)" [items]="_items">
|
508
|
+
</ax-button-item-list>
|
409
509
|
</ng-container>
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
510
|
+
<ng-template #loading>
|
511
|
+
<div panel style="padding: 0.875rem;">
|
512
|
+
<ax-loading></ax-loading>
|
513
|
+
</div>
|
514
|
+
</ng-template>
|
515
|
+
</ax-dropdown-panel>
|
516
|
+
</button>
|
517
|
+
</div>
|
518
|
+
<ng-template #loading>
|
519
|
+
<div panel style="padding: 0.875rem;">
|
520
|
+
<ax-loading></ax-loading>
|
521
|
+
</div>
|
522
|
+
</ng-template>
|
523
|
+
</ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.AXRippleDirective, selector: "[axRipple]", inputs: ["axRippleColor"] }, { kind: "component", type: i3$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i6.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i6$1.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
524
|
+
}
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXRowDropdownCommandColumnComponent, decorators: [{
|
526
|
+
type: Component,
|
527
|
+
args: [{
|
528
|
+
selector: 'ax-dropdown-command-column',
|
529
|
+
template: `
|
530
|
+
<ng-template let-row>
|
531
|
+
<div *ngIf="row.data">
|
532
|
+
<button axRipple>
|
533
|
+
<ax-icon icon="ax-icon ax-icon-more-horizontal"></ax-icon>
|
534
|
+
<ax-dropdown-panel [adaptivityEnabled]="true" (onOpened)="handleOnOpened(row.data)" (onClosed)="handleOnClosed()">
|
535
|
+
<ng-container *ngIf="_items.length;else loading">
|
536
|
+
<ax-button-item-list (onItemClick)="handleOnItemClick($event,row.data)" [items]="_items">
|
537
|
+
</ax-button-item-list>
|
538
|
+
</ng-container>
|
539
|
+
<ng-template #loading>
|
540
|
+
<div panel style="padding: 0.875rem;">
|
541
|
+
<ax-loading></ax-loading>
|
542
|
+
</div>
|
543
|
+
</ng-template>
|
544
|
+
</ax-dropdown-panel>
|
545
|
+
</button>
|
546
|
+
</div>
|
547
|
+
<ng-template #loading>
|
548
|
+
<div panel style="padding: 0.875rem;">
|
549
|
+
<ax-loading></ax-loading>
|
550
|
+
</div>
|
551
|
+
</ng-template>
|
552
|
+
</ng-template>`,
|
553
|
+
encapsulation: ViewEncapsulation.None,
|
554
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
555
|
+
providers: [{ provide: AXDataTableColumnComponent, useExisting: AXRowDropdownCommandColumnComponent }],
|
556
|
+
inputs: ['width', 'caption', 'fixed'],
|
557
|
+
outputs: ['onItemClick']
|
558
|
+
}]
|
559
|
+
}], propDecorators: { _template: [{
|
560
|
+
type: ViewChild,
|
561
|
+
args: [TemplateRef]
|
562
|
+
}], items: [{
|
563
|
+
type: Input
|
564
|
+
}] } });
|
565
|
+
class AXRowCommandColumnComponent extends AXBaseRowCommandColumnComponent {
|
566
|
+
constructor() {
|
567
|
+
super(...arguments);
|
568
|
+
this.items = [];
|
569
|
+
}
|
570
|
+
get template() {
|
571
|
+
return this._template;
|
572
|
+
}
|
573
|
+
getItems(rowData) {
|
574
|
+
if (Array.isArray(this.items)) {
|
575
|
+
return this.items;
|
576
|
+
}
|
577
|
+
else
|
578
|
+
(typeof this.items == 'function');
|
579
|
+
{
|
580
|
+
return this.items(rowData);
|
581
|
+
}
|
582
|
+
return [];
|
583
|
+
}
|
584
|
+
handleOnItemClick(e, item, data) {
|
585
|
+
const args = {
|
586
|
+
component: this.grid,
|
587
|
+
isUserInteraction: true,
|
588
|
+
nativeEvent: e,
|
589
|
+
data,
|
590
|
+
name: item.name,
|
591
|
+
};
|
592
|
+
this.onItemClick.emit(args);
|
593
|
+
}
|
594
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXRowCommandColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
595
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXRowCommandColumnComponent, selector: "ax-command-column", inputs: { width: "width", caption: "caption", fixed: "fixed", items: "items" }, outputs: { onItemClick: "onItemClick" }, providers: [{ provide: AXDataTableColumnComponent, useExisting: AXRowCommandColumnComponent }], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
596
|
+
<ng-template let-row>
|
597
|
+
<div *ngIf="row.data">
|
598
|
+
<button
|
599
|
+
[style.color]="'rgba(var(--ax-color-'+(item.color ?? 'primary')+'-500))'" axRipple *ngFor="let item of getItems(row.data)"
|
600
|
+
(click)="handleOnItemClick($event,item,row.data)">
|
601
|
+
<ax-icon [icon]="item.icon" ></ax-icon>
|
602
|
+
</button>
|
603
|
+
</div>
|
604
|
+
</ng-template>`, isInline: true, 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: i2$1.AXRippleDirective, selector: "[axRipple]", inputs: ["axRippleColor"] }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
414
605
|
}
|
415
606
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXRowCommandColumnComponent, decorators: [{
|
416
607
|
type: Component,
|
@@ -418,45 +609,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
418
609
|
selector: 'ax-command-column',
|
419
610
|
template: `
|
420
611
|
<ng-template let-row>
|
421
|
-
<
|
422
|
-
<
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
<ax-icon [icon]="item.icon"></ax-icon>
|
429
|
-
</ax-prefix>
|
430
|
-
</ax-button-item>
|
431
|
-
<ax-divider *ngIf="item.divided"></ax-divider>
|
432
|
-
</ng-container>
|
433
|
-
</ax-button-item-list>
|
434
|
-
</ax-dropdown-panel>
|
435
|
-
</span>
|
612
|
+
<div *ngIf="row.data">
|
613
|
+
<button
|
614
|
+
[style.color]="'rgba(var(--ax-color-'+(item.color ?? 'primary')+'-500))'" axRipple *ngFor="let item of getItems(row.data)"
|
615
|
+
(click)="handleOnItemClick($event,item,row.data)">
|
616
|
+
<ax-icon [icon]="item.icon" ></ax-icon>
|
617
|
+
</button>
|
618
|
+
</div>
|
436
619
|
</ng-template>`,
|
437
620
|
encapsulation: ViewEncapsulation.None,
|
438
621
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
439
|
-
providers: [{ provide:
|
440
|
-
inputs: ['width', 'caption']
|
622
|
+
providers: [{ provide: AXDataTableColumnComponent, useExisting: AXRowCommandColumnComponent }],
|
623
|
+
inputs: ['width', 'caption', 'fixed'],
|
624
|
+
outputs: ['onItemClick']
|
441
625
|
}]
|
442
626
|
}], propDecorators: { _template: [{
|
443
627
|
type: ViewChild,
|
444
628
|
args: [TemplateRef]
|
445
629
|
}], items: [{
|
446
630
|
type: Input
|
447
|
-
}], onItemClick: [{
|
448
|
-
type: Output
|
449
631
|
}] } });
|
450
632
|
|
451
633
|
const COMPONENT = [
|
452
634
|
AXDataTableComponent,
|
453
|
-
|
635
|
+
AXDataTableTextColumnComponent,
|
454
636
|
AXRowIndexColumnComponent,
|
455
637
|
AXRowSelectColumnComponent,
|
456
|
-
AXRowCommandColumnComponent
|
638
|
+
AXRowCommandColumnComponent,
|
639
|
+
AXRowDropdownCommandColumnComponent
|
457
640
|
];
|
458
641
|
const MODULES = [
|
459
642
|
CommonModule,
|
643
|
+
AXCommonModule,
|
460
644
|
ScrollingModule,
|
461
645
|
AXTranslationModule,
|
462
646
|
AXResultModule,
|
@@ -464,15 +648,18 @@ const MODULES = [
|
|
464
648
|
AXDecoratorModule,
|
465
649
|
AXSkeletonModule,
|
466
650
|
AXButtonModule,
|
467
|
-
AXDropdownModule
|
651
|
+
AXDropdownModule,
|
652
|
+
AXFormatModule
|
468
653
|
];
|
469
654
|
class AXDataTableModule {
|
470
655
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
471
656
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, declarations: [AXDataTableComponent,
|
472
|
-
|
657
|
+
AXDataTableTextColumnComponent,
|
473
658
|
AXRowIndexColumnComponent,
|
474
659
|
AXRowSelectColumnComponent,
|
475
|
-
AXRowCommandColumnComponent
|
660
|
+
AXRowCommandColumnComponent,
|
661
|
+
AXRowDropdownCommandColumnComponent], imports: [CommonModule,
|
662
|
+
AXCommonModule,
|
476
663
|
ScrollingModule,
|
477
664
|
AXTranslationModule,
|
478
665
|
AXResultModule,
|
@@ -480,11 +667,13 @@ class AXDataTableModule {
|
|
480
667
|
AXDecoratorModule,
|
481
668
|
AXSkeletonModule,
|
482
669
|
AXButtonModule,
|
483
|
-
AXDropdownModule
|
484
|
-
|
670
|
+
AXDropdownModule,
|
671
|
+
AXFormatModule], exports: [AXDataTableComponent,
|
672
|
+
AXDataTableTextColumnComponent,
|
485
673
|
AXRowIndexColumnComponent,
|
486
674
|
AXRowSelectColumnComponent,
|
487
|
-
AXRowCommandColumnComponent
|
675
|
+
AXRowCommandColumnComponent,
|
676
|
+
AXRowDropdownCommandColumnComponent] }); }
|
488
677
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, imports: [MODULES] }); }
|
489
678
|
}
|
490
679
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXDataTableModule, decorators: [{
|
@@ -501,5 +690,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
501
690
|
* Generated bundle index. Do not edit.
|
502
691
|
*/
|
503
692
|
|
504
|
-
export {
|
693
|
+
export { AXBaseRowCommandColumnComponent, AXDataTableColumnComponent, AXDataTableComponent, AXDataTableModule, AXDataTableTextColumnComponent, AXRowCommandColumnComponent, AXRowDropdownCommandColumnComponent, AXRowIndexColumnComponent, AXRowSelectColumnComponent };
|
505
694
|
//# sourceMappingURL=acorex-components-data-table.mjs.map
|