@eherve/angular-material-datatable 19.2.2 → 19.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-QPLWxbPg.mjs → eherve-angular-material-datatable-cell-checkbox-value.component-Dbzg9FxR.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-QPLWxbPg.mjs.map → eherve-angular-material-datatable-cell-checkbox-value.component-Dbzg9FxR.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-sO03698W.mjs → eherve-angular-material-datatable-cell-date-value.component-DIHWqVZR.mjs} +2 -3
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-sO03698W.mjs.map → eherve-angular-material-datatable-cell-date-value.component-DIHWqVZR.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-YgFsbB-W.mjs → eherve-angular-material-datatable-cell-duration-value.component-BW7Fa0fl.mjs} +2 -3
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-YgFsbB-W.mjs.map → eherve-angular-material-datatable-cell-duration-value.component-BW7Fa0fl.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-DpMpFjFc.mjs → eherve-angular-material-datatable-cell-number-value.component-CfXQdh66.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-DpMpFjFc.mjs.map → eherve-angular-material-datatable-cell-number-value.component-CfXQdh66.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-X21145pw.mjs → eherve-angular-material-datatable-cell-select-value.component-CXg-CD_k.mjs} +3 -3
- package/fesm2022/{eherve-angular-material-datatable-cell-select-value.component-X21145pw.mjs.map → eherve-angular-material-datatable-cell-select-value.component-CXg-CD_k.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-ByrkBtSZ.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-MKNysR_9.mjs} +159 -26
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-MKNysR_9.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-BhNNs5y8.mjs → eherve-angular-material-datatable-get.pipe-C_JNMRuY.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-BhNNs5y8.mjs.map → eherve-angular-material-datatable-get.pipe-C_JNMRuY.mjs.map} +1 -1
- package/fesm2022/eherve-angular-material-datatable.mjs +1 -1
- package/lib/datasource.d.ts +1 -0
- package/lib/datatable.component.d.ts +6 -0
- package/lib/datatable.intl.d.ts +1 -1
- package/lib/pipes/background-color.pipe.d.ts +10 -0
- package/lib/pipes/color.pipe.d.ts +2 -1
- package/lib/types/datatable-column.type.d.ts +2 -0
- package/lib/types/datatable-options.type.d.ts +6 -2
- package/package.json +3 -2
- package/fesm2022/eherve-angular-material-datatable-duration.tool-DteOjXkZ.mjs +0 -25
- package/fesm2022/eherve-angular-material-datatable-duration.tool-DteOjXkZ.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-ByrkBtSZ.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-get.tool-53V4cZOm.mjs +0 -14
- package/fesm2022/eherve-angular-material-datatable-get.tool-53V4cZOm.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, inject, Injector, ChangeDetectorRef, forwardRef, Component, Input, ViewChild, signal, ChangeDetectionStrategy, LOCALE_ID, Injectable,
|
|
2
|
+
import { Pipe, inject, Injector, ChangeDetectorRef, forwardRef, Component, Input, ViewChild, signal, ChangeDetectionStrategy, LOCALE_ID, Injectable, Directive, EventEmitter, Output, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
4
4
|
import * as i2$1 from '@angular/cdk/drag-drop';
|
|
5
5
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
@@ -23,9 +23,12 @@ import * as i10$1 from '@angular/material/progress-spinner';
|
|
|
23
23
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
24
24
|
import * as i11 from '@angular/material/table';
|
|
25
25
|
import { MatTableModule } from '@angular/material/table';
|
|
26
|
+
import * as i12 from '@angular/material/tooltip';
|
|
27
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
26
28
|
import * as i3 from 'ngx-intersection-observer';
|
|
27
29
|
import { IntersectionObserverModule } from 'ngx-intersection-observer';
|
|
28
|
-
import { BehaviorSubject, Subject, Subscription, filter, debounceTime, switchMap, startWith, tap, map } from 'rxjs';
|
|
30
|
+
import { BehaviorSubject, Subject, Subscription, filter, debounceTime, switchMap, startWith, tap, map, lastValueFrom } from 'rxjs';
|
|
31
|
+
import * as XLSX from 'xlsx';
|
|
29
32
|
import * as i4 from '@angular/material/autocomplete';
|
|
30
33
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
31
34
|
import * as i6 from '@angular/material/input';
|
|
@@ -46,8 +49,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
|
|
46
49
|
import * as i6$1 from '@angular/material/select';
|
|
47
50
|
import { MatSelectModule } from '@angular/material/select';
|
|
48
51
|
import { DataSource } from '@angular/cdk/collections';
|
|
49
|
-
import
|
|
50
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
52
|
+
import humanizeDuration from 'humanize-duration';
|
|
51
53
|
|
|
52
54
|
/** @format */
|
|
53
55
|
class SafeHtmlPipe {
|
|
@@ -946,6 +948,20 @@ class DatagridDataSource extends DataSource {
|
|
|
946
948
|
if (this.options)
|
|
947
949
|
this.loadData(this.options);
|
|
948
950
|
}
|
|
951
|
+
redraw(match) {
|
|
952
|
+
const data = [];
|
|
953
|
+
this.dataStream.value.forEach(d => {
|
|
954
|
+
if (match) {
|
|
955
|
+
if (match(d))
|
|
956
|
+
data.push({ ...d });
|
|
957
|
+
else
|
|
958
|
+
data.push(d);
|
|
959
|
+
}
|
|
960
|
+
else
|
|
961
|
+
data.push({ ...d });
|
|
962
|
+
});
|
|
963
|
+
this.dataStream.next(data);
|
|
964
|
+
}
|
|
949
965
|
calculateRowSize(data) {
|
|
950
966
|
let total = 0;
|
|
951
967
|
for (let row of data) {
|
|
@@ -979,7 +995,7 @@ const LABELS = {
|
|
|
979
995
|
},
|
|
980
996
|
};
|
|
981
997
|
class NgxMatDatatableIntl {
|
|
982
|
-
locale =
|
|
998
|
+
locale = inject(LOCALE_ID);
|
|
983
999
|
noDateLabel;
|
|
984
1000
|
itemsPerPageLabel;
|
|
985
1001
|
nextPageLabel;
|
|
@@ -995,8 +1011,8 @@ class NgxMatDatatableIntl {
|
|
|
995
1011
|
const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
|
|
996
1012
|
return `${startIndex + 1} - ${endIndex} ${this.onLabel} ${length}`;
|
|
997
1013
|
};
|
|
998
|
-
constructor(
|
|
999
|
-
this.setLabels(LABELS[locale] || DEFAULT_LABELS);
|
|
1014
|
+
constructor() {
|
|
1015
|
+
this.setLabels(LABELS[this.locale] || DEFAULT_LABELS);
|
|
1000
1016
|
}
|
|
1001
1017
|
setLabels(labels) {
|
|
1002
1018
|
this.noDateLabel = labels.noDateLabel;
|
|
@@ -1007,15 +1023,12 @@ class NgxMatDatatableIntl {
|
|
|
1007
1023
|
this.firstPageLabel = labels.firstPageLabel;
|
|
1008
1024
|
this.onLabel = labels.onLabel;
|
|
1009
1025
|
}
|
|
1010
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, deps: [
|
|
1026
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1011
1027
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl });
|
|
1012
1028
|
}
|
|
1013
1029
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, decorators: [{
|
|
1014
1030
|
type: Injectable
|
|
1015
|
-
}], ctorParameters: () => [
|
|
1016
|
-
type: Inject,
|
|
1017
|
-
args: [LOCALE_ID]
|
|
1018
|
-
}] }] });
|
|
1031
|
+
}], ctorParameters: () => [] });
|
|
1019
1032
|
|
|
1020
1033
|
/** @format */
|
|
1021
1034
|
class NgxMatDatatableContentDirective {
|
|
@@ -1037,13 +1050,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1037
1050
|
args: ['ngxMatDatatableContent']
|
|
1038
1051
|
}] } });
|
|
1039
1052
|
|
|
1053
|
+
/** @format */
|
|
1054
|
+
class BackgroundColorPipe {
|
|
1055
|
+
transform(row, column, options) {
|
|
1056
|
+
if (typeof column.backgroundColor === 'string')
|
|
1057
|
+
return column.backgroundColor;
|
|
1058
|
+
if (typeof column.backgroundColor === 'function')
|
|
1059
|
+
return column.backgroundColor(row);
|
|
1060
|
+
if (typeof options.rowBackgroundColor === 'string')
|
|
1061
|
+
return options.rowBackgroundColor;
|
|
1062
|
+
if (typeof options.rowBackgroundColor === 'function')
|
|
1063
|
+
return options.rowBackgroundColor(column, row);
|
|
1064
|
+
}
|
|
1065
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BackgroundColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1066
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: BackgroundColorPipe, isStandalone: true, name: "backgroundColor" });
|
|
1067
|
+
}
|
|
1068
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BackgroundColorPipe, decorators: [{
|
|
1069
|
+
type: Pipe,
|
|
1070
|
+
args: [{ name: 'backgroundColor' }]
|
|
1071
|
+
}] });
|
|
1072
|
+
|
|
1040
1073
|
/** @format */
|
|
1041
1074
|
class ColorPipe {
|
|
1042
|
-
transform(row, column) {
|
|
1075
|
+
transform(row, column, options) {
|
|
1043
1076
|
if (typeof column.color === 'string')
|
|
1044
1077
|
return column.color;
|
|
1045
1078
|
if (typeof column.color === 'function')
|
|
1046
1079
|
return column.color(row);
|
|
1080
|
+
if (typeof options.rowColor === 'string')
|
|
1081
|
+
return options.rowColor;
|
|
1082
|
+
if (typeof options.rowColor === 'function')
|
|
1083
|
+
return options.rowColor(column, row);
|
|
1047
1084
|
}
|
|
1048
1085
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1049
1086
|
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: ColorPipe, isStandalone: true, name: "color" });
|
|
@@ -1053,6 +1090,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1053
1090
|
args: [{ name: 'color' }]
|
|
1054
1091
|
}] });
|
|
1055
1092
|
|
|
1093
|
+
/** @format */
|
|
1094
|
+
function get(obj, path) {
|
|
1095
|
+
const chunks = path.split('.');
|
|
1096
|
+
let value = obj;
|
|
1097
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
1098
|
+
value = value[chunks[i]];
|
|
1099
|
+
if (value === undefined || value === null)
|
|
1100
|
+
return null;
|
|
1101
|
+
}
|
|
1102
|
+
return value;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/** @format */
|
|
1106
|
+
function duration(data, options) {
|
|
1107
|
+
const durationOption = { maxDecimalPoints: 0, largest: 1, fallbacks: ['en'] };
|
|
1108
|
+
if (options?.locale)
|
|
1109
|
+
durationOption.language = options.locale;
|
|
1110
|
+
let value;
|
|
1111
|
+
if (typeof data === 'number')
|
|
1112
|
+
value = data;
|
|
1113
|
+
else if (typeof data === 'string') {
|
|
1114
|
+
const date = new Date(data);
|
|
1115
|
+
if (isNaN(date.valueOf()))
|
|
1116
|
+
return null;
|
|
1117
|
+
value = Date.now() - date.valueOf();
|
|
1118
|
+
}
|
|
1119
|
+
else if (typeof data?.valueOf === 'function')
|
|
1120
|
+
value = Date.now() - data.valueOf();
|
|
1121
|
+
if (!value)
|
|
1122
|
+
return null;
|
|
1123
|
+
return humanizeDuration(value, durationOption);
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1056
1126
|
/** @format */
|
|
1057
1127
|
class NgxMatDatatablePaginatorIntl extends MatPaginatorIntl {
|
|
1058
1128
|
datatableIntl = inject(NgxMatDatatableIntl);
|
|
@@ -1118,8 +1188,76 @@ class NgxMatDatatableComponent {
|
|
|
1118
1188
|
this.paginator.pageIndex = 0;
|
|
1119
1189
|
this.loadPage();
|
|
1120
1190
|
}
|
|
1191
|
+
redraw(match) {
|
|
1192
|
+
this.dataSource.redraw(match);
|
|
1193
|
+
}
|
|
1194
|
+
exporting = false;
|
|
1195
|
+
async export() {
|
|
1196
|
+
this.exporting = true;
|
|
1197
|
+
try {
|
|
1198
|
+
const columns = this.buildRequestColumns();
|
|
1199
|
+
const order = this.buildOrder(columns);
|
|
1200
|
+
const max = Math.min(Math.floor(5 / this.dataSource.rowSize), this.dataSource.recordsFiltered);
|
|
1201
|
+
const chunks = [];
|
|
1202
|
+
for (let i = 0; i < Math.ceil(this.dataSource.recordsFiltered / max); ++i) {
|
|
1203
|
+
chunks.push({ start: i, length: max });
|
|
1204
|
+
}
|
|
1205
|
+
const data = (await Promise.all(chunks.map(c => this.options.service({ draw: Date.now().toString(), columns, order, start: c.start, length: c.length })))).reduce((pv, cv) => (pv.push(...cv.data), pv), []);
|
|
1206
|
+
const rows = [];
|
|
1207
|
+
for (let d of data) {
|
|
1208
|
+
const row = {};
|
|
1209
|
+
for (let c of this.options.columns) {
|
|
1210
|
+
if (c.hidden)
|
|
1211
|
+
continue;
|
|
1212
|
+
let value = get(d, c.property);
|
|
1213
|
+
if (c.export)
|
|
1214
|
+
c.export(row, value, d);
|
|
1215
|
+
else {
|
|
1216
|
+
if (c.transform)
|
|
1217
|
+
value = c.transform(value, d);
|
|
1218
|
+
switch (c.type) {
|
|
1219
|
+
case 'select':
|
|
1220
|
+
this.buildExportSelectColumn(c, row, value);
|
|
1221
|
+
break;
|
|
1222
|
+
case 'duration':
|
|
1223
|
+
this.buildExportDurationColumn(c, row, value);
|
|
1224
|
+
break;
|
|
1225
|
+
default:
|
|
1226
|
+
row[c.header] = value;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
rows.push(row);
|
|
1231
|
+
}
|
|
1232
|
+
const workbook = XLSX.utils.book_new();
|
|
1233
|
+
const worksheet = XLSX.utils.json_to_sheet(rows);
|
|
1234
|
+
XLSX.utils.book_append_sheet(workbook, worksheet, 'export');
|
|
1235
|
+
const filename = typeof this.options.actions?.export === 'string' ? this.options.actions.export : 'export';
|
|
1236
|
+
await XLSX.writeFile(workbook, `${filename}-${Date.now()}.xlsx`);
|
|
1237
|
+
}
|
|
1238
|
+
finally {
|
|
1239
|
+
this.exporting = false;
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
async buildExportSelectColumn(column, row, value) {
|
|
1243
|
+
row[column.header] = (await lastValueFrom(column.options)).find(option => option.value === value)?.name ?? value;
|
|
1244
|
+
}
|
|
1245
|
+
async buildExportDurationColumn(column, row, value) {
|
|
1246
|
+
row[`${column.header} ms`] = value;
|
|
1247
|
+
row[column.header] = duration(value, column);
|
|
1248
|
+
}
|
|
1121
1249
|
loadPage() {
|
|
1122
1250
|
const columns = this.buildRequestColumns();
|
|
1251
|
+
const order = this.buildOrder(columns);
|
|
1252
|
+
this.dataSource.loadData({
|
|
1253
|
+
draw: Date.now().toString(),
|
|
1254
|
+
columns,
|
|
1255
|
+
start: this.paginator.pageIndex,
|
|
1256
|
+
length: this.paginator.pageSize,
|
|
1257
|
+
order,
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
buildOrder(columns) {
|
|
1123
1261
|
const order = [];
|
|
1124
1262
|
this.options.columns
|
|
1125
1263
|
.filter(c => !!c.order)
|
|
@@ -1129,13 +1267,7 @@ class NgxMatDatatableComponent {
|
|
|
1129
1267
|
if (index !== -1)
|
|
1130
1268
|
order.push({ column: index, dir: c.order.dir });
|
|
1131
1269
|
});
|
|
1132
|
-
|
|
1133
|
-
draw: Date.now().toString(),
|
|
1134
|
-
columns,
|
|
1135
|
-
start: this.paginator.pageIndex,
|
|
1136
|
-
length: this.paginator.pageSize,
|
|
1137
|
-
order,
|
|
1138
|
-
});
|
|
1270
|
+
return order;
|
|
1139
1271
|
}
|
|
1140
1272
|
updateColumns = [];
|
|
1141
1273
|
openUpdateColumnDisplay() {
|
|
@@ -1254,7 +1386,7 @@ class NgxMatDatatableComponent {
|
|
|
1254
1386
|
.forEach(c => (c.order.index = index++));
|
|
1255
1387
|
}
|
|
1256
1388
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1257
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: NgxMatDatatableComponent, isStandalone: true, selector: "ngx-mat-datatable", inputs: { options: "options" }, outputs: { onDisplayChanged: "onDisplayChanged", rowClicked: "rowClicked" }, providers: [{ provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl }], queries: [{ propertyName: "contentRefs", predicate: NgxMatDatatableContentDirective }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" mat-table [fixedLayout]=\"false\" [dataSource]=\"dataSource\" multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\"\n [style.color]=\"row | color: column\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"options.actions?.rowClick\"\n [style.color]=\"options.rowColor ? options.rowColor(row) : undefined\"\n (click)=\"rowClick(row)\"></tr>\n <tr class=\"mat-row\" *matNoDataRow>\n <td [attr.colspan]=\"displayedColumns.length\">\n <div id=\"no-data\">\n <span id=\"no-data-label\"> {{ datatableIntl.noDateLabel }}</span>\n </div>\n </td>\n </tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header-container\" [matTooltip]=\"column.tooltip\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\" [style.place-content]=\"column.align\" [style.max-height.px]=\"options.rowMaxHeight\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContentId) {\n @let cell = contentRefs | findContent: column.cellContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefixContentId) {\n @let cell = contentRefs | findContent: column.prefixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix | safeHtml\"></span>\n }\n @switch (column.type) {\n @case ('number') {\n <lib-cell-number-value [column]=\"column\" [row]=\"row\"></lib-cell-number-value>\n }\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n <span [outerHTML]=\"value | transform: row : column | safeHtml\"></span>\n }\n }\n @if (column.suffixContentId) {\n @let cell = contentRefs | findContent: column.suffixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.suffix) {\n <span [outerHTML]=\"column.suffix | safeHtml\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{overflow:hidden;display:flex;position:relative;max-height:100%;--ngx-mat-datatable-background: #ffffff;--ngx-mat-datatable-border-color: #ccc;--ngx-mat-datatable-sticky-background: var(--ngx-mat-datatable-background);--ngx-mat-datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;width:100%;background-color:var(--ngx-mat-datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--ngx-mat-datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--ngx-mat-datatable-background);--mat-table-row-item-outline-color: var(--ngx-mat-datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--ngx-mat-datatable-sticky-background, var(--ngx-mat-datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--ngx-mat-datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--ngx-mat-datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table ::ng-deep .mat-mdc-row.has-click{cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:hover .mat-mdc-cell{color:var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary))!important;background-color:var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary))!important}#table ::ng-deep .mat-mdc-row:last-child .mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, .12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid}#table .header-container{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%;min-height:var(--mat-form-field-container-height, 56px);margin:6px 0}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--ngx-mat-datatable-background);--mat-form-field-container-height: 24px;--mat-form-field-container-vertical-padding: 4px;--mat-paginator-container-size: 46px;border-top:1px solid var(--ngx-mat-datatable-border-color)}#paginator ::ng-deep .mat-mdc-select{display:flex;height:24px}#paginator ::ng-deep .mat-mdc-paginator-touch-target{height:24px}#paginator ::ng-deep .mat-mdc-paginator-range-actions button{--mdc-icon-button-state-layer-size: 36px;padding:6px}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}\n"], dependencies: [{ kind: "pipe", type: ColorPipe, name: "color" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: HeaderAutocompleteFilterComponent, selector: "lib-header-autocomplete-filter", inputs: ["column"] }, { kind: "component", type: HeaderCheckboxFilterComponent, selector: "lib-header-checkbox-filter", inputs: ["column"] }, { kind: "component", type: HeaderDateFilterComponent, selector: "lib-header-date-filter", inputs: ["column"] }, { kind: "component", type: HeaderDurationFilterComponent, selector: "lib-header-duration-filter", inputs: ["column"] }, { kind: "component", type: HeaderNumberFilterComponent, selector: "lib-header-number-filter", inputs: ["column"] }, { kind: "component", type: HeaderSelectFilterComponent, selector: "lib-header-select-filter", inputs: ["column"] }, { kind: "component", type: HeaderTextFilterComponent, selector: "lib-header-text-filter", inputs: ["column"] }, { kind: "ngmodule", type: IntersectionObserverModule }, { kind: "directive", type: i3.IntersectionObserverDirective, selector: "[intersectionObserver]", inputs: ["visitClass", "leaveClass", "removeVisitClass", "removeLeaveClass", "useScroll", "threshold", "autoRemove"], outputs: ["intersection"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i5$2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i9.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i10$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i11.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], animations: [
|
|
1389
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: NgxMatDatatableComponent, isStandalone: true, selector: "ngx-mat-datatable", inputs: { options: "options" }, outputs: { onDisplayChanged: "onDisplayChanged", rowClicked: "rowClicked" }, providers: [{ provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl }], queries: [{ propertyName: "contentRefs", predicate: NgxMatDatatableContentDirective }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" mat-table [fixedLayout]=\"false\" [dataSource]=\"dataSource\" multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\"\n [style.color]=\"row | color: column : options\"\n [style.background-color]=\"row | backgroundColor: column : options\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"options.actions?.rowClick\"\n (click)=\"rowClick(row)\"></tr>\n <tr class=\"mat-row\" *matNoDataRow>\n <td [attr.colspan]=\"displayedColumns.length\">\n <div id=\"no-data\">\n <span id=\"no-data-label\"> {{ datatableIntl.noDateLabel }}</span>\n </div>\n </td>\n </tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.export\" class=\"action\">\n <button mat-icon-button color=\"primary\" class=\"icon-only\" [disabled]=\"exporting\" (click)=\"export()\">\n <mat-icon>download</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"exporting\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header-container\" [matTooltip]=\"column.tooltip\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\" [style.place-content]=\"column.align\" [style.max-height.px]=\"options.rowMaxHeight\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContentId) {\n @let cell = contentRefs | findContent: column.cellContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefixContentId) {\n @let cell = contentRefs | findContent: column.prefixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix | safeHtml\"></span>\n }\n @switch (column.type) {\n @case ('number') {\n <lib-cell-number-value [column]=\"column\" [row]=\"row\"></lib-cell-number-value>\n }\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n <span [outerHTML]=\"value | transform: row : column | safeHtml\"></span>\n }\n }\n @if (column.suffixContentId) {\n @let cell = contentRefs | findContent: column.suffixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.suffix) {\n <span [outerHTML]=\"column.suffix | safeHtml\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{overflow:hidden;display:flex;position:relative;max-height:100%;--ngx-mat-datatable-background: #ffffff;--ngx-mat-datatable-border-color: #ccc;--ngx-mat-datatable-sticky-background: var(--ngx-mat-datatable-background);--ngx-mat-datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;width:100%;background-color:var(--ngx-mat-datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--ngx-mat-datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--ngx-mat-datatable-background);--mat-table-row-item-outline-color: var(--ngx-mat-datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--ngx-mat-datatable-sticky-background, var(--ngx-mat-datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--ngx-mat-datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--ngx-mat-datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table ::ng-deep .mat-mdc-row.has-click{cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:hover .mat-mdc-cell{color:var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary))!important;background-color:var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary))!important}#table ::ng-deep .mat-mdc-row:last-child .mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, .12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid}#table .header-container{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%;min-height:var(--mat-form-field-container-height, 56px);margin:6px 0}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--ngx-mat-datatable-background);--mat-form-field-container-height: 24px;--mat-form-field-container-vertical-padding: 4px;--mat-paginator-container-size: 46px;border-top:1px solid var(--ngx-mat-datatable-border-color)}#paginator ::ng-deep .mat-mdc-select{display:flex;height:24px}#paginator ::ng-deep .mat-mdc-paginator-touch-target{height:24px}#paginator ::ng-deep .mat-mdc-paginator-range-actions button{--mdc-icon-button-state-layer-size: 36px;padding:6px}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}\n"], dependencies: [{ kind: "pipe", type: ColorPipe, name: "color" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: HeaderAutocompleteFilterComponent, selector: "lib-header-autocomplete-filter", inputs: ["column"] }, { kind: "component", type: HeaderCheckboxFilterComponent, selector: "lib-header-checkbox-filter", inputs: ["column"] }, { kind: "component", type: HeaderDateFilterComponent, selector: "lib-header-date-filter", inputs: ["column"] }, { kind: "component", type: HeaderDurationFilterComponent, selector: "lib-header-duration-filter", inputs: ["column"] }, { kind: "component", type: HeaderNumberFilterComponent, selector: "lib-header-number-filter", inputs: ["column"] }, { kind: "component", type: HeaderSelectFilterComponent, selector: "lib-header-select-filter", inputs: ["column"] }, { kind: "component", type: HeaderTextFilterComponent, selector: "lib-header-text-filter", inputs: ["column"] }, { kind: "ngmodule", type: IntersectionObserverModule }, { kind: "directive", type: i3.IntersectionObserverDirective, selector: "[intersectionObserver]", inputs: ["visitClass", "leaveClass", "removeVisitClass", "removeLeaveClass", "useScroll", "threshold", "autoRemove"], outputs: ["intersection"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i5$2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i9.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i10$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i11.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: BackgroundColorPipe, name: "backgroundColor" }], animations: [
|
|
1258
1390
|
trigger('fade', [
|
|
1259
1391
|
transition(':enter', [
|
|
1260
1392
|
style({ opacity: 0 }), // initial
|
|
@@ -1265,9 +1397,9 @@ class NgxMatDatatableComponent {
|
|
|
1265
1397
|
animate('0.2s', style({ opacity: 0 })), // final
|
|
1266
1398
|
]),
|
|
1267
1399
|
]),
|
|
1268
|
-
], deferBlockDependencies: [() => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-
|
|
1400
|
+
], deferBlockDependencies: [() => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-Dbzg9FxR.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-DIHWqVZR.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-BW7Fa0fl.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-number-value.component-CfXQdh66.mjs').then(m => m.CellNumberValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-CXg-CD_k.mjs').then(m => m.CellSelectValueComponent), i1$1.NgComponentOutlet, i1$1.NgTemplateOutlet, import('./eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs').then(m => m.TransformPipe), import('./eherve-angular-material-datatable-find-cell-content.pipe-On98SQ1u.mjs').then(m => m.FindContentPipe), import('./eherve-angular-material-datatable-get.pipe-C_JNMRuY.mjs').then(m => m.GetPipe), Promise.resolve().then(function () { return safeHtml_pipe; }).then(m => m.SafeHtmlPipe)]] });
|
|
1269
1401
|
}
|
|
1270
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, resolveDeferredDeps: () => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-
|
|
1402
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, resolveDeferredDeps: () => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-Dbzg9FxR.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-DIHWqVZR.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-BW7Fa0fl.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-number-value.component-CfXQdh66.mjs').then(m => m.CellNumberValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-CXg-CD_k.mjs').then(m => m.CellSelectValueComponent), import('./eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs').then(m => m.TransformPipe), import('./eherve-angular-material-datatable-find-cell-content.pipe-On98SQ1u.mjs').then(m => m.FindContentPipe), import('./eherve-angular-material-datatable-get.pipe-C_JNMRuY.mjs').then(m => m.GetPipe), Promise.resolve().then(function () { return safeHtml_pipe; }).then(m => m.SafeHtmlPipe)], resolveMetadata: (CellCheckboxValueComponent, CellDateValueComponent, CellDurationValueComponent, CellNumberValueComponent, CellSelectValueComponent, TransformPipe, FindContentPipe, GetPipe, SafeHtmlPipe) => ({ decorators: [{
|
|
1271
1403
|
type: Component,
|
|
1272
1404
|
args: [{ imports: [
|
|
1273
1405
|
CellCheckboxValueComponent,
|
|
@@ -1301,6 +1433,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ng
|
|
|
1301
1433
|
ReactiveFormsModule,
|
|
1302
1434
|
SafeHtmlPipe,
|
|
1303
1435
|
MatTooltipModule,
|
|
1436
|
+
BackgroundColorPipe,
|
|
1304
1437
|
], providers: [{ provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl }], selector: 'ngx-mat-datatable', animations: [
|
|
1305
1438
|
trigger('fade', [
|
|
1306
1439
|
transition(':enter', [
|
|
@@ -1312,7 +1445,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ng
|
|
|
1312
1445
|
animate('0.2s', style({ opacity: 0 })), // final
|
|
1313
1446
|
]),
|
|
1314
1447
|
]),
|
|
1315
|
-
], template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" mat-table [fixedLayout]=\"false\" [dataSource]=\"dataSource\" multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\"\n [style.color]=\"row | color: column\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"options.actions?.rowClick\"\n [style.color]=\"options.rowColor ? options.rowColor(row) : undefined\"\n (click)=\"rowClick(row)\"></tr>\n <tr class=\"mat-row\" *matNoDataRow>\n <td [attr.colspan]=\"displayedColumns.length\">\n <div id=\"no-data\">\n <span id=\"no-data-label\"> {{ datatableIntl.noDateLabel }}</span>\n </div>\n </td>\n </tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header-container\" [matTooltip]=\"column.tooltip\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\" [style.place-content]=\"column.align\" [style.max-height.px]=\"options.rowMaxHeight\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContentId) {\n @let cell = contentRefs | findContent: column.cellContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefixContentId) {\n @let cell = contentRefs | findContent: column.prefixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix | safeHtml\"></span>\n }\n @switch (column.type) {\n @case ('number') {\n <lib-cell-number-value [column]=\"column\" [row]=\"row\"></lib-cell-number-value>\n }\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n <span [outerHTML]=\"value | transform: row : column | safeHtml\"></span>\n }\n }\n @if (column.suffixContentId) {\n @let cell = contentRefs | findContent: column.suffixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.suffix) {\n <span [outerHTML]=\"column.suffix | safeHtml\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{overflow:hidden;display:flex;position:relative;max-height:100%;--ngx-mat-datatable-background: #ffffff;--ngx-mat-datatable-border-color: #ccc;--ngx-mat-datatable-sticky-background: var(--ngx-mat-datatable-background);--ngx-mat-datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;width:100%;background-color:var(--ngx-mat-datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--ngx-mat-datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--ngx-mat-datatable-background);--mat-table-row-item-outline-color: var(--ngx-mat-datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--ngx-mat-datatable-sticky-background, var(--ngx-mat-datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--ngx-mat-datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--ngx-mat-datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table ::ng-deep .mat-mdc-row.has-click{cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:hover .mat-mdc-cell{color:var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary))!important;background-color:var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary))!important}#table ::ng-deep .mat-mdc-row:last-child .mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, .12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid}#table .header-container{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%;min-height:var(--mat-form-field-container-height, 56px);margin:6px 0}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--ngx-mat-datatable-background);--mat-form-field-container-height: 24px;--mat-form-field-container-vertical-padding: 4px;--mat-paginator-container-size: 46px;border-top:1px solid var(--ngx-mat-datatable-border-color)}#paginator ::ng-deep .mat-mdc-select{display:flex;height:24px}#paginator ::ng-deep .mat-mdc-paginator-touch-target{height:24px}#paginator ::ng-deep .mat-mdc-paginator-range-actions button{--mdc-icon-button-state-layer-size: 36px;padding:6px}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}\n"] }]
|
|
1448
|
+
], template: "<!-- @format -->\n\n<div *ngIf=\"dataSource\" id=\"container\">\n <ng-container *ngTemplateOutlet=\"actionsTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" mat-table [fixedLayout]=\"false\" [dataSource]=\"dataSource\" multiTemplateDataRows>\n @for (column of options.columns; track column) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\">\n <ng-container *ngTemplateOutlet=\"headerTmpl; context: { column }\"></ng-container>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.min-width.px]=\"column.minWidth || options.columnMinWith\"\n [style.color]=\"row | color: column : options\"\n [style.background-color]=\"row | backgroundColor: column : options\">\n <ng-container *ngTemplateOutlet=\"cellTmpl; context: { column, row }\"></ng-container>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"options.actions?.rowClick\"\n (click)=\"rowClick(row)\"></tr>\n <tr class=\"mat-row\" *matNoDataRow>\n <td [attr.colspan]=\"displayedColumns.length\">\n <div id=\"no-data\">\n <span id=\"no-data-label\"> {{ datatableIntl.noDateLabel }}</span>\n </div>\n </td>\n </tr>\n </table>\n </div>\n\n <mat-paginator\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"options.pageSizeOptions || [5, 10, 20, 50, 100]\"\n [pageSize]=\"(options.pageSizeOptions || [5, 10, 20, 50, 100])[options.pageSizeOptionsIndex || 0]\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n\n <div id=\"loading\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner></mat-spinner>\n </div>\n</div>\n\n<ng-template #actionsTmpl>\n <div id=\"actions\">\n <div id=\"actions-start\"></div>\n\n <div id=\"actions-center\"></div>\n\n <div id=\"actions-end\">\n <div\n *ngIf=\"\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder\n \">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || 'Afficher / masquer des colonnes'\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n\n <div *ngIf=\"options.actions?.export\" class=\"action\">\n <button mat-icon-button color=\"primary\" class=\"icon-only\" [disabled]=\"exporting\" (click)=\"export()\">\n <mat-icon>download</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"exporting\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n\n <div *ngIf=\"options.actions?.refresh\" class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only\"\n [disabled]=\"dataSource.loading$ | async\"\n (click)=\"loadPage()\">\n <mat-icon>sync</mat-icon>\n </button>\n <div class=\"action-loader\" *ngIf=\"dataSource.loading$ | async\" @fade>\n <mat-spinner [diameter]=\"32\"></mat-spinner>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<mat-menu #columnsMenu=\"matMenu\" class=\"datatable-columns-menu\">\n <div\n id=\"column-options\"\n cdkDropList\n has-handle\n [cdkDropListDisabled]=\"!options.actions?.columns?.reorder\"\n (cdkDropListDropped)=\"reorderColumns($event)\">\n @for (column of updateColumns; track column) {\n @if (['_select', '_rownumber'].includes(column.header)) {\n <div mat-list-item cdkDrag></div>\n } @else {\n <div class=\"column-options-item\" mat-list-item cdkDrag (click)=\"$event.stopPropagation()\">\n <button\n *ngIf=\"options.actions?.columns?.hideAndShow\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.hidden ? 'toggle-off' : 'toggle-on'\"\n (click)=\"column.hidden = !column.hidden\"\n [style.margin-right.px]=\"8\">\n <mat-icon>\n @if (!column.hidden) {\n visibility\n } @else {\n visibility_off\n }\n </mat-icon>\n </button>\n <button\n *ngIf=\"options.actions?.columns?.sticky\"\n mat-icon-button\n size=\"small\"\n color=\"primary\"\n [class]=\"column.sticky ? 'toggle-on' : 'toggle-off'\"\n (click)=\"column.sticky = !column.sticky\"\n [style.margin-right.px]=\"8\">\n <mat-icon>push_pin </mat-icon>\n </button>\n <span [style.margin-right.px]=\"8\">{{ column.header }}</span>\n <mat-icon\n *ngIf=\"options.actions?.columns?.reorder\"\n size=\"small\"\n class=\"handle\"\n cdkDragHandle\n [style.margin]=\"'0 8px 0 auto'\">\n open_with\n </mat-icon>\n </div>\n }\n }\n </div>\n</mat-menu>\n\n<ng-template #headerTmpl let-column=\"column\">\n <div class=\"header-container\" [matTooltip]=\"column.tooltip\">\n <div class=\"header\" [formGroup]=\"searchFormGroup\">\n @if (column.searchable) {\n @switch (column.type) {\n @case ('text') {\n <lib-header-text-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter [column]=\"column\" [formControlName]=\"column.columnDef\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"column.columnDef\"></lib-header-duration-filter>\n }\n @default {\n <span>{{ column.header }}</span>\n }\n }\n } @else {\n <span>{{ column.header }}</span>\n }\n <ng-container *ngTemplateOutlet=\"headerActionsTmpl; context: { column }\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #headerActionsTmpl let-column=\"column\">\n <div class=\"header-actions\">\n <ng-container *ngIf=\"column.sortable\">\n <button\n class=\"sort-btn\"\n mat-icon-button\n size=\"small\"\n (click)=\"sortColumn(column)\"\n [matBadgeHidden]=\"!column.order\"\n [matBadge]=\"column.order?.index + 1\">\n @switch (column.order?.dir) {\n @case ('asc') {\n <mat-icon size=\"small\">arrow_upward</mat-icon>\n }\n @case ('desc') {\n <mat-icon size=\"small\">arrow_downward</mat-icon>\n }\n @default {\n <mat-icon size=\"small\">sort</mat-icon>\n }\n }\n </button>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #cellTmpl let-column=\"column\" let-row=\"row\">\n @defer (on viewport) {\n <div class=\"cell\" [style.place-content]=\"column.align\" [style.max-height.px]=\"options.rowMaxHeight\">\n @let value = row | get: column.property;\n @if (column.cellComponent) {\n <ng-container *ngComponentOutlet=\"column.cellComponent; inputs: { column, row, value }\" />\n } @else if (column.cellContentId) {\n @let cell = contentRefs | findContent: column.cellContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else {\n @if (column.prefixContentId) {\n @let cell = contentRefs | findContent: column.prefixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix | safeHtml\"></span>\n }\n @switch (column.type) {\n @case ('number') {\n <lib-cell-number-value [column]=\"column\" [row]=\"row\"></lib-cell-number-value>\n }\n @case ('select') {\n <lib-cell-select-value [column]=\"column\" [row]=\"row\"></lib-cell-select-value>\n }\n @case ('checkbox') {\n <lib-cell-checkbox-value [column]=\"column\" [row]=\"row\"></lib-cell-checkbox-value>\n }\n @case ('date') {\n <lib-cell-date-value [column]=\"column\" [row]=\"row\"></lib-cell-date-value>\n }\n @case ('duration') {\n <lib-cell-duration-value [column]=\"column\" [row]=\"row\"></lib-cell-duration-value>\n }\n @default {\n <span [outerHTML]=\"value | transform: row : column | safeHtml\"></span>\n }\n }\n @if (column.suffixContentId) {\n @let cell = contentRefs | findContent: column.suffixContentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, row, value }\" />\n }\n } @else if (column.suffix) {\n <span [outerHTML]=\"column.suffix | safeHtml\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n", styles: [":host{overflow:hidden;display:flex;position:relative;max-height:100%;--ngx-mat-datatable-background: #ffffff;--ngx-mat-datatable-border-color: #ccc;--ngx-mat-datatable-sticky-background: var(--ngx-mat-datatable-background);--ngx-mat-datatable-sticky-border: 1px dashed #e6a93a}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;overflow:hidden;width:100%;background-color:var(--ngx-mat-datatable-background)}#actions{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;border-bottom:1px solid var(--ngx-mat-datatable-border-color)}#actions #actions-start,#actions #actions-center,#actions #actions-end{display:flex;box-sizing:border-box;align-items:center;flex-direction:row}#actions #actions-start{place-content:center start}#actions #actions-center{place-content:center center}#actions #actions-end{place-content:center end}#actions .action{position:relative}#actions .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#column-options .column-options-item{overflow:hidden;display:flex;box-sizing:border-box;align-items:center;flex-direction:row;place-content:center start}#column-options .column-options-item button.toggle-off{--mdc-icon-button-icon-color: var(--mdc-icon-button-disabled-icon-color)}#column-options .column-options-item mat-icon.handle{color:var(--mdc-icon-button-disabled-icon-color)}#table-container{flex:1 1 100%;overflow:auto;width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--ngx-mat-datatable-background);--mat-table-row-item-outline-color: var(--ngx-mat-datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{opacity:1;background:var(--ngx-mat-datatable-sticky-background, var(--ngx-mat-datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--ngx-mat-datatable-sticky-border)}#table ::ng-deep .mat-mdc-header-cell{padding:0 8px}#table ::ng-deep .mat-mdc-header-cell mat-form-field{min-width:auto;flex:1 1 100%;--mdc-filled-text-field-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mdc-filled-text-field-container-shape: 0;--mdc-filled-text-field-container-color: var(--ngx-mat-datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}#table ::ng-deep .mat-mdc-header-cell mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}#table ::ng-deep .mat-mdc-cell{padding:0 8px}#table ::ng-deep .mat-mdc-row.has-click{cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:hover .mat-mdc-cell{color:var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary))!important;background-color:var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary))!important}#table ::ng-deep .mat-mdc-row:last-child .mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, .12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid}#table .header-container{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%;min-height:var(--mat-form-field-container-height, 56px);margin:6px 0}#table .header{width:100%;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}#table .header .header-actions .sort-btn{--mat-badge-container-size: 12px;--mat-badge-line-height: 16px;--mat-badge-text-size: 10px;--mat-badge-legacy-container-size: 18px}#table .cell{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;width:100%}#paginator{--mat-paginator-container-background-color: var(--ngx-mat-datatable-background);--mat-form-field-container-height: 24px;--mat-form-field-container-vertical-padding: 4px;--mat-paginator-container-size: 46px;border-top:1px solid var(--ngx-mat-datatable-border-color)}#paginator ::ng-deep .mat-mdc-select{display:flex;height:24px}#paginator ::ng-deep .mat-mdc-paginator-touch-target{height:24px}#paginator ::ng-deep .mat-mdc-paginator-range-actions button{--mdc-icon-button-state-layer-size: 36px;padding:6px}#loading{position:absolute;z-index:200;inset:0;background-color:#00000029}#loading mat-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small]{--mdc-icon-button-state-layer-size: 30px;--mdc-icon-button-icon-size: 18px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] .mat-mdc-button-touch-target{height:36px;width:36px}::ng-deep .mat-mdc-icon-button[mat-icon-button][size=small] mat-icon{height:18px;width:18px;font-size:18px}.row{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}\n"] }]
|
|
1316
1449
|
}], ctorParameters: null, propDecorators: { options: [{
|
|
1317
1450
|
type: Input,
|
|
1318
1451
|
args: ['options']
|
|
@@ -1357,5 +1490,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1357
1490
|
* Generated bundle index. Do not edit.
|
|
1358
1491
|
*/
|
|
1359
1492
|
|
|
1360
|
-
export { NgxMatDatatableModule as N, SelectOptionPipe as S, SafeHtmlPipe as a, NgxMatDatatableComponent as b, NgxMatDatatableContentDirective as c,
|
|
1361
|
-
//# sourceMappingURL=eherve-angular-material-datatable-eherve-angular-material-datatable-
|
|
1493
|
+
export { NgxMatDatatableModule as N, SelectOptionPipe as S, SafeHtmlPipe as a, NgxMatDatatableComponent as b, NgxMatDatatableContentDirective as c, duration as d, NgxMatDatatableIntl as e, get as g };
|
|
1494
|
+
//# sourceMappingURL=eherve-angular-material-datatable-eherve-angular-material-datatable-MKNysR_9.mjs.map
|