@porscheinformatik/material-addons 17.1.3 → 17.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/esm2022/lib/card/card.component.mjs +3 -3
  2. package/esm2022/lib/data-table/configuration/data-table-action-type.mjs +6 -0
  3. package/esm2022/lib/data-table/configuration/data-table-action.mjs +2 -0
  4. package/esm2022/lib/data-table/configuration/data-table-column-definition.mjs +2 -0
  5. package/esm2022/lib/data-table/configuration/data-table-column.mjs +2 -0
  6. package/esm2022/lib/data-table/configuration/data-table-filter-mode.mjs +2 -0
  7. package/esm2022/lib/data-table/configuration/data-table-global-configuration.mjs +16 -0
  8. package/esm2022/lib/data-table/configuration/data-table-header-type.mjs +2 -0
  9. package/esm2022/lib/data-table/configuration/data-table-row.mjs +2 -0
  10. package/esm2022/lib/data-table/configuration/data-table-selection-emit-mode.mjs +2 -0
  11. package/esm2022/lib/data-table/configuration/data-table-selection-emit-type.mjs +2 -0
  12. package/esm2022/lib/data-table/configuration/data-table-selection-mode.mjs +2 -0
  13. package/esm2022/lib/data-table/data-table-columns-modal/data-table-columns-modal.component.mjs +15 -11
  14. package/esm2022/lib/data-table/data-table-filter/data-table-filter-component/data-table-filter-dialog/data-table-filter-dialog.component.mjs +43 -0
  15. package/esm2022/lib/data-table/data-table-filter/data-table-filter-component/data-table-filter.component.mjs +41 -0
  16. package/esm2022/lib/data-table/data-table-filter/data-table-filter-header.directive.mjs +126 -0
  17. package/esm2022/lib/data-table/data-table-filter/data-table-filter-object.mjs +2 -0
  18. package/esm2022/lib/data-table/data-table-filter/data-table-filter-options.mjs +2 -0
  19. package/esm2022/lib/data-table/data-table-filter/data-table-filter.directive.mjs +46 -0
  20. package/esm2022/lib/data-table/data-table-persistence.service.mjs +61 -0
  21. package/esm2022/lib/data-table/data-table-template/data-table-template-cell-definition.directive.mjs +28 -0
  22. package/esm2022/lib/data-table/data-table-template/data-table-template-column-definition.directive.mjs +22 -0
  23. package/esm2022/lib/data-table/data-table-template/data-table-template-expandable-cell-definition.directive.mjs +28 -0
  24. package/esm2022/lib/data-table/data-table-template/data-table-template-expandable-column-definition.directive.mjs +22 -0
  25. package/esm2022/lib/data-table/data-table.component.mjs +500 -304
  26. package/esm2022/lib/data-table/data-table.mjs +9 -1
  27. package/esm2022/lib/data-table/util/data-table-action-util.mjs +40 -0
  28. package/esm2022/lib/data-table/util/data-table-data-util.mjs +49 -0
  29. package/esm2022/lib/data-table/util/data-table-filter-util.mjs +24 -0
  30. package/esm2022/lib/data-table/util/data-table-sort-util.mjs +76 -0
  31. package/esm2022/lib/layout/toolbar/toolbar-action.interface.mjs +1 -1
  32. package/esm2022/lib/numeric-field/numeric-field.directive.mjs +1 -1
  33. package/esm2022/lib/readonly/readonly-form-field/readonly-form-field.component.mjs +3 -3
  34. package/esm2022/public_api.mjs +1 -2
  35. package/fesm2022/porscheinformatik-material-addons.mjs +1121 -431
  36. package/fesm2022/porscheinformatik-material-addons.mjs.map +1 -1
  37. package/lib/data-table/configuration/data-table-action-type.d.ts.map +1 -0
  38. package/lib/data-table/{data-table-action.d.ts → configuration/data-table-action.d.ts} +3 -0
  39. package/lib/data-table/configuration/data-table-action.d.ts.map +1 -0
  40. package/lib/data-table/configuration/data-table-column-definition.d.ts.map +1 -0
  41. package/lib/data-table/configuration/data-table-column.d.ts +16 -0
  42. package/lib/data-table/configuration/data-table-column.d.ts.map +1 -0
  43. package/lib/data-table/configuration/data-table-filter-mode.d.ts +2 -0
  44. package/lib/data-table/configuration/data-table-filter-mode.d.ts.map +1 -0
  45. package/lib/data-table/configuration/data-table-global-configuration.d.ts +17 -0
  46. package/lib/data-table/configuration/data-table-global-configuration.d.ts.map +1 -0
  47. package/lib/data-table/configuration/data-table-header-type.d.ts +2 -0
  48. package/lib/data-table/configuration/data-table-header-type.d.ts.map +1 -0
  49. package/lib/data-table/configuration/data-table-row.d.ts.map +1 -0
  50. package/lib/data-table/configuration/data-table-selection-emit-mode.d.ts +2 -0
  51. package/lib/data-table/configuration/data-table-selection-emit-mode.d.ts.map +1 -0
  52. package/lib/data-table/configuration/data-table-selection-emit-type.d.ts +2 -0
  53. package/lib/data-table/configuration/data-table-selection-emit-type.d.ts.map +1 -0
  54. package/lib/data-table/configuration/data-table-selection-mode.d.ts +2 -0
  55. package/lib/data-table/configuration/data-table-selection-mode.d.ts.map +1 -0
  56. package/lib/data-table/data-table-columns-modal/data-table-columns-modal.component.d.ts +3 -3
  57. package/lib/data-table/data-table-columns-modal/data-table-columns-modal.component.d.ts.map +1 -1
  58. package/lib/data-table/data-table-filter/data-table-filter-component/data-table-filter-dialog/data-table-filter-dialog.component.d.ts +16 -0
  59. package/lib/data-table/data-table-filter/data-table-filter-component/data-table-filter-dialog/data-table-filter-dialog.component.d.ts.map +1 -0
  60. package/lib/data-table/data-table-filter/data-table-filter-component/data-table-filter.component.d.ts +20 -0
  61. package/lib/data-table/data-table-filter/data-table-filter-component/data-table-filter.component.d.ts.map +1 -0
  62. package/lib/data-table/data-table-filter/data-table-filter-header.directive.d.ts +36 -0
  63. package/lib/data-table/data-table-filter/data-table-filter-header.directive.d.ts.map +1 -0
  64. package/lib/data-table/data-table-filter/data-table-filter-object.d.ts +4 -0
  65. package/lib/data-table/data-table-filter/data-table-filter-object.d.ts.map +1 -0
  66. package/lib/data-table/data-table-filter/data-table-filter-options.d.ts +5 -0
  67. package/lib/data-table/data-table-filter/data-table-filter-options.d.ts.map +1 -0
  68. package/lib/data-table/data-table-filter/data-table-filter.directive.d.ts +16 -0
  69. package/lib/data-table/data-table-filter/data-table-filter.directive.d.ts.map +1 -0
  70. package/lib/data-table/data-table-persistence.service.d.ts +28 -0
  71. package/lib/data-table/data-table-persistence.service.d.ts.map +1 -0
  72. package/lib/data-table/data-table-template/data-table-template-cell-definition.directive.d.ts +14 -0
  73. package/lib/data-table/data-table-template/data-table-template-cell-definition.directive.d.ts.map +1 -0
  74. package/lib/data-table/data-table-template/data-table-template-column-definition.directive.d.ts +11 -0
  75. package/lib/data-table/data-table-template/data-table-template-column-definition.directive.d.ts.map +1 -0
  76. package/lib/data-table/data-table-template/data-table-template-expandable-cell-definition.directive.d.ts +14 -0
  77. package/lib/data-table/data-table-template/data-table-template-expandable-cell-definition.directive.d.ts.map +1 -0
  78. package/lib/data-table/data-table-template/data-table-template-expandable-column-definition.directive.d.ts +11 -0
  79. package/lib/data-table/data-table-template/data-table-template-expandable-column-definition.directive.d.ts.map +1 -0
  80. package/lib/data-table/data-table.component.d.ts +144 -74
  81. package/lib/data-table/data-table.component.d.ts.map +1 -1
  82. package/lib/data-table/data-table.d.ts +18 -3
  83. package/lib/data-table/data-table.d.ts.map +1 -1
  84. package/lib/data-table/util/data-table-action-util.d.ts +9 -0
  85. package/lib/data-table/util/data-table-action-util.d.ts.map +1 -0
  86. package/lib/data-table/util/data-table-data-util.d.ts +10 -0
  87. package/lib/data-table/util/data-table-data-util.d.ts.map +1 -0
  88. package/lib/data-table/util/data-table-filter-util.d.ts +6 -0
  89. package/lib/data-table/util/data-table-filter-util.d.ts.map +1 -0
  90. package/lib/data-table/util/data-table-sort-util.d.ts +14 -0
  91. package/lib/data-table/util/data-table-sort-util.d.ts.map +1 -0
  92. package/lib/layout/toolbar/toolbar-action.interface.d.ts.map +1 -1
  93. package/lib/numeric-field/numeric-field.directive.d.ts.map +1 -1
  94. package/package.json +3 -3
  95. package/public_api.d.ts +0 -1
  96. package/public_api.d.ts.map +1 -1
  97. package/esm2022/lib/data-table/data-table-action-type.mjs +0 -6
  98. package/esm2022/lib/data-table/data-table-action.mjs +0 -2
  99. package/esm2022/lib/data-table/data-table-column-definition.mjs +0 -2
  100. package/esm2022/lib/data-table/data-table-column.mjs +0 -2
  101. package/esm2022/lib/data-table/data-table-row.mjs +0 -2
  102. package/esm2022/lib/data-table/data-table.module.mjs +0 -81
  103. package/lib/data-table/data-table-action-type.d.ts.map +0 -1
  104. package/lib/data-table/data-table-action.d.ts.map +0 -1
  105. package/lib/data-table/data-table-column-definition.d.ts.map +0 -1
  106. package/lib/data-table/data-table-column.d.ts +0 -11
  107. package/lib/data-table/data-table-column.d.ts.map +0 -1
  108. package/lib/data-table/data-table-row.d.ts.map +0 -1
  109. package/lib/data-table/data-table.module.d.ts +0 -25
  110. package/lib/data-table/data-table.module.d.ts.map +0 -1
  111. /package/lib/data-table/{data-table-action-type.d.ts → configuration/data-table-action-type.d.ts} +0 -0
  112. /package/lib/data-table/{data-table-column-definition.d.ts → configuration/data-table-column-definition.d.ts} +0 -0
  113. /package/lib/data-table/{data-table-row.d.ts → configuration/data-table-row.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, HostBinding, ElementRef, ViewChild, Directive, Optional, LOCALE_ID, Injectable, Inject, EventEmitter, Output, forwardRef, HostListener, TemplateRef, ContentChild, ViewChildren, ViewEncapsulation, ChangeDetectionStrategy, QueryList, ContentChildren } from '@angular/core';
2
+ import { Component, Input, NgModule, HostBinding, ElementRef, ViewChild, Directive, Optional, LOCALE_ID, Injectable, Inject, EventEmitter, Output, forwardRef, HostListener, TemplateRef, ContentChild, ViewChildren, InjectionToken, SkipSelf, ContentChildren, ViewEncapsulation, ChangeDetectionStrategy, QueryList } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i1 from '@angular/router';
@@ -16,13 +16,13 @@ import * as i4 from '@angular/material/input';
16
16
  import { MatInputModule } from '@angular/material/input';
17
17
  import * as i5$1 from '@angular/cdk/text-field';
18
18
  import * as i1$2 from '@angular/forms';
