@porscheinformatik/material-addons 22.0.6 → 22.0.8

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, Component, NgModule, HostBinding, ElementRef, ViewChild, Optional, Directive, LOCALE_ID, Inject, Injectable, output, InjectionToken, inject, viewChild, input, computed, signal, ChangeDetectionStrategy, EventEmitter, Output, forwardRef, HostListener, model, TemplateRef, ViewChildren, ContentChild, SkipSelf, ContentChildren, ViewEncapsulation, QueryList } from '@angular/core';
2
+ import { input, Component, NgModule, HostBinding, ElementRef, ViewChild, Input, Optional, Directive, LOCALE_ID, Inject, Injectable, output, InjectionToken, inject, viewChild, computed, signal, ChangeDetectionStrategy, EventEmitter, Output, forwardRef, HostListener, model, TemplateRef, ViewChildren, ContentChild, SkipSelf, ContentChildren, ViewEncapsulation, QueryList } from '@angular/core';
3
3
  import * as i2$1 from '@angular/material/icon';
4
- import { MatIconModule } from '@angular/material/icon';
4
+ import { MatIconModule, MatIcon } from '@angular/material/icon';
5
5
  import * as i2 from '@angular/material/tooltip';
6
6
  import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
7
7
  import * as i1 from '@angular/material/button';
@@ -68,30 +68,20 @@ import { MatChipsModule } from '@angular/material/chips';
68
68
 
69
69
  class MaterialActionButtonComponent {
70
70
  constructor() {
71
- this.icon = 'add';
72
- // Sets the lower padding higher providing some bottom space for a fixed paginator
73
- this.liftHigher = true;
74
- this.liftHigher2 = false;
71
+ this.actionName = input('', ...(ngDevMode ? [{ debugName: "actionName" }] : []));
72
+ this.id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
73
+ this.icon = input('add', ...(ngDevMode ? [{ debugName: "icon" }] : []));
74
+ this.routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : []));
75
+ this.liftHigher = input(true, ...(ngDevMode ? [{ debugName: "liftHigher" }] : []));
76
+ this.liftHigher2 = input(false, ...(ngDevMode ? [{ debugName: "liftHigher2" }] : []));
75
77
  }
76
78
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MaterialActionButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
77
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: MaterialActionButtonComponent, isStandalone: true, selector: "mad-material-action-button", inputs: { actionName: "actionName", id: "id", icon: "icon", routerLink: "routerLink", liftHigher: "liftHigher", liftHigher2: "liftHigher2" }, ngImport: i0, template: "<div class=\"material-action-button {{ liftHigher ? 'lift-higher' : '' }} {{ liftHigher2 ? 'lift-higher-2' : '' }}\">\n <a [routerLink]=\"routerLink\">\n @if (liftHigher2) {\n <button [id]=\"id\" mat-mini-fab [matTooltipPosition]=\"'left'\" [matTooltip]=\"actionName\" class=\"mat-accent\">\n <mat-icon>{{ icon }}</mat-icon>\n </button>\n } @else {\n <button [id]=\"id\" mat-fab [matTooltipPosition]=\"'left'\" [matTooltip]=\"actionName\" class=\"mat-primary\">\n <mat-icon>{{ icon }}</mat-icon>\n </button>\n }\n </a>\n</div>\n", styles: [".material-action-button{position:fixed;bottom:20px;right:20px;z-index:100;display:flex;flex-direction:column-reverse;align-items:center}.lift-higher{bottom:61px}.lift-higher-2{right:28px;bottom:121px}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
79
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: MaterialActionButtonComponent, isStandalone: true, selector: "mad-material-action-button", inputs: { actionName: { classPropertyName: "actionName", publicName: "actionName", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, liftHigher: { classPropertyName: "liftHigher", publicName: "liftHigher", isSignal: true, isRequired: false, transformFunction: null }, liftHigher2: { classPropertyName: "liftHigher2", publicName: "liftHigher2", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"material-action-button\" [class.lift-higher]=\"liftHigher()\" [class.lift-higher-2]=\"liftHigher2()\">\n @if (liftHigher2()) {\n <a\n mat-mini-fab\n class=\"mat-accent\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n } @else {\n <a\n mat-fab\n class=\"mat-primary\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n }\n</div>\n", styles: [".material-action-button{position:fixed;bottom:20px;right:20px;z-index:100;display:flex;flex-direction:column-reverse;align-items:center}.lift-higher{bottom:61px}.lift-higher-2{right:28px;bottom:121px}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
78
80
  }
79
81
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MaterialActionButtonComponent, decorators: [{
80
82
  type: Component,
81
- args: [{ selector: 'mad-material-action-button', imports: [RouterLink, MatButtonModule, MatTooltipModule, MatIconModule], template: "<div class=\"material-action-button {{ liftHigher ? 'lift-higher' : '' }} {{ liftHigher2 ? 'lift-higher-2' : '' }}\">\n <a [routerLink]=\"routerLink\">\n @if (liftHigher2) {\n <button [id]=\"id\" mat-mini-fab [matTooltipPosition]=\"'left'\" [matTooltip]=\"actionName\" class=\"mat-accent\">\n <mat-icon>{{ icon }}</mat-icon>\n </button>\n } @else {\n <button [id]=\"id\" mat-fab [matTooltipPosition]=\"'left'\" [matTooltip]=\"actionName\" class=\"mat-primary\">\n <mat-icon>{{ icon }}</mat-icon>\n </button>\n }\n </a>\n</div>\n", styles: [".material-action-button{position:fixed;bottom:20px;right:20px;z-index:100;display:flex;flex-direction:column-reverse;align-items:center}.lift-higher{bottom:61px}.lift-higher-2{right:28px;bottom:121px}\n"] }]
82
- }], propDecorators: { actionName: [{
83
- type: Input
84
- }], id: [{
85
- type: Input
86
- }], icon: [{
87
- type: Input
88
- }], routerLink: [{
89
- type: Input
90
- }], liftHigher: [{
91
- type: Input
92
- }], liftHigher2: [{
93
- type: Input
94
- }] } });
83
+ args: [{ selector: 'mad-material-action-button', imports: [RouterLink, MatButtonModule, MatTooltipModule, MatIconModule], template: "<div class=\"material-action-button\" [class.lift-higher]=\"liftHigher()\" [class.lift-higher-2]=\"liftHigher2()\">\n @if (liftHigher2()) {\n <a\n mat-mini-fab\n class=\"mat-accent\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n } @else {\n <a\n mat-fab\n class=\"mat-primary\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n }\n</div>\n", styles: [".material-action-button{position:fixed;bottom:20px;right:20px;z-index:100;display:flex;flex-direction:column-reverse;align-items:center}.lift-higher{bottom:61px}.lift-higher-2{right:28px;bottom:121px}\n"] }]
84
+ }], propDecorators: { actionName: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionName", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], liftHigher: [{ type: i0.Input, args: [{ isSignal: true, alias: "liftHigher", required: false }] }], liftHigher2: [{ type: i0.Input, args: [{ isSignal: true, alias: "liftHigher2", required: false }] }] } });
95
85
 
96
86
  class MaterialActionButtonModule {
97
87
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MaterialActionButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -1550,6 +1540,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
1550
1540
  }]
1551
1541
  }] });
1552
1542
 
