@porscheinformatik/material-addons 22.3.2 → 22.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Component, NgModule, booleanAttribute, inject, ElementRef, Renderer2, DestroyRef, Directive, ChangeDetectionStrategy, effect, Optional, HostBinding, signal, LOCALE_ID, Inject, Injectable, output, InjectionToken, viewChild, computed, EventEmitter, Output, Input, ViewChild, forwardRef, HostListener, model, TemplateRef, ViewChildren, ContentChild, SkipSelf, ViewContainerRef, inputBinding, outputBinding, contentChildren, contentChild, ChangeDetectorRef, untracked, ViewEncapsulation, QueryList, ContentChildren } from '@angular/core';
3
- import * as i2$1 from '@angular/material/icon';
2
+ import { input, Component, NgModule, booleanAttribute, inject, ElementRef, Renderer2, DestroyRef, Directive, ChangeDetectionStrategy, effect, Optional, HostBinding, signal, LOCALE_ID, Inject, Injectable, output, InjectionToken, viewChild, computed, EventEmitter, Output, Input, ViewChild, forwardRef, HostListener, model, SkipSelf, ViewContainerRef, inputBinding, outputBinding, contentChildren, contentChild, ChangeDetectorRef, untracked, TemplateRef, ViewChildren, ContentChild, ViewEncapsulation, QueryList, ContentChildren, PLATFORM_ID } from '@angular/core';
3
+ import * as i2 from '@angular/material/icon';
4
4
  import { MatIconModule, MatIcon } from '@angular/material/icon';
5
- import * as i2 from '@angular/material/tooltip';
5
+ import * as i6 from '@angular/material/tooltip';
6
6
  import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
7
7
  import * as i1 from '@angular/material/button';
8
8
  import { MatButtonModule } from '@angular/material/button';
9
9
  import * as i1$8 from '@angular/router';
10
10
  import { RouterLink, RouterModule, NavigationEnd } from '@angular/router';
11
- import * as i2$5 from '@angular/common';
12
- import { CommonModule, NgStyle, NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';
11
+ import * as i2$4 from '@angular/common';
12
+ import { CommonModule, NgStyle, NgClass, NgTemplateOutlet, AsyncPipe, DOCUMENT, isPlatformBrowser } from '@angular/common';
13
13
  import * as i1$2 from '@angular/forms';
14
- import { FormsModule, FormGroupDirective, ControlContainer, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormControl } from '@angular/forms';
14
+ import { FormsModule, FormGroupDirective, ControlContainer, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
15
15
  import * as i3 from '@angular/cdk/text-field';
16
16
  import { TextFieldModule } from '@angular/cdk/text-field';
17
- import * as i2$2 from '@angular/material/input';
17
+ import * as i2$1 from '@angular/material/input';
18
18
  import { MatInputModule } from '@angular/material/input';
19
19
  import * as i1$1 from '@angular/material/form-field';
20
20
  import { MatFormFieldModule } from '@angular/material/form-field';
@@ -32,10 +32,10 @@ import { MatSortModule, MatSort } from '@angular/material/sort';
32
32
  import * as i1$4 from '@angular/material/menu';
33
33
  import { MatMenuModule } from '@angular/material/menu';
34
34
  import * as i1$5 from '@angular/material/dialog';
35
- import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialog } from '@angular/material/dialog';
36
- import * as i2$3 from '@angular/cdk/drag-drop';
35
+ import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialog, MatDialogModule } from '@angular/material/dialog';
36
+ import * as i2$2 from '@angular/cdk/drag-drop';
37
37
  import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
38
- import * as i2$4 from '@ngx-translate/core';
38
+ import * as i2$3 from '@ngx-translate/core';
39
39
  import { TranslateModule } from '@ngx-translate/core';
40
40
  import { SelectionModel } from '@angular/cdk/collections';
41
41
  import { DateTime } from 'luxon';
@@ -64,7 +64,7 @@ import * as i1$9 from '@angular/cdk/layout';
64
64
  import { Breakpoints } from '@angular/cdk/layout';
65
65
  import * as i4 from '@angular/material/toolbar';
66
66
  import { MatToolbarModule } from '@angular/material/toolbar';
67
- import * as i2$6 from '@angular/platform-browser';
67
+ import * as i2$5 from '@angular/platform-browser';
68
68
  import * as i3$2 from '@angular/material/chips';
69
69
  import { MatChipsModule } from '@angular/material/chips';
70
70
 
@@ -84,7 +84,7 @@ class MaterialActionButtonComponent {
84
84
  ...(ngDevMode ? [{ debugName: "liftHigher2" }] : /* istanbul ignore next */ []));
85
85
  }
