@porscheinformatik/material-addons 22.4.1 → 22.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
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, SkipSelf, ViewContainerRef, inputBinding, outputBinding, contentChildren, contentChild, ChangeDetectorRef, untracked, TemplateRef, ViewChildren, ContentChild, ViewEncapsulation, QueryList, ContentChildren, PLATFORM_ID } 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, ChangeDetectorRef, Injector, untracked, afterEveryRender, forwardRef, HostListener, model, SkipSelf, ViewContainerRef, inputBinding, outputBinding, contentChildren, contentChild, TemplateRef, ViewChildren, ContentChild, ViewEncapsulation, QueryList, ContentChildren, PLATFORM_ID } from '@angular/core';
3
3
  import * as i2 from '@angular/material/icon';
4
4
  import { MatIconModule, MatIcon } from '@angular/material/icon';
5
5
  import * as i6 from '@angular/material/tooltip';
@@ -8,16 +8,16 @@ 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$4 from '@angular/common';
11
+ import * as i2$3 from '@angular/common';
12
12
  import { CommonModule, NgStyle, NgClass, NgTemplateOutlet, AsyncPipe, DOCUMENT, isPlatformBrowser } from '@angular/common';
13
13
  import * as i1$2 from '@angular/forms';
14
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
17
  import * as i2$1 from '@angular/material/input';
18
- import { MatInputModule } from '@angular/material/input';
18
+ import { MatInputModule, MatInput } from '@angular/material/input';
19
19
  import * as i1$1 from '@angular/material/form-field';
20
- import { MatFormFieldModule } from '@angular/material/form-field';
20
+ import { MatFormFieldModule, MatFormField } from '@angular/material/form-field';
21
21
  import { ObserversModule } from '@angular/cdk/observers';
22
22
  import { Subject, Subscription, of } from 'rxjs';
23
23
  import { throttleTime, switchMap, map, tap, startWith, takeUntil, distinctUntilChanged } from 'rxjs/operators';
@@ -35,8 +35,8 @@ import * as i1$5 from '@angular/material/dialog';
35
35
  import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialog, MatDialogModule } from '@angular/material/dialog';
36
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$3 from '@ngx-translate/core';
39
- import { TranslateModule } from '@ngx-translate/core';
38
+ import * as i2$4 from '@ngx-translate/core';
39
+ import { TranslatePipe } from '@ngx-translate/core';
40
40
  import { SelectionModel } from '@angular/cdk/collections';
41
41
  import { DateTime } from 'luxon';
42
42
  import { v4 } from 'uuid';
@@ -329,6 +329,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
329
329
  }]
330
330
  }] });
331
331
 
332
+ /** Internal numeric-field precision policy, including static string attributes. */
333
+ function normalizeDecimalPlaces(value) {
334
+ if (typeof value !== 'number' && (typeof value !== 'string' || value.trim() === '')) {
335
+ return 2;
336
+ }
337
+ const precision = Number(value);
338
+ return Number.isInteger(precision) && precision >= 0 && precision <= 100 ? precision : 2;
339
+ }
340
+ /** Expand the finite number's shortest decimal representation; IEEE-754 bounds the allocation. */
341
+ function toDecimalString(value) {
342
+ if (!Number.isFinite(value)) {
343
+ return '';
344
+ }
345
+ const text = value.toString();
346
+ const [mantissa, exponent] = text.split('e');
347
+ if (exponent === undefined) {
348
+ return text;
349
+ }
350
+ const sign = value < 0 ? '-' : '';
351
+ const [integer, fraction = ''] = mantissa.replace('-', '').split('.');
352
+ const digits = integer + fraction;
353
+ const decimalIndex = integer.length + Number(exponent);
354
+ if (decimalIndex <= 0) {
355
+ return `${sign}0.${'0'.repeat(-decimalIndex)}${digits}`;
356
+ }
357
+ if (decimalIndex >= digits.length) {
358
+ return sign + digits + '0'.repeat(decimalIndex - digits.length);
359
+ }
360
+ return `${sign}${digits.slice(0, decimalIndex)}.${digits.slice(decimalIndex)}`;
361
+ }
362
+ /** Operate on decimal digits so scaling cannot overflow or move a decimal boundary. */
363
+ function roundOrTruncateNumber(value, decimalPlaces, roundDisplayValue) {
364
+ if (!Number.isFinite(value) || value === 0) {
365
+ return value;
366
+ }
367
+ const precision = normalizeDecimalPlaces(decimalPlaces);
368
+ const [integer, fraction = ''] = toDecimalString(Math.abs(value)).split('.');
369
+ if (fraction.length <= precision) {
370
+ return value;
371
+ }
372
+ const discarded = fraction.slice(precision);
373
+ let digits = integer + fraction.slice(0, precision);
374
+ // At an exact negative tie Math.round chooses the value closer to zero.
375
+ const increment = discarded[0] > '5' || (discarded[0] === '5' && (value > 0 || /[1-9]/.test(discarded.slice(1))));
376
+ if (roundDisplayValue && increment) {
377
+ digits = (BigInt(digits) + 1n).toString();
378
+ }
379
+ digits = digits.padStart(precision + 1, '0');
380
+ const decimalIndex = digits.length - precision;
381
+ const result = precision > 0 ? `${digits.slice(0, decimalIndex)}.${digits.slice(decimalIndex)}` : digits;
382
+ return Number((value < 0 ? '-' : '') + result);
383
+ }
384
+
332
385
  class NumberFormatService {
333
386
  static { this.NEGATIVE = '-'; }
334
387
  static { this.NUMBERS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; }
@@ -371,7 +424,6 @@ class NumberFormatService {
371
424
  * @param locale the new locale
372
425
  */
373
426
  prepareSeparators(locale) {
374
- // try to get the current formatting
375
427
  const localeDecimalSeparator = (1.1).toLocaleString(locale).charAt(1);
376
428
  const decimalSeparator = localeDecimalSeparator === ',' ? ',' : '.';
377
429
  const groupingSeparator = localeDecimalSeparator === ',' ? '.' : ',';
@@ -380,49 +432,38 @@ class NumberFormatService {
380
432
  this.allowedKeysSignal.set([...NumberFormatService.NUMBERS, NumberFormatService.NEGATIVE, decimalSeparator]);
381
433
  }
382
434
  format(value, options) {
383
- return NumberFormatService.valueIsSet(value)
384
- ? this.formatNumber(value.toString().replace(new RegExp('[.]', 'g'), this.decimalSeparator), options)
385
- : '';
435
+ return Number.isFinite(value) ? this.formatNumber(toDecimalString(value).replace('.', this.decimalSeparator), options) : '';
386
436
  }
387
437
  formatNumber(value, options) {
388
438
  const autofillDecimals = this.valueOrDefault(options?.autofillDecimals, NumberFormatService.DEFAULT_AUTOFILL_DECIMALS);
389
- const decimalPlaces = this.valueOrDefault(options?.decimalPlaces, NumberFormatService.DEFAULT_DECIMAL_PLACES);
439
+ const decimalPlaces = normalizeDecimalPlaces(options?.decimalPlaces);
390
440
  const finalFormatting = this.valueOrDefault(options?.finalFormatting, NumberFormatService.DEFAULT_FINAL_FORMATTING);
391
- let result = this.strip(value, { decimalPlaces, removeLeadingZeros: finalFormatting });
392
- /* add grouping separator */
393
- const decimalIndex = result.indexOf(this.decimalSeparator);
394
- const isNegative = result.startsWith(NumberFormatService.NEGATIVE);
395
- let i = decimalIndex > -1 ? decimalIndex : result.length;
396
- while (i > (isNegative ? 4 : 3)) {
397
- i -= 3;
398
- result = result.substring(0, i) + this.groupingSeparator + result.substring(i, result.length);
399
- }
400
- if (finalFormatting) {
401
- if (decimalPlaces > 0 && !!result) {
402
- /* autofill decimal places */
403
- let actualDecimalIndex = result.indexOf(this.decimalSeparator);
404
- if (autofillDecimals) {
405
- if (actualDecimalIndex === -1) {
406
- actualDecimalIndex = result.length;
407
- result += this.decimalSeparator;
408
- }
409
- result = this.addMissingLeadingZero(result, actualDecimalIndex);
410
- actualDecimalIndex = result.indexOf(this.decimalSeparator);
411
- const actualDecimalPlaces = result.length - actualDecimalIndex - 1;
412
- for (let j = 0; j < decimalPlaces - actualDecimalPlaces; j++) {
413
- result += '0';
414
- }
415
- }
416
- else {
417
- result = this.addMissingLeadingZero(result, actualDecimalIndex);
418
- }
419
- }
420
- }
421
- return result;
441
+ const stripped = this.strip(value, { decimalPlaces, removeLeadingZeros: finalFormatting });
442
+ const grouped = this.addGroupingSeparators(stripped);
443
+ return finalFormatting && decimalPlaces > 0 && grouped ? this.finalizeDecimals(grouped, decimalPlaces, autofillDecimals) : grouped;
422
444
  }
423
445
  strip(value, options) {
424
- const decimalPlaces = this.valueOrDefault(options?.decimalPlaces, NumberFormatService.DEFAULT_DECIMAL_PLACES);
446
+ const decimalPlaces = normalizeDecimalPlaces(options?.decimalPlaces);
425
447
  const removeLeadingZeros = this.valueOrDefault(options?.removeLeadingZeros, NumberFormatService.DEFAULT_REMOVE_LEADING_ZEROS);
448
+ if (/^[+-]?(?:Infinity|NaN)$/.test(value)) {
449
+ return '';
450
+ }
451
+ // Exponent input is atomic: never silently accept the mantissa of an invalid literal.
452
+ if (/^[+\-0-9.,]*[eE]/.test(value)) {
453
+ const exponentIndex = value.search(/[eE]/);
454
+ const sourceMantissa = value.slice(0, exponentIndex);
455
+ const ungrouped = this.groupingSeparator === this.decimalSeparator ? sourceMantissa : sourceMantissa.split(this.groupingSeparator).join('');
456
+ const mantissa = ungrouped.replace(this.decimalSeparator, '.');
457
+ const normalized = mantissa + value.slice(exponentIndex);
458
+ if (!/^[+-]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)[eE][+-]?[0-9]+$/.test(normalized)) {
459
+ return '';
460
+ }
461
+ const exponentValue = Number(normalized);
462
+ if (!Number.isFinite(exponentValue)) {
463
+ return '';
464
+ }
465
+ value = this.expandScientificText(normalized, decimalPlaces).replace('.', this.decimalSeparator);
466
+ }
426
467
  let result = '';
427
468
  let indexDecimalSep = -1;
428
469
  let j = -1;
@@ -468,6 +509,64 @@ class NumberFormatService {
468
509
  break;
469
510
  }
470
511
  }
512
+ // Keep a numeric zero when leading-zero removal and zero-place truncation consume its digits.
513
+ if (ignoredChars > 0 && /^-?0/.test(value) && (result === '' || result === NumberFormatService.NEGATIVE)) {
514
+ result += '0';
515
+ }
516
+ const numericValue = Number.parseFloat(result.replace(this.decimalSeparator, '.'));
517
+ return numericValue === Infinity || numericValue === -Infinity ? '' : result;
518
+ }
519
+ expandScientificText(value, decimalPlaces) {
520
+ const [mantissa, exponent] = value.toLowerCase().split('e');
521
+ const sign = mantissa.startsWith('-') ? '-' : '';
522
+ const [integer, fraction = ''] = mantissa.replace(/^[+-]/, '').split('.');
523
+ const sourceDigits = integer + fraction;
524
+ const digits = sourceDigits.replace(/^0+/, '');
525
+ if (!digits) {
526
+ return sign + '0';
527
+ }
528
+ // Keep source digits: Number(value) is only an overflow guard, never the source of rounded digits.
529
+ const decimalIndex = integer.length + Number(exponent) - (sourceDigits.length - digits.length);
530
+ if (decimalIndex <= 0) {
531
+ const zeros = Math.min(-decimalIndex, decimalPlaces);
532
+ const subunitDecimals = '0'.repeat(zeros) + digits.slice(0, decimalPlaces - zeros);
533
+ return sign + '0' + (subunitDecimals ? '.' + subunitDecimals : '');
534
+ }
535
+ // A finite nonzero IEEE-754 value has at most 309 integer digits. Bound all padding explicitly.
536
+ if (decimalIndex > 309) {
537
+ return '';
538
+ }
539
+ const whole = digits.slice(0, decimalIndex).padEnd(decimalIndex, '0');
540
+ const decimals = digits.slice(decimalIndex, decimalIndex + decimalPlaces);
541
+ return sign + whole + (decimals ? '.' + decimals : '');
542
+ }
543
+ addGroupingSeparators(value) {
544
+ let result = value;
545
+ const decimalIndex = result.indexOf(this.decimalSeparator);
546
+ const isNegative = result.startsWith(NumberFormatService.NEGATIVE);
547
+ let index = decimalIndex > -1 ? decimalIndex : result.length;
548
+ while (index > (isNegative ? 4 : 3)) {
549
+ index -= 3;
550
+ result = result.substring(0, index) + this.groupingSeparator + result.substring(index, result.length);
551
+ }
552
+ return result;
553
+ }
554
+ finalizeDecimals(value, decimalPlaces, autofillDecimals) {
555
+ let result = value;
556
+ let decimalIndex = result.indexOf(this.decimalSeparator);
557
+ if (!autofillDecimals) {
558
+ return this.addMissingLeadingZero(result, decimalIndex);
559
+ }
560
+ if (decimalIndex === -1) {
561
+ decimalIndex = result.length;
562
+ result += this.decimalSeparator;
563
+ }
564
+ result = this.addMissingLeadingZero(result, decimalIndex);
565
+ decimalIndex = result.indexOf(this.decimalSeparator);
566
+ const actualDecimalPlaces = result.length - decimalIndex - 1;
567
+ for (let index = 0; index < decimalPlaces - actualDecimalPlaces; index++) {
568
+ result += '0';
569
+ }
471
570
  return result;
472
571
  }
473
572
  addMissingLeadingZero(result, actualDecimalIndex) {
@@ -894,251 +993,709 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
894
993
  }]
