@porscheinformatik/material-addons 17.1.3 → 17.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +11 -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 +57 -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 +1098 -432
  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 +11 -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 +12 -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,77 @@ 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(format) {
1911
+ return (tableData, matSort) => [...tableData].sort((a, b) => DataTableSortUtil.compare(a, b, matSort, format));
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, format) {
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
+ const dateX = DateTime.fromFormat(x, format);
1929
+ const dateY = DateTime.fromFormat(stringY, format);
1930
+ return dateX.isValid && dateY.isValid
1931
+ ? DataTableSortUtil.compareDate(dateX, dateY, ascending)
1932
+ : DataTableSortUtil.compareString(x, stringY, ascending);
1933
+ }
1991
1934
  case 'boolean':
1992
- return DataTableComponent.compareBoolean(x, y, ascending);
1935
+ return DataTableSortUtil.compareBoolean(x, y, ascending);
1993
1936
  default:
1994
1937
  // cannot compare -> return equal
1995
1938
  return 0;
@@ -1998,6 +1941,9 @@ class DataTableComponent {
1998
1941
  static compareNumber(x, y, ascending) {
1999
1942
  return ascending ? x - y : y - x;
2000
1943
  }
1944
+ static compareDate(x, y, ascending) {
1945
+ return DataTableSortUtil.compareNumber(+x, +y, ascending);
1946
+ }
2001
1947
  static compareString(x, y, ascending) {
2002
1948
  return ascending ? x.localeCompare(y) : y.localeCompare(x);
2003
1949
  }
@@ -2014,267 +1960,1015 @@ class DataTableComponent {
2014
1960
  return x ? 1 : -1;
2015
1961
  }
2016
1962
  }