86
86
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MaterialActionButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: MaterialActionButtonComponent, isStandalone: true, selector: "mad-material-action-button", inputs: { actionName: { classPropertyName: "actionName", publicName: "actionName", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, liftHigher: { classPropertyName: "liftHigher", publicName: "liftHigher", isSignal: true, isRequired: false, transformFunction: null }, liftHigher2: { classPropertyName: "liftHigher2", publicName: "liftHigher2", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"material-action-button\" [class.lift-higher]=\"liftHigher()\" [class.lift-higher-2]=\"liftHigher2()\">\n @if (liftHigher2()) {\n <a\n mat-mini-fab\n class=\"mat-accent\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n } @else {\n <a\n mat-fab\n class=\"mat-primary\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n }\n</div>\n", styles: [".material-action-button{position:fixed;bottom:20px;right:20px;z-index:100;display:flex;flex-direction:column-reverse;align-items:center}.lift-higher{bottom:61px}.lift-higher-2{right:28px;bottom:121px}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: MaterialActionButtonComponent, isStandalone: true, selector: "mad-material-action-button", inputs: { actionName: { classPropertyName: "actionName", publicName: "actionName", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, liftHigher: { classPropertyName: "liftHigher", publicName: "liftHigher", isSignal: true, isRequired: false, transformFunction: null }, liftHigher2: { classPropertyName: "liftHigher2", publicName: "liftHigher2", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"material-action-button\" [class.lift-higher]=\"liftHigher()\" [class.lift-higher-2]=\"liftHigher2()\">\n @if (liftHigher2()) {\n <a\n mat-mini-fab\n class=\"mat-accent\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n } @else {\n <a\n mat-fab\n class=\"mat-primary\"\n [attr.id]=\"id() || null\"\n [routerLink]=\"routerLink()\"\n [matTooltip]=\"actionName()\"\n matTooltipPosition=\"left\"\n [attr.aria-label]=\"actionName() || null\"\n >\n <mat-icon>{{ icon() }}</mat-icon>\n </a>\n }\n</div>\n", styles: [".material-action-button{position:fixed;bottom:20px;right:20px;z-index:100;display:flex;flex-direction:column-reverse;align-items:center}.lift-higher{bottom:61px}.lift-higher-2{right:28px;bottom:121px}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
88
88
  }
89
89
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MaterialActionButtonComponent, decorators: [{
90
90
  type: Component,
@@ -659,7 +659,7 @@ class ReadOnlyFormFieldComponent {
659
659
  this.prefixClickedEmitter.emit();
660
660
  }
661
661
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReadOnlyFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
662
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ReadOnlyFormFieldComponent, isStandalone: true, selector: "mad-readonly-form-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, useProjectedContent: { classPropertyName: "useProjectedContent", publicName: "useProjectedContent", isSignal: true, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null }, textOverflow: { classPropertyName: "textOverflow", publicName: "textOverflow", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, unitPosition: { classPropertyName: "unitPosition", publicName: "unitPosition", isSignal: true, isRequired: false, transformFunction: null }, formatNumber: { classPropertyName: "formatNumber", publicName: "formatNumber", isSignal: true, isRequired: false, transformFunction: null }, decimalPlaces: { classPropertyName: "decimalPlaces", publicName: "decimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, roundDisplayValue: { classPropertyName: "roundDisplayValue", publicName: "roundDisplayValue", isSignal: true, isRequired: false, transformFunction: null }, autofillDecimals: { classPropertyName: "autofillDecimals", publicName: "autofillDecimals", isSignal: true, isRequired: false, transformFunction: null }, multiline: { classPropertyName: "multiline", publicName: "multiline", isSignal: true, isRequired: false, transformFunction: null }, multilineAutoSize: { classPropertyName: "multilineAutoSize", publicName: "multilineAutoSize", isSignal: true, isRequired: false, transformFunction: null }, shrinkIfEmpty: { classPropertyName: "shrinkIfEmpty", publicName: "shrinkIfEmpty", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { suffixClickedEmitter: "suffixClickedEmitter", prefixClickedEmitter: "prefixClickedEmitter" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-form-field class=\"form-group mad-read-only\">\n <mat-label>{{ label() }}</mat-label>\n @if (!multiline()) {\n <input\n #inputEl\n (madSizeChange)=\"sizeChanges.set($event)\"\n [style.text-overflow]=\"textOverflow()\"\n [disabled]=\"!useProjectedContent()\"\n [errorStateMatcher]=\"errorMatcher()\"\n [id]=\"id()\"\n [matTooltipDisabled]=\"!toolTipForInputEnabled()\"\n [matTooltip]=\"toolTipText()\"\n [ngClass]=\"'text-' + textAlign() + ' content'\"\n [ngModel]=\"displayValueWithUnit()\"\n [ngStyle]=\"{ display: useProjectedContent() ? 'none' : 'block' }\"\n matInput\n matTooltipClass=\"custom-tooltip\"\n matTooltipPosition=\"right\"\n readonly\n />\n } @else {\n <textarea\n [ngStyle]=\"{ display: useProjectedContent() ? 'none' : 'block' }\"\n [rows]=\"actualAmountOfRows()\"\n [ngModel]=\"displayValueWithUnit()\"\n class=\"multiline content\"\n [errorStateMatcher]=\"errorMatcher()\"\n [id]=\"id()\"\n readonly\n [disabled]=\"!useProjectedContent()\"\n matInput\n [cdkTextareaAutosize]=\"multilineAutoSize()\"\n >\n </textarea>\n }\n\n @if (useProjectedContent()) {\n <ng-content />\n }\n <mat-error>{{ errorMessage() }}</mat-error>\n @if (suffix()) {\n <mat-icon data-cy=\"suffix-icon\" (click)=\"suffixClicked()\" class=\"pointer mat-primary\" matSuffix>{{ suffix() }} </mat-icon>\n }\n @if (prefix()) {\n <mat-icon data-cy=\"prefix-icon\" (click)=\"prefixClicked()\" class=\"pointer mat-primary\" matPrefix>{{ prefix() }} </mat-icon>\n }\n @if (unit() && unitPosition() === 'left') {\n <span [style.padding-right]=\"'5px'\" matTextPrefix>{{ unit() }}</span>\n } @else if (unit() && textAlign() === 'right') {\n <span [style.padding-left]=\"'25px'\" matTextSuffix>{{ unit() }}</span>\n }\n</mat-form-field>\n", styles: ["mat-form-field{width:100%;width:-moz-available;width:-webkit-fill-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}\n"], dependencies: [{ 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: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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: "directive", type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: SizeChangeDirective, selector: "[madSizeChange]", outputs: ["madSizeChange"] }] }); }
662
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ReadOnlyFormFieldComponent, isStandalone: true, selector: "mad-readonly-form-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, useProjectedContent: { classPropertyName: "useProjectedContent", publicName: "useProjectedContent", isSignal: true, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null }, textOverflow: { classPropertyName: "textOverflow", publicName: "textOverflow", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, unitPosition: { classPropertyName: "unitPosition", publicName: "unitPosition", isSignal: true, isRequired: false, transformFunction: null }, formatNumber: { classPropertyName: "formatNumber", publicName: "formatNumber", isSignal: true, isRequired: false, transformFunction: null }, decimalPlaces: { classPropertyName: "decimalPlaces", publicName: "decimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, roundDisplayValue: { classPropertyName: "roundDisplayValue", publicName: "roundDisplayValue", isSignal: true, isRequired: false, transformFunction: null }, autofillDecimals: { classPropertyName: "autofillDecimals", publicName: "autofillDecimals", isSignal: true, isRequired: false, transformFunction: null }, multiline: { classPropertyName: "multiline", publicName: "multiline", isSignal: true, isRequired: false, transformFunction: null }, multilineAutoSize: { classPropertyName: "multilineAutoSize", publicName: "multilineAutoSize", isSignal: true, isRequired: false, transformFunction: null }, shrinkIfEmpty: { classPropertyName: "shrinkIfEmpty", publicName: "shrinkIfEmpty", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { suffixClickedEmitter: "suffixClickedEmitter", prefixClickedEmitter: "prefixClickedEmitter" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-form-field class=\"form-group mad-read-only\">\n <mat-label>{{ label() }}</mat-label>\n @if (!multiline()) {\n <input\n #inputEl\n (madSizeChange)=\"sizeChanges.set($event)\"\n [style.text-overflow]=\"textOverflow()\"\n [disabled]=\"!useProjectedContent()\"\n [errorStateMatcher]=\"errorMatcher()\"\n [id]=\"id()\"\n [matTooltipDisabled]=\"!toolTipForInputEnabled()\"\n [matTooltip]=\"toolTipText()\"\n [ngClass]=\"'text-' + textAlign() + ' content'\"\n [ngModel]=\"displayValueWithUnit()\"\n [ngStyle]=\"{ display: useProjectedContent() ? 'none' : 'block' }\"\n matInput\n matTooltipClass=\"custom-tooltip\"\n matTooltipPosition=\"right\"\n readonly\n />\n } @else {\n <textarea\n [ngStyle]=\"{ display: useProjectedContent() ? 'none' : 'block' }\"\n [rows]=\"actualAmountOfRows()\"\n [ngModel]=\"displayValueWithUnit()\"\n class=\"multiline content\"\n [errorStateMatcher]=\"errorMatcher()\"\n [id]=\"id()\"\n readonly\n [disabled]=\"!useProjectedContent()\"\n matInput\n [cdkTextareaAutosize]=\"multilineAutoSize()\"\n >\n </textarea>\n }\n\n @if (useProjectedContent()) {\n <ng-content />\n }\n <mat-error>{{ errorMessage() }}</mat-error>\n @if (suffix()) {\n <mat-icon data-cy=\"suffix-icon\" (click)=\"suffixClicked()\" class=\"pointer mat-primary\" matSuffix>{{ suffix() }} </mat-icon>\n }\n @if (prefix()) {\n <mat-icon data-cy=\"prefix-icon\" (click)=\"prefixClicked()\" class=\"pointer mat-primary\" matPrefix>{{ prefix() }} </mat-icon>\n }\n @if (unit() && unitPosition() === 'left') {\n <span [style.padding-right]=\"'5px'\" matTextPrefix>{{ unit() }}</span>\n } @else if (unit() && textAlign() === 'right') {\n <span [style.padding-left]=\"'25px'\" matTextSuffix>{{ unit() }}</span>\n }\n</mat-form-field>\n", styles: ["mat-form-field{width:100%;width:-moz-available;width:-webkit-fill-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}\n"], dependencies: [{ 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: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.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: "directive", type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: SizeChangeDirective, selector: "[madSizeChange]", outputs: ["madSizeChange"] }] }); }
663
663
  }
664
664
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReadOnlyFormFieldComponent, decorators: [{
665
665
  type: Component,
@@ -1298,7 +1298,7 @@ class CardComponent {
1298
1298
  this.expanded.update((expanded) => !expanded);
1299
1299
  }
1300
1300
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1301
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: CardComponent, isStandalone: true, selector: "mad-card", inputs: { cancelDisabled: { classPropertyName: "cancelDisabled", publicName: "cancelDisabled", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, editText: { classPropertyName: "editText", publicName: "editText", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, saveDisabled: { classPropertyName: "saveDisabled", publicName: "saveDisabled", isSignal: true, isRequired: false, transformFunction: null }, saveText: { classPropertyName: "saveText", publicName: "saveText", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: true, isRequired: false, transformFunction: null }, additionalActionIcon: { classPropertyName: "additionalActionIcon", publicName: "additionalActionIcon", isSignal: true, isRequired: false, transformFunction: null }, additionalActionText: { classPropertyName: "additionalActionText", publicName: "additionalActionText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange", edit: "edit", cancel: "cancel", save: "save", additionalAction: "additionalAction" }, ngImport: i0, template: "<mat-card>\n @if (showHeader()) {\n <mat-card-header class=\"card-header\">\n <mat-card-title-group class=\"card-title-group\">\n @if (title(); as cardTitle) {\n <mat-card-title data-cy=\"card-title\" class=\"card-title\">\n {{ cardTitle }}\n </mat-card-title>\n }\n <div data-cy=\"title-buttons-block\" class=\"header-actions\">\n @if (showCollapseButton()) {\n <mad-icon-button data-testid=\"collapse-btn\" (click)=\"toggleCollapse()\">\n <mat-icon [class]=\"collapseIconClasses()\"> keyboard_arrow_up </mat-icon>\n </mad-icon-button>\n }\n @if (showAdditionalActionButton()) {\n <mad-icon-button data-testid=\"additional-btn\" (click)=\"additionalAction.emit()\" [title]=\"additionalActionText()\" type=\"button\">\n <mat-icon>{{ additionalActionIcon() }}</mat-icon>\n </mad-icon-button>\n }\n @if (showEditButton()) {\n <mad-icon-button data-testid=\"edit-btn\" [title]=\"editText()\" (click)=\"onEdit()\" type=\"button\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n }\n </div>\n </mat-card-title-group>\n </mat-card-header>\n }\n\n @if (expanded()) {\n <mat-card-content animate.enter=\"card-content-enter\" animate.leave=\"card-content-leave\">\n <ng-content />\n </mat-card-content>\n }\n\n @if (showActions()) {\n <mat-card-actions class=\"card-actions\">\n <mad-primary-button\n data-testid=\"save-btn\"\n [title]=\"saveText()\"\n [disabled]=\"saveDisabled()\"\n (throttleClick)=\"save.emit()\"\n madThrottleClick\n >\n {{ saveText() }}\n </mad-primary-button>\n <mad-outline-button data-testid=\"cancel-btn\" [title]=\"cancelText()\" [disabled]=\"cancelDisabled()\" (click)=\"cancel.emit()\">\n {{ cancelText() }}\n </mad-outline-button>\n </mat-card-actions>\n }\n</mat-card>\n", styles: [":host{display:block}.card-header{height:48px}.card-title-group{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%}.card-title{display:flex;align-items:center}.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:.25rem;flex-shrink:0}.collapse-icon{transition:transform .1s ease}.collapse-icon--collapsed{transform:rotate(180deg)}.card-actions{display:flex;gap:.75rem;padding:1.5rem 1rem}.card-content-enter{animation:card-content-enter .18s cubic-bezier(.2,0,0,1)}.card-content-leave{animation:card-content-leave .22s cubic-bezier(.4,0,.2,1)}@keyframes card-content-enter{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}@keyframes card-content-leave{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i1$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i1$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i1$3.MatCardTitleGroup, selector: "mat-card-title-group" }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { kind: "directive", type: ThrottleClickDirective, selector: "[madThrottleClick]", inputs: ["throttleTime"], outputs: ["throttleClick"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }] }); }
1301
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: CardComponent, isStandalone: true, selector: "mad-card", inputs: { cancelDisabled: { classPropertyName: "cancelDisabled", publicName: "cancelDisabled", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, editText: { classPropertyName: "editText", publicName: "editText", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, saveDisabled: { classPropertyName: "saveDisabled", publicName: "saveDisabled", isSignal: true, isRequired: false, transformFunction: null }, saveText: { classPropertyName: "saveText", publicName: "saveText", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, editMode: { classPropertyName: "editMode", publicName: "editMode", isSignal: true, isRequired: false, transformFunction: null }, additionalActionIcon: { classPropertyName: "additionalActionIcon", publicName: "additionalActionIcon", isSignal: true, isRequired: false, transformFunction: null }, additionalActionText: { classPropertyName: "additionalActionText", publicName: "additionalActionText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange", edit: "edit", cancel: "cancel", save: "save", additionalAction: "additionalAction" }, ngImport: i0, template: "<mat-card>\n @if (showHeader()) {\n <mat-card-header class=\"card-header\">\n <mat-card-title-group class=\"card-title-group\">\n @if (title(); as cardTitle) {\n <mat-card-title data-cy=\"card-title\" class=\"card-title\">\n {{ cardTitle }}\n </mat-card-title>\n }\n <div data-cy=\"title-buttons-block\" class=\"header-actions\">\n @if (showCollapseButton()) {\n <mad-icon-button data-testid=\"collapse-btn\" (click)=\"toggleCollapse()\">\n <mat-icon [class]=\"collapseIconClasses()\"> keyboard_arrow_up </mat-icon>\n </mad-icon-button>\n }\n @if (showAdditionalActionButton()) {\n <mad-icon-button data-testid=\"additional-btn\" (click)=\"additionalAction.emit()\" [title]=\"additionalActionText()\" type=\"button\">\n <mat-icon>{{ additionalActionIcon() }}</mat-icon>\n </mad-icon-button>\n }\n @if (showEditButton()) {\n <mad-icon-button data-testid=\"edit-btn\" [title]=\"editText()\" (click)=\"onEdit()\" type=\"button\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n }\n </div>\n </mat-card-title-group>\n </mat-card-header>\n }\n\n @if (expanded()) {\n <mat-card-content animate.enter=\"card-content-enter\" animate.leave=\"card-content-leave\">\n <ng-content />\n </mat-card-content>\n }\n\n @if (showActions()) {\n <mat-card-actions class=\"card-actions\">\n <mad-primary-button\n data-testid=\"save-btn\"\n [title]=\"saveText()\"\n [disabled]=\"saveDisabled()\"\n (throttleClick)=\"save.emit()\"\n madThrottleClick\n >\n {{ saveText() }}\n </mad-primary-button>\n <mad-outline-button data-testid=\"cancel-btn\" [title]=\"cancelText()\" [disabled]=\"cancelDisabled()\" (click)=\"cancel.emit()\">\n {{ cancelText() }}\n </mad-outline-button>\n </mat-card-actions>\n }\n</mat-card>\n", styles: [":host{display:block}.card-header{height:48px}.card-title-group{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%}.card-title{display:flex;align-items:center}.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:.25rem;flex-shrink:0}.collapse-icon{transition:transform .1s ease}.collapse-icon--collapsed{transform:rotate(180deg)}.card-actions{display:flex;gap:.75rem;padding:1.5rem 1rem}.card-content-enter{animation:card-content-enter .18s cubic-bezier(.2,0,0,1)}.card-content-leave{animation:card-content-leave .22s cubic-bezier(.4,0,.2,1)}@keyframes card-content-enter{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}@keyframes card-content-leave{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i1$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i1$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i1$3.MatCardTitleGroup, selector: "mat-card-title-group" }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { kind: "directive", type: ThrottleClickDirective, selector: "[madThrottleClick]", inputs: ["throttleTime"], outputs: ["throttleClick"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }] }); }
1302
1302
  }
1303
1303
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardComponent, decorators: [{
1304
1304
  type: Component,
@@ -1331,340 +1331,204 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
1331
1331
  }]
1332
1332
  }] });
1333
1333
 
1334
- class BaseQuickListComponent {
1335
- constructor(changeDetectorRef, formBuilder) {
1336
- this.changeDetectorRef = changeDetectorRef;
1337
- this.formBuilder = formBuilder;
1338
- this.allItems = [];
1339
- this.addLabel = 'NOT SET';
1340
- this.addPossible = true;
1341
- this.removePossible = true;
1342
- this.blankItem = {};
1343
- this.added = new EventEmitter();
1344
- this.removed = new EventEmitter();
1334
+ class ContentHeaderComponent {
1335
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1336
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentHeaderComponent, isStandalone: true, selector: "mad-content-header", ngImport: i0, template: "<div class=\"content-header\">\n <ng-content></ng-content>\n</div>\n", styles: [".content-header{padding-right:.5rem;background-color:var(--background-color)}\n"] }); }
1337
+ }
1338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentHeaderComponent, decorators: [{
1339
+ type: Component,
1340
+ args: [{ selector: 'mad-content-header', standalone: true, template: "<div class=\"content-header\">\n <ng-content></ng-content>\n</div>\n", styles: [".content-header{padding-right:.5rem;background-color:var(--background-color)}\n"] }]
1341
+ }] });
1342
+
1343
+ class ContentPanelContainerComponent {
1344
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1345
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerComponent, isStandalone: true, selector: "mad-content-panel-container", ngImport: i0, template: "<div class=\"content-panel-sidebar-wrapper\">\n <ng-content select=\"mad-content-panel-container-sidebar\"></ng-content>\n <div class=\"content-panel-outer-wrapper\">\n <ng-content select=\"mad-content-panel-container-content\"></ng-content>\n <ng-content select=\"mad-content-panel-container-footer\"></ng-content>\n </div>\n</div>\n", styles: [":host{position:relative;overflow:hidden;display:flex;flex:1 1 auto;min-width:0;min-height:.05rem;background-color:var(--background-color)}.content-panel-outer-wrapper{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;text-overflow:ellipsis}.content-panel-sidebar-wrapper{width:100%;display:flex;flex:1 1 auto;min-width:0;flex-direction:row}\n"] }); }
1346
+ }
1347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerComponent, decorators: [{
1348
+ type: Component,
1349
+ args: [{ selector: 'mad-content-panel-container', standalone: true, template: "<div class=\"content-panel-sidebar-wrapper\">\n <ng-content select=\"mad-content-panel-container-sidebar\"></ng-content>\n <div class=\"content-panel-outer-wrapper\">\n <ng-content select=\"mad-content-panel-container-content\"></ng-content>\n <ng-content select=\"mad-content-panel-container-footer\"></ng-content>\n </div>\n</div>\n", styles: [":host{position:relative;overflow:hidden;display:flex;flex:1 1 auto;min-width:0;min-height:.05rem;background-color:var(--background-color)}.content-panel-outer-wrapper{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;text-overflow:ellipsis}.content-panel-sidebar-wrapper{width:100%;display:flex;flex:1 1 auto;min-width:0;flex-direction:row}\n"] }]
1350
+ }] });
1351
+
1352
+ class ContentPanelContainerContentComponent {
1353
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1354
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerContentComponent, isStandalone: true, selector: "mad-content-panel-container-content", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{flex:1 1 auto;min-width:0;overflow-y:auto;border-top:.05rem solid #cccccc;padding:1rem}\n"] }); }
1355
+ }
1356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerContentComponent, decorators: [{
1357
+ type: Component,
1358
+ args: [{ selector: 'mad-content-panel-container-content', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{flex:1 1 auto;min-width:0;overflow-y:auto;border-top:.05rem solid #cccccc;padding:1rem}\n"] }]
1359
+ }] });
1360
+
1361
+ class ContentPanelContainerFooterComponent {
1362
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1363
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerFooterComponent, isStandalone: true, selector: "mad-content-panel-container-footer", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid #cccccc;padding:.25rem 1rem;display:flex;flex:0 0 auto;align-items:center;min-height:2rem;width:auto}\n"] }); }
1364
+ }
1365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerFooterComponent, decorators: [{
1366
+ type: Component,
1367
+ args: [{ selector: 'mad-content-panel-container-footer', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid #cccccc;padding:.25rem 1rem;display:flex;flex:0 0 auto;align-items:center;min-height:2rem;width:auto}\n"] }]
1368
+ }] });
1369
+
1370
+ class ContentPanelContainerSidebarComponent {
1371
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1372
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerSidebarComponent, isStandalone: true, selector: "mad-content-panel-container-sidebar", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid var(--mat-sys-outline-variant);min-height:2rem;display:flex;flex:0 0 auto}\n"] }); }
1373
+ }
1374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerSidebarComponent, decorators: [{
1375
+ type: Component,
1376
+ args: [{ selector: 'mad-content-panel-container-sidebar', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid var(--mat-sys-outline-variant);min-height:2rem;display:flex;flex:0 0 auto}\n"] }]
1377
+ }] });
1378
+
1379
+ class MainContainerComponent {
1380
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MainContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1381
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: MainContainerComponent, isStandalone: true, selector: "mad-main-container", ngImport: i0, template: "<div class=\"main-container\">\n <ng-content select=\"mad-content-header\"></ng-content>\n <ng-content select=\"mad-flowbar\"></ng-content>\n <ng-content select=\"mad-content-panel-container\"></ng-content>\n</div>\n", styles: [".main-container{height:100%;display:flex;flex-direction:column}\n"] }); }
1382
+ }
1383
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MainContainerComponent, decorators: [{
1384
+ type: Component,
1385
+ args: [{ selector: 'mad-main-container', standalone: true, template: "<div class=\"main-container\">\n <ng-content select=\"mad-content-header\"></ng-content>\n <ng-content select=\"mad-flowbar\"></ng-content>\n <ng-content select=\"mad-content-panel-container\"></ng-content>\n</div>\n", styles: [".main-container{height:100%;display:flex;flex-direction:column}\n"] }]
1386
+ }] });
1387
+
1388
+ class ContentPanelModule {
1389
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1390
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, imports: [CommonModule,
1391
+ ContentHeaderComponent,
1392
+ ContentPanelContainerComponent,
1393
+ ContentPanelContainerContentComponent,
1394
+ ContentPanelContainerFooterComponent,
1395
+ ContentPanelContainerSidebarComponent,
1396
+ MainContainerComponent], exports: [ContentHeaderComponent,
1397
+ ContentPanelContainerComponent,
1398
+ ContentPanelContainerContentComponent,
1399
+ ContentPanelContainerFooterComponent,
1400
+ ContentPanelContainerSidebarComponent,
1401
+ MainContainerComponent] }); }
1402
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, imports: [CommonModule] }); }
1403
+ }
1404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, decorators: [{
1405
+ type: NgModule,
1406
+ args: [{
1407
+ imports: [
1408
+ CommonModule,
1409
+ ContentHeaderComponent,
1410
+ ContentPanelContainerComponent,
1411
+ ContentPanelContainerContentComponent,
1412
+ ContentPanelContainerFooterComponent,
1413
+ ContentPanelContainerSidebarComponent,
1414
+ MainContainerComponent,
1415
+ ],
1416
+ exports: [
1417
+ ContentHeaderComponent,
1418
+ ContentPanelContainerComponent,
1419
+ ContentPanelContainerContentComponent,
1420
+ ContentPanelContainerFooterComponent,
1421
+ ContentPanelContainerSidebarComponent,
1422
+ MainContainerComponent,
1423
+ ],
1424
+ }]
1425
+ }] });
1426
+
1427
+ /**
1428
+ * @deprecated Use `data-table` instead.
1429
+ */
1430
+ class TableComponent {
1431
+ constructor() {
1432
+ this.columns = [];
1433
+ this.filterLabel = 'NOT SET';
1434
+ this.filterPlaceholder = 'NOT SET';
1435
+ this.pageSizeOptions = [5, 10, 15];
1436
+ this.defaultPageSize = this.pageSizeOptions?.[0] || 10;
1437
+ this.rowActions = [];
1438
+ this.tableActions = [];
1439
+ this.tableAction = new EventEmitter();
1440
+ this.rowAction = new EventEmitter();
1441
+ this.sortEvent = new EventEmitter();
1442
+ this.ACTION_COLUMN_NAME = '__action__';
1443
+ this.isFilterEnabled = false;
1444
+ this.isPaginationEnabled = false;
1345
1445
  }
1346
- ngOnInit() {
1347
- this.addEventFunction = this.addItem.bind(this);
1348
- if (this.minItems) {
1349
- for (let n = this.allItems.length; n < this.minItems; n++) {
1350
- this.interalAddItem();
1351
- }
1446
+ set displayedData(data) {
1447
+ if (!this.dataSource) {
1448
+ this.dataSource = new MatTableDataSource(data);
1352
1449
  }
1353
- }
1354
- ngAfterViewInit() {
1355
- setTimeout(() => this.setFocusOnAdd(), 1);
1356
- }
1357
- addItem() {
1358
- const newItem = this.interalAddItem();
1359
- if (!!newItem) {
1360
- this.added.emit(newItem);
1450
+ else {
1451
+ this.dataSource.data = data;
1361
1452
  }
1362
1453
  }
1363
- addReactiveItem() {
1364
- if (this.isAddReactiveAllowed()) {
1365
- this.added.emit(null);
1454
+ set paginationEnabled(isPaginationEnabled) {
1455
+ this.isPaginationEnabled = isPaginationEnabled;
1456
+ // eslint-disable-next-line
1457
+ const pageSize = this.isPaginationEnabled ? this.defaultPageSize : Number.MAX_VALUE;
1458
+ if (this.dataSource.paginator) {
1459
+ this.dataSource.paginator.pageSize = pageSize;
1366
1460
  }
1367
1461
  }
1368
- removeItem(item) {
1369
- if (this.isDeleteAllowed()) {
1370
- this.allItems.splice(this.allItems.indexOf(item), 1);
1371
- this.removed.emit(item);
1372
- }
1462
+ set filterEnabled(isFilterEnabled) {
1463
+ this.isFilterEnabled = isFilterEnabled;
1464
+ this.setFilterValue(undefined);
1373
1465
  }
1374
- removeReactiveItem(item) {
1375
- if (this.isDeleteReactiveAllowed()) {
1376
- const index = this.formArray.controls.indexOf(item);
1377
- if (index >= 0) {
1378
- this.formArray.controls.splice(index, 1);
1379
- this.formArray.updateValueAndValidity();
1380
- this.removed.emit(null);
1381
- }
1466
+ ngOnInit() {
1467
+ this.columnNames = this.columns.map((column) => column.label);
1468
+ this.isRowClickable = this.rowActions.length > 0;
1469
+ if (this.isRowClickable) {
1470
+ this.columnNames.unshift(this.ACTION_COLUMN_NAME);
1471
+ this.defaultAction = this.rowActions[0];
1382
1472
  }
1383
1473
  }
1384
- setFocusOnAdd() {
1385
- this.rowCountFocus = this.itemRows.length;
1386
- this.itemRows.changes.subscribe((els) => {
1387
- if (els.length > this.rowCountFocus && !!els.last) {
1388
- const firstFocusable = els.last.nativeElement.querySelector("button, a, input, select, textarea, [tabindex]:not([tabindex='-1'])");
1389
- if (firstFocusable) {
1390
- firstFocusable.focus();
1391
- }
1392
- }
1393
- this.rowCountFocus = els.length;
1394
- });
1395
- }
1396
- isAddAllowed() {
1397
- return this.addPossible && (!this.maxItems || this.allItems?.length < this.maxItems);
1474
+ ngAfterViewInit() {
1475
+ this.dataSource.paginator = this.paginator;
1476
+ this.dataSource.sort = this.sort;
1477
+ // set custom filter predicate to enable search for multiple search strings:
1478
+ // e.g. "one two three"
1479
+ this.dataSource.filterPredicate = (data, filter) => !filter || filter.split(/\s+/).every((term) => !!Object.keys(data).find((key) => data[key].includes(term)));
1398
1480
  }
1399
- isAddReactiveAllowed() {
1400
- return this.addPossible && (!this.maxItems || this.formArray?.controls.length < this.maxItems);
1481
+ onFilter(value) {
1482
+ this.setFilterValue(value);
1401
1483
  }
1402
- isDeleteAllowed() {
1403
- return this.removePossible && (!this.minItems || this.allItems?.length > this.minItems);
1484
+ onRowEvent(event, row, action = this.defaultAction) {
1485
+ if (!!action && !this.isClickOnRowMenuIcon(event)) {
1486
+ this.rowAction.emit({ ...action, outputRow: row });
1487
+ }
1404
1488
  }
1405
- isDeleteReactiveAllowed() {
1406
- return this.removePossible && (!this.minItems || this.formArray?.controls.length > this.minItems);
1489
+ onSortingEvent(sortingParams) {
1490
+ this.sortEvent.emit(sortingParams);
1407
1491
  }
1408
- interalAddItem() {
1409
- if (this.isAddAllowed()) {
1410
- const newItem = { ...this.blankItem };
1411
- // creates ids in the form of "n5kdz1pljl8"
1412
- newItem.id = Math.random().toString(36).substring(2);
1413
- this.allItems.push(newItem);
1414
- this.changeDetectorRef.detectChanges();
1415
- return newItem;
1492
+ onTableAction(tableAction) {
1493
+ if (!!tableAction) {
1494
+ this.tableAction.emit(tableAction);
1416
1495
  }
1417
- return null;
1418
1496
  }
1419
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BaseQuickListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1420
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: BaseQuickListComponent, isStandalone: true, selector: "mad-base-quick-list", inputs: { allItems: "allItems", addLabel: "addLabel", addPossible: "addPossible", removePossible: "removePossible", blankItem: "blankItem", readonly: "readonly", maxItems: "maxItems", minItems: "minItems", formArray: "formArray" }, outputs: { added: "added", removed: "removed" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "itemRows", predicate: ["row"], descendants: true }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager }); }
1497
+ setFilterValue(value) {
1498
+ this.dataSource.filter = value?.trim().toLowerCase();
1499
+ }
1500
+ isClickOnRowMenuIcon(event) {
1501
+ return event?.target?.classList.contains('mat-icon');
1502
+ }
1503
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1504
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: TableComponent, isStandalone: true, selector: "mad-table", inputs: { columns: "columns", filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", noDataText: "noDataText", pageSizeOptions: "pageSizeOptions", defaultPageSize: "defaultPageSize", rowActions: "rowActions", tableActions: "tableActions", displayedData: "displayedData", paginationEnabled: "paginationEnabled", filterEnabled: "filterEnabled" }, outputs: { tableAction: "tableAction", rowAction: "rowAction", sortEvent: "sortEvent" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<!-- Table actions -->\n@if (tableActions?.length) {\n <div>\n @for (tableAction of tableActions; track tableAction) {\n <mad-primary-button class=\"table-action\" (click)=\"onTableAction(tableAction)\">\n {{ tableAction.label }}\n </mad-primary-button>\n }\n </div>\n}\n\n<!-- Row action buttons -->\n<mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n <button mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ rowAction.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table filter -->\n@if (isFilterEnabled) {\n <mat-form-field>\n <mat-label>{{ filterLabel }}</mat-label>\n <input matInput (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n}\n\n<!-- Table -->\n@if (dataSource?.data?.length > 0) {\n <div class=\"mad-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column -->\n @if (rowActions?.length) {\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"row-action-button\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"row-action-button\">\n <mad-icon-button [matMenuTriggerData]=\"{ element: element }\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n </td>\n </ng-container>\n }\n <!-- Columns with data -->\n @for (column of columns; track column) {\n <ng-container [matColumnDef]=\"column.label\" [sticky]=\"column.isSticky\">\n @if (column.isSortable) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.label }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ column.label }}\n </th>\n } @else {\n <th mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ column.label }}\n </th>\n }\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"column.isRightAligned\">\n {{ element[column.dataPropertyName] }}\n </td>\n </ng-container>\n }\n <tr mat-header-row *matHeaderRowDef=\"columnNames\"></tr>\n <tr\n mat-row\n [class.clickable-table-row]=\"isRowClickable\"\n (click)=\"onRowEvent($event, row)\"\n *matRowDef=\"let row; columns: columnNames\"\n ></tr>\n </table>\n </div>\n} @else {\n <div class=\"noDataText\">\n {{ noDataText }}\n </div>\n}\n<!-- Pagination -->\n<mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n showFirstLastButtons\n>\n</mat-paginator>\n\n<!-- No data alert -->\n", styles: [".text-right{text-align:right!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-button{width:10px}.noDataText{width:100%;text-align:center}.mad-table{width:100%;overflow-x:auto}\n"], dependencies: [{ kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { 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: 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$1.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: 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: "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: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }] }); }
1421
1505
  }
1422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BaseQuickListComponent, decorators: [{
1506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableComponent, decorators: [{
1423
1507
  type: Component,
1424
- args: [{ selector: 'mad-base-quick-list', changeDetection: ChangeDetectionStrategy.Eager, template: '', standalone: true }]
1425
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }], propDecorators: { allItems: [{
1508
+ args: [{ selector: 'mad-table', imports: [
1509
+ PrimaryButtonComponent,
1510
+ MatMenuModule,
1511
+ MatFormFieldModule,
1512
+ MatInputModule,
1513
+ MatTableModule,
1514
+ MatSortModule,
1515
+ IconButtonComponent,
1516
+ MatIconModule,
1517
+ MatPaginatorModule,
1518
+ ], template: "<!-- Table actions -->\n@if (tableActions?.length) {\n <div>\n @for (tableAction of tableActions; track tableAction) {\n <mad-primary-button class=\"table-action\" (click)=\"onTableAction(tableAction)\">\n {{ tableAction.label }}\n </mad-primary-button>\n }\n </div>\n}\n\n<!-- Row action buttons -->\n<mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n <button mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ rowAction.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table filter -->\n@if (isFilterEnabled) {\n <mat-form-field>\n <mat-label>{{ filterLabel }}</mat-label>\n <input matInput (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n}\n\n<!-- Table -->\n@if (dataSource?.data?.length > 0) {\n <div class=\"mad-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column -->\n @if (rowActions?.length) {\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"row-action-button\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"row-action-button\">\n <mad-icon-button [matMenuTriggerData]=\"{ element: element }\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n </td>\n </ng-container>\n }\n <!-- Columns with data -->\n @for (column of columns; track column) {\n <ng-container [matColumnDef]=\"column.label\" [sticky]=\"column.isSticky\">\n @if (column.isSortable) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.label }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ column.label }}\n </th>\n } @else {\n <th mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ column.label }}\n </th>\n }\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"column.isRightAligned\">\n {{ element[column.dataPropertyName] }}\n </td>\n </ng-container>\n }\n <tr mat-header-row *matHeaderRowDef=\"columnNames\"></tr>\n <tr\n mat-row\n [class.clickable-table-row]=\"isRowClickable\"\n (click)=\"onRowEvent($event, row)\"\n *matRowDef=\"let row; columns: columnNames\"\n ></tr>\n </table>\n </div>\n} @else {\n <div class=\"noDataText\">\n {{ noDataText }}\n </div>\n}\n<!-- Pagination -->\n<mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n showFirstLastButtons\n>\n</mat-paginator>\n\n<!-- No data alert -->\n", styles: [".text-right{text-align:right!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-button{width:10px}.noDataText{width:100%;text-align:center}.mad-table{width:100%;overflow-x:auto}\n"] }]
1519
+ }], propDecorators: { columns: [{
1426
1520
  type: Input
1427
- }], addLabel: [{
1521
+ }], filterLabel: [{
1428
1522
  type: Input
1429
- }], addPossible: [{
1523
+ }], filterPlaceholder: [{
1430
1524
  type: Input
1431
- }], removePossible: [{
1525
+ }], noDataText: [{
1432
1526
  type: Input
1433
- }], blankItem: [{
1527
+ }], pageSizeOptions: [{
1434
1528
  type: Input
1435
- }], readonly: [{
1529
+ }], defaultPageSize: [{
1436
1530
  type: Input
1437
- }], maxItems: [{
1438
- type: Input
1439
- }], minItems: [{
1440
- type: Input
1441
- }], formArray: [{
1442
- type: Input
1443
- }], added: [{
1444
- type: Output
1445
- }], removed: [{
1446
- type: Output
1447
- }], itemTemplate: [{
1448
- type: ContentChild,
1449
- args: [TemplateRef]
1450
- }], itemRows: [{
1451
- type: ViewChildren,
1452
- args: ['row']
1453
- }] } });
1454
-
1455
- class QuickListCompactComponent extends BaseQuickListComponent {
1456
- constructor(changeDetectorRef, formBuilder) {
1457
- super(changeDetectorRef, formBuilder);
1458
- this.changeDetectorRef = changeDetectorRef;
1459
- this.formBuilder = formBuilder;
1460
- }
1461
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListCompactComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1462
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: QuickListCompactComponent, isStandalone: true, selector: "mad-quick-list-compact", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div class=\"flex-container\" #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddAllowed()\" (click)=\"addItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.allItems.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addItem()\" [disabled]=\"!isAddAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: LinkButtonComponent, selector: "mad-link-button" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
1463
- }
1464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListCompactComponent, decorators: [{
1465
- type: Component,
1466
- args: [{ selector: 'mad-quick-list-compact', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, LinkButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div class=\"flex-container\" #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddAllowed()\" (click)=\"addItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.allItems.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addItem()\" [disabled]=\"!isAddAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n" }]
1467
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
1468
-
1469
- // Based on https://github.com/porscheinformatik/clarity-addons/blob/master/src/clr-addons/generic-quick-list/generic-quick-list.ts
1470
- class QuickListComponent extends BaseQuickListComponent {
1471
- constructor(changeDetectorRef, formBuilder) {
1472
- super(changeDetectorRef, formBuilder);
1473
- this.changeDetectorRef = changeDetectorRef;
1474
- this.formBuilder = formBuilder;
1475
- }
1476
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1477
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: QuickListComponent, isStandalone: true, selector: "mad-quick-list", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addItem()\" [disabled]=\"!addPossible || !isAddAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
1478
- }
1479
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListComponent, decorators: [{
1480
- type: Component,
1481
- args: [{ selector: 'mad-quick-list', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, OutlineButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addItem()\" [disabled]=\"!addPossible || !isAddAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n" }]
1482
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
1483
-
1484
- class ReactiveFormQuickListComponent extends BaseQuickListComponent {
1485
- constructor(changeDetectorRef, formBuilder) {
1486
- super(changeDetectorRef, formBuilder);
1487
- this.changeDetectorRef = changeDetectorRef;
1488
- this.formBuilder = formBuilder;
1489
- }
1490
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1491
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ReactiveFormQuickListComponent, isStandalone: true, selector: "mad-reactive-form-quick-list", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
1492
- }
1493
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListComponent, decorators: [{
1494
- type: Component,
1495
- args: [{ selector: 'mad-reactive-form-quick-list', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, OutlineButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n" }]
1496
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
1497
-
1498
- class ReactiveFormQuickListCompactComponent extends BaseQuickListComponent {
1499
- constructor(changeDetectorRef, formBuilder) {
1500
- super(changeDetectorRef, formBuilder);
1501
- this.changeDetectorRef = changeDetectorRef;
1502
- this.formBuilder = formBuilder;
1503
- }
1504
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListCompactComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1505
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ReactiveFormQuickListCompactComponent, isStandalone: true, selector: "mad-reactive-form-quick-list-compact", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddReactiveAllowed()\" (click)=\"addReactiveItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.formArray?.controls.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: LinkButtonComponent, selector: "mad-link-button" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
1506
- }
1507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListCompactComponent, decorators: [{
1508
- type: Component,
1509
- args: [{ selector: 'mad-reactive-form-quick-list-compact', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, LinkButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddReactiveAllowed()\" (click)=\"addReactiveItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.formArray?.controls.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n" }]
1510
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
1511
-
1512
- class QuickListModule {
1513
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1514
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, imports: [CommonModule,
1515
- MatButtonModule,
1516
- MatIconModule,
1517
- ButtonModule,
1518
- ReactiveFormsModule,
1519
- QuickListComponent,
1520
- BaseQuickListComponent,
1521
- QuickListCompactComponent,
1522
- ReactiveFormQuickListComponent,
1523
- ReactiveFormQuickListCompactComponent], exports: [QuickListComponent,
1524
- QuickListCompactComponent,
1525
- BaseQuickListComponent,
1526
- ReactiveFormQuickListComponent,
1527
- ReactiveFormQuickListCompactComponent] }); }
1528
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, imports: [CommonModule,
1529
- MatButtonModule,
1530
- MatIconModule,
1531
- ButtonModule,
1532
- ReactiveFormsModule,
1533
- QuickListComponent,
1534
- QuickListCompactComponent,
1535
- ReactiveFormQuickListComponent,
1536
- ReactiveFormQuickListCompactComponent] }); }
1537
- }
1538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, decorators: [{
1539
- type: NgModule,
1540
- args: [{
1541
- imports: [
1542
- CommonModule,
1543
- MatButtonModule,
1544
- MatIconModule,
1545
- ButtonModule,
1546
- ReactiveFormsModule,
1547
- QuickListComponent,
1548
- BaseQuickListComponent,
1549
- QuickListCompactComponent,
1550
- ReactiveFormQuickListComponent,
1551
- ReactiveFormQuickListCompactComponent,
1552
- ],
1553
- exports: [
1554
- QuickListComponent,
1555
- QuickListCompactComponent,
1556
- BaseQuickListComponent,
1557
- ReactiveFormQuickListComponent,
1558
- ReactiveFormQuickListCompactComponent,
1559
- ],
1560
- }]
1561
- }] });
1562
-
1563
- /**
1564
- * @deprecated Use `data-table` instead.
1565
- */
1566
- class TableComponent {
1567
- constructor() {
1568
- this.columns = [];
1569
- this.filterLabel = 'NOT SET';
1570
- this.filterPlaceholder = 'NOT SET';
1571
- this.pageSizeOptions = [5, 10, 15];
1572
- this.defaultPageSize = this.pageSizeOptions?.[0] || 10;
1573
- this.rowActions = [];
1574
- this.tableActions = [];
1575
- this.tableAction = new EventEmitter();
1576
- this.rowAction = new EventEmitter();
1577
- this.sortEvent = new EventEmitter();
1578
- this.ACTION_COLUMN_NAME = '__action__';
1579
- this.isFilterEnabled = false;
1580
- this.isPaginationEnabled = false;
1581
- }
1582
- set displayedData(data) {
1583
- if (!this.dataSource) {
1584
- this.dataSource = new MatTableDataSource(data);
1585
- }
1586
- else {
1587
- this.dataSource.data = data;
1588
- }
1589
- }
1590
- set paginationEnabled(isPaginationEnabled) {
1591
- this.isPaginationEnabled = isPaginationEnabled;
1592
- // eslint-disable-next-line
1593
- const pageSize = this.isPaginationEnabled ? this.defaultPageSize : Number.MAX_VALUE;
1594
- if (this.dataSource.paginator) {
1595
- this.dataSource.paginator.pageSize = pageSize;
1596
- }
1597
- }
1598
- set filterEnabled(isFilterEnabled) {
1599
- this.isFilterEnabled = isFilterEnabled;
1600
- this.setFilterValue(undefined);
1601
- }
1602
- ngOnInit() {
1603
- this.columnNames = this.columns.map((column) => column.label);
1604
- this.isRowClickable = this.rowActions.length > 0;
1605
- if (this.isRowClickable) {
1606
- this.columnNames.unshift(this.ACTION_COLUMN_NAME);
1607
- this.defaultAction = this.rowActions[0];
1608
- }
1609
- }
1610
- ngAfterViewInit() {
1611
- this.dataSource.paginator = this.paginator;
1612
- this.dataSource.sort = this.sort;
1613
- // set custom filter predicate to enable search for multiple search strings:
1614
- // e.g. "one two three"
1615
- this.dataSource.filterPredicate = (data, filter) => !filter || filter.split(/\s+/).every((term) => !!Object.keys(data).find((key) => data[key].includes(term)));
1616
- }
1617
- onFilter(value) {
1618
- this.setFilterValue(value);
1619
- }
1620
- onRowEvent(event, row, action = this.defaultAction) {
1621
- if (!!action && !this.isClickOnRowMenuIcon(event)) {
1622
- this.rowAction.emit({ ...action, outputRow: row });
1623
- }
1624
- }
1625
- onSortingEvent(sortingParams) {
1626
- this.sortEvent.emit(sortingParams);
1627
- }
1628
- onTableAction(tableAction) {
1629
- if (!!tableAction) {
1630
- this.tableAction.emit(tableAction);
1631
- }
1632
- }
1633
- setFilterValue(value) {
1634
- this.dataSource.filter = value?.trim().toLowerCase();
1635
- }
1636
- isClickOnRowMenuIcon(event) {
1637
- return event?.target?.classList.contains('mat-icon');
1638
- }
1639
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1640
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: TableComponent, isStandalone: true, selector: "mad-table", inputs: { columns: "columns", filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", noDataText: "noDataText", pageSizeOptions: "pageSizeOptions", defaultPageSize: "defaultPageSize", rowActions: "rowActions", tableActions: "tableActions", displayedData: "displayedData", paginationEnabled: "paginationEnabled", filterEnabled: "filterEnabled" }, outputs: { tableAction: "tableAction", rowAction: "rowAction", sortEvent: "sortEvent" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<!-- Table actions -->\n@if (tableActions?.length) {\n <div>\n @for (tableAction of tableActions; track tableAction) {\n <mad-primary-button class=\"table-action\" (click)=\"onTableAction(tableAction)\">\n {{ tableAction.label }}\n </mad-primary-button>\n }\n </div>\n}\n\n<!-- Row action buttons -->\n<mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n <button mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ rowAction.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table filter -->\n@if (isFilterEnabled) {\n <mat-form-field>\n <mat-label>{{ filterLabel }}</mat-label>\n <input matInput (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n}\n\n<!-- Table -->\n@if (dataSource?.data?.length > 0) {\n <div class=\"mad-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column -->\n @if (rowActions?.length) {\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"row-action-button\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"row-action-button\">\n <mad-icon-button [matMenuTriggerData]=\"{ element: element }\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n </td>\n </ng-container>\n }\n <!-- Columns with data -->\n @for (column of columns; track column) {\n <ng-container [matColumnDef]=\"column.label\" [sticky]=\"column.isSticky\">\n @if (column.isSortable) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.label }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ column.label }}\n </th>\n } @else {\n <th mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ column.label }}\n </th>\n }\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"column.isRightAligned\">\n {{ element[column.dataPropertyName] }}\n </td>\n </ng-container>\n }\n <tr mat-header-row *matHeaderRowDef=\"columnNames\"></tr>\n <tr\n mat-row\n [class.clickable-table-row]=\"isRowClickable\"\n (click)=\"onRowEvent($event, row)\"\n *matRowDef=\"let row; columns: columnNames\"\n ></tr>\n </table>\n </div>\n} @else {\n <div class=\"noDataText\">\n {{ noDataText }}\n </div>\n}\n<!-- Pagination -->\n<mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n showFirstLastButtons\n>\n</mat-paginator>\n\n<!-- No data alert -->\n", styles: [".text-right{text-align:right!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-button{width:10px}.noDataText{width:100%;text-align:center}.mad-table{width:100%;overflow-x:auto}\n"], dependencies: [{ kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { 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: 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: 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: "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: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }] }); }
1641
- }
1642
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableComponent, decorators: [{
1643
- type: Component,
1644
- args: [{ selector: 'mad-table', imports: [
1645
- PrimaryButtonComponent,
1646
- MatMenuModule,
1647
- MatFormFieldModule,
1648
- MatInputModule,
1649
- MatTableModule,
1650
- MatSortModule,
1651
- IconButtonComponent,
1652
- MatIconModule,
1653
- MatPaginatorModule,
1654
- ], template: "<!-- Table actions -->\n@if (tableActions?.length) {\n <div>\n @for (tableAction of tableActions; track tableAction) {\n <mad-primary-button class=\"table-action\" (click)=\"onTableAction(tableAction)\">\n {{ tableAction.label }}\n </mad-primary-button>\n }\n </div>\n}\n\n<!-- Row action buttons -->\n<mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActions; track rowAction) {\n <button mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ rowAction.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table filter -->\n@if (isFilterEnabled) {\n <mat-form-field>\n <mat-label>{{ filterLabel }}</mat-label>\n <input matInput (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n}\n\n<!-- Table -->\n@if (dataSource?.data?.length > 0) {\n <div class=\"mad-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column -->\n @if (rowActions?.length) {\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"row-action-button\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"row-action-button\">\n <mad-icon-button [matMenuTriggerData]=\"{ element: element }\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n </td>\n </ng-container>\n }\n <!-- Columns with data -->\n @for (column of columns; track column) {\n <ng-container [matColumnDef]=\"column.label\" [sticky]=\"column.isSticky\">\n @if (column.isSortable) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.label }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ column.label }}\n </th>\n } @else {\n <th mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ column.label }}\n </th>\n }\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"column.isRightAligned\">\n {{ element[column.dataPropertyName] }}\n </td>\n </ng-container>\n }\n <tr mat-header-row *matHeaderRowDef=\"columnNames\"></tr>\n <tr\n mat-row\n [class.clickable-table-row]=\"isRowClickable\"\n (click)=\"onRowEvent($event, row)\"\n *matRowDef=\"let row; columns: columnNames\"\n ></tr>\n </table>\n </div>\n} @else {\n <div class=\"noDataText\">\n {{ noDataText }}\n </div>\n}\n<!-- Pagination -->\n<mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n showFirstLastButtons\n>\n</mat-paginator>\n\n<!-- No data alert -->\n", styles: [".text-right{text-align:right!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-button{width:10px}.noDataText{width:100%;text-align:center}.mad-table{width:100%;overflow-x:auto}\n"] }]
1655
- }], propDecorators: { columns: [{
1656
- type: Input
1657
- }], filterLabel: [{
1658
- type: Input
1659
- }], filterPlaceholder: [{
1660
- type: Input
1661
- }], noDataText: [{
1662
- type: Input
1663
- }], pageSizeOptions: [{
1664
- type: Input
1665
- }], defaultPageSize: [{
1666
- type: Input
1667
- }], rowActions: [{
1531
+ }], rowActions: [{
1668
1532
  type: Input
1669
1533
  }], tableActions: [{
1670
1534
  type: Input
@@ -1688,51 +1552,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
1688
1552
  type: Input
1689
1553
  }] } });
1690
1554
 
1691
- class TableModule {
1692
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1693
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: TableModule, imports: [CommonModule,
1694
- MatButtonModule,
1695
- MatIconModule,
1696
- MatFormFieldModule,
1697
- MatInputModule,
1698
- MatMenuModule,
1699
- MatPaginatorModule,
1700
- MatSortModule,
1701
- MatTableModule,
1702
- ButtonModule,
1703
- TableComponent], exports: [TableComponent] }); }
1704
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableModule, imports: [CommonModule,
1705
- MatButtonModule,
1706
- MatIconModule,
1707
- MatFormFieldModule,
1708
- MatInputModule,
1709
- MatMenuModule,
1710
- MatPaginatorModule,
1711
- MatSortModule,
1712
- MatTableModule,
1713
- ButtonModule,
1714
- TableComponent] }); }
1715
- }
1716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableModule, decorators: [{
1717
- type: NgModule,
1718
- args: [{
1719
- imports: [
1720
- CommonModule,
1721
- MatButtonModule,
1722
- MatIconModule,
1723
- MatFormFieldModule,
1724
- MatInputModule,
1725
- MatMenuModule,
1726
- MatPaginatorModule,
1727
- MatSortModule,
1728
- MatTableModule,
1729
- ButtonModule,
1730
- TableComponent,
1731
- ],
1732
- exports: [TableComponent],
1733
- }]
1734
- }] });
1735
-
1736
1555
  class DataTableColumnsModalComponent {
1737
1556
  constructor(dialogRef, data) {
1738
1557
  this.dialogRef = dialogRef;
@@ -1810,7 +1629,7 @@ class DataTableColumnsModalComponent {
1810
1629
  this.filteredAvailableColumns = [...this.availableColumns];
1811
1630
  }
1812
1631
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableColumnsModalComponent, deps: [{ token: i1$5.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
1813
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: DataTableColumnsModalComponent, isStandalone: true, selector: "mad-data-table-columns-modal", ngImport: i0, template: "<h2 mat-dialog-title>{{ data.titleLabel | translate }}</h2>\n<mat-dialog-content>\n <div\n class=\"grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-6 w-full max-w-full box-border pt-2 pb-4 mb-4 border-b border-(--mat-sys-outline-variant)\"\n >\n <div class=\"w-full max-w-full min-w-0 block text-sm\">\n <div class=\"w-full min-h-14 mb-4 text-sm text-(--mat-sys-on-surface-variant) flex justify-end items-stretch flex-col\">\n {{ data.infoTextLabel | translate }}\n </div>\n <div class=\"font-bold mb-1\">{{ data.selectedLabel | translate }}</div>\n <div\n cdkDropList\n #selectedList=\"cdkDropList\"\n [cdkDropListData]=\"selectedColumns\"\n [cdkDropListConnectedTo]=\"[availableList]\"\n class=\"column-drag-list selected-drag-list border border-(--mat-sys-outline-variant) h-[200px] box-border bg-(--mat-sys-surface) rounded overflow-auto block\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (selectedColumn of selectedColumns; track selectedColumn; let i = $index) {\n <div\n class=\"column-drag-box py-3 px-2.5 border-b border-(--mat-sys-outline-variant) text-(--mat-sys-on-surface) flex flex-row items-center justify-between box-border h-10 cursor-move bg-(--mat-sys-surface) text-sm\"\n cdkDrag\n [id]=\"selectedColumn.id\"\n >\n {{ i + 1 }}. {{ selectedColumn.label | translate }}\n </div>\n }\n </div>\n </div>\n\n <div class=\"w-full max-w-full min-w-0 block text-sm\">\n <div class=\"w-full min-h-14 mb-4 text-sm text-(--mat-sys-on-surface-variant) flex justify-end items-stretch flex-col\">\n <!-- Table filter -->\n <mat-form-field class=\"w-full\">\n <mat-label>{{ data.filterColumnsLabel | translate }}</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n (keyup)=\"updateFilterValue()\"\n placeholder=\"{{ data.filterColumnsPlaceHolder | translate }}\"\n [(ngModel)]=\"searchFilter\"\n />\n @if (searchFilter) {\n <button matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearFilterValue()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n <div class=\"font-bold mb-1\">{{ data.availableLabel | translate }}</div>\n <div\n cdkDropList\n cdkDropListSortingDisabled\n #availableList=\"cdkDropList\"\n [cdkDropListData]=\"availableColumns\"\n [cdkDropListConnectedTo]=\"[selectedList]\"\n class=\"column-drag-list border border-(--mat-sys-outline-variant) h-[200px] box-border bg-(--mat-sys-surface) rounded overflow-auto block\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (availableColumn of filteredAvailableColumns; track availableColumn) {\n <div\n class=\"column-drag-box py-3 px-2.5 border-b border-(--mat-sys-outline-variant) text-(--mat-sys-on-surface) flex flex-row items-center justify-between box-border h-10 cursor-move bg-(--mat-sys-surface) text-sm\"\n cdkDrag\n [id]=\"availableColumn.id\"\n >\n {{ availableColumn.label }}\n </div>\n }\n </div>\n </div>\n </div>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <mad-outline-button (click)=\"onCancel()\">\n {{ data.cancelLabel | translate }}\n </mad-outline-button>\n @if (data.deleteDefinitionAllowed) {\n <mad-danger-button (click)=\"onDelete()\">\n {{ data.deleteLabel | translate }}\n </mad-danger-button>\n }\n <mad-primary-button (click)=\"onSave()\" [disabled]=\"!((this.selectedColumns.length || 0) > 0)\">\n {{ data.saveLabel | translate }}\n </mad-primary-button>\n</mat-dialog-actions>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.column-drag-box:last-child{border-bottom:none}.column-drag-list.cdk-drop-list-dragging .column-drag-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "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: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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: 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: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }, { kind: "component", type: DangerButtonComponent, selector: "mad-danger-button" }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "pipe", type: i2$4.TranslatePipe, name: "translate" }] }); }
1632
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: DataTableColumnsModalComponent, isStandalone: true, selector: "mad-data-table-columns-modal", ngImport: i0, template: "<h2 mat-dialog-title>{{ data.titleLabel | translate }}</h2>\n<mat-dialog-content>\n <div\n class=\"grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-6 w-full max-w-full box-border pt-2 pb-4 mb-4 border-b border-(--mat-sys-outline-variant)\"\n >\n <div class=\"w-full max-w-full min-w-0 block text-sm\">\n <div class=\"w-full min-h-14 mb-4 text-sm text-(--mat-sys-on-surface-variant) flex justify-end items-stretch flex-col\">\n {{ data.infoTextLabel | translate }}\n </div>\n <div class=\"font-bold mb-1\">{{ data.selectedLabel | translate }}</div>\n <div\n cdkDropList\n #selectedList=\"cdkDropList\"\n [cdkDropListData]=\"selectedColumns\"\n [cdkDropListConnectedTo]=\"[availableList]\"\n class=\"column-drag-list selected-drag-list border border-(--mat-sys-outline-variant) h-[200px] box-border bg-(--mat-sys-surface) rounded overflow-auto block\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (selectedColumn of selectedColumns; track selectedColumn; let i = $index) {\n <div\n class=\"column-drag-box py-3 px-2.5 border-b border-(--mat-sys-outline-variant) text-(--mat-sys-on-surface) flex flex-row items-center justify-between box-border h-10 cursor-move bg-(--mat-sys-surface) text-sm\"\n cdkDrag\n [id]=\"selectedColumn.id\"\n >\n {{ i + 1 }}. {{ selectedColumn.label | translate }}\n </div>\n }\n </div>\n </div>\n\n <div class=\"w-full max-w-full min-w-0 block text-sm\">\n <div class=\"w-full min-h-14 mb-4 text-sm text-(--mat-sys-on-surface-variant) flex justify-end items-stretch flex-col\">\n <!-- Table filter -->\n <mat-form-field class=\"w-full\">\n <mat-label>{{ data.filterColumnsLabel | translate }}</mat-label>\n <input\n matInput\n autocomplete=\"off\"\n (keyup)=\"updateFilterValue()\"\n placeholder=\"{{ data.filterColumnsPlaceHolder | translate }}\"\n [(ngModel)]=\"searchFilter\"\n />\n @if (searchFilter) {\n <button matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearFilterValue()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n <div class=\"font-bold mb-1\">{{ data.availableLabel | translate }}</div>\n <div\n cdkDropList\n cdkDropListSortingDisabled\n #availableList=\"cdkDropList\"\n [cdkDropListData]=\"availableColumns\"\n [cdkDropListConnectedTo]=\"[selectedList]\"\n class=\"column-drag-list border border-(--mat-sys-outline-variant) h-[200px] box-border bg-(--mat-sys-surface) rounded overflow-auto block\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (availableColumn of filteredAvailableColumns; track availableColumn) {\n <div\n class=\"column-drag-box py-3 px-2.5 border-b border-(--mat-sys-outline-variant) text-(--mat-sys-on-surface) flex flex-row items-center justify-between box-border h-10 cursor-move bg-(--mat-sys-surface) text-sm\"\n cdkDrag\n [id]=\"availableColumn.id\"\n >\n {{ availableColumn.label }}\n </div>\n }\n </div>\n </div>\n </div>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <mad-outline-button (click)=\"onCancel()\">\n {{ data.cancelLabel | translate }}\n </mad-outline-button>\n @if (data.deleteDefinitionAllowed) {\n <mad-danger-button (click)=\"onDelete()\">\n {{ data.deleteLabel | translate }}\n </mad-danger-button>\n }\n <mad-primary-button (click)=\"onSave()\" [disabled]=\"!((this.selectedColumns.length || 0) > 0)\">\n {{ data.saveLabel | translate }}\n </mad-primary-button>\n</mat-dialog-actions>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.column-drag-box:last-child{border-bottom:none}.column-drag-list.cdk-drop-list-dragging .column-drag-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "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: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.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: 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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }, { kind: "component", type: DangerButtonComponent, selector: "mad-danger-button" }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "pipe", type: i2$3.TranslatePipe, name: "translate" }] }); }
1814
1633
  }
1815
1634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableColumnsModalComponent, decorators: [{
1816
1635
  type: Component,
@@ -2161,7 +1980,7 @@ class DataTableFilterDialogComponent {
2161
1980
  this.control.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => this.filterChanged.emit(value));
2162
1981
  }
2163
1982
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableFilterDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2164
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: DataTableFilterDialogComponent, isStandalone: true, selector: "mad-data-table-filter-dialog", inputs: { filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"filter-dialog-box flex items-center w-auto h-20 px-3 py-3 bg-(--mat-sys-surface) [box-shadow:0_1px_3px_0_rgb(0_0_0_/_0.05)]\">\n @if (!filterOptions().length) {\n <mat-form-field class=\"filter-dialog-input w-auto max-w-[180px] m-auto\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <input matInput type=\"text\" required=\"false\" [formControl]=\"control\" />\n </mat-form-field>\n } @else {\n <mat-form-field class=\"filter-dialog-input w-auto max-w-[180px] m-auto\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <mat-select [formControl]=\"control\">\n <mat-option></mat-option>\n @for (entry of filterOptions(); track entry.key) {\n <mat-option [value]=\"entry.key\">{{ entry.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n</div>\n", styles: [".filter-dialog-input.mat-form-field-appearance-outline{margin-top:0}\n"], dependencies: [{ 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: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1983
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: DataTableFilterDialogComponent, isStandalone: true, selector: "mad-data-table-filter-dialog", inputs: { filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"filter-dialog-box flex items-center w-auto h-20 px-3 py-3 bg-(--mat-sys-surface) [box-shadow:0_1px_3px_0_rgb(0_0_0_/_0.05)]\">\n @if (!filterOptions().length) {\n <mat-form-field class=\"filter-dialog-input w-auto max-w-[180px] m-auto\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <input matInput type=\"text\" required=\"false\" [formControl]=\"control\" />\n </mat-form-field>\n } @else {\n <mat-form-field class=\"filter-dialog-input w-auto max-w-[180px] m-auto\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <mat-select [formControl]=\"control\">\n <mat-option></mat-option>\n @for (entry of filterOptions(); track entry.key) {\n <mat-option [value]=\"entry.key\">{{ entry.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n</div>\n", styles: [".filter-dialog-input.mat-form-field-appearance-outline{margin-top:0}\n"], dependencies: [{ 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$1.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: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2165
1984
  }
2166
1985
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableFilterDialogComponent, decorators: [{
2167
1986
  type: Component,
@@ -2198,7 +2017,7 @@ class FilterComponent {
2198
2017
  this.filterValue.set(filterValue);
2199
2018
  }
2200
2019
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2201
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: FilterComponent, isStandalone: true, selector: "mad-data-table-filter", inputs: { filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, isHovered: { classPropertyName: "isHovered", publicName: "isHovered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterValue: "filterValueChange" }, host: { listeners: { "click": "stopHeaderSort($event)", "keydown": "stopHeaderSort($event)" } }, ngImport: i0, template: "<div class=\"container relative size-4\">\n <div class=\"overlay absolute size-4 bg-(--mat-sys-surface) flex items-center justify-center\" [style.opacity]=\"opacity()\">\n <mat-icon\n #filterTrigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"colored-icon relative flex items-center justify-center\"\n fontSet=\"material-icons-outlined\"\n (click)=\"toggleFilter($event)\"\n >\n filter_alt\n </mat-icon>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"filterTrigger\"\n [cdkConnectedOverlayOpen]=\"showFilterDialog()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeFilterDialog()\"\n (detach)=\"closeFilterDialog()\"\n>\n <mad-data-table-filter-dialog [filterOptions]=\"filterOptions()\" [filterValue]=\"filterValue()\" (filterChanged)=\"onFilterChanged($event)\" />\n</ng-template>\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}:host .colored-icon.mat-icon{width:18px;height:18px;color:var(--mat-sys-on-surface-variant);font-size:18px;line-height:18px;cursor:pointer}:host(:hover) .colored-icon.mat-icon{color:var(--main-primary)}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DataTableFilterDialogComponent, selector: "mad-data-table-filter-dialog", inputs: ["filterOptions", "filterValue"], outputs: ["filterChanged"] }] }); }
2020
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: FilterComponent, isStandalone: true, selector: "mad-data-table-filter", inputs: { filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, isHovered: { classPropertyName: "isHovered", publicName: "isHovered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterValue: "filterValueChange" }, host: { listeners: { "click": "stopHeaderSort($event)", "keydown": "stopHeaderSort($event)" } }, ngImport: i0, template: "<div class=\"container relative size-4\">\n <div class=\"overlay absolute size-4 bg-(--mat-sys-surface) flex items-center justify-center\" [style.opacity]=\"opacity()\">\n <mat-icon\n #filterTrigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"colored-icon relative flex items-center justify-center\"\n fontSet=\"material-icons-outlined\"\n (click)=\"toggleFilter($event)\"\n >\n filter_alt\n </mat-icon>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"filterTrigger\"\n [cdkConnectedOverlayOpen]=\"showFilterDialog()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeFilterDialog()\"\n (detach)=\"closeFilterDialog()\"\n>\n <mad-data-table-filter-dialog [filterOptions]=\"filterOptions()\" [filterValue]=\"filterValue()\" (filterChanged)=\"onFilterChanged($event)\" />\n</ng-template>\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}:host .colored-icon.mat-icon{width:18px;height:18px;color:var(--mat-sys-on-surface-variant);font-size:18px;line-height:18px;cursor:pointer}:host(:hover) .colored-icon.mat-icon{color:var(--main-primary)}\n"], dependencies: [{ kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DataTableFilterDialogComponent, selector: "mad-data-table-filter-dialog", inputs: ["filterOptions", "filterValue"], outputs: ["filterChanged"] }] }); }
2202
2021
  }
2203
2022
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilterComponent, decorators: [{
2204
2023
  type: Component,
@@ -3163,7 +2982,7 @@ class DataTableComponent {
3163
2982
  return this.filter()?.getActiveFilterCount() === 0;
3164
2983
  }
3165
2984
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3166
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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 <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 @if (getCustomExpandableTemplate(); as expandableTemplate) {\n <ng-container\n *ngTemplateOutlet=\"expandableTemplate; context: { column: element, element: element, $implicit: element }\"\n ></ng-container>\n }\n </div>\n </div>\n </td>\n </ng-container>\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)=\"!!expandableDef() && onExpand($event, row)\"\n ></tr>\n <tr\n mat-row\n *matRowDef=\"let element; columns: [expandableColumnDef]; when: isExpandableDetailRow\"\n class=\"mad-data-table-expandable-row\"\n ></tr>\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" }] }); }
2985
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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 <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 @if (getCustomExpandableTemplate(); as expandableTemplate) {\n <ng-container\n *ngTemplateOutlet=\"expandableTemplate; context: { column: element, element: element, $implicit: element }\"\n ></ng-container>\n }\n </div>\n </div>\n </td>\n </ng-container>\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)=\"!!expandableDef() && onExpand($event, row)\"\n ></tr>\n <tr\n mat-row\n *matRowDef=\"let element; columns: [expandableColumnDef]; when: isExpandableDetailRow\"\n class=\"mad-data-table-expandable-row\"\n ></tr>\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$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$4.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.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$1.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$3.TranslatePipe, name: "translate" }] }); }
3167
2986
  }
3168
2987
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableComponent, decorators: [{
3169
2988
  type: Component,
@@ -3216,139 +3035,413 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
3216
3035
  }]
3217
3036
  }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: DataTableTemplateColumnDefinition }] });
3218
3037
 
3219
- class StepHeaderComponent extends CdkStepHeader {
3220
- constructor(_focusMonitor) {
3221
- super();
3222
- this._focusMonitor = _focusMonitor;
3038
+ class BaseQuickListComponent {
3039
+ constructor(changeDetectorRef, formBuilder) {
3040
+ this.changeDetectorRef = changeDetectorRef;
3041
+ this.formBuilder = formBuilder;
3042
+ this.allItems = [];
3043
+ this.addLabel = 'NOT SET';
3044
+ this.addPossible = true;
3045
+ this.removePossible = true;
3046
+ this.blankItem = {};
3047
+ this.added = new EventEmitter();
3048
+ this.removed = new EventEmitter();
3223
3049
  }
3224
- ngAfterViewInit() {
3225
- this._focusMonitor.monitor(this._elementRef, true);
3050
+ ngOnInit() {
3051
+ this.addEventFunction = this.addItem.bind(this);
3052
+ if (this.minItems) {
3053
+ for (let n = this.allItems.length; n < this.minItems; n++) {
3054
+ this.interalAddItem();
3055
+ }
3056
+ }
3226
3057
  }
3227
- ngOnDestroy() {
3228
- this._focusMonitor.stopMonitoring(this._elementRef);
3058
+ ngAfterViewInit() {
3059
+ setTimeout(() => this.setFocusOnAdd(), 1);
3229
3060
  }
3230
- /** Focuses the step header. */
3231
- focus(origin, options) {
3232
- if (origin) {
3233
- this._focusMonitor.focusVia(this._elementRef, origin, options);
3234
- }
3235
- else {
3236
- this._elementRef.nativeElement.focus(options);
3061
+ addItem() {
3062
+ const newItem = this.interalAddItem();
3063
+ if (!!newItem) {
3064
+ this.added.emit(newItem);
3237
3065
  }
3238
3066
  }
3239
- getCssForState() {
3240
- if (this.completed) {
3241
- return 'step-state-complete';
3067
+ addReactiveItem() {
3068
+ if (this.isAddReactiveAllowed()) {
3069
+ this.added.emit(null);
3242
3070
  }
3243
- if (this.hasError) {
3244
- return 'step-state-error';
3071
+ }
3072
+ removeItem(item) {
3073
+ if (this.isDeleteAllowed()) {
3074
+ this.allItems.splice(this.allItems.indexOf(item), 1);
3075
+ this.removed.emit(item);
3245
3076
  }
3246
- return 'step-state-neutral';
3247
3077
  }
3248
- getIcon() {
3249
- if (this.completed) {
3250
- return 'check_circle_outline';
3078
+ removeReactiveItem(item) {
3079
+ if (this.isDeleteReactiveAllowed()) {
3080
+ const index = this.formArray.controls.indexOf(item);
3081
+ if (index >= 0) {
3082
+ this.formArray.controls.splice(index, 1);
3083
+ this.formArray.updateValueAndValidity();
3084
+ this.removed.emit(null);
3085
+ }
3251
3086
  }
3252
- else if (this.hasError) {
3253
- return 'error_outline';
3087
+ }
3088
+ setFocusOnAdd() {
3089
+ this.rowCountFocus = this.itemRows.length;
3090
+ this.itemRows.changes.subscribe((els) => {
3091
+ if (els.length > this.rowCountFocus && !!els.last) {
3092
+ const firstFocusable = els.last.nativeElement.querySelector("button, a, input, select, textarea, [tabindex]:not([tabindex='-1'])");
3093
+ if (firstFocusable) {
3094
+ firstFocusable.focus();
3095
+ }
3096
+ }
3097
+ this.rowCountFocus = els.length;
3098
+ });
3099
+ }
3100
+ isAddAllowed() {
3101
+ return this.addPossible && (!this.maxItems || this.allItems?.length < this.maxItems);
3102
+ }
3103
+ isAddReactiveAllowed() {
3104
+ return this.addPossible && (!this.maxItems || this.formArray?.controls.length < this.maxItems);
3105
+ }
3106
+ isDeleteAllowed() {
3107
+ return this.removePossible && (!this.minItems || this.allItems?.length > this.minItems);
3108
+ }
3109
+ isDeleteReactiveAllowed() {
3110
+ return this.removePossible && (!this.minItems || this.formArray?.controls.length > this.minItems);
3111
+ }
3112
+ interalAddItem() {
3113
+ if (this.isAddAllowed()) {
3114
+ const newItem = { ...this.blankItem };
3115
+ // creates ids in the form of "n5kdz1pljl8"
3116
+ newItem.id = Math.random().toString(36).substring(2);
3117
+ this.allItems.push(newItem);
3118
+ this.changeDetectorRef.detectChanges();
3119
+ return newItem;
3254
3120
  }
3255
- return '';
3121
+ return null;
3256
3122
  }
3257
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StepHeaderComponent, deps: [{ token: i1$6.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
3258
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StepHeaderComponent, isStandalone: true, selector: "mad-step-header", inputs: { color: "color", index: "index", label: "label", stepControl: "stepControl", errorMessage: "errorMessage", selected: "selected", active: "active", optional: "optional", hasError: "hasError", completed: "completed", closed: "closed" }, host: { attributes: { "role": "tab" }, classAttribute: "mad-step-header" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"header\"\n [ngClass]=\"{\n 'header-selected': this.selected && !this.closed,\n 'header-default': !this.selected || this.closed,\n 'error-border': this.hasError,\n 'check-border': !this.hasError,\n }\"\n>\n <div [ngClass]=\"this.getCssForState()\"></div>\n <div class=\"header-label\">\n <mat-icon class=\"material-icons-outlined\">\n {{ this.selected && !this.closed ? 'keyboard_arrow_down' : 'keyboard_arrow_right' }}\n </mat-icon>\n </div>\n @if (this.completed || this.hasError) {\n <div class=\"header-label\">\n <mat-icon [ngClass]=\"this.completed ? 'green-check' : 'red-error'\">\n {{ getIcon() }}\n </mat-icon>\n </div>\n }\n @if (!this.hasError && !this.completed) {\n <span data-testid=\"step-number\" class=\"header-label\">{{ this.index + 1 + '.' }}</span>\n }\n <div data-testid=\"step-label\" class=\"header-label\">{{ this.label }}</div>\n</div>\n", styles: [".header{overflow:hidden;outline:var(--error-color);cursor:pointer;box-sizing:content-box;-webkit-tap-highlight-color:transparent;border:1px solid var(--step-border-color);width:100%;height:62px;flex-direction:row;box-sizing:border-box;display:flex;gap:1em}.header-label{align-items:center;display:flex}.step-state-complete{width:5px;background:var(--step-complete-color)}.step-state-error{width:5px;background:var(--error-color)}.step-state-neutral{width:5px;background:var(--step-neutral-color)}.green-check{color:var(--step-complete-color)}.red-error{color:var(--error-color)}.check-border{border-color:var(--step-border-color)}.error-border{border-color:var(--error-color)}.header-selected{background:var(--step-header-selected-background)}.header-default{background:var(--step-header-default-background)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None }); }
3123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BaseQuickListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
3124
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: BaseQuickListComponent, isStandalone: true, selector: "mad-base-quick-list", inputs: { allItems: "allItems", addLabel: "addLabel", addPossible: "addPossible", removePossible: "removePossible", blankItem: "blankItem", readonly: "readonly", maxItems: "maxItems", minItems: "minItems", formArray: "formArray" }, outputs: { added: "added", removed: "removed" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "itemRows", predicate: ["row"], descendants: true }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager }); }
3259
3125
  }
3260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StepHeaderComponent, decorators: [{
3126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BaseQuickListComponent, decorators: [{
3261
3127
  type: Component,
3262
- args: [{ selector: 'mad-step-header', inputs: ['color'], host: {
3263
- class: 'mad-step-header',
3264
- role: 'tab',
3265
- }, encapsulation: ViewEncapsulation.None, imports: [NgClass, MatIconModule], template: "<div\n class=\"header\"\n [ngClass]=\"{\n 'header-selected': this.selected && !this.closed,\n 'header-default': !this.selected || this.closed,\n 'error-border': this.hasError,\n 'check-border': !this.hasError,\n }\"\n>\n <div [ngClass]=\"this.getCssForState()\"></div>\n <div class=\"header-label\">\n <mat-icon class=\"material-icons-outlined\">\n {{ this.selected && !this.closed ? 'keyboard_arrow_down' : 'keyboard_arrow_right' }}\n </mat-icon>\n </div>\n @if (this.completed || this.hasError) {\n <div class=\"header-label\">\n <mat-icon [ngClass]=\"this.completed ? 'green-check' : 'red-error'\">\n {{ getIcon() }}\n </mat-icon>\n </div>\n }\n @if (!this.hasError && !this.completed) {\n <span data-testid=\"step-number\" class=\"header-label\">{{ this.index + 1 + '.' }}</span>\n }\n <div data-testid=\"step-label\" class=\"header-label\">{{ this.label }}</div>\n</div>\n", styles: [".header{overflow:hidden;outline:var(--error-color);cursor:pointer;box-sizing:content-box;-webkit-tap-highlight-color:transparent;border:1px solid var(--step-border-color);width:100%;height:62px;flex-direction:row;box-sizing:border-box;display:flex;gap:1em}.header-label{align-items:center;display:flex}.step-state-complete{width:5px;background:var(--step-complete-color)}.step-state-error{width:5px;background:var(--error-color)}.step-state-neutral{width:5px;background:var(--step-neutral-color)}.green-check{color:var(--step-complete-color)}.red-error{color:var(--error-color)}.check-border{border-color:var(--step-border-color)}.error-border{border-color:var(--error-color)}.header-selected{background:var(--step-header-selected-background)}.header-default{background:var(--step-header-default-background)}\n"] }]
3266
- }], ctorParameters: () => [{ type: i1$6.FocusMonitor }], propDecorators: { index: [{
3267
- type: Input
3268
- }], label: [{
3128
+ args: [{ selector: 'mad-base-quick-list', changeDetection: ChangeDetectionStrategy.Eager, template: '', standalone: true }]
3129
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }], propDecorators: { allItems: [{
3269
3130
  type: Input
3270
- }], stepControl: [{
3131
+ }], addLabel: [{
3271
3132
  type: Input
3272
- }], errorMessage: [{
3133
+ }], addPossible: [{
3273
3134
  type: Input
3274
- }], selected: [{
3135
+ }], removePossible: [{
3275
3136
  type: Input
3276
- }], active: [{
3137
+ }], blankItem: [{
3277
3138
  type: Input
3278
- }], optional: [{
3139
+ }], readonly: [{
3279
3140
  type: Input
3280
- }], hasError: [{
3141
+ }], maxItems: [{
3281
3142
  type: Input
3282
- }], completed: [{
3143
+ }], minItems: [{
3283
3144
  type: Input
3284
- }], closed: [{
3145
+ }], formArray: [{
3285
3146
  type: Input
3147
+ }], added: [{
3148
+ type: Output
3149
+ }], removed: [{
3150
+ type: Output
3151
+ }], itemTemplate: [{
3152
+ type: ContentChild,
3153
+ args: [TemplateRef]
3154
+ }], itemRows: [{
3155
+ type: ViewChildren,
3156
+ args: ['row']
3286
3157
  }] } });
3287
3158
 
3288
- /**
3289
- * Animations used by the MAD stepper.
3290
- */
3291
- const madStepperAnimations = {
3292
- verticalStepTransition: trigger('stepTransition', [
3293
- state('previous', style({ height: '0px', visibility: 'hidden' })),
3294
- state('next', style({ height: '0px', visibility: 'hidden' })),
3295
- state('current', style({ height: '*', visibility: 'visible' })),
3296
- transition('* <=> current', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
3297
- ]),
3298
- };
3299
-
3300
- /**
3301
- * This library only supports reactive forms (`AbstractControl`) for `stepControl`, even though
3302
- * `@angular/cdk/stepper` also allows signal-based `Field` controls since Angular 22.
3303
- */
3304
- function isAbstractControl(control) {
3305
- return !!control && typeof control === 'object' && typeof control.markAllAsTouched === 'function';
3306
- }
3307
- class StepComponent extends CdkStep {
3308
- constructor(stepper, _viewContainerRef) {
3309
- super();
3310
- this.stepper = stepper;
3311
- this._viewContainerRef = _viewContainerRef;
3312
- /** Action event for the next button. If not set the StepComponent will handle the step navigation */
3313
- this.onNext = new EventEmitter();
3314
- /** Action event for the done button. If not set the StepComponent will handle the step navigation */
3315
- this.onDone = new EventEmitter();
3316
- /*** Action event when the header is clicked. If not set the StepComponent will handle the step navigation*/
3317
- this.onHeaderClick = new EventEmitter();
3318
- this.stepClosedSignal = signal(false, /* @ts-ignore */
3319
- ...(ngDevMode ? [{ debugName: "stepClosedSignal" }] : /* istanbul ignore next */ []));
3320
- this._isSelected = Subscription.EMPTY;
3321
- }
3322
- get stepClosed() {
3323
- return this.stepClosedSignal();
3324
- }
3325
- set stepClosed(stepClosed) {
3326
- this.stepClosedSignal.set(stepClosed);
3159
+ class QuickListCompactComponent extends BaseQuickListComponent {
3160
+ constructor(changeDetectorRef, formBuilder) {
3161
+ super(changeDetectorRef, formBuilder);
3162
+ this.changeDetectorRef = changeDetectorRef;
3163
+ this.formBuilder = formBuilder;
3327
3164
  }
3328
- ngAfterContentInit() {
3329
- this._isSelected = this._stepper.steps.changes
3330
- .pipe(switchMap(() => this._stepper.selectionChange.pipe(map((event) => event.selectedStep === this), tap(() => (this.stepClosed = false)), startWith(this._stepper.selected === this))))
3331
- .subscribe();
3165
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListCompactComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
3166
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: QuickListCompactComponent, isStandalone: true, selector: "mad-quick-list-compact", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div class=\"flex-container\" #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddAllowed()\" (click)=\"addItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.allItems.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addItem()\" [disabled]=\"!isAddAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: LinkButtonComponent, selector: "mad-link-button" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
3167
+ }
3168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListCompactComponent, decorators: [{
3169
+ type: Component,
3170
+ args: [{ selector: 'mad-quick-list-compact', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, LinkButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div class=\"flex-container\" #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddAllowed()\" (click)=\"addItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.allItems.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addItem()\" [disabled]=\"!isAddAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n" }]
3171
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
3172
+
3173
+ // Based on https://github.com/porscheinformatik/clarity-addons/blob/master/src/clr-addons/generic-quick-list/generic-quick-list.ts
3174
+ class QuickListComponent extends BaseQuickListComponent {
3175
+ constructor(changeDetectorRef, formBuilder) {
3176
+ super(changeDetectorRef, formBuilder);
3177
+ this.changeDetectorRef = changeDetectorRef;
3178
+ this.formBuilder = formBuilder;
3332
3179
  }
3333
- ngOnDestroy() {
3334
- this._isSelected.unsubscribe();
3180
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
3181
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: QuickListComponent, isStandalone: true, selector: "mad-quick-list", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addItem()\" [disabled]=\"!addPossible || !isAddAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
3182
+ }
3183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListComponent, decorators: [{
3184
+ type: Component,
3185
+ args: [{ selector: 'mad-quick-list', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, OutlineButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of allItems; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addItem()\" [disabled]=\"!addPossible || !isAddAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n" }]
3186
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
3187
+
3188
+ class ReactiveFormQuickListComponent extends BaseQuickListComponent {
3189
+ constructor(changeDetectorRef, formBuilder) {
3190
+ super(changeDetectorRef, formBuilder);
3191
+ this.changeDetectorRef = changeDetectorRef;
3192
+ this.formBuilder = formBuilder;
3335
3193
  }
3336
- next(markFormAsTouched = true) {
3337
- this.stepValidation(markFormAsTouched);
3338
- if (this.onNext.observers.length <= 0) {
3339
- this.stepper.next();
3340
- }
3341
- this.onNext.emit();
3194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
3195
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ReactiveFormQuickListComponent, isStandalone: true, selector: "mad-reactive-form-quick-list", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
3196
+ }
3197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListComponent, decorators: [{
3198
+ type: Component,
3199
+ args: [{ selector: 'mad-reactive-form-quick-list', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, OutlineButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n\n@if (!readonly) {\n <mad-outline-button data-cy=\"add-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-outline-button>\n}\n" }]
3200
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
3201
+
3202
+ class ReactiveFormQuickListCompactComponent extends BaseQuickListComponent {
3203
+ constructor(changeDetectorRef, formBuilder) {
3204
+ super(changeDetectorRef, formBuilder);
3205
+ this.changeDetectorRef = changeDetectorRef;
3206
+ this.formBuilder = formBuilder;
3342
3207
  }
3343
- selectAndMarkAsTouched(index) {
3344
- //Mark current selected step as touched before selecting to display errors in the from
3345
- const selectedStepControl = this._stepper.selected?.stepControl;
3346
- if (isAbstractControl(selectedStepControl)) {
3347
- selectedStepControl.markAllAsTouched();
3348
- }
3349
- this.stepClosed = false;
3350
- if (this.onHeaderClick.observers.length <= 0) {
3351
- this.select();
3208
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListCompactComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
3209
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ReactiveFormQuickListCompactComponent, isStandalone: true, selector: "mad-reactive-form-quick-list-compact", usesInheritance: true, ngImport: i0, template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddReactiveAllowed()\" (click)=\"addReactiveItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.formArray?.controls.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: LinkButtonComponent, selector: "mad-link-button" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
3210
+ }
3211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ReactiveFormQuickListCompactComponent, decorators: [{
3212
+ type: Component,
3213
+ args: [{ selector: 'mad-reactive-form-quick-list-compact', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgTemplateOutlet, IconButtonComponent, MatIconModule, LinkButtonComponent], template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n@for (item of formArray.controls; track item; let isLast = $last) {\n @if (itemTemplate) {\n <div #row class=\"quick-list-row\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n @if (!readonly && isDeleteReactiveAllowed()) {\n <mad-icon-button data-cy=\"delete-item-button\" (click)=\"removeReactiveItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n }\n @if (!readonly && isLast) {\n <mad-icon-button data-cy=\"add-item-button\" [disabled]=\"!isAddReactiveAllowed()\" (click)=\"addReactiveItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n }\n </div>\n }\n}\n@if (!readonly && !this.formArray?.controls.length) {\n <mad-link-button data-cy=\"add-first-item-button\" (click)=\"addReactiveItem()\" [disabled]=\"!isAddReactiveAllowed()\">\n {{ addLabel }}\n </mad-link-button>\n}\n" }]
3214
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }] });
3215
+
3216
+ class QuickListModule {
3217
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3218
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, imports: [CommonModule,
3219
+ MatButtonModule,
3220
+ MatIconModule,
3221
+ ButtonModule,
3222
+ ReactiveFormsModule,
3223
+ QuickListComponent,
3224
+ BaseQuickListComponent,
3225
+ QuickListCompactComponent,
3226
+ ReactiveFormQuickListComponent,
3227
+ ReactiveFormQuickListCompactComponent], exports: [QuickListComponent,
3228
+ QuickListCompactComponent,
3229
+ BaseQuickListComponent,
3230
+ ReactiveFormQuickListComponent,
3231
+ ReactiveFormQuickListCompactComponent] }); }
3232
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, imports: [CommonModule,
3233
+ MatButtonModule,
3234
+ MatIconModule,
3235
+ ButtonModule,
3236
+ ReactiveFormsModule,
3237
+ QuickListComponent,
3238
+ QuickListCompactComponent,
3239
+ ReactiveFormQuickListComponent,
3240
+ ReactiveFormQuickListCompactComponent] }); }
3241
+ }
3242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QuickListModule, decorators: [{
3243
+ type: NgModule,
3244
+ args: [{
3245
+ imports: [
3246
+ CommonModule,
3247
+ MatButtonModule,
3248
+ MatIconModule,
3249
+ ButtonModule,
3250
+ ReactiveFormsModule,
3251
+ QuickListComponent,
3252
+ BaseQuickListComponent,
3253
+ QuickListCompactComponent,
3254
+ ReactiveFormQuickListComponent,
3255
+ ReactiveFormQuickListCompactComponent,
3256
+ ],
3257
+ exports: [
3258
+ QuickListComponent,
3259
+ QuickListCompactComponent,
3260
+ BaseQuickListComponent,
3261
+ ReactiveFormQuickListComponent,
3262
+ ReactiveFormQuickListCompactComponent,
3263
+ ],
3264
+ }]
3265
+ }] });
3266
+
3267
+ class TableModule {
3268
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3269
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: TableModule, imports: [CommonModule,
3270
+ MatButtonModule,
3271
+ MatIconModule,
3272
+ MatFormFieldModule,
3273
+ MatInputModule,
3274
+ MatMenuModule,
3275
+ MatPaginatorModule,
3276
+ MatSortModule,
3277
+ MatTableModule,
3278
+ ButtonModule,
3279
+ TableComponent], exports: [TableComponent] }); }
3280
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableModule, imports: [CommonModule,
3281
+ MatButtonModule,
3282
+ MatIconModule,
3283
+ MatFormFieldModule,
3284
+ MatInputModule,
3285
+ MatMenuModule,
3286
+ MatPaginatorModule,
3287
+ MatSortModule,
3288
+ MatTableModule,
3289
+ ButtonModule,
3290
+ TableComponent] }); }
3291
+ }
3292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TableModule, decorators: [{
3293
+ type: NgModule,
3294
+ args: [{
3295
+ imports: [
3296
+ CommonModule,
3297
+ MatButtonModule,
3298
+ MatIconModule,
3299
+ MatFormFieldModule,
3300
+ MatInputModule,
3301
+ MatMenuModule,
3302
+ MatPaginatorModule,
3303
+ MatSortModule,
3304
+ MatTableModule,
3305
+ ButtonModule,
3306
+ TableComponent,
3307
+ ],
3308
+ exports: [TableComponent],
3309
+ }]
3310
+ }] });
3311
+
3312
+ class StepHeaderComponent extends CdkStepHeader {
3313
+ constructor(_focusMonitor) {
3314
+ super();
3315
+ this._focusMonitor = _focusMonitor;
3316
+ }
3317
+ ngAfterViewInit() {
3318
+ this._focusMonitor.monitor(this._elementRef, true);
3319
+ }
3320
+ ngOnDestroy() {
3321
+ this._focusMonitor.stopMonitoring(this._elementRef);
3322
+ }
3323
+ /** Focuses the step header. */
3324
+ focus(origin, options) {
3325
+ if (origin) {
3326
+ this._focusMonitor.focusVia(this._elementRef, origin, options);
3327
+ }
3328
+ else {
3329
+ this._elementRef.nativeElement.focus(options);
3330
+ }
3331
+ }
3332
+ getCssForState() {
3333
+ if (this.completed) {
3334
+ return 'step-state-complete';
3335
+ }
3336
+ if (this.hasError) {
3337
+ return 'step-state-error';
3338
+ }
3339
+ return 'step-state-neutral';
3340
+ }
3341
+ getIcon() {
3342
+ if (this.completed) {
3343
+ return 'check_circle_outline';
3344
+ }
3345
+ else if (this.hasError) {
3346
+ return 'error_outline';
3347
+ }
3348
+ return '';
3349
+ }
3350
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StepHeaderComponent, deps: [{ token: i1$6.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
3351
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StepHeaderComponent, isStandalone: true, selector: "mad-step-header", inputs: { color: "color", index: "index", label: "label", stepControl: "stepControl", errorMessage: "errorMessage", selected: "selected", active: "active", optional: "optional", hasError: "hasError", completed: "completed", closed: "closed" }, host: { attributes: { "role": "tab" }, classAttribute: "mad-step-header" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"header\"\n [ngClass]=\"{\n 'header-selected': this.selected && !this.closed,\n 'header-default': !this.selected || this.closed,\n 'error-border': this.hasError,\n 'check-border': !this.hasError,\n }\"\n>\n <div [ngClass]=\"this.getCssForState()\"></div>\n <div class=\"header-label\">\n <mat-icon class=\"material-icons-outlined\">\n {{ this.selected && !this.closed ? 'keyboard_arrow_down' : 'keyboard_arrow_right' }}\n </mat-icon>\n </div>\n @if (this.completed || this.hasError) {\n <div class=\"header-label\">\n <mat-icon [ngClass]=\"this.completed ? 'green-check' : 'red-error'\">\n {{ getIcon() }}\n </mat-icon>\n </div>\n }\n @if (!this.hasError && !this.completed) {\n <span data-testid=\"step-number\" class=\"header-label\">{{ this.index + 1 + '.' }}</span>\n }\n <div data-testid=\"step-label\" class=\"header-label\">{{ this.label }}</div>\n</div>\n", styles: [".header{overflow:hidden;outline:var(--error-color);cursor:pointer;box-sizing:content-box;-webkit-tap-highlight-color:transparent;border:1px solid var(--step-border-color);width:100%;height:62px;flex-direction:row;box-sizing:border-box;display:flex;gap:1em}.header-label{align-items:center;display:flex}.step-state-complete{width:5px;background:var(--step-complete-color)}.step-state-error{width:5px;background:var(--error-color)}.step-state-neutral{width:5px;background:var(--step-neutral-color)}.green-check{color:var(--step-complete-color)}.red-error{color:var(--error-color)}.check-border{border-color:var(--step-border-color)}.error-border{border-color:var(--error-color)}.header-selected{background:var(--step-header-selected-background)}.header-default{background:var(--step-header-default-background)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None }); }
3352
+ }
3353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StepHeaderComponent, decorators: [{
3354
+ type: Component,
3355
+ args: [{ selector: 'mad-step-header', inputs: ['color'], host: {
3356
+ class: 'mad-step-header',
3357
+ role: 'tab',
3358
+ }, encapsulation: ViewEncapsulation.None, imports: [NgClass, MatIconModule], template: "<div\n class=\"header\"\n [ngClass]=\"{\n 'header-selected': this.selected && !this.closed,\n 'header-default': !this.selected || this.closed,\n 'error-border': this.hasError,\n 'check-border': !this.hasError,\n }\"\n>\n <div [ngClass]=\"this.getCssForState()\"></div>\n <div class=\"header-label\">\n <mat-icon class=\"material-icons-outlined\">\n {{ this.selected && !this.closed ? 'keyboard_arrow_down' : 'keyboard_arrow_right' }}\n </mat-icon>\n </div>\n @if (this.completed || this.hasError) {\n <div class=\"header-label\">\n <mat-icon [ngClass]=\"this.completed ? 'green-check' : 'red-error'\">\n {{ getIcon() }}\n </mat-icon>\n </div>\n }\n @if (!this.hasError && !this.completed) {\n <span data-testid=\"step-number\" class=\"header-label\">{{ this.index + 1 + '.' }}</span>\n }\n <div data-testid=\"step-label\" class=\"header-label\">{{ this.label }}</div>\n</div>\n", styles: [".header{overflow:hidden;outline:var(--error-color);cursor:pointer;box-sizing:content-box;-webkit-tap-highlight-color:transparent;border:1px solid var(--step-border-color);width:100%;height:62px;flex-direction:row;box-sizing:border-box;display:flex;gap:1em}.header-label{align-items:center;display:flex}.step-state-complete{width:5px;background:var(--step-complete-color)}.step-state-error{width:5px;background:var(--error-color)}.step-state-neutral{width:5px;background:var(--step-neutral-color)}.green-check{color:var(--step-complete-color)}.red-error{color:var(--error-color)}.check-border{border-color:var(--step-border-color)}.error-border{border-color:var(--error-color)}.header-selected{background:var(--step-header-selected-background)}.header-default{background:var(--step-header-default-background)}\n"] }]
3359
+ }], ctorParameters: () => [{ type: i1$6.FocusMonitor }], propDecorators: { index: [{
3360
+ type: Input
3361
+ }], label: [{
3362
+ type: Input
3363
+ }], stepControl: [{
3364
+ type: Input
3365
+ }], errorMessage: [{
3366
+ type: Input
3367
+ }], selected: [{
3368
+ type: Input
3369
+ }], active: [{
3370
+ type: Input
3371
+ }], optional: [{
3372
+ type: Input
3373
+ }], hasError: [{
3374
+ type: Input
3375
+ }], completed: [{
3376
+ type: Input
3377
+ }], closed: [{
3378
+ type: Input
3379
+ }] } });
3380
+
3381
+ /**
3382
+ * Animations used by the MAD stepper.
3383
+ */
3384
+ const madStepperAnimations = {
3385
+ verticalStepTransition: trigger('stepTransition', [
3386
+ state('previous', style({ height: '0px', visibility: 'hidden' })),
3387
+ state('next', style({ height: '0px', visibility: 'hidden' })),
3388
+ state('current', style({ height: '*', visibility: 'visible' })),
3389
+ transition('* <=> current', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
3390
+ ]),
3391
+ };
3392
+
3393
+ /**
3394
+ * This library only supports reactive forms (`AbstractControl`) for `stepControl`, even though
3395
+ * `@angular/cdk/stepper` also allows signal-based `Field` controls since Angular 22.
3396
+ */
3397
+ function isAbstractControl(control) {
3398
+ return !!control && typeof control === 'object' && typeof control.markAllAsTouched === 'function';
3399
+ }
3400
+ class StepComponent extends CdkStep {
3401
+ constructor(stepper, _viewContainerRef) {
3402
+ super();
3403
+ this.stepper = stepper;
3404
+ this._viewContainerRef = _viewContainerRef;
3405
+ /** Action event for the next button. If not set the StepComponent will handle the step navigation */
3406
+ this.onNext = new EventEmitter();
3407
+ /** Action event for the done button. If not set the StepComponent will handle the step navigation */
3408
+ this.onDone = new EventEmitter();
3409
+ /*** Action event when the header is clicked. If not set the StepComponent will handle the step navigation*/
3410
+ this.onHeaderClick = new EventEmitter();
3411
+ this.stepClosedSignal = signal(false, /* @ts-ignore */
3412
+ ...(ngDevMode ? [{ debugName: "stepClosedSignal" }] : /* istanbul ignore next */ []));
3413
+ this._isSelected = Subscription.EMPTY;
3414
+ }
3415
+ get stepClosed() {
3416
+ return this.stepClosedSignal();
3417
+ }
3418
+ set stepClosed(stepClosed) {
3419
+ this.stepClosedSignal.set(stepClosed);
3420
+ }
3421
+ ngAfterContentInit() {
3422
+ this._isSelected = this._stepper.steps.changes
3423
+ .pipe(switchMap(() => this._stepper.selectionChange.pipe(map((event) => event.selectedStep === this), tap(() => (this.stepClosed = false)), startWith(this._stepper.selected === this))))
3424
+ .subscribe();
3425
+ }
3426
+ ngOnDestroy() {
3427
+ this._isSelected.unsubscribe();
3428
+ }
3429
+ next(markFormAsTouched = true) {
3430
+ this.stepValidation(markFormAsTouched);
3431
+ if (this.onNext.observers.length <= 0) {
3432
+ this.stepper.next();
3433
+ }
3434
+ this.onNext.emit();
3435
+ }
3436
+ selectAndMarkAsTouched(index) {
3437
+ //Mark current selected step as touched before selecting to display errors in the from
3438
+ const selectedStepControl = this._stepper.selected?.stepControl;
3439
+ if (isAbstractControl(selectedStepControl)) {
3440
+ selectedStepControl.markAllAsTouched();
3441
+ }
3442
+ this.stepClosed = false;
3443
+ if (this.onHeaderClick.observers.length <= 0) {
3444
+ this.select();
3352
3445
  }
3353
3446
  this.onHeaderClick.emit(index);
3354
3447
  }
@@ -3496,99 +3589,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
3496
3589
  }]
3497
3590
  }] });
3498
3591
 
3499
- class ContentHeaderComponent {
3500
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3501
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentHeaderComponent, isStandalone: true, selector: "mad-content-header", ngImport: i0, template: "<div class=\"content-header\">\n <ng-content></ng-content>\n</div>\n", styles: [".content-header{padding-right:.5rem;background-color:var(--background-color)}\n"] }); }
3502
- }
3503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentHeaderComponent, decorators: [{
3504
- type: Component,
3505
- args: [{ selector: 'mad-content-header', standalone: true, template: "<div class=\"content-header\">\n <ng-content></ng-content>\n</div>\n", styles: [".content-header{padding-right:.5rem;background-color:var(--background-color)}\n"] }]
3506
- }] });
3507
-
3508
- class ContentPanelContainerComponent {
3509
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3510
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerComponent, isStandalone: true, selector: "mad-content-panel-container", ngImport: i0, template: "<div class=\"content-panel-sidebar-wrapper\">\n <ng-content select=\"mad-content-panel-container-sidebar\"></ng-content>\n <div class=\"content-panel-outer-wrapper\">\n <ng-content select=\"mad-content-panel-container-content\"></ng-content>\n <ng-content select=\"mad-content-panel-container-footer\"></ng-content>\n </div>\n</div>\n", styles: [":host{position:relative;overflow:hidden;display:flex;flex:1 1 auto;min-width:0;min-height:.05rem;background-color:var(--background-color)}.content-panel-outer-wrapper{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;text-overflow:ellipsis}.content-panel-sidebar-wrapper{width:100%;display:flex;flex:1 1 auto;min-width:0;flex-direction:row}\n"] }); }
3511
- }
3512
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerComponent, decorators: [{
3513
- type: Component,
3514
- args: [{ selector: 'mad-content-panel-container', standalone: true, template: "<div class=\"content-panel-sidebar-wrapper\">\n <ng-content select=\"mad-content-panel-container-sidebar\"></ng-content>\n <div class=\"content-panel-outer-wrapper\">\n <ng-content select=\"mad-content-panel-container-content\"></ng-content>\n <ng-content select=\"mad-content-panel-container-footer\"></ng-content>\n </div>\n</div>\n", styles: [":host{position:relative;overflow:hidden;display:flex;flex:1 1 auto;min-width:0;min-height:.05rem;background-color:var(--background-color)}.content-panel-outer-wrapper{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;text-overflow:ellipsis}.content-panel-sidebar-wrapper{width:100%;display:flex;flex:1 1 auto;min-width:0;flex-direction:row}\n"] }]
3515
- }] });
3516
-
3517
- class ContentPanelContainerContentComponent {
3518
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3519
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerContentComponent, isStandalone: true, selector: "mad-content-panel-container-content", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{flex:1 1 auto;min-width:0;overflow-y:auto;border-top:.05rem solid #cccccc;padding:1rem}\n"] }); }
3520
- }
3521
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerContentComponent, decorators: [{
3522
- type: Component,
3523
- args: [{ selector: 'mad-content-panel-container-content', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{flex:1 1 auto;min-width:0;overflow-y:auto;border-top:.05rem solid #cccccc;padding:1rem}\n"] }]
3524
- }] });
3525
-
3526
- class ContentPanelContainerFooterComponent {
3527
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3528
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerFooterComponent, isStandalone: true, selector: "mad-content-panel-container-footer", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid #cccccc;padding:.25rem 1rem;display:flex;flex:0 0 auto;align-items:center;min-height:2rem;width:auto}\n"] }); }
3529
- }
3530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerFooterComponent, decorators: [{
3531
- type: Component,
3532
- args: [{ selector: 'mad-content-panel-container-footer', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid #cccccc;padding:.25rem 1rem;display:flex;flex:0 0 auto;align-items:center;min-height:2rem;width:auto}\n"] }]
3533
- }] });
3534
-
3535
- class ContentPanelContainerSidebarComponent {
3536
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3537
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ContentPanelContainerSidebarComponent, isStandalone: true, selector: "mad-content-panel-container-sidebar", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid var(--mat-sys-outline-variant);min-height:2rem;display:flex;flex:0 0 auto}\n"] }); }
3538
- }
3539
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelContainerSidebarComponent, decorators: [{
3540
- type: Component,
3541
- args: [{ selector: 'mad-content-panel-container-sidebar', standalone: true, template: "<ng-content></ng-content>\n", styles: [":host{border-top:.05rem solid var(--mat-sys-outline-variant);min-height:2rem;display:flex;flex:0 0 auto}\n"] }]
3542
- }] });
3543
-
3544
- class MainContainerComponent {
3545
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MainContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3546
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: MainContainerComponent, isStandalone: true, selector: "mad-main-container", ngImport: i0, template: "<div class=\"main-container\">\n <ng-content select=\"mad-content-header\"></ng-content>\n <ng-content select=\"mad-flowbar\"></ng-content>\n <ng-content select=\"mad-content-panel-container\"></ng-content>\n</div>\n", styles: [".main-container{height:100%;display:flex;flex-direction:column}\n"] }); }
3547
- }
3548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MainContainerComponent, decorators: [{
3549
- type: Component,
3550
- args: [{ selector: 'mad-main-container', standalone: true, template: "<div class=\"main-container\">\n <ng-content select=\"mad-content-header\"></ng-content>\n <ng-content select=\"mad-flowbar\"></ng-content>\n <ng-content select=\"mad-content-panel-container\"></ng-content>\n</div>\n", styles: [".main-container{height:100%;display:flex;flex-direction:column}\n"] }]
3551
- }] });
3552
-
3553
- class ContentPanelModule {
3554
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3555
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, imports: [CommonModule,
3556
- ContentHeaderComponent,
3557
- ContentPanelContainerComponent,
3558
- ContentPanelContainerContentComponent,
3559
- ContentPanelContainerFooterComponent,
3560
- ContentPanelContainerSidebarComponent,
3561
- MainContainerComponent], exports: [ContentHeaderComponent,
3562
- ContentPanelContainerComponent,
3563
- ContentPanelContainerContentComponent,
3564
- ContentPanelContainerFooterComponent,
3565
- ContentPanelContainerSidebarComponent,
3566
- MainContainerComponent] }); }
3567
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, imports: [CommonModule] }); }
3568
- }
3569
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ContentPanelModule, decorators: [{
3570
- type: NgModule,
3571
- args: [{
3572
- imports: [
3573
- CommonModule,
3574
- ContentHeaderComponent,
3575
- ContentPanelContainerComponent,
3576
- ContentPanelContainerContentComponent,
3577
- ContentPanelContainerFooterComponent,
3578
- ContentPanelContainerSidebarComponent,
3579
- MainContainerComponent,
3580
- ],
3581
- exports: [
3582
- ContentHeaderComponent,
3583
- ContentPanelContainerComponent,
3584
- ContentPanelContainerContentComponent,
3585
- ContentPanelContainerFooterComponent,
3586
- ContentPanelContainerSidebarComponent,
3587
- MainContainerComponent,
3588
- ],
3589
- }]
3590
- }] });
3591
-
3592
3592
  class FlowbarComponent {
3593
3593
  constructor() {
3594
3594
  this._steps = [];
@@ -3929,7 +3929,7 @@ class SidebarComponent {
3929
3929
  this.collapsed = !this.collapsed;
3930
3930
  }
3931
3931
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3932
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: SidebarComponent, isStandalone: true, selector: "mad-sidebar", inputs: { collapsed: "collapsed" }, ngImport: i0, template: "<div [class.collapsed]=\"collapsed\" class=\"sidebar-wrapper\">\n <div class=\"sidebar-header\">\n <button (click)=\"toggleCollapse()\" color=\"basic\" mat-button>\n <mat-icon>{{ collapsed ? 'keyboard_double_arrow_right' : 'keyboard_double_arrow_left' }}</mat-icon>\n </button>\n </div>\n <div class=\"item-list\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".sidebar-wrapper{background:var(--panel-background-color);min-height:100%;display:flex;flex-direction:column;border-right:1px solid var(--panel-border-color);transition:width .1s ease-in}.sidebar-wrapper:not(.collapsed){min-width:239px}.sidebar-wrapper.collapsed{width:64px}.sidebar-wrapper .sidebar-header{display:flex;flex-direction:row-reverse;border-bottom:1px solid var(--panel-border-color)}.sidebar-wrapper .sidebar-header button{color:var(--mat-sys-on-surface-variant)}.sidebar-wrapper.collapsed .item-list{display:none}.sidebar-wrapper .item-list{display:flex;flex-direction:column;margin-top:16px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
3932
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: SidebarComponent, isStandalone: true, selector: "mad-sidebar", inputs: { collapsed: "collapsed" }, ngImport: i0, template: "<div [class.collapsed]=\"collapsed\" class=\"sidebar-wrapper\">\n <div class=\"sidebar-header\">\n <button (click)=\"toggleCollapse()\" color=\"basic\" mat-button>\n <mat-icon>{{ collapsed ? 'keyboard_double_arrow_right' : 'keyboard_double_arrow_left' }}</mat-icon>\n </button>\n </div>\n <div class=\"item-list\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".sidebar-wrapper{background:var(--panel-background-color);min-height:100%;display:flex;flex-direction:column;border-right:1px solid var(--panel-border-color);transition:width .1s ease-in}.sidebar-wrapper:not(.collapsed){min-width:239px}.sidebar-wrapper.collapsed{width:64px}.sidebar-wrapper .sidebar-header{display:flex;flex-direction:row-reverse;border-bottom:1px solid var(--panel-border-color)}.sidebar-wrapper .sidebar-header button{color:var(--mat-sys-on-surface-variant)}.sidebar-wrapper.collapsed .item-list{display:none}.sidebar-wrapper .item-list{display:flex;flex-direction:column;margin-top:16px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
3933
3933
  }
3934
3934
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SidebarComponent, decorators: [{
3935
3935
  type: Component,
@@ -3986,13 +3986,13 @@ class SidebarLayoutComponent {
3986
3986
  goToPreviousPage() {
3987
3987
  this.location.back();
3988
3988
  }
3989
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SidebarLayoutComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1$8.Router }, { token: i2$5.Location }], target: i0.ɵɵFactoryTarget.Component }); }
3990
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: SidebarLayoutComponent, isStandalone: true, selector: "mad-sidebar-layout", inputs: { title: "title", hasBackButton: "hasBackButton", titleTemplate: "titleTemplate", sideBarItems: "sideBarItems", headerContent: "headerContent", actionGroup: "actionGroup", content: "content", footer: "footer" }, ngImport: i0, template: "<mad-main-container class=\"w-full\">\n <mad-content-header>\n @if (headerContentPortal) {\n <ng-template [cdkPortalOutlet]=\"headerContentPortal\"></ng-template>\n } @else {\n <div class=\"sidebar-wrapper default-header-wrapper\">\n <div class=\"back-and-title\">\n @if (hasBackButton) {\n <button class=\"back-button\">\n <mat-icon (click)=\"goToPreviousPage()\" class=\"mat-primary\"> arrow_back</mat-icon>\n </button>\n }\n @if (titleTemplate) {\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n } @else {\n <h2 class=\"title\">{{ title }}</h2>\n }\n </div>\n <ng-template [cdkPortalOutlet]=\"actionGroupPortal\"></ng-template>\n </div>\n }\n </mad-content-header>\n <mad-content-panel-container>\n @if (sideBarItemsPortal) {\n <mad-content-panel-container-sidebar>\n <ng-template [cdkPortalOutlet]=\"sideBarItemsPortal\"></ng-template>\n </mad-content-panel-container-sidebar>\n }\n @if (contentPortal) {\n <mad-content-panel-container-content>\n <ng-template [cdkPortalOutlet]=\"contentPortal\"></ng-template>\n </mad-content-panel-container-content>\n }\n @if (footerPortal) {\n <mad-content-panel-container-footer>\n <ng-template [cdkPortalOutlet]=\"footerPortal\"></ng-template>\n </mad-content-panel-container-footer>\n }\n </mad-content-panel-container>\n</mad-main-container>\n", styles: [".w-full{width:100%}.back-button{background-color:transparent;border:0;cursor:pointer}.back-button:hover{background-color:var(--background-color)}.sidebar-wrapper{height:64px;background-color:var(--background-color)}.default-header-wrapper{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;white-space:nowrap}.back-and-title{display:flex;align-items:center;gap:1em;overflow:hidden}.back-and-title .title{margin:0;text-overflow:ellipsis;white-space:nowrap;overflow:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ContentPanelModule }, { kind: "component", type: ContentHeaderComponent, selector: "mad-content-header" }, { kind: "component", type: ContentPanelContainerComponent, selector: "mad-content-panel-container" }, { kind: "component", type: ContentPanelContainerContentComponent, selector: "mad-content-panel-container-content" }, { kind: "component", type: ContentPanelContainerFooterComponent, selector: "mad-content-panel-container-footer" }, { kind: "component", type: ContentPanelContainerSidebarComponent, selector: "mad-content-panel-container-sidebar" }, { kind: "component", type: MainContainerComponent, selector: "mad-main-container" }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i9$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }] }); }
3989
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SidebarLayoutComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1$8.Router }, { token: i2$4.Location }], target: i0.ɵɵFactoryTarget.Component }); }
3990
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: SidebarLayoutComponent, isStandalone: true, selector: "mad-sidebar-layout", inputs: { title: "title", hasBackButton: "hasBackButton", titleTemplate: "titleTemplate", sideBarItems: "sideBarItems", headerContent: "headerContent", actionGroup: "actionGroup", content: "content", footer: "footer" }, ngImport: i0, template: "<mad-main-container class=\"w-full\">\n <mad-content-header>\n @if (headerContentPortal) {\n <ng-template [cdkPortalOutlet]=\"headerContentPortal\"></ng-template>\n } @else {\n <div class=\"sidebar-wrapper default-header-wrapper\">\n <div class=\"back-and-title\">\n @if (hasBackButton) {\n <button class=\"back-button\">\n <mat-icon (click)=\"goToPreviousPage()\" class=\"mat-primary\"> arrow_back</mat-icon>\n </button>\n }\n @if (titleTemplate) {\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n } @else {\n <h2 class=\"title\">{{ title }}</h2>\n }\n </div>\n <ng-template [cdkPortalOutlet]=\"actionGroupPortal\"></ng-template>\n </div>\n }\n </mad-content-header>\n <mad-content-panel-container>\n @if (sideBarItemsPortal) {\n <mad-content-panel-container-sidebar>\n <ng-template [cdkPortalOutlet]=\"sideBarItemsPortal\"></ng-template>\n </mad-content-panel-container-sidebar>\n }\n @if (contentPortal) {\n <mad-content-panel-container-content>\n <ng-template [cdkPortalOutlet]=\"contentPortal\"></ng-template>\n </mad-content-panel-container-content>\n }\n @if (footerPortal) {\n <mad-content-panel-container-footer>\n <ng-template [cdkPortalOutlet]=\"footerPortal\"></ng-template>\n </mad-content-panel-container-footer>\n }\n </mad-content-panel-container>\n</mad-main-container>\n", styles: [".w-full{width:100%}.back-button{background-color:transparent;border:0;cursor:pointer}.back-button:hover{background-color:var(--background-color)}.sidebar-wrapper{height:64px;background-color:var(--background-color)}.default-header-wrapper{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;white-space:nowrap}.back-and-title{display:flex;align-items:center;gap:1em;overflow:hidden}.back-and-title .title{margin:0;text-overflow:ellipsis;white-space:nowrap;overflow:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ContentPanelModule }, { kind: "component", type: ContentHeaderComponent, selector: "mad-content-header" }, { kind: "component", type: ContentPanelContainerComponent, selector: "mad-content-panel-container" }, { kind: "component", type: ContentPanelContainerContentComponent, selector: "mad-content-panel-container-content" }, { kind: "component", type: ContentPanelContainerFooterComponent, selector: "mad-content-panel-container-footer" }, { kind: "component", type: ContentPanelContainerSidebarComponent, selector: "mad-content-panel-container-sidebar" }, { kind: "component", type: MainContainerComponent, selector: "mad-main-container" }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i9$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: RouterModule }] }); }
3991
3991
  }