895
994
  }] });
896
995
 
996
+ function mapNormalizedSelection(selection, context) {
997
+ const { rawValue, normalizedValue, formattedValue, groupingSeparator, decimalSeparator } = context;
998
+ const isExponent = /^[+\-0-9.,]+[eE][+-]?[0-9]+$/.test(rawValue) && normalizedValue !== '';
999
+ const mapPosition = (position) => {
1000
+ if (position <= 0) {
1001
+ return 0;
1002
+ }
1003
+ if (position >= rawValue.length) {
1004
+ return formattedValue.length;
1005
+ }
1006
+ if (isExponent) {
1007
+ // An exponent is one literal, not independently parseable prefixes. Spread its
1008
+ // interior boundaries monotonically across the complete expanded display.
1009
+ return Math.ceil((position / rawValue.length) * formattedValue.length);
1010
+ }
1011
+ let retained = 0;
1012
+ for (let index = 0; index < position && retained < normalizedValue.length; index++) {
1013
+ if (rawValue.charAt(index) === normalizedValue.charAt(retained)) {
1014
+ retained++;
1015
+ }
1016
+ }
1017
+ let formattedPosition = 0;
1018
+ let normalizedPosition = 0;
1019
+ while (formattedPosition < formattedValue.length && normalizedPosition < retained) {
1020
+ if (formattedValue.charAt(formattedPosition) === normalizedValue.charAt(normalizedPosition)) {
1021
+ normalizedPosition++;
1022
+ }
1023
+ formattedPosition++;
1024
+ }
1025
+ if (groupingSeparator !== decimalSeparator &&
1026
+ rawValue.charAt(position - 1) === groupingSeparator &&
1027
+ formattedValue.charAt(formattedPosition) === groupingSeparator) {
1028
+ formattedPosition++;
1029
+ }
1030
+ return formattedPosition;
1031
+ };
1032
+ const start = mapPosition(selection.start);
1033
+ const end = mapPosition(selection.end);
1034
+ return { start: Math.min(start, end), end: Math.max(start, end) };
1035
+ }
1036
+
1037
+ class NumericFieldUnitPresentation {
1038
+ constructor(inputElement, renderer, onResize) {
1039
+ this.inputElement = inputElement;
1040
+ this.renderer = renderer;
1041
+ this.onResize = onResize;
1042
+ this.options = { unit: null, unitPosition: 'right', textAlign: 'right', text: '' };
1043
+ this.layoutDirty = true;
1044
+ }
1045
+ invalidateLayout() {
1046
+ this.layoutDirty = true;
1047
+ }
1048
+ destroy() {
1049
+ this.removeUnitSpan();
1050
+ this.removeTextSpan();
1051
+ }
1052
+ render(options, label) {
1053
+ if (this.options.unit !== options.unit ||
1054
+ this.options.unitPosition !== options.unitPosition ||
1055
+ this.options.textAlign !== options.textAlign ||
1056
+ this.options.text !== options.text ||
1057
+ (!!options.unit && !this.unitSpan)) {
1058
+ this.updateUnit(options);
1059
+ }
1060
+ // Restoring natural sizing and applying measured text depend on intervening
1061
+ // DOM reads. The directive deliberately schedules the whole transaction as mixedReadWrite.
1062
+ const presentation = this.measurePresentation(label);
1063
+ const layout = this.applyPresentation(presentation);
1064
+ this.positionTrailingUnit(layout);
1065
+ }
1066
+ updateUnit(options) {
1067
+ this.options = options;
1068
+ this.layoutDirty = true;
1069
+ if (!this.options.unit) {
1070
+ this.removeUnitSpan();
1071
+ return;
1072
+ }
1073
+ if (!this.unitSpan || this.unitSpanPosition !== this.options.unitPosition) {
1074
+ this.createUnitSpan();
1075
+ }
1076
+ if (!this.unitSpan) {
1077
+ return;
1078
+ }
1079
+ if (this.options.textAlign !== 'left' || this.options.unitPosition !== 'right' || this.options.text === '') {
1080
+ this.restoreInputReservation();
1081
+ }
1082
+ this.observeUnitSize();
1083
+ this.unitSpan.textContent = this.options.unit;
1084
+ if (this.options.textAlign === 'left' && this.options.unitPosition === 'right') {
1085
+ this.unitSpan.style.display = this.options.text !== '' ? 'unset' : 'none';
1086
+ this.unitSpan.style.position = 'absolute';
1087
+ }
1088
+ else {
1089
+ this.unitSpan.style.display = '';
1090
+ this.unitSpan.style.left = '';
1091
+ this.unitSpan.style.position = '';
1092
+ }
1093
+ }
1094
+ createUnitSpan() {
1095
+ const unitContainer = this.getUnitContainer();
1096
+ if (!unitContainer) {
1097
+ return;
1098
+ }
1099
+ this.removeUnitSpan();
1100
+ this.unitSpan = this.renderer.createElement('span');
1101
+ this.unitSpanPosition = this.options.unitPosition;
1102
+ this.renderer.addClass(this.unitSpan, 'mad-numeric-field-unit');
1103
+ // Native compatibility spans; these attributes do not instantiate Material directives.
1104
+ if (this.options.unitPosition === 'left') {
1105
+ this.renderer.setAttribute(this.unitSpan, 'matPrefix', '');
1106
+ this.renderer.setAttribute(this.unitSpan, 'matTextPrefix', '');
1107
+ this.renderer.setStyle(this.unitSpan, 'padding-right', '5px');
1108
+ this.renderer.insertBefore(unitContainer, this.unitSpan, this.getUnitInsertReference(unitContainer));
1109
+ }
1110
+ else {
1111
+ this.renderer.setAttribute(this.unitSpan, 'matSuffix', '');
1112
+ this.renderer.setAttribute(this.unitSpan, 'matTextSuffix', '');
1113
+ this.renderer.setStyle(this.unitSpan, 'padding-left', '5px');
1114
+ this.renderer.appendChild(unitContainer, this.unitSpan);
1115
+ }
1116
+ }
1117
+ getUnitContainer() {
1118
+ const materialFormFieldFlex = this.inputElement.closest('.mat-mdc-form-field-flex');
1119
+ if (materialFormFieldFlex instanceof HTMLElement) {
1120
+ return materialFormFieldFlex;
1121
+ }
1122
+ return this.inputElement.parentElement;
1123
+ }
1124
+ getUnitInsertReference(unitContainer) {
1125
+ if (this.inputElement.parentElement?.parentElement === unitContainer) {
1126
+ return this.inputElement.parentElement;
1127
+ }
1128
+ if (this.inputElement.parentElement === unitContainer) {
1129
+ return this.inputElement;
1130
+ }
1131
+ return null;
1132
+ }
1133
+ measurePresentation(label) {
1134
+ if (!this.unitSpan) {
1135
+ return undefined;
1136
+ }
1137
+ // Measure the consumer's authored width, including responsive CSS, before
1138
+ // reserving space. Restoration and reapplication finish in this render, so
1139
+ // the observed border box stays unchanged and no intermediate style paints.
1140
+ if (this.layoutDirty) {
1141
+ this.restoreInputReservation();
1142
+ }
1143
+ const view = this.inputElement.ownerDocument.defaultView;
1144
+ if (!view) {
1145
+ return undefined;
1146
+ }
1147
+ const inputStyles = view.getComputedStyle(this.inputElement);
1148
+ const restingLabel = this.readRestingLabel(label);
1149
+ const refreshLayout = this.layoutDirty;
1150
+ this.layoutDirty = false;
1151
+ if (!refreshLayout || this.options.textAlign !== 'left' || this.options.unitPosition !== 'right' || !this.inputElement.parentElement) {
1152
+ return { color: inputStyles.color, label: restingLabel };
1153
+ }
1154
+ const parentStyles = view.getComputedStyle(this.inputElement.parentElement);
1155
+ const offsetParent = this.unitSpan.offsetParent;
1156
+ const inputBounds = this.inputElement.getBoundingClientRect();
1157
+ const inputOffset = offsetParent instanceof HTMLElement ? inputBounds.left - offsetParent.getBoundingClientRect().left - offsetParent.clientLeft : 0;
1158
+ return {
1159
+ color: inputStyles.color,
1160
+ label: restingLabel,
1161
+ layout: {
1162
+ text: this.options.text,
1163
+ font: inputStyles.font,
1164
+ fontSize: inputStyles.fontSize,
1165
+ letterSpacing: inputStyles.letterSpacing,
1166
+ marginTop: parentStyles.getPropertyValue('border-top-width'),
1167
+ paddingTop: parentStyles.getPropertyValue('padding-top'),
1168
+ paddingBottom: parentStyles.getPropertyValue('padding-bottom'),
1169
+ inputWidth: this.inputElement.clientWidth,
1170
+ inputOffset,
1171
+ paddingLeft: Number.parseFloat(inputStyles.paddingLeft) || 0,
1172
+ paddingRight: Number.parseFloat(inputStyles.paddingRight) || 0,
1173
+ outerWidth: inputBounds.width ||
1174
+ this.inputElement.clientWidth +
1175
+ (Number.parseFloat(inputStyles.borderLeftWidth) || 0) +
1176
+ (Number.parseFloat(inputStyles.borderRightWidth) || 0),
1177
+ borderLeft: Number.parseFloat(inputStyles.borderLeftWidth) || 0,
1178
+ unitWidth: this.unitSpan.clientWidth,
1179
+ },
1180
+ };
1181
+ }
1182
+ applyPresentation(presentation) {
1183
+ if (!presentation || !this.unitSpan) {
1184
+ return undefined;
1185
+ }
1186
+ this.writeRestingLabel(presentation.label);
1187
+ // Read the actual input color so filled/outlined themes and native disabled bindings agree.
1188
+ if (this.unitSpan.style.color !== presentation.color) {
1189
+ this.unitSpan.style.color = presentation.color;
1190
+ }
1191
+ const layout = presentation.layout;
1192
+ if (!layout) {
1193
+ return undefined;
1194
+ }
1195
+ if (layout.text !== '') {
1196
+ this.reserveInputSpace(layout);
1197
+ }
1198
+ this.unitSpan.style.marginTop = layout.marginTop;
1199
+ this.unitSpan.style.paddingTop = layout.paddingTop;
1200
+ this.unitSpan.style.paddingBottom = layout.paddingBottom;
1201
+ this.ensureTextSpan();
1202
+ if (this.textSpan) {
1203
+ this.textSpan.style.font = layout.font;
1204
+ this.textSpan.style.fontSize = layout.fontSize;
1205
+ this.textSpan.style.letterSpacing = layout.letterSpacing;
1206
+ this.textSpan.textContent = layout.text;
1207
+ }
1208
+ return layout;
1209
+ }
1210
+ positionTrailingUnit(layout) {
1211
+ if (!layout || !this.textSpan || !this.unitSpan) {
1212
+ return;
1213
+ }
1214
+ const textWidth = layout.inputWidth - layout.paddingLeft - layout.paddingRight - layout.unitWidth;
1215
+ const width = Math.min(textWidth, Math.ceil(this.textSpan.clientWidth));
1216
+ this.unitSpan.style.left = `${layout.inputOffset + layout.borderLeft + layout.paddingLeft + Math.max(width, 0)}px`;
1217
+ }
1218
+ observeUnitSize() {
1219
+ const Observer = this.inputElement.ownerDocument.defaultView?.ResizeObserver;
1220
+ if (this.resizeObserver || !Observer || !this.unitSpan) {
1221
+ return;
1222
+ }
1223
+ this.resizeObserver = new Observer(() => {
1224
+ this.layoutDirty = true;
1225
+ this.onResize();
1226
+ });
1227
+ // Padding changes the content box, not the border box. The parent also
1228
+ // detects responsive sizing while the input holds its measured outer width.
1229
+ this.resizeObserver.observe(this.inputElement, { box: 'border-box' });
1230
+ if (this.inputElement.parentElement) {
1231
+ this.resizeObserver.observe(this.inputElement.parentElement);
1232
+ }
1233
+ this.resizeObserver.observe(this.unitSpan);
1234
+ }
1235
+ reserveInputSpace(layout) {
1236
+ const style = this.inputElement.style;
1237
+ this.inputReservation ??= ['width', 'box-sizing', 'padding-right'].map((property) => this.captureStyle(style, property));
1238
+ style.setProperty('box-sizing', 'border-box');
1239
+ style.setProperty('width', `${layout.outerWidth}px`);
1240
+ // unitWidth includes the unit span's existing five-pixel leading gap.
1241
+ style.setProperty('padding-right', `${layout.paddingRight + layout.unitWidth}px`);
1242
+ // Read back CSSOM declarations so ownership compares browser-canonical values.
1243
+ for (const reservation of this.inputReservation) {
1244
+ reservation.appliedValue = style.getPropertyValue(reservation.property);
1245
+ reservation.appliedPriority = style.getPropertyPriority(reservation.property);
1246
+ }
1247
+ }
1248
+ restoreInputReservation() {
1249
+ this.restoreStyles(this.inputElement.style, this.inputReservation ?? []);
1250
+ this.inputReservation = undefined;
1251
+ }
1252
+ readRestingLabel(label) {
1253
+ const labelId = label.id;
1254
+ if (!labelId || label.floating) {
1255
+ return undefined;
1256
+ }
1257
+ const element = this.inputElement.ownerDocument.getElementById(labelId);
1258
+ if (!element) {
1259
+ return undefined;
1260
+ }
1261
+ const margin = this.labelStyles?.properties.find((property) => property.property === 'margin-left');
1262
+ const previousShift = margin && this.ownsStyle(element.style, margin) ? (this.labelStyles?.shift ?? 0) : 0;
1263
+ return {
1264
+ element,
1265
+ width: this.inputElement.clientWidth,
1266
+ shift: this.options.unitPosition === 'left'
1267
+ ? previousShift + this.inputElement.getBoundingClientRect().left - element.getBoundingClientRect().left
1268
+ : 0,
1269
+ };
1270
+ }
1271
+ writeRestingLabel(label) {
1272
+ if (this.labelStyles?.element !== label?.element) {
1273
+ this.restoreLabelStyles();
1274
+ }
1275
+ if (!label) {
1276
+ return;
1277
+ }
1278
+ if (!this.labelStyles) {
1279
+ this.labelStyles = {
1280
+ element: label.element,
1281
+ properties: [this.captureStyle(label.element.style, 'max-width')],
1282
+ shift: 0,
1283
+ };
1284
+ }
1285
+ const style = label.element.style;
1286
+ if (this.options.unitPosition === 'left' && !this.labelStyles.properties.some(({ property }) => property === 'margin-left')) {
1287
+ this.labelStyles.properties.push(this.captureStyle(style, 'margin-left'));
1288
+ }
1289
+ // Keep newer consumer declarations as the restoration baseline, including
1290
+ // priority-only changes. Right units never take ownership of margin-left.
1291
+ for (const property of this.labelStyles.properties) {
1292
+ if (!this.ownsStyle(style, property)) {
1293
+ property.value = style.getPropertyValue(property.property);
1294
+ property.priority = style.getPropertyPriority(property.property);
1295
+ }
1296
+ }
1297
+ // Material owns truncation and floating transforms. Limit only the resting
1298
+ // label to the input's available space, using its public label relationship.
1299
+ style.setProperty('max-width', `${label.width}px`);
1300
+ if (this.options.unitPosition === 'left') {
1301
+ this.labelStyles.shift = label.shift;
1302
+ const margin = this.labelStyles.properties.find(({ property }) => property === 'margin-left');
1303
+ style.setProperty('margin-left', `calc(${margin?.value || '0px'} + ${label.shift}px)`);
1304
+ }
1305
+ for (const property of this.labelStyles.properties) {
1306
+ property.appliedValue = style.getPropertyValue(property.property);
1307
+ property.appliedPriority = style.getPropertyPriority(property.property);
1308
+ }
1309
+ }
1310
+ restoreLabelStyles() {
1311
+ if (this.labelStyles) {
1312
+ this.restoreStyles(this.labelStyles.element.style, this.labelStyles.properties);
1313
+ this.labelStyles = undefined;
1314
+ }
1315
+ }
1316
+ captureStyle(style, property) {
1317
+ return {
1318
+ property,
1319
+ value: style.getPropertyValue(property),
1320
+ priority: style.getPropertyPriority(property),
1321
+ appliedValue: '',
1322
+ appliedPriority: '',
1323
+ };
1324
+ }
1325
+ ownsStyle(style, snapshot) {
1326
+ return (style.getPropertyValue(snapshot.property) === snapshot.appliedValue &&
1327
+ style.getPropertyPriority(snapshot.property) === snapshot.appliedPriority);
1328
+ }
1329
+ restoreStyles(style, snapshots) {
1330
+ for (const snapshot of snapshots) {
1331
+ if (!this.ownsStyle(style, snapshot)) {
1332
+ continue;
1333
+ }
1334
+ if (snapshot.value) {
1335
+ style.setProperty(snapshot.property, snapshot.value, snapshot.priority);
1336
+ }
1337
+ else {
1338
+ style.removeProperty(snapshot.property);
1339
+ }
1340
+ }
1341
+ }
1342
+ ensureTextSpan() {
1343
+ if (this.textSpan) {
1344
+ return;
1345
+ }
1346
+ const document = this.inputElement.ownerDocument;
1347
+ this.textSpan = document.createElement('span');
1348
+ document.body.appendChild(this.textSpan);
1349
+ this.textSpan.style.height = 'auto';
1350
+ this.textSpan.style.width = 'auto';
1351
+ this.textSpan.style.position = 'absolute';
1352
+ this.textSpan.style.top = '0';
1353
+ this.textSpan.style.whiteSpace = 'nowrap';
1354
+ this.textSpan.style.visibility = 'hidden';
1355
+ }
1356
+ removeUnitSpan() {
1357
+ this.resizeObserver?.disconnect();
1358
+ this.resizeObserver = undefined;
1359
+ this.restoreLabelStyles();
1360
+ this.restoreInputReservation();
1361
+ if (!this.unitSpan) {
1362
+ return;
1363
+ }
1364
+ this.unitSpan.remove();
1365
+ this.unitSpan = undefined;
1366
+ this.unitSpanPosition = undefined;
1367
+ }
1368
+ removeTextSpan() {
1369
+ if (!this.textSpan) {
1370
+ return;
1371
+ }
1372
+ this.textSpan.remove();
1373
+ this.textSpan = undefined;
1374
+ }
1375
+ }
1376
+
897
1377
  /*
898
1378
  * Copyright (c) 2018-2020 Porsche Informatik. All Rights Reserved.
899
1379
  * This software is released under MIT license.
900
1380
  * The full license information can be found in LICENSE in the root directory of this project.
901
1381
  */