1963
+ }
1964
+
1965
+ class DataTableActionUtil {
1966
+ static getDisplayActions(actions, selectionMode) {
1967
+ const rowActions = [];
1968
+ const tableActions = [];
1969
+ for (const action of actions) {
1970
+ if (selectionMode !== action.hiddenInMode) {
1971
+ switch (action.type) {
1972
+ case 'SINGLE':
1973
+ if (selectionMode === 'SINGLE') {
1974
+ rowActions.push(action);
1975
+ }
1976
+ else {
1977
+ tableActions.push(action);
1978
+ }
1979
+ break;
1980
+ case 'BATCH':
1981
+ if (selectionMode !== 'SINGLE') {
1982
+ tableActions.push(action);
1983
+ }
1984
+ break;
1985
+ default:
1986
+ tableActions.push(action);
1987
+ }
1988
+ }
1989
+ }
1990
+ return {
1991
+ rowActions: rowActions,
1992
+ groupedTableActions: DataTableActionUtil.getGroupedTableActions(tableActions),
1993
+ };
1994
+ }
1995
+ static getGroupedTableActions(tableActions) {
1996
+ return Object.values(tableActions.reduce((result, current) => {
1997
+ const index = Object.entries(result).findIndex(([, actions]) => actions.find((it) => !!current.groupId && it.groupId === current.groupId));
1998
+ const key = index !== -1 ? index : Object.keys(result).length || 0;
1999
+ (result[key] = result[key] || []).push(current);
2000
+ return result;
2001
+ }, {}));
2002
+ }
2003
+ }
2004
+
2005
+ class DataTableDataUtil {
2006
+ static updateRowMap(rowMap, data, columns, idGenerator, parentIdGenerator) {
2007
+ rowMap.clear();
2008
+ data?.forEach((it) => {
2009
+ const rowId = DataTableDataUtil.createRowId(it, idGenerator);
2010
+ const dataRow = DataTableDataUtil.createDataTableRow(it, rowId, parentIdGenerator, columns);
2011
+ rowMap.set(rowId, dataRow);
2012
+ });
2013
+ return rowMap;
2014
+ }
2015
+ static createRowId(data, idGenerator) {
2016
+ let id;
2017
+ if (!!idGenerator) {
2018
+ id = idGenerator(data);
2019
+ }
2020
+ return (!!id ? id : v4()).toString();
2021
+ }
2022
+ static createDataTableRow(data, rowId, parentIdGenerator, columns) {
2023
+ const parentId = parentIdGenerator ? parentIdGenerator(data) : undefined;
2024
+ const displayedData = DataTableDataUtil.createDisplayedData(rowId, parentId, data, columns);
2025
+ const dataRow = {
2026
+ id: rowId,
2027
+ parentId: parentId,
2028
+ actualData: data,
2029
+ displayedData: displayedData,
2030
+ };
2031
+ return dataRow;
2032
+ }
2033
+ static createDisplayedData(rowId, parentId, actualDataElement, columns) {
2034
+ const displayedData = {};
2035
+ displayedData['rowId'] = rowId;
2036
+ displayedData['parentId'] = parentId;
2037
+ // keep non displayed data in row
2038
+ for (const key of Object.keys(actualDataElement)) {
2039
+ const column = columns.find((it) => it.dataPropertyName === key);
2040
+ const actualValue = actualDataElement[key];
2041
+ displayedData[key] = DataTableDataUtil.transformData(actualValue, column?.transformer, column?.transformerParams);
2042
+ }
2043
+ return displayedData;
2044
+ }
2017
2045
  static transformData(value, transformer, transformerParams) {
2018
2046
  if (!transformer || !(transformer instanceof Function)) {
2019
2047
  return value;
2020
2048
  }
2021
2049
  return transformer(value, transformerParams);
2022
2050
  }
2023
- static generateRowId() {
2024
- return v4();
2051
+ }
2052
+
2053
+ class DataTableFilterUtil {
2054
+ static columnBasedFilterPredicate(rowMap) {
2055
+ return (row, filterString) => {
2056
+ const actualData = rowMap.get(row.rowId)?.actualData;
2057
+ const displayedData = row;
2058
+ const filters = JSON.parse(filterString);
2059
+ return Object.entries(filters).every(([key, value]) => !value || this.contains(actualData, key, value) || this.contains(displayedData, key, value));
2060
+ };
2025
2061
  }
2026
- static isClickOnRowMenuIcon(event) {
2027
- return event?.target?.classList.contains('mat-icon');
2062
+ static tableBasedFilterPredicate() {
2063
+ return (data, filter) => {
2064
+ const transform = (str) => str
2065
+ .trim()
2066
+ .toLowerCase()
2067
+ .replace(/^"(.*)"$/, '$1');
2068
+ const dataStr = transform(JSON.stringify(data));
2069
+ return dataStr.indexOf(transform(filter)) != -1;
2070
+ };
2028
2071
  }
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
- }
2072
+ static contains(data, key, searchTerm) {
2073
+ return (String(data[key]) ?? '').toLowerCase().includes(searchTerm.toLowerCase());
2036
2074
  }
2037
- ngAfterViewInit() {
2038
- if (!this.useAsync) {
2039
- this.dataSource.paginator = this.paginator;
2040
- this.dataSource.sort = this.sort;
2041
- }
2075
+ }
2076
+
2077
+ class DataTablePersistenceService {
2078
+ constructor() {
2079
+ this.sortKey = 'sort';
2080
+ this.filterKey = 'filter';
2081
+ this.pageSizeKey = 'pageSize';
2042
2082
  }
2043
- onColumnSettings(definition) {
2044
- this.showColumnModal = true;
2045
- this.selectedDefinition = definition ? definition : this.allColumnDefinitions[0];
2046
- if (this.allAvailableColumns) {
2047
- this.openColumnModal();
2083
+ saveSort(tableId, sort) {
2084
+ this.save(this.getId(tableId, this.sortKey), sort);
2085
+ }
2086
+ loadSort(tableId) {
2087
+ return this.load(this.getId(tableId, this.sortKey));
2088
+ }
2089
+ saveFilter(tableId, filter) {
2090
+ this.save(this.getId(tableId, this.filterKey), filter);
2091
+ }
2092
+ loadFilter(tableId) {
2093
+ return this.load(this.getId(tableId, this.filterKey));
2094
+ }
2095
+ savePageSize(tableId, pageSize) {
2096
+ this.save(this.getId(tableId, this.pageSizeKey), pageSize);
2097
+ }
2098
+ loadPageSize(tableId) {
2099
+ return this.load(this.getId(tableId, this.pageSizeKey));
2100
+ }
2101
+ save(id, item) {
2102
+ if (!!item) {
2103
+ localStorage.setItem(id, JSON.stringify(item));
2048
2104
  }
2049
2105
  else {
2050
- // if no complete definitions have been loaded yet send an event so the app can load it
2051
- this.allColumnsEvent.emit();
2106
+ localStorage.removeItem(id);
2052
2107
  }
2053
2108
  }
2054
- onViewDefinition(definition) {
2055
- this.selectedDefinition = definition;
2056
- this.viewDefinitionChangeEvent.emit(definition);
2109
+ load(id) {
2110
+ const item = localStorage.getItem(id);
2111
+ return !!item ? JSON.parse(item) : undefined;
2057
2112
  }
2058
- isCurrentDefinition(definition) {
2059
- return this.selectedDefinition && this.selectedDefinition.id === definition.id;
2113
+ getId(tableId, key) {
2114
+ return `${tableId}.${key}`;
2060
2115
  }
2061
- get selectedCount() {
2062
- return this.selectionModel?.selected ? this.selectionModel.selected.length : 0;
2116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTablePersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2117
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTablePersistenceService, providedIn: 'root' }); }
2118
+ }
2119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTablePersistenceService, decorators: [{
2120
+ type: Injectable,
2121
+ args: [{
2122
+ providedIn: 'root',
2123
+ }]
2124
+ }] });
2125
+ const MAD_DATA_TABLE_PERSISTENCE_SERVICE = new InjectionToken('mad-data-table-persistence-service');
2126
+ function DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER_FACTORY(persistenceService) {
2127
+ return persistenceService || new DataTablePersistenceService();
2128
+ }
2129
+ const DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER = {
2130
+ // If there is a custom DataTablePersistenceService available, use that. Otherwise, provide the "local storage" default one.
2131
+ provide: MAD_DATA_TABLE_PERSISTENCE_SERVICE,
2132
+ deps: [[new Optional(), new SkipSelf(), new Inject(MAD_DATA_TABLE_PERSISTENCE_SERVICE)]],
2133
+ useFactory: DATA_TABLE_PERSISTENCE_SERVICE_PROVIDER_FACTORY,
2134
+ };
2135
+
2136
+ const MAD_DATA_TABLE_GLOBAL_CONFIGURATION = new InjectionToken('mad-data-table-global-configuration');
2137
+ // If there is a custom DATA_TABLE_CONFIG_PROVIDER available, use that. Otherwise, provide the default one.
2138
+ const MAD_DATA_TABL_GLOBAL_CONFIGURATION_PROVIDER = {
2139
+ provide: MAD_DATA_TABLE_GLOBAL_CONFIGURATION,
2140
+ deps: [[new Optional(), new SkipSelf(), new Inject(MAD_DATA_TABLE_GLOBAL_CONFIGURATION)]],
2141
+ useFactory: (dataTableConfig) => dataTableConfig ?? {
2142
+ dateTimeFormat: 'dd.MM.yyyy',
2143
+ },
2144
+ };
2145
+
2146
+ class DataTableFilterDialogComponent {
2147
+ set filterValue(value) {
2148
+ this.control.setValue(value);
2063
2149
  }
2064
- get rowCount() {
2065
- return this.getAllDataSourceRowsOfCurrentPage() ? this.getAllDataSourceRowsOfCurrentPage().length : 0;
2150
+ constructor() {
2151
+ this.filterChanged = new EventEmitter();
2152
+ this.control = new FormControl(null);
2153
+ this._subscription = new Subscription();
2154
+ this._subscription.add(this.control.valueChanges.subscribe((value) => this.filterChanged.emit(value)));
2066
2155
  }
2067
- getAllDataSourceRowsOfCurrentPage() {
2068
- return this.dataSource?._pageData(this.dataSource.data);
2156
+ ngOnDestroy() {
2157
+ this._subscription.unsubscribe();
2069
2158
  }
2070
- getSelectedCount(actionType) {
2071
- const count = this.selectedCount;
2072
- if (actionType !== this.BATCH || count < 2) {
2073
- return '';
2074
- }
2075
- return ' (' + count + ')';
2159
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilterDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2160
+ 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" }] }); }
2161
+ }
2162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilterDialogComponent, decorators: [{
2163
+ type: Component,
2164
+ 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"] }]
2165
+ }], ctorParameters: () => [], propDecorators: { filterOptions: [{
2166
+ type: Input
2167
+ }], filterValue: [{
2168
+ type: Input
2169
+ }], filterChanged: [{
2170
+ type: Output
2171
+ }] } });
2172
+
2173
+ class FilterComponent {
2174
+ constructor(elementRef) {
2175
+ this.elementRef = elementRef;
2176
+ this.filterValueChange = new EventEmitter();
2076
2177
  }
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
- }
2178
+ toggleFilter(event) {
2179
+ event.preventDefault();
2180
+ this.showFilterDialog = !this.showFilterDialog;
2086
2181
  }
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
- });
2182
+ onFilterChanged(filterValue) {
2183
+ this.isActive = !!filterValue;
2184
+ this.filterValue = filterValue;
2185
+ this.filterValueChange.emit(this.filterValue);
2186
+ }
2187
+ onClick(event) {
2188
+ if (!this.elementRef.nativeElement.contains(event.target)) {
2189
+ this.showFilterDialog = false;
2099
2190
  }
2100
2191
  }
2101
- isSelected(rowId) {
2102
- return this.selectionModel.isSelected(rowId);
2192
+ get opacity() {
2193
+ return this.isActive ? '1' : this.isHovered || this.showFilterDialog ? '0.54' : '0';
2103
2194
  }
2104
- setFilterValue(value) {
2105
- if (this.dataSource) {
2106
- this.dataSource.filter = value?.trim().toLowerCase();
2107
- }
2195
+ 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 }); }
2196
+ 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"] }] }); }
2197
+ }
2198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FilterComponent, decorators: [{
2199
+ type: Component,
2200
+ 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"] }]
2201
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { filterValueChange: [{
2202
+ type: Output
2203
+ }], onClick: [{
2204
+ type: HostListener,
2205
+ args: ['document:click', ['$event']]
2206
+ }] } });
2207
+
2208
+ class DataTableFilterHeader {
2209
+ set madFilterOptions(filterOptions) {
2210
+ this._filterOptions = filterOptions || [];
2108
2211
  }
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
- }
2212
+ constructor(element, viewContainerRef, renderer, madFilter, matSortHeader) {
2213
+ this.element = element;
2214
+ this.viewContainerRef = viewContainerRef;
2215
+ this.renderer = renderer;
2216
+ this.madFilter = madFilter;
2217
+ this.matSortHeader = matSortHeader;
2218
+ this._subscription = new Subscription();
2130
2219
  }