3992
3992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SidebarLayoutComponent, decorators: [{
3993
3993
  type: Component,
3994
3994
  args: [{ selector: 'mad-sidebar-layout', imports: [CommonModule, ContentPanelModule, PortalModule, MatIconModule, RouterModule], template: "<mad-main-container class=\"w-full\">\n <mad-content-header>\n @if (headerContentPortal) {\n <ng-template [cdkPortalOutlet]=\"headerContentPortal\"></ng-template>\n } @else {\n <div class=\"sidebar-wrapper default-header-wrapper\">\n <div class=\"back-and-title\">\n @if (hasBackButton) {\n <button class=\"back-button\">\n <mat-icon (click)=\"goToPreviousPage()\" class=\"mat-primary\"> arrow_back</mat-icon>\n </button>\n }\n @if (titleTemplate) {\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n } @else {\n <h2 class=\"title\">{{ title }}</h2>\n }\n </div>\n <ng-template [cdkPortalOutlet]=\"actionGroupPortal\"></ng-template>\n </div>\n }\n </mad-content-header>\n <mad-content-panel-container>\n @if (sideBarItemsPortal) {\n <mad-content-panel-container-sidebar>\n <ng-template [cdkPortalOutlet]=\"sideBarItemsPortal\"></ng-template>\n </mad-content-panel-container-sidebar>\n }\n @if (contentPortal) {\n <mad-content-panel-container-content>\n <ng-template [cdkPortalOutlet]=\"contentPortal\"></ng-template>\n </mad-content-panel-container-content>\n }\n @if (footerPortal) {\n <mad-content-panel-container-footer>\n <ng-template [cdkPortalOutlet]=\"footerPortal\"></ng-template>\n </mad-content-panel-container-footer>\n }\n </mad-content-panel-container>\n</mad-main-container>\n", styles: [".w-full{width:100%}.back-button{background-color:transparent;border:0;cursor:pointer}.back-button:hover{background-color:var(--background-color)}.sidebar-wrapper{height:64px;background-color:var(--background-color)}.default-header-wrapper{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;white-space:nowrap}.back-and-title{display:flex;align-items:center;gap:1em;overflow:hidden}.back-and-title .title{margin:0;text-overflow:ellipsis;white-space:nowrap;overflow:inherit}\n"] }]
3995
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1$8.Router }, { type: i2$5.Location }], propDecorators: { title: [{
3995
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1$8.Router }, { type: i2$4.Location }], propDecorators: { title: [{
3996
3996
  type: Input
3997
3997
  }], hasBackButton: [{
3998
3998
  type: Input
@@ -4146,7 +4146,7 @@ class ToolbarService {
4146
4146
  clearMainActions() {
4147
4147
  this.mainActionsSignal.set([]);
4148
4148
  }
4149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarService, deps: [{ token: i1$8.Router }, { token: i2$4.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4149
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarService, deps: [{ token: i1$8.Router }, { token: i2$3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4150
4150
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarService, providedIn: 'root' }); }
4151
4151
  }
4152
4152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarService, decorators: [{
@@ -4154,7 +4154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
4154
4154
  args: [{
4155
4155
  providedIn: 'root',
4156
4156
  }]
4157
- }], ctorParameters: () => [{ type: i1$8.Router }, { type: i2$4.TranslateService }] });
4157
+ }], ctorParameters: () => [{ type: i1$8.Router }, { type: i2$3.TranslateService }] });
4158
4158
 