19
- import { FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
19
+ import { FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormControl } from '@angular/forms';
20
20
  import { style, animate, transition, trigger, state } from '@angular/animations';
21
21
  import * as i2$1 from '@angular/material/card';
22
22
  import { MatCardModule } from '@angular/material/card';
23
23
  import { Subject, Subscription, of } from 'rxjs';
24
24
  import { throttleTime, map, tap, startWith, switchMap, takeUntil, distinctUntilChanged } from 'rxjs/operators';
25
- import * as i8 from '@angular/material/table';
25
+ import * as i9 from '@angular/material/table';
26
26
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
27
27
  import * as i6$1 from '@angular/material/paginator';
28
28
  import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
@@ -32,29 +32,35 @@ import * as i6 from '@angular/material/menu';
32
32
  import { MatMenuModule } from '@angular/material/menu';
33
33
  import * as i1$3 from '@angular/material/dialog';
34
34
  import { MAT_DIALOG_DATA } from '@angular/material/dialog';
35
- import * as i10 from '@angular/cdk/drag-drop';
35
+ import * as i3$2 from '@angular/cdk/drag-drop';
36
36
  import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
37
37
  import * as i2$2 from '@ngx-translate/core';
38
38
  import { TranslateModule } from '@ngx-translate/core';
39
39
  import { SelectionModel } from '@angular/cdk/collections';
40
+ import { DateTime } from 'luxon';
40
41
  import { v4 } from 'uuid';
41
- import * as i10$1 from '@angular/material/progress-spinner';
42
+ import * as i10 from '@angular/material/progress-spinner';
42
43
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
43
- import * as i13 from '@angular/material/checkbox';
44
- import { MatCheckboxModule } from '@angular/material/checkbox';
45
44
  import * as i14 from '@angular/material/badge';
46
45
  import { MatBadgeModule } from '@angular/material/badge';
46
+ import * as i15 from '@angular/material/checkbox';
47
+ import { MatCheckboxModule } from '@angular/material/checkbox';
48
+ import * as i16 from '@angular/material/radio';
49
+ import { MatRadioModule } from '@angular/material/radio';
50
+ import * as i4$1 from '@angular/material/select';
51
+ import { MatSelectModule } from '@angular/material/select';
52
+ import * as i5$2 from '@angular/material/core';
47
53
  import { CdkStepHeader, STEP_STATE, CdkStep, CdkStepper, CdkStepperModule } from '@angular/cdk/stepper';
48
54
  import * as i1$4 from '@angular/cdk/a11y';
49
- import * as i3$2 from '@angular/cdk/bidi';
55
+ import * as i3$3 from '@angular/cdk/bidi';
50
56
  import * as i2$3 from '@angular/material/stepper';
51
57
  import { MatStepperModule } from '@angular/material/stepper';
52
58
  import * as i1$5 from '@angular/cdk/layout';
53
59
  import { Breakpoints } from '@angular/cdk/layout';
54
60
  import * as i2$4 from '@angular/platform-browser';
55
- import * as i8$1 from '@angular/material/toolbar';
61
+ import * as i8 from '@angular/material/toolbar';
56
62
  import { MatToolbarModule } from '@angular/material/toolbar';
57
- import * as i4$1 from '@angular/material/chips';
63
+ import * as i4$2 from '@angular/material/chips';
58
64
  import { MatChipsModule } from '@angular/material/chips';
59
65
 
60
66
  class MaterialActionButtonComponent {
@@ -623,11 +629,11 @@ class ReadOnlyFormFieldComponent {
623
629
  }
624
630
  }
625
631
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ReadOnlyFormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: NumberFormatService }], target: i0.ɵɵFactoryTarget.Component }); }
626
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ReadOnlyFormFieldComponent, selector: "mad-readonly-form-field", inputs: { useProjectedContent: "useProjectedContent", value: "value", label: "label", textAlign: "textAlign", formatNumber: "formatNumber", decimalPlaces: "decimalPlaces", roundValue: ["roundDisplayValue", "roundValue"], autofillDecimals: "autofillDecimals", unit: "unit", unitPosition: "unitPosition", errorMessage: "errorMessage", multiline: "multiline", rows: "rows", id: "id", shrinkIfEmpty: "shrinkIfEmpty", suffix: "suffix", prefix: "prefix", multilineAutoSize: "multilineAutoSize" }, outputs: { suffixClickedEmitter: "suffixClickedEmitter", prefixClickedEmitter: "prefixClickedEmitter" }, viewQueries: [{ propertyName: "originalContent", first: true, predicate: ["contentWrapper"], descendants: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-form-field class=\"form-group mad-read-only\">\n <mat-label>{{ label }}</mat-label>\n <input\n *ngIf=\"!multiline\"\n [ngStyle]=\"{'display': useProjectedContent ? 'none' : 'block' }\"\n [ngModel]=\"value\"\n [ngClass]=\"'text-' + textAlign + ' content'\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n #inputEl\n />\n\n <textarea\n *ngIf=\"multiline\"\n [ngStyle]=\"{'display': useProjectedContent ? 'none' : 'block' }\"\n [rows]=\"rows\"\n [ngModel]=\"value\"\n class=\"multiline content\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n [cdkTextareaAutosize]=\"multilineAutoSize\"\n ></textarea>\n <ng-content *ngIf=\"useProjectedContent\" />\n <mat-error>{{ errorMessage }}</mat-error>\n <mat-icon *ngIf=\"suffix\" (click)=\"suffixClicked()\" class=\"pointer\" color=\"primary\" matSuffix>{{ suffix }}</mat-icon>\n <mat-icon *ngIf=\"prefix\" (click)=\"prefixClicked()\" class=\"pointer\" color=\"primary\" matPrefix>{{ prefix }}</mat-icon>\n</mat-form-field>\n", styles: ["mat-form-field{width:100%;width:-webkit-fill-available;width:-moz-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i5$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
632
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ReadOnlyFormFieldComponent, selector: "mad-readonly-form-field", inputs: { useProjectedContent: "useProjectedContent", value: "value", label: "label", textAlign: "textAlign", formatNumber: "formatNumber", decimalPlaces: "decimalPlaces", roundValue: ["roundDisplayValue", "roundValue"], autofillDecimals: "autofillDecimals", unit: "unit", unitPosition: "unitPosition", errorMessage: "errorMessage", multiline: "multiline", rows: "rows", id: "id", shrinkIfEmpty: "shrinkIfEmpty", suffix: "suffix", prefix: "prefix", multilineAutoSize: "multilineAutoSize" }, outputs: { suffixClickedEmitter: "suffixClickedEmitter", prefixClickedEmitter: "prefixClickedEmitter" }, viewQueries: [{ propertyName: "originalContent", first: true, predicate: ["contentWrapper"], descendants: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-form-field class=\"form-group mad-read-only\">\n <mat-label>{{ label }}</mat-label>\n <input\n *ngIf=\"!multiline\"\n [ngStyle]=\"{ display: useProjectedContent ? 'none' : 'block' }\"\n [ngModel]=\"value\"\n [ngClass]=\"'text-' + textAlign + ' content'\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n #inputEl\n />\n\n <textarea\n *ngIf=\"multiline\"\n [ngStyle]=\"{ display: useProjectedContent ? 'none' : 'block' }\"\n [rows]=\"rows\"\n [ngModel]=\"value\"\n class=\"multiline content\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n [cdkTextareaAutosize]=\"multilineAutoSize\"\n ></textarea>\n <ng-content *ngIf=\"useProjectedContent\" />\n <mat-error>{{ errorMessage }}</mat-error>\n <mat-icon *ngIf=\"suffix\" (click)=\"suffixClicked()\" class=\"pointer\" color=\"primary\" matSuffix>{{ suffix }}</mat-icon>\n <mat-icon *ngIf=\"prefix\" (click)=\"prefixClicked()\" class=\"pointer\" color=\"primary\" matPrefix>{{ prefix }}</mat-icon>\n</mat-form-field>\n", styles: ["mat-form-field{width:100%;width:-webkit-fill-available;width:-moz-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i5$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
627
633
  }
628
634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ReadOnlyFormFieldComponent, decorators: [{
629
635
  type: Component,
630
- args: [{ selector: 'mad-readonly-form-field', template: "<mat-form-field class=\"form-group mad-read-only\">\n <mat-label>{{ label }}</mat-label>\n <input\n *ngIf=\"!multiline\"\n [ngStyle]=\"{'display': useProjectedContent ? 'none' : 'block' }\"\n [ngModel]=\"value\"\n [ngClass]=\"'text-' + textAlign + ' content'\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n #inputEl\n />\n\n <textarea\n *ngIf=\"multiline\"\n [ngStyle]=\"{'display': useProjectedContent ? 'none' : 'block' }\"\n [rows]=\"rows\"\n [ngModel]=\"value\"\n class=\"multiline content\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n [cdkTextareaAutosize]=\"multilineAutoSize\"\n ></textarea>\n <ng-content *ngIf=\"useProjectedContent\" />\n <mat-error>{{ errorMessage }}</mat-error>\n <mat-icon *ngIf=\"suffix\" (click)=\"suffixClicked()\" class=\"pointer\" color=\"primary\" matSuffix>{{ suffix }}</mat-icon>\n <mat-icon *ngIf=\"prefix\" (click)=\"prefixClicked()\" class=\"pointer\" color=\"primary\" matPrefix>{{ prefix }}</mat-icon>\n</mat-form-field>\n", styles: ["mat-form-field{width:100%;width:-webkit-fill-available;width:-moz-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}\n"] }]
636
+ args: [{ selector: 'mad-readonly-form-field', template: "<mat-form-field class=\"form-group mad-read-only\">\n <mat-label>{{ label }}</mat-label>\n <input\n *ngIf=\"!multiline\"\n [ngStyle]=\"{ display: useProjectedContent ? 'none' : 'block' }\"\n [ngModel]=\"value\"\n [ngClass]=\"'text-' + textAlign + ' content'\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n #inputEl\n />\n\n <textarea\n *ngIf=\"multiline\"\n [ngStyle]=\"{ display: useProjectedContent ? 'none' : 'block' }\"\n [rows]=\"rows\"\n [ngModel]=\"value\"\n class=\"multiline content\"\n [errorStateMatcher]=\"errorMatcher\"\n [id]=\"id\"\n readonly\n [disabled]=\"!useProjectedContent\"\n matInput\n [cdkTextareaAutosize]=\"multilineAutoSize\"\n ></textarea>\n <ng-content *ngIf=\"useProjectedContent\" />\n <mat-error>{{ errorMessage }}</mat-error>\n <mat-icon *ngIf=\"suffix\" (click)=\"suffixClicked()\" class=\"pointer\" color=\"primary\" matSuffix>{{ suffix }}</mat-icon>\n <mat-icon *ngIf=\"prefix\" (click)=\"prefixClicked()\" class=\"pointer\" color=\"primary\" matPrefix>{{ prefix }}</mat-icon>\n</mat-form-field>\n", styles: ["mat-form-field{width:100%;width:-webkit-fill-available;width:-moz-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}\n"] }]
631
637
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: NumberFormatService }], propDecorators: { originalContent: [{
632
638
  type: ViewChild,
633
639
  args: ['contentWrapper', { static: false }]
@@ -1280,7 +1286,7 @@ class CardComponent {
1280
1286
  this.additionalAction.emit(undefined);
1281
1287
  }
1282
1288
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1283
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: CardComponent, selector: "mad-card", inputs: { cancelDisabled: "cancelDisabled", cancelText: "cancelText", readonly: "readonly", editText: "editText", expandable: "expandable", expanded: "expanded", saveDisabled: "saveDisabled", saveText: "saveText", title: "title", editMode: "editMode", additionalActionIcon: "additionalActionIcon", additionalActionText: "additionalActionText" }, outputs: { edit: "edit", cancel: "cancel", save: "save", additionalAction: "additionalAction" }, ngImport: i0, template: "<mat-card>\n <mat-card-header class=\"header\">\n <mat-card-title-group class=\"center\">\n <mat-card-title class=\"small-title-container\">{{ title }}</mat-card-title>\n <div class=\"top-right-icons\">\n <mad-icon-button data-testid=\"collapse-btn\" (click)=\"toggleCollapse()\" *ngIf=\"expandable && !editMode\">\n <mat-icon [@rotateIcon]=\"!expanded\">keyboard_arrow_down</mat-icon>\n </mad-icon-button>\n <mad-icon-button data-testid=\"additional-btn\" (click)=\"additionalActionClicked()\" *ngIf=\"additionalActionIcon\" [title]=\"additionalActionText\" type=\"button\">\n <mat-icon>{{ additionalActionIcon }}</mat-icon>\n </mad-icon-button>\n <mad-icon-button data-testid=\"edit-btn\" [title]=\"editText\" (click)=\"onEdit()\" *ngIf=\"!readonly && !editMode\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n </div>\n </mat-card-title-group>\n </mat-card-header>\n <mat-card-content [@collapseExpandAnimation] *ngIf=\"expanded\">\n <ng-content></ng-content>\n </mat-card-content>\n <mat-card-actions *ngIf=\"!readonly && editMode\">\n <mad-primary-button data-testid=\"save-btn\" [title]=\"saveText\" [disabled]=\"saveDisabled\" (throttleClick)=\"onSave()\" madThrottleClick>\n {{ saveText }}\n </mad-primary-button>\n <mad-outline-button data-testid=\"cancel-btn\" [title]=\"cancelText\" [disabled]=\"cancelDisabled\" (click)=\"onCancel()\">\n {{ cancelText }}\n </mad-outline-button>\n </mat-card-actions>\n</mat-card>\n", styles: [".top-right-icons{text-align:end;width:-moz-fit-content;width:fit-content}.center{display:flex;align-items:center}.header{height:48px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i2$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i2$1.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i2$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i2$1.MatCardTitleGroup, selector: "mat-card-title-group" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["type", "disabled", "title", "color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "directive", type: ThrottleClickDirective, selector: "[madThrottleClick]", inputs: ["throttleTime"], outputs: ["throttleClick"] }], animations: [
1289
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: CardComponent, selector: "mad-card", inputs: { cancelDisabled: "cancelDisabled", cancelText: "cancelText", readonly: "readonly", editText: "editText", expandable: "expandable", expanded: "expanded", saveDisabled: "saveDisabled", saveText: "saveText", title: "title", editMode: "editMode", additionalActionIcon: "additionalActionIcon", additionalActionText: "additionalActionText" }, outputs: { edit: "edit", cancel: "cancel", save: "save", additionalAction: "additionalAction" }, ngImport: i0, template: "<mat-card>\n <mat-card-header class=\"header\">\n <mat-card-title-group class=\"center\">\n <mat-card-title class=\"small-title-container\">{{ title }}</mat-card-title>\n <div class=\"top-right-icons\">\n <mad-icon-button data-testid=\"collapse-btn\" (click)=\"toggleCollapse()\" *ngIf=\"expandable && !editMode\">\n <mat-icon [@rotateIcon]=\"!expanded\">keyboard_arrow_down</mat-icon>\n </mad-icon-button>\n <mad-icon-button\n data-testid=\"additional-btn\"\n (click)=\"additionalActionClicked()\"\n *ngIf=\"additionalActionIcon\"\n [title]=\"additionalActionText\"\n type=\"button\"\n >\n <mat-icon>{{ additionalActionIcon }}</mat-icon>\n </mad-icon-button>\n <mad-icon-button data-testid=\"edit-btn\" [title]=\"editText\" (click)=\"onEdit()\" *ngIf=\"!readonly && !editMode\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n </div>\n </mat-card-title-group>\n </mat-card-header>\n <mat-card-content [@collapseExpandAnimation] *ngIf=\"expanded\">\n <ng-content></ng-content>\n </mat-card-content>\n <mat-card-actions *ngIf=\"!readonly && editMode\">\n <mad-primary-button data-testid=\"save-btn\" [title]=\"saveText\" [disabled]=\"saveDisabled\" (throttleClick)=\"onSave()\" madThrottleClick>\n {{ saveText }}\n </mad-primary-button>\n <mad-outline-button data-testid=\"cancel-btn\" [title]=\"cancelText\" [disabled]=\"cancelDisabled\" (click)=\"onCancel()\">\n {{ cancelText }}\n </mad-outline-button>\n </mat-card-actions>\n</mat-card>\n", styles: [".top-right-icons{text-align:end;width:-moz-fit-content;width:fit-content}.center{display:flex;align-items:center}.header{height:48px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i2$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i2$1.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i2$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i2$1.MatCardTitleGroup, selector: "mat-card-title-group" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["type", "disabled", "title", "color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "directive", type: ThrottleClickDirective, selector: "[madThrottleClick]", inputs: ["throttleTime"], outputs: ["throttleClick"] }], animations: [
1284
1290
  trigger('collapseExpandAnimation', [
1285
1291
  transition(':enter', [
1286
1292
  style({ opacity: 0, height: 0, overflow: 'hidden' }),
@@ -1330,7 +1336,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
1330
1336
  transition('true => false', animate('100ms ease-out')),
1331
1337
  transition('false => true', animate('100ms ease-in')),
1332
1338
  ]),
1333
- ], template: "<mat-card>\n <mat-card-header class=\"header\">\n <mat-card-title-group class=\"center\">\n <mat-card-title class=\"small-title-container\">{{ title }}</mat-card-title>\n <div class=\"top-right-icons\">\n <mad-icon-button data-testid=\"collapse-btn\" (click)=\"toggleCollapse()\" *ngIf=\"expandable && !editMode\">\n <mat-icon [@rotateIcon]=\"!expanded\">keyboard_arrow_down</mat-icon>\n </mad-icon-button>\n <mad-icon-button data-testid=\"additional-btn\" (click)=\"additionalActionClicked()\" *ngIf=\"additionalActionIcon\" [title]=\"additionalActionText\" type=\"button\">\n <mat-icon>{{ additionalActionIcon }}</mat-icon>\n </mad-icon-button>\n <mad-icon-button data-testid=\"edit-btn\" [title]=\"editText\" (click)=\"onEdit()\" *ngIf=\"!readonly && !editMode\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n </div>\n </mat-card-title-group>\n </mat-card-header>\n <mat-card-content [@collapseExpandAnimation] *ngIf=\"expanded\">\n <ng-content></ng-content>\n </mat-card-content>\n <mat-card-actions *ngIf=\"!readonly && editMode\">\n <mad-primary-button data-testid=\"save-btn\" [title]=\"saveText\" [disabled]=\"saveDisabled\" (throttleClick)=\"onSave()\" madThrottleClick>\n {{ saveText }}\n </mad-primary-button>\n <mad-outline-button data-testid=\"cancel-btn\" [title]=\"cancelText\" [disabled]=\"cancelDisabled\" (click)=\"onCancel()\">\n {{ cancelText }}\n </mad-outline-button>\n </mat-card-actions>\n</mat-card>\n", styles: [".top-right-icons{text-align:end;width:-moz-fit-content;width:fit-content}.center{display:flex;align-items:center}.header{height:48px}\n"] }]
1339
+ ], template: "<mat-card>\n <mat-card-header class=\"header\">\n <mat-card-title-group class=\"center\">\n <mat-card-title class=\"small-title-container\">{{ title }}</mat-card-title>\n <div class=\"top-right-icons\">\n <mad-icon-button data-testid=\"collapse-btn\" (click)=\"toggleCollapse()\" *ngIf=\"expandable && !editMode\">\n <mat-icon [@rotateIcon]=\"!expanded\">keyboard_arrow_down</mat-icon>\n </mad-icon-button>\n <mad-icon-button\n data-testid=\"additional-btn\"\n (click)=\"additionalActionClicked()\"\n *ngIf=\"additionalActionIcon\"\n [title]=\"additionalActionText\"\n type=\"button\"\n >\n <mat-icon>{{ additionalActionIcon }}</mat-icon>\n </mad-icon-button>\n <mad-icon-button data-testid=\"edit-btn\" [title]=\"editText\" (click)=\"onEdit()\" *ngIf=\"!readonly && !editMode\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n </div>\n </mat-card-title-group>\n </mat-card-header>\n <mat-card-content [@collapseExpandAnimation] *ngIf=\"expanded\">\n <ng-content></ng-content>\n </mat-card-content>\n <mat-card-actions *ngIf=\"!readonly && editMode\">\n <mad-primary-button data-testid=\"save-btn\" [title]=\"saveText\" [disabled]=\"saveDisabled\" (throttleClick)=\"onSave()\" madThrottleClick>\n {{ saveText }}\n </mad-primary-button>\n <mad-outline-button data-testid=\"cancel-btn\" [title]=\"cancelText\" [disabled]=\"cancelDisabled\" (click)=\"onCancel()\">\n {{ cancelText }}\n </mad-outline-button>\n </mat-card-actions>\n</mat-card>\n", styles: [".top-right-icons{text-align:end;width:-moz-fit-content;width:fit-content}.center{display:flex;align-items:center}.header{height:48px}\n"] }]
1334
1340
  }], propDecorators: { cancelDisabled: [{
1335
1341
  type: Input
1336
1342
  }], cancelText: [{
@@ -1679,7 +1685,7 @@ class TableComponent {
1679
1685
  return event?.target?.classList.contains('mat-icon');
1680
1686
  }
1681
1687
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1682
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: TableComponent, selector: "mad-table", inputs: { columns: "columns", filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", noDataText: "noDataText", pageSizeOptions: "pageSizeOptions", defaultPageSize: "defaultPageSize", rowActions: "rowActions", tableActions: "tableActions", displayedData: "displayedData", paginationEnabled: "paginationEnabled", filterEnabled: "filterEnabled" }, outputs: { tableAction: "tableAction", rowAction: "rowAction", sortEvent: "sortEvent" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<!-- Table actions -->\n<div *ngIf=\"tableActions?.length\">\n <mad-primary-button class=\"table-action\" *ngFor=\"let tableAction of tableActions\" (click)=\"onTableAction(tableAction)\">\n {{ tableAction.label }}\n </mad-primary-button>\n</div>\n\n<!-- Row action buttons -->\n<mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n <button *ngFor=\"let rowAction of rowActions\" mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ rowAction.label }}\n </button>\n </ng-template>\n</mat-menu>\n\n<!-- Table filter -->\n<mat-form-field *ngIf=\"isFilterEnabled\">\n <mat-label>{{ filterLabel }}</mat-label>\n <input matInput (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n</mat-form-field>\n\n<!-- Table -->\n<div *ngIf=\"dataSource?.data?.length > 0; else noData\" class=\"mad-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column -->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\" *ngIf=\"rowActions?.length\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"row-action-button\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"row-action-button\">\n <mad-icon-button [matMenuTriggerData]=\"{ element: element }\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n </td>\n </ng-container>\n <!-- Columns with data -->\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.label\" [sticky]=\"column.isSticky\">\n <ng-container *ngIf=\"column.isSortable; else noSort\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.label }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ column.label }}\n </th>\n </ng-container>\n <ng-template #noSort>\n <th mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ column.label }}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"column.isRightAligned\">\n {{ element[column.dataPropertyName] }}\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"columnNames\"></tr>\n <tr\n mat-row\n [class.clickable-table-row]=\"isRowClickable\"\n (click)=\"onRowEvent($event, row)\"\n *matRowDef=\"let row; columns: columnNames\"\n ></tr>\n </table>\n</div>\n<!-- Pagination -->\n<mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n showFirstLastButtons\n>\n</mat-paginator>\n\n<!-- No data alert -->\n<ng-template #noData>\n <div class=\"noDataText\">\n {{ noDataText }}\n </div>\n</ng-template>\n", styles: [".text-right{text-align:right!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-button{width:10px}.noDataText{width:100%;text-align:center}.mad-table{width:100%;overflow-x:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.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: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i6$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled", "color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i7.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i7.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }] }); }
1688
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: TableComponent, selector: "mad-table", inputs: { columns: "columns", filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", noDataText: "noDataText", pageSizeOptions: "pageSizeOptions", defaultPageSize: "defaultPageSize", rowActions: "rowActions", tableActions: "tableActions", displayedData: "displayedData", paginationEnabled: "paginationEnabled", filterEnabled: "filterEnabled" }, outputs: { tableAction: "tableAction", rowAction: "rowAction", sortEvent: "sortEvent" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<!-- Table actions -->\n<div *ngIf=\"tableActions?.length\">\n <mad-primary-button class=\"table-action\" *ngFor=\"let tableAction of tableActions\" (click)=\"onTableAction(tableAction)\">\n {{ tableAction.label }}\n </mad-primary-button>\n</div>\n\n<!-- Row action buttons -->\n<mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n <button *ngFor=\"let rowAction of rowActions\" mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ rowAction.label }}\n </button>\n </ng-template>\n</mat-menu>\n\n<!-- Table filter -->\n<mat-form-field *ngIf=\"isFilterEnabled\">\n <mat-label>{{ filterLabel }}</mat-label>\n <input matInput (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n</mat-form-field>\n\n<!-- Table -->\n<div *ngIf=\"dataSource?.data?.length > 0; else noData\" class=\"mad-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column -->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\" *ngIf=\"rowActions?.length\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"row-action-button\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"row-action-button\">\n <mad-icon-button [matMenuTriggerData]=\"{ element: element }\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n </td>\n </ng-container>\n <!-- Columns with data -->\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.label\" [sticky]=\"column.isSticky\">\n <ng-container *ngIf=\"column.isSortable; else noSort\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.label }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ column.label }}\n </th>\n </ng-container>\n <ng-template #noSort>\n <th mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ column.label }}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"column.isRightAligned\">\n {{ element[column.dataPropertyName] }}\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"columnNames\"></tr>\n <tr\n mat-row\n [class.clickable-table-row]=\"isRowClickable\"\n (click)=\"onRowEvent($event, row)\"\n *matRowDef=\"let row; columns: columnNames\"\n ></tr>\n </table>\n</div>\n<!-- Pagination -->\n<mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n showFirstLastButtons\n>\n</mat-paginator>\n\n<!-- No data alert -->\n<ng-template #noData>\n <div class=\"noDataText\">\n {{ noDataText }}\n </div>\n</ng-template>\n", styles: [".text-right{text-align:right!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-button{width:10px}.noDataText{width:100%;text-align:center}.mad-table{width:100%;overflow-x:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.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: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i6$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled", "color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i7.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i7.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { 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: ["sticky", "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: "component", type: PrimaryButtonComponent, selector: "mad-primary-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }] }); }
1683
1689
  }
1684
1690
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: TableComponent, decorators: [{
1685
1691
  type: Component,
@@ -1840,11 +1846,11 @@ class DataTableColumnsModalComponent {
1840
1846
  this.filteredAvailableColumns = [...this.availableColumns];
1841
1847
  }
1842
1848
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableColumnsModalComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
1843
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: DataTableColumnsModalComponent, selector: "mad-data-table-columns-modal.component", ngImport: i0, template: "<h1 mat-dialog-title>{{ data?.titleLabel | translate }}</h1>\n<div mat-dialog-content>\n <div class=\"column-drag-main-content\">\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">{{ data?.infoTextLabel | translate }}</div>\n <div class=\"column-drag-container-header\">{{ 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\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div class=\"column-drag-box\" *ngFor=\"let selectedColumn of selectedColumns; let i = index\" cdkDrag [id]=\"selectedColumn.id\">\n {{ i + 1 }}. {{ selectedColumn.label | translate }}\n </div>\n </div>\n </div>\n\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">\n <!-- Table filter -->\n <mat-form-field>\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 <button *ngIf=\"searchFilter\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterValue()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n <div class=\"column-drag-container-header\">{{ data?.availableLabel | translate }}</div>\n <div\n cdkDropList\n cdkDropListSortingDisabled\n #availableList=\"cdkDropList\"\n [cdkDropListData]=\"availableColumns\"\n [cdkDropListConnectedTo]=\"[selectedList]\"\n class=\"column-drag-list\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div *ngFor=\"let availableColumn of filteredAvailableColumns\" class=\"column-drag-box\" cdkDrag [id]=\"availableColumn.id\">\n {{ availableColumn.label }}\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions [align]=\"'end'\">\n <mad-outline-button (click)=\"onCancel()\">\n {{ data?.cancelLabel | translate }}\n </mad-outline-button>\n <mad-danger-button *ngIf=\"data?.deleteDefinitionAllowed\" (click)=\"onDelete()\">\n {{ data?.deleteLabel | translate }}\n </mad-danger-button>\n <mad-primary-button (click)=\"onSave()\" [disabled]=\"!(this.selectedColumns?.length > 0)\">\n {{ data?.saveLabel | translate }}\n </mad-primary-button>\n</div>\n", styles: [".column-drag-main-content{display:flex;flex-direction:row;width:544px;justify-content:space-between;padding:8px 8px 16px;margin-bottom:16px;border-bottom:1px solid whitesmoke}.column-drag-container{width:256px;max-width:100%;display:inline-block;vertical-align:top;font-size:small}.info-box{width:100%;font-size:small;margin-bottom:16px;color:#000000a8}.column-drag-info-area{width:100%;height:36px;margin-bottom:32px;color:#000000a8;font-size:small;display:flex;justify-content:right;align-items:stretch;flex-direction:column}.column-drag-list{border:solid 1px #ccc;height:200px;box-sizing:border-box;background:white;border-radius:4px;overflow:auto;display:block}.column-drag-container-header{font-weight:700;margin-bottom:4px}.column-drag-box{padding:12px 10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;height:40px;cursor:move;background:white;font-size:14px}.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: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: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["type", "disabled", "title", "color"] }, { kind: "component", type: DangerButtonComponent, selector: "mad-danger-button", inputs: ["type", "disabled", "title"] }, { kind: "directive", type: i10.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i10.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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: "pipe", type: i2$2.TranslatePipe, name: "translate" }] }); }
1849
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: DataTableColumnsModalComponent, isStandalone: true, selector: "mad-data-table-columns-modal.component", ngImport: i0, template: "<h1 mat-dialog-title>{{ data.titleLabel | translate }}</h1>\n<div mat-dialog-content>\n <div class=\"column-drag-main-content\">\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">{{ data.infoTextLabel | translate }}</div>\n <div class=\"column-drag-container-header\">{{ 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\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div class=\"column-drag-box\" *ngFor=\"let selectedColumn of selectedColumns; let i = index\" cdkDrag [id]=\"selectedColumn.id\">\n {{ i + 1 }}. {{ selectedColumn.label | translate }}\n </div>\n </div>\n </div>\n\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">\n <!-- Table filter -->\n <mat-form-field>\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 <button *ngIf=\"searchFilter\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterValue()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n <div class=\"column-drag-container-header\">{{ data.availableLabel | translate }}</div>\n <div\n cdkDropList\n cdkDropListSortingDisabled\n #availableList=\"cdkDropList\"\n [cdkDropListData]=\"availableColumns\"\n [cdkDropListConnectedTo]=\"[selectedList]\"\n class=\"column-drag-list\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div *ngFor=\"let availableColumn of filteredAvailableColumns\" class=\"column-drag-box\" cdkDrag [id]=\"availableColumn.id\">\n {{ availableColumn.label }}\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions [align]=\"'end'\">\n <mad-outline-button (click)=\"onCancel()\">\n {{ data.cancelLabel | translate }}\n </mad-outline-button>\n <mad-danger-button *ngIf=\"data.deleteDefinitionAllowed\" (click)=\"onDelete()\">\n {{ data.deleteLabel | translate }}\n </mad-danger-button>\n <mad-primary-button (click)=\"onSave()\" [disabled]=\"!((this.selectedColumns.length || 0) > 0)\">\n {{ data.saveLabel | translate }}\n </mad-primary-button>\n</div>\n", styles: [".column-drag-main-content{display:flex;flex-direction:row;width:544px;justify-content:space-between;padding:8px 8px 16px;margin-bottom:16px;border-bottom:1px solid whitesmoke}.column-drag-container{width:256px;max-width:100%;display:inline-block;vertical-align:top;font-size:small}.info-box{width:100%;font-size:small;margin-bottom:16px;color:#000000a8}.column-drag-info-area{width:100%;height:36px;margin-bottom:32px;color:#000000a8;font-size:small;display:flex;justify-content:right;align-items:stretch;flex-direction:column}.column-drag-list{border:solid 1px #ccc;height:200px;box-sizing:border-box;background:white;border-radius:4px;overflow:auto;display:block}.column-drag-container-header{font-weight:700;margin-bottom:4px}.column-drag-box{padding:12px 10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;height:40px;cursor:move;background:white;font-size:14px}.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: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: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.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])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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", inputs: ["type", "disabled", "title"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["type", "disabled", "title", "color"] }, { kind: "component", type: DangerButtonComponent, selector: "mad-danger-button", inputs: ["type", "disabled", "title"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] }); }
1844
1850
  }
1845
1851
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableColumnsModalComponent, decorators: [{
1846
1852
  type: Component,
1847
- args: [{ selector: 'mad-data-table-columns-modal.component', template: "<h1 mat-dialog-title>{{ data?.titleLabel | translate }}</h1>\n<div mat-dialog-content>\n <div class=\"column-drag-main-content\">\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">{{ data?.infoTextLabel | translate }}</div>\n <div class=\"column-drag-container-header\">{{ 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\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div class=\"column-drag-box\" *ngFor=\"let selectedColumn of selectedColumns; let i = index\" cdkDrag [id]=\"selectedColumn.id\">\n {{ i + 1 }}. {{ selectedColumn.label | translate }}\n </div>\n </div>\n </div>\n\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">\n <!-- Table filter -->\n <mat-form-field>\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 <button *ngIf=\"searchFilter\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterValue()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n <div class=\"column-drag-container-header\">{{ data?.availableLabel | translate }}</div>\n <div\n cdkDropList\n cdkDropListSortingDisabled\n #availableList=\"cdkDropList\"\n [cdkDropListData]=\"availableColumns\"\n [cdkDropListConnectedTo]=\"[selectedList]\"\n class=\"column-drag-list\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div *ngFor=\"let availableColumn of filteredAvailableColumns\" class=\"column-drag-box\" cdkDrag [id]=\"availableColumn.id\">\n {{ availableColumn.label }}\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions [align]=\"'end'\">\n <mad-outline-button (click)=\"onCancel()\">\n {{ data?.cancelLabel | translate }}\n </mad-outline-button>\n <mad-danger-button *ngIf=\"data?.deleteDefinitionAllowed\" (click)=\"onDelete()\">\n {{ data?.deleteLabel | translate }}\n </mad-danger-button>\n <mad-primary-button (click)=\"onSave()\" [disabled]=\"!(this.selectedColumns?.length > 0)\">\n {{ data?.saveLabel | translate }}\n </mad-primary-button>\n</div>\n", styles: [".column-drag-main-content{display:flex;flex-direction:row;width:544px;justify-content:space-between;padding:8px 8px 16px;margin-bottom:16px;border-bottom:1px solid whitesmoke}.column-drag-container{width:256px;max-width:100%;display:inline-block;vertical-align:top;font-size:small}.info-box{width:100%;font-size:small;margin-bottom:16px;color:#000000a8}.column-drag-info-area{width:100%;height:36px;margin-bottom:32px;color:#000000a8;font-size:small;display:flex;justify-content:right;align-items:stretch;flex-direction:column}.column-drag-list{border:solid 1px #ccc;height:200px;box-sizing:border-box;background:white;border-radius:4px;overflow:auto;display:block}.column-drag-container-header{font-weight:700;margin-bottom:4px}.column-drag-box{padding:12px 10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;height:40px;cursor:move;background:white;font-size:14px}.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: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"] }]
1853
+ args: [{ selector: 'mad-data-table-columns-modal.component', standalone: true, imports: [CommonModule, DragDropModule, MatFormFieldModule, MatIconModule, FormsModule, ButtonModule, TranslateModule], template: "<h1 mat-dialog-title>{{ data.titleLabel | translate }}</h1>\n<div mat-dialog-content>\n <div class=\"column-drag-main-content\">\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">{{ data.infoTextLabel | translate }}</div>\n <div class=\"column-drag-container-header\">{{ 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\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div class=\"column-drag-box\" *ngFor=\"let selectedColumn of selectedColumns; let i = index\" cdkDrag [id]=\"selectedColumn.id\">\n {{ i + 1 }}. {{ selectedColumn.label | translate }}\n </div>\n </div>\n </div>\n\n <div class=\"column-drag-container\">\n <div class=\"column-drag-info-area\">\n <!-- Table filter -->\n <mat-form-field>\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 <button *ngIf=\"searchFilter\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterValue()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n <div class=\"column-drag-container-header\">{{ data.availableLabel | translate }}</div>\n <div\n cdkDropList\n cdkDropListSortingDisabled\n #availableList=\"cdkDropList\"\n [cdkDropListData]=\"availableColumns\"\n [cdkDropListConnectedTo]=\"[selectedList]\"\n class=\"column-drag-list\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n <div *ngFor=\"let availableColumn of filteredAvailableColumns\" class=\"column-drag-box\" cdkDrag [id]=\"availableColumn.id\">\n {{ availableColumn.label }}\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions [align]=\"'end'\">\n <mad-outline-button (click)=\"onCancel()\">\n {{ data.cancelLabel | translate }}\n </mad-outline-button>\n <mad-danger-button *ngIf=\"data.deleteDefinitionAllowed\" (click)=\"onDelete()\">\n {{ data.deleteLabel | translate }}\n </mad-danger-button>\n <mad-primary-button (click)=\"onSave()\" [disabled]=\"!((this.selectedColumns.length || 0) > 0)\">\n {{ data.saveLabel | translate }}\n </mad-primary-button>\n</div>\n", styles: [".column-drag-main-content{display:flex;flex-direction:row;width:544px;justify-content:space-between;padding:8px 8px 16px;margin-bottom:16px;border-bottom:1px solid whitesmoke}.column-drag-container{width:256px;max-width:100%;display:inline-block;vertical-align:top;font-size:small}.info-box{width:100%;font-size:small;margin-bottom:16px;color:#000000a8}.column-drag-info-area{width:100%;height:36px;margin-bottom:32px;color:#000000a8;font-size:small;display:flex;justify-content:right;align-items:stretch;flex-direction:column}.column-drag-list{border:solid 1px #ccc;height:200px;box-sizing:border-box;background:white;border-radius:4px;overflow:auto;display:block}.column-drag-container-header{font-weight:700;margin-bottom:4px}.column-drag-box{padding:12px 10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;height:40px;cursor:move;background:white;font-size:14px}.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: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"] }]
1848
1854
  }], ctorParameters: () => [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
1849
1855
  type: Inject,
1850
1856
  args: [MAT_DIALOG_DATA]
@@ -1856,140 +1862,85 @@ class DataTableActionType {
1856
1862
  static { this.NONE = 'NONE'; }
1857
1863
  }
1858
1864
 
1859
- class DataTableComponent {
1860
- set filterValue(filterValue) {
1861
- const filterString = '' + filterValue;
1862
- if (this.dataSource) {
1863
- this.setFilterValue(filterString);
1864
- }
1865
- }
1866
- set displayedColumns(cols) {
1867
- if (!this.displayedColumnDefinition) {
1868
- this.columns = cols ? [...cols] : [];
1869
- this.columnIds = this.columns.map((column) => column.id);
1870
- this.columnIds.unshift(this.ACTION_COLUMN_NAME);
1871
- }
1865
+ class DataTableFilter {
1866
+ constructor() {
1867
+ this.filterChange = new EventEmitter();
1868
+ this.filterables = new Map();
1872
1869
  }
1873
- set displayedColumnDefinition(def) {
1874
- this.selectedColumnDefinion = def;
1875
- this.columns = def.displayedColumns;
1876
- this.columnIds = this.columns.map((column) => column.id);
1877
- this.columnIds.unshift(this.ACTION_COLUMN_NAME);
1870
+ register(filterable) {
1871
+ this.filterables.set(filterable.id, filterable);
1878
1872
  }
1879
- set tableData(data) {
1880
- const dataArray = data ? data : [];
1881
- if (!this.dataSource) {
1882
- this.dataSource = new MatTableDataSource(dataArray);
1883
- }
1884
- this.createDataMapsAndSetDisplayedDataSourceData(dataArray);
1873
+ unregister(filterable) {
1874
+ this.filterables.delete(filterable.id);
1885
1875
  }
1886
- set page(page) {
1887
- this.paginatorPageIndex = page.pageIndex;
1888
- this.paginatorPageSize = page.pageSize;
1889
- this.paginatorLength = page.length;
1876
+ changeFilter() {
1877
+ this.filterChange.emit(this.createFilter());
1890
1878
  }
1891
- set columnDefinitions(definitions) {
1892
- this.editableColumnDefinitions = [];
1893
- this.viewableColumnDefinitions = [];
1894
- this.allColumnDefinitions = [...definitions];
1895
- for (const definition of definitions) {
1896
- if (definition.editable) {
1897
- this.editableColumnDefinitions.push(definition);
1898
- }
1899
- if (definition.displayedColumns?.length > 0) {
1900
- this.viewableColumnDefinitions.push(definition);
1901
- }
1879
+ updateFilterables(dataTableFilterObject) {
1880
+ if (!!dataTableFilterObject) {
1881
+ Object.entries(dataTableFilterObject).forEach(([key, value]) => {
1882
+ const filterable = this.filterables.get(key);
1883
+ if (!!filterable) {
1884
+ filterable.filterValue = value;
1885
+ }
1886
+ });
1902
1887
  }
1903
- }
1904
- set loading(isLoading) {
1905
- this.isLoading = isLoading;
1906
- }
1907
- set defaultPageSize(defaultSize) {
1908
- this.paginatorPageSize = defaultSize;
1909
- }
1910
- set externalPaginator(paginator) {
1911
- this.extPaginator = paginator;
1912
- }
1913
- set paginationEnabled(isPaginationEnabled) {
1914
- this.isPaginationEnabled = isPaginationEnabled;
1915
- this.unsetPageSizeIfNecessary();
1916
- }
1917
- set allColumns(allColumns) {
1918
- this.allAvailableColumns = allColumns;
1919
- if (allColumns && this.showColumnModal) {
1920
- this.openColumnModal();
1888
+ else {
1889
+ this.filterables.forEach((value) => (value.filterValue = null));
1921
1890
  }
1922
1891
  }
1923
- set filterEnabled(isFilterEnabled) {
1924
- this.isFilterEnabled = !this.useAsync ? isFilterEnabled : false;
1925
- this.setFilterValue(undefined);
1892
+ createFilter() {
1893
+ return Array.from(this.filterables.values()).reduce((result, current) => ({ ...result, [current.id]: current.filterValue }), {});
1926
1894
  }
1927
- set forceMode(mode) {
1928
- if (mode === this.SINGLE || mode === this.BATCH || mode === this.NONE) {
1929
- this._forceMode = mode;
1930
- this.mode = mode;
1931
- this.selectionModel.clear();
1932
- this.setActions();
1933
- }
1895
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1896
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableFilter, isStandalone: true, selector: "[madFilter]", outputs: { filterChange: "madFilterChange" }, ngImport: i0 }); }
1897
+ }
1898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilter, decorators: [{
1899
+ type: Directive,
1900
+ args: [{
1901
+ selector: '[madFilter]',
1902
+ standalone: true,
1903
+ }]
1904
+ }], propDecorators: { filterChange: [{
1905
+ type: Output,
1906
+ args: ['madFilterChange']
1907
+ }] } });
1908
+
1909
+ class DataTableSortUtil {
1910
+ static sortData(dateTimeFormat, numberFormat) {
1911
+ return (tableData, matSort) => [...tableData].sort((a, b) => DataTableSortUtil.compare(a, b, matSort, dateTimeFormat, numberFormat));
1934
1912
  }
1935
- constructor(matDialog) {
1936
- this.matDialog = matDialog;
1937
- // Translations
1938
- this.filterLabel = 'Filter';
1939
- this.filterPlaceholder = '';
1940
- this.filterColumnsLabel = 'Filter';
1941
- this.filterColumnsPlaceHolder = 'Filter available columns';
1942
- this.noDataText = 'No matching data found';
1943
- this.columnSettingsModalTitleLabel = 'Column settings';
1944
- this.selectedLabel = 'Selected columns';
1945
- this.availableLabel = 'Available columns';
1946
- this.saveLabel = 'Save';
1947
- this.deleteLabel = 'Delete';
1948
- this.cancelLabel = 'Cancel';
1949
- this.infoTextLabel = 'Drag and drop a column to select or reorder it.';
1950
- this.pageSizeOptions = [5, 10, 15];
1951
- this.actions = [];
1952
- this.deleteDefinitionAllowed = false;
1953
- this.useAsync = false;
1954
- this.translateLabels = true;
1955
- this.sortEvent = new EventEmitter();
1956
- this.actionEvent = new EventEmitter();
1957
- this.pageEvent = new EventEmitter();
1958
- this.allColumnsEvent = new EventEmitter();
1959
- this.columnDefinitionChangeEvent = new EventEmitter();
1960
- this.viewDefinitionChangeEvent = new EventEmitter();
1961
- this.ACTION_COLUMN_NAME = '__action__';
1962
- this.SINGLE = DataTableActionType.SINGLE;
1963
- this.BATCH = DataTableActionType.BATCH;
1964
- this.NONE = DataTableActionType.NONE;
1965
- this.tableActions = [];
1966
- this.rowActions = [];
1967
- this.columns = [];
1968
- this.allSelected = false;
1969
- this.rowMap = new Map();
1970
- this.selectionModel = new SelectionModel(true);
1971
- this.allColumnDefinitions = [];
1972
- this.isFilterEnabled = false;
1973
- this.isPaginationEnabled = false;
1974
- this.mode = this.NONE;
1975
- this.isRowClickable = false;
1976
- this.showColumnModal = false;
1977
- this.isLoading = false;
1978
- this.paginatorLength = 0;
1979
- this.paginatorPageIndex = 0;
1980
- this.paginatorPageSize = 50;
1981
- }
1982
- static compare(a, b, sort) {
1913
+ static sortNothing() {
1914
+ return (tableData, _) => tableData;
1915
+ }
1916
+ static compare(a, b, sort, dateTimeFormat, numberFormat) {
1983
1917
  const x = a[sort.active];
1984
1918
  const y = b[sort.active];
1985
1919
  const ascending = sort.direction === 'asc';
1986
1920
  switch (typeof x) {
1987
1921
  case 'number':
1988
- return DataTableComponent.compareNumber(x, y, ascending);
1989
- case 'string':
1990
- return DataTableComponent.compareString(x, y, ascending);
1922
+ if (typeof y !== 'number') {
1923
+ return DataTableSortUtil.compareString(String(x), y, ascending);
1924
+ }
1925
+ return DataTableSortUtil.compareNumber(x, y, ascending);
1926
+ case 'string': {
1927
+ const stringY = String(y);
1928
+ // a string could be a date
1929
+ const dateX = DateTime.fromFormat(x, dateTimeFormat);
1930
+ const dateY = DateTime.fromFormat(stringY, dateTimeFormat);
1931
+ // .. but also a formatted number
1932
+ const numberX = DataTableSortUtil.parseNumber(x, numberFormat);
1933
+ const numberY = DataTableSortUtil.parseNumber(y, numberFormat);
1934
+ if (dateX.isValid && dateY.isValid) {
1935
+ return DataTableSortUtil.compareDate(dateX, dateY, ascending);
1936
+ }
1937
+ if (typeof numberX === 'number' && typeof numberY === 'number') {
1938
+ return DataTableSortUtil.compareNumber(numberX, numberY, ascending);
1939
+ }
1940
+ return DataTableSortUtil.compareString(x, stringY, ascending);
1941
+ }
1991
1942
  case 'boolean':
1992
- return DataTableComponent.compareBoolean(x, y, ascending);
1943
+ return DataTableSortUtil.compareBoolean(x, y, ascending);
1993
1944
  default:
1994
1945
  // cannot compare -> return equal
1995
1946
  return 0;
@@ -1998,6 +1949,9 @@ class DataTableComponent {
1998
1949
  static compareNumber(x, y, ascending) {
1999
1950
  return ascending ? x - y : y - x;
2000
1951
  }
1952
+ static compareDate(x, y, ascending) {
1953
+ return DataTableSortUtil.compareNumber(+x, +y, ascending);
1954
+ }
2001
1955
  static compareString(x, y, ascending) {
2002
1956
  return ascending ? x.localeCompare(y) : y.localeCompare(x);
2003
1957
  }
@@ -2014,267 +1968,1031 @@ class DataTableComponent {
2014
1968
  return x ? 1 : -1;
2015
1969
  }
2016
1970
  }
1971
+ static parseNumber(value, numberFormat) {
1972
+ const sanitized = value
1973
+ .replace(numberFormat.groupingSeparator, '')
1974
+ .replace(numberFormat.decimalSeparator, '.')
1975
+ .replace(new RegExp(numberFormat.units.join('|')), '');
1976
+ const numberValue = Number(sanitized);
1977
+ if (typeof numberValue === 'number' && !isNaN(numberValue)) {
1978
+ return numberValue;
1979
+ }
1980
+ return value;
1981
+ }
1982
+ }
1983
+
1984
+ class DataTableActionUtil {
1985
+ static getDisplayActions(actions, selectionMode) {
1986
+ const rowActions = [];
1987
+ const tableActions = [];
1988
+ for (const action of actions) {
1989
+ if (selectionMode !== action.hiddenInMode) {
1990
+ switch (action.type) {
1991
+ case 'SINGLE':
1992
+ if (selectionMode === 'SINGLE') {
1993
+ rowActions.push(action);
1994
+ }
1995
+ else {
1996
+ tableActions.push(action);
1997
+ }
1998
+ break;
1999
+ case 'BATCH':
2000
+ if (selectionMode !== 'SINGLE') {
2001
+ tableActions.push(action);
2002
+ }
2003
+ break;
2004
+ default:
2005
+ tableActions.push(action);
2006
+ }
2007
+ }
2008
+ }
2009
+ return {
2010
+ rowActions: rowActions,
2011
+ groupedTableActions: DataTableActionUtil.getGroupedTableActions(tableActions),
2012
+ };
2013
+ }
2014
+ static getGroupedTableActions(tableActions) {
2015
+ return Object.values(tableActions.reduce((result, current) => {
2016
+ const index = Object.entries(result).findIndex(([, actions]) => actions.find((it) => !!current.groupId && it.groupId === current.groupId));
2017
+ const key = index !== -1 ? index : Object.keys(result).length || 0;
2018
+ (result[key] = result[key] || []).push(current);
2019
+ return result;
2020
+ }, {}));
2021
+ }
2022
+ }
2023
+
2024
+ class DataTableDataUtil {
2025
+ static updateRowMap(rowMap, data, columns, idGenerator, parentIdGenerator) {
2026
+ rowMap.clear();
2027
+ data?.forEach((it) => {
2028
+ const rowId = DataTableDataUtil.createRowId(it, idGenerator);
2029
+ const dataRow = DataTableDataUtil.createDataTableRow(it, rowId, parentIdGenerator, columns);
2030
+ rowMap.set(rowId, dataRow);
2031
+ });
2032
+ return rowMap;
2033
+ }
2034
+ static createRowId(data, idGenerator) {
2035
+ let id;
2036
+ if (!!idGenerator) {
2037
+ id = idGenerator(data);
2038
+ }
2039
+ return (!!id ? id : v4()).toString();
2040
+ }
2041
+ static createDataTableRow(data, rowId, parentIdGenerator, columns) {
2042
+ const parentId = parentIdGenerator ? parentIdGenerator(data) : undefined;
2043
+ const displayedData = DataTableDataUtil.createDisplayedData(rowId, parentId, data, columns);
2044
+ const dataRow = {
2045
+ id: rowId,
2046
+ parentId: parentId,
2047
+ actualData: data,
2048
+ displayedData: displayedData,
2049
+ };
2050
+ return dataRow;
2051
+ }
2052
+ static createDisplayedData(rowId, parentId, actualDataElement, columns) {
2053
+ const displayedData = {};
2054
+ displayedData['rowId'] = rowId;
2055
+ displayedData['parentId'] = parentId;
2056
+ // keep non displayed data in row
2057
+ for (const key of Object.keys(actualDataElement)) {
2058
+ const column = columns.find((it) => it.dataPropertyName === key);
2059
+ const actualValue = actualDataElement[key];
2060
+ displayedData[key] = DataTableDataUtil.transformData(actualValue, column?.transformer, column?.transformerParams);
2061
+ }
2062
+ return displayedData;
2063
+ }
2017
2064
  static transformData(value, transformer, transformerParams) {
2018
2065
  if (!transformer || !(transformer instanceof Function)) {
2019
2066
  return value;
2020
2067
  }
2021
2068
  return transformer(value, transformerParams);
2022
2069
  }
2023
- static generateRowId() {
2024
- return v4();
2070
+ }
2071
+
2072
+ class DataTableFilterUtil {
2073
+ static columnBasedFilterPredicate(rowMap) {
2074
+ return (row, filterString) => {
2075
+ const actualData = rowMap.get(row.rowId)?.actualData;
2076
+ const displayedData = row;
2077
+ const filters = JSON.parse(filterString);
2078
+ return Object.entries(filters).every(([key, value]) => !value || this.contains(actualData, key, value) || this.contains(displayedData, key, value));
2079
+ };
2025
2080
  }
2026
- static isClickOnRowMenuIcon(event) {
2027
- return event?.target?.classList.contains('mat-icon');
2081
+ static tableBasedFilterPredicate() {
2082
+ return (data, filter) => {
2083
+ const transform = (str) => str
2084
+ .trim()
2085
+ .toLowerCase()
2086
+ .replace(/^"(.*)"$/, '$1');
2087
+ const dataStr = transform(JSON.stringify(data));
2088
+ return dataStr.indexOf(transform(filter)) != -1;
2089
+ };
2028
2090
  }
2029
- ngOnInit() {
2030
- this.mode = this.getTableMode();
2031
- this.setActions();
2032
- if (this.mode !== this.NONE) {
2033
- this.isRowClickable = true;
2034
- this.defaultAction = this.rowActions[0];
2035
- }
2091
+ static contains(data, key, searchTerm) {
2092
+ return (String(data[key]) ?? '').toLowerCase().includes(searchTerm.toLowerCase());
2036
2093
  }
2037
- ngAfterViewInit() {
2038
- if (!this.useAsync) {
2039
- this.dataSource.paginator = this.paginator;
2040
- this.dataSource.sort = this.sort;
2041
- }
2094
+ }
2095
+
2096
+ class DataTablePersistenceService {
2097
+ constructor() {
2098
+ this.sortKey = 'sort';
2099
+ this.filterKey = 'filter';
2100
+ this.pageSizeKey = 'pageSize';
2042
2101
  }
2043
- onColumnSettings(definition) {
2044
- this.showColumnModal = true;
2045
- this.selectedDefinition = definition ? definition : this.allColumnDefinitions[0];
2046
- if (this.allAvailableColumns) {
2047
- this.openColumnModal();
2102
+ saveSort(tableId, sort) {
2103
+ this.save(this.getId(tableId, this.sortKey), sort);
2104
+ }
2105
+ loadSort(tableId) {
2106
+ return this.load(this.getId(tableId, this.sortKey));
2107
+ }
2108
+ saveFilter(tableId, filter) {
2109
+ this.save(this.getId(tableId, this.filterKey), filter);
2110
+ }
2111
+ loadFilter(tableId) {
2112
+ return this.load(this.getId(tableId, this.filterKey));
2113
+ }
2114
+ savePageSize(tableId, pageSize) {
2115
+ this.save(this.getId(tableId, this.pageSizeKey), pageSize);
2116
+ }
2117
+ loadPageSize(tableId) {
2118
+ return this.load(this.getId(tableId, this.pageSizeKey));
2119
+ }
2120
+ save(id, item) {
2121
+ if (!!item) {
2122
+ localStorage.setItem(id, JSON.stringify(item));
2048
2123
  }
2049
2124
  else {
2050
- // if no complete definitions have been loaded yet send an event so the app can load it
2051
- this.allColumnsEvent.emit();
2125
+ localStorage.removeItem(id);
2052
2126
  }
2053
2127
  }
2054
- onViewDefinition(definition) {
2055
- this.selectedDefinition = definition;
2056
- this.viewDefinitionChangeEvent.emit(definition);
2128
+ load(id) {
2129
+ const item = localStorage.getItem(id);
2130
+ return !!item ? JSON.parse(item) : undefined;
2057
2131
  }
2058
- isCurrentDefinition(definition) {
2059
- return this.selectedDefinition && this.selectedDefinition.id === definition.id;
2132
+ getId(tableId, key) {
2133
+ return `${tableId}.${key}`;
2060
2134
  }
2061
- get selectedCount() {
2062
- return this.selectionModel?.selected ? this.selectionModel.selected.length : 0;
2135
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTablePersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2136
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTablePersistenceService, providedIn: 'root' }); }
2137
+ }
2138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTablePersistenceService, decorators: [{
2139
+ type: Injectable,
2140
+ args: [{
2141
+ providedIn: 'root',
2142
+ }]
2143
+ }] });
2144
+ const MAD_DATA_TABLE_PERSISTENCE_SERVICE = new InjectionToken('mad-data-table-persistence-service');
2145
+ function DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER_FACTORY(persistenceService) {
2146
+ return persistenceService || new DataTablePersistenceService();
2147
+ }
2148
+ const DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER = {
2149
+ // If there is a custom DataTablePersistenceService available, use that. Otherwise, provide the "local storage" default one.
2150
+ provide: MAD_DATA_TABLE_PERSISTENCE_SERVICE,
2151
+ deps: [[new Optional(), new SkipSelf(), new Inject(MAD_DATA_TABLE_PERSISTENCE_SERVICE)]],
2152
+ useFactory: DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER_FACTORY,
2153
+ };
2154
+
2155
+ const MAD_DATA_TABLE_GLOBAL_CONFIGURATION = new InjectionToken('mad-data-table-global-configuration');
2156
+ // If there is a custom DATA_TABLE_CONFIG_PROVIDER available, use that. Otherwise, provide the default one.
2157
+ const MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER = {
2158
+ provide: MAD_DATA_TABLE_GLOBAL_CONFIGURATION,
2159
+ deps: [[new Optional(), new SkipSelf(), new Inject(MAD_DATA_TABLE_GLOBAL_CONFIGURATION)]],
2160
+ useFactory: (dataTableConfig) => dataTableConfig ?? {
2161
+ dateTimeFormat: dataTableConfig.dateTimeFormat ?? 'dd.MM.yyyy',
2162
+ numberFormat: dataTableConfig.numberFormat ?? {
2163
+ decimalSeparator: ',',
2164
+ groupingSeparator: '.',
2165
+ units: ['€', '$'],
2166
+ },
2167
+ },
2168
+ };
2169
+
2170
+ class DataTableFilterDialogComponent {
2171
+ set filterValue(value) {
2172
+ this.control.setValue(value);
2173
+ }
2174
+ constructor() {
2175
+ this.filterChanged = new EventEmitter();
2176
+ this.control = new FormControl(null);
2177
+ this._subscription = new Subscription();
2178
+ this._subscription.add(this.control.valueChanges.subscribe((value) => this.filterChanged.emit(value)));
2063
2179
  }
2064
- get rowCount() {
2065
- return this.getAllDataSourceRowsOfCurrentPage() ? this.getAllDataSourceRowsOfCurrentPage().length : 0;
2180
+ ngOnDestroy() {
2181
+ this._subscription.unsubscribe();
2066
2182
  }
2067
- getAllDataSourceRowsOfCurrentPage() {
2068
- return this.dataSource?._pageData(this.dataSource.data);
2183
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilterDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2184
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: DataTableFilterDialogComponent, isStandalone: true, selector: "mad-data-table-filter-dialog", inputs: { filterOptions: "filterOptions", filterValue: "filterValue" }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"filter-dialog-box\">\n <ng-container *ngIf=\"!filterOptions?.length; else selectInput\">\n <mat-form-field class=\"filter-dialog-input\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <input matInput type=\"text\" required=\"false\" [formControl]=\"control\" />\n </mat-form-field>\n </ng-container>\n</div>\n\n<ng-template #selectInput>\n <mat-form-field class=\"filter-dialog-input\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <mat-select [formControl]=\"control\">\n <mat-option></mat-option>\n <mat-option *ngFor=\"let entry of filterOptions\" [value]=\"entry.key\">{{ entry.label }}</mat-option>\n </mat-select>\n </mat-form-field>\n</ng-template>\n", styles: [".container{position:relative;width:12px;height:12px;margin:5px 0 5px 5px}.overlay{position:absolute;width:12px;height:12px;background-color:#fff;display:flex;align-items:center}.mat-icon{position:relative;display:flex;align-items:center;font-size:1em;color:#757575}.filter-dialog-box{display:flex;align-items:center;width:auto;height:80px;padding:12px 12px 0;margin-top:22px;background-color:#fff;box-shadow:0 1px 3px #0000000d}.filter-dialog-input{width:auto;max-width:180px;margin:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "aria-describedby", "panelClass", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.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])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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$2.TranslatePipe, name: "translate" }] }); }
2185
+ }
2186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilterDialogComponent, decorators: [{
2187
+ type: Component,
2188
+ args: [{ selector: 'mad-data-table-filter-dialog', standalone: true, imports: [CommonModule, MatFormFieldModule, MatInputModule, MatSelectModule, FormsModule, ReactiveFormsModule, TranslateModule], template: "<div class=\"filter-dialog-box\">\n <ng-container *ngIf=\"!filterOptions?.length; else selectInput\">\n <mat-form-field class=\"filter-dialog-input\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <input matInput type=\"text\" required=\"false\" [formControl]=\"control\" />\n </mat-form-field>\n </ng-container>\n</div>\n\n<ng-template #selectInput>\n <mat-form-field class=\"filter-dialog-input\">\n <mat-label>{{ 'common.filter.term' | translate }}</mat-label>\n <mat-select [formControl]=\"control\">\n <mat-option></mat-option>\n <mat-option *ngFor=\"let entry of filterOptions\" [value]=\"entry.key\">{{ entry.label }}</mat-option>\n </mat-select>\n </mat-form-field>\n</ng-template>\n", styles: [".container{position:relative;width:12px;height:12px;margin:5px 0 5px 5px}.overlay{position:absolute;width:12px;height:12px;background-color:#fff;display:flex;align-items:center}.mat-icon{position:relative;display:flex;align-items:center;font-size:1em;color:#757575}.filter-dialog-box{display:flex;align-items:center;width:auto;height:80px;padding:12px 12px 0;margin-top:22px;background-color:#fff;box-shadow:0 1px 3px #0000000d}.filter-dialog-input{width:auto;max-width:180px;margin:auto}\n"] }]
2189
+ }], ctorParameters: () => [], propDecorators: { filterOptions: [{
2190
+ type: Input
2191
+ }], filterValue: [{
2192
+ type: Input
2193
+ }], filterChanged: [{
2194
+ type: Output
2195
+ }] } });
2196
+
2197
+ class FilterComponent {
2198
+ constructor(elementRef) {
2199
+ this.elementRef = elementRef;
2200
+ this.filterValueChange = new EventEmitter();
2069
2201
  }
2070
- getSelectedCount(actionType) {
2071
- const count = this.selectedCount;
2072
- if (actionType !== this.BATCH || count < 2) {
2073
- return '';
2074
- }
2075
- return ' (' + count + ')';
2202
+ toggleFilter(event) {
2203
+ event.preventDefault();
2204
+ this.showFilterDialog = !this.showFilterDialog;
2076
2205
  }
2077
- isDisabled(actionType) {
2078
- switch (actionType) {
2079
- case this.SINGLE:
2080
- return this.selectedCount !== 1;
2081
- case this.BATCH:
2082
- return this.selectedCount < 1;
2083
- default:
2084
- return false;
2085
- }
2206
+ onFilterChanged(filterValue) {
2207
+ this.isActive = !!filterValue;
2208
+ this.filterValue = filterValue;
2209
+ this.filterValueChange.emit(this.filterValue);
2086
2210
  }
2087
- onToggleSelectAll() {
2088
- // clear all selection first
2089
- this.selectionModel.clear();
2090
- // toggle all checkbox
2091
- this.allSelected = !this.allSelected;
2092
- if (this.allSelected) {
2093
- // select all rows of the current page
2094
- this.getAllDataSourceRowsOfCurrentPage().forEach((row) => {
2095
- if (!row.parentId) {
2096
- this.selectionModel.select('' + row.rowId);
2097
- }
2098
- });
2211
+ onClick(event) {
2212
+ if (!this.elementRef.nativeElement.contains(event.target)) {
2213
+ this.showFilterDialog = false;
2099
2214
  }
2100
2215
  }
2101
- isSelected(rowId) {
2102
- return this.selectionModel.isSelected(rowId);
2216
+ get opacity() {
2217
+ return this.isActive ? '1' : this.isHovered || this.showFilterDialog ? '0.54' : '0';
2103
2218
  }
2104
- setFilterValue(value) {
2105
- if (this.dataSource) {
2106
- this.dataSource.filter = value?.trim().toLowerCase();
2107
- }
2219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FilterComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
2220
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: FilterComponent, isStandalone: true, selector: "mad-data-table-filter", outputs: { filterValueChange: "filterValueChange" }, host: { listeners: { "document:click": "onClick($event)" } }, ngImport: i0, template: "<div class=\"container\">\n <div class=\"overlay\" [style.opacity]=\"opacity\">\n <mat-icon fontSet=\"material-icons-outlined\" (click)=\"toggleFilter($event)\">filter_alt</mat-icon>\n </div>\n <mad-data-table-filter-dialog\n class=\"filter-dialog\"\n [filterOptions]=\"filterOptions\"\n [hidden]=\"!showFilterDialog\"\n [filterValue]=\"filterValue\"\n (filterChanged)=\"onFilterChanged($event)\"\n />\n</div>\n", styles: [".container{position:relative;width:12px;height:12px}.overlay{position:absolute;width:12px;height:12px;background-color:#fff;display:flex;align-items:center}.mat-icon{position:relative;display:flex;align-items:center;font-size:1em;color:#757575}.filter-dialog{position:absolute;margin-top:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DataTableFilterDialogComponent, selector: "mad-data-table-filter-dialog", inputs: ["filterOptions", "filterValue"], outputs: ["filterChanged"] }] }); }
2221
+ }
2222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FilterComponent, decorators: [{
2223
+ type: Component,
2224
+ args: [{ selector: 'mad-data-table-filter', standalone: true, imports: [CommonModule, MatIconModule, DataTableFilterDialogComponent], template: "<div class=\"container\">\n <div class=\"overlay\" [style.opacity]=\"opacity\">\n <mat-icon fontSet=\"material-icons-outlined\" (click)=\"toggleFilter($event)\">filter_alt</mat-icon>\n </div>\n <mad-data-table-filter-dialog\n class=\"filter-dialog\"\n [filterOptions]=\"filterOptions\"\n [hidden]=\"!showFilterDialog\"\n [filterValue]=\"filterValue\"\n (filterChanged)=\"onFilterChanged($event)\"\n />\n</div>\n", styles: [".container{position:relative;width:12px;height:12px}.overlay{position:absolute;width:12px;height:12px;background-color:#fff;display:flex;align-items:center}.mat-icon{position:relative;display:flex;align-items:center;font-size:1em;color:#757575}.filter-dialog{position:absolute;margin-top:12px}\n"] }]
2225
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { filterValueChange: [{
2226
+ type: Output
2227
+ }], onClick: [{
2228
+ type: HostListener,
2229
+ args: ['document:click', ['$event']]
2230
+ }] } });
2231
+
2232
+ class DataTableFilterHeader {
2233
+ set madFilterOptions(filterOptions) {
2234
+ this._filterOptions = filterOptions || [];
2108
2235
  }
2109
- onRowEvent(event, row, action = this.defaultAction) {
2110
- if (row?.parentId) {
2111
- return;
2112
- }
2113
- switch (this.mode) {
2114
- case this.BATCH:
2115
- this.selectionModel.toggle(row.rowId);
2116
- break;
2117
- case this.SINGLE:
2118
- // emit the default action if the row (not the icon!) was clicked
2119
- if (!!action && !DataTableComponent.isClickOnRowMenuIcon(event)) {
2120
- const selected = [];
2121
- // if ID-generator is provided, return the ID, else return the ACTUAL data
2122
- selected.push(this.idGenerator ? row.rowId : this.rowMap.get(row.rowId)?.actualData);
2123
- this.emitTableAction(action, selected);
2124
- }
2125
- break;
2126
- default:
2127
- // do nothing if mode is NONE (or null)
2128
- return;
2129
- }
2236
+ constructor(element, viewContainerRef, renderer, madFilter, matSortHeader) {
2237
+ this.element = element;
2238
+ this.viewContainerRef = viewContainerRef;
2239
+ this.renderer = renderer;
2240
+ this.madFilter = madFilter;
2241
+ this.matSortHeader = matSortHeader;
2242
+ this._subscription = new Subscription();
2130
2243
  }
2131
- onSortingEvent(sort) {
2132
- if (this.useAsync) {
2133
- this.sortEvent.emit(sort);
2244
+ ngOnInit() {
2245
+ this._filterComponent = this.viewContainerRef.createComponent(FilterComponent);
2246
+ this._filterComponent.instance.filterOptions = this._filterOptions;
2247
+ this._filterComponent.changeDetectorRef.detectChanges();
2248
+ this.insertFilterComponent();
2249
+ this.observeFilterComponent();
2250
+ }
2251
+ ngAfterViewInit() {
2252
+ if (!!this.matSortHeader) {
2253
+ const reference = this.matSortHeader._handleClick.bind(this.matSortHeader);
2254
+ this.matSortHeader._handleClick = () => { };
2255
+ this.findArrow(this.element.nativeElement).addEventListener('click', reference);
2134
2256
  }
2135
- else {
2136
- this.internalSort(sort);
2257
+ if (!!this.madFilter) {
2258
+ this.madFilter.register(this);
2137
2259
  }
2138
2260
  }
2139
- onPageEvent(event) {
2140
- if (this.useAsync) {
2141
- this.pageEvent.emit(event);
2142
- }
2261
+ ngOnDestroy() {
2262
+ this._subscription.unsubscribe();
2263
+ this.madFilter.unregister(this);
2143
2264
  }
2144
- onTableAction(tableAction) {
2145
- if (!!tableAction) {
2146
- const selection = [];
2147
- for (const selected of this.selectionModel.selected) {
2148
- selection.push(this.idGenerator ? selected : this.rowMap.get(selected)?.actualData);
2149
- }
2150
- tableAction.selected = selection;
2151
- this.actionEvent.emit(tableAction);
2152
- }
2265
+ observeFilterComponent() {
2266
+ this._subscription.add(this._filterComponent.instance.filterValueChange.subscribe((value) => {
2267
+ this._filterValue = value;
2268
+ this.madFilter.changeFilter();
2269
+ }));
2153
2270
  }
2154
- emitTableAction(action, selected) {
2155
- const emitAction = { ...action };
2156
- if (action.type !== this.NONE) {
2157
- emitAction.selected = [...selected];
2158
- }
2159
- this.actionEvent.emit(emitAction);
2271
+ get filterValue() {
2272
+ return this._filterValue;
2160
2273
  }
2161
- generateDisplayedDataElement(rowId, parentId, actualDataElement) {
2162
- const displayedDataElement = {};
2163
- displayedDataElement.rowId = rowId;
2164
- displayedDataElement.parentId = parentId;
2165
- for (const column of this.columns) {
2166
- const actualValue = actualDataElement[column.dataPropertyName];
2167
- displayedDataElement[column.dataPropertyName] = DataTableComponent.transformData(actualValue, column.transformer, column.transformerParams);
2168
- }
2169
- return displayedDataElement;
2274
+ set filterValue(filterValue) {
2275
+ this._filterComponent.instance.filterValue = filterValue;
2276
+ this._filterComponent.changeDetectorRef.detectChanges();
2170
2277
  }
2171
- internalSort(sort) {
2172
- const sortedData = [...this.dataSource.data].sort((a, b) => DataTableComponent.compare(a, b, sort));
2173
- this.dataSource.data = [...sortedData];
2278
+ onMouseenter() {
2279
+ this._filterComponent.instance.isHovered = true;
2174
2280
  }
2175
- setActions() {
2176
- this.rowActions = [];
2177
- this.tableActions = [];
2178
- for (const action of this.actions) {
2179
- if (this.mode !== action.hiddenInMode) {
2180
- switch (action.type) {
2181
- case this.SINGLE:
2182
- if (this.mode === this.SINGLE) {
2183
- this.rowActions.push(action);
2184
- }
2185
- else {
2186
- this.tableActions.push(action);
2187
- }
2188
- break;
2189
- case this.BATCH:
2190
- if (this.mode !== this.SINGLE) {
2191
- this.tableActions.push(action);
2192
- }
2193
- break;
2194
- default:
2195
- this.tableActions.push(action);
2196
- }
2197
- }
2198
- }
2281
+ onMouseleave() {
2282
+ this._filterComponent.instance.isHovered = false;
2199
2283
  }
2200
- createDataMapsAndSetDisplayedDataSourceData(data) {
2201
- const displayedDataList = [];
2202
- this.rowMap.clear();
2203
- if (data?.length > 0) {
2204
- for (const dataEntry of data) {
2205
- const rowId = this.idGenerator ? this.idGenerator(dataEntry) : DataTableComponent.generateRowId();
2206
- const parentId = this.parentIdGenerator ? this.parentIdGenerator(dataEntry) : undefined;
2207
- const displayedDataElement = this.generateDisplayedDataElement(rowId, parentId, dataEntry);
2208
- const dataRow = {
2209
- id: rowId,
2210
- parentId: parentId,
2211
- actualData: dataEntry,
2212
- displayedData: displayedDataElement,
2213
- };
2214
- this.rowMap.set(rowId, dataRow);
2215
- displayedDataList.push(displayedDataElement);
2284
+ insertFilterComponent() {
2285
+ const componentNativeElement = this._filterComponent.location.nativeElement;
2286
+ const div = this.getWrappedHeader();
2287
+ if (!!this.matSortHeader) {
2288
+ const sortHeader = div.firstChild;
2289
+ this.renderer.insertBefore(sortHeader, componentNativeElement, sortHeader.firstChild.nextSibling);
2290
+ }
2291
+ else {
2292
+ this.renderer.appendChild(div, componentNativeElement);
2293
+ }
2294
+ }
2295
+ getWrappedHeader() {
2296
+ const headerContent = this.element.nativeElement.firstChild;
2297
+ this.renderer.removeChild(this.element.nativeElement, headerContent);
2298
+ const div = this.renderer.createElement('div');
2299
+ this.renderer.setStyle(div, 'display', 'flex');
2300
+ this.renderer.setStyle(div, 'align-items', 'center');
2301
+ if (this.madFilterColumnRightAligned) {
2302
+ this.renderer.setStyle(div, 'justify-content', 'flex-end');
2303
+ this.renderer.setStyle(headerContent.firstChild, 'justify-content', 'flex-end');
2304
+ }
2305
+ this.renderer.appendChild(div, headerContent);
2306
+ this.renderer.appendChild(this.element.nativeElement, div);
2307
+ return div;
2308
+ }
2309
+ findArrow(element) {
2310
+ return this.isArrowElement(element) ? element : this.findArrowInList(element.children);
2311
+ }
2312
+ findArrowInList(nativeElements) {
2313
+ for (let nativeElement of Array.from(nativeElements)) {
2314
+ const foundElement = this.findArrow(nativeElement);
2315
+ if (!!foundElement) {
2316
+ return foundElement;
2216
2317
  }
2217
2318
  }
2218
- this.dataSource.data = displayedDataList;
2219
- this.unsetPageSizeIfNecessary();
2319
+ return null;
2220
2320
  }
2221
- openColumnModal() {
2222
- const dialogData = {
2223
- allColumns: this.allAvailableColumns,
2224
- definition: this.selectedDefinition,
2225
- deleteDefinitionAllowed: this.deleteDefinitionAllowed,
2226
- filterColumnsLabel: this.filterColumnsLabel,
2227
- filterColumnsPlaceHolder: this.filterColumnsPlaceHolder,
2228
- noDataText: this.noDataText,
2229
- titleLabel: this.columnSettingsModalTitleLabel,
2230
- selectedLabel: this.selectedLabel,
2231
- availableLabel: this.availableLabel,
2232
- saveLabel: this.saveLabel,
2233
- deleteLabel: this.deleteLabel,
2234
- cancelLabel: this.cancelLabel,
2235
- infoTextLabel: this.infoTextLabel,
2321
+ isArrowElement(nativeElement) {
2322
+ return nativeElement.classList.contains('mat-sort-header-arrow');
2323
+ }
2324
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilterHeader, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: DataTableFilter, optional: true }, { token: i7.MatSortHeader, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2325
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableFilterHeader, isStandalone: true, selector: "th[mad-filter-header]", inputs: { id: ["mad-filter-header", "id"], madFilterColumnRightAligned: "madFilterColumnRightAligned", madFilterOptions: "madFilterOptions" }, host: { listeners: { "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()" } }, ngImport: i0 }); }
2326
+ }
2327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilterHeader, decorators: [{
2328
+ type: Directive,
2329
+ args: [{
2330
+ selector: 'th[mad-filter-header]',
2331
+ standalone: true,
2332
+ }]
2333
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: DataTableFilter, decorators: [{
2334
+ type: Optional
2335
+ }] }, { type: i7.MatSortHeader, decorators: [{
2336
+ type: Optional
2337
+ }] }], propDecorators: { id: [{
2338
+ type: Input,
2339
+ args: ['mad-filter-header']
2340
+ }], madFilterColumnRightAligned: [{
2341
+ type: Input
2342
+ }], madFilterOptions: [{
2343
+ type: Input
2344
+ }], onMouseenter: [{
2345
+ type: HostListener,
2346
+ args: ['mouseenter']
2347
+ }], onMouseleave: [{
2348
+ type: HostListener,
2349
+ args: ['mouseleave']
2350
+ }] } });
2351
+
2352
+ class DataTableTemplateColumnDefinition {
2353
+ register(cellDef) {
2354
+ this.cellDef = cellDef;
2355
+ }
2356
+ unregister() {
2357
+ this.cellDef = null;
2358
+ }
2359
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateColumnDefinition, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2360
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateColumnDefinition, isStandalone: true, selector: "[madColumnDef]", inputs: { madColumnDef: "madColumnDef" }, ngImport: i0 }); }
2361
+ }
2362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateColumnDefinition, decorators: [{
2363
+ type: Directive,
2364
+ args: [{
2365
+ selector: '[madColumnDef]',
2366
+ standalone: true,
2367
+ }]
2368
+ }], propDecorators: { madColumnDef: [{
2369
+ type: Input
2370
+ }] } });
2371
+
2372
+ class DataTableTemplateCellDefinition {
2373
+ constructor(templateRef, columnDef) {
2374
+ this.templateRef = templateRef;
2375
+ this.columnDef = columnDef;
2376
+ }
2377
+ ngOnInit() {
2378
+ this.columnDef.register(this);
2379
+ }
2380
+ ngOnDestroy() {
2381
+ this.columnDef.unregister();
2382
+ }
2383
+ getCellTemplate() {
2384
+ return this.templateRef;
2385
+ }
2386
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateCellDefinition, deps: [{ token: i0.TemplateRef }, { token: DataTableTemplateColumnDefinition }], target: i0.ɵɵFactoryTarget.Directive }); }
2387
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateCellDefinition, isStandalone: true, selector: "[madCellDef]", ngImport: i0 }); }
2388
+ }
2389
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateCellDefinition, decorators: [{
2390
+ type: Directive,
2391
+ args: [{
2392
+ selector: '[madCellDef]',
2393
+ standalone: true,
2394
+ }]
2395
+ }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: DataTableTemplateColumnDefinition }] });
2396
+
2397
+ class DataTableTemplateExpandableColumnDefinition {
2398
+ register(cellDef) {
2399
+ this.cellDef = cellDef;
2400
+ }
2401
+ unregister() {
2402
+ this.cellDef = null;
2403
+ }
2404
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateExpandableColumnDefinition, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2405
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateExpandableColumnDefinition, isStandalone: true, selector: "[madExpandableColumnDef]", inputs: { madExpandableColumnDef: "madExpandableColumnDef" }, ngImport: i0 }); }
2406
+ }
2407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateExpandableColumnDefinition, decorators: [{
2408
+ type: Directive,
2409
+ args: [{
2410
+ selector: '[madExpandableColumnDef]',
2411
+ standalone: true,
2412
+ }]
2413
+ }], propDecorators: { madExpandableColumnDef: [{
2414
+ type: Input
2415
+ }] } });
2416
+
2417
+ class DataTableTemplateExpandableCellDefinition {
2418
+ constructor(templateRef, columnDef) {
2419
+ this.templateRef = templateRef;
2420
+ this.columnDef = columnDef;
2421
+ }
2422
+ ngOnInit() {
2423
+ this.columnDef.register(this);
2424
+ }
2425
+ ngOnDestroy() {
2426
+ this.columnDef.unregister();
2427
+ }
2428
+ getCellTemplate() {
2429
+ return this.templateRef;
2430
+ }
2431
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateExpandableCellDefinition, deps: [{ token: i0.TemplateRef }, { token: DataTableTemplateExpandableColumnDefinition }], target: i0.ɵɵFactoryTarget.Directive }); }
2432
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateExpandableCellDefinition, isStandalone: true, selector: "[madExpandableCellDef]", ngImport: i0 }); }
2433
+ }
2434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateExpandableCellDefinition, decorators: [{
2435
+ type: Directive,
2436
+ args: [{
2437
+ selector: '[madExpandableCellDef]',
2438
+ standalone: true,
2439
+ }]
2440
+ }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: DataTableTemplateExpandableColumnDefinition }] });
2441
+
2442
+ class DataTableComponent {
2443
+ set useAsync(useAsync) {
2444
+ this._useAsync = useAsync;
2445
+ this.applySortData();
2446
+ }
2447
+ set selection(selection) {
2448
+ this._selection = selection;
2449
+ this.updateSelectionModel(selection);
2450
+ }
2451
+ /**
2452
+ * @deprecated
2453
+ * Please use "filterMode" instead
2454
+ */
2455
+ set filterEnabled(isFilterEnabled) {
2456
+ this._filterMode = isFilterEnabled ? 'TABLE_BASED' : 'NONE';
2457
+ this.applyFilterPredicate();
2458
+ }
2459
+ set filterMode(filterMode) {
2460
+ this._filterMode = filterMode;
2461
+ this.applyFilterPredicate();
2462
+ }
2463
+ set filterValue(filterValue) {
2464
+ this._filterValue = filterValue;
2465
+ this.applyFilterValue(this._filterValue);
2466
+ }
2467
+ set externalPaginator(paginator) {
2468
+ this.extPaginator = paginator;
2469
+ }
2470
+ set defaultPageSize(defaultSize) {
2471
+ this.page = {
2472
+ ...this.page,
2473
+ pageSize: defaultSize,
2236
2474
  };
2237
- const dialog = this.matDialog.open(DataTableColumnsModalComponent, { data: dialogData });
2238
- dialog.afterClosed().subscribe((result) => {
2239
- // no event on CANCEL
2240
- if (result) {
2241
- this.columnDefinitionChangeEvent.emit(result);
2475
+ }
2476
+ set selectionEmitMode(selectionEmitMode) {
2477
+ this._selectionEmitMode = selectionEmitMode;
2478
+ }
2479
+ /**
2480
+ * @deprecated
2481
+ * This function mixes up 2 responsibilities:
2482
+ * - determining if actions should be displayed / handled
2483
+ * - determining whether actions are row based (single) or table based (batch)
2484
+ * Please use a combination of "selectionEmitMode" and "selectionMode" instead:
2485
+ * - selectionEmitMode determines how selected items are handled (as part of actions, as selections or not at all)
2486
+ * - selectionMode determines if selected items are treated separately (single) or together (batch)
2487
+ */
2488
+ set forceMode(selectionMode) {
2489
+ if (selectionMode === 'SINGLE' || selectionMode === 'BATCH') {
2490
+ this._selectionEmitMode = 'ON_ACTION';
2491
+ this._forceSelectionMode = selectionMode;
2492
+ this._selectionModel.clear();
2493
+ }
2494
+ }
2495
+ set forceSelectionMode(selectionMode) {
2496
+ this._forceSelectionMode = selectionMode;
2497
+ this._selectionModel.clear();
2498
+ }
2499
+ set displayedColumns(cols) {
2500
+ if (!this.displayedColumnDefinition) {
2501
+ this.columns = cols ? [...cols] : [];
2502
+ this.columnIds = this.columns.map((column) => column.id);
2503
+ this.columnIds.unshift(this.ACTION_COLUMN_NAME);
2504
+ }
2505
+ }
2506
+ set displayedColumnDefinition(def) {
2507
+ this.columns = def.displayedColumns;
2508
+ this.columnIds = this.columns.map((column) => column.id);
2509
+ this.columnIds.unshift(this.ACTION_COLUMN_NAME);
2510
+ this._selectedColumnDefinition = def;
2511
+ }
2512
+ set columnDefinitions(definitions) {
2513
+ this.editableColumnDefinitions = [];
2514
+ this.viewableColumnDefinitions = [];
2515
+ this._allColumnDefinitions = [...definitions];
2516
+ for (const definition of definitions) {
2517
+ if (definition.editable) {
2518
+ this.editableColumnDefinitions.push(definition);
2519
+ }
2520
+ if (definition.displayedColumns?.length > 0) {
2521
+ this.viewableColumnDefinitions.push(definition);
2522
+ }
2523
+ }
2524
+ }
2525
+ set allColumns(allColumns) {
2526
+ this._allAvailableColumns = allColumns;
2527
+ if (allColumns && this._showColumnModal) {
2528
+ this.openColumnModal();
2529
+ }
2530
+ }
2531
+ constructor(changeDetectorRef, matDialog, persistenceService, dataTableGlobalConfig) {
2532
+ this.changeDetectorRef = changeDetectorRef;
2533
+ this.matDialog = matDialog;
2534
+ this.persistenceService = persistenceService;
2535
+ this.dataTableGlobalConfig = dataTableGlobalConfig;
2536
+ // Translations
2537
+ this.filterLabel = 'common.filter';
2538
+ this.filterPlaceholder = '';
2539
+ this.filterColumnsLabel = 'Filter';
2540
+ this.filterColumnsPlaceHolder = 'Filter available columns';
2541
+ this.showEmptyTable = false;
2542
+ this.noDataText = 'No matching data found';
2543
+ this.columnSettingsModalTitleLabel = 'Column settings';
2544
+ this.selectedLabel = 'Selected columns';
2545
+ this.availableLabel = 'Available columns';
2546
+ this.saveLabel = 'Save';
2547
+ this.deleteLabel = 'Delete';
2548
+ this.cancelLabel = 'Cancel';
2549
+ this.infoTextLabel = 'Drag and drop a column to select or reorder it.';
2550
+ this.translateLabels = true;
2551
+ this.stateful = false;
2552
+ this.loading = false;
2553
+ this.paginationEnabled = false;
2554
+ this.page = { pageIndex: 0, pageSize: 50, length: 0 };
2555
+ this.pageSizeOptions = [5, 10, 15];
2556
+ this.actions = [];
2557
+ this.selectionEmitType = 'ID';
2558
+ this.showDeleteFilterAction = true;
2559
+ this.disableRowClick = false;
2560
+ this.deleteDefinitionAllowed = false;
2561
+ this.actionEvent = new EventEmitter();
2562
+ this.selectionEvent = new EventEmitter();
2563
+ this.sortEvent = new EventEmitter();
2564
+ this.filterEvent = new EventEmitter();
2565
+ this.pageEvent = new EventEmitter();
2566
+ this.allColumnsEvent = new EventEmitter();
2567
+ this.columnDefinitionChangeEvent = new EventEmitter();
2568
+ this.viewDefinitionChangeEvent = new EventEmitter();
2569
+ this.allSelected = false;
2570
+ this.ACTION_COLUMN_NAME = '__action__';
2571
+ this.tableActions = [];
2572
+ this.rowActions = [];
2573
+ this.columns = [];
2574
+ this._useAsync = false;
2575
+ this._rowMap = new Map();
2576
+ this._selectionModel = new SelectionModel(true);
2577
+ this._selectionEmitMode = 'NONE';
2578
+ this._filterMode = 'NONE';
2579
+ this._allColumnDefinitions = [];
2580
+ this._showColumnModal = false;
2581
+ this.dataSource = new MatTableDataSource();
2582
+ }
2583
+ ngAfterViewInit() {
2584
+ if (!this._useAsync) {
2585
+ this.dataSource.paginator = this.paginator;
2586
+ this.dataSource.sort = this.sort;
2587
+ }
2588
+ this.applySortData();
2589
+ this.initState();
2590
+ }
2591
+ ngOnChanges(changes) {
2592
+ if ('tableData' in changes) {
2593
+ this.updateDataTableData();
2594
+ this.updateSelectionModel(this.getSelection('ID').length ? this.getSelection('ID') : this._selection);
2595
+ if (this.showAll) {
2596
+ this.updatePaginator();
2597
+ }
2598
+ }
2599
+ if ('idGenerator' in changes || 'displayedColumns' in changes) {
2600
+ this.updateDataTableData();
2601
+ }
2602
+ // performance reasons (same behaviour could be achived in getters)
2603
+ if ('forceMode' in changes || 'forceSelectionMode' in changes || 'actions' in changes) {
2604
+ const actions = DataTableActionUtil.getDisplayActions(this.actions, this.selectionMode);
2605
+ this.rowActions = actions.rowActions;
2606
+ this.tableActions = actions.groupedTableActions;
2607
+ }
2608
+ }
2609
+ /** TABLE DISPLAY HANDLING */
2610
+ getDataTableHeaderType(column) {
2611
+ if (column.isSortable && !column.isFilterable) {
2612
+ return 'SORT';
2613
+ }
2614
+ if (!column.isSortable && column.isFilterable) {
2615
+ return 'FILTER';
2616
+ }
2617
+ if (column.isSortable && column.isFilterable) {
2618
+ return 'SORT_AND_FILTER';
2619
+ }
2620
+ return 'PLAIN';
2621
+ }
2622
+ getCustomCellTemplate(columnId) {
2623
+ const columnDef = this.columnDefs.find((it) => it.madColumnDef === columnId);
2624
+ return columnDef && columnDef.cellDef ? columnDef.cellDef.getCellTemplate() : null;
2625
+ }
2626
+ getCustomExpandableTemplate() {
2627
+ return this.expandableDef?.getCellTemplate() || null;
2628
+ }
2629
+ get expandableColumnDef() {
2630
+ return this.expandableDef?.columnDef.madExpandableColumnDef || '';
2631
+ }
2632
+ onExpand(event, element) {
2633
+ this.expandedElement = this.expandedElement === element ? null : element;
2634
+ event.stopPropagation();
2635
+ }
2636
+ /** ACTION BUTTON DISPLAY HANDLING */
2637
+ hasVisibleRowActions(displayedData) {
2638
+ return !this.rowActions.every((action) => this.isHiddenForData(action, [this._rowMap.get(displayedData.rowId)?.actualData]));
2639
+ }
2640
+ isHidden(action) {
2641
+ return this.isHiddenForData(action, this.getSelection('DATA'));
2642
+ }
2643
+ isHiddenForData(action, data) {
2644
+ return !!action.isHidden && action.isHidden(data);
2645
+ }
2646
+ isDisabled(action) {
2647
+ return this.isDisabledForActionType(action.type) || (!!action.isDisabled && action.isDisabled(this.getSelection('DATA')));
2648
+ }
2649
+ isDisabledForActionType(actionType) {
2650
+ switch (actionType) {
2651
+ case 'SINGLE':
2652
+ return this.selectedCount !== 1;
2653
+ case 'BATCH':
2654
+ return this.selectedCount < 1;
2655
+ default:
2656
+ return false;
2657
+ }
2658
+ }
2659
+ getSelectedCount(actionType) {
2660
+ const count = this.selectedCount;
2661
+ if (actionType !== 'BATCH' || count < 2) {
2662
+ return '';
2663
+ }
2664
+ return ` (${count})`;
2665
+ }
2666
+ get selectedCount() {
2667
+ return this._selectionModel?.selected ? this._selectionModel.selected.length : 0;
2668
+ }
2669
+ /** TABLE DATA CHANGE HANDLING */
2670
+ updateDataTableData() {
2671
+ // do not make this function immutable - we desparately need the reference of rowMap to stay the same
2672
+ DataTableDataUtil.updateRowMap(this._rowMap, this.tableData, this.columns, this.idGenerator, this.parentIdGenerator);
2673
+ this.dataSource.data = Array.from(this._rowMap.values()).map((it) => it.displayedData);
2674
+ }
2675
+ updateSelectionModel(selection) {
2676
+ this._selectionModel.clear();
2677
+ selection?.forEach((it) => {
2678
+ const item = this._rowMap.get(it) || [...this._rowMap.values()].find((row) => row.actualData === it);
2679
+ if (!!item) {
2680
+ this.onSelectionEvent(item.id);
2242
2681
  }
2243
2682
  });
2683
+ this.emitSelection();
2684
+ }
2685
+ /** ACTION & SELECTION HANDLING */
2686
+ get selectionEmitMode() {
2687
+ return this._selectionEmitMode === 'NONE' && !!this.actions.length ? 'ON_ACTION' : this._selectionEmitMode;
2688
+ }
2689
+ get selectionMode() {
2690
+ return !!this._forceSelectionMode ? this._forceSelectionMode : this.actions.find((it) => it.type === 'BATCH') ? 'BATCH' : 'SINGLE';
2691
+ }
2692
+ get filteredPageData() {
2693
+ // only use filtered data
2694
+ return this.dataSource?._pageData(this.dataSource.filteredData);
2695
+ }
2696
+ get showActionColumn() {
2697
+ return !(this.selectionEmitMode === 'NONE' || this.hideActionColumn) || !!this.expandableDef;
2698
+ }
2699
+ showCheckbox(displayedData) {
2700
+ return !displayedData.parentId && this.selectionMode === 'BATCH' && !this.hideActionColumn;
2701
+ }
2702
+ showRowActionIcon(displayedData) {
2703
+ return !displayedData.parentId && this.selectionEmitMode === 'ON_ACTION' && this.selectionMode === 'SINGLE' && !this.hideActionColumn;
2704
+ }
2705
+ showRadioButton(displayedData) {
2706
+ return !displayedData.parentId && this.selectionEmitMode === 'ON_SELECTION' && this.selectionMode === 'SINGLE';
2707
+ }
2708
+ showExpandableButton(displayedData) {
2709
+ return !displayedData.parentId && !!this.expandableDef;
2710
+ }
2711
+ isSelected(rowId) {
2712
+ return this._selectionModel.isSelected(rowId);
2713
+ }
2714
+ onToggleSelectAll() {
2715
+ // clear all selection first
2716
+ this._selectionModel.clear();
2717
+ // toggle all checkbox
2718
+ this.allSelected = !this.allSelected;
2719
+ if (this.allSelected) {
2720
+ // select all rows of the current page
2721
+ this.filteredPageData.forEach((row) => {
2722
+ if (!row.parentId) {
2723
+ this._selectionModel.select(row.rowId);
2724
+ }
2725
+ });
2726
+ }
2727
+ this.emitSelection();
2728
+ }
2729
+ onActionEvent(action) {
2730
+ const emitAction = { ...action };
2731
+ if (!!emitAction && this.selectionEmitMode !== 'NONE') {
2732
+ emitAction.selected = this.getSelection(this.selectionEmitType);
2733
+ this.actionEvent.emit(emitAction);
2734
+ }
2244
2735
  }
2245
- getTableMode() {
2246
- if (this._forceMode) {
2247
- return this._forceMode;
2736
+ onSelectionEvent(id) {
2737
+ switch (this.selectionMode) {
2738
+ case 'BATCH':
2739
+ this._selectionModel.toggle(id);
2740
+ break;
2741
+ case 'SINGLE':
2742
+ this._selectionModel.clear();
2743
+ this._selectionModel.toggle(id);
2744
+ break;
2248
2745
  }
2249
- if (!this.actions) {
2250
- return this.NONE;
2746
+ }
2747
+ onRowEvent(event, row, action = this.defaultAction) {
2748
+ if (this.selectionEmitMode === 'NONE' || row?.parentId) {
2749
+ return;
2750
+ }
2751
+ this.onSelectionEvent(row.rowId);
2752
+ this.processSelection(event, action);
2753
+ }
2754
+ get defaultAction() {
2755
+ return this.selectionEmitMode !== 'NONE' ? this.rowActions[0] : undefined;
2756
+ }
2757
+ get hideActionColumn() {
2758
+ return this.selectionEmitMode === 'ON_ACTION' && this.actions.every((it) => it.type === 'NONE');
2759
+ }
2760
+ processSelection(event, action) {
2761
+ if (this.selectionEmitMode === 'ON_ACTION' &&
2762
+ this.selectionMode === 'SINGLE' &&
2763
+ !!action &&
2764
+ !DataTableComponent.isClickOnRowMenuIcon(event)) {
2765
+ this.onActionEvent(action);
2766
+ }
2767
+ this.emitSelection();
2768
+ }
2769
+ emitSelection() {
2770
+ if (this.selectionEmitMode === 'ON_SELECTION') {
2771
+ this.selectionEvent.emit(this.getSelection(this.selectionEmitType));
2772
+ }
2773
+ }
2774
+ getSelection(selectionEmitType) {
2775
+ const selection = [];
2776
+ this._selectionModel.selected.forEach((it) =>
2777
+ // if ID-generator is provided, return the ID, else return the ACTUAL data
2778
+ selection.push(this.idGenerator && selectionEmitType === 'ID' ? it : this._rowMap.get(it)?.actualData));
2779
+ return selection;
2780
+ }
2781
+ static isClickOnRowMenuIcon(event) {
2782
+ return event?.target?.classList.contains('mat-icon');
2783
+ }
2784
+ /** SORT HANDLING */
2785
+ onSortingEvent(sort) {
2786
+ if (this._useAsync) {
2787
+ this.sortEvent.emit(sort);
2251
2788
  }
2252
- const distinctActionTypes = new Set();
2253
- for (const rowAction of this.actions) {
2254
- distinctActionTypes.add(rowAction.type);
2789
+ if (this.stateful) {
2790
+ this.persistenceService.saveSort(this.id, sort);
2255
2791
  }
2256
- if (distinctActionTypes.has(this.BATCH)) {
2257
- return this.BATCH;
2792
+ }
2793
+ applySortData() {
2794
+ this.dataSource.sortData = this._useAsync
2795
+ ? DataTableSortUtil.sortNothing()
2796
+ : DataTableSortUtil.sortData(this.dataTableGlobalConfig.dateTimeFormat, this.dataTableGlobalConfig.numberFormat);
2797
+ }
2798
+ /** FILTER HANDLING */
2799
+ get filterMode() {
2800
+ return this._useAsync && this._filterMode === 'TABLE_BASED' ? 'NONE' : this._filterMode;
2801
+ }
2802
+ onTableBasedFilterEvent(event) {
2803
+ this.onFilteringEvent(event.target.value);
2804
+ }
2805
+ onColumnBasedFilterEvent(filter) {
2806
+ this.onFilteringEvent(filter);
2807
+ }
2808
+ onDeleteFilter() {
2809
+ this.onFilteringEvent(undefined);
2810
+ this.filter.updateFilterables(undefined);
2811
+ }
2812
+ onFilteringEvent(filter) {
2813
+ if (this._useAsync) {
2814
+ this.filterEvent.emit(filter);
2258
2815
  }
2259
- if (distinctActionTypes.has(this.SINGLE)) {
2260
- return this.SINGLE;
2816
+ else {
2817
+ this.allSelected = false;
2818
+ this._selectionModel.clear();
2819
+ this.applyFilterValue(filter);
2261
2820
  }
2262
- return this.NONE;
2821
+ if (this.stateful) {
2822
+ this.persistenceService.saveFilter(this.id, filter);
2823
+ }
2824
+ }
2825
+ applyFilterPredicate() {
2826
+ this.dataSource.filterPredicate =
2827
+ this.filterMode === 'COLUMN_BASED'
2828
+ ? DataTableFilterUtil.columnBasedFilterPredicate(this._rowMap)
2829
+ : DataTableFilterUtil.tableBasedFilterPredicate();
2830
+ this.applyFilterValue(this._filterValue);
2831
+ }
2832
+ applyFilterValue(value) {
2833
+ const isString = typeof this._filterValue === 'string';
2834
+ this.dataSource.filter = !!value ? (isString ? value.trim().toLowerCase() : JSON.stringify(value)) : '';
2835
+ }
2836
+ /** PAGINATION HANDLING */
2837
+ onPageEvent(event) {
2838
+ if (this._useAsync) {
2839
+ this.pageEvent.emit(event);
2840
+ }
2841
+ if (this.stateful) {
2842
+ this.persistenceService.savePageSize(this.id, event.pageSize);
2843
+ }
2844
+ }
2845
+ get pageIndex() {
2846
+ return this.showAll ? 0 : this.page.pageIndex;
2847
+ }
2848
+ get pageSize() {
2849
+ return this.showAll ? this.dataLength : this.page.pageSize;
2850
+ }
2851
+ get pageLength() {
2852
+ return this.showAll ? this.dataLength : this.page.length;
2853
+ }
2854
+ updatePaginator() {
2855
+ if (this.paginator) {
2856
+ this.paginator.pageSize = this.pageSize;
2857
+ this.paginator.page.emit(this.page);
2858
+ }
2859
+ }
2860
+ get dataLength() {
2861
+ return this.dataSource.data?.length || 0;
2862
+ }
2863
+ get showAll() {
2864
+ return !this._useAsync && !this.paginationEnabled;
2865
+ }
2866
+ /** INIT STATE */
2867
+ initState() {
2868
+ // only set default sort if there is no other sort persisted
2869
+ if (!!this.defaultSort && !this.persistenceService.loadSort(this.id)?.direction) {
2870
+ this.setSort(this.defaultSort);
2871
+ }
2872
+ if (this.stateful) {
2873
+ this.initPaginatorState();
2874
+ this.initSortState();
2875
+ this.initFilterState();
2876
+ }
2877
+ this.changeDetectorRef.detectChanges();
2878
+ }
2879
+ initSortState() {
2880
+ const sort = this.persistenceService.loadSort(this.id);
2881
+ if (!!sort) {
2882
+ this.setSort(sort);
2883
+ }
2884
+ }
2885
+ setSort(sort) {
2886
+ this.sort.active = sort.active;
2887
+ this.sort.direction = sort.direction;
2888
+ this.sort.sortChange.emit(sort);
2889
+ }
2890
+ initFilterState() {
2891
+ const filter = this.persistenceService.loadFilter(this.id);
2892
+ this.filter.updateFilterables(filter);
2893
+ }
2894
+ initPaginatorState() {
2895
+ this.page = {
2896
+ pageIndex: 0,
2897
+ pageSize: this.persistenceService.loadPageSize(this.id) || this.pageSize,
2898
+ length: 0,
2899
+ };
2900
+ this.updatePaginator();
2901
+ }
2902
+ /** COLUMN HANDLING */
2903
+ onViewDefinition(definition) {
2904
+ this._selectedColumnDefinition = definition;
2905
+ this.viewDefinitionChangeEvent.emit(definition);
2263
2906
  }
2264
- unsetPageSizeIfNecessary() {
2265
- if (!this.useAsync && !this.isPaginationEnabled) {
2266
- const dataCount = this.dataSource?.data ? this.dataSource.data.length : 0;
2267
- this.paginatorPageSize = dataCount;
2268
- this.paginatorLength = dataCount;
2907
+ onColumnSettings(definition) {
2908
+ this._showColumnModal = true;
2909
+ this._selectedColumnDefinition = definition ? definition : this._allColumnDefinitions[0];
2910
+ if (this._allAvailableColumns) {
2911
+ this.openColumnModal();
2269
2912
  }
2913
+ else {
2914
+ // if no complete definitions have been loaded yet send an event so the app can load it
2915
+ this.allColumnsEvent.emit();
2916
+ }
2917
+ }
2918
+ isCurrentDefinition(definition) {
2919
+ return this._selectedColumnDefinition && this._selectedColumnDefinition.id === definition.id;
2270
2920
  }
2271
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableComponent, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
2272
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: DataTableComponent, selector: "mad-data-table", inputs: { filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", filterColumnsLabel: "filterColumnsLabel", filterColumnsPlaceHolder: "filterColumnsPlaceHolder", noDataText: "noDataText", columnSettingsModalTitleLabel: "columnSettingsModalTitleLabel", selectedLabel: "selectedLabel", availableLabel: "availableLabel", saveLabel: "saveLabel", deleteLabel: "deleteLabel", cancelLabel: "cancelLabel", infoTextLabel: "infoTextLabel", tableClass: "tableClass", pageSizeOptions: "pageSizeOptions", externalFilter: "externalFilter", actions: "actions", idGenerator: "idGenerator", parentIdGenerator: "parentIdGenerator", deleteDefinitionAllowed: "deleteDefinitionAllowed", useAsync: "useAsync", translateLabels: "translateLabels", filterValue: "filterValue", displayedColumns: "displayedColumns", displayedColumnDefinition: "displayedColumnDefinition", tableData: "tableData", page: "page", columnDefinitions: "columnDefinitions", loading: "loading", defaultPageSize: "defaultPageSize", externalPaginator: "externalPaginator", paginationEnabled: "paginationEnabled", allColumns: "allColumns", filterEnabled: "filterEnabled", forceMode: "forceMode" }, outputs: { sortEvent: "sortEvent", actionEvent: "actionEvent", pageEvent: "pageEvent", allColumnsEvent: "allColumnsEvent", columnDefinitionChangeEvent: "columnDefinitionChangeEvent", viewDefinitionChangeEvent: "viewDefinitionChangeEvent" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<div class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n <div *ngIf=\"tableActions?.length\">\n <mad-outline-button\n [disabled]=\"isDisabled(tableAction.type)\"\n class=\"table-action\"\n *ngFor=\"let tableAction of tableActions\"\n (click)=\"onTableAction(tableAction)\"\n >\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }} {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n </div>\n <!-- Table filter -->\n <mat-form-field *ngIf=\"isFilterEnabled\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"setFilterValue($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n <button *ngFor=\"let rowAction of rowActions\" mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ translateLabels ? (rowAction.label | translate) : rowAction.label }}\n </button>\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of editableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of viewableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- Table -->\n<div *ngIf=\"rowCount > 0; else noData\" class=\"datatable\" [class]=\"tableClass\">\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"isLoading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"mode === NONE ? 'no-action-cell' : 'row-action-cell'\">\n <!-- BATCH: master checkbox -->\n <div *ngIf=\"mode === BATCH\" class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"> </mat-checkbox>\n </div>\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"mode === NONE ? 'no-action-cell' : 'row-action-cell'\">\n <!-- BATCH: row checkbox -->\n <div *ngIf=\"!element.parentId && mode === BATCH\" class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"> </mat-checkbox>\n </div>\n <!-- SINGLE: row action menu icon -->\n <mad-icon-button\n *ngIf=\"!element.parentId && mode === SINGLE\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n <ng-container *ngIf=\"column.isSortable; else noSort\">\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n </ng-container>\n <ng-template #noSort>\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n </ng-template>\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 [ngSwitch]=\"column.transformer\"\n (click)=\"onRowEvent($event, element)\"\n >\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\n </td>\n </ng-container>\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr mat-row [class.clickable-table-row]=\"!row.parentId && isRowClickable\" *matRowDef=\"let row; columns: columnIds\"></tr>\n </table>\n</div>\n<div class=\"mad-data-table-bottom-area\">\n <div class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n <mad-icon-button *ngIf=\"this.editableColumnDefinitions?.length == 1\" (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n <!-- column settings: multiple definitions -->\n <mad-icon-button *ngIf=\"this.editableColumnDefinitions?.length > 0\" [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n <!-- column view: multiple definitions -->\n <mad-icon-button *ngIf=\"this.viewableColumnDefinitions?.length > 0\" [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [length]=\"paginatorLength\"\n [pageIndex]=\"paginatorPageIndex\"\n [pageSize]=\"paginatorPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- No data alert -->\n<ng-template #noData>\n <div class=\"noDataText\">\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"isLoading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n {{ noDataText }}\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;min-height:112px;flex:1 1 auto;background-color:#fff}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{max-height:100%;width:100%}.datatable th,.datatable td{overflow:hidden;width:auto;text-overflow:ellipsis;white-space:nowrap}.text-right{text-align:right!important;padding-right:24px!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:#fff;opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:#fff;z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:#000;background-color:#f5f5f5}.mad-dt-child-cell{color:#0009}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.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: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i6$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled", "color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i7.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i7.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i10$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: OutlineButtonComponent, selector: "mad-outline-button", inputs: ["type", "disabled", "title", "color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: i13.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] }); }
2921
+ openColumnModal() {
2922
+ const dialogData = {
2923
+ allColumns: this._allAvailableColumns,
2924
+ definition: this._selectedColumnDefinition,
2925
+ deleteDefinitionAllowed: this.deleteDefinitionAllowed,
2926
+ filterColumnsLabel: this.filterColumnsLabel,
2927
+ filterColumnsPlaceHolder: this.filterColumnsPlaceHolder,
2928
+ noDataText: this.noDataText,
2929
+ titleLabel: this.columnSettingsModalTitleLabel,
2930
+ selectedLabel: this.selectedLabel,
2931
+ availableLabel: this.availableLabel,
2932
+ saveLabel: this.saveLabel,
2933
+ deleteLabel: this.deleteLabel,
2934
+ cancelLabel: this.cancelLabel,
2935
+ infoTextLabel: this.infoTextLabel,
2936
+ };
2937
+ const dialog = this.matDialog.open(DataTableColumnsModalComponent, { data: dialogData });
2938
+ dialog.afterClosed().subscribe((result) => {
2939
+ // no event on CANCEL
2940
+ if (result) {
2941
+ this.columnDefinitionChangeEvent.emit(result);
2942
+ }
2943
+ });
2944
+ }
2945
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$3.MatDialog }, { token: MAD_DATA_TABLE_PERSISTENCE_SERVICE }, { token: MAD_DATA_TABLE_GLOBAL_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Component }); }
2946
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: DataTableComponent, isStandalone: true, selector: "mad-data-table", inputs: { id: "id", filterLabel: "filterLabel", filterPlaceholder: "filterPlaceholder", filterColumnsLabel: "filterColumnsLabel", filterColumnsPlaceHolder: "filterColumnsPlaceHolder", showEmptyTable: "showEmptyTable", noDataText: "noDataText", columnSettingsModalTitleLabel: "columnSettingsModalTitleLabel", selectedLabel: "selectedLabel", availableLabel: "availableLabel", saveLabel: "saveLabel", deleteLabel: "deleteLabel", cancelLabel: "cancelLabel", infoTextLabel: "infoTextLabel", tableClass: "tableClass", translateLabels: "translateLabels", useAsync: "useAsync", stateful: "stateful", loading: "loading", tableData: "tableData", idGenerator: "idGenerator", parentIdGenerator: "parentIdGenerator", defaultSort: "defaultSort", externalFilter: "externalFilter", paginationEnabled: "paginationEnabled", page: "page", pageSizeOptions: "pageSizeOptions", actions: "actions", selectionEmitType: "selectionEmitType", showDeleteFilterAction: "showDeleteFilterAction", disableRowClick: "disableRowClick", deleteDefinitionAllowed: "deleteDefinitionAllowed", selection: "selection", filterEnabled: "filterEnabled", filterMode: "filterMode", filterValue: "filterValue", externalPaginator: "externalPaginator", defaultPageSize: "defaultPageSize", selectionEmitMode: "selectionEmitMode", forceMode: "forceMode", forceSelectionMode: "forceSelectionMode", displayedColumns: "displayedColumns", displayedColumnDefinition: "displayedColumnDefinition", columnDefinitions: "columnDefinitions", allColumns: "allColumns" }, outputs: { actionEvent: "actionEvent", selectionEvent: "selectionEvent", sortEvent: "sortEvent", filterEvent: "filterEvent", pageEvent: "pageEvent", allColumnsEvent: "allColumnsEvent", columnDefinitionChangeEvent: "columnDefinitionChangeEvent", viewDefinitionChangeEvent: "viewDefinitionChangeEvent" }, providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], queries: [{ propertyName: "expandableDef", first: true, predicate: DataTableTemplateExpandableCellDefinition, descendants: true }, { propertyName: "columnDefs", predicate: DataTableTemplateColumnDefinition }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "filter", first: true, predicate: DataTableFilter, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n <div *ngIf=\"tableActions?.length || (filterMode === 'COLUMN_BASED' && showDeleteFilterAction)\">\n <mad-button-group *ngFor=\"let actionGroup of tableActions\" class=\"table-action-group\">\n <mad-outline-button\n [hidden]=\"isHidden(tableAction)\"\n [disabled]=\"isDisabled(tableAction)\"\n *ngFor=\"let tableAction of actionGroup\"\n (click)=\"onActionEvent(tableAction)\"\n >\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n </mad-button-group>\n </div>\n <ng-container *ngIf=\"filterMode === 'COLUMN_BASED' && showDeleteFilterAction\">\n <mat-icon fontSet=\"material-icons-outlined\" class=\"delete-filter-action\" color=\"primary\" (click)=\"onDeleteFilter()\"\n >filter_alt_off</mat-icon\n >\n </ng-container>\n <mat-form-field *ngIf=\"filterMode === 'TABLE_BASED'\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n <ng-container *ngFor=\"let rowAction of rowActions\">\n <button\n *ngIf=\"!isHidden(rowAction)\"\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 </ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of editableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of viewableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- Table -->\n<div\n *ngIf=\"filterMode === 'COLUMN_BASED' || showEmptyTable || !!filteredPageData?.length; else noData\"\n class=\"datatable\"\n [class]=\"tableClass\"\n>\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"loading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\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 <div *ngIf=\"selectionEmitMode !== 'NONE' && selectionMode === 'BATCH'\" class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"> </mat-checkbox>\n </div>\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 <div *ngIf=\"showCheckbox(element)\" class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"> </mat-checkbox>\n </div>\n <!-- SINGLE: row action menu icon -->\n <mad-icon-button\n *ngIf=\"showRowActionIcon(element) && hasVisibleRowActions(element)\"\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 <!-- SINGLE: row radio button -->\n <div *ngIf=\"showRadioButton(element)\" class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"> </mat-radio-button>\n </div>\n <!-- EXPANDABLE: row is expandable/collapsable -->\n <mad-icon-button *ngIf=\"showExpandableButton(element)\" (click)=\"onExpand($event, element)\">\n <mat-icon *ngIf=\"expandedElement !== element\">keyboard_arrow_down</mat-icon>\n <mat-icon *ngIf=\"expandedElement === element\">keyboard_arrow_up</mat-icon>\n </mad-icon-button>\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n <ng-container [ngSwitch]=\"getDataTableHeaderType(column)\">\n <ng-container *ngSwitchCase=\"'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 </ng-container>\n <ng-container *ngSwitchCase=\"'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 </ng-container>\n <ng-container *ngSwitchCase=\"'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 </ng-container>\n <ng-container *ngSwitchDefault>\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n </ng-container>\n </ng-container>\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 [ngSwitch]=\"column.transformer\"\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 <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n <ng-container *ngIf=\"!!expandableDef\" [matColumnDef]=\"expandableColumnDef\">\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"columns.length + 1\">\n <div class=\"mad-data-table-expandable-area\" [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitMode !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIds\"\n (click)=\"onExpand($event, row)\"\n ></tr>\n <ng-container *ngIf=\"!!expandableDef\">\n <tr mat-row *matRowDef=\"let element; columns: [expandableColumnDef]\" class=\"mad-data-table-expandable-row\"></tr>\n </ng-container>\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell noDataText columnBasedFilter\" [attr.colspan]=\"columnIds.length\">\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </td>\n </tr>\n </table>\n</div>\n<div class=\"mad-data-table-bottom-area\">\n <div class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n <mad-icon-button *ngIf=\"editableColumnDefinitions?.length === 1\" (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n <!-- column settings: multiple definitions -->\n <mad-icon-button *ngIf=\"(editableColumnDefinitions?.length || 0) > 0\" [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n <!-- column view: multiple definitions -->\n <mad-icon-button *ngIf=\"(viewableColumnDefinitions?.length || 0) > 0\" [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"paginationEnabled ? 'block' : 'none'\"\n [length]=\"pageLength\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- No data alert -->\n<ng-template #noData>\n <div class=\"noDataText\">\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"loading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </div>\n</ng-template>\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:#fff}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{width:100%;min-height:140px;max-height:100%}.datatable table th,.datatable table td{width:auto;text-overflow:ellipsis;white-space:nowrap}.datatable table th{overflow:visible}.datatable table td{overflow:hidden}.layout-fixed table{table-layout:fixed}.layout-fixed table th{font-weight:700}.layout-fixed table td{white-space:normal;word-wrap:break-word}.text-right{text-align:right!important;padding-right:24px!important}.table-action-group{margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.noDataText.columnBasedFilter{padding-top:10px}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:#fff;opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-expandable-row{height:0;display:contents;padding:0}.mad-data-table-expandable-row td{border-top-color:transparent;border-bottom-color:transparent}.mad-data-table-expandable-area{overflow:hidden;display:flex;width:100%}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:#fff;z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:#000;background-color:#f5f5f5}.mad-dt-child-cell{color:#0009}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6.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: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.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: i6$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled", "color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i7.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i7.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "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: ["sticky", "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: ["type", "disabled", "title", "color"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: MadButtonGroupComponent, selector: "mad-button-group" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i15.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i16.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex", "id", "name", "aria-label", "aria-labelledby", "aria-describedby", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatBadgeModule }, { 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"] }], animations: [
2947
+ trigger('detailExpand', [
2948
+ state('collapsed,void', style({ height: '0px', minHeight: '0' })),
2949
+ state('expanded', style({ height: '*' })),
2950
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
2951
+ ]),
2952
+ ] }); }
2273
2953
  }
2274
2954
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableComponent, decorators: [{
2275
2955
  type: Component,
2276
- args: [{ selector: 'mad-data-table', template: "<div class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n <div *ngIf=\"tableActions?.length\">\n <mad-outline-button\n [disabled]=\"isDisabled(tableAction.type)\"\n class=\"table-action\"\n *ngFor=\"let tableAction of tableActions\"\n (click)=\"onTableAction(tableAction)\"\n >\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }} {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n </div>\n <!-- Table filter -->\n <mat-form-field *ngIf=\"isFilterEnabled\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"setFilterValue($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n <button *ngFor=\"let rowAction of rowActions\" mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ translateLabels ? (rowAction.label | translate) : rowAction.label }}\n </button>\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of editableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of viewableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- Table -->\n<div *ngIf=\"rowCount > 0; else noData\" class=\"datatable\" [class]=\"tableClass\">\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"isLoading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column-->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [ngClass]=\"mode === NONE ? 'no-action-cell' : 'row-action-cell'\">\n <!-- BATCH: master checkbox -->\n <div *ngIf=\"mode === BATCH\" class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"> </mat-checkbox>\n </div>\n <!-- SINGLE / NONE: nothing in header row -->\n </th>\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"mode === NONE ? 'no-action-cell' : 'row-action-cell'\">\n <!-- BATCH: row checkbox -->\n <div *ngIf=\"!element.parentId && mode === BATCH\" class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"> </mat-checkbox>\n </div>\n <!-- SINGLE: row action menu icon -->\n <mad-icon-button\n *ngIf=\"!element.parentId && mode === SINGLE\"\n [matMenuTriggerData]=\"{ element: element }\"\n [matMenuTriggerFor]=\"rowActionMenu\"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n <ng-container *ngIf=\"column.isSortable; else noSort\">\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.orderByName ? column.orderByName : column.dataPropertyName }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n </ng-container>\n <ng-template #noSort>\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n </ng-template>\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 [ngSwitch]=\"column.transformer\"\n (click)=\"onRowEvent($event, element)\"\n >\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\n </td>\n </ng-container>\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr mat-row [class.clickable-table-row]=\"!row.parentId && isRowClickable\" *matRowDef=\"let row; columns: columnIds\"></tr>\n </table>\n</div>\n<div class=\"mad-data-table-bottom-area\">\n <div class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n <mad-icon-button *ngIf=\"this.editableColumnDefinitions?.length == 1\" (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n <!-- column settings: multiple definitions -->\n <mad-icon-button *ngIf=\"this.editableColumnDefinitions?.length > 0\" [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n <!-- column view: multiple definitions -->\n <mad-icon-button *ngIf=\"this.viewableColumnDefinitions?.length > 0\" [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [length]=\"paginatorLength\"\n [pageIndex]=\"paginatorPageIndex\"\n [pageSize]=\"paginatorPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- No data alert -->\n<ng-template #noData>\n <div class=\"noDataText\">\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"isLoading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n {{ noDataText }}\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;min-height:112px;flex:1 1 auto;background-color:#fff}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{max-height:100%;width:100%}.datatable th,.datatable td{overflow:hidden;width:auto;text-overflow:ellipsis;white-space:nowrap}.text-right{text-align:right!important;padding-right:24px!important}.table-action{margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:#fff;opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:#fff;z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:#000;background-color:#f5f5f5}.mad-dt-child-cell{color:#0009}\n"] }]
2277
- }], ctorParameters: () => [{ type: i1$3.MatDialog }], propDecorators: { filterLabel: [{
2956
+ args: [{ selector: 'mad-data-table', animations: [
2957
+ trigger('detailExpand', [
2958
+ state('collapsed,void', style({ height: '0px', minHeight: '0' })),
2959
+ state('expanded', style({ height: '*' })),
2960
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
2961
+ ]),
2962
+ ], standalone: true, imports: [
2963
+ CommonModule,
2964
+ MatButtonModule,
2965
+ MatIconModule,
2966
+ MatFormFieldModule,
2967
+ MatInputModule,
2968
+ MatMenuModule,
2969
+ MatPaginatorModule,
2970
+ MatSortModule,
2971
+ MatTableModule,
2972
+ MatProgressSpinnerModule,
2973
+ ButtonModule,
2974
+ TranslateModule,
2975
+ MatCheckboxModule,
2976
+ MatRadioModule,
2977
+ MatBadgeModule,
2978
+ DragDropModule,
2979
+ FormsModule,
2980
+ DataTableFilterHeader,
2981
+ DataTableFilter,
2982
+ DataTableTemplateColumnDefinition,
2983
+ DataTableTemplateCellDefinition,
2984
+ DataTableTemplateExpandableColumnDefinition,
2985
+ DataTableTemplateExpandableCellDefinition,
2986
+ ], providers: [DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER, MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER], template: "<div class=\"mad-datatable-action-bar\">\n <!-- Table actions: displayed before the table -->\n <div *ngIf=\"tableActions?.length || (filterMode === 'COLUMN_BASED' && showDeleteFilterAction)\">\n <mad-button-group *ngFor=\"let actionGroup of tableActions\" class=\"table-action-group\">\n <mad-outline-button\n [hidden]=\"isHidden(tableAction)\"\n [disabled]=\"isDisabled(tableAction)\"\n *ngFor=\"let tableAction of actionGroup\"\n (click)=\"onActionEvent(tableAction)\"\n >\n {{ translateLabels ? (tableAction.label | translate) : tableAction.label }}\n {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n </mad-button-group>\n </div>\n <ng-container *ngIf=\"filterMode === 'COLUMN_BASED' && showDeleteFilterAction\">\n <mat-icon fontSet=\"material-icons-outlined\" class=\"delete-filter-action\" color=\"primary\" (click)=\"onDeleteFilter()\"\n >filter_alt_off</mat-icon\n >\n </ng-container>\n <mat-form-field *ngIf=\"filterMode === 'TABLE_BASED'\">\n <mat-label>{{ translateLabels ? (filterLabel | translate) : filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onTableBasedFilterEvent($event)\" placeholder=\"{{ filterPlaceholder }}\" />\n </mat-form-field>\n</div>\n\n<!-- Row action menu -->\n<mat-menu #rowActionMenu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n <ng-container *ngFor=\"let rowAction of rowActions\">\n <button\n *ngIf=\"!isHidden(rowAction)\"\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 </ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- editable definition menu -->\n<mat-menu #editableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of editableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- viewable definition menu -->\n<mat-menu #viewableDefinitionMenu=\"matMenu\">\n <ng-template matMenuContent>\n <button\n *ngFor=\"let definition of viewableColumnDefinitions\"\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 </ng-template>\n</mat-menu>\n\n<!-- Table -->\n<div\n *ngIf=\"filterMode === 'COLUMN_BASED' || showEmptyTable || !!filteredPageData?.length; else noData\"\n class=\"datatable\"\n [class]=\"tableClass\"\n>\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"loading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\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 <div *ngIf=\"selectionEmitMode !== 'NONE' && selectionMode === 'BATCH'\" class=\"mad-datatable-checkbox-container\">\n <mat-checkbox (change)=\"onToggleSelectAll()\" [checked]=\"allSelected\"> </mat-checkbox>\n </div>\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 <div *ngIf=\"showCheckbox(element)\" class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-checkbox class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"> </mat-checkbox>\n </div>\n <!-- SINGLE: row action menu icon -->\n <mad-icon-button\n *ngIf=\"showRowActionIcon(element) && hasVisibleRowActions(element)\"\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 <!-- SINGLE: row radio button -->\n <div *ngIf=\"showRadioButton(element)\" class=\"mad-datatable-checkbox-container\" (click)=\"onRowEvent($event, element)\">\n <mat-radio-button class=\"no-pointer-events\" [checked]=\"isSelected(element.rowId)\"> </mat-radio-button>\n </div>\n <!-- EXPANDABLE: row is expandable/collapsable -->\n <mad-icon-button *ngIf=\"showExpandableButton(element)\" (click)=\"onExpand($event, element)\">\n <mat-icon *ngIf=\"expandedElement !== element\">keyboard_arrow_down</mat-icon>\n <mat-icon *ngIf=\"expandedElement === element\">keyboard_arrow_up</mat-icon>\n </mad-icon-button>\n <!-- NONE: nothing -->\n </td>\n </ng-container>\n <!-- Cell definitions and rows with injected cells -->\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <!-- header cell to be injected -->\n <ng-container [ngSwitch]=\"getDataTableHeaderType(column)\">\n <ng-container *ngSwitchCase=\"'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 </ng-container>\n <ng-container *ngSwitchCase=\"'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 </ng-container>\n <ng-container *ngSwitchCase=\"'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 </ng-container>\n <ng-container *ngSwitchDefault>\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ translateLabels ? (column.label | translate) : column.label }}\n </th>\n </ng-container>\n </ng-container>\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 [ngSwitch]=\"column.transformer\"\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 <!-- Expanded Content Column - The row is made up of this one column that spans across all columns -->\n <ng-container *ngIf=\"!!expandableDef\" [matColumnDef]=\"expandableColumnDef\">\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"columns.length + 1\">\n <div class=\"mad-data-table-expandable-area\" [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\n <ng-container\n *ngTemplateOutlet=\"\n getCustomExpandableTemplate() || defaultCellTemplate;\n context: { column: element, element: element, $implicit: element }\n \"\n ></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- header row where cells will be injected -->\n <tr mat-header-row *matHeaderRowDef=\"columnIds\"></tr>\n <!-- data row where cells will be injected -->\n <tr\n mat-row\n [class.clickable-table-row]=\"!row.parentId && selectionEmitMode !== 'NONE'\"\n *matRowDef=\"let row; columns: columnIds\"\n (click)=\"onExpand($event, row)\"\n ></tr>\n <ng-container *ngIf=\"!!expandableDef\">\n <tr mat-row *matRowDef=\"let element; columns: [expandableColumnDef]\" class=\"mad-data-table-expandable-row\"></tr>\n </ng-container>\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell noDataText columnBasedFilter\" [attr.colspan]=\"columnIds.length\">\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </td>\n </tr>\n </table>\n</div>\n<div class=\"mad-data-table-bottom-area\">\n <div class=\"mad-data-table-bottom-info-area\">\n <!-- column settings: 1 definition -->\n <mad-icon-button *ngIf=\"editableColumnDefinitions?.length === 1\" (click)=\"onColumnSettings()\">\n <mat-icon class=\"material-icons-outlined\">view_column</mat-icon>\n </mad-icon-button>\n <!-- column settings: multiple definitions -->\n <mad-icon-button *ngIf=\"(editableColumnDefinitions?.length || 0) > 0\" [matMenuTriggerFor]=\"editableDefinitionMenu\">\n <mat-icon>view_column</mat-icon>\n </mad-icon-button>\n <!-- column view: multiple definitions -->\n <mad-icon-button *ngIf=\"(viewableColumnDefinitions?.length || 0) > 0\" [matMenuTriggerFor]=\"viewableDefinitionMenu\">\n <mat-icon>preview</mat-icon>\n </mad-icon-button>\n </div>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"paginationEnabled ? 'block' : 'none'\"\n [length]=\"pageLength\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageEvent($event)\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- No data alert -->\n<ng-template #noData>\n <div class=\"noDataText\">\n <div class=\"mad-datatable-spinner-wrapper\" *ngIf=\"loading\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"3\"></mat-spinner>\n </div>\n {{ translateLabels ? (noDataText | translate) : noDataText }}\n </div>\n</ng-template>\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:#fff}.datatable-vertical-stretch-to-parent{flex:1;max-height:100%;width:100%;display:flex;flex-direction:column}.datatable-max-height-500{max-height:500px}.datatable-max-height-300{max-height:300px}.datatable-max-height,.datatable-max-height-500,.datatable-max-height-300{flex:1;width:100%;display:flex;flex-direction:column}.datatable{overflow:auto;flex:1 1 auto;height:100%;position:relative;width:100%}.datatable table{width:100%;min-height:140px;max-height:100%}.datatable table th,.datatable table td{width:auto;text-overflow:ellipsis;white-space:nowrap}.datatable table th{overflow:visible}.datatable table td{overflow:hidden}.layout-fixed table{table-layout:fixed}.layout-fixed table th{font-weight:700}.layout-fixed table td{white-space:normal;word-wrap:break-word}.text-right{text-align:right!important;padding-right:24px!important}.table-action-group{margin-right:.5em;margin-bottom:.5em}.row-action-cell{width:48px!important;padding-left:8px!important}.no-action-cell{width:8px!important;padding:0}.noDataText{width:100%;text-align:center;position:relative}.noDataText.columnBasedFilter{padding-top:10px}.mad-datatable-action-bar{display:flex;justify-content:space-between;align-items:baseline}.mad-datatable-checkbox-container{margin-right:8px;margin-left:8px}.mad-datatable-spinner-wrapper{background-color:#fff;opacity:.8;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:99999;pointer-events:unset}.mad-data-table-expandable-row{height:0;display:contents;padding:0}.mad-data-table-expandable-row td{border-top-color:transparent;border-bottom-color:transparent}.mad-data-table-expandable-area{overflow:hidden;display:flex;width:100%}.mad-data-table-bottom-area{display:flex;flex-direction:row}.mad-data-table-bottom-area .mad-data-table-bottom-info-area{display:flex;flex:1}.mat-mdc-header-row th{position:sticky;top:0;background-color:#fff;z-index:1}.no-pointer-events{pointer-events:none}.active-column-definition{color:#000;background-color:#f5f5f5}.mad-dt-child-cell{color:#0009}\n"] }]
2987
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialog }, { type: DataTablePersistenceService, decorators: [{
2988
+ type: Inject,
2989
+ args: [MAD_DATA_TABLE_PERSISTENCE_SERVICE]
2990
+ }] }, { type: undefined, decorators: [{
2991
+ type: Inject,
2992
+ args: [MAD_DATA_TABLE_GLOBAL_CONFIGURATION]
2993
+ }] }], propDecorators: { id: [{
2994
+ type: Input
2995
+ }], filterLabel: [{
2278
2996
  type: Input
2279
2997
  }], filterPlaceholder: [{
2280
2998
  type: Input
@@ -2282,6 +3000,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2282
3000
  type: Input
2283
3001
  }], filterColumnsPlaceHolder: [{
2284
3002
  type: Input
3003
+ }], showEmptyTable: [{
3004
+ type: Input
2285
3005
  }], noDataText: [{
2286
3006
  type: Input
2287
3007
  }], columnSettingsModalTitleLabel: [{
@@ -2300,51 +3020,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2300
3020
  type: Input
2301
3021
  }], tableClass: [{
2302
3022
  type: Input
2303
- }], pageSizeOptions: [{
3023
+ }], translateLabels: [{
2304
3024
  type: Input
2305
- }], externalFilter: [{
3025
+ }], useAsync: [{
2306
3026
  type: Input
2307
- }], actions: [{
3027
+ }], stateful: [{
3028
+ type: Input
3029
+ }], loading: [{
3030
+ type: Input
3031
+ }], tableData: [{
2308
3032
  type: Input
2309
3033
  }], idGenerator: [{
2310
3034
  type: Input
2311
3035
  }], parentIdGenerator: [{
2312
3036
  type: Input
2313
- }], deleteDefinitionAllowed: [{
3037
+ }], defaultSort: [{
2314
3038
  type: Input
2315
- }], useAsync: [{
3039
+ }], externalFilter: [{
2316
3040
  type: Input
2317
- }], translateLabels: [{
3041
+ }], paginationEnabled: [{
2318
3042
  type: Input
2319
- }], filterValue: [{
3043
+ }], page: [{
2320
3044
  type: Input
2321
- }], displayedColumns: [{
3045
+ }], pageSizeOptions: [{
2322
3046
  type: Input
2323
- }], displayedColumnDefinition: [{
3047
+ }], actions: [{
2324
3048
  type: Input
2325
- }], tableData: [{
3049
+ }], selectionEmitType: [{
2326
3050
  type: Input
2327
- }], page: [{
3051
+ }], showDeleteFilterAction: [{
2328
3052
  type: Input
2329
- }], columnDefinitions: [{
3053
+ }], disableRowClick: [{
2330
3054
  type: Input
2331
- }], loading: [{
3055
+ }], deleteDefinitionAllowed: [{
2332
3056
  type: Input
2333
- }], defaultPageSize: [{
3057
+ }], selection: [{
2334
3058
  type: Input
2335
- }], externalPaginator: [{
3059
+ }], filterEnabled: [{
2336
3060
  type: Input
2337
- }], paginationEnabled: [{
3061
+ }], filterMode: [{
2338
3062
  type: Input
2339
- }], allColumns: [{
3063
+ }], filterValue: [{
2340
3064
  type: Input
2341
- }], filterEnabled: [{
3065
+ }], externalPaginator: [{
3066
+ type: Input
3067
+ }], defaultPageSize: [{
3068
+ type: Input
3069
+ }], selectionEmitMode: [{
2342
3070
  type: Input
2343
3071
  }], forceMode: [{
2344
3072
  type: Input
3073
+ }], forceSelectionMode: [{
3074
+ type: Input
3075
+ }], displayedColumns: [{
3076
+ type: Input
3077
+ }], displayedColumnDefinition: [{
3078
+ type: Input
3079
+ }], columnDefinitions: [{
3080
+ type: Input
3081
+ }], allColumns: [{
3082
+ type: Input
3083
+ }], actionEvent: [{
3084
+ type: Output
3085
+ }], selectionEvent: [{
3086
+ type: Output
2345
3087
  }], sortEvent: [{
2346
3088
  type: Output
2347
- }], actionEvent: [{
3089
+ }], filterEvent: [{
2348
3090
  type: Output
2349
3091
  }], pageEvent: [{
2350
3092
  type: Output
@@ -2356,73 +3098,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2356
3098
  type: Output
2357
3099
  }], paginator: [{
2358
3100
  type: ViewChild,
2359
- args: [MatPaginator, { static: false }]
3101
+ args: [MatPaginator]
2360
3102
  }], sort: [{
2361
3103
  type: ViewChild,
2362
- args: [MatSort, { static: true }]
3104
+ args: [MatSort]
3105
+ }], filter: [{
3106
+ type: ViewChild,
3107
+ args: [DataTableFilter]
3108
+ }], columnDefs: [{
3109
+ type: ContentChildren,
3110
+ args: [DataTableTemplateColumnDefinition]
3111
+ }], expandableDef: [{
3112
+ type: ContentChild,
3113
+ args: [DataTableTemplateExpandableCellDefinition]
2363
3114
  }] } });
2364
3115
 
2365
- class DataTableModule {
2366
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2367
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: DataTableModule, declarations: [DataTableComponent, DataTableColumnsModalComponent], imports: [CommonModule,
2368
- MatButtonModule,
2369
- MatIconModule,
2370
- MatFormFieldModule,
2371
- MatInputModule,
2372
- MatMenuModule,
2373
- MatPaginatorModule,
2374
- MatSortModule,
2375
- MatTableModule,
2376
- MatProgressSpinnerModule,
2377
- ButtonModule,
2378
- TranslateModule,
2379
- MatCheckboxModule,
2380
- MatBadgeModule,
2381
- DragDropModule,
2382
- FormsModule], exports: [DataTableComponent, DataTableColumnsModalComponent] }); }
2383
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableModule, imports: [CommonModule,
2384
- MatButtonModule,
2385
- MatIconModule,
2386
- MatFormFieldModule,
2387
- MatInputModule,
2388
- MatMenuModule,
2389
- MatPaginatorModule,
2390
- MatSortModule,
2391
- MatTableModule,
2392
- MatProgressSpinnerModule,
2393
- ButtonModule,
2394
- TranslateModule,
2395
- MatCheckboxModule,
2396
- MatBadgeModule,
2397
- DragDropModule,
2398
- FormsModule] }); }
2399
- }
2400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableModule, decorators: [{
2401
- type: NgModule,
2402
- args: [{
2403
- declarations: [DataTableComponent, DataTableColumnsModalComponent],
2404
- imports: [
2405
- CommonModule,
2406
- MatButtonModule,
2407
- MatIconModule,
2408
- MatFormFieldModule,
2409
- MatInputModule,
2410
- MatMenuModule,
2411
- MatPaginatorModule,
2412
- MatSortModule,
2413
- MatTableModule,
2414
- MatProgressSpinnerModule,
2415
- ButtonModule,
2416
- TranslateModule,
2417
- MatCheckboxModule,
2418
- MatBadgeModule,
2419
- DragDropModule,
2420
- FormsModule,
2421
- ],
2422
- exports: [DataTableComponent, DataTableColumnsModalComponent],
2423
- }]
2424
- }] });
2425
-
2426
3116
  class StepHeaderComponent extends CdkStepHeader {
2427
3117
  constructor(_focusMonitor, _elementRef) {
2428
3118
  super(_elementRef);
@@ -2628,7 +3318,7 @@ class StepperComponent extends CdkStepper {
2628
3318
  _stepIsNavigable(index, step) {
2629
3319
  return step.completed || this.selectedIndex === index || !this.linear;
2630
3320
  }
2631
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: StepperComponent, deps: [{ token: i3$2.Directionality, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
3321
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: StepperComponent, deps: [{ token: i3$3.Directionality, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
2632
3322
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: StepperComponent, selector: "mad-stepper", inputs: { nextButtonLabel: "nextButtonLabel", doneButtonLabel: "doneButtonLabel" }, outputs: { animationDone: "animationDone" }, host: { attributes: { "role": "tablist" }, properties: { "class.stepper-vertical": "true", "attr.aria-orientation": "\"vertical\"" } }, providers: [{ provide: CdkStepper, useExisting: StepperComponent }], queries: [{ propertyName: "_steps", predicate: StepComponent, descendants: true }], viewQueries: [{ propertyName: "_stepHeader", predicate: StepHeaderComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Vertical stepper -->\n<ng-container>\n <div *ngFor=\"let step of steps; let i = index; let isLast = last; let isFirst = first\">\n <ng-container [ngTemplateOutlet]=\"stepTemplate\" [ngTemplateOutletContext]=\"{ step: step, i: i }\"></ng-container>\n <div class=\"vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\">\n <div\n class=\"vertical-stepper-content\"\n role=\"tabpanel\"\n [@stepTransition]=\"_getAnimationDirection(i)\"\n (@stepTransition.done)=\"_animationDone.next($event)\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [attr.aria-expanded]=\"selectedIndex === i\"\n >\n <div class=\"vertical-content\">\n <ng-container\n [ngTemplateOutlet]=\"step.content\"\n [ngTemplateOutletContext]=\"{\n step: step,\n i: i,\n last: isLast,\n first: isFirst,\n nextBtnLbl: this.nextButtonLabel,\n doneBtnLbl: this.doneButtonLabel\n }\"\n ></ng-container>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template let-step=\"step\" let-i=\"i\" #stepTemplate>\n <mad-step-header\n class=\"mat-vertical-stepper-header\"\n (click)=\"step.selectAndMarkAsTouched(i)\"\n (keydown)=\"_onKeydown($event)\"\n [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"steps.length\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndex == i\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"!step.ariaLabel && step.ariaLabelledby ? step.ariaLabelledby : null\"\n [attr.aria-disabled]=\"_stepIsNavigable(i, step) ? null : true\"\n [index]=\"i\"\n [completed]=\"step.completed\"\n [hasError]=\"step.hasError\"\n [state]=\"_getIndicatorType(i, step.state)\"\n [label]=\"step.stepLabel || step.label\"\n [selected]=\"selectedIndex === i\"\n [active]=\"_stepIsNavigable(i, step)\"\n [optional]=\"step.optional\"\n [closed]=\"step.stepClosed\"\n [errorMessage]=\"step.errorMessage\"\n ></mad-step-header>\n</ng-template>\n", styles: [".stepper-vertical{display:block}.mat-vertical-stepper-header{display:flex;align-items:center;border:none!important}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{overflow:hidden;outline:0}.vertical-content{padding:0 24px}.step-container{border-left:1px solid lightgrey;border-right:1px solid lightgrey;border-bottom:1px solid lightgrey;flex-direction:column;box-sizing:border-box;display:flex}.step-content,.step-buttons{padding:2em}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: StepHeaderComponent, selector: "mad-step-header", inputs: ["color", "index", "label", "state", "errorMessage", "selected", "active", "optional", "hasError", "completed", "closed"] }], animations: [madStepperAnimations.verticalStepTransition], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2633
3323
  }
2634
3324
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: StepperComponent, decorators: [{
@@ -2638,7 +3328,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2638
3328
  '[attr.aria-orientation]': '"vertical"',
2639
3329
  role: 'tablist',
2640
3330
  }, animations: [madStepperAnimations.verticalStepTransition], providers: [{ provide: CdkStepper, useExisting: StepperComponent }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Vertical stepper -->\n<ng-container>\n <div *ngFor=\"let step of steps; let i = index; let isLast = last; let isFirst = first\">\n <ng-container [ngTemplateOutlet]=\"stepTemplate\" [ngTemplateOutletContext]=\"{ step: step, i: i }\"></ng-container>\n <div class=\"vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\">\n <div\n class=\"vertical-stepper-content\"\n role=\"tabpanel\"\n [@stepTransition]=\"_getAnimationDirection(i)\"\n (@stepTransition.done)=\"_animationDone.next($event)\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [attr.aria-expanded]=\"selectedIndex === i\"\n >\n <div class=\"vertical-content\">\n <ng-container\n [ngTemplateOutlet]=\"step.content\"\n [ngTemplateOutletContext]=\"{\n step: step,\n i: i,\n last: isLast,\n first: isFirst,\n nextBtnLbl: this.nextButtonLabel,\n doneBtnLbl: this.doneButtonLabel\n }\"\n ></ng-container>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template let-step=\"step\" let-i=\"i\" #stepTemplate>\n <mad-step-header\n class=\"mat-vertical-stepper-header\"\n (click)=\"step.selectAndMarkAsTouched(i)\"\n (keydown)=\"_onKeydown($event)\"\n [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"steps.length\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndex == i\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"!step.ariaLabel && step.ariaLabelledby ? step.ariaLabelledby : null\"\n [attr.aria-disabled]=\"_stepIsNavigable(i, step) ? null : true\"\n [index]=\"i\"\n [completed]=\"step.completed\"\n [hasError]=\"step.hasError\"\n [state]=\"_getIndicatorType(i, step.state)\"\n [label]=\"step.stepLabel || step.label\"\n [selected]=\"selectedIndex === i\"\n [active]=\"_stepIsNavigable(i, step)\"\n [optional]=\"step.optional\"\n [closed]=\"step.stepClosed\"\n [errorMessage]=\"step.errorMessage\"\n ></mad-step-header>\n</ng-template>\n", styles: [".stepper-vertical{display:block}.mat-vertical-stepper-header{display:flex;align-items:center;border:none!important}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{overflow:hidden;outline:0}.vertical-content{padding:0 24px}.step-container{border-left:1px solid lightgrey;border-right:1px solid lightgrey;border-bottom:1px solid lightgrey;flex-direction:column;box-sizing:border-box;display:flex}.step-content,.step-buttons{padding:2em}\n"] }]
2641
- }], ctorParameters: () => [{ type: i3$2.Directionality, decorators: [{
3331
+ }], ctorParameters: () => [{ type: i3$3.Directionality, decorators: [{
2642
3332
  type: Optional
2643
3333
  }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { animationDone: [{
2644
3334
  type: Output
@@ -3169,7 +3859,7 @@ class ToolbarComponent {
3169
3859
  return this.getToolbarActions().filter((value) => !!value.importantAction).length > 0;
3170
3860
  }
3171
3861
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1$5.BreakpointObserver }, { token: i2$4.Title }, { token: ToolbarService }], target: i0.ɵɵFactoryTarget.Component }); }
3172
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ToolbarComponent, selector: "mad-toolbar", ngImport: i0, template: "<mat-toolbar class=\"content-toolbar\">\n <a [routerLink]=\"getBackAction().routerLink\" *ngIf=\"isRouterLink(getBackAction())\">\n <button [id]=\"'go-back'\" color=\"primary\" mat-icon-button class=\"go-back-button\">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a [href]=\"getBackAction().href\" *ngIf=\"isAbsoluteLink(getBackAction())\">\n <button [id]=\"'go-back'\" class=\"go-back-button\" color=\"primary\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a (click)=\"getBackAction().action()\" *ngIf=\"isAction(getBackAction())\">\n <button [id]=\"'go-back'\" color=\"primary\" mat-icon-button class=\"go-back-button\">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n\n <span class=\"toolbar-title\">{{ getTitle() }}</span>\n\n <ng-container *ngFor=\"let mainAction of getMainActions(); let i = index\">\n <ng-container *ngIf=\"hasPermission(mainAction) | async\">\n <div *ngIf=\"!(isHandset$ | async)\">\n <a [routerLink]=\"mainAction.routerLink\" *ngIf=\"isRouterLink(mainAction)\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </mad-primary-button>\n </a>\n <a (click)=\"mainAction.action()\" *ngIf=\"isAction(mainAction)\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </mad-primary-button>\n </a>\n </div>\n <div *ngIf=\"isHandset$ | async\">\n <mad-material-action-button\n *ngIf=\"isRouterLink(getBackAction())\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n [routerLink]=\"mainAction.routerLink\"\n [id]=\"mainAction.matIcon\"\n />\n <mad-material-action-button\n *ngIf=\"isAction(getBackAction())\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n (click)=\"mainAction.action()\"\n [id]=\"mainAction.matIcon\"\n />\n </div>\n </ng-container>\n </ng-container>\n\n <div class=\"right-aligned no-print\">\n <ng-container *ngFor=\"let action of getToolbarActions(); let i = index\">\n <ng-container *ngIf=\"hasPermission(action) | async\">\n <mad-icon-button\n (click)=\"action.action()\"\n *ngIf=\"\n (!(isHandset$ | async) && !getToolbarActionsAlwaysAsMenu()) ||\n i < (getToolbarActions().length > 2 ? (hasImportantToolbarActions() ? 0 : 1) : 2) ||\n !!action.importantAction\n \"\n [id]=\"action.matIcon\"\n [matTooltip]=\"action.actionName\"\n type=\"button\"\n >\n <mat-icon\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n matBadgePosition=\"below after\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n >{{ action.matIcon }}</mat-icon\n >\n </mad-icon-button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"(isHandset$ | async) || getToolbarActionsAlwaysAsMenu()\">\n <ng-container *ngIf=\"getToolbarActions().length > 2\">\n <mad-icon-button type=\"button\" [matMenuTriggerFor]=\"burgerMenu\" [matTooltip]=\"getToolbarActionsMenuTitle()\">\n <mat-icon\n matBadgeColor=\"warn\"\n [matBadge]=\"showBadgeForMenu() ? '&#8288;' : null\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >more_vert\n </mat-icon>\n </mad-icon-button>\n <mat-menu #burgerMenu=\"matMenu\" class=\"no-print toolbar-menu\">\n <ng-container *ngFor=\"let action of getToolbarActions(); let i = index\">\n <ng-container *ngIf=\"!action.importantAction\">\n <ng-container *ngIf=\"hasPermission(action) | async\">\n <button\n *ngIf=\"i >= (hasImportantToolbarActions() ? 0 : 1)\"\n mat-menu-item\n (click)=\"action.action()\"\n [title]=\"action.actionName\"\n >\n <mat-icon\n color=\"primary\"\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n matBadgePosition=\"below after\"\n >{{ action.matIcon }}</mat-icon\n >\n {{ action.actionName }}\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </mat-menu>\n </ng-container>\n </ng-container>\n </div>\n</mat-toolbar>\n", styles: ["mat-toolbar{background:white}.content-toolbar{height:57px;border-bottom:1px solid #dcdcdc}.right-aligned{overflow:hidden;margin-left:auto;margin-right:0}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}::ng-deep .mat-badge-content{bottom:-7px!important;right:-7px!important}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i6.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: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MaterialActionButtonComponent, selector: "mad-material-action-button", inputs: ["actionName", "id", "icon", "routerLink", "liftHigher", "liftHigher2"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "directive", type: i14.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
3862
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ToolbarComponent, selector: "mad-toolbar", ngImport: i0, template: "<mat-toolbar class=\"content-toolbar\">\n <a [routerLink]=\"getBackAction().routerLink\" *ngIf=\"isRouterLink(getBackAction())\">\n <button [id]=\"'go-back'\" color=\"primary\" mat-icon-button class=\"go-back-button\">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a [href]=\"getBackAction().href\" *ngIf=\"isAbsoluteLink(getBackAction())\">\n <button [id]=\"'go-back'\" class=\"go-back-button\" color=\"primary\" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a (click)=\"getBackAction().action()\" *ngIf=\"isAction(getBackAction())\">\n <button [id]=\"'go-back'\" color=\"primary\" mat-icon-button class=\"go-back-button\">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n\n <span class=\"toolbar-title\">{{ getTitle() }}</span>\n\n <ng-container *ngFor=\"let mainAction of getMainActions(); let i = index\">\n <ng-container *ngIf=\"hasPermission(mainAction) | async\">\n <div *ngIf=\"!(isHandset$ | async)\">\n <a [routerLink]=\"mainAction.routerLink\" *ngIf=\"isRouterLink(mainAction)\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </mad-primary-button>\n </a>\n <a (click)=\"mainAction.action()\" *ngIf=\"isAction(mainAction)\">\n <mad-primary-button [id]=\"mainAction.matIcon\" style=\"margin-left: 56px\" [matTooltip]=\"mainAction.tooltip\">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </mad-primary-button>\n </a>\n </div>\n <div *ngIf=\"isHandset$ | async\">\n <mad-material-action-button\n *ngIf=\"isRouterLink(getBackAction())\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n [routerLink]=\"mainAction.routerLink\"\n [id]=\"mainAction.matIcon\"\n />\n <mad-material-action-button\n *ngIf=\"isAction(getBackAction())\"\n [actionName]=\"mainAction.actionName\"\n [icon]=\"mainAction.matIcon\"\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\n [liftHigher2]=\"i > 0\"\n (click)=\"mainAction.action()\"\n [id]=\"mainAction.matIcon\"\n />\n </div>\n </ng-container>\n </ng-container>\n\n <div class=\"right-aligned no-print\">\n <ng-container *ngFor=\"let action of getToolbarActions(); let i = index\">\n <ng-container *ngIf=\"hasPermission(action) | async\">\n <mad-icon-button\n (click)=\"action.action()\"\n *ngIf=\"\n (!(isHandset$ | async) && !getToolbarActionsAlwaysAsMenu()) ||\n i < (getToolbarActions().length > 2 ? (hasImportantToolbarActions() ? 0 : 1) : 2) ||\n !!action.importantAction\n \"\n [id]=\"action.matIcon\"\n [matTooltip]=\"action.actionName\"\n type=\"button\"\n >\n <mat-icon\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n matBadgePosition=\"below after\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n >{{ action.matIcon }}</mat-icon\n >\n </mad-icon-button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"(isHandset$ | async) || getToolbarActionsAlwaysAsMenu()\">\n <ng-container *ngIf=\"getToolbarActions().length > 2\">\n <mad-icon-button type=\"button\" [matMenuTriggerFor]=\"burgerMenu\" [matTooltip]=\"getToolbarActionsMenuTitle()\">\n <mat-icon\n matBadgeColor=\"warn\"\n [matBadge]=\"showBadgeForMenu() ? '&#8288;' : null\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >more_vert\n </mat-icon>\n </mad-icon-button>\n <mat-menu #burgerMenu=\"matMenu\" class=\"no-print toolbar-menu\">\n <ng-container *ngFor=\"let action of getToolbarActions(); let i = index\">\n <ng-container *ngIf=\"!action.importantAction\">\n <ng-container *ngIf=\"hasPermission(action) | async\">\n <button\n *ngIf=\"i >= (hasImportantToolbarActions() ? 0 : 1)\"\n mat-menu-item\n (click)=\"action.action()\"\n [title]=\"action.actionName\"\n >\n <mat-icon\n color=\"primary\"\n [matBadgeColor]=\"action.badge ? action.badge.color : 'primary'\"\n [matBadge]=\"action.badge ? action.badge.value : null\"\n matBadgePosition=\"below after\"\n >{{ action.matIcon }}</mat-icon\n >\n {{ action.actionName }}\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </mat-menu>\n </ng-container>\n </ng-container>\n </div>\n</mat-toolbar>\n", styles: ["mat-toolbar{background:white}.content-toolbar{height:57px;border-bottom:1px solid #dcdcdc}.right-aligned{overflow:hidden;margin-left:auto;margin-right:0}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}::ng-deep .mat-badge-content{bottom:-7px!important;right:-7px!important}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i6.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: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MaterialActionButtonComponent, selector: "mad-material-action-button", inputs: ["actionName", "id", "icon", "routerLink", "liftHigher", "liftHigher2"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: PrimaryButtonComponent, selector: "mad-primary-button", inputs: ["type", "disabled", "title"] }, { kind: "component", type: IconButtonComponent, selector: "mad-icon-button", inputs: ["type", "disabled", "title"] }, { kind: "directive", type: i14.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
3173
3863
  }
3174
3864
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ToolbarComponent, decorators: [{
3175
3865
  type: Component,
@@ -3360,7 +4050,7 @@ class FileUploadComponent {
3360
4050
  window.open(window.URL.createObjectURL(file));
3361
4051
  }
3362
4052
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3363
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: FileUploadComponent, isStandalone: true, selector: "mad-file-upload", inputs: { id: "id", multiple: "multiple", accept: "accept", text: "text", showFileList: "showFileList" }, outputs: { fileEmitter: "fileEmitter", errorEmitter: "errorEmitter" }, ngImport: i0, template: "<mat-card\n (click)=\"fileInput.click()\"\n (onFileDropped)=\"uploadFile($event)\"\n class=\"uploadFileContainer\"\n madDragAndDrop\n id=\"uploadFileContainer\"\n>\n <input\n #fileInput\n (change)=\"uploadFile($event.target.files)\"\n (click)=\"fileInput.value = null\"\n [accept]=\"acceptForInput\"\n [id]=\"id\"\n [multiple]=\"multiple\"\n hidden\n type=\"file\"\n />\n <mat-card-content>\n <mat-icon>vertical_align_top</mat-icon>\n {{ text ? text : 'Upload' }}\n </mat-card-content>\n</mat-card>\n\n<ng-container *ngIf=\"showFileList\">\n <mat-chip-listbox>\n <mat-chip *ngFor=\"let file of fileList\" (click)=\"openFile(file)\" class=\"download\">{{ file.name }}</mat-chip>\n </mat-chip-listbox>\n</ng-container>\n", styles: [".uploadFileContainer{background-repeat:no-repeat;background-position:center;height:100px;margin:0;border:2px dashed var(--main-primary)}.uploadFileContainer:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.uploadFileContainer,.mat-mdc-card-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i2$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2$1.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: DragAndDropDirectiveDirective, selector: "[madDragAndDrop]", outputs: ["onFileDropped"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "aria-description", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i4$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }] }); }
4053
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: FileUploadComponent, isStandalone: true, selector: "mad-file-upload", inputs: { id: "id", multiple: "multiple", accept: "accept", text: "text", showFileList: "showFileList" }, outputs: { fileEmitter: "fileEmitter", errorEmitter: "errorEmitter" }, ngImport: i0, template: "<mat-card\n (click)=\"fileInput.click()\"\n (onFileDropped)=\"uploadFile($event)\"\n class=\"uploadFileContainer\"\n madDragAndDrop\n id=\"uploadFileContainer\"\n>\n <input\n #fileInput\n (change)=\"uploadFile($event.target.files)\"\n (click)=\"fileInput.value = null\"\n [accept]=\"acceptForInput\"\n [id]=\"id\"\n [multiple]=\"multiple\"\n hidden\n type=\"file\"\n />\n <mat-card-content>\n <mat-icon>vertical_align_top</mat-icon>\n {{ text ? text : 'Upload' }}\n </mat-card-content>\n</mat-card>\n\n<ng-container *ngIf=\"showFileList\">\n <mat-chip-listbox>\n <mat-chip *ngFor=\"let file of fileList\" (click)=\"openFile(file)\" class=\"download\">{{ file.name }}</mat-chip>\n </mat-chip-listbox>\n</ng-container>\n", styles: [".uploadFileContainer{background-repeat:no-repeat;background-position:center;height:100px;margin:0;border:2px dashed var(--main-primary)}.uploadFileContainer:hover{cursor:pointer;background-color:var(--selection-background)!important;opacity:.8}.uploadFileContainer,.mat-mdc-card-content{display:flex;justify-content:center;align-items:center}.download{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i2$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i2$1.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: DragAndDropDirectiveDirective, selector: "[madDragAndDrop]", outputs: ["onFileDropped"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "aria-description", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i4$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }] }); }
3364
4054
  }
3365
4055
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FileUploadComponent, decorators: [{
3366
4056
  type: Component,
@@ -3389,5 +4079,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
3389
4079
  * Generated bundle index. Do not edit.
3390
4080
  */
3391
4081
 
3392
- export { BaseQuickListComponent, ButtonModule, CardComponent, CardModule, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DangerButtonComponent, DataTableColumnsModalComponent, DataTableComponent, DataTableModule, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, ToolbarComponent, ToolbarModule, ToolbarService, madStepperAnimations };
4082
+ export { BaseQuickListComponent, ButtonModule, CardComponent, CardModule, ContentHeaderComponent, ContentPanelContainerComponent, ContentPanelContainerContentComponent, ContentPanelContainerFooterComponent, ContentPanelContainerSidebarComponent, ContentPanelModule, DangerButtonComponent, DataTableActionType, DataTableColumnsModalComponent, DataTableComponent, DataTablePersistenceService, DataTableTemplateCellDefinition, DataTableTemplateColumnDefinition, DataTableTemplateExpandableCellDefinition, DataTableTemplateExpandableColumnDefinition, FileUploadComponent, FlowbarComponent, FlowbarModule, IconButtonComponent, LinkButtonComponent, MAD_DATA_TABLE_GLOBAL_CONFIGURATION, MAD_DATA_TABLE_PERSISTENCE_SERVICE, MadBasicButton, MadButtonDirective, MadButtonGroupComponent, MainContainerComponent, MaterialActionButtonComponent, MaterialActionButtonModule, MaterialAddonsModule, NumberFormatService, NumericFieldDirective, NumericFieldModule, OutlineButtonComponent, PrimaryButtonComponent, QuickListCompactComponent, QuickListComponent, QuickListModule, ReactiveFormQuickListCompactComponent, ReactiveFormQuickListComponent, ReadOnlyFormFieldComponent, ReadOnlyFormFieldModule, ReadOnlyFormFieldWrapperComponent, SidebarComponent, SidebarItemComponent, SidebarModule, StepComponent, StepHeaderComponent, StepperComponent, StepperModule, TableComponent, TableModule, ThrottleClickDirective, ThrottleClickModule, ToolbarComponent, ToolbarModule, ToolbarService, madStepperAnimations };
3393
4083
  //# sourceMappingURL=porscheinformatik-material-addons.mjs.map