@eherve/angular-material-datatable 19.23.5 → 19.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -41
- package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-PHY0X0wz.mjs → eherve-angular-material-datatable-cell-checkbox-value.component-E5dQ-SJb.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-checkbox-value.component-PHY0X0wz.mjs.map → eherve-angular-material-datatable-cell-checkbox-value.component-E5dQ-SJb.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-date-value.component-DYO_rIFt.mjs → eherve-angular-material-datatable-cell-date-value.component-CXh9rWrt.mjs} +32 -12
- package/fesm2022/eherve-angular-material-datatable-cell-date-value.component-CXh9rWrt.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-BbHM4MxI.mjs → eherve-angular-material-datatable-cell-duration-value.component-Br8ga1qE.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-duration-value.component-BbHM4MxI.mjs.map → eherve-angular-material-datatable-cell-duration-value.component-Br8ga1qE.mjs.map} +1 -1
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-Ip_V5vNB.mjs → eherve-angular-material-datatable-cell-number-value.component-BGmWTDbF.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-cell-number-value.component-Ip_V5vNB.mjs.map → eherve-angular-material-datatable-cell-number-value.component-BGmWTDbF.mjs.map} +1 -1
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-_CDm5Nid.mjs +45 -0
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-_CDm5Nid.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-eherve-angular-material-datatable-B9NS2F1a.mjs → eherve-angular-material-datatable-eherve-angular-material-datatable-oKhIjmQe.mjs} +486 -296
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-oKhIjmQe.mjs.map +1 -0
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-CFZSdKSW.mjs → eherve-angular-material-datatable-get.pipe-OPM3WlAY.mjs} +2 -2
- package/fesm2022/{eherve-angular-material-datatable-get.pipe-CFZSdKSW.mjs.map → eherve-angular-material-datatable-get.pipe-OPM3WlAY.mjs.map} +1 -1
- package/fesm2022/eherve-angular-material-datatable.mjs +1 -1
- package/lib/components/cell-date-value/cell-date-value.component.d.ts +2 -1
- package/lib/components/cell-select-value/cell-select-value.component.d.ts +2 -3
- package/lib/components/header-autocomplete-filter/header-autocomplete-filter.component.d.ts +2 -0
- package/lib/components/header-date-filter/header-date-filter.component.d.ts +2 -0
- package/lib/components/header-duration-filter/header-duration-filter.component.d.ts +2 -0
- package/lib/components/header-number-filter/header-number-filter.component.d.ts +2 -0
- package/lib/components/header-select-filter/header-select-filter.component.d.ts +3 -0
- package/lib/components/header-text-filter/header-text-filter.component.d.ts +2 -0
- package/lib/datasource.d.ts +4 -1
- package/lib/datatable.component.d.ts +3 -13
- package/lib/datatable.intl.d.ts +11 -0
- package/lib/date-refresh.service.d.ts +8 -0
- package/lib/select-options-cache.service.d.ts +9 -0
- package/lib/tools/datasource-request.tool.d.ts +9 -0
- package/lib/tools/datatable-export.tool.d.ts +21 -0
- package/lib/tools/strip-html.tool.d.ts +1 -1
- package/lib/types/action.type.d.ts +1 -0
- package/lib/types/datasource-service.type.d.ts +5 -2
- package/package.json +7 -3
- package/public-api.d.ts +2 -1
- package/fesm2022/eherve-angular-material-datatable-cell-date-value.component-DYO_rIFt.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-C5TwovoH.mjs +0 -44
- package/fesm2022/eherve-angular-material-datatable-cell-select-value.component-C5TwovoH.mjs.map +0 -1
- package/fesm2022/eherve-angular-material-datatable-eherve-angular-material-datatable-B9NS2F1a.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { SecurityContext, Pipe,
|
|
2
|
+
import { inject, LOCALE_ID, Injectable, SecurityContext, Pipe, Injector, ChangeDetectorRef, forwardRef, Component, Input, ViewChild, signal, ChangeDetectionStrategy, HostBinding, InjectionToken, Directive, EventEmitter, ElementRef, Output, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
4
4
|
import * as i2$1 from '@angular/cdk/drag-drop';
|
|
5
5
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
@@ -35,7 +35,7 @@ import * as i3 from 'ngx-intersection-observer';
|
|
|
35
35
|
import { IntersectionObserverModule } from 'ngx-intersection-observer';
|
|
36
36
|
import moment from 'moment';
|
|
37
37
|
import * as rxjs from 'rxjs';
|
|
38
|
-
import { BehaviorSubject, Subject, Subscription, filter, debounceTime, switchMap, startWith, tap, map } from 'rxjs';
|
|
38
|
+
import { BehaviorSubject, Subject, Subscription, filter, debounceTime, switchMap, startWith, tap, defer, catchError, of, finalize, map, shareReplay, firstValueFrom } from 'rxjs';
|
|
39
39
|
import * as i4 from '@angular/material/autocomplete';
|
|
40
40
|
import { MatAutocomplete, MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
41
41
|
import * as i6 from '@angular/material/input';
|
|
@@ -58,6 +58,123 @@ import { DataSource } from '@angular/cdk/collections';
|
|
|
58
58
|
import * as lodash from 'lodash-es';
|
|
59
59
|
import humanizeDuration from 'humanize-duration';
|
|
60
60
|
|
|
61
|
+
/** @format */
|
|
62
|
+
const DEFAULT_LABELS = {
|
|
63
|
+
noDateLabel: 'No data',
|
|
64
|
+
itemsPerPageLabel: `Items per page:`,
|
|
65
|
+
nextPageLabel: `Next page`,
|
|
66
|
+
lastPageLabel: `Last page`,
|
|
67
|
+
previousPageLabel: `Previous page`,
|
|
68
|
+
firstPageLabel: `First page`,
|
|
69
|
+
onLabel: `on`,
|
|
70
|
+
incrementalLoadingLabel: 'Loading...',
|
|
71
|
+
incrementalLoadMoreLabel: 'Load more',
|
|
72
|
+
columnsActionLabel: 'Configure columns',
|
|
73
|
+
exportActionLabel: 'Export data',
|
|
74
|
+
refreshActionLabel: 'Refresh data',
|
|
75
|
+
showColumnActionLabel: 'Show column',
|
|
76
|
+
hideColumnActionLabel: 'Hide column',
|
|
77
|
+
pinColumnActionLabel: 'Pin column',
|
|
78
|
+
unpinColumnActionLabel: 'Unpin column',
|
|
79
|
+
sortColumnActionLabel: 'Sort column',
|
|
80
|
+
clearFilterLabel: 'Clear filter',
|
|
81
|
+
};
|
|
82
|
+
const LABELS = {
|
|
83
|
+
fr: {
|
|
84
|
+
noDateLabel: 'Aucune donnée',
|
|
85
|
+
itemsPerPageLabel: `Éléments par page :`,
|
|
86
|
+
nextPageLabel: `Page suivante`,
|
|
87
|
+
lastPageLabel: `Dernière page`,
|
|
88
|
+
previousPageLabel: `Page précédente`,
|
|
89
|
+
firstPageLabel: `Première page`,
|
|
90
|
+
onLabel: `sur`,
|
|
91
|
+
incrementalLoadingLabel: 'Chargement...',
|
|
92
|
+
incrementalLoadMoreLabel: 'Charger plus',
|
|
93
|
+
columnsActionLabel: 'Configurer les colonnes',
|
|
94
|
+
exportActionLabel: 'Exporter les données',
|
|
95
|
+
refreshActionLabel: 'Actualiser les données',
|
|
96
|
+
showColumnActionLabel: 'Afficher la colonne',
|
|
97
|
+
hideColumnActionLabel: 'Masquer la colonne',
|
|
98
|
+
pinColumnActionLabel: 'Épingler la colonne',
|
|
99
|
+
unpinColumnActionLabel: 'Désépingler la colonne',
|
|
100
|
+
sortColumnActionLabel: 'Trier la colonne',
|
|
101
|
+
clearFilterLabel: 'Effacer le filtre',
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
const DEFAULT_NUMBER_OPTIONS = {
|
|
105
|
+
separator: ',',
|
|
106
|
+
decimal: '.',
|
|
107
|
+
duration: 0.3,
|
|
108
|
+
useEasing: false,
|
|
109
|
+
};
|
|
110
|
+
const NUMBER_OPTIONS = {
|
|
111
|
+
fr: {
|
|
112
|
+
separator: ' ',
|
|
113
|
+
decimal: ',',
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
class NgxMatDatatableIntl {
|
|
117
|
+
locale = inject(LOCALE_ID);
|
|
118
|
+
noDateLabel;
|
|
119
|
+
itemsPerPageLabel;
|
|
120
|
+
nextPageLabel;
|
|
121
|
+
lastPageLabel;
|
|
122
|
+
previousPageLabel;
|
|
123
|
+
firstPageLabel;
|
|
124
|
+
onLabel;
|
|
125
|
+
incrementalLoadingLabel;
|
|
126
|
+
incrementalLoadMoreLabel;
|
|
127
|
+
columnsActionLabel;
|
|
128
|
+
exportActionLabel;
|
|
129
|
+
refreshActionLabel;
|
|
130
|
+
showColumnActionLabel;
|
|
131
|
+
hideColumnActionLabel;
|
|
132
|
+
pinColumnActionLabel;
|
|
133
|
+
unpinColumnActionLabel;
|
|
134
|
+
sortColumnActionLabel;
|
|
135
|
+
clearFilterLabel;
|
|
136
|
+
numberOptions;
|
|
137
|
+
getRangeLabel = (page, pageSize, length) => {
|
|
138
|
+
if (length === 0 || pageSize === 0)
|
|
139
|
+
return `0 ${this.onLabel} ${length}`;
|
|
140
|
+
length = Math.max(length, 0);
|
|
141
|
+
const startIndex = page * pageSize;
|
|
142
|
+
const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
|
|
143
|
+
return `${startIndex + 1} - ${endIndex} ${this.onLabel} ${length}`;
|
|
144
|
+
};
|
|
145
|
+
constructor() {
|
|
146
|
+
const locale = this.locale.toLowerCase().split(/[-_]/)[0];
|
|
147
|
+
this.setLabels(LABELS[locale] ?? DEFAULT_LABELS);
|
|
148
|
+
this.numberOptions = { ...DEFAULT_NUMBER_OPTIONS, ...(NUMBER_OPTIONS[locale] ?? {}) };
|
|
149
|
+
}
|
|
150
|
+
setLabels(labels) {
|
|
151
|
+
this.noDateLabel = labels.noDateLabel;
|
|
152
|
+
this.itemsPerPageLabel = labels.itemsPerPageLabel;
|
|
153
|
+
this.nextPageLabel = labels.nextPageLabel;
|
|
154
|
+
this.lastPageLabel = labels.lastPageLabel;
|
|
155
|
+
this.previousPageLabel = labels.previousPageLabel;
|
|
156
|
+
this.firstPageLabel = labels.firstPageLabel;
|
|
157
|
+
this.onLabel = labels.onLabel;
|
|
158
|
+
this.incrementalLoadingLabel = labels.incrementalLoadingLabel;
|
|
159
|
+
this.incrementalLoadMoreLabel = labels.incrementalLoadMoreLabel;
|
|
160
|
+
this.columnsActionLabel = labels.columnsActionLabel;
|
|
161
|
+
this.exportActionLabel = labels.exportActionLabel;
|
|
162
|
+
this.refreshActionLabel = labels.refreshActionLabel;
|
|
163
|
+
this.showColumnActionLabel = labels.showColumnActionLabel;
|
|
164
|
+
this.hideColumnActionLabel = labels.hideColumnActionLabel;
|
|
165
|
+
this.pinColumnActionLabel = labels.pinColumnActionLabel;
|
|
166
|
+
this.unpinColumnActionLabel = labels.unpinColumnActionLabel;
|
|
167
|
+
this.sortColumnActionLabel = labels.sortColumnActionLabel;
|
|
168
|
+
this.clearFilterLabel = labels.clearFilterLabel;
|
|
169
|
+
}
|
|
170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
171
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, providedIn: 'root' });
|
|
172
|
+
}
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, decorators: [{
|
|
174
|
+
type: Injectable,
|
|
175
|
+
args: [{ providedIn: 'root' }]
|
|
176
|
+
}], ctorParameters: () => [] });
|
|
177
|
+
|
|
61
178
|
/** @format */
|
|
62
179
|
class SafeHtmlPipe {
|
|
63
180
|
sanitizer;
|
|
@@ -77,20 +194,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
77
194
|
}]
|
|
78
195
|
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
79
196
|
|
|
80
|
-
var safeHtml_pipe = /*#__PURE__*/Object.freeze({
|
|
81
|
-
__proto__: null,
|
|
82
|
-
SafeHtmlPipe: SafeHtmlPipe
|
|
83
|
-
});
|
|
84
|
-
|
|
85
197
|
/** @format */
|
|
86
|
-
|
|
198
|
+
const HTML_ENTITIES = {
|
|
199
|
+
amp: '&',
|
|
200
|
+
apos: "'",
|
|
201
|
+
gt: '>',
|
|
202
|
+
lt: '<',
|
|
203
|
+
nbsp: ' ',
|
|
204
|
+
quot: '"',
|
|
205
|
+
};
|
|
206
|
+
function stripHtml(value, tagReplacement = ' ') {
|
|
87
207
|
if (!value)
|
|
88
208
|
return '';
|
|
89
|
-
return value
|
|
90
|
-
.replace(
|
|
91
|
-
.replace(/\s+/g, ' ') // collapse spaces
|
|
209
|
+
return decodeHtmlEntities(value.replace(/<[^>]+>/g, tagReplacement))
|
|
210
|
+
.replace(/\s+/g, ' ')
|
|
92
211
|
.trim();
|
|
93
212
|
}
|
|
213
|
+
function decodeHtmlEntities(value) {
|
|
214
|
+
return value.replace(/&(#(?:x[0-9a-f]+|\d+)|[a-z][a-z0-9]+);/gi, (match, entity) => {
|
|
215
|
+
if (!entity.startsWith('#'))
|
|
216
|
+
return HTML_ENTITIES[entity.toLowerCase()] ?? match;
|
|
217
|
+
const radix = entity[1]?.toLowerCase() === 'x' ? 16 : 10;
|
|
218
|
+
const source = radix === 16 ? entity.slice(2) : entity.slice(1);
|
|
219
|
+
const codePoint = Number.parseInt(source, radix);
|
|
220
|
+
if (!Number.isInteger(codePoint) || codePoint < 0 || codePoint > 0x10ffff)
|
|
221
|
+
return match;
|
|
222
|
+
try {
|
|
223
|
+
return String.fromCodePoint(codePoint);
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
return match;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
94
230
|
|
|
95
231
|
/** @format */
|
|
96
232
|
class HeaderAutocompleteFilterComponent {
|
|
@@ -107,6 +243,7 @@ class HeaderAutocompleteFilterComponent {
|
|
|
107
243
|
onTouched = () => { };
|
|
108
244
|
filter$ = new BehaviorSubject(undefined);
|
|
109
245
|
nextPage$ = new Subject();
|
|
246
|
+
datatableIntl = inject(NgxMatDatatableIntl);
|
|
110
247
|
injector = inject(Injector);
|
|
111
248
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
112
249
|
subsink = new Subscription();
|
|
@@ -196,7 +333,13 @@ class HeaderAutocompleteFilterComponent {
|
|
|
196
333
|
this.options = [];
|
|
197
334
|
this.groups = [];
|
|
198
335
|
let skip = 0;
|
|
199
|
-
return this.nextPage$.pipe(startWith(skip), tap(() => (this.searching = true)), switchMap(
|
|
336
|
+
return this.nextPage$.pipe(startWith(skip), tap(() => (this.searching = true)), switchMap(() => defer(() => this.column.options(this.column.limit || 10, skip, search, this.getGlobalSearchValue())).pipe(catchError(() => {
|
|
337
|
+
this.hasMore = false;
|
|
338
|
+
return of(null);
|
|
339
|
+
}), finalize(() => {
|
|
340
|
+
this.searching = false;
|
|
341
|
+
this.changeDetectorRef.markForCheck();
|
|
342
|
+
}))), filter((data) => Array.isArray(data)), map(data => {
|
|
200
343
|
data.forEach(d => {
|
|
201
344
|
this.options.push(d);
|
|
202
345
|
const name = d.group ?? '';
|
|
@@ -207,8 +350,7 @@ class HeaderAutocompleteFilterComponent {
|
|
|
207
350
|
group.options.push(d);
|
|
208
351
|
});
|
|
209
352
|
skip += this.column.limit || 10;
|
|
210
|
-
this.hasMore = data
|
|
211
|
-
this.searching = false;
|
|
353
|
+
this.hasMore = data.length === (this.column.limit || 10);
|
|
212
354
|
}));
|
|
213
355
|
}))
|
|
214
356
|
.subscribe());
|
|
@@ -223,7 +365,7 @@ class HeaderAutocompleteFilterComponent {
|
|
|
223
365
|
multi: true,
|
|
224
366
|
useExisting: forwardRef(() => HeaderAutocompleteFilterComponent),
|
|
225
367
|
},
|
|
226
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "auto", first: true, predicate: MatAutocomplete, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n
|
|
368
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "auto", first: true, predicate: MatAutocomplete, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n matInput\n [formControl]=\"selectControl\"\n [matAutocomplete]=\"auto\"\n (input)=\"filter()\"\n (focus)=\"focus()\"\n (blur)=\"onTouched()\" />\n <mat-autocomplete #auto=\"matAutocomplete\" requireSelection [displayWith]=\"displayWith\">\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"autocompleteOption; context: { option }\"></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option.value) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"autocompleteOption; context: { option }\"></ng-container>\n </mat-option>\n }\n }\n\n <mat-option id=\"searching-option\" disabled>\n @if (searching) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-option>\n\n @if (hasMore && !searching) {\n <mat-option id=\"load-more-options\" disabled intersectionObserver (intersection)=\"loadMore($event.intersect)\">\n </mat-option>\n }\n </mat-autocomplete>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n\n<ng-template #autocompleteOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case ('svg') {\n <mat-icon [svgIcon]=\"option.icon\" [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\"></mat-icon>\n }\n @default {\n <mat-icon [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#searching-option{min-height:2px;position:relative}#searching-option mat-progress-bar{position:absolute;inset:0}\n"], dependencies: [{ 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: IntersectionObserverModule }, { kind: "directive", type: i3.IntersectionObserverDirective, selector: "[intersectionObserver]", inputs: ["visitClass", "leaveClass", "removeVisitClass", "removeLeaveClass", "useScroll", "threshold", "autoRemove"], outputs: ["intersection"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i10.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
227
369
|
}
|
|
228
370
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderAutocompleteFilterComponent, decorators: [{
|
|
229
371
|
type: Component,
|
|
@@ -245,7 +387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
245
387
|
multi: true,
|
|
246
388
|
useExisting: forwardRef(() => HeaderAutocompleteFilterComponent),
|
|
247
389
|
},
|
|
248
|
-
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n
|
|
390
|
+
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n matInput\n [formControl]=\"selectControl\"\n [matAutocomplete]=\"auto\"\n (input)=\"filter()\"\n (focus)=\"focus()\"\n (blur)=\"onTouched()\" />\n <mat-autocomplete #auto=\"matAutocomplete\" requireSelection [displayWith]=\"displayWith\">\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"autocompleteOption; context: { option }\"></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option.value) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"autocompleteOption; context: { option }\"></ng-container>\n </mat-option>\n }\n }\n\n <mat-option id=\"searching-option\" disabled>\n @if (searching) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-option>\n\n @if (hasMore && !searching) {\n <mat-option id=\"load-more-options\" disabled intersectionObserver (intersection)=\"loadMore($event.intersect)\">\n </mat-option>\n }\n </mat-autocomplete>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n\n<ng-template #autocompleteOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case ('svg') {\n <mat-icon [svgIcon]=\"option.icon\" [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\"></mat-icon>\n }\n @default {\n <mat-icon [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#searching-option{min-height:2px;position:relative}#searching-option mat-progress-bar{position:absolute;inset:0}\n"] }]
|
|
249
391
|
}], propDecorators: { column: [{
|
|
250
392
|
type: Input
|
|
251
393
|
}], input: [{
|
|
@@ -436,6 +578,7 @@ class HeaderDateFilterComponent {
|
|
|
436
578
|
_adapter = inject(DateAdapter);
|
|
437
579
|
_intl = inject(MatDatepickerIntl);
|
|
438
580
|
_locale = signal(inject(MAT_DATE_LOCALE));
|
|
581
|
+
datatableIntl = inject(NgxMatDatatableIntl);
|
|
439
582
|
injector = inject(Injector);
|
|
440
583
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
441
584
|
subsink = new Subscription();
|
|
@@ -482,7 +625,7 @@ class HeaderDateFilterComponent {
|
|
|
482
625
|
if (!ngControl)
|
|
483
626
|
throw new Error(`${this.constructor.name} missing control [column:${this.column.columnDef}]`);
|
|
484
627
|
this.control = ngControl.control;
|
|
485
|
-
this.subsink.add(this.selectControl.valueChanges.
|
|
628
|
+
this.subsink.add(this.selectControl.valueChanges.subscribe(value => {
|
|
486
629
|
if (this.control.invalid)
|
|
487
630
|
return;
|
|
488
631
|
else if (this.isEmptyValue(value))
|
|
@@ -490,7 +633,7 @@ class HeaderDateFilterComponent {
|
|
|
490
633
|
else
|
|
491
634
|
this.onChange(this.buildValue(this.operatorControl.value, value));
|
|
492
635
|
}));
|
|
493
|
-
this.subsink.add(this.rangeGroup.valueChanges.
|
|
636
|
+
this.subsink.add(this.rangeGroup.valueChanges.subscribe(value => {
|
|
494
637
|
if (!this.hasRangeValue(value))
|
|
495
638
|
this.onChange(undefined);
|
|
496
639
|
else if (this.rangeGroup.invalid)
|
|
@@ -519,7 +662,7 @@ class HeaderDateFilterComponent {
|
|
|
519
662
|
this.subsink.unsubscribe();
|
|
520
663
|
}
|
|
521
664
|
clearRange() {
|
|
522
|
-
this.rangeGroup.reset();
|
|
665
|
+
this.rangeGroup.reset({ from: undefined, to: undefined }, { emitEvent: false });
|
|
523
666
|
this.onChange(undefined);
|
|
524
667
|
this.onTouched();
|
|
525
668
|
this.changeDetectorRef.markForCheck();
|
|
@@ -562,7 +705,7 @@ class HeaderDateFilterComponent {
|
|
|
562
705
|
useExisting: forwardRef(() => HeaderDateFilterComponent),
|
|
563
706
|
},
|
|
564
707
|
provideMomentDateAdapter(),
|
|
565
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"from\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n <input matEndDate formControlName=\"to\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\"></mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n\n <button\n *ngIf=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"clearRange()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n } @else {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input\n matInput\n [matDatepicker]=\"datePicker\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n (blur)=\"onTouched()\" />\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker></mat-datepicker>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n }\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4$2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i4$2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i4$2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i4$2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: "component", type: OperatorSelectComponent, selector: "lib-operator-select", inputs: ["disableRange"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
708
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"from\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n <input matEndDate formControlName=\"to\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\"></mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n\n <button\n *ngIf=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"clearRange()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n } @else {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input\n matInput\n [matDatepicker]=\"datePicker\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n (blur)=\"onTouched()\" />\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker></mat-datepicker>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n }\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4$2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i4$2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i4$2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i4$2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: "component", type: OperatorSelectComponent, selector: "lib-operator-select", inputs: ["disableRange"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
566
709
|
}
|
|
567
710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderDateFilterComponent, decorators: [{
|
|
568
711
|
type: Component,
|
|
@@ -584,7 +727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
584
727
|
useExisting: forwardRef(() => HeaderDateFilterComponent),
|
|
585
728
|
},
|
|
586
729
|
provideMomentDateAdapter(),
|
|
587
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"from\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n <input matEndDate formControlName=\"to\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\"></mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n\n <button\n *ngIf=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"clearRange()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n } @else {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input\n matInput\n [matDatepicker]=\"datePicker\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n (blur)=\"onTouched()\" />\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker></mat-datepicker>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n }\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
730
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- @format -->\n\n@if (selectControl) {\n @if (['<>', '\u2264\u2265'].includes(operatorControl.value!)) {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <mat-date-range-input [formGroup]=\"rangeGroup\" [rangePicker]=\"rangePicker\">\n <input matStartDate formControlName=\"from\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n <input matEndDate formControlName=\"to\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\"></mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n\n <button\n *ngIf=\"\n (rangeGroup.value.from !== null && rangeGroup.value.from !== undefined) ||\n (rangeGroup.value.to !== null && rangeGroup.value.to !== undefined)\n \"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"clearRange()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n } @else {\n <mat-form-field\n class=\"ngx-datatable-date-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input\n matInput\n [matDatepicker]=\"datePicker\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n (blur)=\"onTouched()\" />\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker></mat-datepicker>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n }\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
588
731
|
}], propDecorators: { column: [{
|
|
589
732
|
type: Input
|
|
590
733
|
}] } });
|
|
@@ -696,6 +839,7 @@ class HeaderDurationFilterComponent {
|
|
|
696
839
|
timeUnitControl = new FormControl('second');
|
|
697
840
|
onChange = () => { };
|
|
698
841
|
onTouched = () => { };
|
|
842
|
+
datatableIntl = inject(NgxMatDatatableIntl);
|
|
699
843
|
injector = inject(Injector);
|
|
700
844
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
701
845
|
subsink = new Subscription();
|
|
@@ -734,7 +878,7 @@ class HeaderDurationFilterComponent {
|
|
|
734
878
|
if (!ngControl)
|
|
735
879
|
throw new Error(`${this.constructor.name} missing control [column:${this.column.columnDef}]`);
|
|
736
880
|
this.control = ngControl.control;
|
|
737
|
-
this.subsink.add(this.selectControl.valueChanges.
|
|
881
|
+
this.subsink.add(this.selectControl.valueChanges.subscribe(value => {
|
|
738
882
|
if (this.control.invalid)
|
|
739
883
|
return;
|
|
740
884
|
else if (this.isEmptyValue(value))
|
|
@@ -790,7 +934,7 @@ class HeaderDurationFilterComponent {
|
|
|
790
934
|
multi: true,
|
|
791
935
|
useExisting: forwardRef(() => HeaderDurationFilterComponent),
|
|
792
936
|
},
|
|
793
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-duration-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput type=\"number\" [formControl]=\"selectControl\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n\n <lib-time-unit-select [locale]=\"column.locale\" matSuffix [formControl]=\"timeUnitControl\"></lib-time-unit-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OperatorSelectComponent, selector: "lib-operator-select", inputs: ["disableRange"] }, { kind: "component", type: TimeUnitSelectComponent, selector: "lib-time-unit-select", inputs: ["locale"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
937
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-duration-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput type=\"number\" [formControl]=\"selectControl\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n\n <lib-time-unit-select [locale]=\"column.locale\" matSuffix [formControl]=\"timeUnitControl\"></lib-time-unit-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OperatorSelectComponent, selector: "lib-operator-select", inputs: ["disableRange"] }, { kind: "component", type: TimeUnitSelectComponent, selector: "lib-time-unit-select", inputs: ["locale"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
794
938
|
}
|
|
795
939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderDurationFilterComponent, decorators: [{
|
|
796
940
|
type: Component,
|
|
@@ -811,7 +955,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
811
955
|
multi: true,
|
|
812
956
|
useExisting: forwardRef(() => HeaderDurationFilterComponent),
|
|
813
957
|
},
|
|
814
|
-
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-duration-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput type=\"number\" [formControl]=\"selectControl\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n\n <lib-time-unit-select [locale]=\"column.locale\" matSuffix [formControl]=\"timeUnitControl\"></lib-time-unit-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
958
|
+
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-duration-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput type=\"number\" [formControl]=\"selectControl\" [placeholder]=\"column.placeholder!\" (blur)=\"onTouched()\" />\n\n <lib-time-unit-select [locale]=\"column.locale\" matSuffix [formControl]=\"timeUnitControl\"></lib-time-unit-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}mat-form-field ::ng-deep .mat-mdc-form-field-icon-suffix{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
815
959
|
}], propDecorators: { column: [{
|
|
816
960
|
type: Input
|
|
817
961
|
}] } });
|
|
@@ -824,6 +968,7 @@ class HeaderNumberFilterComponent {
|
|
|
824
968
|
operatorControl = new FormControl('=');
|
|
825
969
|
onChange = () => { };
|
|
826
970
|
onTouched = () => { };
|
|
971
|
+
datatableIntl = inject(NgxMatDatatableIntl);
|
|
827
972
|
injector = inject(Injector);
|
|
828
973
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
829
974
|
subsink = new Subscription();
|
|
@@ -884,7 +1029,7 @@ class HeaderNumberFilterComponent {
|
|
|
884
1029
|
multi: true,
|
|
885
1030
|
useExisting: forwardRef(() => HeaderNumberFilterComponent),
|
|
886
1031
|
},
|
|
887
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-number-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput [formControl]=\"selectControl\" type=\"number\" (blur)=\"onTouched()\" />\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OperatorSelectComponent, selector: "lib-operator-select", inputs: ["disableRange"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
1032
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-number-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput [formControl]=\"selectControl\" type=\"number\" (blur)=\"onTouched()\" />\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OperatorSelectComponent, selector: "lib-operator-select", inputs: ["disableRange"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
888
1033
|
}
|
|
889
1034
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderNumberFilterComponent, decorators: [{
|
|
890
1035
|
type: Component,
|
|
@@ -905,7 +1050,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
905
1050
|
multi: true,
|
|
906
1051
|
useExisting: forwardRef(() => HeaderNumberFilterComponent),
|
|
907
1052
|
},
|
|
908
|
-
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-number-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput [formControl]=\"selectControl\" type=\"number\" (blur)=\"onTouched()\" />\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"] }]
|
|
1053
|
+
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n class=\"ngx-datatable-number-filter\"\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n\n <lib-operator-select disableRange matPrefix [formControl]=\"operatorControl\"></lib-operator-select>\n\n <input matInput [formControl]=\"selectControl\" type=\"number\" (blur)=\"onTouched()\" />\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"] }]
|
|
909
1054
|
}], propDecorators: { column: [{
|
|
910
1055
|
type: Input
|
|
911
1056
|
}] } });
|
|
@@ -938,6 +1083,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
938
1083
|
args: [{ name: 'selectOption' }]
|
|
939
1084
|
}] });
|
|
940
1085
|
|
|
1086
|
+
/** @format */
|
|
1087
|
+
class SelectOptionsCacheService {
|
|
1088
|
+
cache = new WeakMap();
|
|
1089
|
+
resolve(source) {
|
|
1090
|
+
const cached = this.cache.get(source);
|
|
1091
|
+
if (cached)
|
|
1092
|
+
return cached;
|
|
1093
|
+
const shared = source.pipe(catchError(() => {
|
|
1094
|
+
this.cache.delete(source);
|
|
1095
|
+
return of([]);
|
|
1096
|
+
}), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1097
|
+
this.cache.set(source, shared);
|
|
1098
|
+
return shared;
|
|
1099
|
+
}
|
|
1100
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SelectOptionsCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1101
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SelectOptionsCacheService, providedIn: 'root' });
|
|
1102
|
+
}
|
|
1103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SelectOptionsCacheService, decorators: [{
|
|
1104
|
+
type: Injectable,
|
|
1105
|
+
args: [{ providedIn: 'root' }]
|
|
1106
|
+
}] });
|
|
1107
|
+
|
|
941
1108
|
/** @format */
|
|
942
1109
|
class HeaderSelectFilterComponent {
|
|
943
1110
|
column;
|
|
@@ -947,8 +1114,10 @@ class HeaderSelectFilterComponent {
|
|
|
947
1114
|
selectControl = new FormControl();
|
|
948
1115
|
onChange = () => { };
|
|
949
1116
|
onTouched = () => { };
|
|
1117
|
+
datatableIntl = inject(NgxMatDatatableIntl);
|
|
950
1118
|
injector = inject(Injector);
|
|
951
1119
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
1120
|
+
selectOptionsCache = inject(SelectOptionsCacheService);
|
|
952
1121
|
subsink = new Subscription();
|
|
953
1122
|
writeValue(controlValue) {
|
|
954
1123
|
if (controlValue?.value !== this.selectControl.value) {
|
|
@@ -987,7 +1156,7 @@ class HeaderSelectFilterComponent {
|
|
|
987
1156
|
if (Array.isArray(this.column.options))
|
|
988
1157
|
this.buildOptions(this.column.options);
|
|
989
1158
|
else
|
|
990
|
-
this.subsink.add(this.column.options.subscribe(data => {
|
|
1159
|
+
this.subsink.add(this.selectOptionsCache.resolve(this.column.options).subscribe(data => {
|
|
991
1160
|
this.options = [];
|
|
992
1161
|
this.groups = [];
|
|
993
1162
|
this.buildOptions(data);
|
|
@@ -1018,7 +1187,7 @@ class HeaderSelectFilterComponent {
|
|
|
1018
1187
|
multi: true,
|
|
1019
1188
|
useExisting: forwardRef(() => HeaderSelectFilterComponent),
|
|
1020
1189
|
},
|
|
1021
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n (closed)=\"onTouched()\">\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n }\n </mat-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n\n<ng-template #selectOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case ('svg') {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"></mat-icon>\n }\n @default {\n <mat-icon [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i6$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SelectOptionPipe, name: "selectOption" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }, { kind: "pipe", type: IsArrayPipe, name: "isArray" }] });
|
|
1190
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n (closed)=\"onTouched()\">\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n }\n </mat-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n\n<ng-template #selectOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case ('svg') {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"></mat-icon>\n }\n @default {\n <mat-icon [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"], dependencies: [{ 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i6$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SelectOptionPipe, name: "selectOption" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }, { kind: "pipe", type: IsArrayPipe, name: "isArray" }] });
|
|
1022
1191
|
}
|
|
1023
1192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderSelectFilterComponent, decorators: [{
|
|
1024
1193
|
type: Component,
|
|
@@ -1039,7 +1208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1039
1208
|
multi: true,
|
|
1040
1209
|
useExisting: forwardRef(() => HeaderSelectFilterComponent),
|
|
1041
1210
|
},
|
|
1042
|
-
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n (closed)=\"onTouched()\">\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n }\n </mat-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n\n<ng-template #selectOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case ('svg') {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"></mat-icon>\n }\n @default {\n <mat-icon [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
1211
|
+
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n (closed)=\"onTouched()\">\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container *ngTemplateOutlet=\"selectOption; context: { option }\"></ng-container>\n </mat-option>\n }\n }\n </mat-select>\n\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n\n<ng-template #selectOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case ('svg') {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"></mat-icon>\n }\n @default {\n <mat-icon [style.color]=\"option.iconColor ?? option.color\" [style.margin-right.px]=\"8\">\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label [style.color]=\"option.color\" [innerHTML]=\"option.name | safeHtml\"></mat-label>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"] }]
|
|
1043
1212
|
}], propDecorators: { column: [{
|
|
1044
1213
|
type: Input
|
|
1045
1214
|
}] } });
|
|
@@ -1051,6 +1220,7 @@ class HeaderTextFilterComponent {
|
|
|
1051
1220
|
selectControl = new FormControl();
|
|
1052
1221
|
onChange = () => { };
|
|
1053
1222
|
onTouched = () => { };
|
|
1223
|
+
datatableIntl = inject(NgxMatDatatableIntl);
|
|
1054
1224
|
injector = inject(Injector);
|
|
1055
1225
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
1056
1226
|
subsink = new Subscription();
|
|
@@ -1107,7 +1277,7 @@ class HeaderTextFilterComponent {
|
|
|
1107
1277
|
multi: true,
|
|
1108
1278
|
useExisting: forwardRef(() => HeaderTextFilterComponent),
|
|
1109
1279
|
},
|
|
1110
|
-
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input matInput [formControl]=\"selectControl\" (blur)=\"onTouched()\" />\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
1280
|
+
], ngImport: i0, template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input matInput [formControl]=\"selectControl\" (blur)=\"onTouched()\" />\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
1111
1281
|
}
|
|
1112
1282
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: HeaderTextFilterComponent, decorators: [{
|
|
1113
1283
|
type: Component,
|
|
@@ -1126,90 +1296,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1126
1296
|
multi: true,
|
|
1127
1297
|
useExisting: forwardRef(() => HeaderTextFilterComponent),
|
|
1128
1298
|
},
|
|
1129
|
-
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input matInput [formControl]=\"selectControl\" (blur)=\"onTouched()\" />\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"] }]
|
|
1299
|
+
], template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.has-value]=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input matInput [formControl]=\"selectControl\" (blur)=\"onTouched()\" />\n <button\n *ngIf=\"selectControl.value !== null && selectControl.value !== undefined && selectControl.value !== ''\"\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n}\n", styles: [":host{display:flex;flex:1 1 100%}mat-form-field{min-width:auto;flex:1 1 100%;margin:6px 0;--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(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}\n"] }]
|
|
1130
1300
|
}], propDecorators: { column: [{
|
|
1131
1301
|
type: Input
|
|
1132
1302
|
}] } });
|
|
1133
1303
|
|
|
1134
|
-
/** @format */
|
|
1135
|
-
const DEFAULT_LABELS = {
|
|
1136
|
-
noDateLabel: 'No data',
|
|
1137
|
-
itemsPerPageLabel: `Items per page:`,
|
|
1138
|
-
nextPageLabel: `Next page`,
|
|
1139
|
-
lastPageLabel: `Last page`,
|
|
1140
|
-
previousPageLabel: `Previous page`,
|
|
1141
|
-
firstPageLabel: `First page`,
|
|
1142
|
-
onLabel: `on`,
|
|
1143
|
-
incrementalLoadingLabel: 'Loading...',
|
|
1144
|
-
incrementalLoadMoreLabel: 'Load more',
|
|
1145
|
-
};
|
|
1146
|
-
const LABELS = {
|
|
1147
|
-
fr: {
|
|
1148
|
-
noDateLabel: 'Aucune donnée',
|
|
1149
|
-
itemsPerPageLabel: `Éléments par page :`,
|
|
1150
|
-
nextPageLabel: `Page suivante`,
|
|
1151
|
-
lastPageLabel: `Dernière page`,
|
|
1152
|
-
previousPageLabel: `Page précédente`,
|
|
1153
|
-
firstPageLabel: `Première page`,
|
|
1154
|
-
onLabel: `sur`,
|
|
1155
|
-
incrementalLoadingLabel: 'Chargement...',
|
|
1156
|
-
incrementalLoadMoreLabel: 'Charger plus',
|
|
1157
|
-
},
|
|
1158
|
-
};
|
|
1159
|
-
const DEFAULT_NUMBER_OPTIONS = {
|
|
1160
|
-
separator: ',',
|
|
1161
|
-
decimal: '.',
|
|
1162
|
-
duration: 0.3,
|
|
1163
|
-
useEasing: false,
|
|
1164
|
-
};
|
|
1165
|
-
const NUMBER_OPTIONS = {
|
|
1166
|
-
fr: {
|
|
1167
|
-
separator: ' ',
|
|
1168
|
-
decimal: ',',
|
|
1169
|
-
},
|
|
1170
|
-
};
|
|
1171
|
-
class NgxMatDatatableIntl {
|
|
1172
|
-
locale = inject(LOCALE_ID);
|
|
1173
|
-
noDateLabel;
|
|
1174
|
-
itemsPerPageLabel;
|
|
1175
|
-
nextPageLabel;
|
|
1176
|
-
lastPageLabel;
|
|
1177
|
-
previousPageLabel;
|
|
1178
|
-
firstPageLabel;
|
|
1179
|
-
onLabel;
|
|
1180
|
-
incrementalLoadingLabel;
|
|
1181
|
-
incrementalLoadMoreLabel;
|
|
1182
|
-
numberOptions;
|
|
1183
|
-
getRangeLabel = (page, pageSize, length) => {
|
|
1184
|
-
if (length === 0 || pageSize === 0)
|
|
1185
|
-
return `0 ${this.onLabel} ${length}`;
|
|
1186
|
-
length = Math.max(length, 0);
|
|
1187
|
-
const startIndex = page * pageSize;
|
|
1188
|
-
const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
|
|
1189
|
-
return `${startIndex + 1} - ${endIndex} ${this.onLabel} ${length}`;
|
|
1190
|
-
};
|
|
1191
|
-
constructor() {
|
|
1192
|
-
this.setLabels(LABELS[this.locale] ?? DEFAULT_LABELS);
|
|
1193
|
-
this.numberOptions = NUMBER_OPTIONS[this.locale] ?? DEFAULT_NUMBER_OPTIONS;
|
|
1194
|
-
}
|
|
1195
|
-
setLabels(labels) {
|
|
1196
|
-
this.noDateLabel = labels.noDateLabel;
|
|
1197
|
-
this.itemsPerPageLabel = labels.itemsPerPageLabel;
|
|
1198
|
-
this.nextPageLabel = labels.nextPageLabel;
|
|
1199
|
-
this.lastPageLabel = labels.lastPageLabel;
|
|
1200
|
-
this.previousPageLabel = labels.previousPageLabel;
|
|
1201
|
-
this.firstPageLabel = labels.firstPageLabel;
|
|
1202
|
-
this.onLabel = labels.onLabel;
|
|
1203
|
-
this.incrementalLoadingLabel = labels.incrementalLoadingLabel;
|
|
1204
|
-
this.incrementalLoadMoreLabel = labels.incrementalLoadMoreLabel;
|
|
1205
|
-
}
|
|
1206
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1207
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl });
|
|
1208
|
-
}
|
|
1209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableIntl, decorators: [{
|
|
1210
|
-
type: Injectable
|
|
1211
|
-
}], ctorParameters: () => [] });
|
|
1212
|
-
|
|
1213
1304
|
/** @format */
|
|
1214
1305
|
class MergePipe {
|
|
1215
1306
|
transform(obj, src) {
|
|
@@ -1304,10 +1395,13 @@ class DatagridDataSource extends DataSource {
|
|
|
1304
1395
|
recordsFiltered = 0;
|
|
1305
1396
|
recordsTotal;
|
|
1306
1397
|
facets;
|
|
1307
|
-
rowSize = 0; // row size in
|
|
1398
|
+
rowSize = 0; // average row size in MB
|
|
1308
1399
|
options;
|
|
1309
1400
|
latestRequestId = 0;
|
|
1310
1401
|
disconnected = false;
|
|
1402
|
+
measuredRowSize = 0;
|
|
1403
|
+
measuredRowCount = 0;
|
|
1404
|
+
textEncoder = new TextEncoder();
|
|
1311
1405
|
dataStream = new BehaviorSubject([]);
|
|
1312
1406
|
constructor(service) {
|
|
1313
1407
|
super();
|
|
@@ -1336,8 +1430,8 @@ class DatagridDataSource extends DataSource {
|
|
|
1336
1430
|
this.recordsTotal = result.recordsTotal;
|
|
1337
1431
|
this.recordsFiltered = result.recordsFiltered;
|
|
1338
1432
|
this.facets = result.facets;
|
|
1433
|
+
this.updateRowSize(result.data, append);
|
|
1339
1434
|
this.setData(result.data, append);
|
|
1340
|
-
this.calculateRowSize(this.data);
|
|
1341
1435
|
}
|
|
1342
1436
|
finally {
|
|
1343
1437
|
if (!append && !this.disconnected && requestId === this.latestRequestId)
|
|
@@ -1366,14 +1460,24 @@ class DatagridDataSource extends DataSource {
|
|
|
1366
1460
|
this.data = append ? [...this.data, ...data] : data;
|
|
1367
1461
|
this.dataStream.next(this.data);
|
|
1368
1462
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
const kiloBytes = size / 1024;
|
|
1374
|
-
total += kiloBytes / 1024;
|
|
1463
|
+
updateRowSize(data, append) {
|
|
1464
|
+
if (!append) {
|
|
1465
|
+
this.measuredRowSize = 0;
|
|
1466
|
+
this.measuredRowCount = 0;
|
|
1375
1467
|
}
|
|
1376
|
-
|
|
1468
|
+
for (const row of data) {
|
|
1469
|
+
try {
|
|
1470
|
+
const serialized = JSON.stringify(row);
|
|
1471
|
+
if (serialized === undefined)
|
|
1472
|
+
continue;
|
|
1473
|
+
this.measuredRowSize += this.textEncoder.encode(serialized).length / 1024 / 1024;
|
|
1474
|
+
this.measuredRowCount++;
|
|
1475
|
+
}
|
|
1476
|
+
catch {
|
|
1477
|
+
// Row size is only an export chunking hint; unserializable rows must not fail data loading.
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
this.rowSize = this.measuredRowCount ? this.measuredRowSize / this.measuredRowCount : 0;
|
|
1377
1481
|
}
|
|
1378
1482
|
}
|
|
1379
1483
|
|
|
@@ -1460,7 +1564,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1460
1564
|
/** @format */
|
|
1461
1565
|
class CellOpacityPipe {
|
|
1462
1566
|
transform(row, column, options) {
|
|
1463
|
-
if (typeof options.rowOpacity === '
|
|
1567
|
+
if (typeof options.rowOpacity === 'number')
|
|
1464
1568
|
return options.rowOpacity;
|
|
1465
1569
|
if (typeof options.rowOpacity === 'function')
|
|
1466
1570
|
return options.rowOpacity(column, row);
|
|
@@ -1557,7 +1661,7 @@ class SortFacetEntriesPipe {
|
|
|
1557
1661
|
transform(entries, options) {
|
|
1558
1662
|
if (!entries || !options)
|
|
1559
1663
|
return entries;
|
|
1560
|
-
return entries.sort((e1, e2) => {
|
|
1664
|
+
return [...entries].sort((e1, e2) => {
|
|
1561
1665
|
const ie1 = options.findIndex(o => o.value === e1._id);
|
|
1562
1666
|
if (ie1 === -1)
|
|
1563
1667
|
return 1;
|
|
@@ -1592,6 +1696,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1592
1696
|
args: [{ name: 'sum' }]
|
|
1593
1697
|
}] });
|
|
1594
1698
|
|
|
1699
|
+
/** @format */
|
|
1700
|
+
function buildDatasourceRequestColumns(options, searchValues) {
|
|
1701
|
+
const columns = [];
|
|
1702
|
+
const additionalColumns = [];
|
|
1703
|
+
options.additionalProperties?.forEach(property => addAdditionalColumn(additionalColumns, property));
|
|
1704
|
+
options.columns.forEach(columnOptions => {
|
|
1705
|
+
if (columnOptions.hidden)
|
|
1706
|
+
return;
|
|
1707
|
+
const column = {
|
|
1708
|
+
data: columnOptions.property,
|
|
1709
|
+
projection: columnOptions.projection,
|
|
1710
|
+
name: columnOptions.columnDef,
|
|
1711
|
+
searchable: columnOptions.searchable,
|
|
1712
|
+
orderable: columnOptions.sortable,
|
|
1713
|
+
};
|
|
1714
|
+
if (columnOptions.sortProperty && columnOptions.order) {
|
|
1715
|
+
addAdditionalColumn(additionalColumns, columnOptions.sortProperty);
|
|
1716
|
+
}
|
|
1717
|
+
if (columnOptions.searchable) {
|
|
1718
|
+
const search = searchValues[columnOptions.columnDef];
|
|
1719
|
+
if (search) {
|
|
1720
|
+
if (columnOptions.searchProperty)
|
|
1721
|
+
addAdditionalColumn(additionalColumns, columnOptions.searchProperty, search);
|
|
1722
|
+
else
|
|
1723
|
+
column.search = search;
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
columnOptions.additionalProperties?.forEach(property => addAdditionalColumn(additionalColumns, property));
|
|
1727
|
+
columns.push(column);
|
|
1728
|
+
});
|
|
1729
|
+
additionalColumns.forEach(additionalColumn => {
|
|
1730
|
+
const column = columns.find(item => item.data === additionalColumn.data);
|
|
1731
|
+
if (!column)
|
|
1732
|
+
columns.push(additionalColumn);
|
|
1733
|
+
else if (additionalColumn.search && !column.search)
|
|
1734
|
+
column.search = additionalColumn.search;
|
|
1735
|
+
});
|
|
1736
|
+
return columns;
|
|
1737
|
+
}
|
|
1738
|
+
function buildDatasourceRequestOrder(options, columns) {
|
|
1739
|
+
const order = [];
|
|
1740
|
+
options.columns
|
|
1741
|
+
.filter(column => !!column.order && column.sortable !== false)
|
|
1742
|
+
.sort((first, second) => first.order.index - second.order.index)
|
|
1743
|
+
.forEach(columnOptions => {
|
|
1744
|
+
const property = columnOptions.sortProperty || columnOptions.property;
|
|
1745
|
+
const index = columns.findIndex(column => column.data === property);
|
|
1746
|
+
if (index !== -1)
|
|
1747
|
+
order.push({ column: index, dir: columnOptions.order.dir });
|
|
1748
|
+
});
|
|
1749
|
+
return order;
|
|
1750
|
+
}
|
|
1751
|
+
function buildDatasourceRequestOptions(options, searchValues, start, length, draw = Date.now().toString()) {
|
|
1752
|
+
const columns = buildDatasourceRequestColumns(options, searchValues);
|
|
1753
|
+
return {
|
|
1754
|
+
draw,
|
|
1755
|
+
columns,
|
|
1756
|
+
start,
|
|
1757
|
+
length,
|
|
1758
|
+
order: buildDatasourceRequestOrder(options, columns),
|
|
1759
|
+
facets: options.facets,
|
|
1760
|
+
};
|
|
1761
|
+
}
|
|
1762
|
+
function addAdditionalColumn(additionalColumns, data, search) {
|
|
1763
|
+
let column = additionalColumns.find(item => item.data === data);
|
|
1764
|
+
if (!column) {
|
|
1765
|
+
column = { data };
|
|
1766
|
+
additionalColumns.push(column);
|
|
1767
|
+
}
|
|
1768
|
+
if (search) {
|
|
1769
|
+
column.search = search;
|
|
1770
|
+
column.searchable = true;
|
|
1771
|
+
}
|
|
1772
|
+
return column;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1595
1775
|
/** @format */
|
|
1596
1776
|
function duration(data, options) {
|
|
1597
1777
|
const durationOption = { maxDecimalPoints: 0, largest: 1, fallbacks: ['en'] };
|
|
@@ -1627,6 +1807,149 @@ function get(obj, path) {
|
|
|
1627
1807
|
return value;
|
|
1628
1808
|
}
|
|
1629
1809
|
|
|
1810
|
+
/** @format */
|
|
1811
|
+
const DUPLICATE_HEADER_SEPARATOR = '\u2063ngx-mat-datatable:';
|
|
1812
|
+
async function exportDatatable(context) {
|
|
1813
|
+
const xlsx = await import('xlsx');
|
|
1814
|
+
const data = await loadExportData(context);
|
|
1815
|
+
const rows = await buildExportRows(context.options, data);
|
|
1816
|
+
const workbook = xlsx.utils.book_new();
|
|
1817
|
+
const worksheet = xlsx.utils.json_to_sheet(rows);
|
|
1818
|
+
sanitizeExportHeaders(worksheet, xlsx);
|
|
1819
|
+
xlsx.utils.book_append_sheet(workbook, worksheet, 'export');
|
|
1820
|
+
const filename = typeof context.options.actions?.export === 'string' ? context.options.actions.export : 'export';
|
|
1821
|
+
await xlsx.writeFile(workbook, `${filename}-${Date.now()}.xlsx`);
|
|
1822
|
+
}
|
|
1823
|
+
async function loadExportData(context) {
|
|
1824
|
+
const columns = buildDatasourceRequestColumns(context.options, context.searchValues);
|
|
1825
|
+
const order = buildDatasourceRequestOrder(context.options, columns);
|
|
1826
|
+
const chunkLength = getExportChunkLength(context.recordsFiltered, context.rowSize);
|
|
1827
|
+
const chunks = buildExportChunks(context.recordsFiltered, chunkLength);
|
|
1828
|
+
const data = [];
|
|
1829
|
+
for (const chunk of chunks) {
|
|
1830
|
+
const result = await context.options.service({
|
|
1831
|
+
draw: Date.now().toString(),
|
|
1832
|
+
columns,
|
|
1833
|
+
order,
|
|
1834
|
+
start: chunk.start,
|
|
1835
|
+
length: chunk.length,
|
|
1836
|
+
});
|
|
1837
|
+
data.push(...result.data);
|
|
1838
|
+
}
|
|
1839
|
+
return data;
|
|
1840
|
+
}
|
|
1841
|
+
async function buildExportRows(options, data) {
|
|
1842
|
+
const selectOptionsCache = new Map();
|
|
1843
|
+
const exportKeys = buildExportColumnKeys(options.columns);
|
|
1844
|
+
const rows = [];
|
|
1845
|
+
for (const record of data) {
|
|
1846
|
+
const row = {};
|
|
1847
|
+
for (const column of options.columns) {
|
|
1848
|
+
if (column.hidden || column.disabled)
|
|
1849
|
+
continue;
|
|
1850
|
+
let value = get(record, column.property);
|
|
1851
|
+
if (column.export) {
|
|
1852
|
+
column.export(row, value, record);
|
|
1853
|
+
continue;
|
|
1854
|
+
}
|
|
1855
|
+
value = transformExportValue(column, value, record);
|
|
1856
|
+
const keys = exportKeys.get(column);
|
|
1857
|
+
if (column.type === 'select') {
|
|
1858
|
+
await buildSelectExportValue(column, row, keys.value, value, selectOptionsCache);
|
|
1859
|
+
}
|
|
1860
|
+
else if (column.type === 'duration') {
|
|
1861
|
+
buildDurationExportValue(column, row, keys, value);
|
|
1862
|
+
}
|
|
1863
|
+
else {
|
|
1864
|
+
row[keys.value] = value;
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
rows.push(row);
|
|
1868
|
+
}
|
|
1869
|
+
return rows;
|
|
1870
|
+
}
|
|
1871
|
+
function getExportChunkLength(recordsFiltered, rowSize) {
|
|
1872
|
+
if (recordsFiltered <= 0)
|
|
1873
|
+
return 0;
|
|
1874
|
+
if (!Number.isFinite(rowSize) || rowSize <= 0)
|
|
1875
|
+
return recordsFiltered;
|
|
1876
|
+
return Math.max(1, Math.min(Math.floor(5 / rowSize), recordsFiltered));
|
|
1877
|
+
}
|
|
1878
|
+
function buildExportChunks(recordsFiltered, chunkLength) {
|
|
1879
|
+
if (recordsFiltered <= 0 || chunkLength <= 0)
|
|
1880
|
+
return [];
|
|
1881
|
+
const chunks = [];
|
|
1882
|
+
for (let index = 0; index < Math.ceil(recordsFiltered / chunkLength); index++) {
|
|
1883
|
+
chunks.push({ start: index, length: chunkLength });
|
|
1884
|
+
}
|
|
1885
|
+
return chunks;
|
|
1886
|
+
}
|
|
1887
|
+
function sanitizeExportHeaders(worksheet, xlsx) {
|
|
1888
|
+
const ref = worksheet['!ref'];
|
|
1889
|
+
if (!ref)
|
|
1890
|
+
return;
|
|
1891
|
+
const range = xlsx.utils.decode_range(ref);
|
|
1892
|
+
for (let columnIndex = range.s.c; columnIndex <= range.e.c; columnIndex++) {
|
|
1893
|
+
const address = xlsx.utils.encode_cell({ r: range.s.r, c: columnIndex });
|
|
1894
|
+
const cell = worksheet[address];
|
|
1895
|
+
if (!cell || typeof cell.v !== 'string')
|
|
1896
|
+
continue;
|
|
1897
|
+
cell.v = stripHtml(removeDuplicateHeaderSuffix(cell.v), '');
|
|
1898
|
+
delete cell.w;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
function transformExportValue(column, value, record) {
|
|
1902
|
+
if (!('transform' in column) || typeof column.transform !== 'function')
|
|
1903
|
+
return value;
|
|
1904
|
+
return column.transform(value, record);
|
|
1905
|
+
}
|
|
1906
|
+
async function buildSelectExportValue(column, row, exportKey, value, cache) {
|
|
1907
|
+
const options = await resolveSelectOptions(column, cache);
|
|
1908
|
+
const getLabel = (optionValue) => options.find(option => option.value === optionValue)?.name ?? optionValue;
|
|
1909
|
+
row[exportKey] = column.isArrayValue && Array.isArray(value) ? value.map(getLabel).join(', ') : getLabel(value);
|
|
1910
|
+
}
|
|
1911
|
+
async function resolveSelectOptions(column, cache) {
|
|
1912
|
+
if (Array.isArray(column.options))
|
|
1913
|
+
return column.options;
|
|
1914
|
+
const cached = cache.get(column);
|
|
1915
|
+
if (cached)
|
|
1916
|
+
return cached;
|
|
1917
|
+
const options = await firstValueFrom(column.options);
|
|
1918
|
+
cache.set(column, options);
|
|
1919
|
+
return options;
|
|
1920
|
+
}
|
|
1921
|
+
function buildDurationExportValue(column, row, keys, value) {
|
|
1922
|
+
row[keys.raw] = value;
|
|
1923
|
+
row[keys.value] = duration(value, column);
|
|
1924
|
+
}
|
|
1925
|
+
function buildExportColumnKeys(columns) {
|
|
1926
|
+
const usedKeys = new Map();
|
|
1927
|
+
const result = new Map();
|
|
1928
|
+
for (const column of columns) {
|
|
1929
|
+
if (column.hidden || column.disabled || column.export)
|
|
1930
|
+
continue;
|
|
1931
|
+
if (column.type === 'duration') {
|
|
1932
|
+
result.set(column, {
|
|
1933
|
+
raw: createUniqueExportKey(`${column.header} ms`, usedKeys),
|
|
1934
|
+
value: createUniqueExportKey(column.header, usedKeys),
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1937
|
+
else {
|
|
1938
|
+
result.set(column, { value: createUniqueExportKey(column.header, usedKeys) });
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
return result;
|
|
1942
|
+
}
|
|
1943
|
+
function createUniqueExportKey(header, usedKeys) {
|
|
1944
|
+
const occurrence = usedKeys.get(header) ?? 0;
|
|
1945
|
+
usedKeys.set(header, occurrence + 1);
|
|
1946
|
+
return occurrence === 0 ? header : `${header}${DUPLICATE_HEADER_SEPARATOR}${occurrence}`;
|
|
1947
|
+
}
|
|
1948
|
+
function removeDuplicateHeaderSuffix(value) {
|
|
1949
|
+
const separatorIndex = value.lastIndexOf(DUPLICATE_HEADER_SEPARATOR);
|
|
1950
|
+
return separatorIndex === -1 ? value : value.slice(0, separatorIndex);
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1630
1953
|
/** @format */
|
|
1631
1954
|
class NgxMatDatatablePaginatorIntl extends MatPaginatorIntl {
|
|
1632
1955
|
datatableIntl = inject(NgxMatDatatableIntl);
|
|
@@ -1691,6 +2014,7 @@ class NgxMatDatatableComponent {
|
|
|
1691
2014
|
_data;
|
|
1692
2015
|
container;
|
|
1693
2016
|
head;
|
|
2017
|
+
tableElement;
|
|
1694
2018
|
matTable;
|
|
1695
2019
|
observer = new ResizeObserver(entries => {
|
|
1696
2020
|
entries.forEach(entry => {
|
|
@@ -1725,16 +2049,16 @@ class NgxMatDatatableComponent {
|
|
|
1725
2049
|
this.changeDetectorRef.detectChanges();
|
|
1726
2050
|
}
|
|
1727
2051
|
ngOnDestroy() {
|
|
1728
|
-
if (this.
|
|
1729
|
-
this.observer.unobserve(this.
|
|
2052
|
+
if (this.tableElement)
|
|
2053
|
+
this.observer.unobserve(this.tableElement.nativeElement);
|
|
1730
2054
|
this.subscriptions.unsubscribe();
|
|
1731
2055
|
}
|
|
1732
2056
|
load(intersect) {
|
|
1733
2057
|
if (!intersect || this.loaded)
|
|
1734
2058
|
return;
|
|
1735
2059
|
this.loaded = true;
|
|
1736
|
-
if (this.
|
|
1737
|
-
this.observer.observe(this.
|
|
2060
|
+
if (this.tableElement)
|
|
2061
|
+
this.observer.observe(this.tableElement.nativeElement);
|
|
1738
2062
|
if (this.loadMode === 'pagination') {
|
|
1739
2063
|
this.subscriptions.add(this.paginator?.page.subscribe(() => {
|
|
1740
2064
|
this.updateConfig();
|
|
@@ -1762,6 +2086,8 @@ class NgxMatDatatableComponent {
|
|
|
1762
2086
|
}
|
|
1763
2087
|
redraw(match) {
|
|
1764
2088
|
this.dataSource.redraw(match);
|
|
2089
|
+
this._data = this.dataSource.data;
|
|
2090
|
+
this.buildDisabledRows();
|
|
1765
2091
|
this.changeDetectorRef.detectChanges();
|
|
1766
2092
|
}
|
|
1767
2093
|
refreshColumns() {
|
|
@@ -1771,90 +2097,17 @@ class NgxMatDatatableComponent {
|
|
|
1771
2097
|
async export() {
|
|
1772
2098
|
this.exporting = true;
|
|
1773
2099
|
try {
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
for (let chunk of chunks) {
|
|
1781
|
-
const result = await this.options.service({
|
|
1782
|
-
draw: Date.now().toString(),
|
|
1783
|
-
columns,
|
|
1784
|
-
order,
|
|
1785
|
-
start: chunk.start,
|
|
1786
|
-
length: chunk.length,
|
|
1787
|
-
});
|
|
1788
|
-
data.push(...result.data);
|
|
1789
|
-
}
|
|
1790
|
-
const rows = [];
|
|
1791
|
-
for (let d of data) {
|
|
1792
|
-
const row = {};
|
|
1793
|
-
for (let c of this.options.columns) {
|
|
1794
|
-
if (c.hidden || c.disabled)
|
|
1795
|
-
continue;
|
|
1796
|
-
let value = get(d, c.property);
|
|
1797
|
-
if (c.export)
|
|
1798
|
-
c.export(row, value, d);
|
|
1799
|
-
else {
|
|
1800
|
-
if (c.transform)
|
|
1801
|
-
value = c.transform(value, d);
|
|
1802
|
-
switch (c.type) {
|
|
1803
|
-
case 'select':
|
|
1804
|
-
await this.buildExportSelectColumn(c, row, value);
|
|
1805
|
-
break;
|
|
1806
|
-
case 'duration':
|
|
1807
|
-
await this.buildExportDurationColumn(c, row, value);
|
|
1808
|
-
break;
|
|
1809
|
-
default:
|
|
1810
|
-
row[c.header] = value;
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
rows.push(row);
|
|
1815
|
-
}
|
|
1816
|
-
const workbook = XLSX.utils.book_new();
|
|
1817
|
-
const worksheet = XLSX.utils.json_to_sheet(rows);
|
|
1818
|
-
XLSX.utils.book_append_sheet(workbook, worksheet, 'export');
|
|
1819
|
-
const filename = typeof this.options.actions?.export === 'string' ? this.options.actions.export : 'export';
|
|
1820
|
-
await XLSX.writeFile(workbook, `${filename}-${Date.now()}.xlsx`);
|
|
2100
|
+
await exportDatatable({
|
|
2101
|
+
options: this.options,
|
|
2102
|
+
searchValues: this.searchFormGroup?.getRawValue() ?? {},
|
|
2103
|
+
recordsFiltered: this.dataSource.recordsFiltered,
|
|
2104
|
+
rowSize: this.dataSource.rowSize,
|
|
2105
|
+
});
|
|
1821
2106
|
}
|
|
1822
2107
|
finally {
|
|
1823
2108
|
this.exporting = false;
|
|
1824
2109
|
}
|
|
1825
2110
|
}
|
|
1826
|
-
async buildExportSelectColumn(column, row, value) {
|
|
1827
|
-
if (Array.isArray(column.options)) {
|
|
1828
|
-
row[column.header] = column.options.find(option => option.value === value)?.name ?? value;
|
|
1829
|
-
}
|
|
1830
|
-
else if (column.__options) {
|
|
1831
|
-
row[column.header] = column.__options.find(option => option.value === value)?.name ?? value;
|
|
1832
|
-
}
|
|
1833
|
-
else {
|
|
1834
|
-
const options = await rxjs.lastValueFrom(column.options);
|
|
1835
|
-
row[column.header] = options.find(option => option.value === value)?.name ?? value;
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
async buildExportDurationColumn(column, row, value) {
|
|
1839
|
-
row[`${column.header} ms`] = value;
|
|
1840
|
-
row[column.header] = duration(value, column);
|
|
1841
|
-
}
|
|
1842
|
-
getExportChunkLength(recordsFiltered) {
|
|
1843
|
-
if (recordsFiltered <= 0)
|
|
1844
|
-
return 0;
|
|
1845
|
-
if (!Number.isFinite(this.dataSource.rowSize) || this.dataSource.rowSize <= 0)
|
|
1846
|
-
return recordsFiltered;
|
|
1847
|
-
return Math.max(1, Math.min(Math.floor(5 / this.dataSource.rowSize), recordsFiltered));
|
|
1848
|
-
}
|
|
1849
|
-
buildExportChunks(recordsFiltered, chunkLength) {
|
|
1850
|
-
if (recordsFiltered <= 0 || chunkLength <= 0)
|
|
1851
|
-
return [];
|
|
1852
|
-
const chunks = [];
|
|
1853
|
-
for (let i = 0; i < Math.ceil(recordsFiltered / chunkLength); ++i) {
|
|
1854
|
-
chunks.push({ start: i, length: chunkLength });
|
|
1855
|
-
}
|
|
1856
|
-
return chunks;
|
|
1857
|
-
}
|
|
1858
2111
|
async loadPage() {
|
|
1859
2112
|
if (!this.dataSource)
|
|
1860
2113
|
return;
|
|
@@ -1873,10 +2126,8 @@ class NgxMatDatatableComponent {
|
|
|
1873
2126
|
this.updateIncrementalRowState();
|
|
1874
2127
|
const loadToken = this.incrementalLoadToken;
|
|
1875
2128
|
try {
|
|
1876
|
-
const columns = this.buildRequestColumns();
|
|
1877
|
-
const order = this.buildOrder(columns);
|
|
1878
2129
|
const nextPageIndex = this.incrementalPageIndex + 1;
|
|
1879
|
-
await this.dataSource.loadData(this.
|
|
2130
|
+
await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.searchFormGroup.getRawValue(), nextPageIndex, this.incrementalPageSize), true);
|
|
1880
2131
|
if (loadToken !== this.incrementalLoadToken)
|
|
1881
2132
|
return;
|
|
1882
2133
|
this.incrementalPageIndex = nextPageIndex;
|
|
@@ -1896,28 +2147,14 @@ class NgxMatDatatableComponent {
|
|
|
1896
2147
|
void this.loadNextIncrementalPage();
|
|
1897
2148
|
}
|
|
1898
2149
|
async loadPaginationPage() {
|
|
1899
|
-
|
|
1900
|
-
const order = this.buildOrder(columns);
|
|
1901
|
-
await this.dataSource.loadData(this.buildRequestOptions(columns, order, this.paginator.pageIndex, this.paginator.pageSize));
|
|
2150
|
+
await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.searchFormGroup.getRawValue(), this.paginator.pageIndex, this.paginator.pageSize));
|
|
1902
2151
|
this.updateLoadedDataState();
|
|
1903
2152
|
}
|
|
1904
2153
|
async loadInitialPage() {
|
|
1905
2154
|
this.resetIncrementalLoading();
|
|
1906
|
-
|
|
1907
|
-
const order = this.buildOrder(columns);
|
|
1908
|
-
await this.dataSource.loadData(this.buildRequestOptions(columns, order, 0, this.incrementalPageSize));
|
|
2155
|
+
await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.searchFormGroup.getRawValue(), 0, this.incrementalPageSize));
|
|
1909
2156
|
this.updateLoadedDataState();
|
|
1910
2157
|
}
|
|
1911
|
-
buildRequestOptions(columns, order, start, length) {
|
|
1912
|
-
return {
|
|
1913
|
-
draw: Date.now().toString(),
|
|
1914
|
-
columns,
|
|
1915
|
-
start,
|
|
1916
|
-
length,
|
|
1917
|
-
order,
|
|
1918
|
-
facets: this.options.facets,
|
|
1919
|
-
};
|
|
1920
|
-
}
|
|
1921
2158
|
loadFirstPage() {
|
|
1922
2159
|
if (this.loadMode === 'pagination') {
|
|
1923
2160
|
this.paginationPageIndex = 0;
|
|
@@ -1948,18 +2185,6 @@ class NgxMatDatatableComponent {
|
|
|
1948
2185
|
});
|
|
1949
2186
|
}
|
|
1950
2187
|
}
|
|
1951
|
-
buildOrder(columns) {
|
|
1952
|
-
const order = [];
|
|
1953
|
-
this.options.columns
|
|
1954
|
-
.filter(c => !!c.order)
|
|
1955
|
-
.sort((c1, c2) => c1.order.index - c2.order.index)
|
|
1956
|
-
.forEach(c => {
|
|
1957
|
-
const index = columns.findIndex(column => column.data === (c.sortProperty || c.property));
|
|
1958
|
-
if (index !== -1)
|
|
1959
|
-
order.push({ column: index, dir: c.order.dir });
|
|
1960
|
-
});
|
|
1961
|
-
return order;
|
|
1962
|
-
}
|
|
1963
2188
|
updateColumns = [];
|
|
1964
2189
|
openUpdateColumnDisplay() {
|
|
1965
2190
|
this.updateColumns = this.options.columns.map(column => ({
|
|
@@ -1985,18 +2210,20 @@ class NgxMatDatatableComponent {
|
|
|
1985
2210
|
column.sticky = updated.sticky;
|
|
1986
2211
|
if (updated.hidden !== column.hidden) {
|
|
1987
2212
|
column.hidden = updated.hidden;
|
|
1988
|
-
reload =
|
|
2213
|
+
reload = true;
|
|
1989
2214
|
}
|
|
1990
2215
|
});
|
|
1991
2216
|
this.buildDisplayColumns();
|
|
1992
2217
|
this.updateConfig();
|
|
1993
2218
|
if (reload)
|
|
1994
|
-
|
|
2219
|
+
this.loadFirstPage();
|
|
1995
2220
|
}
|
|
1996
2221
|
rowClick(row) {
|
|
1997
2222
|
if (this.disabledRows.includes(row))
|
|
1998
2223
|
return;
|
|
1999
|
-
if (
|
|
2224
|
+
if (this.options.expandedDetailContentId)
|
|
2225
|
+
this.expandedRow = this.expandedRow === row ? null : row;
|
|
2226
|
+
if (this.options.actions?.rowClick === true) {
|
|
2000
2227
|
this.rowClicked.emit(row);
|
|
2001
2228
|
}
|
|
2002
2229
|
else if (typeof this.options.actions?.rowClick === 'function') {
|
|
@@ -2004,6 +2231,14 @@ class NgxMatDatatableComponent {
|
|
|
2004
2231
|
this.rowClicked.emit(row);
|
|
2005
2232
|
}
|
|
2006
2233
|
}
|
|
2234
|
+
rowKeydown(event, row) {
|
|
2235
|
+
if (!this.options.actions?.rowClick && !this.options.expandedDetailContentId)
|
|
2236
|
+
return;
|
|
2237
|
+
if (event.key !== 'Enter' && event.key !== ' ')
|
|
2238
|
+
return;
|
|
2239
|
+
event.preventDefault();
|
|
2240
|
+
this.rowClick(row);
|
|
2241
|
+
}
|
|
2007
2242
|
facetClick(column, result, option) {
|
|
2008
2243
|
if (!column)
|
|
2009
2244
|
return;
|
|
@@ -2015,56 +2250,6 @@ class NgxMatDatatableComponent {
|
|
|
2015
2250
|
else if (result._id !== control.value?.value)
|
|
2016
2251
|
control.setValue({ value: result._id });
|
|
2017
2252
|
}
|
|
2018
|
-
buildRequestColumns() {
|
|
2019
|
-
const columns = [];
|
|
2020
|
-
const additionalColumns = [];
|
|
2021
|
-
if (this.options.additionalProperties) {
|
|
2022
|
-
this.options.additionalProperties.forEach(property => this.addAdditionalColumn(additionalColumns, property));
|
|
2023
|
-
}
|
|
2024
|
-
this.options.columns.forEach(c => {
|
|
2025
|
-
if (c.hidden)
|
|
2026
|
-
return;
|
|
2027
|
-
const column = {
|
|
2028
|
-
data: c.property,
|
|
2029
|
-
projection: c.projection,
|
|
2030
|
-
name: c.columnDef,
|
|
2031
|
-
searchable: c.searchable,
|
|
2032
|
-
};
|
|
2033
|
-
if (c.sortProperty && c.order)
|
|
2034
|
-
this.addAdditionalColumn(additionalColumns, c.sortProperty);
|
|
2035
|
-
if (c.searchable) {
|
|
2036
|
-
const control = this.searchFormGroup.controls[c.columnDef];
|
|
2037
|
-
if (control.value) {
|
|
2038
|
-
if (c.searchProperty)
|
|
2039
|
-
this.addAdditionalColumn(additionalColumns, c.searchProperty, control.value);
|
|
2040
|
-
else
|
|
2041
|
-
column.search = control.value;
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
if (c.additionalProperties) {
|
|
2045
|
-
c.additionalProperties.forEach(property => this.addAdditionalColumn(additionalColumns, property));
|
|
2046
|
-
}
|
|
2047
|
-
columns.push(column);
|
|
2048
|
-
});
|
|
2049
|
-
for (let additionalColumn of additionalColumns) {
|
|
2050
|
-
const c = columns.find(c => c.data === additionalColumn.data);
|
|
2051
|
-
if (!c)
|
|
2052
|
-
columns.push(additionalColumn);
|
|
2053
|
-
else if (additionalColumn.search && !c.search)
|
|
2054
|
-
c.search = additionalColumn.search;
|
|
2055
|
-
}
|
|
2056
|
-
return columns;
|
|
2057
|
-
}
|
|
2058
|
-
addAdditionalColumn(additionalColumns, data, search) {
|
|
2059
|
-
let column = additionalColumns.find(c => c.data === data);
|
|
2060
|
-
if (!column)
|
|
2061
|
-
additionalColumns.push((column = { data }));
|
|
2062
|
-
if (search) {
|
|
2063
|
-
column.search = search;
|
|
2064
|
-
column.searchable = true;
|
|
2065
|
-
}
|
|
2066
|
-
return column;
|
|
2067
|
-
}
|
|
2068
2253
|
buildDisplayColumns() {
|
|
2069
2254
|
const displayedColumns = [];
|
|
2070
2255
|
this.options.columns.forEach(column => {
|
|
@@ -2298,7 +2483,7 @@ class NgxMatDatatableComponent {
|
|
|
2298
2483
|
this.options.configService.set(this.config);
|
|
2299
2484
|
}
|
|
2300
2485
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: NgxMatDatatableComponent, isStandalone: true, selector: "ngx-mat-datatable", inputs: { options: "options", config: "config" }, outputs: { rowClicked: "rowClicked", configUpdated: "configUpdated", searchUpdated: "searchUpdated", ready: "ready" }, host: { properties: { "style.--datatable-container-overflow-y": "this.tableContainerOverflowY", "style.--datatable-container-overflow-x": "this.tableContainerOverflowX", "style.--datatable-container-width.px": "this.tableContainerWidth" } }, providers: [{ provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl }], queries: [{ propertyName: "contentRefs", predicate: NgxMatDatatableContentDirective }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }, { propertyName: "head", first: true, predicate: ["head"], descendants: true }, { propertyName: "matTable", first: true, predicate: MatTable, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n@if (dataSource) {\n <div #container id=\"container\">\n <ng-container *ngTemplateOutlet=\"headTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" #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 | cellColor: column : options\"\n [style.opacity]=\"row | cellOpacity: 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 <ng-container *ngIf=\"options.expandedDetailContentId\" matColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"options.columns.length\">\n @let content = contentRefs | findContent: options.expandedDetailContentId;\n <div *ngIf=\"content\" class=\"element-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\">\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { row }\"> </ng-container>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"_incrementalLoad\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"visibleColumnsColspan\">\n <div class=\"incremental-load-row\">\n @if (showIncrementalInViewTrigger) {\n <div\n class=\"incremental-sentinel\"\n intersectionObserver\n (intersection)=\"onIncrementalIntersection($event.intersect)\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n }\n </div>\n }\n\n @if (showIncrementalButtonTrigger) {\n <button mat-button color=\"primary\" [disabled]=\"loadingNextRecords\" (click)=\"loadNextIncrementalPage()\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n } @else {\n <span>{{ incrementalLoadMoreLabel }}</span>\n }\n </button>\n }\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"options.actions?.rowClick\"\n [class.is-disabled]=\"row | includedIn: disabledRows\"\n (click)=\"rowClick(row)\"></tr>\n\n <ng-container *ngIf=\"options.expandedDetailContentId\">\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\"></tr>\n </ng-container>\n\n <tr\n mat-footer-row\n *matFooterRowDef=\"incrementalRowColumns\"\n class=\"incremental-row\"\n [class.is-hidden]=\"!showIncrementalRow\"></tr>\n\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 *ngIf=\"loadMode === 'pagination'\"\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"paginationPageSizeOptions\"\n [pageSize]=\"paginationPageSize\"\n [pageIndex]=\"paginationPageIndex\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n </div>\n}\n\n<div id=\"loading\" *ngIf=\"!dataSource || (dataSource.loading$ | async)\" @fade>\n <ng-content select=\"[loader-spinner]\">\n <mat-spinner loader-spinner></mat-spinner>\n </ng-content>\n</div>\n\n<ng-template #headTmpl>\n @let hasColumnDisplay =\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder;\n @let hasHead =\n !!options.title ||\n !!options.facets?.length ||\n !!options.actions?.user?.length ||\n hasColumnDisplay ||\n options.actions?.export ||\n options.actions?.refresh ||\n showRecordsCount;\n <div *ngIf=\"hasHead\" id=\"head\" #head>\n <div id=\"head-start\">\n <span *ngIf=\"options.title\" id=\"title\" [innerHTML]=\"options.title\"></span>\n\n @for (facetOptions of options.facets | filter: { position: 'start' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'start' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-center\">\n @for (facetOptions of options.facets | filter: { position: 'center' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'center' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-end\">\n @for (facetOptions of options.facets | filter: { position: 'end' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'end' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n\n @if (hasColumnDisplay) {\n <div class=\"action\">\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\n @if (options.actions?.export) {\n <div class=\"action\">\n <button mat-icon-button color=\"primary\" [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\n @if (options.actions?.refresh) {\n <div class=\"action\">\n <button mat-icon-button color=\"primary\" [disabled]=\"dataSource.loading$ | async\" (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 }\n\n @if (showRecordsCount) {\n <div id=\"records-count\">\n <span\n [countUp]=\"displayedRecordsCount\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\"></span>\n / {{ totalRecordsCount }}\n </div>\n }\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\" [innerHTML]=\"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\n class=\"cell\"\n [@.disabled]=\"!!options.disableRowAnimation\"\n @fade\n [style.place-content]=\"column.align\"\n [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.prefixComponent) {\n <ng-container *ngComponentOutlet=\"column.prefixComponent; inputs: { column, row, value }\" />\n } @else if (column.prefixFunction) {\n <span [outerHTML]=\"value | valueFunction: column.prefixFunction : row : column | safeHtml\"></span>\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix | safeHtml\"></span>\n }\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\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.suffixComponent) {\n <ng-container *ngComponentOutlet=\"column.suffixComponent; inputs: { column, row, value }\" />\n } @else if (column.suffixFunction) {\n <span [outerHTML]=\"value | valueFunction: column.suffixFunction : row : column | safeHtml\"></span>\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\n<ng-template #actionTmpl let-action=\"action\">\n @if (!action.isHidden) {\n @switch (action.kind) {\n @case ('icon') {\n <div class=\"action user-action\" [matTooltip]=\"action.tooltip\">\n <button\n [style.--action-color]=\"action.color\"\n mat-icon-button\n (click)=\"action.onclick(this)\"\n [disabled]=\"!!action.isDisabled\">\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n </div>\n }\n @case ('template') {\n <div class=\"action user-action\">\n @let content = contentRefs | findContent: action.contentId;\n @if (content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { datatable: this, action }\" />\n }\n </div>\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsTmpl let-facetOptions=\"facetOptions\">\n @let column = options.columns | find: { columnDef: facetOptions.columnDef };\n @let data = (dataSource.facets ?? {})[facetOptions.id] | sortFacetEntries: facetOptions.options;\n @if (data) {\n @if (facetOptions.contentId) {\n @let cell = contentRefs | findContent: facetOptions.contentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, facetOptions, data }\" />\n }\n } @else {\n @switch (facetOptions.display) {\n @case ('chips') {\n <ng-container *ngTemplateOutlet=\"facetsChipsTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n @default {\n <ng-container\n *ngTemplateOutlet=\"facetsProgressSpinnersTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsChipsTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size;\n @let fontSize = facetOptions.fontSize ?? '1em';\n <!-- @let total = (data | sum: 'value') || 1; -->\n <mat-chip-set class=\"chips-facet\">\n @for (d of data | orderBy: '_id'; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let labelColor = option?.labelColor;\n <!-- @let percent = (d.value / total) * 100; -->\n <mat-chip\n class=\"chip-facet\"\n [class.has-action]=\"column?.searchable !== false\"\n (click)=\"facetClick(column, d, option)\"\n [style.--facet-color]=\"color\"\n [style.--facet-label-color]=\"labelColor ?? 'var(--mat-sys-on-primary)'\"\n [style.--facet-value-color]=\"labelColor ?? color\"\n [style.width.px]=\"size\">\n <div class=\"chip-facet-content\" [style.font-size.px]=\"fontSize\">\n <div class=\"chip-facet-key\">{{ name }}</div>\n <div class=\"chip-facet-value\">{{ d.value | number: '0.0-2' }}</div>\n </div>\n </mat-chip>\n }\n </mat-chip-set>\n</ng-template>\n\n<ng-template #facetsProgressSpinnersTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size ?? 80;\n @let fontSize = facetOptions.fontSize ?? '1em';\n @let total = (data | sum: 'value') || 1;\n <mat-card class=\"facet\">\n @if (facetOptions.name) {\n <mat-card-header>\n <mat-card-title>{{ facetOptions.name }}</mat-card-title>\n </mat-card-header>\n }\n <mat-card-content>\n @for (d of data; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let percent = (d.value / total) * 100;\n <div\n class=\"facet-indicator\"\n [class.has-action]=\"column?.searchable !== false\"\n (click)=\"facetClick(column, d, option)\">\n <lib-progress-spinner [diameter]=\"size\" [color]=\"color\" [fontSize]=\"fontSize\" [value]=\"percent\">\n <mat-label>{{ name }}</mat-label>\n </lib-progress-spinner>\n <mat-label\n class=\"facet-indicator-label\"\n [style.font-size]=\"fontSize\"\n [countUp]=\"d.value\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\">\n {{ d.value | number: '0.0-2' }}\n </mat-label>\n </div>\n }\n </mat-card-content>\n </mat-card>\n</ng-template>\n", styles: [":host{display:flex;position:relative;max-height:100%;--datatable-background: var(--ngx-mat-datatable-background, #ffffff);--datatable-color: var(--ngx-mat-datatable-color, var(--mat-sys-primary,));--datatable-border-color: var(--ngx-mat-datatable-border-color, #ccc);--datatable-sticky-top: var(--ngx-mat-datatable-sticky-top, 0);--datatable-sticky-background: var(--ngx-mat-datatable-sticky-background, var(--datatable-background));--datatable-sticky-border: var(--ngx-mat-datatable-sticky-border, 1px dashed #e6a93a)}:host{--mat-table-background-color: var(--datatable-background)}:host{--mat-table-header-headline-color: var(--datatable-color)}:host{--mat-table-row-item-label-text-color: var(--datatable-color)}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;width:100%;background-color:var(--datatable-background)}#head{width:100%;display:flex;box-sizing:border-box;place-content:end space-between;align-items:end;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#head #head-start,#head #head-center,#head #head-end{display:flex;box-sizing:border-box;align-items:end;flex-direction:row}#head #head-start{place-content:end start}#head #head-center{place-content:end center}#head #head-end{place-content:end end}#head .action{position:relative}#head .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#head .action.user-action .mat-mdc-icon-button{--mdc-icon-button-icon-color: var(--action-color, var(--mat-sys-primary))}#head #records-count{min-width:72px;padding:0 8px;color:var(--datatable-color);font-size:14px;line-height:48px;text-align:right;white-space:nowrap}#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-y:var(--datatable-container-overflow-y, \"inherit\");overflow-x:var(--datatable-container-overflow-x, \"inherit\");width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{top:var(--datatable-sticky-top)!important;opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--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%}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-state-layer-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-shape: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-hover-state-layer-opacity: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-active-indicator-color: #999}#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-footer-row.incremental-row{height:44px}#table ::ng-deep .mat-mdc-footer-row.incremental-row.is-hidden{display:none}#table ::ng-deep .mat-mdc-footer-row.incremental-row .mat-mdc-footer-cell{padding:0;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 ::ng-deep .mat-mdc-row.has-click:not(.is-disabled){cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:not(.is-disabled):hover .mat-mdc-cell{--datatable-hover-color: var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary));--datatable-hover-bgcolor: var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary));color:var(--datatable-hover-color)!important;background-color:var(--datatable-hover-bgcolor)!important}#table ::ng-deep .mat-mdc-row.is-disabled .mat-mdc-cell{opacity:.2}#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%}#table .cell>*{display:inline-flex}#table .incremental-load-row{position:sticky;left:0;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px;width:var(--datatable-container-width, 100%);max-width:var(--datatable-container-width, 100%);color:var(--datatable-color);pointer-events:none}#table .incremental-sentinel,#table .incremental-load-row button{pointer-events:auto}#table .incremental-sentinel{display:inline-flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px}#table .incremental-load-row button{display:inline-flex;align-items:center;gap:8px}#paginator{--mat-paginator-container-background-color: var(--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(--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;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row}::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}.element-detail{background:#f5f5f5;overflow:hidden;display:flex}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}.facet{margin:8px;--mdc-elevated-card-container-color: transparent}.facet mat-card-content{display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;flex-wrap:wrap;padding:4px}.facet .facet-indicator{display:flex;box-sizing:border-box;flex-direction:column;place-content:center center;align-items:center;position:relative;margin:4px}.facet .facet-indicator.has-action{cursor:pointer}.facet .facet-indicator .facet-indicator-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1em;padding:2px}.chips-facet{margin-right:8px}.chips-facet .chip-facet{overflow:hidden}.chips-facet .chip-facet{--mdc-chip-label-text-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-outline-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-elevated-container-color: var(--facet-color)}.chips-facet .chip-facet.has-action{cursor:pointer}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action,.chips-facet .chip-facet ::ng-deep .mat-mdc-standard-chip{cursor:inherit;padding:0}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action-label{height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content{display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content .chip-facet-key,.chips-facet .chip-facet .chip-facet-content .chip-facet-value{height:100%;padding-left:8px;padding-right:8px;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}.chips-facet .chip-facet .chip-facet-content .chip-facet-key{background-color:var(--mdc-chip-label-text-color);color:var(--facet-label-color, var(--mdc-chip-elevated-container-color))}.chips-facet .chip-facet .chip-facet-content .chip-facet-value{color:var(--facet-value-color, var(--mdc-chip-label-text-color))}\n"], dependencies: [{ kind: "pipe", type: CellColorPipe, name: "cellColor" }, { 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: "pipe", type: i1$1.DecimalPipe, name: "number" }, { 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: "pipe", type: FindContentPipe, name: "findContent" }, { 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.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { 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: i9.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: i9.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: i10$1.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: i1$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i12.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i12.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i12.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i12.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i12.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i12.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i12.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i12.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i12.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i12.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i12.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i12.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i12.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i12.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i12.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i13.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i13.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { 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: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: BackgroundColorPipe, name: "backgroundColor" }, { kind: "pipe", type: FilterPipe, name: "filter" }, { kind: "pipe", type: SumPipe, name: "sum" }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i15.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i15.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i15.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i15.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: CountUpModule }, { kind: "directive", type: i3$3.CountUpDirective, selector: "[countUp]", inputs: ["countUp", "options", "reanimateOnClick"], outputs: ["complete"] }, { kind: "component", type: ProgressSpinnerComponent, selector: "lib-progress-spinner", inputs: ["diameter", "value", "color", "displayValue", "fontSize", "animateInView", "delay"] }, { kind: "pipe", type: FindPipe, name: "find" }, { kind: "pipe", type: OrderByPipe, name: "orderBy" }, { kind: "pipe", type: SortFacetEntriesPipe, name: "sortFacetEntries" }, { kind: "pipe", type: IncludedInPipe, name: "includedIn" }, { kind: "pipe", type: CellOpacityPipe, name: "cellOpacity" }], animations: [
|
|
2486
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: NgxMatDatatableComponent, isStandalone: true, selector: "ngx-mat-datatable", inputs: { options: "options", config: "config" }, outputs: { rowClicked: "rowClicked", configUpdated: "configUpdated", searchUpdated: "searchUpdated", ready: "ready" }, host: { properties: { "style.--datatable-container-overflow-y": "this.tableContainerOverflowY", "style.--datatable-container-overflow-x": "this.tableContainerOverflowX", "style.--datatable-container-width.px": "this.tableContainerWidth" } }, providers: [{ provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl }, SelectOptionsCacheService], queries: [{ propertyName: "contentRefs", predicate: NgxMatDatatableContentDirective }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }, { propertyName: "head", first: true, predicate: ["head"], descendants: true }, { propertyName: "tableElement", first: true, predicate: ["table"], descendants: true, read: ElementRef }, { propertyName: "matTable", first: true, predicate: MatTable, descendants: true }], ngImport: i0, template: "<!-- @format -->\n\n@if (dataSource) {\n <div #container id=\"container\">\n <ng-container *ngTemplateOutlet=\"headTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" #table mat-table [fixedLayout]=\"false\" [dataSource]=\"dataSource\" multiTemplateDataRows>\n @for (column of options.columns; track column.columnDef) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [attr.aria-sort]=\"\n column.sortable\n ? column.order?.dir === 'asc'\n ? 'ascending'\n : column.order?.dir === 'desc'\n ? 'descending'\n : 'none'\n : null\n \"\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 | cellColor: column : options\"\n [style.opacity]=\"row | cellOpacity: 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 <ng-container *ngIf=\"options.expandedDetailContentId\" matColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"visibleColumnsColspan\">\n @let content = contentRefs | findContent: options.expandedDetailContentId;\n <div *ngIf=\"content\" class=\"element-detail\" [@detailExpand]=\"row === expandedRow ? 'expanded' : 'collapsed'\">\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { row }\"> </ng-container>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"_incrementalLoad\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"visibleColumnsColspan\">\n <div class=\"incremental-load-row\">\n @if (showIncrementalInViewTrigger) {\n <div\n class=\"incremental-sentinel\"\n intersectionObserver\n (intersection)=\"onIncrementalIntersection($event.intersect)\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n }\n </div>\n }\n\n @if (showIncrementalButtonTrigger) {\n <button mat-button color=\"primary\" [disabled]=\"loadingNextRecords\" (click)=\"loadNextIncrementalPage()\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n } @else {\n <span>{{ incrementalLoadMoreLabel }}</span>\n }\n </button>\n }\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"!!options.actions?.rowClick || !!options.expandedDetailContentId\"\n [class.is-disabled]=\"row | includedIn: disabledRows\"\n [attr.aria-disabled]=\"(row | includedIn: disabledRows) ? 'true' : null\"\n [attr.aria-expanded]=\"options.expandedDetailContentId ? row === expandedRow : null\"\n [attr.tabindex]=\"\n (!!options.actions?.rowClick || !!options.expandedDetailContentId) && !(row | includedIn: disabledRows) ? 0 : null\n \"\n (click)=\"rowClick(row)\"\n (keydown)=\"rowKeydown($event, row)\"></tr>\n\n <ng-container *ngIf=\"options.expandedDetailContentId\">\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\"></tr>\n </ng-container>\n\n <tr\n mat-footer-row\n *matFooterRowDef=\"incrementalRowColumns\"\n class=\"incremental-row\"\n [class.is-hidden]=\"!showIncrementalRow\"></tr>\n\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 *ngIf=\"loadMode === 'pagination'\"\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"paginationPageSizeOptions\"\n [pageSize]=\"paginationPageSize\"\n [pageIndex]=\"paginationPageIndex\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n </div>\n}\n\n<div id=\"loading\" *ngIf=\"!dataSource || (dataSource.loading$ | async)\" @fade>\n <ng-content select=\"[loader-spinner]\">\n <mat-spinner loader-spinner></mat-spinner>\n </ng-content>\n</div>\n\n<ng-template #headTmpl>\n @let hasColumnDisplay =\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder;\n @let hasHead =\n !!options.title ||\n !!options.facets?.length ||\n !!options.actions?.user?.length ||\n hasColumnDisplay ||\n options.actions?.export ||\n options.actions?.refresh ||\n showRecordsCount;\n <div *ngIf=\"hasHead\" id=\"head\" #head>\n <div id=\"head-start\">\n <span *ngIf=\"options.title\" id=\"title\" [innerHTML]=\"options.title\"></span>\n\n @for (facetOptions of options.facets | filter: { position: 'start' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'start' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-center\">\n @for (facetOptions of options.facets | filter: { position: 'center' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'center' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-end\">\n @for (facetOptions of options.facets | filter: { position: 'end' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'end' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n\n @if (hasColumnDisplay) {\n <div class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || datatableIntl.columnsActionLabel\"\n [attr.aria-label]=\"options.actions?.columns?.tooltip || datatableIntl.columnsActionLabel\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n }\n\n @if (options.actions?.export) {\n <div class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"datatableIntl.exportActionLabel\"\n [disabled]=\"exporting\"\n (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\n @if (options.actions?.refresh) {\n <div class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"datatableIntl.refreshActionLabel\"\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 }\n\n @if (showRecordsCount) {\n <div id=\"records-count\">\n <span\n [countUp]=\"displayedRecordsCount\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\"></span>\n / {{ totalRecordsCount }}\n </div>\n }\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.columnDef) {\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 [attr.aria-label]=\"column.hidden ? datatableIntl.showColumnActionLabel : datatableIntl.hideColumnActionLabel\"\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 [attr.aria-label]=\"column.sticky ? datatableIntl.unpinColumnActionLabel : datatableIntl.pinColumnActionLabel\"\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\" [innerHTML]=\"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 [innerHTML]=\"column.header | safeHtml\"></span>\n }\n }\n } @else {\n <span [innerHTML]=\"column.header | safeHtml\"></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 [attr.aria-label]=\"datatableIntl.sortColumnActionLabel\"\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\n class=\"cell\"\n [@.disabled]=\"!!options.disableRowAnimation\"\n @fade\n [style.place-content]=\"column.align\"\n [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.prefixComponent) {\n <ng-container *ngComponentOutlet=\"column.prefixComponent; inputs: { column, row, value }\" />\n } @else if (column.prefixFunction) {\n <span [innerHTML]=\"value | valueFunction: column.prefixFunction : row : column | safeHtml\"></span>\n } @else if (column.prefix) {\n <span [innerHTML]=\"column.prefix | safeHtml\"></span>\n }\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 [innerHTML]=\"(value | transform: row : column) ?? '' | safeHtml\"></span>\n }\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.suffixComponent) {\n <ng-container *ngComponentOutlet=\"column.suffixComponent; inputs: { column, row, value }\" />\n } @else if (column.suffixFunction) {\n <span [innerHTML]=\"value | valueFunction: column.suffixFunction : row : column | safeHtml\"></span>\n } @else if (column.suffix) {\n <span [innerHTML]=\"column.suffix | safeHtml\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n\n<ng-template #actionTmpl let-action=\"action\">\n @if (!action.isHidden) {\n @switch (action.kind) {\n @case ('icon') {\n <div class=\"action user-action\" [matTooltip]=\"action.tooltip\">\n <button\n [style.--action-color]=\"action.color\"\n mat-icon-button\n [attr.aria-label]=\"action.ariaLabel || action.tooltip || action.icon\"\n (click)=\"action.onclick(this)\"\n [disabled]=\"!!action.isDisabled\">\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n </div>\n }\n @case ('template') {\n <div class=\"action user-action\">\n @let content = contentRefs | findContent: action.contentId;\n @if (content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { datatable: this, action }\" />\n }\n </div>\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsTmpl let-facetOptions=\"facetOptions\">\n @let column = options.columns | find: { columnDef: facetOptions.columnDef };\n @let data = (dataSource.facets ?? {})[facetOptions.id] | sortFacetEntries: facetOptions.options;\n @if (data) {\n @if (facetOptions.contentId) {\n @let cell = contentRefs | findContent: facetOptions.contentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, facetOptions, data }\" />\n }\n } @else {\n @switch (facetOptions.display) {\n @case ('chips') {\n <ng-container *ngTemplateOutlet=\"facetsChipsTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n @default {\n <ng-container\n *ngTemplateOutlet=\"facetsProgressSpinnersTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsChipsTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size;\n @let fontSize = facetOptions.fontSize ?? '1em';\n <!-- @let total = (data | sum: 'value') || 1; -->\n <mat-chip-set class=\"chips-facet\">\n @for (d of data | orderBy: '_id'; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let labelColor = option?.labelColor;\n <!-- @let percent = (d.value / total) * 100; -->\n <mat-chip\n class=\"chip-facet\"\n [class.has-action]=\"column?.searchable === true\"\n [attr.tabindex]=\"column?.searchable === true ? 0 : null\"\n (click)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.enter)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.space)=\"column?.searchable === true && facetClick(column, d, option); $event.preventDefault()\"\n [style.--facet-color]=\"color\"\n [style.--facet-label-color]=\"labelColor ?? 'var(--mat-sys-on-primary)'\"\n [style.--facet-value-color]=\"labelColor ?? color\"\n [style.width.px]=\"size\">\n <div class=\"chip-facet-content\" [style.font-size]=\"fontSize\">\n <div class=\"chip-facet-key\">{{ name }}</div>\n <div class=\"chip-facet-value\">{{ d.value | number: '0.0-2' }}</div>\n </div>\n </mat-chip>\n }\n </mat-chip-set>\n</ng-template>\n\n<ng-template #facetsProgressSpinnersTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size ?? 80;\n @let fontSize = facetOptions.fontSize ?? '1em';\n @let total = (data | sum: 'value') || 1;\n <mat-card class=\"facet\">\n @if (facetOptions.name) {\n <mat-card-header>\n <mat-card-title>{{ facetOptions.name }}</mat-card-title>\n </mat-card-header>\n }\n <mat-card-content>\n @for (d of data; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let percent = (d.value / total) * 100;\n <div\n class=\"facet-indicator\"\n [class.has-action]=\"column?.searchable === true\"\n [attr.role]=\"column?.searchable === true ? 'button' : null\"\n [attr.tabindex]=\"column?.searchable === true ? 0 : null\"\n (click)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.enter)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.space)=\"column?.searchable === true && facetClick(column, d, option); $event.preventDefault()\">\n <lib-progress-spinner [diameter]=\"size\" [color]=\"color\" [fontSize]=\"fontSize\" [value]=\"percent\">\n <mat-label>{{ name }}</mat-label>\n </lib-progress-spinner>\n <mat-label\n class=\"facet-indicator-label\"\n [style.font-size]=\"fontSize\"\n [countUp]=\"d.value\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\">\n {{ d.value | number: '0.0-2' }}\n </mat-label>\n </div>\n }\n </mat-card-content>\n </mat-card>\n</ng-template>\n", styles: [":host{display:flex;position:relative;max-height:100%;--datatable-background: var(--ngx-mat-datatable-background, #ffffff);--datatable-color: var(--ngx-mat-datatable-color, var(--mat-sys-primary,));--datatable-border-color: var(--ngx-mat-datatable-border-color, #ccc);--datatable-sticky-top: var(--ngx-mat-datatable-sticky-top, 0);--datatable-sticky-background: var(--ngx-mat-datatable-sticky-background, var(--datatable-background));--datatable-sticky-border: var(--ngx-mat-datatable-sticky-border, 1px dashed #e6a93a)}:host{--mat-table-background-color: var(--datatable-background)}:host{--mat-table-header-headline-color: var(--datatable-color)}:host{--mat-table-row-item-label-text-color: var(--datatable-color)}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;width:100%;background-color:var(--datatable-background)}#head{width:100%;display:flex;box-sizing:border-box;place-content:end space-between;align-items:end;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#head #head-start,#head #head-center,#head #head-end{display:flex;box-sizing:border-box;align-items:end;flex-direction:row}#head #head-start{place-content:end start}#head #head-center{place-content:end center}#head #head-end{place-content:end end}#head .action{position:relative}#head .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#head .action.user-action .mat-mdc-icon-button{--mdc-icon-button-icon-color: var(--action-color, var(--mat-sys-primary))}#head #records-count{min-width:72px;padding:0 8px;color:var(--datatable-color);font-size:14px;line-height:48px;text-align:right;white-space:nowrap}#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-y:var(--datatable-container-overflow-y, \"inherit\");overflow-x:var(--datatable-container-overflow-x, \"inherit\");width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{top:var(--datatable-sticky-top)!important;opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--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%}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-state-layer-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-shape: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-hover-state-layer-opacity: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-active-indicator-color: #999}#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-footer-row.incremental-row{height:44px}#table ::ng-deep .mat-mdc-footer-row.incremental-row.is-hidden{display:none}#table ::ng-deep .mat-mdc-footer-row.incremental-row .mat-mdc-footer-cell{padding:0;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 ::ng-deep .mat-mdc-row.has-click:not(.is-disabled){cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:not(.is-disabled):focus-visible{outline:2px solid currentColor;outline-offset:-2px}#table ::ng-deep .mat-mdc-row.has-click:not(.is-disabled):hover .mat-mdc-cell{--datatable-hover-color: var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary));--datatable-hover-bgcolor: var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary));color:var(--datatable-hover-color)!important;background-color:var(--datatable-hover-bgcolor)!important}#table ::ng-deep .mat-mdc-row.is-disabled .mat-mdc-cell{opacity:.2}#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%}#table .cell>*{display:inline-flex}#table .incremental-load-row{position:sticky;left:0;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px;width:var(--datatable-container-width, 100%);max-width:var(--datatable-container-width, 100%);color:var(--datatable-color);pointer-events:none}#table .incremental-sentinel,#table .incremental-load-row button{pointer-events:auto}#table .incremental-sentinel{display:inline-flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px}#table .incremental-load-row button{display:inline-flex;align-items:center;gap:8px}#paginator{--mat-paginator-container-background-color: var(--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(--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;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row}::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}.detail-row{height:0}.element-detail{background:#f5f5f5;overflow:hidden;display:flex}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}.facet{margin:8px;--mdc-elevated-card-container-color: transparent}.facet mat-card-content{display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;flex-wrap:wrap;padding:4px}.facet .facet-indicator{display:flex;box-sizing:border-box;flex-direction:column;place-content:center center;align-items:center;position:relative;margin:4px}.facet .facet-indicator.has-action{cursor:pointer}.facet .facet-indicator.has-action:focus-visible{outline:2px solid currentColor;outline-offset:2px}.facet .facet-indicator .facet-indicator-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1em;padding:2px}.chips-facet{margin-right:8px}.chips-facet .chip-facet{overflow:hidden}.chips-facet .chip-facet{--mdc-chip-label-text-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-outline-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-elevated-container-color: var(--facet-color)}.chips-facet .chip-facet.has-action{cursor:pointer}.chips-facet .chip-facet.has-action:focus-visible{outline:2px solid currentColor;outline-offset:2px}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action,.chips-facet .chip-facet ::ng-deep .mat-mdc-standard-chip{cursor:inherit;padding:0}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action-label{height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content{display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content .chip-facet-key,.chips-facet .chip-facet .chip-facet-content .chip-facet-value{height:100%;padding-left:8px;padding-right:8px;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}.chips-facet .chip-facet .chip-facet-content .chip-facet-key{background-color:var(--mdc-chip-label-text-color);color:var(--facet-label-color, var(--mdc-chip-elevated-container-color))}.chips-facet .chip-facet .chip-facet-content .chip-facet-value{color:var(--facet-value-color, var(--mdc-chip-label-text-color))}\n"], dependencies: [{ kind: "pipe", type: CellColorPipe, name: "cellColor" }, { 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: "pipe", type: i1$1.DecimalPipe, name: "number" }, { 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: "pipe", type: FindContentPipe, name: "findContent" }, { 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.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { 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: i9.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: i9.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: i10$1.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: i1$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i12.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i12.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i12.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i12.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i12.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i12.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i12.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i12.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i12.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i12.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i12.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i12.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i12.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i12.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i12.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i13.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i13.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { 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: "pipe", type: SafeHtmlPipe, name: "safeHtml" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i14.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: BackgroundColorPipe, name: "backgroundColor" }, { kind: "pipe", type: FilterPipe, name: "filter" }, { kind: "pipe", type: SumPipe, name: "sum" }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i15.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i15.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i15.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i15.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: CountUpModule }, { kind: "directive", type: i3$3.CountUpDirective, selector: "[countUp]", inputs: ["countUp", "options", "reanimateOnClick"], outputs: ["complete"] }, { kind: "component", type: ProgressSpinnerComponent, selector: "lib-progress-spinner", inputs: ["diameter", "value", "color", "displayValue", "fontSize", "animateInView", "delay"] }, { kind: "pipe", type: FindPipe, name: "find" }, { kind: "pipe", type: OrderByPipe, name: "orderBy" }, { kind: "pipe", type: SortFacetEntriesPipe, name: "sortFacetEntries" }, { kind: "pipe", type: IncludedInPipe, name: "includedIn" }, { kind: "pipe", type: CellOpacityPipe, name: "cellOpacity" }], animations: [
|
|
2302
2487
|
trigger('fade', [
|
|
2303
2488
|
transition(':enter', [
|
|
2304
2489
|
style({ opacity: 0 }), // initial
|
|
@@ -2314,9 +2499,9 @@ class NgxMatDatatableComponent {
|
|
|
2314
2499
|
state('expanded', style({ height: '*' })),
|
|
2315
2500
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
2316
2501
|
]),
|
|
2317
|
-
], deferBlockDependencies: [() => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-
|
|
2502
|
+
], deferBlockDependencies: [() => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-E5dQ-SJb.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-CXh9rWrt.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-Br8ga1qE.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-number-value.component-BGmWTDbF.mjs').then(m => m.CellNumberValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-_CDm5Nid.mjs').then(m => m.CellSelectValueComponent), i1$1.NgComponentOutlet, i1$1.NgTemplateOutlet, import('./eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs').then(m => m.TransformPipe), FindContentPipe, import('./eherve-angular-material-datatable-get.pipe-OPM3WlAY.mjs').then(m => m.GetPipe), SafeHtmlPipe, import('./eherve-angular-material-datatable-suffix-function.pipe-CQO-ghpR.mjs').then(m => m.ValueFunctionPipe)]] });
|
|
2318
2503
|
}
|
|
2319
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, resolveDeferredDeps: () => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-
|
|
2504
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ngImport: i0, type: NgxMatDatatableComponent, resolveDeferredDeps: () => [import('./eherve-angular-material-datatable-cell-checkbox-value.component-E5dQ-SJb.mjs').then(m => m.CellCheckboxValueComponent), import('./eherve-angular-material-datatable-cell-date-value.component-CXh9rWrt.mjs').then(m => m.CellDateValueComponent), import('./eherve-angular-material-datatable-cell-duration-value.component-Br8ga1qE.mjs').then(m => m.CellDurationValueComponent), import('./eherve-angular-material-datatable-cell-number-value.component-BGmWTDbF.mjs').then(m => m.CellNumberValueComponent), import('./eherve-angular-material-datatable-cell-select-value.component-_CDm5Nid.mjs').then(m => m.CellSelectValueComponent), import('./eherve-angular-material-datatable-transform.pipe-BOmcXXZU.mjs').then(m => m.TransformPipe), import('./eherve-angular-material-datatable-get.pipe-OPM3WlAY.mjs').then(m => m.GetPipe), import('./eherve-angular-material-datatable-suffix-function.pipe-CQO-ghpR.mjs').then(m => m.ValueFunctionPipe)], resolveMetadata: (CellCheckboxValueComponent, CellDateValueComponent, CellDurationValueComponent, CellNumberValueComponent, CellSelectValueComponent, TransformPipe, GetPipe, ValueFunctionPipe) => ({ decorators: [{
|
|
2320
2505
|
type: Component,
|
|
2321
2506
|
args: [{ imports: [
|
|
2322
2507
|
CellCheckboxValueComponent,
|
|
@@ -2363,7 +2548,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ng
|
|
|
2363
2548
|
ValueFunctionPipe,
|
|
2364
2549
|
IncludedInPipe,
|
|
2365
2550
|
CellOpacityPipe,
|
|
2366
|
-
], providers: [{ provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl }], selector: 'ngx-mat-datatable', animations: [
|
|
2551
|
+
], providers: [{ provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl }, SelectOptionsCacheService], selector: 'ngx-mat-datatable', animations: [
|
|
2367
2552
|
trigger('fade', [
|
|
2368
2553
|
transition(':enter', [
|
|
2369
2554
|
style({ opacity: 0 }), // initial
|
|
@@ -2379,7 +2564,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ng
|
|
|
2379
2564
|
state('expanded', style({ height: '*' })),
|
|
2380
2565
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
2381
2566
|
]),
|
|
2382
|
-
], template: "<!-- @format -->\n\n@if (dataSource) {\n <div #container id=\"container\">\n <ng-container *ngTemplateOutlet=\"headTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" #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 | cellColor: column : options\"\n [style.opacity]=\"row | cellOpacity: 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 <ng-container *ngIf=\"options.expandedDetailContentId\" matColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"options.columns.length\">\n @let content = contentRefs | findContent: options.expandedDetailContentId;\n <div *ngIf=\"content\" class=\"element-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\">\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { row }\"> </ng-container>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"_incrementalLoad\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"visibleColumnsColspan\">\n <div class=\"incremental-load-row\">\n @if (showIncrementalInViewTrigger) {\n <div\n class=\"incremental-sentinel\"\n intersectionObserver\n (intersection)=\"onIncrementalIntersection($event.intersect)\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n }\n </div>\n }\n\n @if (showIncrementalButtonTrigger) {\n <button mat-button color=\"primary\" [disabled]=\"loadingNextRecords\" (click)=\"loadNextIncrementalPage()\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n } @else {\n <span>{{ incrementalLoadMoreLabel }}</span>\n }\n </button>\n }\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"options.actions?.rowClick\"\n [class.is-disabled]=\"row | includedIn: disabledRows\"\n (click)=\"rowClick(row)\"></tr>\n\n <ng-container *ngIf=\"options.expandedDetailContentId\">\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\"></tr>\n </ng-container>\n\n <tr\n mat-footer-row\n *matFooterRowDef=\"incrementalRowColumns\"\n class=\"incremental-row\"\n [class.is-hidden]=\"!showIncrementalRow\"></tr>\n\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 *ngIf=\"loadMode === 'pagination'\"\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"paginationPageSizeOptions\"\n [pageSize]=\"paginationPageSize\"\n [pageIndex]=\"paginationPageIndex\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n </div>\n}\n\n<div id=\"loading\" *ngIf=\"!dataSource || (dataSource.loading$ | async)\" @fade>\n <ng-content select=\"[loader-spinner]\">\n <mat-spinner loader-spinner></mat-spinner>\n </ng-content>\n</div>\n\n<ng-template #headTmpl>\n @let hasColumnDisplay =\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder;\n @let hasHead =\n !!options.title ||\n !!options.facets?.length ||\n !!options.actions?.user?.length ||\n hasColumnDisplay ||\n options.actions?.export ||\n options.actions?.refresh ||\n showRecordsCount;\n <div *ngIf=\"hasHead\" id=\"head\" #head>\n <div id=\"head-start\">\n <span *ngIf=\"options.title\" id=\"title\" [innerHTML]=\"options.title\"></span>\n\n @for (facetOptions of options.facets | filter: { position: 'start' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'start' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-center\">\n @for (facetOptions of options.facets | filter: { position: 'center' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'center' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-end\">\n @for (facetOptions of options.facets | filter: { position: 'end' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'end' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n\n @if (hasColumnDisplay) {\n <div class=\"action\">\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\n @if (options.actions?.export) {\n <div class=\"action\">\n <button mat-icon-button color=\"primary\" [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\n @if (options.actions?.refresh) {\n <div class=\"action\">\n <button mat-icon-button color=\"primary\" [disabled]=\"dataSource.loading$ | async\" (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 }\n\n @if (showRecordsCount) {\n <div id=\"records-count\">\n <span\n [countUp]=\"displayedRecordsCount\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\"></span>\n / {{ totalRecordsCount }}\n </div>\n }\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\" [innerHTML]=\"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\n class=\"cell\"\n [@.disabled]=\"!!options.disableRowAnimation\"\n @fade\n [style.place-content]=\"column.align\"\n [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.prefixComponent) {\n <ng-container *ngComponentOutlet=\"column.prefixComponent; inputs: { column, row, value }\" />\n } @else if (column.prefixFunction) {\n <span [outerHTML]=\"value | valueFunction: column.prefixFunction : row : column | safeHtml\"></span>\n } @else if (column.prefix) {\n <span [outerHTML]=\"column.prefix | safeHtml\"></span>\n }\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\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.suffixComponent) {\n <ng-container *ngComponentOutlet=\"column.suffixComponent; inputs: { column, row, value }\" />\n } @else if (column.suffixFunction) {\n <span [outerHTML]=\"value | valueFunction: column.suffixFunction : row : column | safeHtml\"></span>\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\n<ng-template #actionTmpl let-action=\"action\">\n @if (!action.isHidden) {\n @switch (action.kind) {\n @case ('icon') {\n <div class=\"action user-action\" [matTooltip]=\"action.tooltip\">\n <button\n [style.--action-color]=\"action.color\"\n mat-icon-button\n (click)=\"action.onclick(this)\"\n [disabled]=\"!!action.isDisabled\">\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n </div>\n }\n @case ('template') {\n <div class=\"action user-action\">\n @let content = contentRefs | findContent: action.contentId;\n @if (content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { datatable: this, action }\" />\n }\n </div>\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsTmpl let-facetOptions=\"facetOptions\">\n @let column = options.columns | find: { columnDef: facetOptions.columnDef };\n @let data = (dataSource.facets ?? {})[facetOptions.id] | sortFacetEntries: facetOptions.options;\n @if (data) {\n @if (facetOptions.contentId) {\n @let cell = contentRefs | findContent: facetOptions.contentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, facetOptions, data }\" />\n }\n } @else {\n @switch (facetOptions.display) {\n @case ('chips') {\n <ng-container *ngTemplateOutlet=\"facetsChipsTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n @default {\n <ng-container\n *ngTemplateOutlet=\"facetsProgressSpinnersTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsChipsTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size;\n @let fontSize = facetOptions.fontSize ?? '1em';\n <!-- @let total = (data | sum: 'value') || 1; -->\n <mat-chip-set class=\"chips-facet\">\n @for (d of data | orderBy: '_id'; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let labelColor = option?.labelColor;\n <!-- @let percent = (d.value / total) * 100; -->\n <mat-chip\n class=\"chip-facet\"\n [class.has-action]=\"column?.searchable !== false\"\n (click)=\"facetClick(column, d, option)\"\n [style.--facet-color]=\"color\"\n [style.--facet-label-color]=\"labelColor ?? 'var(--mat-sys-on-primary)'\"\n [style.--facet-value-color]=\"labelColor ?? color\"\n [style.width.px]=\"size\">\n <div class=\"chip-facet-content\" [style.font-size.px]=\"fontSize\">\n <div class=\"chip-facet-key\">{{ name }}</div>\n <div class=\"chip-facet-value\">{{ d.value | number: '0.0-2' }}</div>\n </div>\n </mat-chip>\n }\n </mat-chip-set>\n</ng-template>\n\n<ng-template #facetsProgressSpinnersTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size ?? 80;\n @let fontSize = facetOptions.fontSize ?? '1em';\n @let total = (data | sum: 'value') || 1;\n <mat-card class=\"facet\">\n @if (facetOptions.name) {\n <mat-card-header>\n <mat-card-title>{{ facetOptions.name }}</mat-card-title>\n </mat-card-header>\n }\n <mat-card-content>\n @for (d of data; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let percent = (d.value / total) * 100;\n <div\n class=\"facet-indicator\"\n [class.has-action]=\"column?.searchable !== false\"\n (click)=\"facetClick(column, d, option)\">\n <lib-progress-spinner [diameter]=\"size\" [color]=\"color\" [fontSize]=\"fontSize\" [value]=\"percent\">\n <mat-label>{{ name }}</mat-label>\n </lib-progress-spinner>\n <mat-label\n class=\"facet-indicator-label\"\n [style.font-size]=\"fontSize\"\n [countUp]=\"d.value\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\">\n {{ d.value | number: '0.0-2' }}\n </mat-label>\n </div>\n }\n </mat-card-content>\n </mat-card>\n</ng-template>\n", styles: [":host{display:flex;position:relative;max-height:100%;--datatable-background: var(--ngx-mat-datatable-background, #ffffff);--datatable-color: var(--ngx-mat-datatable-color, var(--mat-sys-primary,));--datatable-border-color: var(--ngx-mat-datatable-border-color, #ccc);--datatable-sticky-top: var(--ngx-mat-datatable-sticky-top, 0);--datatable-sticky-background: var(--ngx-mat-datatable-sticky-background, var(--datatable-background));--datatable-sticky-border: var(--ngx-mat-datatable-sticky-border, 1px dashed #e6a93a)}:host{--mat-table-background-color: var(--datatable-background)}:host{--mat-table-header-headline-color: var(--datatable-color)}:host{--mat-table-row-item-label-text-color: var(--datatable-color)}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;width:100%;background-color:var(--datatable-background)}#head{width:100%;display:flex;box-sizing:border-box;place-content:end space-between;align-items:end;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#head #head-start,#head #head-center,#head #head-end{display:flex;box-sizing:border-box;align-items:end;flex-direction:row}#head #head-start{place-content:end start}#head #head-center{place-content:end center}#head #head-end{place-content:end end}#head .action{position:relative}#head .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#head .action.user-action .mat-mdc-icon-button{--mdc-icon-button-icon-color: var(--action-color, var(--mat-sys-primary))}#head #records-count{min-width:72px;padding:0 8px;color:var(--datatable-color);font-size:14px;line-height:48px;text-align:right;white-space:nowrap}#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-y:var(--datatable-container-overflow-y, \"inherit\");overflow-x:var(--datatable-container-overflow-x, \"inherit\");width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{top:var(--datatable-sticky-top)!important;opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--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%}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-state-layer-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-shape: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-hover-state-layer-opacity: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-active-indicator-color: #999}#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-footer-row.incremental-row{height:44px}#table ::ng-deep .mat-mdc-footer-row.incremental-row.is-hidden{display:none}#table ::ng-deep .mat-mdc-footer-row.incremental-row .mat-mdc-footer-cell{padding:0;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 ::ng-deep .mat-mdc-row.has-click:not(.is-disabled){cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:not(.is-disabled):hover .mat-mdc-cell{--datatable-hover-color: var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary));--datatable-hover-bgcolor: var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary));color:var(--datatable-hover-color)!important;background-color:var(--datatable-hover-bgcolor)!important}#table ::ng-deep .mat-mdc-row.is-disabled .mat-mdc-cell{opacity:.2}#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%}#table .cell>*{display:inline-flex}#table .incremental-load-row{position:sticky;left:0;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px;width:var(--datatable-container-width, 100%);max-width:var(--datatable-container-width, 100%);color:var(--datatable-color);pointer-events:none}#table .incremental-sentinel,#table .incremental-load-row button{pointer-events:auto}#table .incremental-sentinel{display:inline-flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px}#table .incremental-load-row button{display:inline-flex;align-items:center;gap:8px}#paginator{--mat-paginator-container-background-color: var(--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(--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;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row}::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}.element-detail{background:#f5f5f5;overflow:hidden;display:flex}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}.facet{margin:8px;--mdc-elevated-card-container-color: transparent}.facet mat-card-content{display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;flex-wrap:wrap;padding:4px}.facet .facet-indicator{display:flex;box-sizing:border-box;flex-direction:column;place-content:center center;align-items:center;position:relative;margin:4px}.facet .facet-indicator.has-action{cursor:pointer}.facet .facet-indicator .facet-indicator-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1em;padding:2px}.chips-facet{margin-right:8px}.chips-facet .chip-facet{overflow:hidden}.chips-facet .chip-facet{--mdc-chip-label-text-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-outline-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-elevated-container-color: var(--facet-color)}.chips-facet .chip-facet.has-action{cursor:pointer}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action,.chips-facet .chip-facet ::ng-deep .mat-mdc-standard-chip{cursor:inherit;padding:0}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action-label{height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content{display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content .chip-facet-key,.chips-facet .chip-facet .chip-facet-content .chip-facet-value{height:100%;padding-left:8px;padding-right:8px;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}.chips-facet .chip-facet .chip-facet-content .chip-facet-key{background-color:var(--mdc-chip-label-text-color);color:var(--facet-label-color, var(--mdc-chip-elevated-container-color))}.chips-facet .chip-facet .chip-facet-content .chip-facet-value{color:var(--facet-value-color, var(--mdc-chip-label-text-color))}\n"] }]
|
|
2567
|
+
], template: "<!-- @format -->\n\n@if (dataSource) {\n <div #container id=\"container\">\n <ng-container *ngTemplateOutlet=\"headTmpl\"></ng-container>\n\n <div id=\"table-container\" intersectionObserver (intersection)=\"load($event.intersect)\">\n <table id=\"table\" #table mat-table [fixedLayout]=\"false\" [dataSource]=\"dataSource\" multiTemplateDataRows>\n @for (column of options.columns; track column.columnDef) {\n <ng-container [matColumnDef]=\"column.columnDef\" [sticky]=\"column.sticky\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.searchable]=\"column.searchable\"\n [attr.aria-sort]=\"\n column.sortable\n ? column.order?.dir === 'asc'\n ? 'ascending'\n : column.order?.dir === 'desc'\n ? 'descending'\n : 'none'\n : null\n \"\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 | cellColor: column : options\"\n [style.opacity]=\"row | cellOpacity: 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 <ng-container *ngIf=\"options.expandedDetailContentId\" matColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"visibleColumnsColspan\">\n @let content = contentRefs | findContent: options.expandedDetailContentId;\n <div *ngIf=\"content\" class=\"element-detail\" [@detailExpand]=\"row === expandedRow ? 'expanded' : 'collapsed'\">\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { row }\"> </ng-container>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"_incrementalLoad\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"visibleColumnsColspan\">\n <div class=\"incremental-load-row\">\n @if (showIncrementalInViewTrigger) {\n <div\n class=\"incremental-sentinel\"\n intersectionObserver\n (intersection)=\"onIncrementalIntersection($event.intersect)\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n }\n </div>\n }\n\n @if (showIncrementalButtonTrigger) {\n <button mat-button color=\"primary\" [disabled]=\"loadingNextRecords\" (click)=\"loadNextIncrementalPage()\">\n @if (loadingNextRecords) {\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n <span>{{ incrementalLoadingLabel }}</span>\n } @else {\n <span>{{ incrementalLoadMoreLabel }}</span>\n }\n </button>\n }\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [class.has-click]=\"!!options.actions?.rowClick || !!options.expandedDetailContentId\"\n [class.is-disabled]=\"row | includedIn: disabledRows\"\n [attr.aria-disabled]=\"(row | includedIn: disabledRows) ? 'true' : null\"\n [attr.aria-expanded]=\"options.expandedDetailContentId ? row === expandedRow : null\"\n [attr.tabindex]=\"\n (!!options.actions?.rowClick || !!options.expandedDetailContentId) && !(row | includedIn: disabledRows) ? 0 : null\n \"\n (click)=\"rowClick(row)\"\n (keydown)=\"rowKeydown($event, row)\"></tr>\n\n <ng-container *ngIf=\"options.expandedDetailContentId\">\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\"></tr>\n </ng-container>\n\n <tr\n mat-footer-row\n *matFooterRowDef=\"incrementalRowColumns\"\n class=\"incremental-row\"\n [class.is-hidden]=\"!showIncrementalRow\"></tr>\n\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 *ngIf=\"loadMode === 'pagination'\"\n id=\"paginator\"\n [length]=\"dataSource.recordsFiltered\"\n [pageSizeOptions]=\"paginationPageSizeOptions\"\n [pageSize]=\"paginationPageSize\"\n [pageIndex]=\"paginationPageIndex\"\n [showFirstLastButtons]=\"true\">\n </mat-paginator>\n </div>\n}\n\n<div id=\"loading\" *ngIf=\"!dataSource || (dataSource.loading$ | async)\" @fade>\n <ng-content select=\"[loader-spinner]\">\n <mat-spinner loader-spinner></mat-spinner>\n </ng-content>\n</div>\n\n<ng-template #headTmpl>\n @let hasColumnDisplay =\n options.actions?.columns?.hideAndShow || options.actions?.columns?.sticky || options.actions?.columns?.reorder;\n @let hasHead =\n !!options.title ||\n !!options.facets?.length ||\n !!options.actions?.user?.length ||\n hasColumnDisplay ||\n options.actions?.export ||\n options.actions?.refresh ||\n showRecordsCount;\n <div *ngIf=\"hasHead\" id=\"head\" #head>\n <div id=\"head-start\">\n <span *ngIf=\"options.title\" id=\"title\" [innerHTML]=\"options.title\"></span>\n\n @for (facetOptions of options.facets | filter: { position: 'start' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'start' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-center\">\n @for (facetOptions of options.facets | filter: { position: 'center' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'center' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n </div>\n\n <div id=\"head-end\">\n @for (facetOptions of options.facets | filter: { position: 'end' }; track facetOptions) {\n <ng-container *ngTemplateOutlet=\"facetsTmpl; context: { facetOptions }\"></ng-container>\n }\n @for (action of options.actions?.user | filter: { position: 'end' }; track action) {\n <ng-container *ngTemplateOutlet=\"actionTmpl; context: { action }\"></ng-container>\n }\n\n @if (hasColumnDisplay) {\n <div class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n class=\"icon-only action\"\n [matTooltip]=\"options.actions?.columns?.tooltip || datatableIntl.columnsActionLabel\"\n [attr.aria-label]=\"options.actions?.columns?.tooltip || datatableIntl.columnsActionLabel\"\n [matMenuTriggerFor]=\"columnsMenu\"\n (menuOpened)=\"openUpdateColumnDisplay()\"\n (menuClosed)=\"closeUpdateColumnDisplay()\">\n <mat-icon>view_column</mat-icon>\n </button>\n </div>\n }\n\n @if (options.actions?.export) {\n <div class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"datatableIntl.exportActionLabel\"\n [disabled]=\"exporting\"\n (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\n @if (options.actions?.refresh) {\n <div class=\"action\">\n <button\n mat-icon-button\n color=\"primary\"\n [attr.aria-label]=\"datatableIntl.refreshActionLabel\"\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 }\n\n @if (showRecordsCount) {\n <div id=\"records-count\">\n <span\n [countUp]=\"displayedRecordsCount\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\"></span>\n / {{ totalRecordsCount }}\n </div>\n }\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.columnDef) {\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 [attr.aria-label]=\"column.hidden ? datatableIntl.showColumnActionLabel : datatableIntl.hideColumnActionLabel\"\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 [attr.aria-label]=\"column.sticky ? datatableIntl.unpinColumnActionLabel : datatableIntl.pinColumnActionLabel\"\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\" [innerHTML]=\"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 [innerHTML]=\"column.header | safeHtml\"></span>\n }\n }\n } @else {\n <span [innerHTML]=\"column.header | safeHtml\"></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 [attr.aria-label]=\"datatableIntl.sortColumnActionLabel\"\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\n class=\"cell\"\n [@.disabled]=\"!!options.disableRowAnimation\"\n @fade\n [style.place-content]=\"column.align\"\n [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.prefixComponent) {\n <ng-container *ngComponentOutlet=\"column.prefixComponent; inputs: { column, row, value }\" />\n } @else if (column.prefixFunction) {\n <span [innerHTML]=\"value | valueFunction: column.prefixFunction : row : column | safeHtml\"></span>\n } @else if (column.prefix) {\n <span [innerHTML]=\"column.prefix | safeHtml\"></span>\n }\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 [innerHTML]=\"(value | transform: row : column) ?? '' | safeHtml\"></span>\n }\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.suffixComponent) {\n <ng-container *ngComponentOutlet=\"column.suffixComponent; inputs: { column, row, value }\" />\n } @else if (column.suffixFunction) {\n <span [innerHTML]=\"value | valueFunction: column.suffixFunction : row : column | safeHtml\"></span>\n } @else if (column.suffix) {\n <span [innerHTML]=\"column.suffix | safeHtml\"></span>\n }\n }\n </div>\n } @placeholder {\n <div class=\"cell\"></div>\n }\n</ng-template>\n\n<ng-template #actionTmpl let-action=\"action\">\n @if (!action.isHidden) {\n @switch (action.kind) {\n @case ('icon') {\n <div class=\"action user-action\" [matTooltip]=\"action.tooltip\">\n <button\n [style.--action-color]=\"action.color\"\n mat-icon-button\n [attr.aria-label]=\"action.ariaLabel || action.tooltip || action.icon\"\n (click)=\"action.onclick(this)\"\n [disabled]=\"!!action.isDisabled\">\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n </div>\n }\n @case ('template') {\n <div class=\"action user-action\">\n @let content = contentRefs | findContent: action.contentId;\n @if (content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: { datatable: this, action }\" />\n }\n </div>\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsTmpl let-facetOptions=\"facetOptions\">\n @let column = options.columns | find: { columnDef: facetOptions.columnDef };\n @let data = (dataSource.facets ?? {})[facetOptions.id] | sortFacetEntries: facetOptions.options;\n @if (data) {\n @if (facetOptions.contentId) {\n @let cell = contentRefs | findContent: facetOptions.contentId;\n @if (cell) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: { column, facetOptions, data }\" />\n }\n } @else {\n @switch (facetOptions.display) {\n @case ('chips') {\n <ng-container *ngTemplateOutlet=\"facetsChipsTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n @default {\n <ng-container\n *ngTemplateOutlet=\"facetsProgressSpinnersTmpl; context: { column, data, facetOptions }\"></ng-container>\n }\n }\n }\n }\n</ng-template>\n\n<ng-template #facetsChipsTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size;\n @let fontSize = facetOptions.fontSize ?? '1em';\n <!-- @let total = (data | sum: 'value') || 1; -->\n <mat-chip-set class=\"chips-facet\">\n @for (d of data | orderBy: '_id'; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let labelColor = option?.labelColor;\n <!-- @let percent = (d.value / total) * 100; -->\n <mat-chip\n class=\"chip-facet\"\n [class.has-action]=\"column?.searchable === true\"\n [attr.tabindex]=\"column?.searchable === true ? 0 : null\"\n (click)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.enter)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.space)=\"column?.searchable === true && facetClick(column, d, option); $event.preventDefault()\"\n [style.--facet-color]=\"color\"\n [style.--facet-label-color]=\"labelColor ?? 'var(--mat-sys-on-primary)'\"\n [style.--facet-value-color]=\"labelColor ?? color\"\n [style.width.px]=\"size\">\n <div class=\"chip-facet-content\" [style.font-size]=\"fontSize\">\n <div class=\"chip-facet-key\">{{ name }}</div>\n <div class=\"chip-facet-value\">{{ d.value | number: '0.0-2' }}</div>\n </div>\n </mat-chip>\n }\n </mat-chip-set>\n</ng-template>\n\n<ng-template #facetsProgressSpinnersTmpl let-column=\"column\" let-data=\"data\" let-facetOptions=\"facetOptions\">\n @let size = facetOptions.size ?? 80;\n @let fontSize = facetOptions.fontSize ?? '1em';\n @let total = (data | sum: 'value') || 1;\n <mat-card class=\"facet\">\n @if (facetOptions.name) {\n <mat-card-header>\n <mat-card-title>{{ facetOptions.name }}</mat-card-title>\n </mat-card-header>\n }\n <mat-card-content>\n @for (d of data; track d) {\n @let option = facetOptions?.option ? facetOptions.option(d) : (facetOptions.options | find: { value: d._id });\n @let name = option?.name ?? d._id;\n @let color = option?.color ?? 'var(--mat-sys-primary)';\n @let percent = (d.value / total) * 100;\n <div\n class=\"facet-indicator\"\n [class.has-action]=\"column?.searchable === true\"\n [attr.role]=\"column?.searchable === true ? 'button' : null\"\n [attr.tabindex]=\"column?.searchable === true ? 0 : null\"\n (click)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.enter)=\"column?.searchable === true && facetClick(column, d, option)\"\n (keydown.space)=\"column?.searchable === true && facetClick(column, d, option); $event.preventDefault()\">\n <lib-progress-spinner [diameter]=\"size\" [color]=\"color\" [fontSize]=\"fontSize\" [value]=\"percent\">\n <mat-label>{{ name }}</mat-label>\n </lib-progress-spinner>\n <mat-label\n class=\"facet-indicator-label\"\n [style.font-size]=\"fontSize\"\n [countUp]=\"d.value\"\n [options]=\"datatableIntl.numberOptions\"\n [reanimateOnClick]=\"false\">\n {{ d.value | number: '0.0-2' }}\n </mat-label>\n </div>\n }\n </mat-card-content>\n </mat-card>\n</ng-template>\n", styles: [":host{display:flex;position:relative;max-height:100%;--datatable-background: var(--ngx-mat-datatable-background, #ffffff);--datatable-color: var(--ngx-mat-datatable-color, var(--mat-sys-primary,));--datatable-border-color: var(--ngx-mat-datatable-border-color, #ccc);--datatable-sticky-top: var(--ngx-mat-datatable-sticky-top, 0);--datatable-sticky-background: var(--ngx-mat-datatable-sticky-background, var(--datatable-background));--datatable-sticky-border: var(--ngx-mat-datatable-sticky-border, 1px dashed #e6a93a)}:host{--mat-table-background-color: var(--datatable-background)}:host{--mat-table-header-headline-color: var(--datatable-color)}:host{--mat-table-row-item-label-text-color: var(--datatable-color)}#container{display:flex;flex:1 1 100%;box-sizing:border-box;flex-direction:column;position:relative;width:100%;background-color:var(--datatable-background)}#head{width:100%;display:flex;box-sizing:border-box;place-content:end space-between;align-items:end;flex-direction:row;border-bottom:1px solid var(--datatable-border-color)}#head #head-start,#head #head-center,#head #head-end{display:flex;box-sizing:border-box;align-items:end;flex-direction:row}#head #head-start{place-content:end start}#head #head-center{place-content:end center}#head #head-end{place-content:end end}#head .action{position:relative}#head .action .action-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#head .action.user-action .mat-mdc-icon-button{--mdc-icon-button-icon-color: var(--action-color, var(--mat-sys-primary))}#head #records-count{min-width:72px;padding:0 8px;color:var(--datatable-color);font-size:14px;line-height:48px;text-align:right;white-space:nowrap}#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-y:var(--datatable-container-overflow-y, \"inherit\");overflow-x:var(--datatable-container-overflow-x, \"inherit\");width:100%;scrollbar-width:thin}#table{width:100%;max-height:100%;--mat-table-background-color: var(--datatable-background);--mat-table-row-item-outline-color: var(--datatable-border-color)}#table ::ng-deep .mat-mdc-table-sticky{top:var(--datatable-sticky-top)!important;opacity:1;background:var(--datatable-sticky-background, var(--datatable-background, #ffffff))}#table ::ng-deep .mat-mdc-table-sticky.mat-mdc-table-sticky-border-elem-left{border-right:var(--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%}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-state-layer-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-color: var(--datatable-background)}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-container-shape: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mat-form-field-hover-state-layer-opacity: 0}#table ::ng-deep .mat-mdc-header-cell mat-form-field{--mdc-filled-text-field-active-indicator-color: #999}#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-footer-row.incremental-row{height:44px}#table ::ng-deep .mat-mdc-footer-row.incremental-row.is-hidden{display:none}#table ::ng-deep .mat-mdc-footer-row.incremental-row .mat-mdc-footer-cell{padding:0;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 ::ng-deep .mat-mdc-row.has-click:not(.is-disabled){cursor:pointer}#table ::ng-deep .mat-mdc-row.has-click:not(.is-disabled):focus-visible{outline:2px solid currentColor;outline-offset:-2px}#table ::ng-deep .mat-mdc-row.has-click:not(.is-disabled):hover .mat-mdc-cell{--datatable-hover-color: var(--ngx-mat-datatable-hover-color, var(--mat-sys-on-primary));--datatable-hover-bgcolor: var(--ngx-mat-datatable-hover-bgcolor, var(--mat-sys-primary));color:var(--datatable-hover-color)!important;background-color:var(--datatable-hover-bgcolor)!important}#table ::ng-deep .mat-mdc-row.is-disabled .mat-mdc-cell{opacity:.2}#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%}#table .cell>*{display:inline-flex}#table .incremental-load-row{position:sticky;left:0;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px;width:var(--datatable-container-width, 100%);max-width:var(--datatable-container-width, 100%);color:var(--datatable-color);pointer-events:none}#table .incremental-sentinel,#table .incremental-load-row button{pointer-events:auto}#table .incremental-sentinel{display:inline-flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;gap:8px;min-height:44px}#table .incremental-load-row button{display:inline-flex;align-items:center;gap:8px}#paginator{--mat-paginator-container-background-color: var(--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(--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;display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row}::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}.detail-row{height:0}.element-detail{background:#f5f5f5;overflow:hidden;display:flex}#no-data{position:sticky;width:fit-content;left:50%}#no-data #no-data-label{position:relative;margin-left:-50%}.facet{margin:8px;--mdc-elevated-card-container-color: transparent}.facet mat-card-content{display:flex;box-sizing:border-box;place-content:center center;align-items:center;flex-direction:row;flex-wrap:wrap;padding:4px}.facet .facet-indicator{display:flex;box-sizing:border-box;flex-direction:column;place-content:center center;align-items:center;position:relative;margin:4px}.facet .facet-indicator.has-action{cursor:pointer}.facet .facet-indicator.has-action:focus-visible{outline:2px solid currentColor;outline-offset:2px}.facet .facet-indicator .facet-indicator-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1em;padding:2px}.chips-facet{margin-right:8px}.chips-facet .chip-facet{overflow:hidden}.chips-facet .chip-facet{--mdc-chip-label-text-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-outline-color: var(--facet-color)}.chips-facet .chip-facet{--mdc-chip-elevated-container-color: var(--facet-color)}.chips-facet .chip-facet.has-action{cursor:pointer}.chips-facet .chip-facet.has-action:focus-visible{outline:2px solid currentColor;outline-offset:2px}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action,.chips-facet .chip-facet ::ng-deep .mat-mdc-standard-chip{cursor:inherit;padding:0}.chips-facet .chip-facet ::ng-deep .mat-mdc-chip-action-label{height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content{display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row;height:100%;width:100%}.chips-facet .chip-facet .chip-facet-content .chip-facet-key,.chips-facet .chip-facet .chip-facet-content .chip-facet-value{height:100%;padding-left:8px;padding-right:8px;display:flex;box-sizing:border-box;place-content:center space-between;align-items:center;flex-direction:row}.chips-facet .chip-facet .chip-facet-content .chip-facet-key{background-color:var(--mdc-chip-label-text-color);color:var(--facet-label-color, var(--mdc-chip-elevated-container-color))}.chips-facet .chip-facet .chip-facet-content .chip-facet-value{color:var(--facet-value-color, var(--mdc-chip-label-text-color))}\n"] }]
|
|
2383
2568
|
}], ctorParameters: null, propDecorators: { options: [{
|
|
2384
2569
|
type: Input,
|
|
2385
2570
|
args: ['options']
|
|
@@ -2405,6 +2590,9 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.4", ng
|
|
|
2405
2590
|
}], head: [{
|
|
2406
2591
|
type: ViewChild,
|
|
2407
2592
|
args: ['head']
|
|
2593
|
+
}], tableElement: [{
|
|
2594
|
+
type: ViewChild,
|
|
2595
|
+
args: ['table', { read: ElementRef }]
|
|
2408
2596
|
}], matTable: [{
|
|
2409
2597
|
type: ViewChild,
|
|
2410
2598
|
args: [MatTable]
|
|
@@ -2446,8 +2634,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
2446
2634
|
|
|
2447
2635
|
/** @format */
|
|
2448
2636
|
|
|
2637
|
+
/** @format */
|
|
2638
|
+
|
|
2449
2639
|
/**
|
|
2450
|
-
* Public API Surface of
|
|
2640
|
+
* Public API Surface of @eherve/angular-material-datatable
|
|
2451
2641
|
*
|
|
2452
2642
|
* @format
|
|
2453
2643
|
*/
|
|
@@ -2456,5 +2646,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
2456
2646
|
* Generated bundle index. Do not edit.
|
|
2457
2647
|
*/
|
|
2458
2648
|
|
|
2459
|
-
export { IsArrayPipe as I, NgxMatDatatableModule as N,
|
|
2460
|
-
//# sourceMappingURL=eherve-angular-material-datatable-eherve-angular-material-datatable-
|
|
2649
|
+
export { IsArrayPipe as I, NgxMatDatatableModule as N, SelectOptionsCacheService as S, SelectOptionPipe as a, SafeHtmlPipe as b, NgxMatDatatableComponent as c, duration as d, NGX_MAT_DATATABLE_DEFAULT_OPTIONS as e, NgxMatDatatableContentDirective as f, get as g, NgxMatDatatableIntl as h, provideNgxMatDatatableDefaultOptions as p };
|
|
2650
|
+
//# sourceMappingURL=eherve-angular-material-datatable-eherve-angular-material-datatable-oKhIjmQe.mjs.map
|