4159
4159
  class ToolbarComponent {
4160
4160
  constructor(breakpointObserver, titleService, toolbarService) {
@@ -4207,8 +4207,8 @@ class ToolbarComponent {
4207
4207
  hasImportantToolbarActions() {
4208
4208
  return this.getToolbarActions().filter((value) => !!value.importantAction).length > 0;
4209
4209
  }
4210
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1$9.BreakpointObserver }, { token: i2$6.Title }, { token: ToolbarService }], target: i0.ɵɵFactoryTarget.Component }); }
4211
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ToolbarComponent, isStandalone: true, selector: "mad-toolbar", host: { classAttribute: "mad-toolbar" }, ngImport: i0, template: "<mat-toolbar class=\"content-toolbar\">\n @if (isRouterLink(getBackAction())) {\n <a data-cy=\"back-link-button\" [routerLink]=\"getBackAction().routerLink\" [queryParams]=\"getBackAction().queryParams\">\n <button [id]=\"'go-back'\" class=\"mat-primary go-back-button\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n @if (isAbsoluteLink(getBackAction())) {\n <a data-cy=\"back-href-button\" [href]=\"getBackAction().href\">\n <button [id]=\"'go-back'\" class=\"go-back-button mat-primary\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n @if (isAction(getBackAction())) {\n <a data-cy=\"back-action-button\" (click)=\"getBackAction().action()\">\n <button [id]=\"'go-back'\" class=\"mat-primary go-back-button\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n\n <span class=\"toolbar-title\">{{ getTitle() }}</span>\n\n @for (mainAction of getMainActions(); track mainAction; let i = $index) {\n @if (hasPermission(mainAction) | async) {\n @if (!(isHandset$ | async)) {\n <div>\n @if (isRouterLink(mainAction)) {\n <a data-cy=\"main-action-link-button\" [routerLink]=\"mainAction.routerLink\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <div class=\"action-button-content-container\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </div>\n </mad-primary-button>\n </a>\n }\n @if (isAction(mainAction)) {\n <a data-cy=\"main-action-button\" (click)=\"mainAction.action()\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <div class=\"action-button-content-container\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </div>\n </mad-primary-button>\n </a>\n }\n </div>\n }\n @if (isHandset$ | async) {\n <div>\n @if (isRouterLink(getBackAction())) {\n <mad-material-action-button\n data-cy=\"material-main-link-button\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n [routerLink]=\"mainAction.routerLink\"\n [id]=\"mainAction.matIcon\"\n />\n }\n @if (isAction(getBackAction())) {\n <mad-material-action-button\n data-cy=\"material-main-action-button\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n (click)=\"mainAction.action()\"\n [id]=\"mainAction.matIcon\"\n />\n }\n </div>\n }\n }\n }\n\n <div class=\"right-aligned no-print\">\n @for (action of getToolbarActions(); track action; let i = $index) {\n @if (hasPermission(action) | async) {\n @if (\n (!(isHandset$ | async) && !getToolbarActionsAlwaysAsMenu()) ||\n i < (getToolbarActions().length > 2 ? (hasImportantToolbarActions() ? 0 : 1) : 2) ||\n !!action.importantAction\n ) {\n <mad-icon-button\n data-cy=\"action-icon-button\"\n (click)=\"action.action()\"\n [id]=\"action.matIcon\"\n [matTooltip]=\"action.actionName\"\n type=\"button\"\n >\n <mat-icon\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n matBadgePosition=\"below after\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n >{{ action.matIcon }}</mat-icon\n >\n </mad-icon-button>\n }\n }\n }\n\n @if ((isHandset$ | async) || getToolbarActionsAlwaysAsMenu()) {\n @if (getToolbarActions().length > 2) {\n <mad-icon-button data-cy=\"burger-button\" type=\"button\" [matMenuTriggerFor]=\"burgerMenu\" [matTooltip]=\"getToolbarActionsMenuTitle()\">\n <mat-icon\n matBadgeColor=\"warn\"\n [matBadge]=\"showBadgeForMenu() ? '&#8288;' : null\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >more_vert\n </mat-icon>\n </mad-icon-button>\n <mat-menu #burgerMenu=\"matMenu\" class=\"no-print toolbar-menu\">\n @for (action of getToolbarActions(); track action; let i = $index) {\n @if (!action.importantAction) {\n @if (hasPermission(action) | async) {\n @if (i >= (hasImportantToolbarActions() ? 0 : 1)) {\n <button data-cy=\"burger-menu-button\" mat-menu-item (click)=\"action.action()\" [title]=\"action.actionName\">\n <mat-icon\n class=\"mat-primary\"\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n matBadgePosition=\"below after\"\n >{{ action.matIcon }}</mat-icon\n >\n {{ action.actionName }}\n </button>\n }\n }\n }\n }\n </mat-menu>\n }\n }\n </div>\n</mat-toolbar>\n", styles: ["mat-toolbar{background:var(--toolbar-background)}.content-toolbar{height:57px;border-bottom:1px solid var(--mat-sys-outline-variant)}.right-aligned{overflow:visible;margin-left:auto;margin-right:0}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}.action-button-content-container{display:flex;align-items:center;gap:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { 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: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MaterialActionButtonComponent, selector: "mad-material-action-button", inputs: ["actionName", "id", "icon", "routerLink", "liftHigher", "liftHigher2"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i16.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { 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.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
4210
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1$9.BreakpointObserver }, { token: i2$5.Title }, { token: ToolbarService }], target: i0.ɵɵFactoryTarget.Component }); }
4211
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ToolbarComponent, isStandalone: true, selector: "mad-toolbar", host: { classAttribute: "mad-toolbar" }, ngImport: i0, template: "<mat-toolbar class=\"content-toolbar\">\n @if (isRouterLink(getBackAction())) {\n <a data-cy=\"back-link-button\" [routerLink]=\"getBackAction().routerLink\" [queryParams]=\"getBackAction().queryParams\">\n <button [id]=\"'go-back'\" class=\"mat-primary go-back-button\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n @if (isAbsoluteLink(getBackAction())) {\n <a data-cy=\"back-href-button\" [href]=\"getBackAction().href\">\n <button [id]=\"'go-back'\" class=\"go-back-button mat-primary\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n @if (isAction(getBackAction())) {\n <a data-cy=\"back-action-button\" (click)=\"getBackAction().action()\">\n <button [id]=\"'go-back'\" class=\"mat-primary go-back-button\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n\n <span class=\"toolbar-title\">{{ getTitle() }}</span>\n\n @for (mainAction of getMainActions(); track mainAction; let i = $index) {\n @if (hasPermission(mainAction) | async) {\n @if (!(isHandset$ | async)) {\n <div>\n @if (isRouterLink(mainAction)) {\n <a data-cy=\"main-action-link-button\" [routerLink]=\"mainAction.routerLink\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <div class=\"action-button-content-container\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </div>\n </mad-primary-button>\n </a>\n }\n @if (isAction(mainAction)) {\n <a data-cy=\"main-action-button\" (click)=\"mainAction.action()\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <div class=\"action-button-content-container\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </div>\n </mad-primary-button>\n </a>\n }\n </div>\n }\n @if (isHandset$ | async) {\n <div>\n @if (isRouterLink(getBackAction())) {\n <mad-material-action-button\n data-cy=\"material-main-link-button\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n [routerLink]=\"mainAction.routerLink\"\n [id]=\"mainAction.matIcon\"\n />\n }\n @if (isAction(getBackAction())) {\n <mad-material-action-button\n data-cy=\"material-main-action-button\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n (click)=\"mainAction.action()\"\n [id]=\"mainAction.matIcon\"\n />\n }\n </div>\n }\n }\n }\n\n <div class=\"right-aligned no-print\">\n @for (action of getToolbarActions(); track action; let i = $index) {\n @if (hasPermission(action) | async) {\n @if (\n (!(isHandset$ | async) && !getToolbarActionsAlwaysAsMenu()) ||\n i < (getToolbarActions().length > 2 ? (hasImportantToolbarActions() ? 0 : 1) : 2) ||\n !!action.importantAction\n ) {\n <mad-icon-button\n data-cy=\"action-icon-button\"\n (click)=\"action.action()\"\n [id]=\"action.matIcon\"\n [matTooltip]=\"action.actionName\"\n type=\"button\"\n >\n <mat-icon\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n matBadgePosition=\"below after\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n >{{ action.matIcon }}</mat-icon\n >\n </mad-icon-button>\n }\n }\n }\n\n @if ((isHandset$ | async) || getToolbarActionsAlwaysAsMenu()) {\n @if (getToolbarActions().length > 2) {\n <mad-icon-button data-cy=\"burger-button\" type=\"button\" [matMenuTriggerFor]=\"burgerMenu\" [matTooltip]=\"getToolbarActionsMenuTitle()\">\n <mat-icon\n matBadgeColor=\"warn\"\n [matBadge]=\"showBadgeForMenu() ? '&#8288;' : null\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >more_vert\n </mat-icon>\n </mad-icon-button>\n <mat-menu #burgerMenu=\"matMenu\" class=\"no-print toolbar-menu\">\n @for (action of getToolbarActions(); track action; let i = $index) {\n @if (!action.importantAction) {\n @if (hasPermission(action) | async) {\n @if (i >= (hasImportantToolbarActions() ? 0 : 1)) {\n <button data-cy=\"burger-menu-button\" mat-menu-item (click)=\"action.action()\" [title]=\"action.actionName\">\n <mat-icon\n class=\"mat-primary\"\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n matBadgePosition=\"below after\"\n >{{ action.matIcon }}</mat-icon\n >\n {{ action.actionName }}\n </button>\n }\n }\n }\n }\n </mat-menu>\n }\n }\n </div>\n</mat-toolbar>\n", styles: ["mat-toolbar{background:var(--toolbar-background)}.content-toolbar{height:57px;border-bottom:1px solid var(--mat-sys-outline-variant)}.right-aligned{overflow:visible;margin-left:auto;margin-right:0}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}.action-button-content-container{display:flex;align-items:center;gap:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { 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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MaterialActionButtonComponent, selector: "mad-material-action-button", inputs: ["actionName", "id", "icon", "routerLink", "liftHigher", "liftHigher2"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i16.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { 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.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
4212
4212
  }