1543
+ /**
1544
+ * @deprecated Use `data-table` instead.
1545
+ */
1553
1546
  class TableComponent {
1554
1547
  constructor() {
1555
1548
  this.columns = [];
@@ -2932,7 +2925,7 @@ class DataTableComponent {
2932
2925
  return this.filter?.getActiveFilterCount() === 0;
2933
2926
  }
2934
2927
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DataTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$5.MatDialog }, { token: MAD_DATA_TABLE_PERSISTENCE_SERVICE }, { token: MAD_DATA_TABLE_GLOBAL_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Component }); }
2935
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: DataTableComponent, isStandalone: true, selector: "mad-data-table", inputs: { id: "id", filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", filterColumnsLabel: "filterColumnsLabel", filterColumnsPlaceHolder: "filterColumnsPlaceHolder", showEmptyTable: "showEmptyTable", noDataText: "noDataText", columnSettingsModalTitleLabel: "columnSettingsModalTitleLabel", selectedLabel: "selectedLabel", availableLabel: "availableLabel", saveLabel: "saveLabel", deleteLabel: "deleteLabel", cancelLabel: "cancelLabel", infoTextLabel: "infoTextLabel", tableClass: "tableClass", translateLabels: "translateLabels", useAsync: "useAsync", stateful: "stateful", persistenceConfig: "persistenceConfig", loading: "loading", tableData: "tableData", idGenerator: "idGenerator", parentIdGenerator: "parentIdGenerator", defaultSort: "defaultSort", externalFilter: "externalFilter", paginationEnabled: "paginationEnabled", page: "page", pageSizeOptions: "pageSizeOptions", actions: "actions", selectionEmitType: "selectionEmitType", showDeleteFilterAction: "showDeleteFilterAction", disableRowClick: "disableRowClick", deleteDefinitionAllowed: "deleteDefinitionAllowed", rowExpandable: "rowExpandable", selection: "selection", filterEnabled: "filterEnabled", filterMode: "filterMode", filterValue: "filterValue", externalPaginator: "externalPaginator", defaultPageSize: "defaultPageSize", selectionEmitMode: "selectionEmitMode", forceMode: "forceMode", forceSelectionMode: "forceSelectionMode", displayedColumns: "displayedColumns", displayedColumnDefinition: "displayedColumnDefinition", columnDefinitions: "columnDefinitions", allColumns: "allColumns" }, outputs: { actionEvent: "actionEvent", selectionEvent: "selectionEvent", sortEvent: "sortEvent", filterEvent: "filterEvent", pageEvent: "pageEvent", allColumnsEvent: "allColumnsEvent", columnDefinitionChangeEvent: "columnDefinitionChangeEvent", viewDefinitionChangeEvent: "viewDefinitionChangeEvent" }, providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], queries: [{ propertyName: "expandableDef", first: true, predicate: DataTableTemplateExpandableCellDefinition, descendants: true }, { propertyName: "columnDefs", predicate: DataTableTemplateColumnDefinition }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true }, { propertyName: "filter", first: true, predicate: DataTableFilter, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n @if (tableActions?.length || (filterMode === 'COLUMN_BASED' && showDeleteFilterAction)) {\n <div>\n @for (actionGroup of tableActions; track actionGroup) {\n <mad-button-group class=\"table-action-group\">\n @for (tableAction of actionGroup; track tableAction.type) {\n <mad-outline-button [hidden]=\"isHidden(tableAction)\" [disabled]=\"isDisabled(tableAction)\" (click)=\"onActionEvent(tableAction)\">\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n }\n </mad-button-group>\n }\n @if (filterMode === 'COLUMN_BASED' && showDeleteFilterAction) {\n <mad-button-group class=\"table-action-group\">\n <button\n mat-icon-button\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" matBadgeColor=\"warn\" [matBadge]=\"getFilterBadgeContent()\">\n filter_alt_off\n </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterMode === 'TABLE_BASED') {\n <mat-form-field data-cy=\"filter-input\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n }\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n @if (!isHidden(rowAction)) {\n <button\n data-cy=\"row-action-menu-button\"\n mat-menu-item\n class=\"row-action\"\n (click)=\"onRowEvent($event, element, rowAction)\"\n [disabled]=\"isDisabled(rowAction)\"\n >\n {{ translateLabels ? (rowAction.label | translate) : rowAction.label }}\n </button>\n }\n }\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of editableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onColumnSettings(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of viewableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onViewDefinition(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table -->\n@if (filterMode === 'COLUMN_BASED' || showEmptyTable || !!dataSource.filteredData?.length) {\n <div class=\"datatable\" [class]=\"tableClass\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n <table\n [id]=\"id\"\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"onSortingEvent($event)\"\n madFilter\n (madFilterChange)=\"onColumnBasedFilterEvent($event)\"\n [multiTemplateDataRows]=\"!!expandableDef\"\n >\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: master checkbox -->\n @if (selectionEmitMode !== 'NONE' && selectionMode === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: row checkbox -->\n @if (showCheckbox(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE: row action menu icon -->\n @if (showRowActionIcon(element) && hasVisibleRowActions(element)) {\n <mad-icon-button\n data-cy=\"row-action-button\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n (click)=\"onSelectionEvent(element.rowId)\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n }\n <!-- SINGLE: row radio button -->\n @if (showRadioButton(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-radio-button>\n </div>\n }\n <!-- EXPANDABLE: row is expandable/collapsable -->\n @if (showExpandableButton(element)) {\n <mad-icon-button (click)=\"onExpand($event, element)\">\n @if (expandedElement !== element) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n </mad-icon-button>\n }\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n @for (column of columns; track column.id) {\n <ng-container [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n @switch (getDataTableHeaderType(column)) {\n @case ('SORT') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('SORT_AND_FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @default {\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n }\n\n <!-- data cell to be injected -->\n <td\n mat-cell\n *matCellDef=\"let element\"\n [class.text-right]=\"column.isRightAligned\"\n [class.mad-dt-child-cell]=\"element.parentId\"\n (click)=\"!disableRowClick && onRowEvent($event, element)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n getCustomCellTemplate(column.id) || defaultCellTemplate;\n context: { column: column, element: element, $implicit: element }\n \"\n ></ng-container>\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n @if (!!expandableDef) {\n <ng-container [matColumnDef]=\"expandableColumnDef\">\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"columns.length + 1\">\n <div class=\"mad-data-table-expandable-area\" [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitMode !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIds\"\n (click)=\"!!expandableColumnDef && onExpand($event, row)\"\n ></tr>\n @if (!!expandableDef) {\n <tr mat-row *matRowDef=\"let element; columns: [expandableColumnDef]\" class=\"mad-data-table-expandable-row\"></tr>\n }\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell noDataText columnBasedFilter\" [attr.colspan]=\"columnIds.length\">\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </td>\n </tr>\n </table>\n </div>\n} @else {\n <!-- No data alert -->\n <div data-cy=\"no-data-block\" class=\"noDataText\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </div>\n}\n<div data-cy=\"table-bottom-area\" class=\"mad-data-table-bottom-area\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitions?.length === 1) {\n <mad-icon-button (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column settings: multiple definitions -->\n @if ((editableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column view: multiple definitions -->\n @if ((viewableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n }\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"paginationEnabled ? 'block' : 'none'\"\n [length]=\"pageLength\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- default cell template -->\n<ng-template #defaultCellTemplate let-element=\"element\" let-column=\"column\">\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\n</ng-template>\n\n<!-- custom cell templates injected from parent -->\n<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:column;min-height:112px;flex:1 1 auto;background-color:var(--datatable-background)}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{width:100%;max-height:100%}.datatable table th,.datatable table td{width:auto;text-overflow:ellipsis;white-space:nowrap}.datatable table th{overflow:visible}.datatable table td{overflow:hidden}.layout-fixed table{table-layout:fixed}.layout-fixed table th{font-weight:700}.layout-fixed table td{white-space:normal;word-wrap:break-word}.text-right{text-align:right!important;padding-right:24px!important}.table-action-group{display:inline-flex;vertical-align:middle;margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.noDataText.columnBasedFilter{padding-top:10px}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:var(--datatable-background);opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-expandable-row{height:0;display:contents;padding:0}.mad-data-table-expandable-row td{border-top-color:transparent;border-bottom-color:transparent}.mad-data-table-expandable-area{overflow:hidden;display:flex;width:100%}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:var(--datatable-background);z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:var(--mat-sys-on-surface);background-color:var(--datatable-hover)}.mad-dt-child-cell{color:var(--mat-sys-on-surface-variant)}.delete-filter-action{vertical-align:middle}::ng-deep .mat-sort-header .mat-sort-header-arrow:hover{color:var(--main-primary);cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$4.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i1$4.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: i7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i5.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i10.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i10.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i10.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i11.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["type", "disabled", "title", "color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: MadButtonGroupComponent, selector: "mad-button-group" }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i15.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i16.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i17.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: DataTableFilterHeader, selector: "th[mad-filter-header]", inputs: ["mad-filter-header", "madFilterColumnRightAligned", "madFilterOptions"] }, { kind: "directive", type: DataTableFilter, selector: "[madFilter]", outputs: ["madFilterChange"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i2$4.TranslatePipe, name: "translate" }], animations: [
2928
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: DataTableComponent, isStandalone: true, selector: "mad-data-table", inputs: { id: "id", filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", filterColumnsLabel: "filterColumnsLabel", filterColumnsPlaceHolder: "filterColumnsPlaceHolder", showEmptyTable: "showEmptyTable", noDataText: "noDataText", columnSettingsModalTitleLabel: "columnSettingsModalTitleLabel", selectedLabel: "selectedLabel", availableLabel: "availableLabel", saveLabel: "saveLabel", deleteLabel: "deleteLabel", cancelLabel: "cancelLabel", infoTextLabel: "infoTextLabel", tableClass: "tableClass", translateLabels: "translateLabels", useAsync: "useAsync", stateful: "stateful", persistenceConfig: "persistenceConfig", loading: "loading", tableData: "tableData", idGenerator: "idGenerator", parentIdGenerator: "parentIdGenerator", defaultSort: "defaultSort", externalFilter: "externalFilter", paginationEnabled: "paginationEnabled", page: "page", pageSizeOptions: "pageSizeOptions", actions: "actions", selectionEmitType: "selectionEmitType", showDeleteFilterAction: "showDeleteFilterAction", disableRowClick: "disableRowClick", deleteDefinitionAllowed: "deleteDefinitionAllowed", rowExpandable: "rowExpandable", selection: "selection", filterEnabled: "filterEnabled", filterMode: "filterMode", filterValue: "filterValue", externalPaginator: "externalPaginator", defaultPageSize: "defaultPageSize", selectionEmitMode: "selectionEmitMode", forceMode: "forceMode", forceSelectionMode: "forceSelectionMode", displayedColumns: "displayedColumns", displayedColumnDefinition: "displayedColumnDefinition", columnDefinitions: "columnDefinitions", allColumns: "allColumns" }, outputs: { actionEvent: "actionEvent", selectionEvent: "selectionEvent", sortEvent: "sortEvent", filterEvent: "filterEvent", pageEvent: "pageEvent", allColumnsEvent: "allColumnsEvent", columnDefinitionChangeEvent: "columnDefinitionChangeEvent", viewDefinitionChangeEvent: "viewDefinitionChangeEvent" }, providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], queries: [{ propertyName: "expandableDef", first: true, predicate: DataTableTemplateExpandableCellDefinition, descendants: true }, { propertyName: "columnDefs", predicate: DataTableTemplateColumnDefinition }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true }, { propertyName: "filter", first: true, predicate: DataTableFilter, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n @if (tableActions?.length || (filterMode === 'COLUMN_BASED' && showDeleteFilterAction)) {\n <div>\n @for (actionGroup of tableActions; track actionGroup) {\n <mad-button-group class=\"table-action-group\">\n @for (tableAction of actionGroup; track $index) {\n <mad-outline-button [hidden]=\"isHidden(tableAction)\" [disabled]=\"isDisabled(tableAction)\" (click)=\"onActionEvent(tableAction)\">\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n }\n </mad-button-group>\n }\n @if (filterMode === 'COLUMN_BASED' && showDeleteFilterAction) {\n <mad-button-group class=\"table-action-group\">\n <button\n mat-icon-button\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" matBadgeColor=\"warn\" [matBadge]=\"getFilterBadgeContent()\">\n filter_alt_off\n </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterMode === 'TABLE_BASED') {\n <mat-form-field data-cy=\"filter-input\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n }\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n @if (!isHidden(rowAction)) {\n <button\n data-cy=\"row-action-menu-button\"\n mat-menu-item\n class=\"row-action\"\n (click)=\"onRowEvent($event, element, rowAction)\"\n [disabled]=\"isDisabled(rowAction)\"\n >\n {{ translateLabels ? (rowAction.label | translate) : rowAction.label }}\n </button>\n }\n }\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of editableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onColumnSettings(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of viewableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onViewDefinition(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table -->\n@if (filterMode === 'COLUMN_BASED' || showEmptyTable || !!dataSource.filteredData?.length) {\n <div class=\"datatable\" [class]=\"tableClass\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n <table\n [id]=\"id\"\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"onSortingEvent($event)\"\n madFilter\n (madFilterChange)=\"onColumnBasedFilterEvent($event)\"\n [multiTemplateDataRows]=\"!!expandableDef\"\n >\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: master checkbox -->\n @if (selectionEmitMode !== 'NONE' && selectionMode === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: row checkbox -->\n @if (showCheckbox(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE: row action menu icon -->\n @if (showRowActionIcon(element) && hasVisibleRowActions(element)) {\n <mad-icon-button\n data-cy=\"row-action-button\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n (click)=\"onSelectionEvent(element.rowId)\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n }\n <!-- SINGLE: row radio button -->\n @if (showRadioButton(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-radio-button>\n </div>\n }\n <!-- EXPANDABLE: row is expandable/collapsable -->\n @if (showExpandableButton(element)) {\n <mad-icon-button (click)=\"onExpand($event, element)\">\n @if (expandedElement !== element) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n </mad-icon-button>\n }\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n @for (column of columns; track column.id) {\n <ng-container [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n @switch (getDataTableHeaderType(column)) {\n @case ('SORT') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('SORT_AND_FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @default {\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n }\n\n <!-- data cell to be injected -->\n <td\n mat-cell\n *matCellDef=\"let element\"\n [class.text-right]=\"column.isRightAligned\"\n [class.mad-dt-child-cell]=\"element.parentId\"\n (click)=\"!disableRowClick && onRowEvent($event, element)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n getCustomCellTemplate(column.id) || defaultCellTemplate;\n context: { column: column, element: element, $implicit: element }\n \"\n ></ng-container>\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n @if (!!expandableDef) {\n <ng-container [matColumnDef]=\"expandableColumnDef\">\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"columns.length + 1\">\n <div class=\"mad-data-table-expandable-area\" [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitMode !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIds\"\n (click)=\"!!expandableColumnDef && onExpand($event, row)\"\n ></tr>\n @if (!!expandableDef) {\n <tr mat-row *matRowDef=\"let element; columns: [expandableColumnDef]\" class=\"mad-data-table-expandable-row\"></tr>\n }\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell noDataText columnBasedFilter\" [attr.colspan]=\"columnIds.length\">\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </td>\n </tr>\n </table>\n </div>\n} @else {\n <!-- No data alert -->\n <div data-cy=\"no-data-block\" class=\"noDataText\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </div>\n}\n<div data-cy=\"table-bottom-area\" class=\"mad-data-table-bottom-area\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitions?.length === 1) {\n <mad-icon-button (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column settings: multiple definitions -->\n @if ((editableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column view: multiple definitions -->\n @if ((viewableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n }\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"paginationEnabled ? 'block' : 'none'\"\n [length]=\"pageLength\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- default cell template -->\n<ng-template #defaultCellTemplate let-element=\"element\" let-column=\"column\">\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\n</ng-template>\n\n<!-- custom cell templates injected from parent -->\n<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:column;min-height:112px;flex:1 1 auto;background-color:var(--datatable-background)}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{width:100%;max-height:100%}.datatable table th,.datatable table td{width:auto;text-overflow:ellipsis;white-space:nowrap}.datatable table th{overflow:visible}.datatable table td{overflow:hidden}.layout-fixed table{table-layout:fixed}.layout-fixed table th{font-weight:700}.layout-fixed table td{white-space:normal;word-wrap:break-word}.text-right{text-align:right!important;padding-right:24px!important}.table-action-group{display:inline-flex;vertical-align:middle;margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.noDataText.columnBasedFilter{padding-top:10px}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:var(--datatable-background);opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-expandable-row{height:0;display:contents;padding:0}.mad-data-table-expandable-row td{border-top-color:transparent;border-bottom-color:transparent}.mad-data-table-expandable-area{overflow:hidden;display:flex;width:100%}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:var(--datatable-background);z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:var(--mat-sys-on-surface);background-color:var(--datatable-hover)}.mad-dt-child-cell{color:var(--mat-sys-on-surface-variant)}.delete-filter-action{vertical-align:middle}::ng-deep .mat-sort-header .mat-sort-header-arrow:hover{color:var(--main-primary);cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$4.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i1$4.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: i7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i5.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i10.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i10.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i10.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i11.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["type", "disabled", "title", "color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: MadButtonGroupComponent, selector: "mad-button-group" }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i15.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i16.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i17.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: DataTableFilterHeader, selector: "th[mad-filter-header]", inputs: ["mad-filter-header", "madFilterColumnRightAligned", "madFilterOptions"] }, { kind: "directive", type: DataTableFilter, selector: "[madFilter]", outputs: ["madFilterChange"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i2$4.TranslatePipe, name: "translate" }], animations: [
2936
2929
  trigger('detailExpand', [
2937
2930
  state('collapsed,void', style({ height: '0px', minHeight: '0' })),
2938
2931
  state('expanded', style({ height: '*' })),
@@ -2969,7 +2962,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
2969
2962
  DataTableFilterHeader,
2970
2963
  DataTableFilter,
2971
2964
  MatTooltip,
2972
- ], providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n @if (tableActions?.length || (filterMode === 'COLUMN_BASED' && showDeleteFilterAction)) {\n <div>\n @for (actionGroup of tableActions; track actionGroup) {\n <mad-button-group class=\"table-action-group\">\n @for (tableAction of actionGroup; track tableAction.type) {\n <mad-outline-button [hidden]=\"isHidden(tableAction)\" [disabled]=\"isDisabled(tableAction)\" (click)=\"onActionEvent(tableAction)\">\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n }\n </mad-button-group>\n }\n @if (filterMode === 'COLUMN_BASED' && showDeleteFilterAction) {\n <mad-button-group class=\"table-action-group\">\n <button\n mat-icon-button\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" matBadgeColor=\"warn\" [matBadge]=\"getFilterBadgeContent()\">\n filter_alt_off\n </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterMode === 'TABLE_BASED') {\n <mat-form-field data-cy=\"filter-input\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n }\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n @if (!isHidden(rowAction)) {\n <button\n data-cy=\"row-action-menu-button\"\n mat-menu-item\n class=\"row-action\"\n (click)=\"onRowEvent($event, element, rowAction)\"\n [disabled]=\"isDisabled(rowAction)\"\n >\n {{ translateLabels ? (rowAction.label | translate) : rowAction.label }}\n </button>\n }\n }\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of editableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onColumnSettings(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of viewableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onViewDefinition(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table -->\n@if (filterMode === 'COLUMN_BASED' || showEmptyTable || !!dataSource.filteredData?.length) {\n <div class=\"datatable\" [class]=\"tableClass\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n <table\n [id]=\"id\"\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"onSortingEvent($event)\"\n madFilter\n (madFilterChange)=\"onColumnBasedFilterEvent($event)\"\n [multiTemplateDataRows]=\"!!expandableDef\"\n >\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: master checkbox -->\n @if (selectionEmitMode !== 'NONE' && selectionMode === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: row checkbox -->\n @if (showCheckbox(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE: row action menu icon -->\n @if (showRowActionIcon(element) && hasVisibleRowActions(element)) {\n <mad-icon-button\n data-cy=\"row-action-button\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n (click)=\"onSelectionEvent(element.rowId)\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n }\n <!-- SINGLE: row radio button -->\n @if (showRadioButton(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-radio-button>\n </div>\n }\n <!-- EXPANDABLE: row is expandable/collapsable -->\n @if (showExpandableButton(element)) {\n <mad-icon-button (click)=\"onExpand($event, element)\">\n @if (expandedElement !== element) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n </mad-icon-button>\n }\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n @for (column of columns; track column.id) {\n <ng-container [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n @switch (getDataTableHeaderType(column)) {\n @case ('SORT') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('SORT_AND_FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @default {\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n }\n\n <!-- data cell to be injected -->\n <td\n mat-cell\n *matCellDef=\"let element\"\n [class.text-right]=\"column.isRightAligned\"\n [class.mad-dt-child-cell]=\"element.parentId\"\n (click)=\"!disableRowClick && onRowEvent($event, element)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n getCustomCellTemplate(column.id) || defaultCellTemplate;\n context: { column: column, element: element, $implicit: element }\n \"\n ></ng-container>\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n @if (!!expandableDef) {\n <ng-container [matColumnDef]=\"expandableColumnDef\">\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"columns.length + 1\">\n <div class=\"mad-data-table-expandable-area\" [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitMode !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIds\"\n (click)=\"!!expandableColumnDef && onExpand($event, row)\"\n ></tr>\n @if (!!expandableDef) {\n <tr mat-row *matRowDef=\"let element; columns: [expandableColumnDef]\" class=\"mad-data-table-expandable-row\"></tr>\n }\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell noDataText columnBasedFilter\" [attr.colspan]=\"columnIds.length\">\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </td>\n </tr>\n </table>\n </div>\n} @else {\n <!-- No data alert -->\n <div data-cy=\"no-data-block\" class=\"noDataText\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </div>\n}\n<div data-cy=\"table-bottom-area\" class=\"mad-data-table-bottom-area\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitions?.length === 1) {\n <mad-icon-button (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column settings: multiple definitions -->\n @if ((editableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column view: multiple definitions -->\n @if ((viewableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n }\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"paginationEnabled ? 'block' : 'none'\"\n [length]=\"pageLength\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- default cell template -->\n<ng-template #defaultCellTemplate let-element=\"element\" let-column=\"column\">\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\n</ng-template>\n\n<!-- custom cell templates injected from parent -->\n<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:column;min-height:112px;flex:1 1 auto;background-color:var(--datatable-background)}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{width:100%;max-height:100%}.datatable table th,.datatable table td{width:auto;text-overflow:ellipsis;white-space:nowrap}.datatable table th{overflow:visible}.datatable table td{overflow:hidden}.layout-fixed table{table-layout:fixed}.layout-fixed table th{font-weight:700}.layout-fixed table td{white-space:normal;word-wrap:break-word}.text-right{text-align:right!important;padding-right:24px!important}.table-action-group{display:inline-flex;vertical-align:middle;margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.noDataText.columnBasedFilter{padding-top:10px}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:var(--datatable-background);opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-expandable-row{height:0;display:contents;padding:0}.mad-data-table-expandable-row td{border-top-color:transparent;border-bottom-color:transparent}.mad-data-table-expandable-area{overflow:hidden;display:flex;width:100%}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:var(--datatable-background);z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:var(--mat-sys-on-surface);background-color:var(--datatable-hover)}.mad-dt-child-cell{color:var(--mat-sys-on-surface-variant)}.delete-filter-action{vertical-align:middle}::ng-deep .mat-sort-header .mat-sort-header-arrow:hover{color:var(--main-primary);cursor:pointer}\n"] }]
2965
+ ], providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n @if (tableActions?.length || (filterMode === 'COLUMN_BASED' && showDeleteFilterAction)) {\n <div>\n @for (actionGroup of tableActions; track actionGroup) {\n <mad-button-group class=\"table-action-group\">\n @for (tableAction of actionGroup; track $index) {\n <mad-outline-button [hidden]=\"isHidden(tableAction)\" [disabled]=\"isDisabled(tableAction)\" (click)=\"onActionEvent(tableAction)\">\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n }\n </mad-button-group>\n }\n @if (filterMode === 'COLUMN_BASED' && showDeleteFilterAction) {\n <mad-button-group class=\"table-action-group\">\n <button\n mat-icon-button\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" matBadgeColor=\"warn\" [matBadge]=\"getFilterBadgeContent()\">\n filter_alt_off\n </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterMode === 'TABLE_BASED') {\n <mat-form-field data-cy=\"filter-input\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n }\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n @if (!isHidden(rowAction)) {\n <button\n data-cy=\"row-action-menu-button\"\n mat-menu-item\n class=\"row-action\"\n (click)=\"onRowEvent($event, element, rowAction)\"\n [disabled]=\"isDisabled(rowAction)\"\n >\n {{ translateLabels ? (rowAction.label | translate) : rowAction.label }}\n </button>\n }\n }\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of editableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onColumnSettings(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of viewableColumnDefinitions; track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onViewDefinition(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table -->\n@if (filterMode === 'COLUMN_BASED' || showEmptyTable || !!dataSource.filteredData?.length) {\n <div class=\"datatable\" [class]=\"tableClass\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n <table\n [id]=\"id\"\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"onSortingEvent($event)\"\n madFilter\n (madFilterChange)=\"onColumnBasedFilterEvent($event)\"\n [multiTemplateDataRows]=\"!!expandableDef\"\n >\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: master checkbox -->\n @if (selectionEmitMode !== 'NONE' && selectionMode === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: row checkbox -->\n @if (showCheckbox(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE: row action menu icon -->\n @if (showRowActionIcon(element) && hasVisibleRowActions(element)) {\n <mad-icon-button\n data-cy=\"row-action-button\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n (click)=\"onSelectionEvent(element.rowId)\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n }\n <!-- SINGLE: row radio button -->\n @if (showRadioButton(element)) {\n <div class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-radio-button>\n </div>\n }\n <!-- EXPANDABLE: row is expandable/collapsable -->\n @if (showExpandableButton(element)) {\n <mad-icon-button (click)=\"onExpand($event, element)\">\n @if (expandedElement !== element) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n </mad-icon-button>\n }\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n @for (column of columns; track column.id) {\n <ng-container [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n @switch (getDataTableHeaderType(column)) {\n @case ('SORT') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('SORT_AND_FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n @default {\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n }\n }\n\n <!-- data cell to be injected -->\n <td\n mat-cell\n *matCellDef=\"let element\"\n [class.text-right]=\"column.isRightAligned\"\n [class.mad-dt-child-cell]=\"element.parentId\"\n (click)=\"!disableRowClick && onRowEvent($event, element)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n getCustomCellTemplate(column.id) || defaultCellTemplate;\n context: { column: column, element: element, $implicit: element }\n \"\n ></ng-container>\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n @if (!!expandableDef) {\n <ng-container [matColumnDef]=\"expandableColumnDef\">\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"columns.length + 1\">\n <div class=\"mad-data-table-expandable-area\" [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitMode !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIds\"\n (click)=\"!!expandableColumnDef && onExpand($event, row)\"\n ></tr>\n @if (!!expandableDef) {\n <tr mat-row *matRowDef=\"let element; columns: [expandableColumnDef]\" class=\"mad-data-table-expandable-row\"></tr>\n }\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell noDataText columnBasedFilter\" [attr.colspan]=\"columnIds.length\">\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </td>\n </tr>\n </table>\n </div>\n} @else {\n <!-- No data alert -->\n <div data-cy=\"no-data-block\" class=\"noDataText\">\n @if (loading) {\n <div class=\"mad-datatable-spinner-wrapper\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </div>\n}\n<div data-cy=\"table-bottom-area\" class=\"mad-data-table-bottom-area\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitions?.length === 1) {\n <mad-icon-button (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column settings: multiple definitions -->\n @if ((editableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n }\n <!-- column view: multiple definitions -->\n @if ((viewableColumnDefinitions?.length || 0) > 0) {\n <mad-icon-button [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n }\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"paginationEnabled ? 'block' : 'none'\"\n [length]=\"pageLength\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- default cell template -->\n<ng-template #defaultCellTemplate let-element=\"element\" let-column=\"column\">\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\n</ng-template>\n\n<!-- custom cell templates injected from parent -->\n<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:column;min-height:112px;flex:1 1 auto;background-color:var(--datatable-background)}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{width:100%;max-height:100%}.datatable table th,.datatable table td{width:auto;text-overflow:ellipsis;white-space:nowrap}.datatable table th{overflow:visible}.datatable table td{overflow:hidden}.layout-fixed table{table-layout:fixed}.layout-fixed table th{font-weight:700}.layout-fixed table td{white-space:normal;word-wrap:break-word}.text-right{text-align:right!important;padding-right:24px!important}.table-action-group{display:inline-flex;vertical-align:middle;margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.noDataText.columnBasedFilter{padding-top:10px}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:var(--datatable-background);opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-expandable-row{height:0;display:contents;padding:0}.mad-data-table-expandable-row td{border-top-color:transparent;border-bottom-color:transparent}.mad-data-table-expandable-area{overflow:hidden;display:flex;width:100%}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:var(--datatable-background);z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:var(--mat-sys-on-surface);background-color:var(--datatable-hover)}.mad-dt-child-cell{color:var(--mat-sys-on-surface-variant)}.delete-filter-action{vertical-align:middle}::ng-deep .mat-sort-header .mat-sort-header-arrow:hover{color:var(--main-primary);cursor:pointer}\n"] }]
2973
2966
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$5.MatDialog }, { type: DataTablePersistenceService, decorators: [{
2974
2967
  type: Inject,
2975
2968
  args: [MAD_DATA_TABLE_PERSISTENCE_SERVICE]
@@ -4059,92 +4052,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
4059
4052
  }]
4060
4053
  }] });