902
- const BACK_KEYCODE = 8;
903
- const SPACE_KEYCODE = 32;
904
- const DEL_KEYCODE = 46;
905
- const CONTROL_KEYCODES_UPPER_BORDER = 46;
906
- const OTHER_CONTROL_KEYS = new Set([224, 91, 93]);
1382
+ const CONTROL_KEYS = new Set([
1383
+ 'Backspace',
1384
+ 'Delete',
1385
+ 'Tab',
1386
+ 'Escape',
1387
+ 'Enter',
1388
+ 'Home',
1389
+ 'End',
1390
+ 'ArrowLeft',
1391
+ 'ArrowRight',
1392
+ 'ArrowUp',
1393
+ 'ArrowDown',
1394
+ ]);
1395
+ const UNSET_NUMERIC_VALUE = Symbol('unset numeric value input');
907
1396
  class NumericFieldDirective {
908
- set numericValue(value) {
909
- if (this._numericValue !== value && !(isNaN(this._numericValue) && (isNaN(value) || value === null))) {
910
- this.originalValue = value;
911
- // Don't roundOrTruncate if value was set to empty otherwise input value will be set to 0 instead of empty
912
- // which happens when an input is being reset
913
- this._numericValue = value === null || value === undefined ? value : this.roundOrTruncate(value); // eslint-disable-line
914
- this.handleInputChanged();
915
- }
916
- }
917
- constructor(renderer, inputEl, numberFormatService) {
918
- this.renderer = renderer;
919
- this.inputEl = inputEl;
920
- this.numberFormatService = numberFormatService;
921
- this.textAlign = 'right';
922
- this.decimalPlaces = 2;
923
- this.roundValue = false;
924
- this.autofillDecimals = false;
925
- this.unit = null;
926
- this.unitPosition = 'right';
927
- this.numericValueChanged = new EventEmitter();
1397
+ constructor() {
1398
+ this.textAlign = input('right', /* @ts-ignore */
1399
+ ...(ngDevMode ? [{ debugName: "textAlign" }] : /* istanbul ignore next */ []));
1400
+ this.decimalPlaces = input(NumberFormatService.DEFAULT_DECIMAL_PLACES, { ...(ngDevMode ? { debugName: "decimalPlaces" } : /* istanbul ignore next */ {}), transform: normalizeDecimalPlaces });
1401
+ this.roundValue = input(false, { ...(ngDevMode ? { debugName: "roundValue" } : /* istanbul ignore next */ {}), alias: 'roundDisplayValue', transform: booleanAttribute });
1402
+ this.autofillDecimals = input(false, { ...(ngDevMode ? { debugName: "autofillDecimals" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1403
+ this.unit = input(null, /* @ts-ignore */
1404
+ ...(ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []));
1405
+ this.unitPosition = input('right', /* @ts-ignore */
1406
+ ...(ngDevMode ? [{ debugName: "unitPosition" }] : /* istanbul ignore next */ []));
1407
+ this.numericValue = input(UNSET_NUMERIC_VALUE, { ...(ngDevMode ? { debugName: "numericValue" } : /* istanbul ignore next */ {}), transform: (value) => value });
1408
+ this.numericValueChanged = output({ alias: 'numericValueChange' });
1409
+ this.changeDetectorRef = inject(ChangeDetectorRef);
1410
+ this.formField = inject(MatFormField, { optional: true });
1411
+ this.renderer = inject(Renderer2);
1412
+ this.inputEl = inject(ElementRef);
1413
+ this.numberFormatService = inject(NumberFormatService);
1414
+ this.injector = inject(Injector);
1415
+ this.unitPresentation = new NumericFieldUnitPresentation(this.inputElement, this.renderer, () => this.changeDetectorRef.markForCheck());
1416
+ this.changeFn = () => { };
1417
+ this.touchedFn = () => { };
928
1418
  this.displayValue = '';
929
- this.originalValue = NaN;
930
- /* Control Values Accessor Stuff below */
931
- // eslint-disable-next-line
932
- this.onChange = () => { };
933
- // eslint-disable-next-line
934
- this.onTouched = () => { };
1419
+ this.matInput = null;
1420
+ this.formatOptionsInitialized = false;
1421
+ this.numericValueEffect = effect(() => {
1422
+ const value = this.numericValue();
1423
+ // A two-way binding echo must preserve unfinished text and the user's caret.
1424
+ if (value !== UNSET_NUMERIC_VALUE && !Object.is(value, this.acceptedValue)) {
1425
+ untracked(() => this.applyExternalValue(value));
1426
+ }
1427
+ }, /* @ts-ignore */
1428
+ ...(ngDevMode ? [{ debugName: "numericValueEffect" }] : /* istanbul ignore next */ []));
1429
+ this.formatOptionsEffect = effect(() => {
1430
+ this.decimalPlaces();
1431
+ this.autofillDecimals();
1432
+ this.roundValue();
1433
+ this.numberFormatService.decimalSeparator;
1434
+ this.numberFormatService.groupingSeparator;
1435
+ this.numberFormatService.allowedKeys;
1436
+ if (this.formatOptionsInitialized) {
1437
+ untracked(() => this.renderCurrentValue());
1438
+ }
1439
+ else {
1440
+ this.formatOptionsInitialized = true;
1441
+ }
1442
+ }, /* @ts-ignore */
1443
+ ...(ngDevMode ? [{ debugName: "formatOptionsEffect" }] : /* istanbul ignore next */ []));
1444
+ // Unit layout restores consumer styles before measuring and then measures its
1445
+ // updated text. Keep that dependent transaction in one render, without delaying CVA.
1446
+ this.unitRendering = afterEveryRender({
1447
+ mixedReadWrite: () => this.unitPresentation.render({
1448
+ unit: this.unit(),
1449
+ unitPosition: this.unitPosition(),
1450
+ textAlign: this.textAlign(),
1451
+ text: this.displayValue,
1452
+ }, {
1453
+ id: this.formField?.getLabelId(),
1454
+ floating: this.formField?.floatLabel === 'always' || !!this.matInput?.shouldLabelFloat,
1455
+ }),
1456
+ });
1457
+ }
1458
+ get inputElement() {
1459
+ return this.inputEl.nativeElement;
935
1460
  }
936
1461
  registerOnChange(fn) {
937
- this.onChange = fn;
1462
+ this.changeFn = fn;
938
1463
  }
939
1464
  registerOnTouched(fn) {
940
- this.onTouched = fn;
1465
+ this.touchedFn = fn;
941
1466
  }
942
- setDisabledState() {
943
- // Dont need to implement since its just a directive
1467
+ setDisabledState(isDisabled) {
1468
+ this.renderer.setProperty(this.inputElement, 'disabled', isDisabled);
944
1469
  }
945
1470
  writeValue(value) {
946
- this.numericValue = value;
1471
+ untracked(() => this.applyExternalValue(value));
947
1472
  }
948
- ngOnInit() {
949
- /* needs to be parsed as number explicitly as it comes as string from user input */
950
- this.decimalPlaces = parseInt(this.decimalPlaces.toString(), 10);
951
- this.inputChangeListener = this.renderer.listen(this.inputEl.nativeElement, 'blur', (event) => {
952
- this.formatInput(event.target, true);
953
- });
954
- this.keyupListener = this.renderer.listen(this.inputEl.nativeElement, 'keyup', (event) => {
955
- if (event.keyCode === BACK_KEYCODE || (event.keyCode >= CONTROL_KEYCODES_UPPER_BORDER && !OTHER_CONTROL_KEYS.has(event.keyCode))) {
956
- this.formatInput(event.target, false);
957
- }
958
- });
959
- this.keydownListener = this.renderer.listen(this.inputEl.nativeElement, 'keydown', (event) => {
960
- const value = event.target.value;
961
- if (this.numberFormatService.allowedKeys.includes(event.key) ||
962
- (event.keyCode <= CONTROL_KEYCODES_UPPER_BORDER && event.keyCode > 0 && event.keyCode !== SPACE_KEYCODE) ||
963
- event.metaKey ||
964
- event.ctrlKey ||
965
- event.altKey) {
966
- /* allow negative sign only as first character and none exists outside of text selection */
967
- const indexNegativeSign = value.indexOf(NumberFormatService.NEGATIVE);
968
- if (event.key === NumberFormatService.NEGATIVE &&
969
- (event.target.selectionStart > 0 || indexNegativeSign > -1) &&
970
- (event.target.selectionStart === event.target.selectionEnd ||
971
- !(indexNegativeSign >= event.target.selectionStart && indexNegativeSign <= event.target.selectionEnd))) {
972
- return false;
973
- }
974
- /* no duplicate decimal separators */
975
- const indexDecimalSep = value.indexOf(this.numberFormatService.decimalSeparator);
976
- if (event.key === this.numberFormatService.decimalSeparator &&
977
- (indexDecimalSep > -1 || this.decimalPlaces === 0) &&
978
- (event.target.selectionStart === event.target.selectionEnd ||
979
- !(indexDecimalSep >= event.target.selectionStart && indexDecimalSep <= event.target.selectionEnd))) {
980
- return false;
981
- }
982
- /* prevent too many decimal places */
983
- if (NumberFormatService.NUMBERS.includes(event.key) &&
984
- indexDecimalSep > -1 &&
985
- indexDecimalSep < event.target.selectionStart &&
986
- event.target.selectionStart === event.target.selectionEnd &&
987
- value.length > indexDecimalSep + this.decimalPlaces) {
988
- return false;
989
- }
990
- /* when deleting thousand separator, remove the digit before or after it */
991
- const cursorStart = event.target.selectionStart;
992
- if (cursorStart === event.target.selectionEnd) {
993
- if (event.keyCode === BACK_KEYCODE && value.substr(cursorStart - 1, 1) === this.numberFormatService.groupingSeparator) {
994
- event.target.value = value.substring(0, cursorStart - 2) + value.substring(cursorStart - 1, value.length);
995
- event.target.selectionStart = event.target.selectionEnd = cursorStart - 1;
996
- return false;
997
- }
998
- else if (event.keyCode === DEL_KEYCODE && value.substr(cursorStart, 1) === this.numberFormatService.groupingSeparator) {
999
- event.target.value = value.substring(0, cursorStart + 1) + value.substring(cursorStart + 2, value.length);
1000
- event.target.selectionStart = event.target.selectionEnd = cursorStart + 1;
1001
- return false;
1002
- }
1003
- }
1004
- this.originalValue = NaN;
1005
- }
1006
- else {
1007
- return false;
1008
- }
1009
- return true;
1010
- });
1473
+ ngAfterViewInit() {
1474
+ // Resolve after construction: MatInput also participates in forms injection.
1475
+ this.matInput = this.injector.get(MatInput, null, { self: true, optional: true });
1476
+ this.notifyMatInputStateChanged();
1011
1477
  }
1012
1478
  ngOnDestroy() {
1013
- this.detachListener();
1479
+ this.unitPresentation.destroy();
1014
1480
  }
1015
- ngAfterViewChecked() {
1016
- // Only needed to create the unitSpan or refresh the unit
1017
- if (!this.unitSpan || this.unitSpan.textContent !== this.unit) {
1018
- this.injectUnitSymbol();
1481
+ handleChangeEvent() {
1482
+ if (!this.inputElement.readOnly && !this.inputElement.disabled) {
1483
+ this.changeFn(this.getValueForFormControl());
1019
1484
  }
1020
1485
  }
1021
- handleInputChanged() {
1022
- // Call in set timeout to avoid Expression has changed after it has been checked error.
1023
- // Sometimes the value changes because we cut off decimal places
1024
- setTimeout(() => {
1025
- this.updateInput(this.numberFormatService.format(this._numericValue, {
1026
- decimalPlaces: this.decimalPlaces,
1027
- finalFormatting: true,
1028
- autofillDecimals: this.autofillDecimals,
1029
- }));
1030
- }, 1);
1486
+ handleInputEvent() {
1487
+ this.handleChangeEvent();
1488
+ }
1489
+ handleBlurEvent() {
1490
+ if (this.inputElement.disabled) {
1491
+ return;
1492
+ }
1493
+ this.formatInput(this.inputElement, true);
1494
+ this.touchedFn();
1495
+ }
1496
+ handleKeyDown(event) {
1497
+ const element = this.getEventInput(event);
1498
+ const value = element.value;
1499
+ if (element.readOnly || element.disabled) {
1500
+ return true;
1501
+ }
1502
+ if (event.metaKey || event.ctrlKey || event.altKey || CONTROL_KEYS.has(event.key)) {
1503
+ return this.handleControlKeyDown(event, element, value);
1504
+ }
1505
+ if (!this.numberFormatService.allowedKeys.includes(event.key)) {
1506
+ return this.preventDefault(event);
1507
+ }
1508
+ if (!this.isValidNegativeSign(event, element, value)) {
1509
+ return this.preventDefault(event);
1510
+ }
1511
+ if (!this.isValidDecimalSeparator(event, element, value)) {
1512
+ return this.preventDefault(event);
1513
+ }
1514
+ if (!this.isValidDecimalPlace(event, element, value)) {
1515
+ return this.preventDefault(event);
1516
+ }
1517
+ return true;
1518
+ }
1519
+ handleKeyUp(event) {
1520
+ if (event.metaKey || event.ctrlKey || event.altKey) {
1521
+ return;
1522
+ }
1523
+ if (event.key === 'Backspace' || event.key === 'Delete' || this.numberFormatService.allowedKeys.includes(event.key)) {
1524
+ this.formatInput(this.getEventInput(event), false);
1525
+ }
1031
1526
  }
1032
1527
  formatInput(element, finalFormatting) {
1033
- const cursorPos = element.selectionStart;
1034
- const length = element.value.length;
1035
- const setCursor = this.displayValue !== element.value;
1036
- const textFormatted = this.numberFormatService.formatNumber(element.value, {
1037
- decimalPlaces: this.decimalPlaces,
1528
+ if (element.readOnly || element.disabled) {
1529
+ return;
1530
+ }
1531
+ const acceptValue = this.formatInputValue(element, finalFormatting, this.displayValue !== element.value);
1532
+ if (acceptValue) {
1533
+ this.changeFn(this.acceptedFormValue());
1534
+ }
1535
+ }
1536
+ updateInput(value) {
1537
+ this.writeDisplayValue(value);
1538
+ this.updateNumericValue(value);
1539
+ }
1540
+ getValueForFormControl() {
1541
+ this.formatInputValue(this.inputElement, false, true);
1542
+ return this.acceptedFormValue();
1543
+ }
1544
+ acceptedFormValue() {
1545
+ return typeof this.acceptedValue === 'number' && Number.isFinite(this.acceptedValue) ? this.acceptedValue : undefined;
1546
+ }
1547
+ formatInputValue(element, finalFormatting, acceptValue) {
1548
+ const rawValue = element.value;
1549
+ const { start, end } = this.getSelection(element);
1550
+ const direction = element.selectionDirection;
1551
+ const textFormatted = this.numberFormatService.formatNumber(rawValue, {
1552
+ decimalPlaces: this.decimalPlaces(),
1038
1553
  finalFormatting,
1039
- autofillDecimals: this.autofillDecimals,
1554
+ autofillDecimals: this.autofillDecimals(),
1040
1555
  });
1041
- // special handling to move unit symbol along with display value
1042
- if (this.textAlign === 'left' && this.unitPosition === 'right') {
1043
- const inputStyles = window.getComputedStyle(this.inputEl.nativeElement.parentElement, null);
1044
- this.unitSpan.style.position = 'absolute';
1045
- this.unitSpan.style.marginTop = inputStyles.getPropertyValue('border-top-width');
1046
- this.unitSpan.style.paddingTop = inputStyles.getPropertyValue('padding-top');
1047
- this.unitSpan.style.paddingBottom = inputStyles.getPropertyValue('padding-bottom');
1048
- if (!this.textSpan) {
1049
- this.textSpan = document.createElement('span');
1050
- document.body.appendChild(this.textSpan);
1051
- this.textSpan.style.font = inputStyles.getPropertyValue('font');
1052
- this.textSpan.style.fontSize = inputStyles.getPropertyValue('font-size');
1053
- this.textSpan.style.height = 'auto';
1054
- this.textSpan.style.width = 'auto';
1055
- this.textSpan.style.position = 'absolute';
1056
- this.textSpan.style.top = '0';
1057
- this.textSpan.style.whiteSpace = 'no-wrap';
1058
- this.textSpan.style.visibility = 'hidden';
1059
- }
1060
- this.textSpan.innerHTML = textFormatted;
1061
- const width = Math.min(this.inputEl.nativeElement.clientWidth - this.unitSpan.clientWidth, Math.ceil(this.textSpan.clientWidth));
1062
- this.unitSpan.style.left = width + 'px';
1556
+ // Final formatting can resolve an accepted invalid partial edit (e.g. ".")
1557
+ // to zero. Presentation-only changes to finite external values stay silent.
1558
+ const resolvesPartialEdit = finalFormatting &&
1559
+ Number.isNaN(this.acceptedValue) &&
1560
+ rawValue !== '' &&
1561
+ !Number.isFinite(this.parseNumericValue(rawValue)) &&
1562
+ Number.isFinite(this.parseNumericValue(textFormatted));
1563
+ const acceptsEdit = acceptValue || resolvesPartialEdit;
1564
+ if (acceptsEdit) {
1565
+ this.updateInput(textFormatted);
1566
+ }
1567
+ else {
1568
+ this.writeDisplayValue(textFormatted);
1063
1569
  }
1064
- this.updateInput(textFormatted);
1065
- if (setCursor) {
1066
- element.selectionStart = element.selectionEnd = Math.max(cursorPos + element.value.length - length, 0);
1570
+ if (rawValue !== textFormatted) {
1571
+ const mapped = mapNormalizedSelection({ start, end }, {
1572
+ rawValue,
1573
+ normalizedValue: this.numberFormatService.strip(rawValue, {
1574
+ decimalPlaces: this.decimalPlaces(),
1575
+ removeLeadingZeros: finalFormatting,
1576
+ }),
1577
+ formattedValue: textFormatted,
1578
+ groupingSeparator: this.numberFormatService.groupingSeparator,
1579
+ decimalSeparator: this.numberFormatService.decimalSeparator,
1580
+ });
1581
+ element.setSelectionRange(mapped.start, mapped.end, direction);
1067
1582
  }
1583
+ return acceptsEdit;
1068
1584
  }
1069
- updateInput(value) {
1585
+ writeDisplayValue(value) {
1070
1586
  this.displayValue = value;
1071
- this.inputEl.nativeElement.value = value;
1072
- this._numericValue = parseFloat(this.numberFormatService.strip(value, { decimalPlaces: this.decimalPlaces }).replace(this.numberFormatService.decimalSeparator, '.'));
1073
- if (this._numericValue !== this.roundOrTruncate(this.originalValue)) {
1074
- this.originalValue = this._numericValue;
1075
- this.numericValueChanged.emit(this._numericValue);
1076
- }
1587
+ this.unitPresentation.invalidateLayout();
1588
+ if (this.inputElement.value !== value) {
1589
+ this.inputElement.value = value;
1590
+ }
1591
+ this.notifyMatInputStateChanged();
1592
+ this.changeDetectorRef.markForCheck();
1593
+ }
1594
+ updateNumericValue(value) {
1595
+ const previousValue = this.acceptedValue;
1596
+ const parsedValue = this.parseNumericValue(value);
1597
+ this.acceptedValue = parsedValue;
1598
+ if (parsedValue !== previousValue) {
1599
+ this.numericValueChanged.emit(parsedValue);
1600
+ }
1601
+ }
1602
+ renderCurrentValue() {
1603
+ const value = this.acceptedValue;
1604
+ const displayNumber = typeof value === 'number' && Number.isFinite(value)
1605
+ ? roundOrTruncateNumber(value, this.decimalPlaces(), this.roundValue())
1606
+ : undefined;
1607
+ this.writeDisplayValue(this.numberFormatService.format(displayNumber, {
1608
+ decimalPlaces: this.decimalPlaces(),
1609
+ finalFormatting: true,
1610
+ autofillDecimals: this.autofillDecimals(),
1611
+ }));
1077
1612
  }
1078
- getValueForFormControl() {
1079
- this.formatInput(this.inputEl.nativeElement, false);
1080
- if (isNaN(this._numericValue)) {
1081
- // Return undefined instead of NaN to support the default required validator.
1082
- return undefined; // eslint-disable-line
1083
- }
1084
- return this._numericValue;
1085
- }
1086
- injectUnitSymbol() {
1087
- // Need to inject the unit symbol when the input element width is set to its actual value,
1088
- // otherwise the icon wont show in the correct position
1089
- if (!!this.unit && !this.unitSpan && this.inputEl.nativeElement.offsetWidth !== 0) {
1090
- // Get the input wrapper and apply necessary styles
1091
- const inputWrapper = this.inputEl.nativeElement.parentNode.parentNode;
1092
- // Create the span with unit symbol and apply necessary styles
1093
- this.unitSpan = this.renderer.createElement('span');
1094
- if (this.unitPosition === 'left') {
1095
- this.renderer.setAttribute(this.unitSpan, 'matPrefix', '');
1096
- this.renderer.setStyle(this.unitSpan, 'padding-right', '5px');
1097
- this.renderer.insertBefore(inputWrapper, this.unitSpan, inputWrapper.children[0]);
1098
- }
1099
- else {
1100
- this.renderer.setAttribute(this.unitSpan, 'matSuffix', '');
1101
- this.renderer.setStyle(this.unitSpan, 'padding-left', '5px');
1102
- this.renderer.appendChild(inputWrapper, this.unitSpan);
1103
- }
1613
+ applyExternalValue(value) {
1614
+ this.acceptedValue = value;
1615
+ this.renderCurrentValue();
1616
+ }
1617
+ handleControlKeyDown(event, element, value) {
1618
+ if (event.key !== 'Backspace' && event.key !== 'Delete') {
1619
+ return true;
1104
1620
  }
1105
- // do not display unit symbol if the unit should move along display value
1106
- if (!!this.unitSpan && this.textAlign === 'left' && this.unitPosition === 'right') {
1107
- if (NumberFormatService.valueIsSet(this.displayValue)) {
1108
- this.unitSpan.style.display = 'unset';
1109
- }
1110
- else {
1111
- this.unitSpan.style.display = 'none';
1112
- }
1621
+ const { start: cursorStart, end: cursorEnd } = this.getSelection(element);
1622
+ if (cursorStart !== cursorEnd) {
1623
+ return true;
1113
1624
  }
1114
- // always reset unit symbol
1115
- if (!!this.unitSpan) {
1116
- this.unitSpan.textContent = this.unit;
1625
+ if (event.key === 'Backspace' && value.charAt(cursorStart - 1) === this.numberFormatService.groupingSeparator) {
1626
+ element.value = value.substring(0, Math.max(cursorStart - 2, 0)) + value.substring(cursorStart - 1, value.length);
1627
+ this.updateInput(element.value);
1628
+ this.changeFn(this.acceptedFormValue());
1629
+ this.setCursorPosition(element, Math.max(cursorStart - 1, 0));
1630
+ return this.preventDefault(event);
1117
1631
  }
1632
+ if (event.key === 'Delete' && value.charAt(cursorStart) === this.numberFormatService.groupingSeparator) {
1633
+ element.value = value.substring(0, cursorStart + 1) + value.substring(cursorStart + 2, value.length);
1634
+ this.updateInput(element.value);
1635
+ this.changeFn(this.acceptedFormValue());
1636
+ this.setCursorPosition(element, cursorStart + 1);
1637
+ return this.preventDefault(event);
1638
+ }
1639
+ return true;
1118
1640
  }
1119
- detachListener() {
1120
- if (this.inputChangeListener) {
1121
- this.inputChangeListener();
1122
- delete this.inputChangeListener;
1641
+ isValidNegativeSign(event, element, value) {
1642
+ if (event.key !== NumberFormatService.NEGATIVE) {
1643
+ return true;
1123
1644
  }
1124
- if (this.keydownListener) {
1125
- this.keydownListener();
1126
- delete this.keydownListener;
1645
+ const { start: selectionStart, end: selectionEnd } = this.getSelection(element);
1646
+ const indexNegativeSign = value.indexOf(NumberFormatService.NEGATIVE);
1647
+ return (selectionStart === 0 &&
1648
+ (indexNegativeSign === -1 ||
1649
+ (selectionStart !== selectionEnd && indexNegativeSign >= selectionStart && indexNegativeSign < selectionEnd)));
1650
+ }
1651
+ isValidDecimalSeparator(event, element, value) {
1652
+ if (event.key !== this.numberFormatService.decimalSeparator) {
1653
+ return true;
1127
1654
  }
1128
- if (this.keyupListener) {
1129
- this.keyupListener();
1130
- delete this.keyupListener;
1655
+ const { start: selectionStart, end: selectionEnd } = this.getSelection(element);
1656
+ const indexDecimalSep = value.indexOf(this.numberFormatService.decimalSeparator);
1657
+ if (this.decimalPlaces() === 0) {
1658
+ return false;
1131
1659
  }
1660
+ return (indexDecimalSep === -1 ||
1661
+ (this.decimalPlaces() > 0 && selectionStart !== selectionEnd && indexDecimalSep >= selectionStart && indexDecimalSep < selectionEnd));
1132
1662
  }
1133
- roundOrTruncate(value) {
1134
- if (this.roundValue) {
1135
- return Math.round(value * Math.pow(10, this.decimalPlaces)) / Math.pow(10, this.decimalPlaces);
1663
+ isValidDecimalPlace(event, element, value) {
1664
+ if (!NumberFormatService.NUMBERS.includes(event.key)) {
1665
+ return true;
1136
1666
  }
1137
- const method = value < 0 ? 'ceil' : 'floor';
1138
- return Math[method](+(value * Math.pow(10, this.decimalPlaces)).toFixed(this.decimalPlaces)) / Math.pow(10, this.decimalPlaces);
1667
+ const { start: selectionStart, end: selectionEnd } = this.getSelection(element);
1668
+ const indexDecimalSep = value.indexOf(this.numberFormatService.decimalSeparator);
1669
+ return (indexDecimalSep === -1 ||
1670
+ indexDecimalSep >= selectionStart ||
1671
+ selectionStart !== selectionEnd ||
1672
+ value.length <= indexDecimalSep + this.decimalPlaces());
1673
+ }
1674
+ getSelection(element) {
1675
+ const start = element.selectionStart ?? 0;
1676
+ return { start, end: element.selectionEnd ?? start };
1677
+ }
1678
+ getEventInput(event) {
1679
+ return event.target instanceof HTMLInputElement ? event.target : this.inputElement;
1680
+ }
1681
+ preventDefault(event) {
1682
+ event.preventDefault();
1683
+ return false;
1684
+ }
1685
+ notifyMatInputStateChanged() {
1686
+ this.matInput?.stateChanges.next();
1687
+ }
1688
+ parseNumericValue(value) {
1689
+ const parsedValue = Number.parseFloat(this.numberFormatService
1690
+ .strip(value, { decimalPlaces: this.decimalPlaces() })
1691
+ .replace(this.numberFormatService.decimalSeparator, '.'));
1692
+ return Number.isFinite(parsedValue) ? parsedValue : NaN;
1139
1693
  }
1140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NumericFieldDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: NumberFormatService }], target: i0.ɵɵFactoryTarget.Directive }); }
1141
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: NumericFieldDirective, isStandalone: true, selector: "[madNumericField]", inputs: { textAlign: "textAlign", decimalPlaces: "decimalPlaces", roundValue: ["roundDisplayValue", "roundValue"], autofillDecimals: "autofillDecimals", unit: "unit", unitPosition: "unitPosition", numericValue: "numericValue" }, outputs: { numericValueChanged: "numericValueChange" }, host: { listeners: { "change": "onChange(getValueForFormControl())", "input": "onChange(getValueForFormControl())", "blur": "onTouched()" }, properties: { "class.text-right": "textAlign === \"right\"" } }, providers: [
1694
+ setCursorPosition(element, position) {
1695
+ element.setSelectionRange(position, position);
1696
+ }
1697
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NumericFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1698
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: NumericFieldDirective, isStandalone: true, selector: "[madNumericField]", inputs: { textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null }, decimalPlaces: { classPropertyName: "decimalPlaces", publicName: "decimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, roundValue: { classPropertyName: "roundValue", publicName: "roundDisplayValue", isSignal: true, isRequired: false, transformFunction: null }, autofillDecimals: { classPropertyName: "autofillDecimals", publicName: "autofillDecimals", 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 }, numericValue: { classPropertyName: "numericValue", publicName: "numericValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { numericValueChanged: "numericValueChange" }, host: { listeners: { "change": "handleChangeEvent()", "input": "handleInputEvent()", "blur": "handleBlurEvent()", "keydown": "handleKeyDown($event)", "keyup": "handleKeyUp($event)" }, properties: { "class.text-right": "textAlign() === \"right\"" } }, providers: [
1142
1699
  {
1143
1700
  provide: NG_VALUE_ACCESSOR,
1144
1701
  useExisting: forwardRef(() => NumericFieldDirective),
@@ -1151,10 +1708,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
1151
1708
  args: [{
1152
1709
  selector: '[madNumericField]',
1153
1710
  host: {
1154
- '[class.text-right]': 'textAlign === "right"',
1155
- '(change)': 'onChange(getValueForFormControl())',
1156
- '(input)': 'onChange(getValueForFormControl())',
1157
- '(blur)': 'onTouched()',
1711
+ '[class.text-right]': 'textAlign() === "right"',
1712
+ '(change)': 'handleChangeEvent()',
1713
+ '(input)': 'handleInputEvent()',
1714
+ '(blur)': 'handleBlurEvent()',
1715
+ '(keydown)': 'handleKeyDown($event)',
1716
+ '(keyup)': 'handleKeyUp($event)',
1158
1717
  },
1159
1718
  providers: [
1160
1719
  {
@@ -1163,33 +1722,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
1163
1722
  multi: true,
1164
1723
  },
1165
1724
  ],
1166
- standalone: true,
1167
1725
  }]
1168
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: NumberFormatService }], propDecorators: { textAlign: [{
1169
- type: Input,
1170
- args: ['textAlign']
1171
- }], decimalPlaces: [{
1172
- type: Input,
1173
- args: ['decimalPlaces']
1174
- }], roundValue: [{
1175
- type: Input,
1176
- args: ['roundDisplayValue']
1177
- }], autofillDecimals: [{
1178
- type: Input,
1179
- args: ['autofillDecimals']
1180
- }], unit: [{
1181
- type: Input,
1182
- args: ['unit']
1183
- }], unitPosition: [{
1184
- type: Input,
1185
- args: ['unitPosition']
1186
- }], numericValueChanged: [{
1187
- type: Output,
1188
- args: ['numericValueChange']
1189
- }], numericValue: [{
1190
- type: Input,
1191
- args: ['numericValue']
1192
- }] } });
1726
+ }], propDecorators: { textAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "textAlign", required: false }] }], decimalPlaces: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalPlaces", required: false }] }], roundValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundDisplayValue", required: false }] }], autofillDecimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofillDecimals", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], unitPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "unitPosition", required: false }] }], numericValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "numericValue", required: false }] }], numericValueChanged: [{ type: i0.Output, args: ["numericValueChange"] }] } });
1193
1727
 
1194
1728
  class NumericFieldModule {
1195
1729
  static forRoot() {
@@ -1629,7 +2163,7 @@ class DataTableColumnsModalComponent {
1629
2163
  this.filteredAvailableColumns = [...this.availableColumns];
1630
2164
  }
1631
2165
  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 }); }
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" }] }); }
2166
+ 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: "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: TranslatePipe, name: "translate" }] }); }
1633
2167
  }
1634
2168
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableColumnsModalComponent, decorators: [{
1635
2169
  type: Component,
@@ -1641,7 +2175,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
1641
2175
  MatIconModule,
1642
2176
  FormsModule,
1643
2177
  ButtonModule,
1644
- TranslateModule,
2178
+ TranslatePipe,
1645
2179
  MatDialogTitle,
1646
2180
  MatDialogContent,
1647
2181
  MatDialogActions,
@@ -1980,11 +2514,11 @@ class DataTableFilterDialogComponent {
1980
2514
  this.control.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => this.filterChanged.emit(value));
1981
2515
  }
1982
2516
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableFilterDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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 }); }
2517
+ 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: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1984
2518
  }
1985
2519
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableFilterDialogComponent, decorators: [{
1986
2520
  type: Component,
1987
- args: [{ selector: 'mad-data-table-filter-dialog', imports: [MatFormFieldModule, MatInputModule, MatSelectModule, FormsModule, ReactiveFormsModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
2521
+ args: [{ selector: 'mad-data-table-filter-dialog', imports: [MatFormFieldModule, MatInputModule, MatSelectModule, FormsModule, ReactiveFormsModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
1988
2522
  }], ctorParameters: () => [], propDecorators: { filterOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterOptions", required: false }] }], filterValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterValue", required: false }] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }] } });
1989
2523
 
1990
2524
  class FilterComponent {
@@ -2982,7 +3516,7 @@ class DataTableComponent {
2982
3516
  return this.filter()?.getActiveFilterCount() === 0;
2983
3517
  }
2984
3518
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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" }] }); }
3519
+ 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}.datatable table .mdc-data-table__row:has(+.mad-data-table-expandable-row:last-child)>.mat-mdc-cell{border-bottom:none}.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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$3.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: 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: TranslatePipe, name: "translate" }] }); }
2986
3520
  }
2987
3521
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DataTableComponent, decorators: [{
2988
3522
  type: Component,
@@ -2998,7 +3532,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
2998
3532
  MatTableModule,
2999
3533
  MatProgressSpinnerModule,
3000
3534
  ButtonModule,
3001
- TranslateModule,
3535
+ TranslatePipe,
3002
3536
  MatCheckboxModule,
3003
3537
  MatRadioModule,
3004
3538
  MatBadgeModule,
@@ -3007,7 +3541,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
3007
3541
  DataTableFilterHeader,
3008
3542
  DataTableFilter,
3009
3543
  MatTooltip,
3010
- ], providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar flex justify-between items-baseline\">\n <!-- Table actions: displayed before the table -->\n @if (tableActionsState().length || (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction())) {\n <div>\n @for (actionGroup of tableActionsState(); track actionGroup) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n @for (tableAction of actionGroup; track $index) {\n <mad-outline-button [hidden]=\"isHidden(tableAction)\" [disabled]=\"isDisabled(tableAction)\" (click)=\"onActionEvent(tableAction)\">\n {{ translateLabels() ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n }\n </mad-button-group>\n }\n @if (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction()) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n <button\n matIconButton\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [attr.aria-label]=\"'common.filter.delete.tooltip' | translate\"\n matBadgeColor=\"warn\"\n [matBadge]=\"getFilterBadgeContent()\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary align-middle\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\"> filter_alt_off </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterModeState() === 'TABLE_BASED') {\n <mat-form-field data-cy=\"filter-input\">\n <mat-label>{{ translateLabels() ? (filterLabel() | translate) : filterLabel() }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder() }}\" />\n </mat-form-field>\n }\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActionsState(); track rowAction) {\n @if (!isHidden(rowAction)) {\n <button\n data-cy=\"row-action-menu-button\"\n mat-menu-item\n class=\"row-action\"\n (click)=\"onRowEvent($event, element, rowAction)\"\n [disabled]=\"isDisabled(rowAction)\"\n >\n {{ translateLabels() ? (rowAction.label | translate) : rowAction.label }}\n </button>\n }\n }\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of editableColumnDefinitionsState(); track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onColumnSettings(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels() ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of viewableColumnDefinitionsState(); track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onViewDefinition(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels() ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table -->\n@if (filterModeState() === 'COLUMN_BASED' || showEmptyTable() || !!dataSource.filteredData?.length) {\n <div class=\"datatable overflow-auto flex-auto h-full relative w-full\" [class]=\"tableClass()\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n <table\n [id]=\"id()\"\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"onSortingEvent($event)\"\n madFilter\n (madFilterChange)=\"onColumnBasedFilterEvent($event)\"\n [multiTemplateDataRows]=\"!!expandableDef()\"\n >\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: master checkbox -->\n @if (selectionEmitModeState() !== 'NONE' && selectionModeState() === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container mx-2\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: row checkbox -->\n @if (showCheckbox(element)) {\n <div class=\"mad-datatable-checkbox-container mx-2\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE: row action menu icon -->\n @if (showRowActionIcon(element) && hasVisibleRowActions(element)) {\n <mad-icon-button\n data-cy=\"row-action-button\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n (click)=\"onSelectionEvent(element.rowId)\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n }\n <!-- SINGLE: row radio button -->\n @if (showRadioButton(element)) {\n <div class=\"mad-datatable-checkbox-container mx-2\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-radio-button>\n </div>\n }\n <!-- EXPANDABLE: row is expandable/collapsable -->\n @if (showExpandableButton(element)) {\n <mad-icon-button (click)=\"onExpand($event, element)\">\n @if (expandedElement !== element) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n </mad-icon-button>\n }\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n @for (column of columnsState(); track column.id) {\n <ng-container [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n @switch (getDataTableHeaderType(column)) {\n @case ('SORT') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n >\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('SORT_AND_FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n @default {\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n }\n\n <!-- data cell to be injected -->\n <td\n mat-cell\n *matCellDef=\"let element\"\n [class.text-right]=\"column.isRightAligned\"\n [class.mad-dt-child-cell]=\"element.parentId\"\n (click)=\"!disableRowClick() && onRowEvent($event, element)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n getCustomCellTemplate(column.id) || defaultCellTemplate;\n context: { column: column, element: element, $implicit: element }\n \"\n ></ng-container>\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n <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"] }]
3544
+ ], providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], template: "<div data-cy=\"table-action-bar\" class=\"mad-datatable-action-bar flex justify-between items-baseline\">\n <!-- Table actions: displayed before the table -->\n @if (tableActionsState().length || (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction())) {\n <div>\n @for (actionGroup of tableActionsState(); track actionGroup) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n @for (tableAction of actionGroup; track $index) {\n <mad-outline-button [hidden]=\"isHidden(tableAction)\" [disabled]=\"isDisabled(tableAction)\" (click)=\"onActionEvent(tableAction)\">\n {{ translateLabels() ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n }\n </mad-button-group>\n }\n @if (filterModeState() === 'COLUMN_BASED' && showDeleteFilterAction()) {\n <mad-button-group class=\"table-action-group inline-flex align-middle mr-[0.5em] mb-[0.5em] mt-[0.5em]\">\n <button\n matIconButton\n [matTooltip]=\"'common.filter.delete.tooltip' | translate\"\n [attr.aria-label]=\"'common.filter.delete.tooltip' | translate\"\n matBadgeColor=\"warn\"\n [matBadge]=\"getFilterBadgeContent()\"\n [disabled]=\"disableDeleteFilterButton()\"\n class=\"delete-filter-action mat-primary align-middle\"\n (click)=\"onDeleteFilter()\"\n >\n <mat-icon fontSet=\"material-icons-outlined\" aria-hidden=\"true\"> filter_alt_off </mat-icon>\n </button>\n </mad-button-group>\n }\n </div>\n }\n @if (filterModeState() === 'TABLE_BASED') {\n <mat-form-field data-cy=\"filter-input\">\n <mat-label>{{ translateLabels() ? (filterLabel() | translate) : filterLabel() }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder() }}\" />\n </mat-form-field>\n }\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n @for (rowAction of rowActionsState(); track rowAction) {\n @if (!isHidden(rowAction)) {\n <button\n data-cy=\"row-action-menu-button\"\n mat-menu-item\n class=\"row-action\"\n (click)=\"onRowEvent($event, element, rowAction)\"\n [disabled]=\"isDisabled(rowAction)\"\n >\n {{ translateLabels() ? (rowAction.label | translate) : rowAction.label }}\n </button>\n }\n }\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of editableColumnDefinitionsState(); track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onColumnSettings(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels() ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (definition of viewableColumnDefinitionsState(); track definition) {\n <button\n mat-menu-item\n class=\"row-action\"\n (click)=\"onViewDefinition(definition)\"\n [ngClass]=\"{ 'active-column-definition': isCurrentDefinition(definition) }\"\n >\n {{ translateLabels() ? (definition.label | translate) : definition.label }}\n </button>\n }\n </ng-template>\n</mat-menu>\n\n<!-- Table -->\n@if (filterModeState() === 'COLUMN_BASED' || showEmptyTable() || !!dataSource.filteredData?.length) {\n <div class=\"datatable overflow-auto flex-auto h-full relative w-full\" [class]=\"tableClass()\">\n @if (loading()) {\n <div\n class=\"mad-datatable-spinner-wrapper bg-(--datatable-background) opacity-80 absolute inset-0 w-full h-full flex justify-center items-center z-[99999] [pointer-events:unset]\"\n >\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n }\n <table\n [id]=\"id()\"\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"onSortingEvent($event)\"\n madFilter\n (madFilterChange)=\"onColumnBasedFilterEvent($event)\"\n [multiTemplateDataRows]=\"!!expandableDef()\"\n >\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: master checkbox -->\n @if (selectionEmitModeState() !== 'NONE' && selectionModeState() === 'BATCH') {\n <div class=\"mad-datatable-checkbox-container mx-2\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"showActionColumn ? 'row-action-cell' : 'no-action-cell'\">\n <!-- BATCH: row checkbox -->\n @if (showCheckbox(element)) {\n <div class=\"mad-datatable-checkbox-container mx-2\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-checkbox>\n </div>\n }\n <!-- SINGLE: row action menu icon -->\n @if (showRowActionIcon(element) && hasVisibleRowActions(element)) {\n <mad-icon-button\n data-cy=\"row-action-button\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n (click)=\"onSelectionEvent(element.rowId)\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n }\n <!-- SINGLE: row radio button -->\n @if (showRadioButton(element)) {\n <div class=\"mad-datatable-checkbox-container mx-2\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"></mat-radio-button>\n </div>\n }\n <!-- EXPANDABLE: row is expandable/collapsable -->\n @if (showExpandableButton(element)) {\n <mad-icon-button (click)=\"onExpand($event, element)\">\n @if (expandedElement !== element) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n </mad-icon-button>\n }\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n @for (column of columnsState(); track column.id) {\n <ng-container [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n @switch (getDataTableHeaderType(column)) {\n @case ('SORT') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n >\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n @case ('SORT_AND_FILTER') {\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n [class.text-right]=\"column.isRightAligned\"\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n mad-filter-header=\"{{ column.dataPropertyName }}\"\n [madFilterColumnRightAligned]=\"column.isRightAligned\"\n [madFilterOptions]=\"column.filterParams?.filterOptions\"\n >\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n @default {\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels() ? (column.label | translate) : column.label }}\n </th>\n }\n }\n\n <!-- data cell to be injected -->\n <td\n mat-cell\n *matCellDef=\"let element\"\n [class.text-right]=\"column.isRightAligned\"\n [class.mad-dt-child-cell]=\"element.parentId\"\n (click)=\"!disableRowClick() && onRowEvent($event, element)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n getCustomCellTemplate(column.id) || defaultCellTemplate;\n context: { column: column, element: element, $implicit: element }\n \"\n ></ng-container>\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n <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}.datatable table .mdc-data-table__row:has(+.mad-data-table-expandable-row:last-child)>.mat-mdc-cell{border-bottom:none}.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"] }]
3011
3545
  }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterColumnsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterColumnsLabel", required: false }] }], filterColumnsPlaceHolder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterColumnsPlaceHolder", required: false }] }], showEmptyTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmptyTable", required: false }] }], noDataText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noDataText", required: false }] }], columnSettingsModalTitleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnSettingsModalTitleLabel", required: false }] }], selectedLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedLabel", required: false }] }], availableLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableLabel", required: false }] }], saveLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveLabel", required: false }] }], deleteLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "deleteLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], infoTextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoTextLabel", required: false }] }], tableClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClass", required: false }] }], translateLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateLabels", required: false }] }], useAsync: [{ type: i0.Input, args: [{ isSignal: true, alias: "useAsync", required: false }] }], stateful: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateful", required: false }] }], persistenceConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistenceConfig", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], tableData: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableData", required: false }] }], idGenerator: [{ type: i0.Input, args: [{ isSignal: true, alias: "idGenerator", required: false }] }], parentIdGenerator: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentIdGenerator", required: false }] }], defaultSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSort", required: false }] }], externalFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalFilter", required: false }] }], paginationEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationEnabled", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], selectionEmitType: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionEmitType", required: false }] }], showDeleteFilterAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDeleteFilterAction", required: false }] }], disableRowClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRowClick", required: false }] }], deleteDefinitionAllowed: [{ type: i0.Input, args: [{ isSignal: true, alias: "deleteDefinitionAllowed", required: false }] }], rowExpandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowExpandable", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], filterEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterEnabled", required: false }] }], filterModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], filterValueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterValue", required: false }] }], externalPaginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalPaginator", required: false }] }], defaultPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPageSize", required: false }] }], selectionEmitModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionEmitMode", required: false }] }], forceMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceMode", required: false }] }], forceSelectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelectionMode", required: false }] }], displayedColumnsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayedColumns", required: false }] }], displayedColumnDefinition: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayedColumnDefinition", required: false }] }], columnDefinitions: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnDefinitions", required: false }] }], allColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "allColumns", required: false }] }], actionEvent: [{ type: i0.Output, args: ["actionEvent"] }], selectionEvent: [{ type: i0.Output, args: ["selectionEvent"] }], sortEvent: [{ type: i0.Output, args: ["sortEvent"] }], filterEvent: [{ type: i0.Output, args: ["filterEvent"] }], pageEvent: [{ type: i0.Output, args: ["pageEvent"] }], allColumnsEvent: [{ type: i0.Output, args: ["allColumnsEvent"] }], columnDefinitionChangeEvent: [{ type: i0.Output, args: ["columnDefinitionChangeEvent"] }], viewDefinitionChangeEvent: [{ type: i0.Output, args: ["viewDefinitionChangeEvent"] }], paginator: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatPaginator), { isSignal: true }] }], matSort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }], filter: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DataTableFilter), { isSignal: true }] }], columnDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => DataTableTemplateColumnDefinition), { isSignal: true }] }], expandableDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DataTableTemplateExpandableCellDefinition), { isSignal: true }] }] } });