4213
4213
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarComponent, decorators: [{
4214
4214
  type: Component,
@@ -4227,7 +4227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
4227
4227
  MatMenuModule,
4228
4228
  AsyncPipe,
4229
4229
  ], template: "<mat-toolbar class=\"content-toolbar\">\n @if (isRouterLink(getBackAction())) {\n <a data-cy=\"back-link-button\" [routerLink]=\"getBackAction().routerLink\" [queryParams]=\"getBackAction().queryParams\">\n <button [id]=\"'go-back'\" class=\"mat-primary go-back-button\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n @if (isAbsoluteLink(getBackAction())) {\n <a data-cy=\"back-href-button\" [href]=\"getBackAction().href\">\n <button [id]=\"'go-back'\" class=\"go-back-button mat-primary\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n @if (isAction(getBackAction())) {\n <a data-cy=\"back-action-button\" (click)=\"getBackAction().action()\">\n <button [id]=\"'go-back'\" class=\"mat-primary go-back-button\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n }\n\n <span class=\"toolbar-title\">{{ getTitle() }}</span>\n\n @for (mainAction of getMainActions(); track mainAction; let i = $index) {\n @if (hasPermission(mainAction) | async) {\n @if (!(isHandset$ | async)) {\n <div>\n @if (isRouterLink(mainAction)) {\n <a data-cy=\"main-action-link-button\" [routerLink]=\"mainAction.routerLink\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <div class=\"action-button-content-container\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </div>\n </mad-primary-button>\n </a>\n }\n @if (isAction(mainAction)) {\n <a data-cy=\"main-action-button\" (click)=\"mainAction.action()\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <div class=\"action-button-content-container\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </div>\n </mad-primary-button>\n </a>\n }\n </div>\n }\n @if (isHandset$ | async) {\n <div>\n @if (isRouterLink(getBackAction())) {\n <mad-material-action-button\n data-cy=\"material-main-link-button\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n [routerLink]=\"mainAction.routerLink\"\n [id]=\"mainAction.matIcon\"\n />\n }\n @if (isAction(getBackAction())) {\n <mad-material-action-button\n data-cy=\"material-main-action-button\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n (click)=\"mainAction.action()\"\n [id]=\"mainAction.matIcon\"\n />\n }\n </div>\n }\n }\n }\n\n <div class=\"right-aligned no-print\">\n @for (action of getToolbarActions(); track action; let i = $index) {\n @if (hasPermission(action) | async) {\n @if (\n (!(isHandset$ | async) && !getToolbarActionsAlwaysAsMenu()) ||\n i < (getToolbarActions().length > 2 ? (hasImportantToolbarActions() ? 0 : 1) : 2) ||\n !!action.importantAction\n ) {\n <mad-icon-button\n data-cy=\"action-icon-button\"\n (click)=\"action.action()\"\n [id]=\"action.matIcon\"\n [matTooltip]=\"action.actionName\"\n type=\"button\"\n >\n <mat-icon\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n matBadgePosition=\"below after\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n >{{ action.matIcon }}</mat-icon\n >\n </mad-icon-button>\n }\n }\n }\n\n @if ((isHandset$ | async) || getToolbarActionsAlwaysAsMenu()) {\n @if (getToolbarActions().length > 2) {\n <mad-icon-button data-cy=\"burger-button\" type=\"button\" [matMenuTriggerFor]=\"burgerMenu\" [matTooltip]=\"getToolbarActionsMenuTitle()\">\n <mat-icon\n matBadgeColor=\"warn\"\n [matBadge]=\"showBadgeForMenu() ? '&#8288;' : null\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >more_vert\n </mat-icon>\n </mad-icon-button>\n <mat-menu #burgerMenu=\"matMenu\" class=\"no-print toolbar-menu\">\n @for (action of getToolbarActions(); track action; let i = $index) {\n @if (!action.importantAction) {\n @if (hasPermission(action) | async) {\n @if (i >= (hasImportantToolbarActions() ? 0 : 1)) {\n <button data-cy=\"burger-menu-button\" mat-menu-item (click)=\"action.action()\" [title]=\"action.actionName\">\n <mat-icon\n class=\"mat-primary\"\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n matBadgePosition=\"below after\"\n >{{ action.matIcon }}</mat-icon\n >\n {{ action.actionName }}\n </button>\n }\n }\n }\n }\n </mat-menu>\n }\n }\n </div>\n</mat-toolbar>\n", styles: ["mat-toolbar{background:var(--toolbar-background)}.content-toolbar{height:57px;border-bottom:1px solid var(--mat-sys-outline-variant)}.right-aligned{overflow:visible;margin-left:auto;margin-right:0}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}.action-button-content-container{display:flex;align-items:center;gap:5px}\n"] }]
4230
- }], ctorParameters: () => [{ type: i1$9.BreakpointObserver }, { type: i2$6.Title }, { type: ToolbarService }] });
4230
+ }], ctorParameters: () => [{ type: i1$9.BreakpointObserver }, { type: i2$5.Title }, { type: ToolbarService }] });
4231
4231
 
