@porscheinformatik/material-addons 22.1.1 → 22.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/porscheinformatik-material-addons.mjs +7 -4
- package/fesm2022/porscheinformatik-material-addons.mjs.map +1 -1
- package/package.json +1 -1
- package/themes/common/tokens/_tokens.scss +1 -0
- package/types/porscheinformatik-material-addons.d.ts +1 -1
- package/types/porscheinformatik-material-addons.d.ts.map +1 -1
|
@@ -945,7 +945,10 @@ class NumericFieldDirective {
|
|
|
945
945
|
this.detachListener();
|
|
946
946
|
}
|
|
947
947
|
ngAfterViewChecked() {
|
|
948
|
-
|
|
948
|
+
// Only needed to create the unitSpan or refresh the unit
|
|
949
|
+
if (!this.unitSpan || this.unitSpan.textContent !== this.unit) {
|
|
950
|
+
this.injectUnitSymbol();
|
|
951
|
+
}
|
|
949
952
|
}
|
|
950
953
|
handleInputChanged() {
|
|
951
954
|
// Call in set timeout to avoid Expression has changed after it has been checked error.
|
|
@@ -2963,7 +2966,7 @@ class DataTableComponent {
|
|
|
2963
2966
|
return this.filter()?.getActiveFilterCount() === 0;
|
|
2964
2967
|
}
|
|
2965
2968
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2966
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: DataTableComponent, isStandalone: true, selector: "mad-data-table", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterColumnsLabel: { classPropertyName: "filterColumnsLabel", publicName: "filterColumnsLabel", isSignal: true, isRequired: false, transformFunction: null }, filterColumnsPlaceHolder: { classPropertyName: "filterColumnsPlaceHolder", publicName: "filterColumnsPlaceHolder", isSignal: true, isRequired: false, transformFunction: null }, showEmptyTable: { classPropertyName: "showEmptyTable", publicName: "showEmptyTable", isSignal: true, isRequired: false, transformFunction: null }, noDataText: { classPropertyName: "noDataText", publicName: "noDataText", isSignal: true, isRequired: false, transformFunction: null }, columnSettingsModalTitleLabel: { classPropertyName: "columnSettingsModalTitleLabel", publicName: "columnSettingsModalTitleLabel", isSignal: true, isRequired: false, transformFunction: null }, selectedLabel: { classPropertyName: "selectedLabel", publicName: "selectedLabel", isSignal: true, isRequired: false, transformFunction: null }, availableLabel: { classPropertyName: "availableLabel", publicName: "availableLabel", isSignal: true, isRequired: false, transformFunction: null }, saveLabel: { classPropertyName: "saveLabel", publicName: "saveLabel", isSignal: true, isRequired: false, transformFunction: null }, deleteLabel: { classPropertyName: "deleteLabel", publicName: "deleteLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, infoTextLabel: { classPropertyName: "infoTextLabel", publicName: "infoTextLabel", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, translateLabels: { classPropertyName: "translateLabels", publicName: "translateLabels", isSignal: true, isRequired: false, transformFunction: null }, useAsync: { classPropertyName: "useAsync", publicName: "useAsync", isSignal: true, isRequired: false, transformFunction: null }, stateful: { classPropertyName: "stateful", publicName: "stateful", isSignal: true, isRequired: false, transformFunction: null }, persistenceConfig: { classPropertyName: "persistenceConfig", publicName: "persistenceConfig", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: false, transformFunction: null }, idGenerator: { classPropertyName: "idGenerator", publicName: "idGenerator", isSignal: true, isRequired: false, transformFunction: null }, parentIdGenerator: { classPropertyName: "parentIdGenerator", publicName: "parentIdGenerator", isSignal: true, isRequired: false, transformFunction: null }, defaultSort: { classPropertyName: "defaultSort", publicName: "defaultSort", isSignal: true, isRequired: false, transformFunction: null }, externalFilter: { classPropertyName: "externalFilter", publicName: "externalFilter", isSignal: true, isRequired: false, transformFunction: null }, paginationEnabled: { classPropertyName: "paginationEnabled", publicName: "paginationEnabled", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, selectionEmitType: { classPropertyName: "selectionEmitType", publicName: "selectionEmitType", isSignal: true, isRequired: false, transformFunction: null }, showDeleteFilterAction: { classPropertyName: "showDeleteFilterAction", publicName: "showDeleteFilterAction", isSignal: true, isRequired: false, transformFunction: null }, disableRowClick: { classPropertyName: "disableRowClick", publicName: "disableRowClick", isSignal: true, isRequired: false, transformFunction: null }, deleteDefinitionAllowed: { classPropertyName: "deleteDefinitionAllowed", publicName: "deleteDefinitionAllowed", isSignal: true, isRequired: false, transformFunction: null }, rowExpandable: { classPropertyName: "rowExpandable", publicName: "rowExpandable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, filterEnabled: { classPropertyName: "filterEnabled", publicName: "filterEnabled", isSignal: true, isRequired: false, transformFunction: null }, filterModeInput: { classPropertyName: "filterModeInput", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, filterValueInput: { classPropertyName: "filterValueInput", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, externalPaginator: { classPropertyName: "externalPaginator", publicName: "externalPaginator", isSignal: true, isRequired: false, transformFunction: null }, defaultPageSize: { classPropertyName: "defaultPageSize", publicName: "defaultPageSize", isSignal: true, isRequired: false, transformFunction: null }, selectionEmitModeInput: { classPropertyName: "selectionEmitModeInput", publicName: "selectionEmitMode", isSignal: true, isRequired: false, transformFunction: null }, forceMode: { classPropertyName: "forceMode", publicName: "forceMode", isSignal: true, isRequired: false, transformFunction: null }, forceSelectionMode: { classPropertyName: "forceSelectionMode", publicName: "forceSelectionMode", isSignal: true, isRequired: false, transformFunction: null }, displayedColumnsInput: { classPropertyName: "displayedColumnsInput", publicName: "displayedColumns", isSignal: true, isRequired: false, transformFunction: null }, displayedColumnDefinition: { classPropertyName: "displayedColumnDefinition", publicName: "displayedColumnDefinition", isSignal: true, isRequired: false, transformFunction: null }, columnDefinitions: { classPropertyName: "columnDefinitions", publicName: "columnDefinitions", isSignal: true, isRequired: false, transformFunction: null }, allColumns: { classPropertyName: "allColumns", publicName: "allColumns", isSignal: true, isRequired: false, transformFunction: null } }, 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: "columnDefs", predicate: DataTableTemplateColumnDefinition, isSignal: true }, { propertyName: "expandableDef", first: true, predicate: DataTableTemplateExpandableCellDefinition, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "filter", first: true, predicate: DataTableFilter, descendants: true, isSignal: true }], ngImport: i0, template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar flex justify-between items-baseline\">\n <!-- Table actions: displayed before the table -->\n @if (tableActionsState().length || (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction())) {\n <div>\n @for (actionGroup of tableActionsState(); track actionGroup) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\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 (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction()) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n <button\n matIconButton\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [attr.aria-label]=\"'common.filter.delete.tooltip' | translate\"\n matBadgeColor=\"warn\"\n [matBadge]=\"getFilterBadgeContent()\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary align-middle\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\"> filter_alt_off </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterModeState() === '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 rowActionsState(); 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 editableColumnDefinitionsState(); 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 viewableColumnDefinitionsState(); 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 (filterModeState() === 'COLUMN_BASED' || showEmptyTable() || !!dataSource.filteredData?.length) {\n <div class=\"datatable overflow-auto flex-auto h-full relative w-full\" [class]=\"tableClass()\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 (selectionEmitModeState() !== 'NONE' && selectionModeState() === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container mx-2\">\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 mx-2\" (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 mx-2\" (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 columnsState(); 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]=\"columnsState().length + 1\">\n <div class=\"mad-data-table-expandable-area\" [class.mad-data-table-expandable-area-expanded]=\"element === expandedElement\">\n <div class=\"mad-data-table-expandable-content\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIdsState()\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitModeState() !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIdsState()\"\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 w-full text-center relative pt-2.5\" [attr.colspan]=\"columnIdsState().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 w-full text-center relative\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 flex flex-row\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area flex flex-1\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitionsState().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 (editableColumnDefinitionsState().length > 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 (viewableColumnDefinitionsState().length > 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]=\"pageLengthState()\"\n [pageIndex]=\"pageIndexState()\"\n [pageSize]=\"pageSizeState()\"\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 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}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.text-right{text-align:right!important;padding-right:24px!important}.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:grid;grid-template-rows:0fr;transition:grid-template-rows 225ms cubic-bezier(.4,0,.2,1);width:100%}.mad-data-table-expandable-area.mad-data-table-expandable-area-expanded{grid-template-rows:1fr}.mad-data-table-expandable-content{min-height:0;min-width:0;overflow:hidden;visibility:hidden;width:100%;transition:visibility 225ms cubic-bezier(.4,0,.2,1)}.mad-data-table-expandable-area-expanded>.mad-data-table-expandable-content{visibility:visible}@media(prefers-reduced-motion:reduce){.mad-data-table-expandable-area,.mad-data-table-expandable-content{transition:none}}.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)}::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: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i9.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i10.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: ["color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "component", type: MadButtonGroupComponent, selector: "mad-button-group" }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i14.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: i15.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: i16.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" }] }); }
|
|
2969
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: DataTableComponent, isStandalone: true, selector: "mad-data-table", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterColumnsLabel: { classPropertyName: "filterColumnsLabel", publicName: "filterColumnsLabel", isSignal: true, isRequired: false, transformFunction: null }, filterColumnsPlaceHolder: { classPropertyName: "filterColumnsPlaceHolder", publicName: "filterColumnsPlaceHolder", isSignal: true, isRequired: false, transformFunction: null }, showEmptyTable: { classPropertyName: "showEmptyTable", publicName: "showEmptyTable", isSignal: true, isRequired: false, transformFunction: null }, noDataText: { classPropertyName: "noDataText", publicName: "noDataText", isSignal: true, isRequired: false, transformFunction: null }, columnSettingsModalTitleLabel: { classPropertyName: "columnSettingsModalTitleLabel", publicName: "columnSettingsModalTitleLabel", isSignal: true, isRequired: false, transformFunction: null }, selectedLabel: { classPropertyName: "selectedLabel", publicName: "selectedLabel", isSignal: true, isRequired: false, transformFunction: null }, availableLabel: { classPropertyName: "availableLabel", publicName: "availableLabel", isSignal: true, isRequired: false, transformFunction: null }, saveLabel: { classPropertyName: "saveLabel", publicName: "saveLabel", isSignal: true, isRequired: false, transformFunction: null }, deleteLabel: { classPropertyName: "deleteLabel", publicName: "deleteLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, infoTextLabel: { classPropertyName: "infoTextLabel", publicName: "infoTextLabel", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, translateLabels: { classPropertyName: "translateLabels", publicName: "translateLabels", isSignal: true, isRequired: false, transformFunction: null }, useAsync: { classPropertyName: "useAsync", publicName: "useAsync", isSignal: true, isRequired: false, transformFunction: null }, stateful: { classPropertyName: "stateful", publicName: "stateful", isSignal: true, isRequired: false, transformFunction: null }, persistenceConfig: { classPropertyName: "persistenceConfig", publicName: "persistenceConfig", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: false, transformFunction: null }, idGenerator: { classPropertyName: "idGenerator", publicName: "idGenerator", isSignal: true, isRequired: false, transformFunction: null }, parentIdGenerator: { classPropertyName: "parentIdGenerator", publicName: "parentIdGenerator", isSignal: true, isRequired: false, transformFunction: null }, defaultSort: { classPropertyName: "defaultSort", publicName: "defaultSort", isSignal: true, isRequired: false, transformFunction: null }, externalFilter: { classPropertyName: "externalFilter", publicName: "externalFilter", isSignal: true, isRequired: false, transformFunction: null }, paginationEnabled: { classPropertyName: "paginationEnabled", publicName: "paginationEnabled", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, selectionEmitType: { classPropertyName: "selectionEmitType", publicName: "selectionEmitType", isSignal: true, isRequired: false, transformFunction: null }, showDeleteFilterAction: { classPropertyName: "showDeleteFilterAction", publicName: "showDeleteFilterAction", isSignal: true, isRequired: false, transformFunction: null }, disableRowClick: { classPropertyName: "disableRowClick", publicName: "disableRowClick", isSignal: true, isRequired: false, transformFunction: null }, deleteDefinitionAllowed: { classPropertyName: "deleteDefinitionAllowed", publicName: "deleteDefinitionAllowed", isSignal: true, isRequired: false, transformFunction: null }, rowExpandable: { classPropertyName: "rowExpandable", publicName: "rowExpandable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, filterEnabled: { classPropertyName: "filterEnabled", publicName: "filterEnabled", isSignal: true, isRequired: false, transformFunction: null }, filterModeInput: { classPropertyName: "filterModeInput", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, filterValueInput: { classPropertyName: "filterValueInput", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, externalPaginator: { classPropertyName: "externalPaginator", publicName: "externalPaginator", isSignal: true, isRequired: false, transformFunction: null }, defaultPageSize: { classPropertyName: "defaultPageSize", publicName: "defaultPageSize", isSignal: true, isRequired: false, transformFunction: null }, selectionEmitModeInput: { classPropertyName: "selectionEmitModeInput", publicName: "selectionEmitMode", isSignal: true, isRequired: false, transformFunction: null }, forceMode: { classPropertyName: "forceMode", publicName: "forceMode", isSignal: true, isRequired: false, transformFunction: null }, forceSelectionMode: { classPropertyName: "forceSelectionMode", publicName: "forceSelectionMode", isSignal: true, isRequired: false, transformFunction: null }, displayedColumnsInput: { classPropertyName: "displayedColumnsInput", publicName: "displayedColumns", isSignal: true, isRequired: false, transformFunction: null }, displayedColumnDefinition: { classPropertyName: "displayedColumnDefinition", publicName: "displayedColumnDefinition", isSignal: true, isRequired: false, transformFunction: null }, columnDefinitions: { classPropertyName: "columnDefinitions", publicName: "columnDefinitions", isSignal: true, isRequired: false, transformFunction: null }, allColumns: { classPropertyName: "allColumns", publicName: "allColumns", isSignal: true, isRequired: false, transformFunction: null } }, 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: "columnDefs", predicate: DataTableTemplateColumnDefinition, isSignal: true }, { propertyName: "expandableDef", first: true, predicate: DataTableTemplateExpandableCellDefinition, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "filter", first: true, predicate: DataTableFilter, descendants: true, isSignal: true }], ngImport: i0, template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar flex justify-between items-baseline\">\n <!-- Table actions: displayed before the table -->\n @if (tableActionsState().length || (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction())) {\n <div>\n @for (actionGroup of tableActionsState(); track actionGroup) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\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 (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction()) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n <button\n matIconButton\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [attr.aria-label]=\"'common.filter.delete.tooltip' | translate\"\n matBadgeColor=\"warn\"\n [matBadge]=\"getFilterBadgeContent()\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary align-middle\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\"> filter_alt_off </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterModeState() === '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 rowActionsState(); 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 editableColumnDefinitionsState(); 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 viewableColumnDefinitionsState(); 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 (filterModeState() === 'COLUMN_BASED' || showEmptyTable() || !!dataSource.filteredData?.length) {\n <div class=\"datatable overflow-auto flex-auto h-full relative w-full\" [class]=\"tableClass()\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 (selectionEmitModeState() !== 'NONE' && selectionModeState() === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container mx-2\">\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 mx-2\" (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 mx-2\" (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 columnsState(); 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]=\"columnsState().length + 1\">\n <div class=\"mad-data-table-expandable-area\" [class.mad-data-table-expandable-area-expanded]=\"element === expandedElement\">\n <div class=\"mad-data-table-expandable-content\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIdsState()\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitModeState() !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIdsState()\"\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 w-full text-center relative pt-2.5\" [attr.colspan]=\"columnIdsState().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 w-full text-center relative\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 flex flex-row\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area flex flex-1\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitionsState().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 (editableColumnDefinitionsState().length > 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 (viewableColumnDefinitionsState().length > 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]=\"pageLengthState()\"\n [pageIndex]=\"pageIndexState()\"\n [pageSize]=\"pageSizeState()\"\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 table{--mat-table-row-item-outline-color: var(--datatable-row-border-color, #0000001f);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}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.text-right{text-align:right!important;padding-right:24px!important}.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:grid;grid-template-rows:0fr;transition:grid-template-rows 225ms cubic-bezier(.4,0,.2,1);width:100%}.mad-data-table-expandable-area.mad-data-table-expandable-area-expanded{grid-template-rows:1fr}.mad-data-table-expandable-content{min-height:0;min-width:0;overflow:hidden;visibility:hidden;width:100%;transition:visibility 225ms cubic-bezier(.4,0,.2,1)}.mad-data-table-expandable-area-expanded>.mad-data-table-expandable-content{visibility:visible}@media(prefers-reduced-motion:reduce){.mad-data-table-expandable-area,.mad-data-table-expandable-content{transition:none}}.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)}::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: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i9.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i10.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: ["color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "component", type: MadButtonGroupComponent, selector: "mad-button-group" }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i14.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: i15.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: i16.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" }] }); }
|
|
2967
2970
|
}
|
|
2968
2971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DataTableComponent, decorators: [{
|
|
2969
2972
|
type: Component,
|
|
@@ -2988,7 +2991,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
2988
2991
|
DataTableFilterHeader,
|
|
2989
2992
|
DataTableFilter,
|
|
2990
2993
|
MatTooltip,
|
|
2991
|
-
], providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar flex justify-between items-baseline\">\n <!-- Table actions: displayed before the table -->\n @if (tableActionsState().length || (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction())) {\n <div>\n @for (actionGroup of tableActionsState(); track actionGroup) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\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 (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction()) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n <button\n matIconButton\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [attr.aria-label]=\"'common.filter.delete.tooltip' | translate\"\n matBadgeColor=\"warn\"\n [matBadge]=\"getFilterBadgeContent()\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary align-middle\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\"> filter_alt_off </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterModeState() === '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 rowActionsState(); 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 editableColumnDefinitionsState(); 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 viewableColumnDefinitionsState(); 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 (filterModeState() === 'COLUMN_BASED' || showEmptyTable() || !!dataSource.filteredData?.length) {\n <div class=\"datatable overflow-auto flex-auto h-full relative w-full\" [class]=\"tableClass()\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 (selectionEmitModeState() !== 'NONE' && selectionModeState() === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container mx-2\">\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 mx-2\" (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 mx-2\" (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 columnsState(); 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]=\"columnsState().length + 1\">\n <div class=\"mad-data-table-expandable-area\" [class.mad-data-table-expandable-area-expanded]=\"element === expandedElement\">\n <div class=\"mad-data-table-expandable-content\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIdsState()\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitModeState() !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIdsState()\"\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 w-full text-center relative pt-2.5\" [attr.colspan]=\"columnIdsState().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 w-full text-center relative\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 flex flex-row\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area flex flex-1\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitionsState().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 (editableColumnDefinitionsState().length > 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 (viewableColumnDefinitionsState().length > 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]=\"pageLengthState()\"\n [pageIndex]=\"pageIndexState()\"\n [pageSize]=\"pageSizeState()\"\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 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}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.text-right{text-align:right!important;padding-right:24px!important}.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:grid;grid-template-rows:0fr;transition:grid-template-rows 225ms cubic-bezier(.4,0,.2,1);width:100%}.mad-data-table-expandable-area.mad-data-table-expandable-area-expanded{grid-template-rows:1fr}.mad-data-table-expandable-content{min-height:0;min-width:0;overflow:hidden;visibility:hidden;width:100%;transition:visibility 225ms cubic-bezier(.4,0,.2,1)}.mad-data-table-expandable-area-expanded>.mad-data-table-expandable-content{visibility:visible}@media(prefers-reduced-motion:reduce){.mad-data-table-expandable-area,.mad-data-table-expandable-content{transition:none}}.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)}::ng-deep .mat-sort-header .mat-sort-header-arrow:hover{color:var(--main-primary);cursor:pointer}\n"] }]
|
|
2994
|
+
], providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar flex justify-between items-baseline\">\n <!-- Table actions: displayed before the table -->\n @if (tableActionsState().length || (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction())) {\n <div>\n @for (actionGroup of tableActionsState(); track actionGroup) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\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 (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction()) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n <button\n matIconButton\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [attr.aria-label]=\"'common.filter.delete.tooltip' | translate\"\n matBadgeColor=\"warn\"\n [matBadge]=\"getFilterBadgeContent()\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary align-middle\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\"> filter_alt_off </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterModeState() === '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 rowActionsState(); 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 editableColumnDefinitionsState(); 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 viewableColumnDefinitionsState(); 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 (filterModeState() === 'COLUMN_BASED' || showEmptyTable() || !!dataSource.filteredData?.length) {\n <div class=\"datatable overflow-auto flex-auto h-full relative w-full\" [class]=\"tableClass()\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 (selectionEmitModeState() !== 'NONE' && selectionModeState() === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container mx-2\">\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 mx-2\" (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 mx-2\" (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 columnsState(); 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]=\"columnsState().length + 1\">\n <div class=\"mad-data-table-expandable-area\" [class.mad-data-table-expandable-area-expanded]=\"element === expandedElement\">\n <div class=\"mad-data-table-expandable-content\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIdsState()\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitModeState() !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIdsState()\"\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 w-full text-center relative pt-2.5\" [attr.colspan]=\"columnIdsState().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 w-full text-center relative\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\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 flex flex-row\">\n <div data-cy=\"definition-button-block\" class=\"mad-data-table-bottom-info-area flex flex-1\">\n <!-- column settings: 1 definition -->\n @if (editableColumnDefinitionsState().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 (editableColumnDefinitionsState().length > 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 (viewableColumnDefinitionsState().length > 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]=\"pageLengthState()\"\n [pageIndex]=\"pageIndexState()\"\n [pageSize]=\"pageSizeState()\"\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 table{--mat-table-row-item-outline-color: var(--datatable-row-border-color, #0000001f);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}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.text-right{text-align:right!important;padding-right:24px!important}.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:grid;grid-template-rows:0fr;transition:grid-template-rows 225ms cubic-bezier(.4,0,.2,1);width:100%}.mad-data-table-expandable-area.mad-data-table-expandable-area-expanded{grid-template-rows:1fr}.mad-data-table-expandable-content{min-height:0;min-width:0;overflow:hidden;visibility:hidden;width:100%;transition:visibility 225ms cubic-bezier(.4,0,.2,1)}.mad-data-table-expandable-area-expanded>.mad-data-table-expandable-content{visibility:visible}@media(prefers-reduced-motion:reduce){.mad-data-table-expandable-area,.mad-data-table-expandable-content{transition:none}}.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)}::ng-deep .mat-sort-header .mat-sort-header-arrow:hover{color:var(--main-primary);cursor:pointer}\n"] }]
|
|
2992
2995
|
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterColumnsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterColumnsLabel", required: false }] }], filterColumnsPlaceHolder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterColumnsPlaceHolder", required: false }] }], showEmptyTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmptyTable", required: false }] }], noDataText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noDataText", required: false }] }], columnSettingsModalTitleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnSettingsModalTitleLabel", required: false }] }], selectedLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedLabel", required: false }] }], availableLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableLabel", required: false }] }], saveLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveLabel", required: false }] }], deleteLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "deleteLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], infoTextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoTextLabel", required: false }] }], tableClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClass", required: false }] }], translateLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateLabels", required: false }] }], useAsync: [{ type: i0.Input, args: [{ isSignal: true, alias: "useAsync", required: false }] }], stateful: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateful", required: false }] }], persistenceConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistenceConfig", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], tableData: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableData", required: false }] }], idGenerator: [{ type: i0.Input, args: [{ isSignal: true, alias: "idGenerator", required: false }] }], parentIdGenerator: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentIdGenerator", required: false }] }], defaultSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSort", required: false }] }], externalFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalFilter", required: false }] }], paginationEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationEnabled", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], selectionEmitType: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionEmitType", required: false }] }], showDeleteFilterAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDeleteFilterAction", required: false }] }], disableRowClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRowClick", required: false }] }], deleteDefinitionAllowed: [{ type: i0.Input, args: [{ isSignal: true, alias: "deleteDefinitionAllowed", required: false }] }], rowExpandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowExpandable", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], filterEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterEnabled", required: false }] }], filterModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], filterValueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterValue", required: false }] }], externalPaginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalPaginator", required: false }] }], defaultPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPageSize", required: false }] }], selectionEmitModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionEmitMode", required: false }] }], forceMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceMode", required: false }] }], forceSelectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelectionMode", required: false }] }], displayedColumnsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayedColumns", required: false }] }], displayedColumnDefinition: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayedColumnDefinition", required: false }] }], columnDefinitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnDefinitions", required: false }] }], allColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "allColumns", required: false }] }], actionEvent: [{ type: i0.Output, args: ["actionEvent"] }], selectionEvent: [{ type: i0.Output, args: ["selectionEvent"] }], sortEvent: [{ type: i0.Output, args: ["sortEvent"] }], filterEvent: [{ type: i0.Output, args: ["filterEvent"] }], pageEvent: [{ type: i0.Output, args: ["pageEvent"] }], allColumnsEvent: [{ type: i0.Output, args: ["allColumnsEvent"] }], columnDefinitionChangeEvent: [{ type: i0.Output, args: ["columnDefinitionChangeEvent"] }], viewDefinitionChangeEvent: [{ type: i0.Output, args: ["viewDefinitionChangeEvent"] }], paginator: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatPaginator), { isSignal: true }] }], matSort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }], filter: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DataTableFilter), { isSignal: true }] }], columnDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => DataTableTemplateColumnDefinition), { isSignal: true }] }], expandableDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DataTableTemplateExpandableCellDefinition), { isSignal: true }] }] } });
|
|
2993
2996
|
|
|
2994
2997
|
class DataTableTemplateCellDefinition {
|
|
@@ -4245,7 +4248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4245
4248
|
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"] }]
|
|
4246
4249
|
}], 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"] }] } });
|
|
4247
4250
|
|
|
4248
|
-
const VERSION = '22.1.
|
|
4251
|
+
const VERSION = '22.1.3';
|
|
4249
4252
|
|
|
4250
4253
|
const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
|
|
4251
4254
|
providedIn: 'root',
|