3012
3546
 
3013
3547
  class DataTableTemplateCellDefinition {
@@ -3986,13 +4520,13 @@ class SidebarLayoutComponent {
3986
4520
  goToPreviousPage() {
3987
4521
  this.location.back();
3988
4522
  }
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 }] }); }
4523
+ 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$3.Location }], target: i0.ɵɵFactoryTarget.Component }); }
4524
+ 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$3.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
4525
  }
3992
4526
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SidebarLayoutComponent, decorators: [{
3993
4527
  type: Component,
3994
4528
  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$4.Location }], propDecorators: { title: [{
4529
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1$8.Router }, { type: i2$3.Location }], propDecorators: { title: [{
3996
4530
  type: Input
3997
4531
  }], hasBackButton: [{
3998
4532
  type: Input
@@ -4146,7 +4680,7 @@ class ToolbarService {
4146
4680
  clearMainActions() {
4147
4681
  this.mainActionsSignal.set([]);
4148
4682
  }
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 }); }
4683
+ 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 }); }
4150
4684
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarService, providedIn: 'root' }); }
4151
4685
  }
4152
4686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ToolbarService, decorators: [{
@@ -4154,7 +4688,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
4154
4688
  args: [{
4155
4689
  providedIn: 'root',
4156
4690
  }]
4157
- }], ctorParameters: () => [{ type: i1$8.Router }, { type: i2$3.TranslateService }] });
4691
+ }], ctorParameters: () => [{ type: i1$8.Router }, { type: i2$4.TranslateService }] });
4158
4692
 