4061
4054
 
4062
- class DragAndDropDirectiveDirective {
4055
+ class DragAndDropDirective {
4063
4056
  constructor() {
4064
- this.onFileDropped = new EventEmitter();
4065
- this.background = '$background-color';
4057
+ this.backgroundColor = '$background-color';
4066
4058
  this.opacity = '1';
4059
+ this.onFileDropped = output();
4067
4060
  }
4068
- //Dragover listener
4069
4061
  onDragOver(event) {
4070
4062
  event.preventDefault();
4071
4063
  event.stopPropagation();
4072
- this.background = '$selection-background';
4064
+ this.backgroundColor = '$selection-background';
4073
4065
  this.opacity = '0.8';
4074
4066
  }
4075
- //Dragleave listener
4076
4067
  onDragLeave(event) {
4077
4068
  event.preventDefault();
4078
4069
  event.stopPropagation();
4079
- this.background = '$background-color';
4080
- this.opacity = '1';
4070
+ this.resetStyles();
4081
4071
  }
4082
- //Drop listener
4083
- ondrop(event) {
4072
+ onDrop(event) {
4084
4073
  event.preventDefault();
4085
4074
  event.stopPropagation();
4086
- this.background = '$background-color';
4087
- this.opacity = '1';
4088
- let files = event.dataTransfer.files;
4089
- if (files.length > 0) {
4075
+ this.resetStyles();
4076
+ const files = event.dataTransfer?.files;
4077
+ if (files?.length > 0) {
4090
4078
  this.onFileDropped.emit(files);
4091
4079
  }
4092
4080
  }
4093
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DragAndDropDirectiveDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4094
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: DragAndDropDirectiveDirective, isStandalone: true, selector: "[madDragAndDrop]", outputs: { onFileDropped: "onFileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "style.background-color": "this.background", "style.opacity": "this.opacity" } }, ngImport: i0 }); }
4081
+ resetStyles() {
4082
+ this.backgroundColor = '$background-color';
4083
+ this.opacity = '1';
4084
+ }
4085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DragAndDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4086
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: DragAndDropDirective, isStandalone: true, selector: "[madDragAndDrop]", outputs: { onFileDropped: "onFileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "style.background-color": "this.backgroundColor", "style.opacity": "this.opacity" } }, ngImport: i0 }); }
4095
4087
  }
4096
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DragAndDropDirectiveDirective, decorators: [{
4088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DragAndDropDirective, decorators: [{
4097
4089
  type: Directive,
4098
4090
  args: [{
4099
4091
  selector: '[madDragAndDrop]',
4100
- standalone: true,
4101
4092
  }]
4102
- }], propDecorators: { onFileDropped: [{
4103
- type: Output
4104
- }], background: [{
4093
+ }], propDecorators: { backgroundColor: [{
4105
4094
  type: HostBinding,
4106
4095
  args: ['style.background-color']
4107
4096
  }], opacity: [{
4108
4097
  type: HostBinding,
4109
4098
  args: ['style.opacity']
4110
- }], onDragOver: [{
4099
+ }], onFileDropped: [{ type: i0.Output, args: ["onFileDropped"] }], onDragOver: [{
4111
4100
  type: HostListener,
4112
4101
  args: ['dragover', ['$event']]
4113
4102
  }], onDragLeave: [{
4114
4103
  type: HostListener,
4115
4104
  args: ['dragleave', ['$event']]
4116
- }], ondrop: [{
4105
+ }], onDrop: [{
4117
4106
  type: HostListener,
4118
4107
  args: ['drop', ['$event']]
4119
4108
  }] } });
4120
4109
 
4121
4110
  class FileUploadComponent {
4122
4111
  constructor() {
4123
- this.showFileList = false;
4124
- this.removable = true;
4125
- this.fileEmitter = new EventEmitter();
4126
- this.errorEmitter = new EventEmitter();
4127
- this.fileList = [];
4128
- this.acceptedFileTypes = [];
4129
- }
4130
- ngOnInit() {
4131
- this.setAcceptedFileTypes();
4132
- }
4133
- setAcceptedFileTypes() {
4134
- if (this.accept?.length) {
4135
- this.acceptedFileTypes = this.accept.map((ext) => `.${ext.toLowerCase()}`);
4136
- }
4112
+ this.id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
4113
+ this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
4114
+ this.accept = input([], ...(ngDevMode ? [{ debugName: "accept" }] : []));
4115
+ this.text = input('', ...(ngDevMode ? [{ debugName: "text" }] : []));
4116
+ this.showFileList = input(false, ...(ngDevMode ? [{ debugName: "showFileList" }] : []));
4117
+ this.removable = input(true, ...(ngDevMode ? [{ debugName: "removable" }] : []));
4118
+ this.fileEmitter = output();
4119
+ this.errorEmitter = output();
4120
+ this.fileList = signal([], ...(ngDevMode ? [{ debugName: "fileList" }] : []));
4121
+ this.acceptedFileTypes = computed(() => this.accept().map((ext) => `.${ext.toLowerCase()}`), ...(ngDevMode ? [{ debugName: "acceptedFileTypes" }] : []));
4122
+ this.acceptAttribute = computed(() => this.acceptedFileTypes().join(','), ...(ngDevMode ? [{ debugName: "acceptAttribute" }] : []));
4123
+ this.hasSingleFile = computed(() => !this.multiple() && this.fileList().length === 1, ...(ngDevMode ? [{ debugName: "hasSingleFile" }] : []));
4124
+ this.uploadLabel = computed(() => this.text() || 'Upload', ...(ngDevMode ? [{ debugName: "uploadLabel" }] : []));
4137
4125
  }
4138
4126
  uploadFile(files) {
4127
+ if (!files) {
4128
+ return;
4129
+ }
4139
4130
  const fileArray = Array.from(files);
4140
4131
  if (!this.validateFileList(fileArray)) {
4141
4132
  return;
4142
4133
  }
4143
4134
  this.addFiles(fileArray);
4144
- this.fileEmitter.emit(this.createFileListFromArray(this.fileList));
4135
+ this.fileEmitter.emit(this.createFileListFromArray(this.fileList()));
4136
+ }
4137
+ openFile(file) {
4138
+ window.open(window.URL.createObjectURL(file));
4139
+ }
4140
+ remove(file) {
4141
+ this.fileList.update((files) => files.filter((existingFile) => existingFile !== file));
4142
+ this.fileEmitter.emit(this.createFileListFromArray(this.fileList()));
4145
4143
  }
4146
4144
  validateFileList(fileArray) {
4147
- if (!this.multiple && fileArray.length > 1) {
4145
+ if (!this.multiple() && fileArray.length > 1) {
4148
4146
  this.emitError('ONLY_SINGLE_FILE');
4149
4147
  return false;
4150
4148
  }
@@ -4160,55 +4158,70 @@ class FileUploadComponent {
4160
4158
  this.errorEmitter.emit(errorType);
4161
4159
  }
4162
4160
  isAcceptedFileType(fileName) {
4161
+ const acceptedTypes = this.acceptedFileTypes();
4162
+ if (!acceptedTypes.length) {
4163
+ return true;
4164
+ }
4163
4165
  const fileExtension = fileName.split('.').pop()?.toLowerCase();
4164
- return this.acceptedFileTypes.includes(`.${fileExtension}`);
4166
+ if (!fileExtension) {
4167
+ return false;
4168
+ }
4169
+ return acceptedTypes.includes(`.${fileExtension}`);
4165
4170
  }
4166
4171
  addFiles(fileArray) {
4167
- if (!this.multiple) {
4168
- this.fileList = [];
4172
+ if (!this.multiple()) {
4173
+ this.fileList.set(fileArray);
4174
+ return;
4169
4175
  }
4170
- this.fileList.push(...fileArray);
4171
- }
4172
- openFile(file) {
4173
- window.open(window.URL.createObjectURL(file));
4174
- }
4175
- remove(file) {
4176
- this.fileList = this.fileList.filter((f) => f !== file);
4177
- this.fileEmitter.emit(this.createFileListFromArray(this.fileList));
4176
+ this.fileList.update((files) => [...files, ...fileArray]);
4178
4177
  }
4179
4178
  createFileListFromArray(files) {
4180
4179
  const dataTransfer = new DataTransfer();
4181
4180
  files.forEach((file) => dataTransfer.items.add(file));
4182
4181
  return dataTransfer.files;
4183
4182
  }
4184
- hasSingleFile() {
4185
- return !this.multiple && this.fileList.length === 1;
4186
- }
4187
4183
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4188
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: FileUploadComponent, isStandalone: true, selector: "mad-file-upload", inputs: { id: "id", multiple: "multiple", accept: "accept", text: "text", showFileList: "showFileList", removable: "removable" }, outputs: { fileEmitter: "fileEmitter", errorEmitter: "errorEmitter" }, ngImport: i0, template: "<mat-card\n (click)=\"fileInput.click()\"\n (onFileDropped)=\"uploadFile($event)\"\n class=\"uploadFileContainer\"\n madDragAndDrop\n id=\"uploadFileContainer\"\n>\n <input\n #fileInput\n (change)=\"uploadFile($event.target.files)\"\n (click)=\"fileInput.value = null\"\n [accept]=\"acceptedFileTypes\"\n [id]=\"id\"\n [multiple]=\"multiple\"\n hidden\n type=\"file\"\n />\n <mat-card-content>\n @if (hasSingleFile()) {\n {{ fileList[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ text ? text : 'Upload' }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList) {\n <mat-chip-listbox>\n @for (file of fileList; track file) {\n <mat-chip (click)=\"openFile(file)\" class=\"download\" [removable]=\"removable\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".uploadFileContainer{background-repeat:no-repeat;background-position:center;height:100px;margin:0;border:2px dashed var(--main-primary)}.uploadFileContainer:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.uploadFileContainer,.mat-mdc-card-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: DragAndDropDirectiveDirective, selector: "[madDragAndDrop]", outputs: ["onFileDropped"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i3$2.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: i3$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i3$2.MatChipRemove, selector: "[matChipRemove]" }] }); }
4184
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: FileUploadComponent, isStandalone: true, selector: "mad-file-upload", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, showFileList: { classPropertyName: "showFileList", publicName: "showFileList", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileEmitter: "fileEmitter", errorEmitter: "errorEmitter" }, ngImport: i0, template: "<mat-card\n id=\"uploadFileContainer\"\n class=\"upload-file-container\"\n (click)=\"fileInput.click()\"\n madDragAndDrop\n (onFileDropped)=\"uploadFile($event)\"\n>\n <input\n #fileInput\n hidden\n type=\"file\"\n [id]=\"id()\"\n [multiple]=\"multiple()\"\n [accept]=\"acceptAttribute()\"\n (change)=\"uploadFile(fileInput.files)\"\n (click)=\"fileInput.value = ''\"\n />\n <mat-card-content class=\"upload-file-content\">\n @if (hasSingleFile()) {\n {{ fileList()[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ uploadLabel() }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList()) {\n <mat-chip-listbox>\n @for (file of fileList(); track file) {\n <mat-chip class=\"download\" (click)=\"openFile(file)\" [removable]=\"removable()\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable()) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".upload-file-container{height:100px;margin:0;border:2px dashed var(--main-primary);background-repeat:no-repeat;background-position:center}.upload-file-container:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.upload-file-container,.upload-file-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: DragAndDropDirective, selector: "[madDragAndDrop]", outputs: ["onFileDropped"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i3$2.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: i3$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i3$2.MatChipRemove, selector: "[matChipRemove]" }] }); }
4189
4185
  }
4190
4186
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: FileUploadComponent, decorators: [{
4191
4187
  type: Component,
4192
- args: [{ selector: 'mad-file-upload', imports: [MatCardModule, MatIconModule, ButtonModule, TranslateModule, DragAndDropDirectiveDirective, MatChipsModule], template: "<mat-card\n (click)=\"fileInput.click()\"\n (onFileDropped)=\"uploadFile($event)\"\n class=\"uploadFileContainer\"\n madDragAndDrop\n id=\"uploadFileContainer\"\n>\n <input\n #fileInput\n (change)=\"uploadFile($event.target.files)\"\n (click)=\"fileInput.value = null\"\n [accept]=\"acceptedFileTypes\"\n [id]=\"id\"\n [multiple]=\"multiple\"\n hidden\n type=\"file\"\n />\n <mat-card-content>\n @if (hasSingleFile()) {\n {{ fileList[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ text ? text : 'Upload' }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList) {\n <mat-chip-listbox>\n @for (file of fileList; track file) {\n <mat-chip (click)=\"openFile(file)\" class=\"download\" [removable]=\"removable\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".uploadFileContainer{background-repeat:no-repeat;background-position:center;height:100px;margin:0;border:2px dashed var(--main-primary)}.uploadFileContainer:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.uploadFileContainer,.mat-mdc-card-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"] }]
4193
- }], propDecorators: { id: [{
4194
- type: Input
4195
- }], multiple: [{
4196
- type: Input
4197
- }], accept: [{
4198
- type: Input
4199
- }], text: [{
4200
- type: Input
4201
- }], showFileList: [{
4202
- type: Input
4203
- }], removable: [{
4204
- type: Input
4205
- }], fileEmitter: [{
4206
- type: Output
4207
- }], errorEmitter: [{
4208
- type: Output
4209
- }] } });
4188
+ args: [{ selector: 'mad-file-upload', imports: [MatCardModule, MatIconModule, ButtonModule, TranslateModule, DragAndDropDirective, MatChipsModule], template: "<mat-card\n id=\"uploadFileContainer\"\n class=\"upload-file-container\"\n (click)=\"fileInput.click()\"\n madDragAndDrop\n (onFileDropped)=\"uploadFile($event)\"\n>\n <input\n #fileInput\n hidden\n type=\"file\"\n [id]=\"id()\"\n [multiple]=\"multiple()\"\n [accept]=\"acceptAttribute()\"\n (change)=\"uploadFile(fileInput.files)\"\n (click)=\"fileInput.value = ''\"\n />\n <mat-card-content class=\"upload-file-content\">\n @if (hasSingleFile()) {\n {{ fileList()[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ uploadLabel() }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList()) {\n <mat-chip-listbox>\n @for (file of fileList(); track file) {\n <mat-chip class=\"download\" (click)=\"openFile(file)\" [removable]=\"removable()\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable()) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".upload-file-container{height:100px;margin:0;border:2px dashed var(--main-primary);background-repeat:no-repeat;background-position:center}.upload-file-container:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.upload-file-container,.upload-file-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"] }]
4189
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], showFileList: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFileList", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], fileEmitter: [{ type: i0.Output, args: ["fileEmitter"] }], errorEmitter: [{ type: i0.Output, args: ["errorEmitter"] }] } });
4190
+
4191
+ class TileComponent {
4192
+ constructor() {
4193
+ this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
4194
+ this.variant = input('info', ...(ngDevMode ? [{ debugName: "variant" }] : []));
4195
+ this.size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
4196
+ /** Optional Material icon name */
4197
+ this.icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : []));
4198
+ /** Icon position relative to label */
4199
+ this.iconPosition = input('start', ...(ngDevMode ? [{ debugName: "iconPosition" }] : []));
4200
+ }
4201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4202
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: TileComponent, isStandalone: true, selector: "mad-tile", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
4203
+ }
4204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TileComponent, decorators: [{
4205
+ type: Component,
4206
+ args: [{ selector: 'mad-tile', imports: [MatIcon], template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"] }]
4207
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }] } });
4208
+
4209
+ class BreadcrumbComponent {
4210
+ constructor() {
4211
+ this.breadcrumbs = input.required(...(ngDevMode ? [{ debugName: "breadcrumbs" }] : []));
4212
+ this.showCopy = input(false, ...(ngDevMode ? [{ debugName: "showCopy" }] : []));
4213
+ this.title = input('Copy', ...(ngDevMode ? [{ debugName: "title" }] : []));
4214
+ this.copy = output();
4215
+ }
4216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4217
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: BreadcrumbComponent, isStandalone: true, selector: "mad-breadcrumb", inputs: { breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: true, transformFunction: null }, showCopy: { classPropertyName: "showCopy", publicName: "showCopy", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copy: "copy" }, ngImport: i0, template: "@if (breadcrumbs().length) {\n <div class=\"breadcrumb\">\n <nav data-cy=\"breadcrumb-nav\" class=\"breadcrumb__nav\">\n @for (crumb of breadcrumbs(); track crumb.label; let last = $last) {\n @if (crumb.route?.length) {\n <a data-cy=\"breadcrumb-link\" [routerLink]=\"crumb.route\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else if (crumb.href?.length) {\n <a data-cy=\"breadcrumb-link\" [href]=\"crumb.href\" target=\"_blank\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else {\n <span data-cy=\"breadcrumb-current\" class=\"breadcrumb__current\">{{ crumb.label }}</span>\n }\n @if (!last) {\n <span data-cy=\"breadcrumb-separator\" class=\"breadcrumb__separator\">/</span>\n }\n }\n </nav>\n @if (showCopy()) {\n <mad-icon-button\n data-cy=\"breadcrumb-copy\"\n class=\"breadcrumb__copy\"\n (click)=\"copy.emit()\"\n [matTooltip]=\"title()\"\n matTooltipPosition=\"above\"\n >\n <mat-icon>content_copy</mat-icon>\n </mad-icon-button>\n }\n </div>\n}\n", styles: [".breadcrumb{display:flex;align-items:center;gap:.5rem}.breadcrumb__nav{display:flex;align-items:center;gap:.625rem;min-height:3.5rem;padding-block:.25rem;font-size:.875rem;line-height:1.25rem}.breadcrumb__link{color:var(--main-primary);text-decoration:none}.breadcrumb__link:hover{text-decoration:underline}.breadcrumb__current,.breadcrumb__separator{color:var(--breadcrumb-separator-color)}.breadcrumb__copy{flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
4218
+ }
4219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: BreadcrumbComponent, decorators: [{
4220
+ type: Component,
4221
+ args: [{ selector: 'mad-breadcrumb', imports: [RouterLink, IconButtonComponent, MatIcon, MatTooltip], template: "@if (breadcrumbs().length) {\n <div class=\"breadcrumb\">\n <nav data-cy=\"breadcrumb-nav\" class=\"breadcrumb__nav\">\n @for (crumb of breadcrumbs(); track crumb.label; let last = $last) {\n @if (crumb.route?.length) {\n <a data-cy=\"breadcrumb-link\" [routerLink]=\"crumb.route\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else if (crumb.href?.length) {\n <a data-cy=\"breadcrumb-link\" [href]=\"crumb.href\" target=\"_blank\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else {\n <span data-cy=\"breadcrumb-current\" class=\"breadcrumb__current\">{{ crumb.label }}</span>\n }\n @if (!last) {\n <span data-cy=\"breadcrumb-separator\" class=\"breadcrumb__separator\">/</span>\n }\n }\n </nav>\n @if (showCopy()) {\n <mad-icon-button\n data-cy=\"breadcrumb-copy\"\n class=\"breadcrumb__copy\"\n (click)=\"copy.emit()\"\n [matTooltip]=\"title()\"\n matTooltipPosition=\"above\"\n >\n <mat-icon>content_copy</mat-icon>\n </mad-icon-button>\n }\n </div>\n}\n", styles: [".breadcrumb{display:flex;align-items:center;gap:.5rem}.breadcrumb__nav{display:flex;align-items:center;gap:.625rem;min-height:3.5rem;padding-block:.25rem;font-size:.875rem;line-height:1.25rem}.breadcrumb__link{color:var(--main-primary);text-decoration:none}.breadcrumb__link:hover{text-decoration:underline}.breadcrumb__current,.breadcrumb__separator{color:var(--breadcrumb-separator-color)}.breadcrumb__copy{flex-shrink:0}\n"] }]
4222
+ }], propDecorators: { breadcrumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumbs", required: true }] }], showCopy: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCopy", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], copy: [{ type: i0.Output, args: ["copy"] }] } });
4210
4223
 
4211
- const VERSION = '22.0.4';
4224
+ const VERSION = '22.0.8';
4212
4225
 
4213
4226
  const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
4214
4227
  providedIn: 'root',
@@ -4264,5 +4277,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
4264
4277
  * Generated bundle index. Do not edit.
4265
4278
  */
4266
4279
 
4267
- export { AlertComponent, BaseQuickListComponent, ButtonModule, CardComponent, CardModule, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DangerButtonComponent, DataTableActionType, DataTableColumnsModalComponent, DataTableComponent, DataTablePersistenceService, DataTableTemplateCellDefinition, DataTableTemplateColumnDefinition, DataTableTemplateExpandableCellDefinition, DataTableTemplateExpandableColumnDefinition, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MAD_ALERT_DEFAULT_CONFIGURATION, MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY, MAD_DATA_TABLE_GLOBAL_CONFIGURATION, MAD_DATA_TABLE_PERSISTENCE_SERVICE, MAD_READONLY_FORM_FIELD_DEFAULT_CONFIGURATION, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarLayoutComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, ToolbarComponent, ToolbarModule, ToolbarService, VERSION, madStepperAnimations };
4280
+ export { AlertComponent, BaseQuickListComponent, BreadcrumbComponent, ButtonModule, CardComponent, CardModule, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DangerButtonComponent, DataTableActionType, DataTableColumnsModalComponent, DataTableComponent, DataTablePersistenceService, DataTableTemplateCellDefinition, DataTableTemplateColumnDefinition, DataTableTemplateExpandableCellDefinition, DataTableTemplateExpandableColumnDefinition, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MAD_ALERT_DEFAULT_CONFIGURATION, MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY, MAD_DATA_TABLE_GLOBAL_CONFIGURATION, MAD_DATA_TABLE_PERSISTENCE_SERVICE, MAD_READONLY_FORM_FIELD_DEFAULT_CONFIGURATION, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarLayoutComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, TileComponent, ToolbarComponent, ToolbarModule, ToolbarService, VERSION, madStepperAnimations };
4268
4281
  //# sourceMappingURL=porscheinformatik-material-addons.mjs.map