2131
- onSortingEvent(sort) {
2132
- if (this.useAsync) {
2133
- this.sortEvent.emit(sort);
2220
+ ngOnInit() {
2221
+ this._filterComponent = this.viewContainerRef.createComponent(FilterComponent);
2222
+ this._filterComponent.instance.filterOptions = this._filterOptions;
2223
+ this._filterComponent.changeDetectorRef.detectChanges();
2224
+ this.insertFilterComponent();
2225
+ this.observeFilterComponent();
2226
+ }
2227
+ ngAfterViewInit() {
2228
+ if (!!this.matSortHeader) {
2229
+ const reference = this.matSortHeader._handleClick.bind(this.matSortHeader);
2230
+ this.matSortHeader._handleClick = () => { };
2231
+ this.findArrow(this.element.nativeElement).addEventListener('click', reference);
2134
2232
  }
2135
- else {
2136
- this.internalSort(sort);
2233
+ if (!!this.madFilter) {
2234
+ this.madFilter.register(this);
2137
2235
  }
2138
2236
  }
2139
- onPageEvent(event) {
2140
- if (this.useAsync) {
2141
- this.pageEvent.emit(event);
2142
- }
2237
+ ngOnDestroy() {
2238
+ this._subscription.unsubscribe();
2239
+ this.madFilter.unregister(this);
2143
2240
  }
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
- }
2241
+ observeFilterComponent() {
2242
+ this._subscription.add(this._filterComponent.instance.filterValueChange.subscribe((value) => {
2243
+ this._filterValue = value;
2244
+ this.madFilter.changeFilter();
2245
+ }));
2153
2246
  }
2154
- emitTableAction(action, selected) {
2155
- const emitAction = { ...action };
2156
- if (action.type !== this.NONE) {
2157
- emitAction.selected = [...selected];
2158
- }
2159
- this.actionEvent.emit(emitAction);
2247
+ get filterValue() {
2248
+ return this._filterValue;
2160
2249
  }
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;
2250
+ set filterValue(filterValue) {
2251
+ this._filterComponent.instance.filterValue = filterValue;
2252
+ this._filterComponent.changeDetectorRef.detectChanges();
2170
2253
  }
2171
- internalSort(sort) {
2172
- const sortedData = [...this.dataSource.data].sort((a, b) => DataTableComponent.compare(a, b, sort));
2173
- this.dataSource.data = [...sortedData];
2254
+ onMouseenter() {
2255
+ this._filterComponent.instance.isHovered = true;
2174
2256
  }
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
- }
2257
+ onMouseleave() {
2258
+ this._filterComponent.instance.isHovered = false;
2199
2259
  }
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);
2260
+ insertFilterComponent() {
2261
+ const componentNativeElement = this._filterComponent.location.nativeElement;
2262
+ const div = this.getWrappedHeader();
2263
+ if (!!this.matSortHeader) {
2264
+ const sortHeader = div.firstChild;
2265
+ this.renderer.insertBefore(sortHeader, componentNativeElement, sortHeader.firstChild.nextSibling);
2266
+ }
2267
+ else {
2268
+ this.renderer.appendChild(div, componentNativeElement);
2269
+ }
2270
+ }
2271
+ getWrappedHeader() {
2272
+ const headerContent = this.element.nativeElement.firstChild;
2273
+ this.renderer.removeChild(this.element.nativeElement, headerContent);
2274
+ const div = this.renderer.createElement('div');
2275
+ this.renderer.setStyle(div, 'display', 'flex');
2276
+ this.renderer.setStyle(div, 'align-items', 'center');
2277
+ if (this.madFilterColumnRightAligned) {
2278
+ this.renderer.setStyle(div, 'justify-content', 'flex-end');
2279
+ this.renderer.setStyle(headerContent.firstChild, 'justify-content', 'flex-end');
2280
+ }
2281
+ this.renderer.appendChild(div, headerContent);
2282
+ this.renderer.appendChild(this.element.nativeElement, div);
2283
+ return div;
2284
+ }
2285
+ findArrow(element) {
2286
+ return this.isArrowElement(element) ? element : this.findArrowInList(element.children);
2287
+ }
2288
+ findArrowInList(nativeElements) {
2289
+ for (let nativeElement of Array.from(nativeElements)) {
2290
+ const foundElement = this.findArrow(nativeElement);
2291
+ if (!!foundElement) {
2292
+ return foundElement;
2216
2293
  }
2217
2294
  }
2218
- this.dataSource.data = displayedDataList;
2219
- this.unsetPageSizeIfNecessary();
2295
+ return null;
2220
2296
  }
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,
2236
- };
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);
2297
+ isArrowElement(nativeElement) {
2298
+ return nativeElement.classList.contains('mat-sort-header-arrow');
2299
+ }
2300
+ 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 }); }
2301
+ 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 }); }
2302
+ }
2303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableFilterHeader, decorators: [{
2304
+ type: Directive,
2305
+ args: [{
2306
+ selector: 'th[mad-filter-header]',
2307
+ standalone: true,
2308
+ }]
2309
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: DataTableFilter, decorators: [{
2310
+ type: Optional
2311
+ }] }, { type: i7.MatSortHeader, decorators: [{
2312
+ type: Optional
2313
+ }] }], propDecorators: { id: [{
2314
+ type: Input,
2315
+ args: ['mad-filter-header']
2316
+ }], madFilterColumnRightAligned: [{
2317
+ type: Input
2318
+ }], madFilterOptions: [{
2319
+ type: Input
2320
+ }], onMouseenter: [{
2321
+ type: HostListener,
2322
+ args: ['mouseenter']
2323
+ }], onMouseleave: [{
2324
+ type: HostListener,
2325
+ args: ['mouseleave']
2326
+ }] } });
2327
+
2328
+ class DataTableTemplateColumnDefinition {
2329
+ register(cellDef) {
2330
+ this.cellDef = cellDef;
2331
+ }
2332
+ unregister() {
2333
+ this.cellDef = null;
2334
+ }
2335
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateColumnDefinition, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2336
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateColumnDefinition, isStandalone: true, selector: "[madColumnDef]", inputs: { madColumnDef: "madColumnDef" }, ngImport: i0 }); }
2337
+ }
2338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateColumnDefinition, decorators: [{
2339
+ type: Directive,
2340
+ args: [{
2341
+ selector: '[madColumnDef]',
2342
+ standalone: true,
2343
+ }]
2344
+ }], propDecorators: { madColumnDef: [{
2345
+ type: Input
2346
+ }] } });
2347
+
2348
+ class DataTableTemplateCellDefinition {
2349
+ constructor(templateRef, columnDef) {
2350
+ this.templateRef = templateRef;
2351
+ this.columnDef = columnDef;
2352
+ }
2353
+ ngOnInit() {
2354
+ this.columnDef.register(this);
2355
+ }
2356
+ ngOnDestroy() {
2357
+ this.columnDef.unregister();
2358
+ }
2359
+ getCellTemplate() {
2360
+ return this.templateRef;
2361
+ }
2362
+ 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 }); }
2363
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateCellDefinition, isStandalone: true, selector: "[madCellDef]", ngImport: i0 }); }
2364
+ }
2365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateCellDefinition, decorators: [{
2366
+ type: Directive,
2367
+ args: [{
2368
+ selector: '[madCellDef]',
2369
+ standalone: true,
2370
+ }]
2371
+ }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: DataTableTemplateColumnDefinition }] });
2372
+
2373
+ class DataTableTemplateExpandableColumnDefinition {
2374
+ register(cellDef) {
2375
+ this.cellDef = cellDef;
2376
+ }
2377
+ unregister() {
2378
+ this.cellDef = null;
2379
+ }
2380
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateExpandableColumnDefinition, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2381
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateExpandableColumnDefinition, isStandalone: true, selector: "[madExpandableColumnDef]", inputs: { madExpandableColumnDef: "madExpandableColumnDef" }, ngImport: i0 }); }
2382
+ }
2383
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateExpandableColumnDefinition, decorators: [{
2384
+ type: Directive,
2385
+ args: [{
2386
+ selector: '[madExpandableColumnDef]',
2387
+ standalone: true,
2388
+ }]
2389
+ }], propDecorators: { madExpandableColumnDef: [{
2390
+ type: Input
2391
+ }] } });
2392
+
2393
+ class DataTableTemplateExpandableCellDefinition {
2394
+ constructor(templateRef, columnDef) {
2395
+ this.templateRef = templateRef;
2396
+ this.columnDef = columnDef;
2397
+ }
2398
+ ngOnInit() {
2399
+ this.columnDef.register(this);
2400
+ }
2401
+ ngOnDestroy() {
2402
+ this.columnDef.unregister();
2403
+ }
2404
+ getCellTemplate() {
2405
+ return this.templateRef;
2406
+ }
2407
+ 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 }); }
2408
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: DataTableTemplateExpandableCellDefinition, isStandalone: true, selector: "[madExpandableCellDef]", ngImport: i0 }); }
2409
+ }
2410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableTemplateExpandableCellDefinition, decorators: [{
2411
+ type: Directive,
2412
+ args: [{
2413
+ selector: '[madExpandableCellDef]',
2414
+ standalone: true,
2415
+ }]
2416
+ }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: DataTableTemplateExpandableColumnDefinition }] });
2417
+
2418
+ class DataTableComponent {
2419
+ set useAsync(useAsync) {
2420
+ this._useAsync = useAsync;
2421
+ this.applySortData();
2422
+ }
2423
+ set selection(selection) {
2424
+ this._selection = selection;
2425
+ this.updateSelectionModel(selection);
2426
+ }
2427
+ /**
2428
+ * @deprecated
2429
+ * Please use "filterMode" instead
2430
+ */
2431
+ set filterEnabled(isFilterEnabled) {
2432
+ this._filterMode = isFilterEnabled ? 'TABLE_BASED' : 'NONE';
2433
+ this.applyFilterPredicate();
2434
+ }
2435
+ set filterMode(filterMode) {
2436
+ this._filterMode = filterMode;
2437
+ this.applyFilterPredicate();
2438
+ }
2439
+ set filterValue(filterValue) {
2440
+ this._filterValue = filterValue;
2441
+ this.applyFilterValue(this._filterValue);
2442
+ }
2443
+ set externalPaginator(paginator) {
2444
+ this.extPaginator = paginator;
2445
+ }
2446
+ set defaultPageSize(defaultSize) {
2447
+ this.page = {
2448
+ ...this.page,
2449
+ pageSize: defaultSize,
2450
+ };
2451
+ }
2452
+ set selectionEmitMode(selectionEmitMode) {
2453
+ this._selectionEmitMode = selectionEmitMode;
2454
+ }
2455
+ /**
2456
+ * @deprecated
2457
+ * This function mixes up 2 responsibilities:
2458
+ * - determining if actions should be displayed / handled
2459
+ * - determining whether actions are row based (single) or table based (batch)
2460
+ * Please use a combination of "selectionEmitMode" and "selectionMode" instead:
2461
+ * - selectionEmitMode determines how selected items are handled (as part of actions, as selections or not at all)
2462
+ * - selectionMode determines if selected items are treated separately (single) or together (batch)
2463
+ */
2464
+ set forceMode(selectionMode) {
2465
+ if (selectionMode === 'SINGLE' || selectionMode === 'BATCH') {
2466
+ this._selectionEmitMode = 'ON_ACTION';
2467
+ this._forceSelectionMode = selectionMode;
2468
+ this._selectionModel.clear();
2469
+ }
2470
+ }
2471
+ set forceSelectionMode(selectionMode) {
2472
+ this._forceSelectionMode = selectionMode;
2473
+ this._selectionModel.clear();
2474
+ }
2475
+ set displayedColumns(cols) {
2476
+ if (!this.displayedColumnDefinition) {
2477
+ this.columns = cols ? [...cols] : [];
2478
+ this.columnIds = this.columns.map((column) => column.id);
2479
+ this.columnIds.unshift(this.ACTION_COLUMN_NAME);
2480
+ }
2481
+ }
2482
+ set displayedColumnDefinition(def) {
2483
+ this.columns = def.displayedColumns;
2484
+ this.columnIds = this.columns.map((column) => column.id);
2485
+ this.columnIds.unshift(this.ACTION_COLUMN_NAME);
2486
+ this._selectedColumnDefinition = def;
2487
+ }
2488
+ set columnDefinitions(definitions) {
2489
+ this.editableColumnDefinitions = [];
2490
+ this.viewableColumnDefinitions = [];
2491
+ this._allColumnDefinitions = [...definitions];
2492
+ for (const definition of definitions) {
2493
+ if (definition.editable) {
2494
+ this.editableColumnDefinitions.push(definition);
2495
+ }
2496
+ if (definition.displayedColumns?.length > 0) {
2497
+ this.viewableColumnDefinitions.push(definition);
2498
+ }
2499
+ }
2500
+ }
2501
+ set allColumns(allColumns) {
2502
+ this._allAvailableColumns = allColumns;
2503
+ if (allColumns && this._showColumnModal) {
2504
+ this.openColumnModal();
2505
+ }
2506
+ }
2507
+ constructor(changeDetectorRef, matDialog, persistenceService, dataTableGlobalConfig) {
2508
+ this.changeDetectorRef = changeDetectorRef;
2509
+ this.matDialog = matDialog;
2510
+ this.persistenceService = persistenceService;
2511
+ this.dataTableGlobalConfig = dataTableGlobalConfig;
2512
+ // Translations
2513
+ this.filterLabel = 'common.filter';
2514
+ this.filterPlaceholder = '';
2515
+ this.filterColumnsLabel = 'Filter';
2516
+ this.filterColumnsPlaceHolder = 'Filter available columns';
2517
+ this.showEmptyTable = false;
2518
+ this.noDataText = 'No matching data found';
2519
+ this.columnSettingsModalTitleLabel = 'Column settings';
2520
+ this.selectedLabel = 'Selected columns';
2521
+ this.availableLabel = 'Available columns';
2522
+ this.saveLabel = 'Save';
2523
+ this.deleteLabel = 'Delete';
2524
+ this.cancelLabel = 'Cancel';
2525
+ this.infoTextLabel = 'Drag and drop a column to select or reorder it.';
2526
+ this.translateLabels = true;
2527
+ this.stateful = false;
2528
+ this.loading = false;
2529
+ this.paginationEnabled = false;
2530
+ this.page = { pageIndex: 0, pageSize: 50, length: 0 };
2531
+ this.pageSizeOptions = [5, 10, 15];
2532
+ this.actions = [];
2533
+ this.selectionEmitType = 'ID';
2534
+ this.showDeleteFilterAction = true;
2535
+ this.disableRowClick = false;
2536
+ this.deleteDefinitionAllowed = false;
2537
+ this.actionEvent = new EventEmitter();
2538
+ this.selectionEvent = new EventEmitter();
2539
+ this.sortEvent = new EventEmitter();
2540
+ this.filterEvent = new EventEmitter();
2541
+ this.pageEvent = new EventEmitter();
2542
+ this.allColumnsEvent = new EventEmitter();
2543
+ this.columnDefinitionChangeEvent = new EventEmitter();
2544
+ this.viewDefinitionChangeEvent = new EventEmitter();
2545
+ this.allSelected = false;
2546
+ this.ACTION_COLUMN_NAME = '__action__';
2547
+ this.tableActions = [];
2548
+ this.rowActions = [];
2549
+ this.columns = [];
2550
+ this._useAsync = false;
2551
+ this._rowMap = new Map();
2552
+ this._selectionModel = new SelectionModel(true);
2553
+ this._selectionEmitMode = 'NONE';
2554
+ this._filterMode = 'NONE';
2555
+ this._allColumnDefinitions = [];
2556
+ this._showColumnModal = false;
2557
+ this.dataSource = new MatTableDataSource();
2558
+ }
2559
+ ngAfterViewInit() {
2560
+ if (!this._useAsync) {
2561
+ this.dataSource.paginator = this.paginator;
2562
+ this.dataSource.sort = this.sort;
2563
+ }
2564
+ this.applySortData();
2565
+ this.initState();
2566
+ }
2567
+ ngOnChanges(changes) {
2568
+ if ('tableData' in changes) {
2569
+ this.updateDataTableData();
2570
+ this.updateSelectionModel(this.getSelection('ID').length ? this.getSelection('ID') : this._selection);
2571
+ if (this.showAll) {
2572
+ this.updatePaginator();
2573
+ }
2574
+ }
2575
+ if ('idGenerator' in changes || 'displayedColumns' in changes) {
2576
+ this.updateDataTableData();
2577
+ }
2578
+ // performance reasons (same behaviour could be achived in getters)
2579
+ if ('forceMode' in changes || 'forceSelectionMode' in changes || 'actions' in changes) {
2580
+ const actions = DataTableActionUtil.getDisplayActions(this.actions, this.selectionMode);
2581
+ this.rowActions = actions.rowActions;
2582
+ this.tableActions = actions.groupedTableActions;
2583
+ }
2584
+ }
2585
+ /** TABLE DISPLAY HANDLING */
2586
+ getDataTableHeaderType(column) {
2587
+ if (column.isSortable && !column.isFilterable) {
2588
+ return 'SORT';
2589
+ }
2590
+ if (!column.isSortable && column.isFilterable) {
2591
+ return 'FILTER';
2592
+ }
2593
+ if (column.isSortable && column.isFilterable) {
2594
+ return 'SORT_AND_FILTER';
2595
+ }
2596
+ return 'PLAIN';
2597
+ }
2598
+ getCustomCellTemplate(columnId) {
2599
+ const columnDef = this.columnDefs.find((it) => it.madColumnDef === columnId);
2600
+ return columnDef && columnDef.cellDef ? columnDef.cellDef.getCellTemplate() : null;
2601
+ }
2602
+ getCustomExpandableTemplate() {
2603
+ return this.expandableDef?.getCellTemplate() || null;
2604
+ }
2605
+ get expandableColumnDef() {
2606
+ return this.expandableDef?.columnDef.madExpandableColumnDef || '';
2607
+ }
2608
+ onExpand(event, element) {
2609
+ this.expandedElement = this.expandedElement === element ? null : element;
2610
+ event.stopPropagation();
2611
+ }
2612
+ /** ACTION BUTTON DISPLAY HANDLING */
2613
+ hasVisibleRowActions(displayedData) {
2614
+ return !this.rowActions.every((action) => this.isHiddenForData(action, [this._rowMap.get(displayedData.rowId)?.actualData]));
2615
+ }
2616
+ isHidden(action) {
2617
+ return this.isHiddenForData(action, this.getSelection('DATA'));
2618
+ }
2619
+ isHiddenForData(action, data) {
2620
+ return !!action.isHidden && action.isHidden(data);
2621
+ }
2622
+ isDisabled(action) {
2623
+ return this.isDisabledForActionType(action.type) || (!!action.isDisabled && action.isDisabled(this.getSelection('DATA')));
2624
+ }
2625
+ isDisabledForActionType(actionType) {
2626
+ switch (actionType) {
2627
+ case 'SINGLE':
2628
+ return this.selectedCount !== 1;
2629
+ case 'BATCH':
2630
+ return this.selectedCount < 1;
2631
+ default:
2632
+ return false;
2633
+ }
2634
+ }
2635
+ getSelectedCount(actionType) {
2636
+ const count = this.selectedCount;
2637
+ if (actionType !== 'BATCH' || count < 2) {
2638
+ return '';
2639
+ }
2640
+ return ` (${count})`;
2641
+ }
2642
+ get selectedCount() {
2643
+ return this._selectionModel?.selected ? this._selectionModel.selected.length : 0;
2644
+ }
2645
+ /** TABLE DATA CHANGE HANDLING */
2646
+ updateDataTableData() {
2647
+ // do not make this function immutable - we desparately need the reference of rowMap to stay the same
2648
+ DataTableDataUtil.updateRowMap(this._rowMap, this.tableData, this.columns, this.idGenerator, this.parentIdGenerator);
2649
+ this.dataSource.data = Array.from(this._rowMap.values()).map((it) => it.displayedData);
2650
+ }
2651
+ updateSelectionModel(selection) {
2652
+ this._selectionModel.clear();
2653
+ selection?.forEach((it) => {
2654
+ const item = this._rowMap.get(it) || [...this._rowMap.values()].find((row) => row.actualData === it);
2655
+ if (!!item) {
2656
+ this.onSelectionEvent(item.id);
2242
2657
  }
2243
2658
  });
2659
+ this.emitSelection();
2660
+ }
2661
+ /** ACTION & SELECTION HANDLING */
2662
+ get selectionEmitMode() {
2663
+ return this._selectionEmitMode === 'NONE' && !!this.actions.length ? 'ON_ACTION' : this._selectionEmitMode;
2664
+ }
2665
+ get selectionMode() {
2666
+ return !!this._forceSelectionMode ? this._forceSelectionMode : this.actions.find((it) => it.type === 'BATCH') ? 'BATCH' : 'SINGLE';
2667
+ }
2668
+ get filteredPageData() {
2669
+ // only use filtered data
2670
+ return this.dataSource?._pageData(this.dataSource.filteredData);
2671
+ }
2672
+ get showActionColumn() {
2673
+ return !(this.selectionEmitMode === 'NONE' || this.hideActionColumn) || !!this.expandableDef;
2674
+ }
2675
+ showCheckbox(displayedData) {
2676
+ return !displayedData.parentId && this.selectionMode === 'BATCH' && !this.hideActionColumn;
2677
+ }
2678
+ showRowActionIcon(displayedData) {
2679
+ return !displayedData.parentId && this.selectionEmitMode === 'ON_ACTION' && this.selectionMode === 'SINGLE' && !this.hideActionColumn;
2680
+ }
2681
+ showRadioButton(displayedData) {
2682
+ return !displayedData.parentId && this.selectionEmitMode === 'ON_SELECTION' && this.selectionMode === 'SINGLE';
2683
+ }
2684
+ showExpandableButton(displayedData) {
2685
+ return !displayedData.parentId && !!this.expandableDef;
2686
+ }
2687
+ isSelected(rowId) {
2688
+ return this._selectionModel.isSelected(rowId);
2689
+ }
2690
+ onToggleSelectAll() {
2691
+ // clear all selection first
2692
+ this._selectionModel.clear();
2693
+ // toggle all checkbox
2694
+ this.allSelected = !this.allSelected;
2695
+ if (this.allSelected) {
2696
+ // select all rows of the current page
2697
+ this.filteredPageData.forEach((row) => {
2698
+ if (!row.parentId) {
2699
+ this._selectionModel.select(row.rowId);
2700
+ }
2701
+ });
2702
+ }
2703
+ this.emitSelection();
2704
+ }
2705
+ onActionEvent(action) {
2706
+ const emitAction = { ...action };
2707
+ if (!!emitAction && this.selectionEmitMode !== 'NONE') {
2708
+ emitAction.selected = this.getSelection(this.selectionEmitType);
2709
+ this.actionEvent.emit(emitAction);
2710
+ }
2711
+ }
2712
+ onSelectionEvent(id) {
2713
+ switch (this.selectionMode) {
2714
+ case 'BATCH':
2715
+ this._selectionModel.toggle(id);
2716
+ break;
2717
+ case 'SINGLE':
2718
+ this._selectionModel.clear();
2719
+ this._selectionModel.toggle(id);
2720
+ break;
2721
+ }
2244
2722
  }
2245
- getTableMode() {
2246
- if (this._forceMode) {
2247
- return this._forceMode;
2723
+ onRowEvent(event, row, action = this.defaultAction) {
2724
+ if (this.selectionEmitMode === 'NONE' || row?.parentId) {
2725
+ return;
2248
2726
  }
2249
- if (!this.actions) {
2250
- return this.NONE;
2727
+ this.onSelectionEvent(row.rowId);
2728
+ this.processSelection(event, action);
2729
+ }
2730
+ get defaultAction() {
2731
+ return this.selectionEmitMode !== 'NONE' ? this.rowActions[0] : undefined;
2732
+ }
2733
+ get hideActionColumn() {
2734
+ return this.selectionEmitMode === 'ON_ACTION' && this.actions.every((it) => it.type === 'NONE');
2735
+ }
2736
+ processSelection(event, action) {
2737
+ if (this.selectionEmitMode === 'ON_ACTION' &&
2738
+ this.selectionMode === 'SINGLE' &&
2739
+ !!action &&
2740
+ !DataTableComponent.isClickOnRowMenuIcon(event)) {
2741
+ this.onActionEvent(action);
2251
2742
  }
2252
- const distinctActionTypes = new Set();
2253
- for (const rowAction of this.actions) {
2254
- distinctActionTypes.add(rowAction.type);
2743
+ this.emitSelection();
2744
+ }
2745
+ emitSelection() {
2746
+ if (this.selectionEmitMode === 'ON_SELECTION') {
2747
+ this.selectionEvent.emit(this.getSelection(this.selectionEmitType));
2255
2748
  }
2256
- if (distinctActionTypes.has(this.BATCH)) {
2257
- return this.BATCH;
2749
+ }
2750
+ getSelection(selectionEmitType) {
2751
+ const selection = [];
2752
+ this._selectionModel.selected.forEach((it) =>
2753
+ // if ID-generator is provided, return the ID, else return the ACTUAL data
2754
+ selection.push(this.idGenerator && selectionEmitType === 'ID' ? it : this._rowMap.get(it)?.actualData));
2755
+ return selection;
2756
+ }
2757
+ static isClickOnRowMenuIcon(event) {
2758
+ return event?.target?.classList.contains('mat-icon');
2759
+ }
2760
+ /** SORT HANDLING */
2761
+ onSortingEvent(sort) {
2762
+ if (this._useAsync) {
2763
+ this.sortEvent.emit(sort);
2258
2764
  }
2259
- if (distinctActionTypes.has(this.SINGLE)) {
2260
- return this.SINGLE;
2765
+ if (this.stateful) {
2766
+ this.persistenceService.saveSort(this.id, sort);
2261
2767
  }
2262
- return this.NONE;
2263
2768
  }
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;
2769
+ applySortData() {
2770
+ this.dataSource.sortData = this._useAsync
2771
+ ? DataTableSortUtil.sortNothing()
2772
+ : DataTableSortUtil.sortData(this.dataTableGlobalConfig.dateTimeFormat);
2773
+ }
2774
+ /** FILTER HANDLING */
2775
+ get filterMode() {
2776
+ return this._useAsync && this._filterMode === 'TABLE_BASED' ? 'NONE' : this._filterMode;
2777
+ }
2778
+ onTableBasedFilterEvent(event) {
2779
+ this.onFilteringEvent(event.target.value);
2780
+ }
2781
+ onColumnBasedFilterEvent(filter) {
2782
+ this.onFilteringEvent(filter);
2783
+ }
2784
+ onDeleteFilter() {
2785
+ this.onFilteringEvent(undefined);
2786
+ this.filter.updateFilterables(undefined);
2787
+ }
2788
+ onFilteringEvent(filter) {
2789
+ if (this._useAsync) {
2790
+ this.filterEvent.emit(filter);
2791
+ }
2792
+ else {
2793
+ this.allSelected = false;
2794
+ this._selectionModel.clear();
2795
+ this.applyFilterValue(filter);
2269
2796
  }
2797
+ if (this.stateful) {
2798
+ this.persistenceService.saveFilter(this.id, filter);
2799
+ }
2800
+ }
2801
+ applyFilterPredicate() {
2802
+ this.dataSource.filterPredicate =
2803
+ this.filterMode === 'COLUMN_BASED'
2804
+ ? DataTableFilterUtil.columnBasedFilterPredicate(this._rowMap)
2805
+ : DataTableFilterUtil.tableBasedFilterPredicate();
2806
+ this.applyFilterValue(this._filterValue);
2807
+ }
2808
+ applyFilterValue(value) {
2809
+ const isString = typeof this._filterValue === 'string';
2810
+ this.dataSource.filter = !!value ? (isString ? value.trim().toLowerCase() : JSON.stringify(value)) : '';
2270
2811
  }
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" }] }); }
2812
+ /** PAGINATION HANDLING */
2813
+ onPageEvent(event) {
2814
+ if (this._useAsync) {
2815
+ this.pageEvent.emit(event);
2816
+ }
2817
+ if (this.stateful) {
2818
+ this.persistenceService.savePageSize(this.id, event.pageSize);
2819
+ }
2820
+ }
2821
+ get pageIndex() {
2822
+ return this.showAll ? 0 : this.page.pageIndex;
2823
+ }
2824
+ get pageSize() {
2825
+ return this.showAll ? this.dataLength : this.page.pageSize;
2826
+ }
2827
+ get pageLength() {
2828
+ return this.showAll ? this.dataLength : this.page.length;
2829
+ }
2830
+ updatePaginator() {
2831
+ if (this.paginator) {
2832
+ this.paginator.pageSize = this.pageSize;
2833
+ this.paginator.page.emit(this.page);
2834
+ }
2835
+ }
2836
+ get dataLength() {
2837
+ return this.dataSource.data?.length || 0;
2838
+ }
2839
+ get showAll() {
2840
+ return !this._useAsync && !this.paginationEnabled;
2841
+ }
2842
+ /** INIT STATE */
2843
+ initState() {
2844
+ // only set default sort if there is no other sort persisted
2845
+ if (!!this.defaultSort && !this.persistenceService.loadSort(this.id)?.direction) {
2846
+ this.setSort(this.defaultSort);
2847
+ }
2848
+ if (this.stateful) {
2849
+ this.initPaginatorState();
2850
+ this.initSortState();
2851
+ this.initFilterState();
2852
+ }
2853
+ this.changeDetectorRef.detectChanges();
2854
+ }
2855
+ initSortState() {
2856
+ const sort = this.persistenceService.loadSort(this.id);
2857
+ if (!!sort) {
2858
+ this.setSort(sort);
2859
+ }
2860
+ }
2861
+ setSort(sort) {
2862
+ this.sort.active = sort.active;
2863
+ this.sort.direction = sort.direction;
2864
+ this.sort.sortChange.emit(sort);
2865
+ }
2866
+ initFilterState() {
2867
+ const filter = this.persistenceService.loadFilter(this.id);
2868
+ this.filter.updateFilterables(filter);
2869
+ }
2870
+ initPaginatorState() {
2871
+ this.page = {
2872
+ pageIndex: 0,
2873
+ pageSize: this.persistenceService.loadPageSize(this.id) || this.pageSize,
2874
+ length: 0,
2875
+ };
2876
+ this.updatePaginator();
2877
+ }
2878
+ /** COLUMN HANDLING */
2879
+ onViewDefinition(definition) {
2880
+ this._selectedColumnDefinition = definition;
2881
+ this.viewDefinitionChangeEvent.emit(definition);
2882
+ }
2883
+ onColumnSettings(definition) {
2884
+ this._showColumnModal = true;
2885
+ this._selectedColumnDefinition = definition ? definition : this._allColumnDefinitions[0];
2886
+ if (this._allAvailableColumns) {
2887
+ this.openColumnModal();
2888
+ }
2889
+ else {
2890
+ // if no complete definitions have been loaded yet send an event so the app can load it
2891
+ this.allColumnsEvent.emit();
2892
+ }
2893
+ }
2894
+ isCurrentDefinition(definition) {
2895
+ return this._selectedColumnDefinition && this._selectedColumnDefinition.id === definition.id;
2896
+ }
2897
+ openColumnModal() {
2898
+ const dialogData = {
2899
+ allColumns: this._allAvailableColumns,
2900
+ definition: this._selectedColumnDefinition,
2901
+ deleteDefinitionAllowed: this.deleteDefinitionAllowed,
2902
+ filterColumnsLabel: this.filterColumnsLabel,
2903
+ filterColumnsPlaceHolder: this.filterColumnsPlaceHolder,
2904
+ noDataText: this.noDataText,
2905
+ titleLabel: this.columnSettingsModalTitleLabel,
2906
+ selectedLabel: this.selectedLabel,
2907
+ availableLabel: this.availableLabel,
2908
+ saveLabel: this.saveLabel,
2909
+ deleteLabel: this.deleteLabel,
2910
+ cancelLabel: this.cancelLabel,
2911
+ infoTextLabel: this.infoTextLabel,
2912
+ };
2913
+ const dialog = this.matDialog.open(DataTableColumnsModalComponent, { data: dialogData });
2914
+ dialog.afterClosed().subscribe((result) => {
2915
+ // no event on CANCEL
2916
+ if (result) {
2917
+ this.columnDefinitionChangeEvent.emit(result);
2918
+ }
2919
+ });
2920
+ }
2921
+ 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 }); }
2922
+ 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: [
2923
+ trigger('detailExpand', [
2924
+ state('collapsed,void', style({ height: '0px', minHeight: '0' })),
2925
+ state('expanded', style({ height: '*' })),
2926
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
2927
+ ]),
2928
+ ] }); }
2273
2929
  }
2274
2930
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DataTableComponent, decorators: [{
2275
2931
  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: [{
2932
+ args: [{ selector: 'mad-data-table', animations: [
2933
+ trigger('detailExpand', [
2934
+ state('collapsed,void', style({ height: '0px', minHeight: '0' })),
2935
+ state('expanded', style({ height: '*' })),
2936
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
2937
+ ]),
2938
+ ], standalone: true, imports: [
2939
+ CommonModule,
2940
+ MatButtonModule,
2941
+ MatIconModule,
2942
+ MatFormFieldModule,
2943
+ MatInputModule,
2944
+ MatMenuModule,
2945
+ MatPaginatorModule,
2946
+ MatSortModule,
2947
+ MatTableModule,
2948
+ MatProgressSpinnerModule,
2949
+ ButtonModule,
2950
+ TranslateModule,
2951
+ MatCheckboxModule,
2952
+ MatRadioModule,
2953
+ MatBadgeModule,
2954
+ DragDropModule,
2955
+ FormsModule,
2956
+ DataTableFilterHeader,
2957
+ DataTableFilter,
2958
+ DataTableTemplateColumnDefinition,
2959
+ DataTableTemplateCellDefinition,
2960
+ DataTableTemplateExpandableColumnDefinition,
2961
+ DataTableTemplateExpandableCellDefinition,
2962
+ ], 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"] }]
2963
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialog }, { type: DataTablePersistenceService, decorators: [{
2964
+ type: Inject,
2965
+ args: [MAD_DATA_TABLE_PERSISTENCE_SERVICE]
2966
+ }] }, { type: undefined, decorators: [{
2967
+ type: Inject,
2968
+ args: [MAD_DATA_TABLE_GLOBAL_CONFIGURATION]
2969
+ }] }], propDecorators: { id: [{
2970
+ type: Input
2971
+ }], filterLabel: [{
2278
2972
  type: Input
2279
2973
  }], filterPlaceholder: [{
2280
2974
  type: Input
@@ -2282,6 +2976,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2282
2976
  type: Input
2283
2977
  }], filterColumnsPlaceHolder: [{
2284
2978
  type: Input
2979
+ }], showEmptyTable: [{
2980
+ type: Input
2285
2981
  }], noDataText: [{
2286
2982
  type: Input
2287
2983
  }], columnSettingsModalTitleLabel: [{
@@ -2300,51 +2996,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2300
2996
  type: Input
2301
2997
  }], tableClass: [{
2302
2998
  type: Input
2303
- }], pageSizeOptions: [{
2999
+ }], translateLabels: [{
2304
3000
  type: Input
2305
- }], externalFilter: [{
3001
+ }], useAsync: [{
2306
3002
  type: Input
2307
- }], actions: [{
3003
+ }], stateful: [{
3004
+ type: Input
3005
+ }], loading: [{
3006
+ type: Input
3007
+ }], tableData: [{
2308
3008
  type: Input
2309
3009
  }], idGenerator: [{
2310
3010
  type: Input
2311
3011
  }], parentIdGenerator: [{
2312
3012
  type: Input
2313
- }], deleteDefinitionAllowed: [{
3013
+ }], defaultSort: [{
2314
3014
  type: Input
2315
- }], useAsync: [{
3015
+ }], externalFilter: [{
2316
3016
  type: Input
2317
- }], translateLabels: [{
3017
+ }], paginationEnabled: [{
2318
3018
  type: Input
2319
- }], filterValue: [{
3019
+ }], page: [{
2320
3020
  type: Input
2321
- }], displayedColumns: [{
3021
+ }], pageSizeOptions: [{
2322
3022
  type: Input
2323
- }], displayedColumnDefinition: [{
3023
+ }], actions: [{
2324
3024
  type: Input
2325
- }], tableData: [{
3025
+ }], selectionEmitType: [{
2326
3026
  type: Input
2327
- }], page: [{
3027
+ }], showDeleteFilterAction: [{
2328
3028
  type: Input
2329
- }], columnDefinitions: [{
3029
+ }], disableRowClick: [{
2330
3030
  type: Input
2331
- }], loading: [{
3031
+ }], deleteDefinitionAllowed: [{
2332
3032
  type: Input
2333
- }], defaultPageSize: [{
3033
+ }], selection: [{
2334
3034
  type: Input
2335
- }], externalPaginator: [{
3035
+ }], filterEnabled: [{
2336
3036
  type: Input
2337
- }], paginationEnabled: [{
3037
+ }], filterMode: [{
2338
3038
  type: Input
2339
- }], allColumns: [{
3039
+ }], filterValue: [{
2340
3040
  type: Input
2341
- }], filterEnabled: [{
3041
+ }], externalPaginator: [{
3042
+ type: Input
3043
+ }], defaultPageSize: [{
3044
+ type: Input
3045
+ }], selectionEmitMode: [{
2342
3046
  type: Input
2343
3047
  }], forceMode: [{
2344
3048
  type: Input
3049
+ }], forceSelectionMode: [{
3050
+ type: Input
3051
+ }], displayedColumns: [{
3052
+ type: Input
3053
+ }], displayedColumnDefinition: [{
3054
+ type: Input
3055
+ }], columnDefinitions: [{
3056
+ type: Input
3057
+ }], allColumns: [{
3058
+ type: Input
3059
+ }], actionEvent: [{
3060
+ type: Output
3061
+ }], selectionEvent: [{
3062
+ type: Output
2345
3063
  }], sortEvent: [{
2346
3064
  type: Output
2347
- }], actionEvent: [{
3065
+ }], filterEvent: [{
2348
3066
  type: Output
2349
3067
  }], pageEvent: [{
2350
3068
  type: Output
@@ -2356,73 +3074,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2356
3074
  type: Output
2357
3075
  }], paginator: [{
2358
3076
  type: ViewChild,
2359
- args: [MatPaginator, { static: false }]
3077
+ args: [MatPaginator]
2360
3078
  }], sort: [{
2361
3079
  type: ViewChild,
2362
- args: [MatSort, { static: true }]
3080
+ args: [MatSort]
3081
+ }], filter: [{
3082
+ type: ViewChild,
3083
+ args: [DataTableFilter]
3084
+ }], columnDefs: [{
3085
+ type: ContentChildren,
3086
+ args: [DataTableTemplateColumnDefinition]
3087
+ }], expandableDef: [{
3088
+ type: ContentChild,
3089
+ args: [DataTableTemplateExpandableCellDefinition]
2363
3090
  }] } });
2364
3091
 
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
3092
  class StepHeaderComponent extends CdkStepHeader {
2427
3093
  constructor(_focusMonitor, _elementRef) {
2428
3094
  super(_elementRef);
@@ -2628,7 +3294,7 @@ class StepperComponent extends CdkStepper {
2628
3294
  _stepIsNavigable(index, step) {
2629
3295
  return step.completed || this.selectedIndex === index || !this.linear;
2630
3296
  }
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 }); }
3297
+ 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
3298
  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
3299
  }
2634
3300
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: StepperComponent, decorators: [{
@@ -2638,7 +3304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
2638
3304
  '[attr.aria-orientation]': '"vertical"',
2639
3305
  role: 'tablist',
2640
3306
  }, 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: [{
3307
+ }], ctorParameters: () => [{ type: i3$3.Directionality, decorators: [{
2642
3308
  type: Optional
2643
3309
  }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { animationDone: [{
2644
3310
  type: Output
@@ -3169,7 +3835,7 @@ class ToolbarComponent {
3169
3835
  return this.getToolbarActions().filter((value) => !!value.importantAction).length > 0;
3170
3836
  }
3171
3837
  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" }] }); }
3838
+ 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
3839
  }
3174
3840
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ToolbarComponent, decorators: [{
3175
3841
  type: Component,
@@ -3360,7 +4026,7 @@ class FileUploadComponent {
3360
4026
  window.open(window.URL.createObjectURL(file));
3361
4027
  }
3362
4028
  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"] }] }); }
4029
+ 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
4030
  }
3365
4031
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: FileUploadComponent, decorators: [{
3366
4032
  type: Component,
@@ -3389,5 +4055,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
3389
4055
  * Generated bundle index. Do not edit.
3390
4056
  */
3391
4057
 
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 };
4058
+ 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
4059
  //# sourceMappingURL=porscheinformatik-material-addons.mjs.map