4159
4693
  class ToolbarComponent {
4160
4694
  constructor(breakpointObserver, titleService, toolbarService) {
@@ -4459,11 +4993,11 @@ class FileUploadComponent {
4459
4993
  return dataTransfer.files;
4460
4994
  }
4461
4995
  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]" }] }); }
4996
+ 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: "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
4997
  }
4464
4998
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: FileUploadComponent, decorators: [{
4465
4999
  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"] }]
5000
+ args: [{ selector: 'mad-file-upload', imports: [MatCardModule, MatIconModule, ButtonModule, 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
5001
  }], 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
5002
 
4469
5003
  class TileComponent {
@@ -4507,7 +5041,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
4507
5041
  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
5042
  }], 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
5043
 
4510
- const VERSION = '22.3.2';
5044
+ const VERSION = '22.5.0';
4511
5045
 
4512
5046
  const MAD_ALERT_DEFAULT_CONFIGURATION = new InjectionToken('mad-alert-configuration', {
4513
5047
  providedIn: 'root',
@@ -4533,6 +5067,8 @@ class AlertComponent {
4533
5067
  ...(ngDevMode ? [{ debugName: "actionText" }] : /* istanbul ignore next */ []));
4534
5068
  this.closeable = input(true, /* @ts-ignore */
4535
5069
  ...(ngDevMode ? [{ debugName: "closeable" }] : /* istanbul ignore next */ []));
5070
+ this.useProjectedContent = input(false, /* @ts-ignore */
5071
+ ...(ngDevMode ? [{ debugName: "useProjectedContent" }] : /* istanbul ignore next */ []));
4536
5072
  this.close = output();
4537
5073
  this.action = output();
4538
5074
  this.classes = computed(() => `${this.type()} ${this.size()}`, /* @ts-ignore */
@@ -4552,15 +5088,15 @@ class AlertComponent {
4552
5088
  ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
4553
5089
  }
4554
5090
  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"] }] }); }
5091
+ 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 }, useProjectedContent: { classPropertyName: "useProjectedContent", publicName: "useProjectedContent", 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 @if (useProjectedContent()) {\n <ng-content />\n } @else {\n <span data-cy=\"alert-message\" class=\"message\">{{ message() }}</span>\n }\n\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
5092
  }
4557
5093
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AlertComponent, decorators: [{
4558
5094
  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"] }]
5095
+ 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 @if (useProjectedContent()) {\n <ng-content />\n } @else {\n <span data-cy=\"alert-message\" class=\"message\">{{ message() }}</span>\n }\n\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
5096
  }], ctorParameters: () => [{ type: undefined, decorators: [{
4561
5097
  type: Inject,
4562
5098
  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"] }] } });
5099
+ }] }], 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 }] }], useProjectedContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "useProjectedContent", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], action: [{ type: i0.Output, args: ["action"] }] } });
4564
5100
 
4565
5101
  const DEFAULT_FILE_PREVIEW_CONFIG = {
4566
5102
  thumbnailSize: 'md',
@@ -5743,7 +6279,7 @@ class FilePreviewComponent {
5743
6279
  }
5744
6280
  return THUMBNAIL_SIZE_MAP[size] ?? THUMBNAIL_SIZE_MAP.md;
5745
6281
  }
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 }); }
6282
+ 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$4.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
5747
6283
  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
6284
  Promise.resolve().then(function () { return docxPreview_component; }).then(m => m.DocxPreviewComponent)]] }); }
5749
6285
  }
@@ -5751,7 +6287,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.1.4", ng
5751
6287
  Promise.resolve().then(function () { return docxPreview_component; }).then(m => m.DocxPreviewComponent)], resolveMetadata: DocxPreviewComponent => ({ decorators: [{
5752
6288
  type: Component,
5753
6289
  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"] }] } }) });
6290
+ }], ctorParameters: () => [{ type: FilePreviewService }, { type: i1$5.MatDialog }, { type: i2$4.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
6291
 
5756
6292
  class MaterialFilePreviewModule {
5757
6293
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MaterialFilePreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }