@eherve/angular-material-datatable 19.26.0 → 19.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2329,6 +2329,7 @@ class NgxMatDatatableComponent {
2329
2329
  paginationPageSize = 30;
2330
2330
  paginationPageIndex = 0;
2331
2331
  searchFormGroup;
2332
+ searchControlNames = {};
2332
2333
  subscriptions = new rxjs.Subscription();
2333
2334
  changeDetectorRef = inject(ChangeDetectorRef);
2334
2335
  defaultOptions = inject(NGX_MAT_DATATABLE_DEFAULT_OPTIONS);
@@ -2429,7 +2430,7 @@ class NgxMatDatatableComponent {
2429
2430
  try {
2430
2431
  await exportDatatable({
2431
2432
  options: this.options,
2432
- searchValues: this.searchFormGroup?.getRawValue() ?? {},
2433
+ searchValues: this.getSearchValues(),
2433
2434
  recordsFiltered: this.dataSource.recordsFiltered,
2434
2435
  rowSize: this.dataSource.rowSize,
2435
2436
  });
@@ -2457,7 +2458,7 @@ class NgxMatDatatableComponent {
2457
2458
  const loadToken = this.incrementalLoadToken;
2458
2459
  try {
2459
2460
  const nextPageIndex = this.incrementalPageIndex + 1;
2460
- await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.searchFormGroup.getRawValue(), nextPageIndex, this.incrementalPageSize), true);
2461
+ await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.getSearchValues(), nextPageIndex, this.incrementalPageSize), true);
2461
2462
  if (loadToken !== this.incrementalLoadToken)
2462
2463
  return;
2463
2464
  this.incrementalPageIndex = nextPageIndex;
@@ -2477,12 +2478,12 @@ class NgxMatDatatableComponent {
2477
2478
  void this.loadNextIncrementalPage();
2478
2479
  }
2479
2480
  async loadPaginationPage() {
2480
- await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.searchFormGroup.getRawValue(), this.paginator.pageIndex, this.paginator.pageSize));
2481
+ await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.getSearchValues(), this.paginator.pageIndex, this.paginator.pageSize));
2481
2482
  this.updateLoadedDataState();
2482
2483
  }
2483
2484
  async loadInitialPage() {
2484
2485
  this.resetIncrementalLoading();
2485
- await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.searchFormGroup.getRawValue(), 0, this.incrementalPageSize));
2486
+ await this.dataSource.loadData(buildDatasourceRequestOptions(this.options, this.getSearchValues(), 0, this.incrementalPageSize));
2486
2487
  this.updateLoadedDataState();
2487
2488
  }