4232
4232
  class ToolbarModule {
4233
4233
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -4401,166 +4401,1370 @@ class FileUploadComponent {
4401
4401
  this.uploadLabel = computed(() => this.text() || 'Upload', /* @ts-ignore */
4402
4402
  ...(ngDevMode ? [{ debugName: "uploadLabel" }] : /* istanbul ignore next */ []));
4403
4403
  }
4404
- uploadFile(files) {
4405
- if (!files) {
4406
- return;
4404
+ uploadFile(files) {
4405
+ if (!files) {
4406
+ return;
4407
+ }
4408
+ const fileArray = Array.from(files);
4409
+ if (!this.validateFileList(fileArray)) {
4410
+ return;
4411
+ }
4412
+ this.addFiles(fileArray);
4413
+ this.fileEmitter.emit(this.createFileListFromArray(this.fileList()));
4414
+ }
4415
+ openFile(file) {
4416
+ window.open(window.URL.createObjectURL(file));
4417
+ }
4418
+ remove(file) {
4419
+ this.fileList.update((files) => files.filter((existingFile) => existingFile !== file));
4420
+ this.fileEmitter.emit(this.createFileListFromArray(this.fileList()));
4421
+ }
4422
+ validateFileList(fileArray) {
4423
+ if (!this.multiple() && fileArray.length > 1) {
4424
+ this.emitError('ONLY_SINGLE_FILE');
4425
+ return false;
4426
+ }
4427
+ for (const file of fileArray) {
4428
+ if (!this.isAcceptedFileType(file.name)) {
4429
+ this.emitError('FILETYPE_NOT_SUPPORTED');
4430
+ return false;
4431
+ }
4432
+ }
4433
+ return true;
4434
+ }
4435
+ emitError(errorType) {
4436
+ this.errorEmitter.emit(errorType);
4437
+ }
4438
+ isAcceptedFileType(fileName) {
4439
+ const acceptedTypes = this.acceptedFileTypes();
4440
+ if (!acceptedTypes.length) {
4441
+ return true;
4442
+ }
4443
+ const fileExtension = fileName.split('.').pop()?.toLowerCase();
4444
+ if (!fileExtension) {
4445
+ return false;
4446
+ }
4447
+ return acceptedTypes.includes(`.${fileExtension}`);
4448
+ }
4449
+ addFiles(fileArray) {
4450
+ if (!this.multiple()) {
4451
+ this.fileList.set(fileArray);
4452
+ return;
4453
+ }
4454
+ this.fileList.update((files) => [...files, ...fileArray]);
4455
+ }
4456
+ createFileListFromArray(files) {
4457
+ const dataTransfer = new DataTransfer();
4458
+ files.forEach((file) => dataTransfer.items.add(file));
4459
+ return dataTransfer.files;
4460
+ }
4461
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4462
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FileUploadComponent, isStandalone: true, selector: "mad-file-upload", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, showFileList: { classPropertyName: "showFileList", publicName: "showFileList", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileEmitter: "fileEmitter", errorEmitter: "errorEmitter" }, ngImport: i0, template: "<mat-card\n id=\"uploadFileContainer\"\n class=\"upload-file-container\"\n (click)=\"fileInput.click()\"\n madDragAndDrop\n (onFileDropped)=\"uploadFile($event)\"\n>\n <input\n #fileInput\n hidden\n type=\"file\"\n [id]=\"id()\"\n [multiple]=\"multiple()\"\n [accept]=\"acceptAttribute()\"\n (change)=\"uploadFile(fileInput.files)\"\n (click)=\"fileInput.value = ''\"\n />\n <mat-card-content class=\"upload-file-content\">\n @if (hasSingleFile()) {\n {{ fileList()[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ uploadLabel() }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList()) {\n <mat-chip-listbox>\n @for (file of fileList(); track file) {\n <mat-chip class=\"download\" (click)=\"openFile(file)\" [removable]=\"removable()\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable()) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".upload-file-container{height:100px;margin:0;border:2px dashed var(--main-primary);background-repeat:no-repeat;background-position:center}.upload-file-container:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.upload-file-container,.upload-file-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: DragAndDropDirective, selector: "[madDragAndDrop]", outputs: ["onFileDropped"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i3$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i3$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i3$2.MatChipRemove, selector: "[matChipRemove]" }] }); }
4463
+ }
4464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FileUploadComponent, decorators: [{
4465
+ type: Component,
4466
+ args: [{ selector: 'mad-file-upload', imports: [MatCardModule, MatIconModule, ButtonModule, TranslateModule, DragAndDropDirective, MatChipsModule], template: "<mat-card\n id=\"uploadFileContainer\"\n class=\"upload-file-container\"\n (click)=\"fileInput.click()\"\n madDragAndDrop\n (onFileDropped)=\"uploadFile($event)\"\n>\n <input\n #fileInput\n hidden\n type=\"file\"\n [id]=\"id()\"\n [multiple]=\"multiple()\"\n [accept]=\"acceptAttribute()\"\n (change)=\"uploadFile(fileInput.files)\"\n (click)=\"fileInput.value = ''\"\n />\n <mat-card-content class=\"upload-file-content\">\n @if (hasSingleFile()) {\n {{ fileList()[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ uploadLabel() }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList()) {\n <mat-chip-listbox>\n @for (file of fileList(); track file) {\n <mat-chip class=\"download\" (click)=\"openFile(file)\" [removable]=\"removable()\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable()) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".upload-file-container{height:100px;margin:0;border:2px dashed var(--main-primary);background-repeat:no-repeat;background-position:center}.upload-file-container:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.upload-file-container,.upload-file-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"] }]
4467
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], showFileList: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFileList", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], fileEmitter: [{ type: i0.Output, args: ["fileEmitter"] }], errorEmitter: [{ type: i0.Output, args: ["errorEmitter"] }] } });
4468
+
4469
+ class TileComponent {
4470
+ constructor() {
4471
+ this.label = input.required(/* @ts-ignore */
4472
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
4473
+ this.variant = input('info', /* @ts-ignore */
4474
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
4475
+ this.size = input('md', /* @ts-ignore */
4476
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4477
+ /** Optional Material icon name */
4478
+ this.icon = input(null, /* @ts-ignore */
4479
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
4480
+ /** Icon position relative to label */
4481
+ this.iconPosition = input('start', /* @ts-ignore */
4482
+ ...(ngDevMode ? [{ debugName: "iconPosition" }] : /* istanbul ignore next */ []));
4483
+ }
4484
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4485
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: TileComponent, isStandalone: true, selector: "mad-tile", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
4486
+ }
4487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TileComponent, decorators: [{
4488
+ type: Component,
4489
+ args: [{ selector: 'mad-tile', imports: [MatIcon], template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"] }]
4490
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }] } });
4491
+
4492
+ class BreadcrumbComponent {
4493
+ constructor() {
4494
+ this.breadcrumbs = input.required(/* @ts-ignore */
4495
+ ...(ngDevMode ? [{ debugName: "breadcrumbs" }] : /* istanbul ignore next */ []));
4496
+ this.showCopy = input(false, /* @ts-ignore */
4497
+ ...(ngDevMode ? [{ debugName: "showCopy" }] : /* istanbul ignore next */ []));
4498
+ this.title = input('Copy', /* @ts-ignore */
4499
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
4500
+ this.copy = output();
4501
+ }
4502
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4503
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: BreadcrumbComponent, isStandalone: true, selector: "mad-breadcrumb", inputs: { breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: true, transformFunction: null }, showCopy: { classPropertyName: "showCopy", publicName: "showCopy", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copy: "copy" }, ngImport: i0, template: "@if (breadcrumbs().length) {\n <div class=\"breadcrumb\">\n <nav data-cy=\"breadcrumb-nav\" class=\"breadcrumb__nav\">\n @for (crumb of breadcrumbs(); track crumb.label; let last = $last) {\n @if (crumb.route?.length) {\n <a data-cy=\"breadcrumb-link\" [routerLink]=\"crumb.route\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else if (crumb.href?.length) {\n <a data-cy=\"breadcrumb-link\" [href]=\"crumb.href\" target=\"_blank\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else {\n <span data-cy=\"breadcrumb-current\" class=\"breadcrumb__current\">{{ crumb.label }}</span>\n }\n @if (!last) {\n <span data-cy=\"breadcrumb-separator\" class=\"breadcrumb__separator\">/</span>\n }\n }\n </nav>\n @if (showCopy()) {\n <mad-icon-button\n data-cy=\"breadcrumb-copy\"\n class=\"breadcrumb__copy\"\n (click)=\"copy.emit()\"\n [matTooltip]=\"title()\"\n matTooltipPosition=\"above\"\n >\n <mat-icon>content_copy</mat-icon>\n </mad-icon-button>\n }\n </div>\n}\n", styles: [".breadcrumb{display:flex;align-items:center;gap:.5rem}.breadcrumb__nav{display:flex;align-items:center;gap:.625rem;min-height:3.5rem;padding-block:.25rem;font-size:.875rem;line-height:1.25rem}.breadcrumb__link{color:var(--main-primary);text-decoration:none}.breadcrumb__link:hover{text-decoration:underline}.breadcrumb__current,.breadcrumb__separator{color:var(--breadcrumb-separator-color)}.breadcrumb__copy{flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
4504
+ }
4505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
4506
+ type: Component,
4507
+ 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"] }]
4508
+ }], 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"] }] } });
4509
+
4510
+ const VERSION = '22.3.2';
4511
+
4512
+ const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
4513
+ providedIn: 'root',
4514
+ factory: MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY,
4515
+ });
4516
+ function MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY() {
4517
+ return {
4518
+ size: 'medium',
4519
+ type: 'info',
4520
+ };
4521
+ }
4522
+
4523
+ class AlertComponent {
4524
+ constructor(alertConfig) {
4525
+ this.alertConfig = alertConfig;
4526
+ this.type = input(this.alertConfig.type, /* @ts-ignore */
4527
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
4528
+ this.message = input('', /* @ts-ignore */
4529
+ ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
4530
+ this.size = input(this.alertConfig.size, /* @ts-ignore */
4531
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4532
+ this.actionText = input('', /* @ts-ignore */
4533
+ ...(ngDevMode ? [{ debugName: "actionText" }] : /* istanbul ignore next */ []));
4534
+ this.closeable = input(true, /* @ts-ignore */
4535
+ ...(ngDevMode ? [{ debugName: "closeable" }] : /* istanbul ignore next */ []));
4536
+ this.close = output();
4537
+ this.action = output();
4538
+ this.classes = computed(() => `${this.type()} ${this.size()}`, /* @ts-ignore */
4539
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
4540
+ this.icon = computed(() => {
4541
+ switch (this.type()) {
4542
+ case 'success':
4543
+ return 'check_circle';
4544
+ case 'info':
4545
+ return 'info';
4546
+ case 'warning':
4547
+ return 'warning';
4548
+ case 'error':
4549
+ return 'error';
4550
+ }
4551
+ }, /* @ts-ignore */
4552
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
4553
+ }
4554
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AlertComponent, deps: [{ token: MAD_ALERT_DEFAULT_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Component }); }
4555
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: AlertComponent, isStandalone: true, selector: "mad-alert", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", action: "action" }, ngImport: i0, template: "<div data-cy=\"alert\" class=\"alert\" [class]=\"classes()\">\n <span data-cy=\"alert-icon\" class=\"icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n <span data-cy=\"alert-message\" class=\"message\">{{ message() }}</span>\n @if (actionText()) {\n <span data-cy=\"alert-action-btn\" class=\"action-btn\" (click)=\"action.emit()\">\n {{ actionText() }}\n </span>\n }\n @if (closeable()) {\n <button mat-icon-button data-cy=\"alert-close-btn\" class=\"close-btn\" (click)=\"close.emit()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n</div>\n", styles: [".alert{display:flex;align-items:center;padding:16px;border-radius:4px;margin:8px 0;font-size:14px;position:relative;border:1px solid transparent}.alert.small{padding:0 8px;font-size:14px}.alert.medium{padding:8px;font-size:16px}.alert.large{padding:12px 8px;font-size:18px}.alert .icon{margin-right:8px;display:flex;align-items:center}.alert .message{flex:1}.alert .action-btn,.alert .close-btn{color:inherit;margin-left:auto;padding:0}.alert .action-btn{text-decoration:underline;cursor:pointer}.alert .close-btn{display:flex;align-items:center;justify-content:center}.alert.success{background-color:var(--alert-success-background-color);border-color:var(--alert-success-border-color);color:var(--alert-success-text-color)}.alert.info{background-color:var(--alert-info-background-color);border-color:var(--alert-info-border-color);color:var(--alert-info-text-color)}.alert.warning{background-color:var(--alert-warning-background-color);border-color:var(--alert-warning-border-color);color:var(--alert-warning-text-color)}.alert.error{background-color:var(--alert-error-background-color);border-color:var(--alert-error-border-color);color:var(--alert-error-text-color)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }] }); }
4556
+ }
4557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AlertComponent, decorators: [{
4558
+ type: Component,
4559
+ args: [{ selector: 'mad-alert', imports: [MatIconModule, MatButtonModule], template: "<div data-cy=\"alert\" class=\"alert\" [class]=\"classes()\">\n <span data-cy=\"alert-icon\" class=\"icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n <span data-cy=\"alert-message\" class=\"message\">{{ message() }}</span>\n @if (actionText()) {\n <span data-cy=\"alert-action-btn\" class=\"action-btn\" (click)=\"action.emit()\">\n {{ actionText() }}\n </span>\n }\n @if (closeable()) {\n <button mat-icon-button data-cy=\"alert-close-btn\" class=\"close-btn\" (click)=\"close.emit()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n</div>\n", styles: [".alert{display:flex;align-items:center;padding:16px;border-radius:4px;margin:8px 0;font-size:14px;position:relative;border:1px solid transparent}.alert.small{padding:0 8px;font-size:14px}.alert.medium{padding:8px;font-size:16px}.alert.large{padding:12px 8px;font-size:18px}.alert .icon{margin-right:8px;display:flex;align-items:center}.alert .message{flex:1}.alert .action-btn,.alert .close-btn{color:inherit;margin-left:auto;padding:0}.alert .action-btn{text-decoration:underline;cursor:pointer}.alert .close-btn{display:flex;align-items:center;justify-content:center}.alert.success{background-color:var(--alert-success-background-color);border-color:var(--alert-success-border-color);color:var(--alert-success-text-color)}.alert.info{background-color:var(--alert-info-background-color);border-color:var(--alert-info-border-color);color:var(--alert-info-text-color)}.alert.warning{background-color:var(--alert-warning-background-color);border-color:var(--alert-warning-border-color);color:var(--alert-warning-text-color)}.alert.error{background-color:var(--alert-error-background-color);border-color:var(--alert-error-border-color);color:var(--alert-error-text-color)}\n"] }]
4560
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
4561
+ type: Inject,
4562
+ args: [MAD_ALERT_DEFAULT_CONFIGURATION]
4563
+ }] }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], action: [{ type: i0.Output, args: ["action"] }] } });
4564
+
4565
+ const DEFAULT_FILE_PREVIEW_CONFIG = {
4566
+ thumbnailSize: 'md',
4567
+ showOverlayPreview: true,
4568
+ showActionIcons: true,
4569
+ showDeleteAction: true,
4570
+ showPreviewAction: true,
4571
+ showDownloadAction: true,
4572
+ actions: [],
4573
+ generatePdfThumbnails: true,
4574
+ generateDocxThumbnails: true,
4575
+ };
4576
+ const DEFAULT_FILE_PREVIEW_LABELS = {
4577
+ galleryAriaLabel: 'File preview gallery',
4578
+ thumbnailPreviewAriaPrefix: 'Preview',
4579
+ emptyStateMessage: 'No files to preview',
4580
+ previewActionLabel: 'Preview',
4581
+ downloadActionLabel: 'Download',
4582
+ deleteActionLabel: 'Delete',
4583
+ closeActionLabel: 'Close preview',
4584
+ maximizeActionLabel: 'Maximize',
4585
+ restoreActionLabel: 'Restore',
4586
+ noPreviewMessage: 'No preview available for this file type.',
4587
+ downloadLabel: 'Download',
4588
+ docxRenderErrorMessage: 'Unable to render DOCX preview',
4589
+ };
4590
+ /** Thumbnail dimension presets in pixels. */
4591
+ const THUMBNAIL_SIZE_MAP = {
4592
+ sm: { width: 96, height: 96 },
4593
+ md: { width: 132, height: 132 },
4594
+ lg: { width: 180, height: 180 },
4595
+ };
4596
+
4597
+ /**
4598
+ * Detects the file preview kind from MIME type and file extension.
4599
+ *
4600
+ * Detection prioritizes MIME type matching over extension matching,
4601
+ * with extension as a reliable fallback for generic or missing MIME types.
4602
+ *
4603
+ * @param mimeType - The MIME type (case-insensitive)
4604
+ * @param extension - The file extension without dot (case-insensitive)
4605
+ * @returns The detected FilePreviewKind: 'image' | 'pdf' | 'docx' | 'xlsx' | 'unknown'
4606
+ */
4607
+ function detectFileKind(mimeType, extension) {
4608
+ const normalizedMimeType = mimeType.toLowerCase();
4609
+ const normalizedExtension = extension.toLowerCase();
4610
+ // PDF detection
4611
+ if (normalizedMimeType === 'application/pdf' || normalizedExtension === 'pdf') {
4612
+ return 'pdf';
4613
+ }
4614
+ // DOCX detection — docx-preview only parses OOXML (zip/XML) Word documents.
4615
+ // Legacy binary .doc, RTF and ODT are intentionally excluded so they fall through
4616
+ // to the 'unknown' branch and get a working "no preview available" + download UI
4617
+ // instead of being misdetected as 'docx' and failing to render.
4618
+ const docxMimePatterns = [
4619
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
4620
+ 'application/vnd.ms-word.document.macroenabled.12',
4621
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
4622
+ 'application/vnd.ms-word.template.macroenabled.12',
4623
+ ];
4624
+ const docxExtensions = ['docx', 'docm', 'dotx', 'dotm'];
4625
+ if (docxMimePatterns.includes(normalizedMimeType) || docxExtensions.includes(normalizedExtension)) {
4626
+ return 'docx';
4627
+ }
4628
+ // Excel detection (spreadsheets)
4629
+ const excelMimePatterns = [
4630
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // .xlsx
4631
+ 'application/vnd.ms-excel', // .xls
4632
+ 'application/vnd.ms-excel.sheet.macroenabled.12', // .xlsm
4633
+ 'application/vnd.ms-excel.sheet.binary.macroenabled.12', // .xlsb
4634
+ 'text/csv',
4635
+ 'application/vnd.oasis.opendocument.spreadsheet', // .ods
4636
+ ];
4637
+ const excelExtensions = ['xlsx', 'xls', 'xlsm', 'xlsb', 'csv', 'ods'];
4638
+ if (excelMimePatterns.some((pattern) => normalizedMimeType.includes(pattern)) || excelExtensions.includes(normalizedExtension)) {
4639
+ return 'xlsx';
4640
+ }
4641
+ // Image detection (JPEG, PNG, GIF, WebP, BMP, SVG, ICO)
4642
+ const imageMimePatterns = [
4643
+ 'image/jpeg',
4644
+ 'image/png',
4645
+ 'image/gif',
4646
+ 'image/webp',
4647
+ 'image/bmp',
4648
+ 'image/svg+xml',
4649
+ 'image/x-icon',
4650
+ 'image/ico',
4651
+ ];
4652
+ const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp', 'svg', 'ico'];
4653
+ if (imageMimePatterns.includes(normalizedMimeType) ||
4654
+ normalizedMimeType.startsWith('image/') ||
4655
+ imageExtensions.includes(normalizedExtension)) {
4656
+ return 'image';
4657
+ }
4658
+ // No match found
4659
+ return 'unknown';
4660
+ }
4661
+
4662
+ const SAFE_PROTOCOLS = new Set(['http:', 'https:', 'blob:']);
4663
+ const SAFE_DATA_URL_MIME_PREFIXES = [
4664
+ 'image/',
4665
+ 'application/pdf',
4666
+ 'application/msword',
4667
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
4668
+ 'application/vnd.ms-word.document.macroenabled.12',
4669
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
4670
+ 'application/vnd.ms-word.template.macroenabled.12',
4671
+ 'application/vnd.oasis.opendocument.text',
4672
+ 'application/rtf',
4673
+ 'text/plain',
4674
+ 'text/rtf',
4675
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
4676
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
4677
+ 'application/vnd.oasis.opendocument.spreadsheet',
4678
+ 'text/csv',
4679
+ ];
4680
+ function isBase64Input(source) {
4681
+ return (source !== null &&
4682
+ typeof source === 'object' &&
4683
+ !(source instanceof Blob) &&
4684
+ !(source instanceof ArrayBuffer) &&
4685
+ 'data' in source &&
4686
+ 'mimeType' in source &&
4687
+ typeof source.data === 'string');
4688
+ }
4689
+ function base64InputToDataUrl(input) {
4690
+ const { data, mimeType } = input;
4691
+ return data.startsWith('data:') ? data : `data:${mimeType};base64,${data}`;
4692
+ }
4693
+ function sanitizeSourceUrl(source, baseUrl) {
4694
+ const trimmedSource = source.trim();
4695
+ if (!trimmedSource || trimmedSource.startsWith('//')) {
4696
+ return undefined;
4697
+ }
4698
+ if (trimmedSource.startsWith('data:')) {
4699
+ return isSafeDataUrl(trimmedSource) ? trimmedSource : undefined;
4700
+ }
4701
+ if (!hasExplicitScheme(trimmedSource)) {
4702
+ return trimmedSource;
4703
+ }
4704
+ if (/\s/.test(trimmedSource)) {
4705
+ return undefined;
4706
+ }
4707
+ try {
4708
+ const parsedUrl = new URL(trimmedSource, baseUrl ?? 'https://local.invalid/');
4709
+ return SAFE_PROTOCOLS.has(parsedUrl.protocol) ? trimmedSource : undefined;
4710
+ }
4711
+ catch {
4712
+ return undefined;
4713
+ }
4714
+ }
4715
+ function hasExplicitScheme(source) {
4716
+ return /^[a-zA-Z][a-zA-Z\d+.-]*:/.test(source);
4717
+ }
4718
+ function isSafeDataUrl(source) {
4719
+ const match = /^data:([^;,]+)(;[^,]*)?,/i.exec(source);
4720
+ if (!match) {
4721
+ return false;
4722
+ }
4723
+ const mimeType = match[1]?.toLowerCase() ?? '';
4724
+ return SAFE_DATA_URL_MIME_PREFIXES.some((allowedPrefix) => mimeType.startsWith(allowedPrefix));
4725
+ }
4726
+ async function toArrayBuffer(source) {
4727
+ if (!source) {
4728
+ return new ArrayBuffer(0);
4729
+ }
4730
+ if (isBase64Input(source)) {
4731
+ const dataUrl = base64InputToDataUrl(source);
4732
+ const response = await fetch(dataUrl);
4733
+ return response.arrayBuffer();
4734
+ }
4735
+ if (typeof source === 'string') {
4736
+ const safeSource = sanitizeSourceUrl(source);
4737
+ if (!safeSource) {
4738
+ throw new Error('Unsafe file preview source URL.');
4739
+ }
4740
+ const response = await fetch(safeSource);
4741
+ return response.arrayBuffer();
4742
+ }
4743
+ if (source instanceof Blob) {
4744
+ if (typeof source.arrayBuffer === 'function') {
4745
+ return source.arrayBuffer();
4746
+ }
4747
+ // Fallback: try FileReader if available (browsers/JSDOM), then Response if available.
4748
+ if (typeof FileReader !== 'undefined') {
4749
+ return new Promise((resolve, reject) => {
4750
+ try {
4751
+ const reader = new FileReader();
4752
+ reader.onload = () => resolve(reader.result ?? new ArrayBuffer(0));
4753
+ reader.onerror = () => reject(new Error('Failed to read Blob as ArrayBuffer'));
4754
+ reader.readAsArrayBuffer(source);
4755
+ }
4756
+ catch (e) {
4757
+ reject(e instanceof Error ? e : new Error(String(e)));
4758
+ }
4759
+ });
4760
+ }
4761
+ if (typeof Response !== 'undefined') {
4762
+ try {
4763
+ const resp = new Response(source);
4764
+ return resp.arrayBuffer();
4765
+ }
4766
+ catch {
4767
+ return new ArrayBuffer(0);
4768
+ }
4769
+ }
4770
+ // Last-resort fallback for test environments: return empty ArrayBuffer.
4771
+ return new ArrayBuffer(0);
4772
+ }
4773
+ return source;
4774
+ }
4775
+
4776
+ /**
4777
+ * Injection token for the pdfjs-dist worker script URL.
4778
+ *
4779
+ * Override this token in your application providers when you want to serve the
4780
+ * worker from your own origin (e.g. copied into `assets/`) instead of the CDN:
4781
+ *
4782
+ * ```ts
4783
+ * { provide: PDF_WORKER_SRC, useValue: '/assets/pdf.worker.min.mjs' }
4784
+ * ```
4785
+ */
4786
+ const PDF_WORKER_SRC = new InjectionToken('PDF_WORKER_SRC', {
4787
+ // Loads the worker from public assets (copied during build from node_modules/pdfjs-dist/build)
4788
+ factory: () => '/assets/pdf.worker.min.mjs',
4789
+ });
4790
+
4791
+ /**
4792
+ * PDF Thumbnail Service for rendering the first page of a PDF as a JPEG thumbnail.
4793
+ *
4794
+ * Features:
4795
+ * - Dynamically loads pdfjs-dist library (optional dependency)
4796
+ * - Generates thumbnails from the first page of the PDF
4797
+ * - Supports custom worker source configuration via PDF_WORKER_SRC token
4798
+ * - Falls back to main-thread rendering if worker fails (CORS, version mismatch)
4799
+ * - Proper resource cleanup to prevent memory leaks
4800
+ */
4801
+ class PdfRenderer {
4802
+ constructor() {
4803
+ this.kind = 'pdf';
4804
+ // ──────────────────────────────────────────────────────────────
4805
+ // PDF Rendering Constants
4806
+ // ──────────────────────────────────────────────────────────────
4807
+ /**
4808
+ * First page number in PDF documents (1-based indexing).
4809
+ */
4810
+ this.PDF_FIRST_PAGE_NUMBER = 1;
4811
+ /**
4812
+ * Natural viewport scale: 1.0 means 100% (no scaling applied).
4813
+ * Used to get the PDF's natural dimensions before calculating target scale.
4814
+ */
4815
+ this.PDF_NATURAL_SCALE = 1;
4816
+ /**
4817
+ * Target thumbnail viewport width: 200px provides a balanced thumbnail size
4818
+ * that fits well in file listings and preview sidebars.
4819
+ */
4820
+ this.PDF_TARGET_VIEWPORT_WIDTH_PX = 200;
4821
+ /**
4822
+ * Maximum scale multiplier: 2.0 ensures high-quality thumbnails without
4823
+ * excessive memory usage or rendering time for small PDFs.
4824
+ */
4825
+ this.PDF_MAX_SCALE = 2;
4826
+ /**
4827
+ * JPEG quality: 0.82 (82%) balances file size and visual quality for thumbnails.
4828
+ * Provides clear, readable previews while keeping file sizes minimal.
4829
+ */
4830
+ this.PDF_JPEG_QUALITY = 0.82;
4831
+ /**
4832
+ * Canvas dimension reset value used during cleanup to free memory.
4833
+ * Setting width/height to 0 releases the internal pixel buffer.
4834
+ */
4835
+ this.PDF_CANVAS_CLEANUP_VALUE = 0;
4836
+ this.platformId = inject(PLATFORM_ID);
4837
+ this.document = inject(DOCUMENT, { optional: true });
4838
+ this.pdfWorkerSrc = inject(PDF_WORKER_SRC);
4839
+ this.isBrowser = isPlatformBrowser(this.platformId);
4840
+ }
4841
+ /**
4842
+ * Generates a JPEG thumbnail from the first page of the PDF.
4843
+ *
4844
+ * Process:
4845
+ * 1. Loads the pdfjs-dist library dynamically
4846
+ * 2. Reads the PDF file from source/URL
4847
+ * 3. Renders the first page to a canvas (scaled to ~200px width, max 2x)
4848
+ * 4. Exports as JPEG (0.82 quality)
4849
+ * 5. Cleans up resources (page, document, loading task, canvas)
4850
+ *
4851
+ * Resource Management:
4852
+ * - Canvas is created only after we have the page and viewport dimensions
4853
+ * - Canvas is cleaned up immediately after blob extraction (toBlob callback)
4854
+ * - This prevents memory leaks from accumulated canvas objects
4855
+ * - All PDF.js resources (page, document, loading task) are also cleaned up
4856
+ *
4857
+ * Resilience:
4858
+ * - Tries worker-based rendering first
4859
+ * - Falls back to main-thread rendering if worker fails
4860
+ * - Handles cleanup errors gracefully
4861
+ *
4862
+ * @param source - The PDF file source (URL, Blob, ArrayBuffer, etc.)
4863
+ * @param resolvedUrl - Optional pre-resolved URL for the file
4864
+ * @returns A JPEG Blob thumbnail (240x320px recommended), or undefined on failure
4865
+ */
4866
+ async generateThumbnail(source, resolvedUrl) {
4867
+ if (!this.isBrowser || !this.document) {
4868
+ return undefined;
4869
+ }
4870
+ let loadingTask;
4871
+ let pdf;
4872
+ let page;
4873
+ let canvas;
4874
+ try {
4875
+ const pdfjs = await this.loadAndCachePdfJsModule();
4876
+ if (!pdfjs) {
4877
+ return undefined;
4878
+ }
4879
+ if (!pdfjs.GlobalWorkerOptions.workerSrc) {
4880
+ pdfjs.GlobalWorkerOptions.workerSrc = this.getDefaultPdfWorkerSourceUrl(pdfjs.version);
4881
+ }
4882
+ const arrayBuffer = await toArrayBuffer(source ?? resolvedUrl);
4883
+ const data = new Uint8Array(arrayBuffer);
4884
+ // Try with the worker first; if it fails (version mismatch, CORS, network)
4885
+ // retry on the main thread so users still get a thumbnail.
4886
+ loadingTask = pdfjs.getDocument({ data });
4887
+ try {
4888
+ pdf = await loadingTask.promise;
4889
+ }
4890
+ catch {
4891
+ try {
4892
+ await loadingTask?.destroy?.();
4893
+ }
4894
+ catch {
4895
+ // ignore
4896
+ }
4897
+ loadingTask = pdfjs.getDocument({ data, disableWorker: true });
4898
+ pdf = await loadingTask.promise;
4899
+ }
4900
+ page = await pdf.getPage(this.PDF_FIRST_PAGE_NUMBER);
4901
+ const naturalViewport = page.getViewport({ scale: this.PDF_NATURAL_SCALE });
4902
+ const scale = Math.min(this.PDF_TARGET_VIEWPORT_WIDTH_PX / naturalViewport.width, this.PDF_MAX_SCALE);
4903
+ const viewport = page.getViewport({ scale });
4904
+ // Create canvas only after we have the page and calculated viewport dimensions
4905
+ canvas = this.document.createElement('canvas');
4906
+ canvas.width = Math.ceil(viewport.width);
4907
+ canvas.height = Math.ceil(viewport.height);
4908
+ const ctx = canvas.getContext('2d');
4909
+ if (!ctx) {
4910
+ return undefined;
4911
+ }
4912
+ await page.render({ canvasContext: ctx, viewport }).promise;
4913
+ // Return blob with proper cleanup after extraction
4914
+ const canvasToExport = canvas;
4915
+ return await new Promise((resolve) => {
4916
+ canvasToExport.toBlob((blob) => {
4917
+ // Clean up canvas resources immediately after blob is extracted
4918
+ // This prevents accumulated canvas objects from staying in memory
4919
+ if (canvas) {
4920
+ canvas.width = this.PDF_CANVAS_CLEANUP_VALUE;
4921
+ canvas.height = this.PDF_CANVAS_CLEANUP_VALUE;
4922
+ canvas = undefined;
4923
+ }
4924
+ resolve(blob ?? undefined);
4925
+ }, 'image/jpeg', this.PDF_JPEG_QUALITY);
4926
+ });
4927
+ }
4928
+ catch {
4929
+ return undefined;
4930
+ }
4931
+ finally {
4932
+ // Best-effort cleanup of all resources
4933
+ try {
4934
+ page?.cleanup?.();
4935
+ }
4936
+ catch {
4937
+ // Best-effort cleanup.
4938
+ }
4939
+ try {
4940
+ pdf?.cleanup?.();
4941
+ await pdf?.destroy?.();
4942
+ }
4943
+ catch {
4944
+ // Best-effort cleanup.
4945
+ }
4946
+ try {
4947
+ await loadingTask?.destroy?.();
4948
+ }
4949
+ catch {
4950
+ // Best-effort cleanup.
4951
+ }
4952
+ if (canvas) {
4953
+ try {
4954
+ canvas.width = this.PDF_CANVAS_CLEANUP_VALUE;
4955
+ canvas.height = this.PDF_CANVAS_CLEANUP_VALUE;
4956
+ }
4957
+ catch {
4958
+ // Ignore cleanup errors
4959
+ }
4960
+ }
4961
+ }
4962
+ }
4963
+ /**
4964
+ * Gets the PDF.js worker URL to use for rendering.
4965
+ *
4966
+ * Priority:
4967
+ * 1. Custom URL from PDF_WORKER_SRC token (if provided)
4968
+ * 2. Versioned CDN URL matching the installed pdfjs-dist version
4969
+ *
4970
+ * This ensures the worker script matches the library version to prevent incompatibility.
4971
+ *
4972
+ * @param _version - The pdfjs-dist version (e.g., "4.0.0")
4973
+ * @returns The worker script URL
4974
+ */
4975
+ getDefaultPdfWorkerSourceUrl(_version) {
4976
+ // If the user provided a custom URL via the PDF_WORKER_SRC token, use it.
4977
+ // Otherwise build a versioned CDN URL so the worker matches the installed library.
4978
+ return this.pdfWorkerSrc;
4979
+ }
4980
+ /**
4981
+ * Dynamically imports and caches the pdfjs-dist module for PDF processing.
4982
+ * Uses a single cached promise to prevent multiple import attempts.
4983
+ * Handles failures gracefully by returning null if import fails.
4984
+ *
4985
+ * @returns The loaded pdfjs-dist module, or null if import fails
4986
+ */
4987
+ loadAndCachePdfJsModule() {
4988
+ // Widen the specifier to `string` so TS resolves this as a generic dynamic import instead of
4989
+ // statically loading pdfjs-dist's own types — those pull in `@napi-rs/canvas`'s Node-only
4990
+ // type declarations (Buffer/http/stream), which this library's tsconfig can't resolve
4991
+ // (no @types/node). Looks "unnecessary" to the linter, but removing it breaks `ng build`.
4992
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
4993
+ this.pdfJsModulePromise ??= import('pdfjs-dist').then((module) => module).catch(() => null);
4994
+ return this.pdfJsModulePromise;
4995
+ }
4996
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PdfRenderer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4997
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PdfRenderer, providedIn: 'root' }); }
4998
+ }
4999
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PdfRenderer, decorators: [{
5000
+ type: Injectable,
5001
+ args: [{ providedIn: 'root' }]
5002
+ }] });
5003
+
5004
+ /**
5005
+ * Core service for the Material Addons File Preview component.
5006
+ *
5007
+ * Responsibilities:
5008
+ * - Detecting file kind from MIME type / extension
5009
+ * - Resolving any source format (URL, data URI, Base64 input, Blob, ArrayBuffer) to a URL
5010
+ * - Generating rasterised PDF thumbnails via pdfjs-dist (optional — gracefully falls back to icon)
5011
+ * - Triggering browser file downloads
5012
+ * - Cleaning up blob object URLs on destroy
5013
+ *
5014
+ * Note: DOCX rendering is now component-driven via DocxPreviewComponent for both full preview
5015
+ * and thumbnail modes. The service no longer renders DOCX content; it only detects the kind
5016
+ * and resolves the source URL. The dialog and gallery handle rendering.
5017
+ */
5018
+ class FilePreviewService {
5019
+ constructor() {
5020
+ /** Tracks object URLs created by this service so they can be revoked on destroy. */
5021
+ this.objectUrls = new Set();
5022
+ this.platformId = inject(PLATFORM_ID);
5023
+ this.document = inject(DOCUMENT, { optional: true });
5024
+ this.isBrowser = isPlatformBrowser(this.platformId);
5025
+ this.pdfRenderer = inject(PdfRenderer, { optional: true });
5026
+ }
5027
+ // ------------------------------------------------------------------
5028
+ // Public API
5029
+ // ------------------------------------------------------------------
5030
+ /** Resolves an array of FilePreviewItems in parallel. */
5031
+ async resolveItems(items, thumbnailConfig = {}) {
5032
+ if (items.length === 0) {
5033
+ return [];
5034
+ }
5035
+ const maxConcurrent = Math.min(4, items.length);
5036
+ const resolved = new Array(items.length);
5037
+ let cursor = 0;
5038
+ await Promise.all(Array.from({ length: maxConcurrent }, async () => {
5039
+ while (true) {
5040
+ const index = cursor++;
5041
+ if (index >= items.length) {
5042
+ return;
5043
+ }
5044
+ resolved[index] = await this.resolveItem(items[index], thumbnailConfig);
5045
+ }
5046
+ }));
5047
+ return resolved;
5048
+ }
5049
+ /**
5050
+ * Resolves a single FilePreviewItem:
5051
+ * 1. Detects the rendering kind (image / pdf / docx / unknown)
5052
+ * 2. Converts the source to a URL usable by <img>, <object>, or fetch
5053
+ * 3. Generates a thumbnail URL if none is supplied
5054
+ */
5055
+ async resolveItem(item, thumbnailConfig = {}) {
5056
+ const kind = this.detectKind(item);
5057
+ const resolvedPreviewUrl = this.sanitizeResolvedUrl(item.previewUrl) ?? this.resolveSourceUrl(item.source);
5058
+ let resolvedThumbnailUrl = this.sanitizeResolvedUrl(item.thumbnailUrl);
5059
+ if (!resolvedThumbnailUrl) {
5060
+ if (kind === 'image') {
5061
+ // Current image strategy: use resolved preview URL directly as thumbnail.
5062
+ resolvedThumbnailUrl = resolvedPreviewUrl;
5063
+ }
5064
+ else if (kind === 'pdf' && thumbnailConfig.generatePdfThumbnails && resolvedPreviewUrl) {
5065
+ resolvedThumbnailUrl = await this.tryGeneratePdfThumbnail(item.source, resolvedPreviewUrl);
5066
+ }
5067
+ // DOCX thumbnails are now component-driven (DocxPreviewComponent with scaling via CSS transform).
5068
+ // The gallery defers rendering the component until the tile scrolls into view (@defer on viewport),
5069
+ // and falls back to an icon if rendering fails.
5070
+ }
5071
+ return {
5072
+ ...item,
5073
+ kind,
5074
+ extension: this.getExtension(item.name),
5075
+ resolvedPreviewUrl,
5076
+ resolvedThumbnailUrl,
5077
+ };
5078
+ }
5079
+ /**
5080
+ * Detects the rendering kind from MIME type and/or file extension.
5081
+ * Extension-based detection serves as a reliable fallback for
5082
+ * scenarios where the MIME type is generic (e.g. 'application/octet-stream').
5083
+ */
5084
+ detectKind(item) {
5085
+ const mimeType = item.mimeType?.toLowerCase() ?? '';
5086
+ const extension = this.getExtension(item.name);
5087
+ return detectFileKind(mimeType, extension);
5088
+ }
5089
+ /**
5090
+ * Attempts to generate a rasterised first-page thumbnail for a PDF source.
5091
+ * Requires `pdfjs-dist` to be installed in the host application.
5092
+ * Returns undefined (triggering icon fallback) if the library is absent or rendering fails.
5093
+ *
5094
+ * To install: npm install pdfjs-dist
5095
+ */
5096
+ async tryGeneratePdfThumbnail(source, resolvedUrl) {
5097
+ if (!this.pdfRenderer) {
5098
+ return undefined;
5099
+ }
5100
+ try {
5101
+ const blob = await this.pdfRenderer.generateThumbnail(source, resolvedUrl);
5102
+ if (!blob) {
5103
+ return undefined;
5104
+ }
5105
+ return this.createObjectUrl(blob);
5106
+ }
5107
+ catch {
5108
+ // Rendering failed (corrupted PDF, worker unavailable, etc.) — use icon
5109
+ return undefined;
5110
+ }
5111
+ }
5112
+ /** Triggers a browser download for the resolved file. */
5113
+ download(item) {
5114
+ const href = this.sanitizeResolvedUrl(item.resolvedPreviewUrl);
5115
+ if (!href || !this.isBrowser || !this.document) {
5116
+ return;
5117
+ }
5118
+ const anchor = this.document.createElement('a');
5119
+ anchor.href = href;
5120
+ anchor.download = item.name;
5121
+ anchor.rel = 'noopener';
5122
+ this.document.body.appendChild(anchor);
5123
+ anchor.click();
5124
+ anchor.remove();
5125
+ }
5126
+ /**
5127
+ * Formats a byte count as a human-readable string (B / KB / MB).
5128
+ * Exposed for use in templates and tests.
5129
+ */
5130
+ formatFileSize(bytes) {
5131
+ if (bytes == null || bytes < 0) {
5132
+ return '';
5133
+ }
5134
+ if (bytes < 1024) {
5135
+ return `${bytes} B`;
5136
+ }
5137
+ if (bytes < 1024 * 1024) {
5138
+ return `${(bytes / 1024).toFixed(1)} KB`;
5139
+ }
5140
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
5141
+ }
5142
+ /** Revokes all object URLs created during this service's lifetime. Call on component destroy. */
5143
+ releaseResources() {
5144
+ if (this.canUseObjectUrls()) {
5145
+ this.objectUrls.forEach((url) => URL.revokeObjectURL(url));
5146
+ }
5147
+ this.objectUrls.clear();
5148
+ }
5149
+ /**
5150
+ * Keeps only currently used object URLs and revokes all others.
5151
+ * Useful for long-lived components receiving many list updates.
5152
+ */
5153
+ retainOnlyObjectUrls(urlsToKeep) {
5154
+ if (!this.canUseObjectUrls()) {
5155
+ this.objectUrls.clear();
5156
+ return;
5157
+ }
5158
+ const keep = new Set();
5159
+ for (const url of urlsToKeep) {
5160
+ if (url && this.objectUrls.has(url)) {
5161
+ keep.add(url);
5162
+ }
5163
+ }
5164
+ this.objectUrls.forEach((url) => {
5165
+ if (!keep.has(url)) {
5166
+ URL.revokeObjectURL(url);
5167
+ this.objectUrls.delete(url);
5168
+ }
5169
+ });
5170
+ }
5171
+ // ------------------------------------------------------------------
5172
+ // Private helpers
5173
+ // ------------------------------------------------------------------
5174
+ /**
5175
+ * Converts any accepted source format to a URL string.
5176
+ *
5177
+ * Accepted forms:
5178
+ * - `string` → returned as-is (data URI or http/https URL)
5179
+ * - `FilePreviewBase64Input` → assembled into a data URI
5180
+ * - `Blob | File` → converted to an object URL (tracked for cleanup)
5181
+ * - `ArrayBuffer` → wrapped in a Blob, then object URL
5182
+ */
5183
+ resolveSourceUrl(source) {
5184
+ if (!source) {
5185
+ return undefined;
5186
+ }
5187
+ // ① Structured Base64 input (e.g. from carCAT backend API)
5188
+ if (this.isBase64Input(source)) {
5189
+ return this.base64InputToDataUrl(source);
5190
+ }
5191
+ // ② Plain string — data URI (data:image/png;base64,...) or http/https URL
5192
+ if (typeof source === 'string') {
5193
+ return this.sanitizeResolvedUrl(source);
5194
+ }
5195
+ // ③ Blob / File — create a revocable object URL
5196
+ if (source instanceof Blob) {
5197
+ return this.createObjectUrl(source);
5198
+ }
5199
+ // ④ ArrayBuffer — wrap in a generic Blob
5200
+ const blob = new Blob([source]);
5201
+ return this.createObjectUrl(blob);
5202
+ }
5203
+ /**
5204
+ * Type guard for `FilePreviewBase64Input`.
5205
+ * Checks for the shape `{ data: string; mimeType: string }`.
5206
+ */
5207
+ isBase64Input(source) {
5208
+ return isBase64Input(source);
5209
+ }
5210
+ /**
5211
+ * Converts a `FilePreviewBase64Input` to a fully qualified data URI.
5212
+ * Accepts both raw base64 strings and pre-formed data URIs.
5213
+ */
5214
+ base64InputToDataUrl(input) {
5215
+ return base64InputToDataUrl(input);
5216
+ }
5217
+ createObjectUrl(blob) {
5218
+ // On server (SSR) do not create object URLs.
5219
+ if (!this.isBrowser) {
5220
+ return undefined;
5221
+ }
5222
+ try {
5223
+ if (typeof URL !== 'undefined' && typeof URL.createObjectURL === 'function') {
5224
+ const objectUrl = URL.createObjectURL(blob);
5225
+ this.objectUrls.add(objectUrl);
5226
+ return objectUrl;
5227
+ }
4407
5228
  }
4408
- const fileArray = Array.from(files);
4409
- if (!this.validateFileList(fileArray)) {
4410
- return;
5229
+ catch {
5230
+ // ignore and fall through to synthetic fallback
4411
5231
  }
4412
- this.addFiles(fileArray);
4413
- this.fileEmitter.emit(this.createFileListFromArray(this.fileList()));
5232
+ // Fallback for browser-like test environments without URL.createObjectURL (JSDOM/Node):
5233
+ const synthetic = `blob:local/${this.objectUrls.size + 1}`;
5234
+ this.objectUrls.add(synthetic);
5235
+ return synthetic;
4414
5236
  }
4415
- openFile(file) {
4416
- window.open(window.URL.createObjectURL(file));
5237
+ canUseObjectUrls() {
5238
+ return (this.isBrowser && typeof URL !== 'undefined' && typeof URL.createObjectURL === 'function' && typeof URL.revokeObjectURL === 'function');
4417
5239
  }
4418
- remove(file) {
4419
- this.fileList.update((files) => files.filter((existingFile) => existingFile !== file));
4420
- this.fileEmitter.emit(this.createFileListFromArray(this.fileList()));
5240
+ sanitizeResolvedUrl(url) {
5241
+ return url ? sanitizeSourceUrl(url, this.document?.baseURI) : undefined;
4421
5242
  }
4422
- validateFileList(fileArray) {
4423
- if (!this.multiple() && fileArray.length > 1) {
4424
- this.emitError('ONLY_SINGLE_FILE');
4425
- return false;
5243
+ getExtension(fileName) {
5244
+ if (!fileName) {
5245
+ return '';
4426
5246
  }
4427
- for (const file of fileArray) {
4428
- if (!this.isAcceptedFileType(file.name)) {
4429
- this.emitError('FILETYPE_NOT_SUPPORTED');
4430
- return false;
4431
- }
5247
+ const parts = fileName.split('.');
5248
+ if (parts.length <= 1) {
5249
+ return '';
4432
5250
  }
4433
- return true;
5251
+ return parts[parts.length - 1].toLowerCase();
4434
5252
  }
4435
- emitError(errorType) {
4436
- this.errorEmitter.emit(errorType);
5253
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilePreviewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5254
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilePreviewService }); }
5255
+ }
5256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilePreviewService, decorators: [{
5257
+ type: Injectable
5258
+ }] });
5259
+
5260
+ /**
5261
+ * Standalone Angular component for displaying DOCX previews with Shadow DOM encapsulation.
5262
+ *
5263
+ * Features:
5264
+ * - Full-size preview rendering (default): Renders the full DOCX document at normal scale
5265
+ * - Thumbnail preview mode: Shows readable content cropped to thumbnail dimensions (like PDF)
5266
+ *
5267
+ * Responsibilities:
5268
+ * 1. Receives DOCX file source as input (required)
5269
+ * 2. Renders the DOCX directly into Shadow DOM using docx-preview library
5270
+ * 3. Keeps library CSS scoped to the shadow boundary (no global style pollution)
5271
+ * 4. Supports thumbnail mode: renders at readable size, container crops to show top portion
5272
+ * 5. Handles errors gracefully
5273
+ *
5274
+ * Thumbnail Strategy:
5275
+ * - In thumbnail mode, component renders at full readable size
5276
+ * - Container width is set to tile width (e.g., 240px)
5277
+ * - overflow: hidden crops the display to show top portion only
5278
+ * - Result: readable content preview similar to PDF thumbnails
5279
+ *
5280
+ * Shadow DOM Strategy:
5281
+ * - ViewEncapsulation.ShadowDom ensures docx-preview's styles don't affect the rest of the application
5282
+ * - CSS stays scoped to the component instance
5283
+ * - Multiple instances don't interfere with each other
5284
+ * - Third argument (styleContainer) in renderAsync() ensures styles stay within the shadow root
5285
+ */
5286
+ class DocxPreviewComponent {
5287
+ constructor() {
5288
+ /**
5289
+ * The DOCX file source to render (URL, Blob, ArrayBuffer, etc.).
5290
+ * Required input - component will not render without it.
5291
+ */
5292
+ this.source = input.required(/* @ts-ignore */
5293
+ ...(ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []));
5294
+ /**
5295
+ * Thumbnail mode.
5296
+ * When true, only the document's first page is kept and it is scaled down to fit this
5297
+ * component's own content box, producing a readable mini-preview like the PDF thumbnails.
5298
+ *
5299
+ * The scale factor is derived from the host element's measured width, so the caller does
5300
+ * not pass a tile width — sizing the host (e.g. via the gallery tile) is enough.
5301
+ */
5302
+ this.thumbnail = input(false, /* @ts-ignore */
5303
+ ...(ngDevMode ? [{ debugName: "thumbnail" }] : /* istanbul ignore next */ []));
5304
+ /** Emits when rendering the DOCX fails, so callers can fall back to an icon. */
5305
+ this.renderFailed = output();
5306
+ this.isThumbnail = computed(() => this.thumbnail(), /* @ts-ignore */
5307
+ ...(ngDevMode ? [{ debugName: "isThumbnail" }] : /* istanbul ignore next */ []));
5308
+ this.docxHost = viewChild.required('docxHost', /* @ts-ignore */
5309
+ ...(ngDevMode ? [{ debugName: "docxHost" }] : /* istanbul ignore next */ []));
5310
+ this.platformId = inject(PLATFORM_ID);
5311
+ this.isBrowser = isPlatformBrowser(this.platformId);
4437
5312
  }
4438
- isAcceptedFileType(fileName) {
4439
- const acceptedTypes = this.acceptedFileTypes();
4440
- if (!acceptedTypes.length) {
4441
- return true;
5313
+ ngAfterViewInit() {
5314
+ void this.renderDocx();
5315
+ }
5316
+ async renderDocx() {
5317
+ const source = this.source();
5318
+ if (!this.isBrowser) {
5319
+ this.showError();
5320
+ return;
4442
5321
  }
4443
- const fileExtension = fileName.split('.').pop()?.toLowerCase();
4444
- if (!fileExtension) {
4445
- return false;
5322
+ try {
5323
+ const host = this.docxHost().nativeElement;
5324
+ const [{ renderAsync }, arrayBuffer] = await Promise.all([import('docx-preview'), toArrayBuffer(source)]);
5325
+ // Render DOCX directly into the shadow host
5326
+ // Pass host as third argument (styleContainer) to keep CSS scoped to shadow boundary
5327
+ await renderAsync(arrayBuffer, host, host, {
5328
+ className: 'docx-preview-document',
5329
+ inWrapper: true,
5330
+ ignoreWidth: false,
5331
+ ignoreHeight: true,
5332
+ // Always paginate: in thumbnail mode only the first page is kept, which keeps the
5333
+ // amount of rendered DOM per gallery tile bounded by one page instead of the whole document.
5334
+ breakPages: true,
5335
+ });
5336
+ // In thumbnail mode, keep only the first page and scale it down to fit the tile
5337
+ if (this.isThumbnail()) {
5338
+ this.applyThumbnailCrop(host);
5339
+ }
5340
+ }
5341
+ catch (error) {
5342
+ console.error('[DocxPreviewComponent] Error rendering DOCX:', error);
5343
+ this.showError();
4446
5344
  }
4447
- return acceptedTypes.includes(`.${fileExtension}`);
4448
5345
  }
4449
- addFiles(fileArray) {
4450
- if (!this.multiple()) {
4451
- this.fileList.set(fileArray);
5346
+ /**
5347
+ * Restrict the rendered DOCX to its first page and scale it down to fit the thumbnail tile.
5348
+ *
5349
+ * docx-preview renders each page as a <section class="{className}"> inside a
5350
+ * <div class="{className}-wrapper">. With className: 'docx-preview-document',
5351
+ * pages are `.docx-preview-document-wrapper > .docx-preview-document`.
5352
+ *
5353
+ * Pages are rendered at their real physical size (e.g. ~816px wide for a Letter page
5354
+ * with ~96px margins), which is far larger than a thumbnail tile. Simply cropping with
5355
+ * `overflow: hidden` only ever shows the page's blank top margin. Instead, the whole
5356
+ * page is visually scaled down with a CSS transform so its actual content is visible.
5357
+ */
5358
+ applyThumbnailCrop(host) {
5359
+ const wrapper = host.querySelector('.docx-preview-document-wrapper');
5360
+ const pages = host.querySelectorAll('.docx-preview-document-wrapper > .docx-preview-document');
5361
+ const firstPage = pages[0];
5362
+ if (!wrapper || !firstPage) {
4452
5363
  return;
4453
5364
  }
4454
- this.fileList.update((files) => [...files, ...fileArray]);
5365
+ // Hide all pages except the first one
5366
+ for (let i = 1; i < pages.length; i++) {
5367
+ pages[i].style.display = 'none';
5368
+ }
5369
+ // Scale the first page down so it fits this component's own content box. The host's
5370
+ // measured width is used rather than a caller-supplied tile width, because the host sits
5371
+ // inside the tile's padding — using the tile width would overflow and clip the page.
5372
+ const availableWidth = host.clientWidth;
5373
+ const naturalWidth = firstPage.getBoundingClientRect().width || firstPage.offsetWidth;
5374
+ if (!availableWidth || !naturalWidth) {
5375
+ return;
5376
+ }
5377
+ const scale = availableWidth / naturalWidth;
5378
+ wrapper.style.position = 'absolute';
5379
+ wrapper.style.top = '0';
5380
+ wrapper.style.left = '0';
5381
+ wrapper.style.transform = `scale(${scale})`;
5382
+ wrapper.style.transformOrigin = 'top left';
4455
5383
  }
4456
- createFileListFromArray(files) {
4457
- const dataTransfer = new DataTransfer();
4458
- files.forEach((file) => dataTransfer.items.add(file));
4459
- return dataTransfer.files;
5384
+ showError() {
5385
+ this.docxHost().nativeElement.innerHTML = '';
5386
+ this.renderFailed.emit();
4460
5387
  }
4461
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4462
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FileUploadComponent, isStandalone: true, selector: "mad-file-upload", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, showFileList: { classPropertyName: "showFileList", publicName: "showFileList", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileEmitter: "fileEmitter", errorEmitter: "errorEmitter" }, ngImport: i0, template: "<mat-card\n id=\"uploadFileContainer\"\n class=\"upload-file-container\"\n (click)=\"fileInput.click()\"\n madDragAndDrop\n (onFileDropped)=\"uploadFile($event)\"\n>\n <input\n #fileInput\n hidden\n type=\"file\"\n [id]=\"id()\"\n [multiple]=\"multiple()\"\n [accept]=\"acceptAttribute()\"\n (change)=\"uploadFile(fileInput.files)\"\n (click)=\"fileInput.value = ''\"\n />\n <mat-card-content class=\"upload-file-content\">\n @if (hasSingleFile()) {\n {{ fileList()[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ uploadLabel() }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList()) {\n <mat-chip-listbox>\n @for (file of fileList(); track file) {\n <mat-chip class=\"download\" (click)=\"openFile(file)\" [removable]=\"removable()\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable()) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".upload-file-container{height:100px;margin:0;border:2px dashed var(--main-primary);background-repeat:no-repeat;background-position:center}.upload-file-container:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.upload-file-container,.upload-file-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: DragAndDropDirective, selector: "[madDragAndDrop]", outputs: ["onFileDropped"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i3$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i3$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i3$2.MatChipRemove, selector: "[matChipRemove]" }] }); }
5388
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DocxPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5389
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", type: DocxPreviewComponent, isStandalone: true, selector: "mad-docx-preview", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, thumbnail: { classPropertyName: "thumbnail", publicName: "thumbnail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { renderFailed: "renderFailed" }, host: { properties: { "class.docx-preview--thumbnail": "isThumbnail()" } }, viewQueries: [{ propertyName: "docxHost", first: true, predicate: ["docxHost"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #docxHost class=\"docx-preview-host\"></div>\n", styles: ["@charset \"UTF-8\";.docx-preview-host{box-sizing:border-box;width:100%;height:100%;overflow-y:auto;overflow-x:hidden;padding:12px}.docx-preview-host .docx-preview-document-wrapper{box-sizing:border-box;width:100%;max-width:100%;background:transparent;padding:0}.docx-preview-host .docx-preview-document-wrapper>.docx-preview-document{box-sizing:border-box;background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:4px;max-width:100%;margin:0 auto 16px}:host(.docx-preview--thumbnail){display:block;width:100%;height:100%;overflow:hidden;pointer-events:none}:host(.docx-preview--thumbnail) .docx-preview-host{position:relative;width:100%;height:100%;overflow:hidden;padding:0}:host(.docx-preview--thumbnail) .docx-preview-host .docx-preview-document-wrapper{background:transparent;padding:0;display:block}:host(.docx-preview--thumbnail) .docx-preview-host .docx-preview-document-wrapper>.docx-preview-document{box-shadow:none;max-width:none;margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom }); }
4463
5390
  }
4464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FileUploadComponent, decorators: [{
5391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DocxPreviewComponent, decorators: [{
4465
5392
  type: Component,
4466
- args: [{ selector: 'mad-file-upload', imports: [MatCardModule, MatIconModule, ButtonModule, TranslateModule, DragAndDropDirective, MatChipsModule], template: "<mat-card\n id=\"uploadFileContainer\"\n class=\"upload-file-container\"\n (click)=\"fileInput.click()\"\n madDragAndDrop\n (onFileDropped)=\"uploadFile($event)\"\n>\n <input\n #fileInput\n hidden\n type=\"file\"\n [id]=\"id()\"\n [multiple]=\"multiple()\"\n [accept]=\"acceptAttribute()\"\n (change)=\"uploadFile(fileInput.files)\"\n (click)=\"fileInput.value = ''\"\n />\n <mat-card-content class=\"upload-file-content\">\n @if (hasSingleFile()) {\n {{ fileList()[0].name }}\n } @else {\n <mat-icon>vertical_align_top</mat-icon>\n {{ uploadLabel() }}\n }\n </mat-card-content>\n</mat-card>\n\n@if (showFileList()) {\n <mat-chip-listbox>\n @for (file of fileList(); track file) {\n <mat-chip class=\"download\" (click)=\"openFile(file)\" [removable]=\"removable()\" (removed)=\"remove(file)\">\n {{ file.name }}\n @if (removable()) {\n <mat-icon matChipRemove>delete_forever</mat-icon>\n }\n </mat-chip>\n }\n </mat-chip-listbox>\n}\n", styles: [".upload-file-container{height:100px;margin:0;border:2px dashed var(--main-primary);background-repeat:no-repeat;background-position:center}.upload-file-container:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.upload-file-container,.upload-file-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"] }]
4467
- }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], showFileList: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFileList", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], fileEmitter: [{ type: i0.Output, args: ["fileEmitter"] }], errorEmitter: [{ type: i0.Output, args: ["errorEmitter"] }] } });
5393
+ args: [{ selector: 'mad-docx-preview', encapsulation: ViewEncapsulation.ShadowDom, changeDetection: ChangeDetectionStrategy.OnPush, host: {
5394
+ '[class.docx-preview--thumbnail]': 'isThumbnail()',
5395
+ }, template: "<div #docxHost class=\"docx-preview-host\"></div>\n", styles: ["@charset \"UTF-8\";.docx-preview-host{box-sizing:border-box;width:100%;height:100%;overflow-y:auto;overflow-x:hidden;padding:12px}.docx-preview-host .docx-preview-document-wrapper{box-sizing:border-box;width:100%;max-width:100%;background:transparent;padding:0}.docx-preview-host .docx-preview-document-wrapper>.docx-preview-document{box-sizing:border-box;background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:4px;max-width:100%;margin:0 auto 16px}:host(.docx-preview--thumbnail){display:block;width:100%;height:100%;overflow:hidden;pointer-events:none}:host(.docx-preview--thumbnail) .docx-preview-host{position:relative;width:100%;height:100%;overflow:hidden;padding:0}:host(.docx-preview--thumbnail) .docx-preview-host .docx-preview-document-wrapper{background:transparent;padding:0;display:block}:host(.docx-preview--thumbnail) .docx-preview-host .docx-preview-document-wrapper>.docx-preview-document{box-shadow:none;max-width:none;margin:0}\n"] }]
5396
+ }], propDecorators: { source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: true }] }], thumbnail: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbnail", required: false }] }], renderFailed: [{ type: i0.Output, args: ["renderFailed"] }], docxHost: [{ type: i0.ViewChild, args: ['docxHost', { isSignal: true }] }] } });
4468
5397
 
4469
- class TileComponent {
4470
- constructor() {
4471
- this.label = input.required(/* @ts-ignore */
4472
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
4473
- this.variant = input('info', /* @ts-ignore */
4474
- ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
4475
- this.size = input('md', /* @ts-ignore */
4476
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4477
- /** Optional Material icon name */
4478
- this.icon = input(null, /* @ts-ignore */
4479
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
4480
- /** Icon position relative to label */
4481
- this.iconPosition = input('start', /* @ts-ignore */
4482
- ...(ngDevMode ? [{ debugName: "iconPosition" }] : /* istanbul ignore next */ []));
4483
- }
4484
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4485
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: TileComponent, isStandalone: true, selector: "mad-tile", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
4486
- }
4487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: TileComponent, decorators: [{
4488
- type: Component,
4489
- args: [{ selector: 'mad-tile', imports: [MatIcon], template: "<div\n class=\"tile\"\n [class.tile--success]=\"variant() === 'success'\"\n [class.tile--error]=\"variant() === 'error'\"\n [class.tile--info]=\"variant() === 'info'\"\n [class.tile--warning]=\"variant() === 'warning'\"\n [class.tile--sm]=\"size() === 'sm'\"\n [class.tile--md]=\"size() === 'md'\"\n [class.tile--lg]=\"size() === 'lg'\"\n [class.tile--icon-end]=\"iconPosition() === 'end'\"\n>\n <div class=\"tile__content\">\n @if (icon() && iconPosition() === 'start') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n\n <span class=\"tile__label\">\n {{ label() }}\n </span>\n\n @if (icon() && iconPosition() === 'end') {\n <mat-icon class=\"tile__icon\" aria-hidden=\"true\">\n {{ icon() }}\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;min-width:0;font-family:inherit}.tile{display:inline-flex;align-items:center;justify-content:center;min-width:0;border-radius:var(--mat-sys-corner-full);box-sizing:border-box;text-align:center;white-space:nowrap;background-color:var(--tile-bg);color:var(--tile-color)}.tile__content{display:inline-flex;align-items:center;gap:8px}.tile__label{font-weight:500;line-height:1}.tile__icon{flex:0 0 auto;width:1em;height:1em}.tile--sm{height:24px;padding:0 8px}.tile--md{height:32px;padding:0 12px}.tile--lg{height:48px;padding:0 16px}.tile--sm .tile__label{font-size:12px}.tile--md .tile__label{font-size:14px}.tile--lg .tile__label,.tile--sm .tile__icon{font-size:16px}.tile--md .tile__icon{font-size:18px}.tile--lg .tile__icon{font-size:22px}.tile--success{--tile-bg: var(--tile-success-bg, #e8eee3);--tile-color: var(--tile-success-color, #3e982f)}.tile--error{--tile-bg: var(--tile-error-bg, #f1e2e4);--tile-color: var(--tile-error-color, #d53510)}.tile--info{--tile-bg: var(--tile-info-bg, #dfe7ec);--tile-color: var(--tile-info-color, #145d8b)}.tile--warning{--tile-bg: var(--tile-warning-bg, #ebe6dc);--tile-color: var(--tile-warning-color, #c2881d)}\n"] }]
4490
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }] } });
5398
+ var docxPreview_component = /*#__PURE__*/Object.freeze({
5399
+ __proto__: null,
5400
+ DocxPreviewComponent: DocxPreviewComponent
5401
+ });
4491
5402
 
4492
- class BreadcrumbComponent {
4493
- constructor() {
4494
- this.breadcrumbs = input.required(/* @ts-ignore */
4495
- ...(ngDevMode ? [{ debugName: "breadcrumbs" }] : /* istanbul ignore next */ []));
4496
- this.showCopy = input(false, /* @ts-ignore */
4497
- ...(ngDevMode ? [{ debugName: "showCopy" }] : /* istanbul ignore next */ []));
4498
- this.title = input('Copy', /* @ts-ignore */
4499
- ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
4500
- this.copy = output();
5403
+ class FilePreviewDialogComponent {
5404
+ constructor(dialogRef, data, filePreviewService, documentRef, sanitizer) {
5405
+ this.dialogRef = dialogRef;
5406
+ this.filePreviewService = filePreviewService;
5407
+ this.documentRef = documentRef;
5408
+ this.sanitizer = sanitizer;
5409
+ // Signals
5410
+ /** Set to the kind whose renderer reported a failure, so the template can fall back. */
5411
+ this.renderError = signal(null, /* @ts-ignore */
5412
+ ...(ngDevMode ? [{ debugName: "renderError" }] : /* istanbul ignore next */ []));
5413
+ this.downloadUrl = null;
5414
+ this.inlinePdfUrl = null;
5415
+ this.isMaximized = false;
5416
+ this.item = data.item;
5417
+ this.config = data.config;
5418
+ this.labels = data.labels;
5419
+ this.visibleCustomActions = data.visibleCustomActions;
5420
+ this.isDownloadVisible = data.isDownloadVisible;
5421
+ this.isDeleteVisible = data.isDeleteVisible;
5422
+ const safeUrl = this.sanitizeUrl(data.item.resolvedPreviewUrl);
5423
+ this.downloadUrl = safeUrl ?? null;
5424
+ this.inlinePdfUrl = this.computeInlinePdfUrl(data.item, safeUrl);
5425
+ }
5426
+ trackByActionId(_, action) {
5427
+ return action.id;
5428
+ }
5429
+ formatFileSize(bytes) {
5430
+ return this.filePreviewService.formatFileSize(bytes);
5431
+ }
5432
+ getMetaIcon() {
5433
+ switch (this.item.kind) {
5434
+ case 'pdf':
5435
+ return 'picture_as_pdf';
5436
+ case 'docx':
5437
+ return 'description';
5438
+ case 'image':
5439
+ return 'image';
5440
+ case 'xlsx':
5441
+ return 'table_chart';
5442
+ default:
5443
+ return 'insert_drive_file';
5444
+ }
4501
5445
  }
4502
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4503
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: BreadcrumbComponent, isStandalone: true, selector: "mad-breadcrumb", inputs: { breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: true, transformFunction: null }, showCopy: { classPropertyName: "showCopy", publicName: "showCopy", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copy: "copy" }, ngImport: i0, template: "@if (breadcrumbs().length) {\n <div class=\"breadcrumb\">\n <nav data-cy=\"breadcrumb-nav\" class=\"breadcrumb__nav\">\n @for (crumb of breadcrumbs(); track crumb.label; let last = $last) {\n @if (crumb.route?.length) {\n <a data-cy=\"breadcrumb-link\" [routerLink]=\"crumb.route\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else if (crumb.href?.length) {\n <a data-cy=\"breadcrumb-link\" [href]=\"crumb.href\" target=\"_blank\" class=\"breadcrumb__link\">{{ crumb.label }}</a>\n } @else {\n <span data-cy=\"breadcrumb-current\" class=\"breadcrumb__current\">{{ crumb.label }}</span>\n }\n @if (!last) {\n <span data-cy=\"breadcrumb-separator\" class=\"breadcrumb__separator\">/</span>\n }\n }\n </nav>\n @if (showCopy()) {\n <mad-icon-button\n data-cy=\"breadcrumb-copy\"\n class=\"breadcrumb__copy\"\n (click)=\"copy.emit()\"\n [matTooltip]=\"title()\"\n matTooltipPosition=\"above\"\n >\n <mat-icon>content_copy</mat-icon>\n </mad-icon-button>\n }\n </div>\n}\n", styles: [".breadcrumb{display:flex;align-items:center;gap:.5rem}.breadcrumb__nav{display:flex;align-items:center;gap:.625rem;min-height:3.5rem;padding-block:.25rem;font-size:.875rem;line-height:1.25rem}.breadcrumb__link{color:var(--main-primary);text-decoration:none}.breadcrumb__link:hover{text-decoration:underline}.breadcrumb__current,.breadcrumb__separator{color:var(--breadcrumb-separator-color)}.breadcrumb__copy{flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
5446
+ getMaximizeLabel() {
5447
+ return this.isMaximized ? this.labels.restoreActionLabel : this.labels.maximizeActionLabel;
5448
+ }
5449
+ close() {
5450
+ this.dialogRef.close(null);
5451
+ }
5452
+ toggleMaximize() {
5453
+ this.isMaximized = !this.isMaximized;
5454
+ this.applyDialogSize();
5455
+ }
5456
+ download() {
5457
+ this.filePreviewService.download(this.item);
5458
+ }
5459
+ triggerDelete() {
5460
+ this.dialogRef.close({ type: 'delete', item: this.item });
5461
+ }
5462
+ triggerAction(action) {
5463
+ this.dialogRef.close({ type: 'action', action, item: this.item });
5464
+ }
5465
+ ngAfterViewInit() {
5466
+ // Apply responsive dialog sizing
5467
+ this.applyDialogSize();
5468
+ }
5469
+ onDocxRenderFailed() {
5470
+ this.renderError.set('docx');
5471
+ }
5472
+ applyDialogSize() {
5473
+ this.updatePanelClasses();
5474
+ }
5475
+ updatePanelClasses() {
5476
+ const maximizedClass = 'fp-mat-dialog--maximized';
5477
+ const normalClass = 'fp-mat-dialog--normal';
5478
+ if (this.isMaximized) {
5479
+ this.dialogRef.addPanelClass(maximizedClass);
5480
+ this.dialogRef.removePanelClass(normalClass);
5481
+ }
5482
+ else {
5483
+ this.dialogRef.addPanelClass(normalClass);
5484
+ this.dialogRef.removePanelClass(maximizedClass);
5485
+ }
5486
+ }
5487
+ sanitizeUrl(url) {
5488
+ return url ? sanitizeSourceUrl(url, this.documentRef?.baseURI) : undefined;
5489
+ }
5490
+ computeInlinePdfUrl(item, safeUrl) {
5491
+ if (item.kind !== 'pdf' || !safeUrl) {
5492
+ return null;
5493
+ }
5494
+ const isTrusted = safeUrl.startsWith('data:') ? /^data:application\/pdf[;,]/i.test(safeUrl) : this.isTrustedUrl(safeUrl);
5495
+ // Already validated above (protocol/origin/mime allow-list), so bypassing Angular's
5496
+ // RESOURCE_URL sanitizer here is safe and required for binding to <object [attr.data]>.
5497
+ return isTrusted ? this.sanitizer.bypassSecurityTrustResourceUrl(safeUrl) : null;
5498
+ }
5499
+ isTrustedUrl(url) {
5500
+ if (url.startsWith('blob:') || url.startsWith('data:')) {
5501
+ return true;
5502
+ }
5503
+ try {
5504
+ const baseUrl = this.documentRef?.baseURI;
5505
+ if (!baseUrl) {
5506
+ return false;
5507
+ }
5508
+ const parsed = new URL(url, baseUrl);
5509
+ const origin = new URL(baseUrl).origin;
5510
+ return (parsed.protocol === 'http:' || parsed.protocol === 'https:') && parsed.origin === origin;
5511
+ }
5512
+ catch {
5513
+ return false;
5514
+ }
5515
+ }
5516
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilePreviewDialogComponent, deps: [{ token: i1$5.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: FilePreviewService }, { token: DOCUMENT }, { token: i2$5.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
5517
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FilePreviewDialogComponent, isStandalone: true, selector: "mad-file-preview-dialog", providers: [FilePreviewService], ngImport: i0, template: "<div class=\"fp-dialog__panel flex flex-col h-full overflow-hidden\">\n <!-- Header -->\n <div\n class=\"fp-dialog__header grid grid-cols-[minmax(0,1fr)_auto] items-start gap-4 py-4 pl-4 pr-2 border-b border-(--mat-sys-outline-variant) shrink-0 [@media(width<480px)]:grid-cols-[minmax(0,1fr)] [@media(width<480px)]:gap-3 [@media(width<480px)]:py-3 [@media(width<480px)]:pl-3 [@media(width<480px)]:pr-3 md:pr-3\"\n >\n <div class=\"fp-dialog__meta flex items-start gap-3 min-w-0 max-w-full [@media(width<480px)]:w-full [@media(width<480px)]:gap-[10px]\">\n <mat-icon\n class=\"fp-dialog__meta-icon text-[28px] w-7 h-7 shrink-0 text-(--mat-sys-primary) [@media(width<480px)]:text-[24px] [@media(width<480px)]:w-6 [@media(width<480px)]:h-6\"\n >\n {{ getMetaIcon() }}\n </mat-icon>\n <div class=\"fp-dialog__meta-content min-w-0 flex-1 max-w-full overflow-hidden\">\n <h2\n class=\"fp-dialog__title m-0 text-[length:var(--mat-sys-title-small-size)] font-semibold line-clamp-2 [overflow-wrap:anywhere] [word-break:break-word] leading-[1.35] max-h-[calc(1.35em*2)] text-(--mat-sys-on-surface) [@media(width<480px)]:text-base [@media(width<480px)]:leading-[1.3] [@media(width<480px)]:line-clamp-3 [@media(width<480px)]:max-h-[calc(1.35em*3)]\"\n >\n {{ item.name }}\n </h2>\n @if (item.size) {\n <span class=\"fp-dialog__subtitle text-xs text-(--mat-sys-on-surface-variant) leading-[1.4] [@media(width<480px)]:text-[11px]\">{{\n formatFileSize(item.size)\n }}</span>\n }\n </div>\n </div>\n\n <div\n class=\"fp-dialog__header-actions flex items-center shrink-0 flex-nowrap justify-end gap-1 [@media(width<480px)]:gap-0 [@media(width<480px)]:w-full [@media(width<480px)]:justify-start [@media(width<480px)]:ml-10\"\n >\n <!-- Download -->\n @if (isDownloadVisible) {\n <button\n mat-icon-button\n data-cy=\"file-preview-download-action\"\n [matTooltip]=\"labels.downloadActionLabel\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon>download</mat-icon>\n </button>\n }\n\n <!-- Custom actions -->\n @for (action of visibleCustomActions; track action.id) {\n <button\n mat-icon-button\n [attr.data-cy]=\"'file-preview-custom-action-' + action.id\"\n [matTooltip]=\"action.label\"\n [attr.aria-label]=\"action.label\"\n [color]=\"action.color ?? undefined\"\n (click)=\"triggerAction(action)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n\n <!-- Delete -->\n @if (isDeleteVisible) {\n <button\n mat-icon-button\n data-cy=\"file-preview-delete-action\"\n color=\"warn\"\n [matTooltip]=\"labels.deleteActionLabel\"\n [attr.aria-label]=\"labels.deleteActionLabel\"\n (click)=\"triggerDelete()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n\n <!-- Maximize / Restore -->\n <button\n mat-icon-button\n data-cy=\"file-preview-maximize-action\"\n [matTooltip]=\"getMaximizeLabel()\"\n [attr.aria-label]=\"getMaximizeLabel()\"\n (click)=\"toggleMaximize()\"\n >\n <mat-icon>{{ isMaximized ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>\n </button>\n\n <!-- Close -->\n <button\n mat-icon-button\n data-cy=\"file-preview-close-action\"\n [matTooltip]=\"labels.closeActionLabel\"\n [attr.aria-label]=\"labels.closeActionLabel\"\n (click)=\"close()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n <!-- /fp-dialog__header -->\n\n <!-- Body -->\n <div\n class=\"fp-dialog__body flex-1 flex items-center justify-center overflow-auto bg-(--mat-sys-surface-container-lowest) p-4 [@media(width<480px)]:p-3 lg:p-5\"\n >\n @switch (item.kind) {\n @case ('image') {\n <img class=\"fp-dialog__img max-w-full max-h-full object-contain rounded\" [src]=\"item.resolvedPreviewUrl\" [alt]=\"item.name\" />\n }\n @case ('pdf') {\n <object\n #pdfPreviewObject\n class=\"fp-dialog__pdf w-full h-full border-0 block\"\n type=\"application/pdf\"\n [attr.aria-label]=\"item.name\"\n [attr.data]=\"inlinePdfUrl\"\n data-cy=\"file-preview-pdf-object\"\n >\n <div\n class=\"fp-dialog__unsupported text-[13px] text-(--mat-sys-on-surface-variant) leading-normal text-center p-4 [@media(width<480px)]:p-3 [@media(width<480px)]:text-xs\"\n role=\"status\"\n >\n <p>{{ labels.noPreviewMessage }}</p>\n <button\n mat-stroked-button\n data-cy=\"file-preview-pdf-fallback-download\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon aria-hidden=\"true\">download</mat-icon>\n {{ labels.downloadLabel }}\n </button>\n </div>\n </object>\n }\n @case ('docx') {\n <div class=\"fp-dialog__docx w-full h-full overflow-auto\">\n @if (renderError() !== 'docx') {\n <mad-docx-preview [source]=\"item.source ?? item.resolvedPreviewUrl\" (renderFailed)=\"onDocxRenderFailed()\" />\n } @else {\n <div\n class=\"fp-dialog__no-preview flex flex-col items-center gap-4 text-(--mat-sys-on-surface-variant) p-4 text-center [@media(width<480px)]:gap-3 [@media(width<480px)]:p-3\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon aria-hidden=\"true\">description</mat-icon>\n <p class=\"m-0 text-sm leading-normal [@media(width<480px)]:text-[13px]\">{{ labels.noPreviewMessage }}</p>\n <button\n mat-stroked-button\n data-cy=\"file-preview-docx-fallback-download\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon aria-hidden=\"true\">download</mat-icon> {{ labels.downloadLabel }}\n </button>\n </div>\n }\n </div>\n }\n @default {\n <div\n class=\"fp-dialog__no-preview flex flex-col items-center gap-4 text-(--mat-sys-on-surface-variant) p-4 text-center [@media(width<480px)]:gap-3 [@media(width<480px)]:p-3\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon aria-hidden=\"true\">hide_image</mat-icon>\n <p class=\"m-0 text-sm leading-normal [@media(width<480px)]:text-[13px]\">{{ labels.noPreviewMessage }}</p>\n <button\n mat-stroked-button\n data-cy=\"file-preview-fallback-download\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon aria-hidden=\"true\">download</mat-icon> {{ labels.downloadLabel }}\n </button>\n </div>\n }\n }\n </div>\n <!-- /fp-dialog__body -->\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%;overflow:hidden}.fp-dialog__header-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 40px}@media(width<480px){.fp-dialog__header-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 36px;width:36px;height:36px}}.fp-dialog__no-preview .mat-mdc-stroked-button{--mdc-button-label-text-size: 14px}@media(width<480px){.fp-dialog__no-preview .mat-mdc-stroked-button{--mdc-button-label-text-size: 13px}}.fp-dialog__no-preview .mat-mdc-stroked-button mat-icon{font-size:14px;width:14px;height:14px;margin-right:4px;margin-top:4px}@media(width<480px){.fp-dialog__no-preview .mat-mdc-stroked-button mat-icon{font-size:13px;width:13px;height:13px}}.fp-dialog__unsupported .mat-mdc-stroked-button{--mdc-button-label-text-size: 13px}@media(width<480px){.fp-dialog__unsupported .mat-mdc-stroked-button{--mdc-button-label-text-size: 12px}}.fp-dialog__unsupported .mat-mdc-stroked-button mat-icon{font-size:13px;width:13px;height:13px;margin-right:4px;margin-top:4px}@media(width<480px){.fp-dialog__unsupported .mat-mdc-stroked-button mat-icon{font-size:12px;width:12px;height:12px}}.fp-dialog__docx .docx-preview-document{background:var(--mat-sys-surface, #fff);padding:24px;min-height:100%;font-family:Calibri,Arial,sans-serif}@media(width<480px){.fp-dialog__docx .docx-preview-document{padding:16px}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { 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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "component", type: DocxPreviewComponent, selector: "mad-docx-preview", inputs: ["source", "thumbnail"], outputs: ["renderFailed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4504
5518
  }
4505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
5519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilePreviewDialogComponent, decorators: [{
4506
5520
  type: Component,
4507
- 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"] }]
4508
- }], 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"] }] } });
4509
-
4510
- const VERSION = '22.3.2';
4511
-
4512
- const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
4513
- providedIn: 'root',
4514
- factory: MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY,
4515
- });
4516
- function MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY() {
4517
- return {
4518
- size: 'medium',
4519
- type: 'info',
4520
- };
4521
- }
5521
+ args: [{ selector: 'mad-file-preview-dialog', imports: [MatButtonModule, MatIconModule, MatTooltipModule, MatDialogModule, DocxPreviewComponent], providers: [FilePreviewService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"fp-dialog__panel flex flex-col h-full overflow-hidden\">\n <!-- Header -->\n <div\n class=\"fp-dialog__header grid grid-cols-[minmax(0,1fr)_auto] items-start gap-4 py-4 pl-4 pr-2 border-b border-(--mat-sys-outline-variant) shrink-0 [@media(width<480px)]:grid-cols-[minmax(0,1fr)] [@media(width<480px)]:gap-3 [@media(width<480px)]:py-3 [@media(width<480px)]:pl-3 [@media(width<480px)]:pr-3 md:pr-3\"\n >\n <div class=\"fp-dialog__meta flex items-start gap-3 min-w-0 max-w-full [@media(width<480px)]:w-full [@media(width<480px)]:gap-[10px]\">\n <mat-icon\n class=\"fp-dialog__meta-icon text-[28px] w-7 h-7 shrink-0 text-(--mat-sys-primary) [@media(width<480px)]:text-[24px] [@media(width<480px)]:w-6 [@media(width<480px)]:h-6\"\n >\n {{ getMetaIcon() }}\n </mat-icon>\n <div class=\"fp-dialog__meta-content min-w-0 flex-1 max-w-full overflow-hidden\">\n <h2\n class=\"fp-dialog__title m-0 text-[length:var(--mat-sys-title-small-size)] font-semibold line-clamp-2 [overflow-wrap:anywhere] [word-break:break-word] leading-[1.35] max-h-[calc(1.35em*2)] text-(--mat-sys-on-surface) [@media(width<480px)]:text-base [@media(width<480px)]:leading-[1.3] [@media(width<480px)]:line-clamp-3 [@media(width<480px)]:max-h-[calc(1.35em*3)]\"\n >\n {{ item.name }}\n </h2>\n @if (item.size) {\n <span class=\"fp-dialog__subtitle text-xs text-(--mat-sys-on-surface-variant) leading-[1.4] [@media(width<480px)]:text-[11px]\">{{\n formatFileSize(item.size)\n }}</span>\n }\n </div>\n </div>\n\n <div\n class=\"fp-dialog__header-actions flex items-center shrink-0 flex-nowrap justify-end gap-1 [@media(width<480px)]:gap-0 [@media(width<480px)]:w-full [@media(width<480px)]:justify-start [@media(width<480px)]:ml-10\"\n >\n <!-- Download -->\n @if (isDownloadVisible) {\n <button\n mat-icon-button\n data-cy=\"file-preview-download-action\"\n [matTooltip]=\"labels.downloadActionLabel\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon>download</mat-icon>\n </button>\n }\n\n <!-- Custom actions -->\n @for (action of visibleCustomActions; track action.id) {\n <button\n mat-icon-button\n [attr.data-cy]=\"'file-preview-custom-action-' + action.id\"\n [matTooltip]=\"action.label\"\n [attr.aria-label]=\"action.label\"\n [color]=\"action.color ?? undefined\"\n (click)=\"triggerAction(action)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n\n <!-- Delete -->\n @if (isDeleteVisible) {\n <button\n mat-icon-button\n data-cy=\"file-preview-delete-action\"\n color=\"warn\"\n [matTooltip]=\"labels.deleteActionLabel\"\n [attr.aria-label]=\"labels.deleteActionLabel\"\n (click)=\"triggerDelete()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n\n <!-- Maximize / Restore -->\n <button\n mat-icon-button\n data-cy=\"file-preview-maximize-action\"\n [matTooltip]=\"getMaximizeLabel()\"\n [attr.aria-label]=\"getMaximizeLabel()\"\n (click)=\"toggleMaximize()\"\n >\n <mat-icon>{{ isMaximized ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>\n </button>\n\n <!-- Close -->\n <button\n mat-icon-button\n data-cy=\"file-preview-close-action\"\n [matTooltip]=\"labels.closeActionLabel\"\n [attr.aria-label]=\"labels.closeActionLabel\"\n (click)=\"close()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n <!-- /fp-dialog__header -->\n\n <!-- Body -->\n <div\n class=\"fp-dialog__body flex-1 flex items-center justify-center overflow-auto bg-(--mat-sys-surface-container-lowest) p-4 [@media(width<480px)]:p-3 lg:p-5\"\n >\n @switch (item.kind) {\n @case ('image') {\n <img class=\"fp-dialog__img max-w-full max-h-full object-contain rounded\" [src]=\"item.resolvedPreviewUrl\" [alt]=\"item.name\" />\n }\n @case ('pdf') {\n <object\n #pdfPreviewObject\n class=\"fp-dialog__pdf w-full h-full border-0 block\"\n type=\"application/pdf\"\n [attr.aria-label]=\"item.name\"\n [attr.data]=\"inlinePdfUrl\"\n data-cy=\"file-preview-pdf-object\"\n >\n <div\n class=\"fp-dialog__unsupported text-[13px] text-(--mat-sys-on-surface-variant) leading-normal text-center p-4 [@media(width<480px)]:p-3 [@media(width<480px)]:text-xs\"\n role=\"status\"\n >\n <p>{{ labels.noPreviewMessage }}</p>\n <button\n mat-stroked-button\n data-cy=\"file-preview-pdf-fallback-download\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon aria-hidden=\"true\">download</mat-icon>\n {{ labels.downloadLabel }}\n </button>\n </div>\n </object>\n }\n @case ('docx') {\n <div class=\"fp-dialog__docx w-full h-full overflow-auto\">\n @if (renderError() !== 'docx') {\n <mad-docx-preview [source]=\"item.source ?? item.resolvedPreviewUrl\" (renderFailed)=\"onDocxRenderFailed()\" />\n } @else {\n <div\n class=\"fp-dialog__no-preview flex flex-col items-center gap-4 text-(--mat-sys-on-surface-variant) p-4 text-center [@media(width<480px)]:gap-3 [@media(width<480px)]:p-3\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon aria-hidden=\"true\">description</mat-icon>\n <p class=\"m-0 text-sm leading-normal [@media(width<480px)]:text-[13px]\">{{ labels.noPreviewMessage }}</p>\n <button\n mat-stroked-button\n data-cy=\"file-preview-docx-fallback-download\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon aria-hidden=\"true\">download</mat-icon> {{ labels.downloadLabel }}\n </button>\n </div>\n }\n </div>\n }\n @default {\n <div\n class=\"fp-dialog__no-preview flex flex-col items-center gap-4 text-(--mat-sys-on-surface-variant) p-4 text-center [@media(width<480px)]:gap-3 [@media(width<480px)]:p-3\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <mat-icon aria-hidden=\"true\">hide_image</mat-icon>\n <p class=\"m-0 text-sm leading-normal [@media(width<480px)]:text-[13px]\">{{ labels.noPreviewMessage }}</p>\n <button\n mat-stroked-button\n data-cy=\"file-preview-fallback-download\"\n [attr.aria-label]=\"labels.downloadActionLabel\"\n (click)=\"download()\"\n >\n <mat-icon aria-hidden=\"true\">download</mat-icon> {{ labels.downloadLabel }}\n </button>\n </div>\n }\n }\n </div>\n <!-- /fp-dialog__body -->\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%;overflow:hidden}.fp-dialog__header-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 40px}@media(width<480px){.fp-dialog__header-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 36px;width:36px;height:36px}}.fp-dialog__no-preview .mat-mdc-stroked-button{--mdc-button-label-text-size: 14px}@media(width<480px){.fp-dialog__no-preview .mat-mdc-stroked-button{--mdc-button-label-text-size: 13px}}.fp-dialog__no-preview .mat-mdc-stroked-button mat-icon{font-size:14px;width:14px;height:14px;margin-right:4px;margin-top:4px}@media(width<480px){.fp-dialog__no-preview .mat-mdc-stroked-button mat-icon{font-size:13px;width:13px;height:13px}}.fp-dialog__unsupported .mat-mdc-stroked-button{--mdc-button-label-text-size: 13px}@media(width<480px){.fp-dialog__unsupported .mat-mdc-stroked-button{--mdc-button-label-text-size: 12px}}.fp-dialog__unsupported .mat-mdc-stroked-button mat-icon{font-size:13px;width:13px;height:13px;margin-right:4px;margin-top:4px}@media(width<480px){.fp-dialog__unsupported .mat-mdc-stroked-button mat-icon{font-size:12px;width:12px;height:12px}}.fp-dialog__docx .docx-preview-document{background:var(--mat-sys-surface, #fff);padding:24px;min-height:100%;font-family:Calibri,Arial,sans-serif}@media(width<480px){.fp-dialog__docx .docx-preview-document{padding:16px}}\n"] }]
5522
+ }], ctorParameters: () => [{ type: i1$5.MatDialogRef }, { type: undefined, decorators: [{
5523
+ type: Inject,
5524
+ args: [MAT_DIALOG_DATA]
5525
+ }] }, { type: FilePreviewService }, { type: Document, decorators: [{
5526
+ type: Inject,
5527
+ args: [DOCUMENT]
5528
+ }] }, { type: i2$5.DomSanitizer }] });
4522
5529
 
4523
- class AlertComponent {
4524
- constructor(alertConfig) {
4525
- this.alertConfig = alertConfig;
4526
- this.type = input(this.alertConfig.type, /* @ts-ignore */
4527
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
4528
- this.message = input('', /* @ts-ignore */
4529
- ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
4530
- this.size = input(this.alertConfig.size, /* @ts-ignore */
4531
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4532
- this.actionText = input('', /* @ts-ignore */
4533
- ...(ngDevMode ? [{ debugName: "actionText" }] : /* istanbul ignore next */ []));
4534
- this.closeable = input(true, /* @ts-ignore */
4535
- ...(ngDevMode ? [{ debugName: "closeable" }] : /* istanbul ignore next */ []));
4536
- this.close = output();
4537
- this.action = output();
4538
- this.classes = computed(() => `${this.type()} ${this.size()}`, /* @ts-ignore */
4539
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
4540
- this.icon = computed(() => {
4541
- switch (this.type()) {
4542
- case 'success':
4543
- return 'check_circle';
4544
- case 'info':
4545
- return 'info';
4546
- case 'warning':
4547
- return 'warning';
4548
- case 'error':
4549
- return 'error';
5530
+ class FilePreviewComponent {
5531
+ constructor(filePreviewService, dialog, translate) {
5532
+ this.filePreviewService = filePreviewService;
5533
+ this.dialog = dialog;
5534
+ this.translate = translate;
5535
+ this.items = input(null, /* @ts-ignore */
5536
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
5537
+ this.config = input(DEFAULT_FILE_PREVIEW_CONFIG, /* @ts-ignore */
5538
+ ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
5539
+ this.labels = input(undefined, /* @ts-ignore */
5540
+ ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
5541
+ this.previewOpened = output();
5542
+ this.actionClicked = output();
5543
+ this.deleteClicked = output();
5544
+ this.resolvedItems = signal([], /* @ts-ignore */
5545
+ ...(ngDevMode ? [{ debugName: "resolvedItems" }] : /* istanbul ignore next */ []));
5546
+ this.mergedConfig = computed(() => ({ ...DEFAULT_FILE_PREVIEW_CONFIG, ...(this.config() ?? {}) }), /* @ts-ignore */
5547
+ ...(ngDevMode ? [{ debugName: "mergedConfig" }] : /* istanbul ignore next */ []));
5548
+ this.thumbnailDimensions = computed(() => this.resolveSize(this.mergedConfig().thumbnailSize), /* @ts-ignore */
5549
+ ...(ngDevMode ? [{ debugName: "thumbnailDimensions" }] : /* istanbul ignore next */ []));
5550
+ this.mergedLabels = computed(() =>
5551
+ // Merge in priority order: user-provided labels > i18n translations > defaults
5552
+ ({
5553
+ ...DEFAULT_FILE_PREVIEW_LABELS,
5554
+ ...this.i18nLabels(),
5555
+ ...(this.labels() ?? {}),
5556
+ }), /* @ts-ignore */
5557
+ ...(ngDevMode ? [{ debugName: "mergedLabels" }] : /* istanbul ignore next */ []));
5558
+ this.visibleCustomActions = computed(() => this.mergedConfig().actions ?? [], /* @ts-ignore */
5559
+ ...(ngDevMode ? [{ debugName: "visibleCustomActions" }] : /* istanbul ignore next */ []));
5560
+ this.hasVisibleActions = computed(() => this.mergedConfig().showActionIcons &&
5561
+ Boolean((this.mergedConfig().showOverlayPreview && this.mergedConfig().showPreviewAction) ||
5562
+ this.mergedConfig().showDownloadAction ||
5563
+ this.mergedConfig().showDeleteAction ||
5564
+ this.visibleCustomActions().length > 0), /* @ts-ignore */
5565
+ ...(ngDevMode ? [{ debugName: "hasVisibleActions" }] : /* istanbul ignore next */ []));
5566
+ /** Ids of items whose DOCX thumbnail failed to render, so the template falls back to an icon. */
5567
+ this.docxRenderErrors = signal(new Set(), /* @ts-ignore */
5568
+ ...(ngDevMode ? [{ debugName: "docxRenderErrors" }] : /* istanbul ignore next */ []));
5569
+ this.loadRequestId = 0;
5570
+ this.isDestroyed = false;
5571
+ this.i18nLabels = signal({}, /* @ts-ignore */
5572
+ ...(ngDevMode ? [{ debugName: "i18nLabels" }] : /* istanbul ignore next */ []));
5573
+ this.loadI18nLabels();
5574
+ // React to items input changes using an effect so signals drive template updates
5575
+ effect(() => {
5576
+ void this.scheduleLoadItems(this.items() ?? []);
5577
+ });
5578
+ }
5579
+ ngOnDestroy() {
5580
+ this.isDestroyed = true;
5581
+ // Cancel a pending debounced load: without this, a load scheduled moments before destroy
5582
+ // still runs and resolves items, creating object URLs on a service that has already
5583
+ // released its set — those URLs would never be revoked.
5584
+ if (this.loadDebounceTimer) {
5585
+ clearTimeout(this.loadDebounceTimer);
5586
+ this.loadDebounceTimer = undefined;
5587
+ }
5588
+ this.dialogRef?.close();
5589
+ this.filePreviewService.releaseResources();
5590
+ }
5591
+ trackById(_, item) {
5592
+ return item.id;
5593
+ }
5594
+ onDocxRenderFailed(itemId) {
5595
+ this.docxRenderErrors.update((current) => new Set(current).add(itemId));
5596
+ }
5597
+ trackByActionId(_, action) {
5598
+ return action.id;
5599
+ }
5600
+ formatFileSize(bytes) {
5601
+ return this.filePreviewService.formatFileSize(bytes);
5602
+ }
5603
+ openPreview(item) {
5604
+ if (!this.mergedConfig().showOverlayPreview) {
5605
+ return;
5606
+ }
5607
+ const data = {
5608
+ item,
5609
+ config: this.mergedConfig(),
5610
+ labels: this.mergedLabels(),
5611
+ visibleCustomActions: this.visibleCustomActions(),
5612
+ isDownloadVisible: this.isFileActionVisible('downloadAction'),
5613
+ isDeleteVisible: this.isFileActionVisible('deleteAction'),
5614
+ };
5615
+ this.previewOpened.emit(item);
5616
+ this.dialogRef = this.dialog.open(FilePreviewDialogComponent, {
5617
+ data,
5618
+ // size is applied by the dialog component itself for responsive behavior
5619
+ panelClass: 'fp-mat-dialog',
5620
+ autoFocus: false,
5621
+ });
5622
+ this.dialogRef.afterClosed().subscribe((result) => {
5623
+ this.dialogRef = undefined;
5624
+ if (!result) {
5625
+ return;
4550
5626
  }
4551
- }, /* @ts-ignore */
4552
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
5627
+ if (result.type === 'delete') {
5628
+ this.deleteClicked.emit(result.item);
5629
+ }
5630
+ else if (result.type === 'action') {
5631
+ this.actionClicked.emit({ action: result.action, item: result.item });
5632
+ }
5633
+ });
4553
5634
  }
4554
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AlertComponent, deps: [{ token: MAD_ALERT_DEFAULT_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Component }); }
4555
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: AlertComponent, isStandalone: true, selector: "mad-alert", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", action: "action" }, ngImport: i0, template: "<div data-cy=\"alert\" class=\"alert\" [class]=\"classes()\">\n <span data-cy=\"alert-icon\" class=\"icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n <span data-cy=\"alert-message\" class=\"message\">{{ message() }}</span>\n @if (actionText()) {\n <span data-cy=\"alert-action-btn\" class=\"action-btn\" (click)=\"action.emit()\">\n {{ actionText() }}\n </span>\n }\n @if (closeable()) {\n <button mat-icon-button data-cy=\"alert-close-btn\" class=\"close-btn\" (click)=\"close.emit()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n</div>\n", styles: [".alert{display:flex;align-items:center;padding:16px;border-radius:4px;margin:8px 0;font-size:14px;position:relative;border:1px solid transparent}.alert.small{padding:0 8px;font-size:14px}.alert.medium{padding:8px;font-size:16px}.alert.large{padding:12px 8px;font-size:18px}.alert .icon{margin-right:8px;display:flex;align-items:center}.alert .message{flex:1}.alert .action-btn,.alert .close-btn{color:inherit;margin-left:auto;padding:0}.alert .action-btn{text-decoration:underline;cursor:pointer}.alert .close-btn{display:flex;align-items:center;justify-content:center}.alert.success{background-color:var(--alert-success-background-color);border-color:var(--alert-success-border-color);color:var(--alert-success-text-color)}.alert.info{background-color:var(--alert-info-background-color);border-color:var(--alert-info-border-color);color:var(--alert-info-text-color)}.alert.warning{background-color:var(--alert-warning-background-color);border-color:var(--alert-warning-border-color);color:var(--alert-warning-text-color)}.alert.error{background-color:var(--alert-error-background-color);border-color:var(--alert-error-border-color);color:var(--alert-error-text-color)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }] }); }
5635
+ triggerAction(action, item) {
5636
+ this.actionClicked.emit({ action, item });
5637
+ }
5638
+ triggerDelete(item) {
5639
+ this.deleteClicked.emit(item);
5640
+ }
5641
+ download(item) {
5642
+ this.filePreviewService.download(item);
5643
+ }
5644
+ isFileActionVisible(action) {
5645
+ return this.computeFileActionVisible(action);
5646
+ }
5647
+ scheduleLoadItems(items) {
5648
+ if (this.loadDebounceTimer) {
5649
+ clearTimeout(this.loadDebounceTimer);
5650
+ }
5651
+ this.loadDebounceTimer = setTimeout(() => {
5652
+ void this.loadItems(items);
5653
+ this.loadDebounceTimer = undefined;
5654
+ }, 250);
5655
+ }
5656
+ async loadItems(items) {
5657
+ if (this.isDestroyed) {
5658
+ return;
5659
+ }
5660
+ const requestId = ++this.loadRequestId;
5661
+ const keepUrls = new Set();
5662
+ // Clear immediately so stale thumbnails don't linger and the empty state shows at once.
5663
+ this.resolvedItems.set([]);
5664
+ this.docxRenderErrors.set(new Set());
5665
+ this.retainCurrentObjectUrls();
5666
+ if (items.length === 0) {
5667
+ return;
5668
+ }
5669
+ // Process items in small batches so the first results appear quickly instead of
5670
+ // waiting for every file to resolve — critical when PDF thumbnail generation is
5671
+ // enabled, as each page render can take hundreds of milliseconds.
5672
+ const BATCH_SIZE = 10;
5673
+ for (let i = 0; i < items.length; i += BATCH_SIZE) {
5674
+ if (this.isDestroyed || requestId !== this.loadRequestId) {
5675
+ return;
5676
+ }
5677
+ const batch = items.slice(i, i + BATCH_SIZE);
5678
+ let batchResolved;
5679
+ try {
5680
+ const config = this.mergedConfig();
5681
+ batchResolved = await this.filePreviewService.resolveItems(batch, {
5682
+ generatePdfThumbnails: config.generatePdfThumbnails,
5683
+ generateDocxThumbnails: config.generateDocxThumbnails,
5684
+ });
5685
+ }
5686
+ catch (err) {
5687
+ console.error('[FilePreviewComponent.loadItems] Batch resolution failed:', err);
5688
+ if (requestId !== this.loadRequestId) {
5689
+ return;
5690
+ }
5691
+ // Retain partial results from previous batches and stop further processing.
5692
+ return;
5693
+ }
5694
+ if (this.isDestroyed || requestId !== this.loadRequestId) {
5695
+ return;
5696
+ }
5697
+ this.resolvedItems.update((current) => [...current, ...batchResolved]);
5698
+ this.collectItemUrls(batchResolved, keepUrls);
5699
+ this.filePreviewService.retainOnlyObjectUrls(keepUrls);
5700
+ }
5701
+ }
5702
+ collectItemUrls(items, keepUrls) {
5703
+ for (const item of items) {
5704
+ if (item.resolvedPreviewUrl) {
5705
+ keepUrls.add(item.resolvedPreviewUrl);
5706
+ }
5707
+ if (item.resolvedThumbnailUrl) {
5708
+ keepUrls.add(item.resolvedThumbnailUrl);
5709
+ }
5710
+ }
5711
+ }
5712
+ retainCurrentObjectUrls() {
5713
+ const keepUrls = new Set();
5714
+ this.collectItemUrls(this.resolvedItems(), keepUrls);
5715
+ this.filePreviewService.retainOnlyObjectUrls(keepUrls);
5716
+ }
5717
+ computeFileActionVisible(action) {
5718
+ const cfg = this.mergedConfig();
5719
+ if (!cfg.showActionIcons) {
5720
+ return false;
5721
+ }
5722
+ switch (action) {
5723
+ case 'previewAction':
5724
+ return cfg.showOverlayPreview && cfg.showPreviewAction;
5725
+ case 'downloadAction':
5726
+ return cfg.showDownloadAction;
5727
+ case 'deleteAction':
5728
+ return cfg.showDeleteAction;
5729
+ }
5730
+ }
5731
+ loadI18nLabels() {
5732
+ this.translate.get('components.file-preview').subscribe((translations) => {
5733
+ if (translations && typeof translations === 'object') {
5734
+ // Filter to keep only truthy string values
5735
+ const i18nLabels = Object.fromEntries(Object.entries(translations).filter(([, value]) => typeof value === 'string' && value.length > 0));
5736
+ this.i18nLabels.set(i18nLabels);
5737
+ }
5738
+ });
5739
+ }
5740
+ resolveSize(size) {
5741
+ if (typeof size === 'object') {
5742
+ return size;
5743
+ }
5744
+ return THUMBNAIL_SIZE_MAP[size] ?? THUMBNAIL_SIZE_MAP.md;
5745
+ }
5746
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FilePreviewComponent, deps: [{ token: FilePreviewService }, { token: i1$5.MatDialog }, { token: i2$3.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
5747
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: FilePreviewComponent, isStandalone: true, selector: "mad-file-preview", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { previewOpened: "previewOpened", actionClicked: "actionClicked", deleteClicked: "deleteClicked" }, providers: [FilePreviewService], ngImport: i0, template: "<!-- =====================================================================\n material-file-preview \u2014 Material File Preview Library\n ===================================================================== -->\n\n<section class=\"fp-shell grid gap-4\" [attr.aria-label]=\"mergedLabels().galleryAriaLabel\">\n <section class=\"fp-container\">\n <!-- Empty state -->\n @if (resolvedItems().length === 0) {\n <div\n class=\"fp-empty flex flex-col items-center justify-center gap-3 py-6 px-4 text-sm leading-normal text-(--mat-sys-on-surface-variant) [@media(width<480px)]:gap-2 [@media(width<480px)]:py-5 [@media(width<480px)]:px-3 lg:py-8\"\n >\n <mat-icon\n class=\"fp-empty__icon text-[48px] w-12 h-12 opacity-40 shrink-0 [@media(width<480px)]:text-[40px] [@media(width<480px)]:w-10 [@media(width<480px)]:h-10 lg:text-[56px] lg:w-14 lg:h-14\"\n >folder_open</mat-icon\n >\n <span>{{ mergedLabels().emptyStateMessage }}</span>\n </div>\n }\n\n <!-- Thumbnail grid -->\n <ul\n class=\"fp-grid flex flex-wrap gap-4 p-4 m-0 list-none items-start [@media(width<480px)]:gap-3 [@media(width<480px)]:p-3 lg:gap-5 lg:p-5\"\n >\n @for (item of resolvedItems(); track item.id) {\n <li class=\"fp-item flex flex-col items-center gap-2\">\n <!-- \u2500\u2500 Thumbnail card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <button\n class=\"fp-thumb relative border-[1.5px] border-(--mat-sys-outline-variant) rounded-lg flex items-center justify-center cursor-default bg-(--mat-sys-surface-container-lowest) p-0 overflow-hidden outline-none shrink-0 transition-[border-color,box-shadow] duration-[180ms] ease-in-out\"\n type=\"button\"\n data-cy=\"file-preview-thumbnail\"\n [style.width.px]=\"thumbnailDimensions().width\"\n [style.height.px]=\"thumbnailDimensions().height\"\n [attr.aria-label]=\"mergedLabels().thumbnailPreviewAriaPrefix + ' ' + item.name\"\n [attr.aria-disabled]=\"!mergedConfig().showOverlayPreview || null\"\n [class.fp-thumb--clickable]=\"mergedConfig().showOverlayPreview\"\n (click)=\"openPreview(item)\"\n >\n <!-- Generated / provided thumbnail image -->\n @if (item.resolvedThumbnailUrl) {\n <img\n class=\"fp-thumb__img w-full h-full block\"\n [src]=\"item.resolvedThumbnailUrl\"\n [alt]=\"item.name\"\n style=\"object-fit: cover\"\n loading=\"lazy\"\n />\n } @else {\n <!-- Fallback icon (pdf / docx / xlsx / unknown or when thumbnail unavailable) -->\n <div class=\"fp-thumb__icon flex items-center justify-center w-full h-full p-4 [@media(width<480px)]:p-3\">\n @switch (item.kind) {\n @case ('pdf') {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-pdf)\">picture_as_pdf</mat-icon>\n }\n @case ('docx') {\n <!-- DOCX thumbnail: render real scaled preview via component -->\n @if (item.source && mergedConfig().generateDocxThumbnails && !docxRenderErrors().has(item.id)) {\n @defer (on viewport) {\n <mad-docx-preview\n [source]=\"item.source\"\n [thumbnail]=\"true\"\n (renderFailed)=\"onDocxRenderFailed(item.id)\"\n ></mad-docx-preview>\n } @placeholder {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-docx)\">description</mat-icon>\n }\n } @else {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-docx)\">description</mat-icon>\n }\n }\n @case ('xlsx') {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-success)\">table_chart</mat-icon>\n }\n @case ('image') {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-success)\">image</mat-icon>\n }\n @default {\n <mat-icon class=\"fp-thumb__icon-svg\">insert_drive_file</mat-icon>\n }\n }\n </div>\n }\n\n <!-- Type badge chip -->\n <span\n class=\"fp-thumb__badge absolute bottom-2 right-2 py-1 px-2 rounded text-xs font-semibold tracking-[0.04em] uppercase leading-[1.4] bg-black/60 text-(--mat-sys-on-primary) pointer-events-none [@media(width<480px)]:bottom-1 [@media(width<480px)]:right-1 [@media(width<480px)]:p-1 [@media(width<480px)]:text-[9px]\"\n [attr.data-kind]=\"item.kind\"\n >\n {{ item.extension || item.kind }}\n </span>\n </button>\n\n <!-- \u2500\u2500 File name label \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <p\n class=\"fp-label m-0 text-[13px] leading-[1.3] whitespace-nowrap overflow-hidden text-ellipsis text-center text-(--mat-sys-on-surface) cursor-default max-w-full [@media(width<480px)]:text-[11px] [@media(width<480px)]:leading-[1.2] lg:text-sm\"\n [style.max-width.px]=\"thumbnailDimensions().width\"\n [matTooltip]=\"item.name\"\n matTooltipShowDelay=\"500\"\n >\n {{ item.name }}\n </p>\n\n <!-- \u2500\u2500 Action bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (hasVisibleActions()) {\n <div class=\"fp-actions flex gap-0 justify-center flex-wrap [@media(width<480px)]:gap-1\">\n <!-- Preview -->\n @if (isFileActionVisible('previewAction')) {\n <button\n mat-icon-button\n data-cy=\"file-preview-thumbnail-preview-action\"\n [matTooltip]=\"mergedLabels().previewActionLabel\"\n [attr.aria-label]=\"mergedLabels().previewActionLabel\"\n (click)=\"openPreview(item)\"\n >\n <mat-icon>visibility</mat-icon>\n </button>\n }\n\n <!-- Download -->\n @if (isFileActionVisible('downloadAction')) {\n <button\n mat-icon-button\n data-cy=\"file-preview-thumbnail-download-action\"\n [matTooltip]=\"mergedLabels().downloadActionLabel\"\n [attr.aria-label]=\"mergedLabels().downloadActionLabel\"\n (click)=\"download(item)\"\n >\n <mat-icon>download</mat-icon>\n </button>\n }\n\n <!-- Custom actions from config -->\n @for (action of visibleCustomActions(); track action.id) {\n <button\n mat-icon-button\n [attr.data-cy]=\"'file-preview-thumbnail-custom-action-' + action.id\"\n [matTooltip]=\"action.label\"\n [attr.aria-label]=\"action.label\"\n [color]=\"action.color ?? undefined\"\n (click)=\"triggerAction(action, item)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n\n <!-- Delete -->\n @if (isFileActionVisible('deleteAction')) {\n <button\n mat-icon-button\n data-cy=\"file-preview-thumbnail-delete-action\"\n [matTooltip]=\"mergedLabels().deleteActionLabel\"\n [attr.aria-label]=\"mergedLabels().deleteActionLabel\"\n color=\"warn\"\n (click)=\"triggerDelete(item)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n }\n <!-- /fp-actions -->\n </li>\n }\n <!-- /fp-item -->\n </ul>\n <!-- /fp-grid -->\n </section>\n</section>\n", styles: [":host{display:block;--fp-icon-color-pdf: #d32f2f;--fp-icon-color-docx: #1976d2;--fp-icon-color-success: #388e3c}:host .fp-thumb--clickable{cursor:pointer}:host .fp-thumb--clickable:hover,:host .fp-thumb--clickable:focus-visible{border-color:var(--mat-sys-primary, #1976d2);box-shadow:0 2px 8px var(--mat-sys-primary-container, rgba(25, 118, 210, .18))}:host .fp-thumb--clickable:active{box-shadow:0 1px 3px var(--mat-sys-primary-container, rgba(25, 118, 210, .25))}:host .fp-thumb--clickable:focus-visible{outline:2px solid var(--mat-sys-primary, #1976d2);outline-offset:2px}:host .fp-thumb ::ng-deep mad-docx-preview{width:100%;height:100%;overflow:hidden;display:block}:host .fp-thumb__icon-svg{font-size:52px;width:52px;height:52px;opacity:.65;flex-shrink:0}@media(width<480px){:host .fp-thumb__icon-svg{font-size:40px;width:40px;height:40px}}@media(width>=1024px){:host .fp-thumb__icon-svg{font-size:60px;width:60px;height:60px}}:host .fp-thumb__badge[data-kind=pdf]{background:color-mix(in srgb,var(--fp-icon-color-pdf) 85%,transparent)}:host .fp-thumb__badge[data-kind=docx]{background:color-mix(in srgb,var(--fp-icon-color-docx) 85%,transparent)}:host .fp-thumb__badge[data-kind=image],:host .fp-thumb__badge[data-kind=xlsx]{background:color-mix(in srgb,var(--fp-icon-color-success) 85%,transparent)}:host .fp-thumb__badge[data-kind=unknown]{background:#616161bf}:host .fp-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 36px;width:36px;height:36px}@media(width<480px){:host .fp-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 32px;width:32px;height:32px}}:host .fp-actions .mat-mdc-icon-button .mat-icon{font-size:18px;width:18px;height:18px;line-height:18px}\n"], dependencies: [{ 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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [/* @ts-ignore */
5748
+ Promise.resolve().then(function () { return docxPreview_component; }).then(m => m.DocxPreviewComponent)]] }); }
4556
5749
  }
4557
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AlertComponent, decorators: [{
4558
- type: Component,
4559
- args: [{ selector: 'mad-alert', imports: [MatIconModule, MatButtonModule], template: "<div data-cy=\"alert\" class=\"alert\" [class]=\"classes()\">\n <span data-cy=\"alert-icon\" class=\"icon\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n <span data-cy=\"alert-message\" class=\"message\">{{ message() }}</span>\n @if (actionText()) {\n <span data-cy=\"alert-action-btn\" class=\"action-btn\" (click)=\"action.emit()\">\n {{ actionText() }}\n </span>\n }\n @if (closeable()) {\n <button mat-icon-button data-cy=\"alert-close-btn\" class=\"close-btn\" (click)=\"close.emit()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n</div>\n", styles: [".alert{display:flex;align-items:center;padding:16px;border-radius:4px;margin:8px 0;font-size:14px;position:relative;border:1px solid transparent}.alert.small{padding:0 8px;font-size:14px}.alert.medium{padding:8px;font-size:16px}.alert.large{padding:12px 8px;font-size:18px}.alert .icon{margin-right:8px;display:flex;align-items:center}.alert .message{flex:1}.alert .action-btn,.alert .close-btn{color:inherit;margin-left:auto;padding:0}.alert .action-btn{text-decoration:underline;cursor:pointer}.alert .close-btn{display:flex;align-items:center;justify-content:center}.alert.success{background-color:var(--alert-success-background-color);border-color:var(--alert-success-border-color);color:var(--alert-success-text-color)}.alert.info{background-color:var(--alert-info-background-color);border-color:var(--alert-info-border-color);color:var(--alert-info-text-color)}.alert.warning{background-color:var(--alert-warning-background-color);border-color:var(--alert-warning-border-color);color:var(--alert-warning-text-color)}.alert.error{background-color:var(--alert-error-background-color);border-color:var(--alert-error-border-color);color:var(--alert-error-text-color)}\n"] }]
4560
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4561
- type: Inject,
4562
- args: [MAD_ALERT_DEFAULT_CONFIGURATION]
4563
- }] }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], action: [{ type: i0.Output, args: ["action"] }] } });
5750
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.1.4", ngImport: i0, type: FilePreviewComponent, resolveDeferredDeps: () => [/* @ts-ignore */
5751
+ Promise.resolve().then(function () { return docxPreview_component; }).then(m => m.DocxPreviewComponent)], resolveMetadata: DocxPreviewComponent => ({ decorators: [{
5752
+ type: Component,
5753
+ args: [{ selector: 'mad-file-preview', standalone: true, imports: [MatButtonModule, MatIconModule, MatTooltipModule, DocxPreviewComponent], providers: [FilePreviewService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- =====================================================================\n material-file-preview \u2014 Material File Preview Library\n ===================================================================== -->\n\n<section class=\"fp-shell grid gap-4\" [attr.aria-label]=\"mergedLabels().galleryAriaLabel\">\n <section class=\"fp-container\">\n <!-- Empty state -->\n @if (resolvedItems().length === 0) {\n <div\n class=\"fp-empty flex flex-col items-center justify-center gap-3 py-6 px-4 text-sm leading-normal text-(--mat-sys-on-surface-variant) [@media(width<480px)]:gap-2 [@media(width<480px)]:py-5 [@media(width<480px)]:px-3 lg:py-8\"\n >\n <mat-icon\n class=\"fp-empty__icon text-[48px] w-12 h-12 opacity-40 shrink-0 [@media(width<480px)]:text-[40px] [@media(width<480px)]:w-10 [@media(width<480px)]:h-10 lg:text-[56px] lg:w-14 lg:h-14\"\n >folder_open</mat-icon\n >\n <span>{{ mergedLabels().emptyStateMessage }}</span>\n </div>\n }\n\n <!-- Thumbnail grid -->\n <ul\n class=\"fp-grid flex flex-wrap gap-4 p-4 m-0 list-none items-start [@media(width<480px)]:gap-3 [@media(width<480px)]:p-3 lg:gap-5 lg:p-5\"\n >\n @for (item of resolvedItems(); track item.id) {\n <li class=\"fp-item flex flex-col items-center gap-2\">\n <!-- \u2500\u2500 Thumbnail card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <button\n class=\"fp-thumb relative border-[1.5px] border-(--mat-sys-outline-variant) rounded-lg flex items-center justify-center cursor-default bg-(--mat-sys-surface-container-lowest) p-0 overflow-hidden outline-none shrink-0 transition-[border-color,box-shadow] duration-[180ms] ease-in-out\"\n type=\"button\"\n data-cy=\"file-preview-thumbnail\"\n [style.width.px]=\"thumbnailDimensions().width\"\n [style.height.px]=\"thumbnailDimensions().height\"\n [attr.aria-label]=\"mergedLabels().thumbnailPreviewAriaPrefix + ' ' + item.name\"\n [attr.aria-disabled]=\"!mergedConfig().showOverlayPreview || null\"\n [class.fp-thumb--clickable]=\"mergedConfig().showOverlayPreview\"\n (click)=\"openPreview(item)\"\n >\n <!-- Generated / provided thumbnail image -->\n @if (item.resolvedThumbnailUrl) {\n <img\n class=\"fp-thumb__img w-full h-full block\"\n [src]=\"item.resolvedThumbnailUrl\"\n [alt]=\"item.name\"\n style=\"object-fit: cover\"\n loading=\"lazy\"\n />\n } @else {\n <!-- Fallback icon (pdf / docx / xlsx / unknown or when thumbnail unavailable) -->\n <div class=\"fp-thumb__icon flex items-center justify-center w-full h-full p-4 [@media(width<480px)]:p-3\">\n @switch (item.kind) {\n @case ('pdf') {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-pdf)\">picture_as_pdf</mat-icon>\n }\n @case ('docx') {\n <!-- DOCX thumbnail: render real scaled preview via component -->\n @if (item.source && mergedConfig().generateDocxThumbnails && !docxRenderErrors().has(item.id)) {\n @defer (on viewport) {\n <mad-docx-preview\n [source]=\"item.source\"\n [thumbnail]=\"true\"\n (renderFailed)=\"onDocxRenderFailed(item.id)\"\n ></mad-docx-preview>\n } @placeholder {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-docx)\">description</mat-icon>\n }\n } @else {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-docx)\">description</mat-icon>\n }\n }\n @case ('xlsx') {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-success)\">table_chart</mat-icon>\n }\n @case ('image') {\n <mat-icon class=\"fp-thumb__icon-svg text-(--fp-icon-color-success)\">image</mat-icon>\n }\n @default {\n <mat-icon class=\"fp-thumb__icon-svg\">insert_drive_file</mat-icon>\n }\n }\n </div>\n }\n\n <!-- Type badge chip -->\n <span\n class=\"fp-thumb__badge absolute bottom-2 right-2 py-1 px-2 rounded text-xs font-semibold tracking-[0.04em] uppercase leading-[1.4] bg-black/60 text-(--mat-sys-on-primary) pointer-events-none [@media(width<480px)]:bottom-1 [@media(width<480px)]:right-1 [@media(width<480px)]:p-1 [@media(width<480px)]:text-[9px]\"\n [attr.data-kind]=\"item.kind\"\n >\n {{ item.extension || item.kind }}\n </span>\n </button>\n\n <!-- \u2500\u2500 File name label \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <p\n class=\"fp-label m-0 text-[13px] leading-[1.3] whitespace-nowrap overflow-hidden text-ellipsis text-center text-(--mat-sys-on-surface) cursor-default max-w-full [@media(width<480px)]:text-[11px] [@media(width<480px)]:leading-[1.2] lg:text-sm\"\n [style.max-width.px]=\"thumbnailDimensions().width\"\n [matTooltip]=\"item.name\"\n matTooltipShowDelay=\"500\"\n >\n {{ item.name }}\n </p>\n\n <!-- \u2500\u2500 Action bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (hasVisibleActions()) {\n <div class=\"fp-actions flex gap-0 justify-center flex-wrap [@media(width<480px)]:gap-1\">\n <!-- Preview -->\n @if (isFileActionVisible('previewAction')) {\n <button\n mat-icon-button\n data-cy=\"file-preview-thumbnail-preview-action\"\n [matTooltip]=\"mergedLabels().previewActionLabel\"\n [attr.aria-label]=\"mergedLabels().previewActionLabel\"\n (click)=\"openPreview(item)\"\n >\n <mat-icon>visibility</mat-icon>\n </button>\n }\n\n <!-- Download -->\n @if (isFileActionVisible('downloadAction')) {\n <button\n mat-icon-button\n data-cy=\"file-preview-thumbnail-download-action\"\n [matTooltip]=\"mergedLabels().downloadActionLabel\"\n [attr.aria-label]=\"mergedLabels().downloadActionLabel\"\n (click)=\"download(item)\"\n >\n <mat-icon>download</mat-icon>\n </button>\n }\n\n <!-- Custom actions from config -->\n @for (action of visibleCustomActions(); track action.id) {\n <button\n mat-icon-button\n [attr.data-cy]=\"'file-preview-thumbnail-custom-action-' + action.id\"\n [matTooltip]=\"action.label\"\n [attr.aria-label]=\"action.label\"\n [color]=\"action.color ?? undefined\"\n (click)=\"triggerAction(action, item)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n\n <!-- Delete -->\n @if (isFileActionVisible('deleteAction')) {\n <button\n mat-icon-button\n data-cy=\"file-preview-thumbnail-delete-action\"\n [matTooltip]=\"mergedLabels().deleteActionLabel\"\n [attr.aria-label]=\"mergedLabels().deleteActionLabel\"\n color=\"warn\"\n (click)=\"triggerDelete(item)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n }\n <!-- /fp-actions -->\n </li>\n }\n <!-- /fp-item -->\n </ul>\n <!-- /fp-grid -->\n </section>\n</section>\n", styles: [":host{display:block;--fp-icon-color-pdf: #d32f2f;--fp-icon-color-docx: #1976d2;--fp-icon-color-success: #388e3c}:host .fp-thumb--clickable{cursor:pointer}:host .fp-thumb--clickable:hover,:host .fp-thumb--clickable:focus-visible{border-color:var(--mat-sys-primary, #1976d2);box-shadow:0 2px 8px var(--mat-sys-primary-container, rgba(25, 118, 210, .18))}:host .fp-thumb--clickable:active{box-shadow:0 1px 3px var(--mat-sys-primary-container, rgba(25, 118, 210, .25))}:host .fp-thumb--clickable:focus-visible{outline:2px solid var(--mat-sys-primary, #1976d2);outline-offset:2px}:host .fp-thumb ::ng-deep mad-docx-preview{width:100%;height:100%;overflow:hidden;display:block}:host .fp-thumb__icon-svg{font-size:52px;width:52px;height:52px;opacity:.65;flex-shrink:0}@media(width<480px){:host .fp-thumb__icon-svg{font-size:40px;width:40px;height:40px}}@media(width>=1024px){:host .fp-thumb__icon-svg{font-size:60px;width:60px;height:60px}}:host .fp-thumb__badge[data-kind=pdf]{background:color-mix(in srgb,var(--fp-icon-color-pdf) 85%,transparent)}:host .fp-thumb__badge[data-kind=docx]{background:color-mix(in srgb,var(--fp-icon-color-docx) 85%,transparent)}:host .fp-thumb__badge[data-kind=image],:host .fp-thumb__badge[data-kind=xlsx]{background:color-mix(in srgb,var(--fp-icon-color-success) 85%,transparent)}:host .fp-thumb__badge[data-kind=unknown]{background:#616161bf}:host .fp-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 36px;width:36px;height:36px}@media(width<480px){:host .fp-actions .mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 32px;width:32px;height:32px}}:host .fp-actions .mat-mdc-icon-button .mat-icon{font-size:18px;width:18px;height:18px;line-height:18px}\n"] }]
5754
+ }], ctorParameters: () => [{ type: FilePreviewService }, { type: i1$5.MatDialog }, { type: i2$3.TranslateService }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], previewOpened: [{ type: i0.Output, args: ["previewOpened"] }], actionClicked: [{ type: i0.Output, args: ["actionClicked"] }], deleteClicked: [{ type: i0.Output, args: ["deleteClicked"] }] } }) });
5755
+
5756
+ class MaterialFilePreviewModule {
5757
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MaterialFilePreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5758
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.4", ngImport: i0, type: MaterialFilePreviewModule, imports: [FilePreviewComponent], exports: [FilePreviewComponent] }); }
5759
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MaterialFilePreviewModule, imports: [FilePreviewComponent] }); }
5760
+ }
5761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MaterialFilePreviewModule, decorators: [{
5762
+ type: NgModule,
5763
+ args: [{
5764
+ imports: [FilePreviewComponent],
5765
+ exports: [FilePreviewComponent],
5766
+ }]
5767
+ }] });
4564
5768
 
4565
5769
  /*
4566
5770
  * Public API Surface of material-addons
@@ -4570,5 +5774,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
4570
5774
  * Generated bundle index. Do not edit.
4571
5775
  */
4572
5776
 
4573
- export { AlertComponent, BaseQuickListComponent, BreadcrumbComponent, ButtonModule, CardComponent, CardModule, CarouselComponent, CarouselShortTextDirective, CarouselSlideDirective, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DangerButtonComponent, DataTableActionType, DataTableColumnsModalComponent, DataTableComponent, DataTablePersistenceService, DataTableTemplateCellDefinition, DataTableTemplateColumnDefinition, DataTableTemplateExpandableCellDefinition, DataTableTemplateExpandableColumnDefinition, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MAD_ALERT_DEFAULT_CONFIGURATION, MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY, MAD_DATA_TABLE_GLOBAL_CONFIGURATION, MAD_DATA_TABLE_PERSISTENCE_SERVICE, MAD_READONLY_FORM_FIELD_DEFAULT_CONFIGURATION, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarLayoutComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, TileComponent, ToolbarComponent, ToolbarModule, ToolbarService, VERSION, madStepperAnimations };
5777
+ export { AlertComponent, BaseQuickListComponent, BreadcrumbComponent, ButtonModule, CardComponent, CardModule, CarouselComponent, CarouselShortTextDirective, CarouselSlideDirective, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DEFAULT_FILE_PREVIEW_CONFIG, DEFAULT_FILE_PREVIEW_LABELS, DangerButtonComponent, DataTableActionType, DataTableColumnsModalComponent, DataTableComponent, DataTablePersistenceService, DataTableTemplateCellDefinition, DataTableTemplateColumnDefinition, DataTableTemplateExpandableCellDefinition, DataTableTemplateExpandableColumnDefinition, FilePreviewComponent, FilePreviewDialogComponent, FilePreviewService, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MAD_ALERT_DEFAULT_CONFIGURATION, MAD_ALERT_DEFAULT_CONFIGURATION_FACTORY, MAD_DATA_TABLE_GLOBAL_CONFIGURATION, MAD_DATA_TABLE_PERSISTENCE_SERVICE, MAD_READONLY_FORM_FIELD_DEFAULT_CONFIGURATION, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, MaterialFilePreviewModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PDF_WORKER_SRC, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarLayoutComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, THUMBNAIL_SIZE_MAP, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, TileComponent, ToolbarComponent, ToolbarModule, ToolbarService, VERSION, madStepperAnimations };
4574
5778
  //# sourceMappingURL=porscheinformatik-material-addons.mjs.map