2488
2489
  loadFirstPage() {
@@ -2589,7 +2590,8 @@ class NgxMatDatatableComponent {
2589
2590
  facetClick(column, result, option) {
2590
2591
  if (!column)
2591
2592
  return;
2592
- const control = this.searchFormGroup?.controls[column.columnDef];
2593
+ const controlName = this.searchControlNames[column.columnDef];
2594
+ const control = controlName ? this.searchFormGroup?.controls[controlName] : undefined;
2593
2595
  if (!control)
2594
2596
  return;
2595
2597
  if (option && option.value !== control.value?.value)
@@ -2691,6 +2693,7 @@ class NgxMatDatatableComponent {
2691
2693
  queueMicrotask(() => this.matTable?.renderRows());
2692
2694
  }
2693
2695
  buildSearchFormGroup() {
2696
+ this.searchControlNames = {};
2694
2697
  this.searchFormGroup = new FormGroup(this.options.columns.reduce((controls, column) => {
2695
2698
  if (column.searchable) {
2696
2699
  const restoredValue = this.restoredState?.filters[column.columnDef];
@@ -2703,18 +2706,33 @@ class NgxMatDatatableComponent {
2703
2706
  value: initialValue,
2704
2707
  disabled: false,
2705
2708
  });
2706
- controls[column.columnDef] = control;
2709
+ const controlName = this.getSearchControlName(column.columnDef);
2710
+ this.searchControlNames[column.columnDef] = controlName;
2711
+ controls[controlName] = control;
2707
2712
  if (typeof column.searchUpdated === 'function') {
2708
2713
  this.subscriptions.add(control.valueChanges.pipe(rxjs.debounceTime(500)).subscribe(value => column.searchUpdated(value)));
2709
2714
  }
2710
2715
  }
2711
2716
  return controls;
2712
2717
  }, {}));
2713
- this.subscriptions.add(this.searchFormGroup.valueChanges.pipe(rxjs.debounceTime(500)).subscribe(value => {
2714
- this.searchUpdated.next(value);
2718
+ this.subscriptions.add(this.searchFormGroup.valueChanges.pipe(rxjs.debounceTime(500)).subscribe(() => {
2719
+ this.searchUpdated.next(this.getSearchValues());
2715
2720
  this.loadFirstPage();
2716
2721
  }));
2717
2722
  }
2723
+ getSearchValues() {
2724
+ return this.options.columns.reduce((values, column) => {
2725
+ if (!column.searchable)
2726
+ return values;
2727
+ const controlName = this.searchControlNames[column.columnDef];
2728
+ if (controlName)
2729
+ values[column.columnDef] = this.searchFormGroup?.controls[controlName]?.value;
2730
+ return values;
2731
+ }, {});
2732
+ }
2733
+ getSearchControlName(columnDef) {
2734
+ return columnDef.replace(/%/g, '%25').replace(/\./g, '%2E');
2735
+ }
2718
2736
  consolidateOrderIndex() {
2719
2737
  let index = 0;
2720
2738
  this.options.columns
@@ -2810,7 +2828,7 @@ class NgxMatDatatableComponent {
2810
2828
  : undefined;
2811
2829
  return {
2812
2830
  version: 1,
2813
- filters: this.searchFormGroup.getRawValue(),
2831
+ filters: this.getSearchValues(),
2814
2832
  order,
2815
2833
  ...(page ? { page } : {}),
2816
2834
  };
@@ -2834,7 +2852,7 @@ class NgxMatDatatableComponent {
2834
2852
  { provide: MatPaginatorIntl, useClass: NgxMatDatatablePaginatorIntl },
2835
2853
  SelectOptionsCacheService,
2836
2854
  DatatableRowViewportObserverService,
2837
- ], 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 [datatableRowViewport]=\"row\"\n (datatableRowVisible)=\"renderRow($event)\"\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 @if (renderedRows.has(row)) {\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 } @else {\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: "component", type: CellCheckboxValueComponent, selector: "lib-cell-checkbox-value", inputs: ["column", "row"] }, { kind: "component", type: CellDateValueComponent, selector: "lib-cell-date-value", inputs: ["column", "row"] }, { kind: "component", type: CellDurationValueComponent, selector: "lib-cell-duration-value", inputs: ["column", "row"] }, { kind: "component", type: CellNumberValueComponent, selector: "lib-cell-number-value", inputs: ["column", "row"] }, { kind: "component", type: CellSelectValueComponent, selector: "lib-cell-select-value", inputs: ["column", "row"] }, { kind: "pipe", type: CellColorPipe, name: "cellColor" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: TransformPipe, name: "transform" }, { 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: "pipe", type: GetPipe, name: "get" }, { 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.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: ValueFunctionPipe, name: "valueFunction" }, { kind: "pipe", type: IncludedInPipe, name: "includedIn" }, { kind: "pipe", type: CellOpacityPipe, name: "cellOpacity" }, { kind: "directive", type: DatatableRowViewportDirective, selector: "[datatableRowViewport]", inputs: ["datatableRowViewport"], outputs: ["datatableRowVisible"] }], animations: [
2855
+ ], 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 [datatableRowViewport]=\"row\"\n (datatableRowVisible)=\"renderRow($event)\"\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.id) {\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.id) {\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.id) {\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\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[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 @if (renderedRows.has(row)) {\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 } @else {\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._id) {\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._id) {\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: "component", type: CellCheckboxValueComponent, selector: "lib-cell-checkbox-value", inputs: ["column", "row"] }, { kind: "component", type: CellDateValueComponent, selector: "lib-cell-date-value", inputs: ["column", "row"] }, { kind: "component", type: CellDurationValueComponent, selector: "lib-cell-duration-value", inputs: ["column", "row"] }, { kind: "component", type: CellNumberValueComponent, selector: "lib-cell-number-value", inputs: ["column", "row"] }, { kind: "component", type: CellSelectValueComponent, selector: "lib-cell-select-value", inputs: ["column", "row"] }, { kind: "pipe", type: CellColorPipe, name: "cellColor" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: TransformPipe, name: "transform" }, { 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: "pipe", type: GetPipe, name: "get" }, { 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.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: ValueFunctionPipe, name: "valueFunction" }, { kind: "pipe", type: IncludedInPipe, name: "includedIn" }, { kind: "pipe", type: CellOpacityPipe, name: "cellOpacity" }, { kind: "directive", type: DatatableRowViewportDirective, selector: "[datatableRowViewport]", inputs: ["datatableRowViewport"], outputs: ["datatableRowVisible"] }], animations: [
2838
2856
  trigger('fade', [
2839
2857
  transition(':enter', [
2840
2858
  style({ opacity: 0 }), // initial
@@ -2920,7 +2938,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
2920
2938
  state('expanded', style({ height: '*' })),
2921
2939
  transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
2922
2940
  ]),
2923
- ], 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 [datatableRowViewport]=\"row\"\n (datatableRowVisible)=\"renderRow($event)\"\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 @if (renderedRows.has(row)) {\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 } @else {\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"] }]
2941
+ ], 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 [datatableRowViewport]=\"row\"\n (datatableRowVisible)=\"renderRow($event)\"\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.id) {\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.id) {\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.id) {\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\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-text-filter>\n }\n @case ('number') {\n <lib-header-number-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-number-filter>\n }\n @case ('select') {\n <lib-header-select-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-select-filter>\n }\n @case ('autocomplete') {\n <lib-header-autocomplete-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-autocomplete-filter>\n }\n @case ('checkbox') {\n <lib-header-checkbox-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-checkbox-filter>\n }\n @case ('date') {\n <lib-header-date-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[column.columnDef]\"></lib-header-date-filter>\n }\n @case ('duration') {\n <lib-header-duration-filter\n [column]=\"column\"\n [formControlName]=\"searchControlNames[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 @if (renderedRows.has(row)) {\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 } @else {\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._id) {\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._id) {\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"] }]
2924
2942
  }], propDecorators: { options: [{
2925
2943
  type: Input,
2926
2944
  args: ['options']