@rxap/material-table-system 16.0.0-dev.2 → 16.0.0-dev.20

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 (107) hide show
  1. package/CHANGELOG.md +782 -0
  2. package/LICENSE +621 -27
  3. package/LICENSE.md +621 -0
  4. package/README.md +7 -22
  5. package/esm2022/index.mjs +79 -52
  6. package/esm2022/lib/cells/boolean-cell/boolean-cell.component.mjs +7 -8
  7. package/esm2022/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.mjs +7 -8
  8. package/esm2022/lib/cells/date-cell/date-cell.component.mjs +8 -9
  9. package/esm2022/lib/cells/icon-cell/icon-cell.component.mjs +7 -8
  10. package/esm2022/lib/cells/image-cell/image-cell.component.mjs +9 -10
  11. package/esm2022/lib/cells/link-cell/link-cell.component.mjs +8 -9
  12. package/esm2022/lib/cells/options-cell/options-cell.component.mjs +8 -9
  13. package/esm2022/lib/cells/tree-control-cell/tree-control-cell.component.mjs +52 -0
  14. package/esm2022/lib/expand-row/expand-controls-cell/expand-controls-cell.component.mjs +10 -16
  15. package/esm2022/lib/expand-row/expand-row-container/expand-row-container.component.mjs +28 -27
  16. package/esm2022/lib/expand-row/expand-row-container/expand-row-content.directive.mjs +7 -8
  17. package/esm2022/lib/expand-row/expand-row.directive.mjs +9 -15
  18. package/esm2022/lib/expand-row/expand-row.module.mjs +10 -11
  19. package/esm2022/lib/expand-row/expand-row.service.mjs +5 -6
  20. package/esm2022/lib/persistent-paginator.directive.mjs +7 -8
  21. package/esm2022/lib/row-animation.mjs +16 -8
  22. package/esm2022/lib/select-row/checkbox-cell/checkbox-cell.component.mjs +9 -15
  23. package/esm2022/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.mjs +11 -12
  24. package/esm2022/lib/select-row/select-row.module.mjs +31 -0
  25. package/esm2022/lib/select-row/select-row.options.mjs +1 -1
  26. package/esm2022/lib/select-row/select-row.service.mjs +7 -8
  27. package/esm2022/lib/select-row/selected-rows.directive.mjs +8 -9
  28. package/esm2022/lib/select-row/selection-model.mjs +1 -1
  29. package/esm2022/lib/select-row/tokens.mjs +1 -1
  30. package/esm2022/lib/table-column-menu/table-column-menu.component.mjs +9 -10
  31. package/esm2022/lib/table-column-menu/table-column-menu.module.mjs +31 -0
  32. package/esm2022/lib/table-column-menu/table-column-option/table-column-option.component.mjs +9 -14
  33. package/esm2022/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.mjs +28 -14
  34. package/esm2022/lib/table-create-button/table-create-button.directive.mjs +15 -19
  35. package/esm2022/lib/table-create-button/tokens.mjs +1 -1
  36. package/esm2022/lib/table-data-source.directive.mjs +18 -23
  37. package/esm2022/lib/table-filter/filter-header-row.directive.mjs +14 -15
  38. package/esm2022/lib/table-filter/table-filter.module.mjs +25 -0
  39. package/esm2022/lib/table-filter/table-filter.service.mjs +9 -9
  40. package/esm2022/lib/table-filter/to-filter-column-names.pipe.mjs +7 -8
  41. package/esm2022/lib/table-filter/tokens.mjs +1 -1
  42. package/esm2022/lib/table-header-button/decorators.mjs +15 -0
  43. package/esm2022/lib/table-header-button/table-header-button-action-status.mjs +8 -0
  44. package/esm2022/lib/table-header-button/table-header-button.directive.mjs +187 -0
  45. package/esm2022/lib/table-header-button/tokens.mjs +3 -0
  46. package/esm2022/lib/table-row-actions/abstract-table-row-action.mjs +239 -0
  47. package/esm2022/lib/table-row-actions/decorators.mjs +6 -3
  48. package/esm2022/lib/table-row-actions/row-action-check.pipe.mjs +8 -9
  49. package/esm2022/lib/table-row-actions/table-row-action-executing.directive.mjs +7 -8
  50. package/esm2022/lib/table-row-actions/table-row-action-status.mjs +1 -1
  51. package/esm2022/lib/table-row-actions/table-row-action.directive.mjs +16 -225
  52. package/esm2022/lib/table-row-actions/table-row-action.method.mjs +3 -3
  53. package/esm2022/lib/table-row-actions/table-row-actions.module.mjs +60 -0
  54. package/esm2022/lib/table-row-actions/table-row-header-action.directive.mjs +24 -23
  55. package/esm2022/lib/table-row-actions/tokens.mjs +1 -1
  56. package/esm2022/lib/table-row-actions/types.mjs +1 -1
  57. package/esm2022/lib/table-row-metadata.mjs +1 -1
  58. package/esm2022/lib/table-select-controls/table-select-controls.component.mjs +9 -10
  59. package/esm2022/rxap-material-table-system.mjs +1 -1
  60. package/fesm2022/rxap-material-table-system.mjs +1470 -1266
  61. package/fesm2022/rxap-material-table-system.mjs.map +1 -1
  62. package/index.d.ts +43 -34
  63. package/lib/cells/options-cell/options-cell.component.d.ts +1 -1
  64. package/lib/cells/tree-control-cell/tree-control-cell.component.d.ts +16 -0
  65. package/lib/expand-row/expand-controls-cell/expand-controls-cell.component.d.ts +1 -1
  66. package/lib/expand-row/expand-row-container/expand-row-container.component.d.ts +3 -3
  67. package/lib/expand-row/expand-row.directive.d.ts +1 -1
  68. package/lib/select-row/checkbox-cell/checkbox-cell.component.d.ts +1 -1
  69. package/lib/select-row/select-row.module.d.ts +9 -0
  70. package/lib/select-row/select-row.service.d.ts +1 -1
  71. package/lib/select-row/selected-rows.directive.d.ts +1 -1
  72. package/lib/table-column-menu/table-column-menu.module.d.ts +9 -0
  73. package/lib/table-column-menu/table-column-option/table-column-option.component.d.ts +1 -1
  74. package/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.d.ts +8 -4
  75. package/lib/table-create-button/table-create-button.directive.d.ts +5 -5
  76. package/lib/table-create-button/tokens.d.ts +1 -1
  77. package/lib/table-data-source.directive.d.ts +9 -9
  78. package/lib/table-filter/filter-header-row.directive.d.ts +1 -1
  79. package/lib/table-filter/table-filter.module.d.ts +8 -0
  80. package/lib/table-header-button/decorators.d.ts +26 -0
  81. package/lib/table-header-button/table-header-button-action-status.d.ts +6 -0
  82. package/lib/table-header-button/table-header-button.directive.d.ts +55 -0
  83. package/lib/table-header-button/tokens.d.ts +3 -0
  84. package/lib/table-row-actions/abstract-table-row-action.d.ts +74 -0
  85. package/lib/table-row-actions/decorators.d.ts +8 -3
  86. package/lib/table-row-actions/table-row-action.directive.d.ts +5 -68
  87. package/lib/table-row-actions/table-row-action.method.d.ts +1 -1
  88. package/lib/table-row-actions/table-row-actions.module.d.ts +16 -0
  89. package/lib/table-row-actions/table-row-header-action.directive.d.ts +9 -9
  90. package/lib/table-row-actions/types.d.ts +5 -5
  91. package/lib/table-row-metadata.d.ts +1 -1
  92. package/lib/table-select-controls/table-select-controls.component.d.ts +1 -1
  93. package/package.json +94 -64
  94. package/src/lib/cells/boolean-cell/_boolean-cell.component.theme.scss +28 -0
  95. package/theme.css +1 -0
  96. package/collection.json +0 -10
  97. package/esm2022/lib/table-row-controls/row-controls-cell/row-controls-cell.component.mjs +0 -120
  98. package/esm2022/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.mjs +0 -115
  99. package/esm2022/lib/table-row-controls/tokens.mjs +0 -9
  100. package/lib/table-row-controls/row-controls-cell/row-controls-cell.component.d.ts +0 -47
  101. package/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.d.ts +0 -31
  102. package/lib/table-row-controls/tokens.d.ts +0 -16
  103. package/migration.json +0 -4
  104. package/src/schematics/ng-add/index.d.ts +0 -2
  105. package/src/schematics/ng-add/index.js +0 -8
  106. package/src/schematics/ng-add/index.js.map +0 -1
  107. package/src/schematics/ng-add/schema.json +0 -7
@@ -1,229 +1,51 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Directive, Inject, HostListener, Input, NgModule, TemplateRef, ViewContainerRef, Component, ChangeDetectionStrategy, ContentChild, InjectionToken, Optional, ChangeDetectorRef, forwardRef, Pipe, ElementRef, ContentChildren, HostBinding, Renderer2, isDevMode } from '@angular/core';
3
- import { BehaviorSubject, Subject, EMPTY, ReplaySubject, Subscription, isObservable, of } from 'rxjs';
4
- import { map, filter, tap, distinctUntilChanged, debounceTime, delay, startWith } from 'rxjs/operators';
5
- import { __decorate, __metadata } from 'tslib';
6
- import { Required, clone, DeleteEmptyProperties, equals, coerceBoolean, coerceArray } from '@rxap/utilities';
7
- import * as i1 from '@angular/cdk/portal';
8
- import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
9
- import { trigger, state, style, transition, animate, sequence } from '@angular/animations';
10
- import { AsyncPipe, NgIf, NgFor, NgClass, DatePipe, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common';
11
- import * as i5 from '@angular/material/icon';
12
- import { MatIconModule } from '@angular/material/icon';
13
- import * as i3 from '@angular/material/button';
14
- import { MatButtonModule, MatButton } from '@angular/material/button';
15
- import * as i1$1 from '@angular/material/checkbox';
16
- import { MatCheckboxModule } from '@angular/material/checkbox';
17
- import * as i3$1 from '@angular/cdk/table';
2
+ import { InjectionToken, Injectable, Optional, Inject, Component, ChangeDetectionStrategy, Directive, Input, isDevMode, ElementRef, ChangeDetectorRef, ViewContainerRef, INJECTOR, ContentChild, HostListener, Pipe, NgModule, forwardRef, Renderer2, ContentChildren, HostBinding, TemplateRef } from '@angular/core';
3
+ import { RXAP_WINDOW_REF } from '@rxap/window-system';
4
+ import { map, tap, filter, debounceTime, delay, startWith, distinctUntilChanged } from 'rxjs/operators';
5
+ import { Subject, ReplaySubject, Subscription, isObservable, EMPTY, BehaviorSubject } from 'rxjs';
6
+ import { AsyncPipe, CommonModule, NgFor, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault, NgClass, DatePipe } from '@angular/common';
7
+ import * as i4 from '@angular/material/button';
8
+ import { MatButtonModule, MatIconButton, MatButton, MatMiniFabButton } from '@angular/material/button';
9
+ import * as i2 from '@angular/flex-layout/flex';
10
+ import { FlexModule } from '@angular/flex-layout/flex';
11
+ import * as i1$1 from '@angular/cdk/overlay';
12
+ import { Overlay } from '@angular/cdk/overlay';
13
+ import * as i3 from '@angular/material/snack-bar';
14
+ import { MatSnackBar } from '@angular/material/snack-bar';
15
+ import * as i5 from '@angular/material/tooltip';
16
+ import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
17
+ import { ConfirmDirective, ConfirmModule, CopyToClipboardComponent } from '@rxap/components';
18
+ import { clone, DeleteEmptyProperties, equals, coerceArray, coerceBoolean } from '@rxap/utilities';
19
+ import * as i1 from '@angular/cdk/table';
18
20
  import { CdkTable } from '@angular/cdk/table';
19
- import * as i2 from '@angular/material/sort';
21
+ import * as i2$1 from '@angular/material/sort';
20
22
  import { MatSort } from '@angular/material/sort';
23
+ import { pipeDataSource } from '@rxap/data-source';
21
24
  import { RXAP_TABLE_METHOD, DynamicTableDataSource } from '@rxap/data-source/table';
22
25
  export { RXAP_TABLE_METHOD } from '@rxap/data-source/table';
23
- import { ToggleSubject } from '@rxap/utilities/rxjs';
24
- import { pipeDataSource } from '@rxap/data-source';
25
- import * as i1$2 from '@angular/material/paginator';
26
+ import { ToggleSubject } from '@rxap/rxjs';
27
+ import { setMetadata, getMetadata, hasMetadata } from '@rxap/reflect-metadata';
28
+ import * as i3$1 from '@angular/material/icon';
29
+ import { MatIconModule } from '@angular/material/icon';
30
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
26
31
  import { FormDirective } from '@rxap/forms';
27
32
  import { ControlContainer } from '@angular/forms';
28
- import * as i1$3 from '@angular/router';
29
- import * as i4 from '@angular/flex-layout/extended';
33
+ import * as i1$3 from '@angular/material/slide-toggle';
34
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
35
+ import * as i1$2 from '@angular/router';
36
+ import * as i5$1 from '@angular/material/checkbox';
37
+ import { MatCheckboxModule } from '@angular/material/checkbox';
38
+ import * as i4$1 from '@angular/flex-layout/extended';
30
39
  import { ExtendedModule } from '@angular/flex-layout/extended';
31
40
  import { StopPropagationDirective, BackgroundSizeOptions, BackgroundRepeatOptions, BackgroundPositionOptions, BackgroundImageDirective } from '@rxap/directives';
32
- import * as i2$1 from '@angular/material/menu';
41
+ import * as i2$2 from '@angular/material/menu';
33
42
  import { MatMenuModule } from '@angular/material/menu';
34
- import * as i3$2 from '@angular/material/slide-toggle';
35
- import { MatSlideToggleModule } from '@angular/material/slide-toggle';
36
- import { ConfirmDirective, CopyToClipboardComponent } from '@rxap/components';
37
- import * as i4$1 from '@angular/material/tooltip';
38
- import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
39
- import * as i2$2 from '@angular/flex-layout/flex';
40
- import { FlexModule } from '@angular/flex-layout/flex';
41
- import { RXAP_WINDOW_REF } from '@rxap/window-system';
43
+ import * as i1$5 from '@angular/material/paginator';
44
+ import * as i1$4 from '@angular/cdk/portal';
45
+ import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
46
+ import { trigger, state, style, transition, animate, sequence } from '@angular/animations';
42
47
  import { IconDirective } from '@rxap/material-directives/icon';
43
48
  import { MatOption } from '@angular/material/core';
44
- import { setMetadata, getMetadata, hasMetadata } from '@rxap/utilities/reflect-metadata';
45
- import * as i3$3 from '@angular/material/snack-bar';
46
- import { MatSnackBar } from '@angular/material/snack-bar';
47
- import * as i1$4 from '@angular/cdk/overlay';
48
- import { Overlay } from '@angular/cdk/overlay';
49
-
50
- class ExpandRowService {
51
- constructor() {
52
- this.expandedRow = new BehaviorSubject(null);
53
- }
54
- toggleRow(row) {
55
- if (this.expandedRow.value === row) {
56
- this.expandedRow.next(null);
57
- }
58
- else {
59
- this.expandedRow.next(row);
60
- }
61
- }
62
- isExpanded(row) {
63
- return this.expandedRow.value === row;
64
- }
65
- isExpanded$(row) {
66
- return this.expandedRow.pipe(map((expandedRow) => expandedRow === row));
67
- }
68
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
69
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowService }); }
70
- }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowService, decorators: [{
72
- type: Injectable
73
- }] });
74
-
75
- class ExpandRowDirective {
76
- get isExpanded() {
77
- return this.expandCell.isExpanded(this.element);
78
- }
79
- constructor(expandCell) {
80
- this.expandCell = expandCell;
81
- }
82
- onClick() {
83
- this.expandCell.toggleRow(this.element);
84
- }
85
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowDirective, deps: [{ token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Directive }); }
86
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: ExpandRowDirective, isStandalone: true, selector: "tr[rxapExpandRow]", inputs: { element: "element" }, host: { listeners: { "expanded-row": "isExpanded()", "click": "onClick()" } }, ngImport: i0 }); }
87
- }
88
- __decorate([
89
- Required,
90
- __metadata("design:type", Object)
91
- ], ExpandRowDirective.prototype, "element", void 0);
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowDirective, decorators: [{
93
- type: Directive,
94
- args: [{
95
- selector: 'tr[rxapExpandRow]',
96
- standalone: true
97
- }]
98
- }], ctorParameters: function () { return [{ type: ExpandRowService, decorators: [{
99
- type: Inject,
100
- args: [ExpandRowService]
101
- }] }]; }, propDecorators: { isExpanded: [{
102
- type: HostListener,
103
- args: ['expanded-row']
104
- }], element: [{
105
- type: Input
106
- }], onClick: [{
107
- type: HostListener,
108
- args: ['click']
109
- }] } });
110
-
111
- class ExpandRowModule {
112
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
113
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowModule, imports: [ExpandRowDirective], exports: [ExpandRowDirective] }); }
114
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowModule, providers: [
115
- ExpandRowService
116
- ] }); }
117
- }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowModule, decorators: [{
119
- type: NgModule,
120
- args: [{
121
- imports: [ExpandRowDirective],
122
- exports: [
123
- ExpandRowDirective
124
- ],
125
- providers: [
126
- ExpandRowService
127
- ]
128
- }]
129
- }] });
130
-
131
- class ExpandRowContentDirective {
132
- static ngTemplateContextGuard(dir, ctx) {
133
- return true;
134
- }
135
- constructor(template) {
136
- this.template = template;
137
- }
138
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowContentDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
139
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: ExpandRowContentDirective, isStandalone: true, selector: "[rxapExpandRowContent]", ngImport: i0 }); }
140
- }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowContentDirective, decorators: [{
142
- type: Directive,
143
- args: [{
144
- selector: '[rxapExpandRowContent]',
145
- standalone: true
146
- }]
147
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
148
- type: Inject,
149
- args: [TemplateRef]
150
- }] }]; } });
151
-
152
- class ExpandRowContainerComponent {
153
- constructor(viewContainerRef, expandCell) {
154
- this.viewContainerRef = viewContainerRef;
155
- this.expandCell = expandCell;
156
- this.portal = null;
157
- }
158
- ngOnDestroy() {
159
- this._subscription?.unsubscribe();
160
- }
161
- ngAfterContentInit() {
162
- if (this.expandCellContent) {
163
- this._subscription = this.expandCell.isExpanded$(this.element).pipe(filter(Boolean), tap(() => {
164
- if (!this.portal) {
165
- this.portal = new TemplatePortal(this.expandCellContent.template, this.viewContainerRef, { $implicit: this.element });
166
- }
167
- })).subscribe();
168
- }
169
- }
170
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowContainerComponent, deps: [{ token: ViewContainerRef }, { token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component }); }
171
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ExpandRowContainerComponent, isStandalone: true, selector: "td[rxap-expand-row]", inputs: { element: "element" }, host: { classAttribute: "rxap-expand-row" }, queries: [{ propertyName: "expandCellContent", first: true, predicate: ExpandRowContentDirective, descendants: true }], ngImport: i0, template: "<div class=\"element-detail\" [@detailExpand]=\"(expandCell.isExpanded$(element) | async) ? 'expanded' : 'collapsed'\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [
172
- trigger('detailExpand', [
173
- state('collapsed', style({ height: '0px', minHeight: '0' })),
174
- state('expanded', style({ height: '*' })),
175
- transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
176
- ])
177
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
178
- }
179
- __decorate([
180
- Required,
181
- __metadata("design:type", Object)
182
- ], ExpandRowContainerComponent.prototype, "element", void 0);
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandRowContainerComponent, decorators: [{
184
- type: Component,
185
- args: [{ selector: 'td[rxap-expand-row]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-expand-row' }, animations: [
186
- trigger('detailExpand', [
187
- state('collapsed', style({ height: '0px', minHeight: '0' })),
188
- state('expanded', style({ height: '*' })),
189
- transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
190
- ])
191
- ], standalone: true, imports: [PortalModule, AsyncPipe], template: "<div class=\"element-detail\" [@detailExpand]=\"(expandCell.isExpanded$(element) | async) ? 'expanded' : 'collapsed'\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"] }]
192
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef, decorators: [{
193
- type: Inject,
194
- args: [ViewContainerRef]
195
- }] }, { type: ExpandRowService, decorators: [{
196
- type: Inject,
197
- args: [ExpandRowService]
198
- }] }]; }, propDecorators: { element: [{
199
- type: Input
200
- }], expandCellContent: [{
201
- type: ContentChild,
202
- args: [ExpandRowContentDirective]
203
- }] } });
204
-
205
- class ExpandControlsCellComponent {
206
- constructor(expandCell) {
207
- this.expandCell = expandCell;
208
- }
209
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandControlsCellComponent, deps: [{ token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component }); }
210
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ExpandControlsCellComponent, isStandalone: true, selector: "td[rxap-expand-controls-cell]", inputs: { element: "element" }, host: { classAttribute: "rxap-expand-controls-cell" }, ngImport: i0, template: "<button mat-icon-button>\n <mat-icon *ngIf=\"expandCell.isExpanded$(element) | async; else notExpanded\">expand_more</mat-icon>\n <ng-template #notExpanded>\n <mat-icon>keyboard_arrow_right</mat-icon>\n </ng-template>\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
211
- }
212
- __decorate([
213
- Required,
214
- __metadata("design:type", Object)
215
- ], ExpandControlsCellComponent.prototype, "element", void 0);
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ExpandControlsCellComponent, decorators: [{
217
- type: Component,
218
- args: [{ selector: 'td[rxap-expand-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-expand-controls-cell' }, standalone: true, imports: [MatButtonModule, NgIf, MatIconModule, AsyncPipe], template: "<button mat-icon-button>\n <mat-icon *ngIf=\"expandCell.isExpanded$(element) | async; else notExpanded\">expand_more</mat-icon>\n <ng-template #notExpanded>\n <mat-icon>keyboard_arrow_right</mat-icon>\n </ng-template>\n</button>\n" }]
219
- }], ctorParameters: function () { return [{ type: ExpandRowService, decorators: [{
220
- type: Inject,
221
- args: [ExpandRowService]
222
- }] }]; }, propDecorators: { element: [{
223
- type: Input
224
- }] } });
225
-
226
- const RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS = new InjectionToken('rxap-material/table-system/select-row/options');
227
49
 
228
50
  /**
229
51
  * @license
@@ -442,6 +264,8 @@ function getMultipleValuesInSingleSelectionError() {
442
264
  return Error('Cannot pass multiple values into SelectionModel with single-value mode.');
443
265
  }
444
266
 
267
+ const RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS = new InjectionToken('rxap-material/table-system/select-row/options');
268
+
445
269
  class SelectRowService {
446
270
  get selectedRows() {
447
271
  return this.selectionModel.selected;
@@ -451,10 +275,10 @@ class SelectRowService {
451
275
  this.selectionModel = new SelectionModel(options?.multiple, options?.selected, options?.emitChanges, options?.compareWith);
452
276
  this.selectedRows$ = this.selectionModel.changed.pipe(map(() => this.selectionModel.selected));
453
277
  }
454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SelectRowService, deps: [{ token: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
455
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SelectRowService }); }
278
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectRowService, deps: [{ token: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
279
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectRowService }); }
456
280
  }
457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SelectRowService, decorators: [{
281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectRowService, decorators: [{
458
282
  type: Injectable
459
283
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
460
284
  type: Optional
@@ -463,173 +287,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
463
287
  args: [RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS]
464
288
  }] }]; } });
465
289
 
466
- class CheckboxCellComponent {
467
- constructor(selectRow) {
468
- this.selectRow = selectRow;
290
+ class TableSelectControlsComponent {
291
+ constructor(selectRows, windowRef) {
292
+ this.selectRows = selectRows;
293
+ this.windowRef = windowRef;
294
+ this.hasNotSelected$ = this.selectRows.selectedRows$.pipe(map((selected) => selected.length === 0));
295
+ }
296
+ cancel() {
297
+ this.windowRef.close();
469
298
  }
470
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: CheckboxCellComponent, deps: [{ token: SelectRowService }], target: i0.ɵɵFactoryTarget.Component }); }
471
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: CheckboxCellComponent, isStandalone: true, selector: "td[rxap-checkbox-cell]", inputs: { element: "element" }, host: { classAttribute: "rxap-checkbox-cell" }, ngImport: i0, template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element)\"\n [checked]=\"selectRow.selectionModel.isSelected(element)\">\n</mat-checkbox>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
299
+ select() {
300
+ this.windowRef.close(this.selectRows.selectedRows);
301
+ }
302
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableSelectControlsComponent, deps: [{ token: SelectRowService }, { token: RXAP_WINDOW_REF }], target: i0.ɵɵFactoryTarget.Component }); }
303
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TableSelectControlsComponent, isStandalone: true, selector: "rxap-table-select-controls", ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\"16px\">\n <button (click)=\"cancel()\" fxFlex=\"nogrow\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"select()\" [disabled]=\"hasNotSelected$ | async\" fxFlex=\"nogrow\" mat-raised-button type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
472
304
  }
473
- __decorate([
474
- Required,
475
- __metadata("design:type", Object)
476
- ], CheckboxCellComponent.prototype, "element", void 0);
477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: CheckboxCellComponent, decorators: [{
305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableSelectControlsComponent, decorators: [{
478
306
  type: Component,
479
- args: [{ selector: 'td[rxap-checkbox-cell]', changeDetection: ChangeDetectionStrategy.Default, host: { class: 'rxap-checkbox-cell' }, standalone: true, imports: [MatCheckboxModule], template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element)\"\n [checked]=\"selectRow.selectionModel.isSelected(element)\">\n</mat-checkbox>\n" }]
480
- }], ctorParameters: function () { return [{ type: SelectRowService, decorators: [{
307
+ args: [{ selector: 'rxap-table-select-controls', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
308
+ FlexModule,
309
+ MatButtonModule,
310
+ AsyncPipe,
311
+ ], template: "<div fxLayout=\"row\" fxLayoutGap=\"16px\">\n <button (click)=\"cancel()\" fxFlex=\"nogrow\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"select()\" [disabled]=\"hasNotSelected$ | async\" fxFlex=\"nogrow\" mat-raised-button type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n</div>\n" }]
312
+ }], ctorParameters: function () { return [{ type: SelectRowService }, { type: undefined, decorators: [{
481
313
  type: Inject,
482
- args: [SelectRowService]
483
- }] }]; }, propDecorators: { element: [{
484
- type: Input
485
- }] } });
314
+ args: [RXAP_WINDOW_REF]
315
+ }] }]; } });
486
316
 
487
- class CheckboxHeaderCellComponent {
488
- constructor(cdkTable, selectRow) {
489
- this.cdkTable = cdkTable;
490
- this.selectRow = selectRow;
491
- this.indeterminate$ = EMPTY;
492
- this.checked$ = EMPTY;
493
- this.isMultipleSelection = false;
494
- this.isMultipleSelection =
495
- this.selectRow.selectionModel.isMultipleSelection();
496
- }
497
- ngOnInit() {
498
- this.indeterminate$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
499
- this.cdkTable['_data'].length !== selectedRows.length));
500
- this.checked$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
501
- this.cdkTable['_data'].length === selectedRows.length));
317
+ class TableFilterService {
318
+ constructor() {
319
+ this.change = new ReplaySubject(1);
320
+ this.current = {};
321
+ /**
322
+ * a flag to indicate whether any value was already send to the change subject
323
+ * true - a value was send
324
+ * false - no value was send
325
+ * @private
326
+ */
327
+ this._init = false;
328
+ this._subscription = this.change.subscribe(current => this.current = current);
502
329
  }
503
- onChange($event) {
504
- if ($event.checked) {
505
- this.selectRow.selectionModel.select(...this.cdkTable['_data']);
506
- }
507
- else {
508
- this.selectRow.selectionModel.clear();
330
+ setMap(map) {
331
+ const current = this.current;
332
+ const copy = clone(this.current);
333
+ const next = DeleteEmptyProperties(Object.assign(current, map));
334
+ if (!this._init || !equals(copy, next)) {
335
+ this._init = true;
336
+ this.change.next(next);
509
337
  }
510
338
  }
511
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: CheckboxHeaderCellComponent, deps: [{ token: CdkTable }, { token: SelectRowService }], target: i0.ɵɵFactoryTarget.Component }); }
512
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: CheckboxHeaderCellComponent, isStandalone: true, selector: "th[rxap-checkbox-header-cell]", host: { classAttribute: "rxap-checkbox-header-cell" }, ngImport: i0, template: "<mat-checkbox\n *ngIf=\"isMultipleSelection\"\n (change)=\"onChange($event)\"\n [indeterminate]=\"indeterminate$ | async\"\n [checked]=\"(checked$ | async) ?? false\">\n</mat-checkbox>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
513
- }
514
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: CheckboxHeaderCellComponent, decorators: [{
515
- type: Component,
516
- args: [{ selector: 'th[rxap-checkbox-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-checkbox-header-cell' }, standalone: true, imports: [
517
- NgIf,
518
- MatCheckboxModule,
519
- AsyncPipe
520
- ], template: "<mat-checkbox\n *ngIf=\"isMultipleSelection\"\n (change)=\"onChange($event)\"\n [indeterminate]=\"indeterminate$ | async\"\n [checked]=\"(checked$ | async) ?? false\">\n</mat-checkbox>\n" }]
521
- }], ctorParameters: function () { return [{ type: i3$1.CdkTable, decorators: [{
522
- type: Inject,
523
- args: [CdkTable]
524
- }] }, { type: SelectRowService }]; } });
525
-
526
- class SelectedRowsDirective {
527
- constructor(template, viewContainerRef, cdr, selectRowService) {
528
- this.template = template;
529
- this.viewContainerRef = viewContainerRef;
530
- this.cdr = cdr;
531
- this.selectRowService = selectRowService;
339
+ set(key, value) {
340
+ const current = this.current;
341
+ current[key] = value;
342
+ this.change.next(current);
532
343
  }
533
- ngOnDestroy() {
534
- this._subscription?.unsubscribe();
344
+ remove(key) {
345
+ const current = this.current;
346
+ // eslint-disable-next-line no-prototype-builtins
347
+ if (current.hasOwnProperty(key)) {
348
+ delete current[key];
349
+ }
350
+ this.change.next(current);
535
351
  }
536
- ngOnInit() {
537
- this._subscription = this.selectRowService.selectedRows$.pipe(distinctUntilChanged(), tap(selectedAllRows => {
538
- this.viewContainerRef.clear();
539
- if (selectedAllRows) {
540
- this.viewContainerRef.createEmbeddedView(this.template, { $implicit: this.selectRowService.selectedRows });
541
- }
542
- this.cdr.detectChanges();
543
- })).subscribe();
352
+ ngOnDestroy() {
353
+ this._subscription.unsubscribe();
544
354
  }
545
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SelectedRowsDirective, deps: [{ token: TemplateRef }, { token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: SelectRowService }], target: i0.ɵɵFactoryTarget.Directive }); }
546
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: SelectedRowsDirective, isStandalone: true, selector: "[rxapSelectedRows]", ngImport: i0 }); }
355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
356
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableFilterService }); }
547
357
  }
548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: SelectedRowsDirective, decorators: [{
549
- type: Directive,
550
- args: [{
551
- selector: '[rxapSelectedRows]',
552
- standalone: true
553
- }]
554
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
555
- type: Inject,
556
- args: [TemplateRef]
557
- }] }, { type: i0.ViewContainerRef, decorators: [{
558
- type: Inject,
559
- args: [ViewContainerRef]
560
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
561
- type: Inject,
562
- args: [ChangeDetectorRef]
563
- }] }, { type: SelectRowService, decorators: [{
564
- type: Inject,
565
- args: [SelectRowService]
566
- }] }]; } });
567
-
568
- const offset = '50';
569
- const RowAnimation = trigger('rowsAnimation', [
570
- transition('void => *', [
571
- style({
572
- height: '*',
573
- opacity: '0',
574
- transform: 'translateY(' + (-offset).toString() + 'px)',
575
- 'box-shadow': 'none'
576
- }),
577
- sequence([
578
- animate('.2s ease', style({
579
- height: '*',
580
- opacity: '.2',
581
- transform: 'translateX(0)',
582
- 'box-shadow': 'none'
583
- })),
584
- animate('.35s ease', style({ height: '*', opacity: 1, transform: 'translateX(0)' }))
585
- ])
586
- ]),
587
- transition('* => void', [
588
- style({ height: '0', opacity: '0', 'box-shadow': 'none' })
589
- ])
590
- ]);
591
-
592
- class TableFilterService {
593
- constructor() {
594
- this.change = new ReplaySubject(1);
595
- this.current = {};
596
- /**
597
- * a flag to indicate whether any value was already send to the change subject
598
- * true - a value was send
599
- * false - no value was send
600
- * @private
601
- */
602
- this._init = false;
603
- this._subscription = this.change.subscribe(current => this.current = current);
604
- }
605
- setMap(map) {
606
- const current = this.current;
607
- const copy = clone(this.current);
608
- const next = DeleteEmptyProperties(Object.assign(current, map));
609
- if (!this._init || !equals(copy, next)) {
610
- this._init = true;
611
- this.change.next(next);
612
- }
613
- }
614
- set(key, value) {
615
- const current = this.current;
616
- current[key] = value;
617
- this.change.next(current);
618
- }
619
- remove(key) {
620
- const current = this.current;
621
- if (current.hasOwnProperty(key)) {
622
- delete current[key];
623
- }
624
- this.change.next(current);
625
- }
626
- ngOnDestroy() {
627
- this._subscription.unsubscribe();
628
- }
629
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
630
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableFilterService }); }
631
- }
632
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableFilterService, decorators: [{
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableFilterService, decorators: [{
633
359
  type: Injectable
634
360
  }], ctorParameters: function () { return []; } });
635
361
 
@@ -644,6 +370,7 @@ class TableDataSourceDirective {
644
370
  /**
645
371
  * @deprecated use dataSource instead
646
372
  */
373
+ // eslint-disable-next-line @angular-eslint/no-input-rename
647
374
  set setDataSource(dataSource) {
648
375
  if (typeof dataSource !== 'string') {
649
376
  this.dataSource = dataSource;
@@ -679,7 +406,7 @@ class TableDataSourceDirective {
679
406
  this.refresh = this.refresh.bind(this);
680
407
  }
681
408
  trackBy(index, item) {
682
- return item.uuid ?? index;
409
+ return item['uuid'] ?? index;
683
410
  }
684
411
  ngOnInit() {
685
412
  const tableFilter = this._tableFilter ?? this.tableFilter ?? undefined;
@@ -697,7 +424,7 @@ class TableDataSourceDirective {
697
424
  this.dataSource = new DynamicTableDataSource(this.method, this.paginator, this.matSort, tableFilter, this.parameters, this.method.metadata ?? { id: this.id });
698
425
  }
699
426
  if (!this.dataSource) {
700
- throw new Error('The TABLE_DATA_SOURCE and TABLE_METHOD token are not defined!');
427
+ throw new Error('The TABLE_DATA_SOURCE and RXAP_TABLE_METHOD token are not defined!');
701
428
  }
702
429
  }
703
430
  this.dataSource.paginator = this.paginator;
@@ -736,21 +463,17 @@ class TableDataSourceDirective {
736
463
  retry() {
737
464
  this.dataSource?.retry();
738
465
  }
739
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableDataSourceDirective, deps: [{ token: CdkTable }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_METHOD, optional: true }, { token: TABLE_DATA_SOURCE, optional: true }, { token: TABLE_REMOTE_METHOD_ADAPTER_FACTORY, optional: true }, { token: MatSort, optional: true }, { token: TableFilterService, optional: true }, { token: RXAP_TABLE_FILTER, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
740
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: TableDataSourceDirective, isStandalone: true, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: { setDataSource: ["rxapTableDataSource", "setDataSource"], paginator: "paginator", id: "id", parameters: "parameters", dataSource: "dataSource" }, exportAs: ["rxapTableDataSource"], ngImport: i0 }); }
466
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableDataSourceDirective, deps: [{ token: CdkTable }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_METHOD, optional: true }, { token: TABLE_DATA_SOURCE, optional: true }, { token: TABLE_REMOTE_METHOD_ADAPTER_FACTORY, optional: true }, { token: MatSort, optional: true }, { token: TableFilterService, optional: true }, { token: RXAP_TABLE_FILTER, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
467
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: TableDataSourceDirective, isStandalone: true, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: { setDataSource: ["rxapTableDataSource", "setDataSource"], paginator: "paginator", id: "id", parameters: "parameters", dataSource: "dataSource" }, exportAs: ["rxapTableDataSource"], ngImport: i0 }); }
741
468
  }
742
- __decorate([
743
- Required,
744
- __metadata("design:type", String)
745
- ], TableDataSourceDirective.prototype, "id", void 0);
746
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableDataSourceDirective, decorators: [{
469
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableDataSourceDirective, decorators: [{
747
470
  type: Directive,
748
471
  args: [{
749
472
  selector: 'table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]',
750
473
  exportAs: 'rxapTableDataSource',
751
- standalone: true
474
+ standalone: true,
752
475
  }]
753
- }], ctorParameters: function () { return [{ type: i3$1.CdkTable, decorators: [{
476
+ }], ctorParameters: function () { return [{ type: i1.CdkTable, decorators: [{
754
477
  type: Inject,
755
478
  args: [CdkTable]
756
479
  }] }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
@@ -768,7 +491,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
768
491
  }, {
769
492
  type: Inject,
770
493
  args: [TABLE_REMOTE_METHOD_ADAPTER_FACTORY]
771
- }] }, { type: i2.MatSort, decorators: [{
494
+ }] }, { type: i2$1.MatSort, decorators: [{
772
495
  type: Optional
773
496
  }, {
774
497
  type: Inject,
@@ -789,145 +512,885 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
789
512
  }], paginator: [{
790
513
  type: Input
791
514
  }], id: [{
792
- type: Input
515
+ type: Input,
516
+ args: [{ required: true }]
793
517
  }], parameters: [{
794
518
  type: Input
795
519
  }], dataSource: [{
796
520
  type: Input
797
521
  }] } });
798
522
 
799
- class PersistentPaginatorDirective {
800
- constructor(matPaginator) {
801
- this.matPaginator = matPaginator;
802
- }
803
- ngOnInit() {
804
- const config = this.restoreConfig();
805
- if (config) {
806
- this.matPaginator.pageSize = config.pageSize;
807
- }
808
- this._subscription = this.matPaginator.page.pipe(tap(() => this.storeConfig())).subscribe();
809
- }
810
- ngOnDestroy() {
811
- this._subscription?.unsubscribe();
812
- }
813
- getKey() {
814
- return 'rxap_mat-paginator-persistent' + this.id;
523
+ class TableRowActionExecutingDirective {
524
+ constructor(templateRef, vcr) {
525
+ this.templateRef = templateRef;
526
+ this.vcr = vcr;
815
527
  }
816
- storeConfig() {
817
- const pageSize = this.matPaginator.pageSize;
818
- localStorage.setItem(this.getKey(), JSON.stringify({ pageSize }));
528
+ show() {
529
+ this.vcr.createEmbeddedView(this.templateRef);
819
530
  }
820
- restoreConfig() {
821
- const configStorage = localStorage.getItem(this.getKey());
822
- if (configStorage) {
823
- try {
824
- return JSON.parse(configStorage);
825
- }
826
- catch (e) {
827
- console.warn(`Could not parse mat paginator persistent config: ${e.message}`);
828
- }
829
- }
830
- return null;
531
+ hide() {
532
+ this.vcr.clear();
831
533
  }
832
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: PersistentPaginatorDirective, deps: [{ token: i1$2.MatPaginator }], target: i0.ɵɵFactoryTarget.Directive }); }
833
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: PersistentPaginatorDirective, isStandalone: true, selector: "mat-paginator[rxapPersistent]", inputs: { id: "id" }, ngImport: i0 }); }
534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionExecutingDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
535
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: TableRowActionExecutingDirective, isStandalone: true, selector: "[rxapTableRowActionExecuting]", ngImport: i0 }); }
834
536
  }
835
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: PersistentPaginatorDirective, decorators: [{
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionExecutingDirective, decorators: [{
836
538
  type: Directive,
837
539
  args: [{
838
- selector: 'mat-paginator[rxapPersistent]',
839
- standalone: true
540
+ selector: '[rxapTableRowActionExecuting]',
541
+ standalone: true,
840
542
  }]
841
- }], ctorParameters: function () { return [{ type: i1$2.MatPaginator }]; }, propDecorators: { id: [{
842
- type: Input
843
- }] } });
543
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
844
544
 
845
- const RXAP_TABLE_FILTER_FORM_DEFINITION = new InjectionToken('rxap/form-table-system/filter-form-definition');
545
+ var TableRowActionStatus;
546
+ (function (TableRowActionStatus) {
547
+ TableRowActionStatus["EXECUTING"] = "executing";
548
+ TableRowActionStatus["DONE"] = "done";
549
+ TableRowActionStatus["ERROR"] = "error";
550
+ TableRowActionStatus["SUCCESS"] = "success";
551
+ })(TableRowActionStatus || (TableRowActionStatus = {}));
846
552
 
847
- class FilterHeaderRowDirective extends FormDirective {
848
- set useFormDefinition(value) {
849
- if (value) {
850
- this._formDefinition = value;
851
- this.form = value.rxapFormGroup;
852
- }
853
- }
854
- constructor(tableFilter, cdr, formDefinition) {
855
- super(cdr, formDefinition);
856
- this.tableFilter = tableFilter;
857
- }
858
- ngOnInit() {
859
- super.ngOnInit();
860
- this._subscription = this.form.value$
861
- .pipe(debounceTime(1000), distinctUntilChanged((a, b) => equals(a, b)), tap(values => this.tableFilter.setMap(values)))
862
- .subscribe();
553
+ /**
554
+ * @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
555
+ */
556
+ const RXAP_TABLE_ACTION_METHOD_TYPE_METADATA = 'rxap-table-action-method-type-metadata';
557
+ const RXAP_TABLE_ACTION_METHOD_METADATA = 'rxap-table-action-method-metadata';
558
+ /**
559
+ * @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
560
+ */
561
+ const RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA = 'rxap-table-action-method-check-function-metadata';
562
+ function TableActionMethod(typeOrOptions, checkFunction) {
563
+ let type;
564
+ let options;
565
+ if (typeof typeOrOptions === 'string') {
566
+ type = typeOrOptions;
567
+ options = {
568
+ type,
569
+ checkFunction,
570
+ };
863
571
  }
864
- ngOnDestroy() {
865
- super.ngOnDestroy();
866
- this._subscription?.unsubscribe();
572
+ else {
573
+ options = typeOrOptions;
574
+ type = options.type;
575
+ checkFunction = options.checkFunction;
867
576
  }
868
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FilterHeaderRowDirective, deps: [{ token: TableFilterService }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_FILTER_FORM_DEFINITION, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
869
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: FilterHeaderRowDirective, isStandalone: true, selector: "table[rxap-filter-header-row]", inputs: { useFormDefinition: ["rxap-filter-header-row", "useFormDefinition"] }, providers: [
870
- {
871
- provide: ControlContainer,
872
- // ignore coverage
873
- useExisting: forwardRef(() => FilterHeaderRowDirective)
874
- }
875
- ], usesInheritance: true, ngImport: i0 }); }
577
+ return function (target) {
578
+ setMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, options, target);
579
+ if (type) {
580
+ setMetadata(RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, type, target);
581
+ }
582
+ if (checkFunction) {
583
+ setMetadata(RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA, checkFunction, target);
584
+ }
585
+ };
876
586
  }
877
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FilterHeaderRowDirective, decorators: [{
878
- type: Directive,
879
- args: [{
880
- // tslint:disable-next-line:directive-selector
881
- selector: 'table[rxap-filter-header-row]',
882
- providers: [
883
- {
884
- provide: ControlContainer,
885
- // ignore coverage
886
- useExisting: forwardRef(() => FilterHeaderRowDirective)
887
- }
888
- ],
889
- standalone: true
890
- }]
891
- }], ctorParameters: function () { return [{ type: TableFilterService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
892
- type: Optional
893
- }, {
894
- type: Inject,
895
- args: [RXAP_TABLE_FILTER_FORM_DEFINITION]
896
- }] }]; }, propDecorators: { useFormDefinition: [{
897
- type: Input,
898
- args: ['rxap-filter-header-row']
899
- }] } });
900
587
 
901
- class ToFilterColumnNamesPipe {
902
- transform(columns) {
903
- return columns.map(column => 'filter_' + column);
588
+ function IsTableRowActionTypeSwitchMethod(method) {
589
+ return getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.type === undefined;
590
+ }
591
+ function IsTableRowActionTypeMethod(type) {
592
+ return (method) => {
593
+ return (getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.type === type);
594
+ };
595
+ }
596
+ function HasTableRowActionCheckFunction(method) {
597
+ return getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.checkFunction !== undefined;
598
+ }
599
+ function GetTableRowActionCheckFunction(method) {
600
+ const checkFunction = getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.checkFunction;
601
+ if (!checkFunction) {
602
+ throw new Error(`Extracted check function from '${method.constructor.name}' is empty`);
904
603
  }
905
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ToFilterColumnNamesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
906
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: ToFilterColumnNamesPipe, isStandalone: true, name: "toFilterColumnNames" }); }
604
+ return checkFunction;
907
605
  }
908
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ToFilterColumnNamesPipe, decorators: [{
909
- type: Pipe,
910
- args: [{
911
- name: 'toFilterColumnNames',
912
- standalone: true
913
- }]
914
- }] });
915
-
916
- class TableColumnOptionComponent {
917
- /**
918
- * The displayed value of the option. It is necessary to show the selected option in the
919
- * select's trigger.
920
- */
921
- get display() {
922
- return (this._element.nativeElement.textContent || '').trim();
606
+ function HasTableRowActionMetadata(method) {
607
+ return hasMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor);
608
+ }
609
+ function GetTableRowActionMetadata(method) {
610
+ const metadata = getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor);
611
+ if (!metadata) {
612
+ throw new Error(`Extracted metadata from '${method.constructor.name}' is empty`);
923
613
  }
924
- set inactive(value) {
925
- this.active = !coerceBoolean(value);
614
+ return metadata;
615
+ }
616
+
617
+ const RXAP_TABLE_ROW_ACTION_METHOD = new InjectionToken('rxap-table-row-action-method');
618
+
619
+ class AbstractTableRowAction extends ConfirmDirective {
620
+ constructor(overlay, elementRef, actionMethodList, cdr, vcr, tableDataSourceDirective, snackBar, matButton, matTooltip, injector) {
621
+ super(overlay, elementRef);
622
+ this.cdr = cdr;
623
+ this.vcr = vcr;
624
+ this.tableDataSourceDirective = tableDataSourceDirective;
625
+ this.snackBar = snackBar;
626
+ this.matButton = matButton;
627
+ this.matTooltip = matTooltip;
628
+ this.injector = injector;
629
+ this.options = null;
630
+ this._currentStatus = TableRowActionStatus.DONE;
631
+ this._actionDisabled = false;
632
+ this._hasConfirmDirective = false;
633
+ this.actionMethodList = coerceArray(actionMethodList);
926
634
  }
927
- set hidden(value) {
928
- this._hidden = coerceBoolean(value);
635
+ // eslint-disable-next-line @angular-eslint/no-input-rename
636
+ set hasConfirmDirective(value) {
637
+ this._hasConfirmDirective = coerceBoolean(value);
929
638
  }
930
- get hidden() {
639
+ // eslint-disable-next-line @angular-eslint/contextual-lifecycle
640
+ ngOnInit() {
641
+ this.options = this.getTableActionOptions();
642
+ if (this.options) {
643
+ this.refresh ??= this.options.refresh ?? false;
644
+ this.errorMessage ??= this.options.errorMessage ?? undefined;
645
+ this.successMessage ??= this.options.successMessage ?? undefined;
646
+ if (this.matTooltip && this.options.tooltip) {
647
+ this.matTooltip.message = this.options.tooltip;
648
+ }
649
+ this.color ??= this.options.color ?? undefined;
650
+ }
651
+ if (this.matButton) {
652
+ if (this.color) {
653
+ this.matButton.color = this.color;
654
+ }
655
+ }
656
+ }
657
+ onConfirmed() {
658
+ return this.execute();
659
+ }
660
+ onClick($event) {
661
+ $event.stopPropagation();
662
+ if (!this._hasConfirmDirective && !this.options?.confirm) {
663
+ return this.execute();
664
+ }
665
+ else if (this.options?.confirm) {
666
+ this.openConfirmOverly();
667
+ }
668
+ else {
669
+ if (isDevMode()) {
670
+ console.debug('skip remote method call. Wait for confirmation.');
671
+ }
672
+ }
673
+ return Promise.resolve();
674
+ }
675
+ async execute() {
676
+ if (this._actionDisabled) {
677
+ return Promise.resolve();
678
+ }
679
+ this.setStatus(TableRowActionStatus.EXECUTING);
680
+ try {
681
+ await Promise.all(this.getElementList().map((element) => {
682
+ return Promise.all([
683
+ Promise.all(this.findUntypedActionMethod().map((am) => {
684
+ return am.call({
685
+ element,
686
+ type: this.type,
687
+ });
688
+ })),
689
+ Promise.all(this.findTypedActionMethod().map((am) => {
690
+ return am.call(element);
691
+ })),
692
+ ]);
693
+ }));
694
+ this.setStatus(TableRowActionStatus.SUCCESS);
695
+ }
696
+ catch (e) {
697
+ console.error(`Failed to execute row action: ${e.message}`);
698
+ this.setStatus(TableRowActionStatus.ERROR);
699
+ }
700
+ }
701
+ /**
702
+ * Disables the action. If the button is pressed the action is NOT executed
703
+ *
704
+ * Hint: the button is set to disabled = true to prevent any conflict with
705
+ * extern button enable features linke : rxapHasEnablePermission
706
+ * @protected
707
+ */
708
+ setButtonDisabled() {
709
+ this._actionDisabled = true;
710
+ }
711
+ /**
712
+ * Enables the action. If the button is pressed the action is executed
713
+ *
714
+ * TODO : find a way to communicate the disabled state between the features
715
+ * Hint: the button is set to disabled = false to prevent any conflict with
716
+ * extern button enable features linke : rxapHasEnablePermission
717
+ * @protected
718
+ */
719
+ setButtonEnabled() {
720
+ this._actionDisabled = false;
721
+ }
722
+ /**
723
+ * find all method instance in the actionMethodList member that
724
+ * do not have a @TableActionMethod decorators
725
+ * @private
726
+ */
727
+ findUntypedActionMethod() {
728
+ return this.actionMethodList.filter(IsTableRowActionTypeSwitchMethod);
729
+ }
730
+ /**
731
+ * find all method instance in the actionMethodList member that
732
+ * do have a @TableActionMethod decorators with the current type
733
+ * @private
734
+ */
735
+ findTypedActionMethod() {
736
+ return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type));
737
+ }
738
+ setStatus(status) {
739
+ if (this._currentStatus === status) {
740
+ return;
741
+ }
742
+ this._currentStatus = status;
743
+ switch (status) {
744
+ case TableRowActionStatus.EXECUTING:
745
+ this.setButtonDisabled();
746
+ this.executingDirective?.show();
747
+ break;
748
+ case TableRowActionStatus.SUCCESS:
749
+ if (this.refresh) {
750
+ this.tableDataSourceDirective.refresh();
751
+ }
752
+ if (this.successMessage) {
753
+ this.snackBar.open(this.successMessage, 'ok', { duration: 2560 });
754
+ }
755
+ this.setStatus(TableRowActionStatus.DONE);
756
+ break;
757
+ case TableRowActionStatus.ERROR:
758
+ this.setStatus(TableRowActionStatus.DONE);
759
+ if (this.errorMessage) {
760
+ this.snackBar.open(this.errorMessage, 'ok', { duration: 5120 });
761
+ }
762
+ break;
763
+ case TableRowActionStatus.DONE:
764
+ this.setButtonEnabled();
765
+ this.executingDirective?.hide();
766
+ break;
767
+ }
768
+ this.cdr.detectChanges();
769
+ }
770
+ getTableActionOptions() {
771
+ const metadataList = this.actionMethodList.map(actionMethod => GetTableRowActionMetadata(actionMethod));
772
+ if (metadataList.length === 0) {
773
+ return null;
774
+ }
775
+ // TODO : handle multiple metadata or not exist metadata
776
+ return metadataList.filter(metadata => metadata.type === this.type)
777
+ .sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))[0];
778
+ }
779
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AbstractTableRowAction, deps: [{ token: Overlay }, { token: ElementRef }, { token: RXAP_TABLE_ROW_ACTION_METHOD }, { token: ChangeDetectorRef }, { token: ViewContainerRef }, { token: TableDataSourceDirective }, { token: MatSnackBar }, { token: MatIconButton, optional: true }, { token: MatTooltip, optional: true }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Injectable }); }
780
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AbstractTableRowAction }); }
781
+ }
782
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AbstractTableRowAction, decorators: [{
783
+ type: Injectable
784
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay, decorators: [{
785
+ type: Inject,
786
+ args: [Overlay]
787
+ }] }, { type: i0.ElementRef, decorators: [{
788
+ type: Inject,
789
+ args: [ElementRef]
790
+ }] }, { type: undefined, decorators: [{
791
+ type: Inject,
792
+ args: [RXAP_TABLE_ROW_ACTION_METHOD]
793
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
794
+ type: Inject,
795
+ args: [ChangeDetectorRef]
796
+ }] }, { type: i0.ViewContainerRef, decorators: [{
797
+ type: Inject,
798
+ args: [ViewContainerRef]
799
+ }] }, { type: TableDataSourceDirective, decorators: [{
800
+ type: Inject,
801
+ args: [TableDataSourceDirective]
802
+ }] }, { type: i3.MatSnackBar, decorators: [{
803
+ type: Inject,
804
+ args: [MatSnackBar]
805
+ }] }, { type: i4.MatIconButton, decorators: [{
806
+ type: Optional
807
+ }, {
808
+ type: Inject,
809
+ args: [MatIconButton]
810
+ }] }, { type: i5.MatTooltip, decorators: [{
811
+ type: Optional
812
+ }, {
813
+ type: Inject,
814
+ args: [MatTooltip]
815
+ }] }, { type: i0.Injector, decorators: [{
816
+ type: Inject,
817
+ args: [INJECTOR]
818
+ }] }]; }, propDecorators: { errorMessage: [{
819
+ type: Input
820
+ }], successMessage: [{
821
+ type: Input
822
+ }], refresh: [{
823
+ type: Input
824
+ }], color: [{
825
+ type: Input
826
+ }], executingDirective: [{
827
+ type: ContentChild,
828
+ args: [TableRowActionExecutingDirective]
829
+ }], hasConfirmDirective: [{
830
+ type: Input,
831
+ args: ['rxapConfirm']
832
+ }], onConfirmed: [{
833
+ type: HostListener,
834
+ args: ['confirmed']
835
+ }], onClick: [{
836
+ type: HostListener,
837
+ args: ['click', ['$event']]
838
+ }] } });
839
+
840
+ class RowActionCheckPipe {
841
+ constructor(tableRowActionMethodList) {
842
+ this.actionMethodList = coerceArray(tableRowActionMethodList);
843
+ }
844
+ transform(value, type) {
845
+ if (!type) {
846
+ throw new Error(`The provided type is empty '${type}'`);
847
+ }
848
+ const actionMethodList = this.actionMethodList.filter(IsTableRowActionTypeMethod(type));
849
+ if (actionMethodList.length > 1) {
850
+ throw new Error(`Multiple (${actionMethodList.length}) action method with the same type '${type}' found`);
851
+ }
852
+ if (actionMethodList.length === 0) {
853
+ throw new Error(`Could not find a action method with the type '${type}'`);
854
+ }
855
+ const actionMethod = actionMethodList[0];
856
+ if (HasTableRowActionCheckFunction(actionMethod)) {
857
+ const checkFunction = GetTableRowActionCheckFunction(actionMethod);
858
+ const input = coerceArray(value);
859
+ return input.length !== 0 && input.every(checkFunction);
860
+ }
861
+ return true;
862
+ }
863
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RowActionCheckPipe, deps: [{ token: RXAP_TABLE_ROW_ACTION_METHOD, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
864
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: RowActionCheckPipe, isStandalone: true, name: "rxapRowActionCheck" }); }
865
+ }
866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RowActionCheckPipe, decorators: [{
867
+ type: Pipe,
868
+ args: [{
869
+ name: 'rxapRowActionCheck',
870
+ standalone: true,
871
+ }]
872
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
873
+ type: Optional
874
+ }, {
875
+ type: Inject,
876
+ args: [RXAP_TABLE_ROW_ACTION_METHOD]
877
+ }] }]; } });
878
+
879
+ class TableRowActionDirective extends AbstractTableRowAction {
880
+ getElementList() {
881
+ return [this.element];
882
+ }
883
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
884
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: TableRowActionDirective, isStandalone: true, selector: "button[rxapTableRowAction]", inputs: { errorMessage: "errorMessage", successMessage: "successMessage", refresh: "refresh", color: "color", type: ["rxapTableRowAction", "type"], element: "element" }, usesInheritance: true, ngImport: i0 }); }
885
+ }
886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionDirective, decorators: [{
887
+ type: Directive,
888
+ args: [{
889
+ selector: 'button[rxapTableRowAction]',
890
+ standalone: true,
891
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
892
+ inputs: ['errorMessage', 'successMessage', 'refresh', 'color'],
893
+ }]
894
+ }], propDecorators: { type: [{
895
+ type: Input,
896
+ args: [{
897
+ required: true,
898
+ alias: 'rxapTableRowAction',
899
+ }]
900
+ }], element: [{
901
+ type: Input,
902
+ args: [{ required: true }]
903
+ }] } });
904
+
905
+ class TableRowHeaderActionDirective extends AbstractTableRowAction {
906
+ constructor(overlay, elementRef, actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton, matTooltip, injector, selectRowService) {
907
+ super(overlay, elementRef, actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton, matTooltip, injector);
908
+ this.selectRowService = selectRowService;
909
+ }
910
+ ngOnDestroy() {
911
+ this._subscription?.unsubscribe();
912
+ }
913
+ ngOnInit() {
914
+ if (this.selectRowService) {
915
+ this._subscription = this.selectRowService.selectedRows$
916
+ .pipe(startWith(this.selectRowService.selectedRows), map((rows) => rows.length !== 0), tap((hasSelected) => {
917
+ if (hasSelected) {
918
+ this.setButtonEnabled();
919
+ }
920
+ else {
921
+ this.setButtonDisabled();
922
+ }
923
+ this.cdr.detectChanges();
924
+ }))
925
+ .subscribe();
926
+ }
927
+ else {
928
+ this.setButtonDisabled();
929
+ }
930
+ }
931
+ getElementList() {
932
+ return this.selectRowService?.selectedRows ?? [];
933
+ }
934
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowHeaderActionDirective, deps: [{ token: Overlay }, { token: ElementRef }, { token: RXAP_TABLE_ROW_ACTION_METHOD }, { token: ChangeDetectorRef }, { token: ViewContainerRef }, { token: TableDataSourceDirective }, { token: MatSnackBar }, { token: MatButton, optional: true }, { token: MatTooltip, optional: true }, { token: INJECTOR }, { token: SelectRowService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
935
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: TableRowHeaderActionDirective, isStandalone: true, selector: "button[rxapTableRowHeaderAction]", inputs: { errorMessage: "errorMessage", successMessage: "successMessage", refresh: "refresh", color: "color", type: ["rxapTableRowHeaderAction", "type"] }, usesInheritance: true, ngImport: i0 }); }
936
+ }
937
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowHeaderActionDirective, decorators: [{
938
+ type: Directive,
939
+ args: [{
940
+ selector: 'button[rxapTableRowHeaderAction]',
941
+ standalone: true,
942
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
943
+ inputs: ['errorMessage', 'successMessage', 'refresh', 'color'],
944
+ }]
945
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay, decorators: [{
946
+ type: Inject,
947
+ args: [Overlay]
948
+ }] }, { type: i0.ElementRef, decorators: [{
949
+ type: Inject,
950
+ args: [ElementRef]
951
+ }] }, { type: undefined, decorators: [{
952
+ type: Inject,
953
+ args: [RXAP_TABLE_ROW_ACTION_METHOD]
954
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
955
+ type: Inject,
956
+ args: [ChangeDetectorRef]
957
+ }] }, { type: i0.ViewContainerRef, decorators: [{
958
+ type: Inject,
959
+ args: [ViewContainerRef]
960
+ }] }, { type: TableDataSourceDirective, decorators: [{
961
+ type: Inject,
962
+ args: [TableDataSourceDirective]
963
+ }] }, { type: i3.MatSnackBar, decorators: [{
964
+ type: Inject,
965
+ args: [MatSnackBar]
966
+ }] }, { type: i4.MatButton, decorators: [{
967
+ type: Optional
968
+ }, {
969
+ type: Inject,
970
+ args: [MatButton]
971
+ }] }, { type: i5.MatTooltip, decorators: [{
972
+ type: Optional
973
+ }, {
974
+ type: Inject,
975
+ args: [MatTooltip]
976
+ }] }, { type: i0.Injector, decorators: [{
977
+ type: Inject,
978
+ args: [INJECTOR]
979
+ }] }, { type: SelectRowService, decorators: [{
980
+ type: Optional
981
+ }, {
982
+ type: Inject,
983
+ args: [SelectRowService]
984
+ }] }]; }, propDecorators: { type: [{
985
+ type: Input,
986
+ args: [{
987
+ required: true,
988
+ alias: 'rxapTableRowHeaderAction',
989
+ }]
990
+ }] } });
991
+
992
+ class TableRowActionsModule {
993
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
994
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionsModule, imports: [TableRowActionDirective,
995
+ TableRowActionExecutingDirective,
996
+ TableRowHeaderActionDirective,
997
+ RowActionCheckPipe,
998
+ ConfirmModule], exports: [TableRowActionDirective,
999
+ TableRowHeaderActionDirective,
1000
+ TableRowActionExecutingDirective,
1001
+ RowActionCheckPipe,
1002
+ MatTooltipModule,
1003
+ MatButtonModule,
1004
+ ConfirmModule,
1005
+ MatIconModule,
1006
+ MatProgressBarModule,
1007
+ CommonModule] }); }
1008
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionsModule, imports: [ConfirmModule, MatTooltipModule,
1009
+ MatButtonModule,
1010
+ ConfirmModule,
1011
+ MatIconModule,
1012
+ MatProgressBarModule,
1013
+ CommonModule] }); }
1014
+ }
1015
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableRowActionsModule, decorators: [{
1016
+ type: NgModule,
1017
+ args: [{
1018
+ imports: [
1019
+ TableRowActionDirective,
1020
+ TableRowActionExecutingDirective,
1021
+ TableRowHeaderActionDirective,
1022
+ RowActionCheckPipe,
1023
+ ConfirmModule,
1024
+ ],
1025
+ exports: [
1026
+ TableRowActionDirective,
1027
+ TableRowHeaderActionDirective,
1028
+ TableRowActionExecutingDirective,
1029
+ RowActionCheckPipe,
1030
+ MatTooltipModule,
1031
+ MatButtonModule,
1032
+ ConfirmModule,
1033
+ MatIconModule,
1034
+ MatProgressBarModule,
1035
+ CommonModule,
1036
+ ],
1037
+ }]
1038
+ }] });
1039
+
1040
+ const RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA = 'rxap-table-header-button-method-metadata';
1041
+ function TableHeaderButtonMethod(options = {}) {
1042
+ return function (target) {
1043
+ setMetadata(RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA, options, target);
1044
+ };
1045
+ }
1046
+ function GetTableHeaderButtonMetadata(method) {
1047
+ const metadata = getMetadata(RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA, method.constructor);
1048
+ if (!metadata) {
1049
+ throw new Error(`Extracted metadata from '${method.constructor.name}' is empty`);
1050
+ }
1051
+ return metadata;
1052
+ }
1053
+
1054
+ var TableHeaderButtonActionStatus;
1055
+ (function (TableHeaderButtonActionStatus) {
1056
+ TableHeaderButtonActionStatus["EXECUTING"] = "executing";
1057
+ TableHeaderButtonActionStatus["DONE"] = "done";
1058
+ TableHeaderButtonActionStatus["ERROR"] = "error";
1059
+ TableHeaderButtonActionStatus["SUCCESS"] = "success";
1060
+ })(TableHeaderButtonActionStatus || (TableHeaderButtonActionStatus = {}));
1061
+
1062
+ const TABLE_HEADER_BUTTON_METHOD = new InjectionToken('table-header-button-method');
1063
+
1064
+ class TableHeaderButtonDirective extends ConfirmDirective {
1065
+ constructor(overlay, elementRef, method, snackBar, matTooltip, matButton, cdr) {
1066
+ super(overlay, elementRef);
1067
+ this.method = method;
1068
+ this.snackBar = snackBar;
1069
+ this.matTooltip = matTooltip;
1070
+ this.matButton = matButton;
1071
+ this.cdr = cdr;
1072
+ this.options = null;
1073
+ this._actionDisabled = false;
1074
+ this._currentStatus = TableHeaderButtonActionStatus.DONE;
1075
+ this._hasConfirmDirective = false;
1076
+ }
1077
+ // eslint-disable-next-line @angular-eslint/no-input-rename
1078
+ set hasConfirmDirective(value) {
1079
+ this._hasConfirmDirective = coerceBoolean(value);
1080
+ }
1081
+ onConfirmed() {
1082
+ return this.execute();
1083
+ }
1084
+ onClick($event) {
1085
+ $event.stopPropagation();
1086
+ if (!this._hasConfirmDirective && !this.options?.confirm) {
1087
+ return this.execute();
1088
+ }
1089
+ else if (this.options?.confirm) {
1090
+ this.openConfirmOverly();
1091
+ }
1092
+ else {
1093
+ if (isDevMode()) {
1094
+ console.debug('skip remote method call. Wait for confirmation.');
1095
+ }
1096
+ }
1097
+ return Promise.resolve();
1098
+ }
1099
+ async execute() {
1100
+ if (this._actionDisabled) {
1101
+ return Promise.resolve();
1102
+ }
1103
+ this.setStatus(TableHeaderButtonActionStatus.EXECUTING);
1104
+ try {
1105
+ await this.method.call();
1106
+ this.setStatus(TableHeaderButtonActionStatus.SUCCESS);
1107
+ }
1108
+ catch (e) {
1109
+ console.error(`Failed to execute table header action: ${e.message}`);
1110
+ this.setStatus(TableHeaderButtonActionStatus.ERROR);
1111
+ }
1112
+ }
1113
+ ngOnInit() {
1114
+ this.options = this.getTableHeaderButtonOptions();
1115
+ if (this.options) {
1116
+ this.refresh ??= this.options.refresh ?? false;
1117
+ this.errorMessage ??= this.options.errorMessage ?? undefined;
1118
+ this.successMessage ??= this.options.successMessage ?? undefined;
1119
+ if (this.matTooltip && this.options.tooltip) {
1120
+ this.matTooltip.message = this.options.tooltip;
1121
+ }
1122
+ }
1123
+ }
1124
+ /**
1125
+ * Disables the action. If the button is pressed the action is NOT executed
1126
+ *
1127
+ * Hint: the button is set to disabled = true to prevent any conflict with
1128
+ * extern button enable features linke : rxapHasEnablePermission
1129
+ * @protected
1130
+ */
1131
+ setButtonDisabled() {
1132
+ this._actionDisabled = true;
1133
+ }
1134
+ /**
1135
+ * Enables the action. If the button is pressed the action is executed
1136
+ *
1137
+ * TODO : find a way to communicate the disabled state between the features
1138
+ * Hint: the button is set to disabled = false to prevent any conflict with
1139
+ * extern button enable features linke : rxapHasEnablePermission
1140
+ * @protected
1141
+ */
1142
+ setButtonEnabled() {
1143
+ this._actionDisabled = false;
1144
+ }
1145
+ setStatus(status) {
1146
+ if (this._currentStatus === status) {
1147
+ return;
1148
+ }
1149
+ this._currentStatus = status;
1150
+ switch (status) {
1151
+ case TableHeaderButtonActionStatus.EXECUTING:
1152
+ this.setButtonDisabled();
1153
+ break;
1154
+ case TableHeaderButtonActionStatus.SUCCESS:
1155
+ if (this.refresh) {
1156
+ this.tableDataSourceDirective.refresh();
1157
+ }
1158
+ if (this.successMessage) {
1159
+ this.snackBar.open(this.successMessage, 'ok', { duration: 2560 });
1160
+ }
1161
+ this.setStatus(TableHeaderButtonActionStatus.DONE);
1162
+ break;
1163
+ case TableHeaderButtonActionStatus.ERROR:
1164
+ this.setStatus(TableHeaderButtonActionStatus.DONE);
1165
+ if (this.errorMessage) {
1166
+ this.snackBar.open(this.errorMessage, 'ok', { duration: 5120 });
1167
+ }
1168
+ break;
1169
+ case TableHeaderButtonActionStatus.DONE:
1170
+ this.setButtonEnabled();
1171
+ break;
1172
+ }
1173
+ this.cdr.detectChanges();
1174
+ }
1175
+ getTableHeaderButtonOptions() {
1176
+ return GetTableHeaderButtonMetadata(this.method);
1177
+ }
1178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableHeaderButtonDirective, deps: [{ token: Overlay }, { token: ElementRef }, { token: TABLE_HEADER_BUTTON_METHOD }, { token: MatSnackBar }, { token: MatTooltip, optional: true }, { token: MatMiniFabButton, optional: true }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1179
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: TableHeaderButtonDirective, isStandalone: true, selector: "button[mat-mini-fab][rxapTableHeaderButton]", inputs: { tableDataSourceDirective: ["rxapTableHeaderButton", "tableDataSourceDirective"], errorMessage: "errorMessage", successMessage: "successMessage", refresh: "refresh", hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"] }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick($event)" } }, usesInheritance: true, ngImport: i0 }); }
1180
+ }
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableHeaderButtonDirective, decorators: [{
1182
+ type: Directive,
1183
+ args: [{
1184
+ selector: 'button[mat-mini-fab][rxapTableHeaderButton]',
1185
+ standalone: true,
1186
+ }]
1187
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay, decorators: [{
1188
+ type: Inject,
1189
+ args: [Overlay]
1190
+ }] }, { type: i0.ElementRef, decorators: [{
1191
+ type: Inject,
1192
+ args: [ElementRef]
1193
+ }] }, { type: undefined, decorators: [{
1194
+ type: Inject,
1195
+ args: [TABLE_HEADER_BUTTON_METHOD]
1196
+ }] }, { type: i3.MatSnackBar, decorators: [{
1197
+ type: Inject,
1198
+ args: [MatSnackBar]
1199
+ }] }, { type: i5.MatTooltip, decorators: [{
1200
+ type: Optional
1201
+ }, {
1202
+ type: Inject,
1203
+ args: [MatTooltip]
1204
+ }] }, { type: i4.MatMiniFabButton, decorators: [{
1205
+ type: Optional
1206
+ }, {
1207
+ type: Inject,
1208
+ args: [MatMiniFabButton]
1209
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
1210
+ type: Inject,
1211
+ args: [ChangeDetectorRef]
1212
+ }] }]; }, propDecorators: { tableDataSourceDirective: [{
1213
+ type: Input,
1214
+ args: [{
1215
+ required: true,
1216
+ alias: 'rxapTableHeaderButton',
1217
+ }]
1218
+ }], errorMessage: [{
1219
+ type: Input
1220
+ }], successMessage: [{
1221
+ type: Input
1222
+ }], refresh: [{
1223
+ type: Input
1224
+ }], hasConfirmDirective: [{
1225
+ type: Input,
1226
+ args: ['rxapConfirm']
1227
+ }], onConfirmed: [{
1228
+ type: HostListener,
1229
+ args: ['confirmed']
1230
+ }], onClick: [{
1231
+ type: HostListener,
1232
+ args: ['click', ['$event']]
1233
+ }] } });
1234
+
1235
+ const RXAP_TABLE_FILTER_FORM_DEFINITION = new InjectionToken('rxap/form-table-system/filter-form-definition');
1236
+
1237
+ class FilterHeaderRowDirective extends FormDirective {
1238
+ set useFormDefinition(value) {
1239
+ if (value) {
1240
+ this._formDefinition = value;
1241
+ this.form = value.rxapFormGroup;
1242
+ }
1243
+ }
1244
+ constructor(tableFilter, cdr, formDefinition) {
1245
+ super(cdr, formDefinition);
1246
+ this.tableFilter = tableFilter;
1247
+ }
1248
+ ngOnInit() {
1249
+ super.ngOnInit();
1250
+ this._subscription = this.form.value$
1251
+ .pipe(debounceTime(1000), distinctUntilChanged((a, b) => equals(a, b)), tap(values => this.tableFilter.setMap(values)))
1252
+ .subscribe();
1253
+ }
1254
+ ngOnDestroy() {
1255
+ super.ngOnDestroy();
1256
+ this._subscription?.unsubscribe();
1257
+ }
1258
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FilterHeaderRowDirective, deps: [{ token: TableFilterService }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_FILTER_FORM_DEFINITION, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1259
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: FilterHeaderRowDirective, isStandalone: true, selector: "table[rxap-filter-header-row]", inputs: { useFormDefinition: ["rxap-filter-header-row", "useFormDefinition"] }, providers: [
1260
+ {
1261
+ provide: ControlContainer,
1262
+ // ignore coverage
1263
+ useExisting: forwardRef(() => FilterHeaderRowDirective),
1264
+ },
1265
+ ], usesInheritance: true, ngImport: i0 }); }
1266
+ }
1267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FilterHeaderRowDirective, decorators: [{
1268
+ type: Directive,
1269
+ args: [{
1270
+ // eslint-disable-next-line @angular-eslint/directive-selector
1271
+ selector: 'table[rxap-filter-header-row]',
1272
+ providers: [
1273
+ {
1274
+ provide: ControlContainer,
1275
+ // ignore coverage
1276
+ useExisting: forwardRef(() => FilterHeaderRowDirective),
1277
+ },
1278
+ ],
1279
+ standalone: true,
1280
+ }]
1281
+ }], ctorParameters: function () { return [{ type: TableFilterService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1282
+ type: Optional
1283
+ }, {
1284
+ type: Inject,
1285
+ args: [RXAP_TABLE_FILTER_FORM_DEFINITION]
1286
+ }] }]; }, propDecorators: { useFormDefinition: [{
1287
+ type: Input,
1288
+ args: ['rxap-filter-header-row']
1289
+ }] } });
1290
+
1291
+ class ToFilterColumnNamesPipe {
1292
+ transform(columns) {
1293
+ return columns.map(column => 'filter_' + column);
1294
+ }
1295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ToFilterColumnNamesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1296
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: ToFilterColumnNamesPipe, isStandalone: true, name: "toFilterColumnNames" }); }
1297
+ }
1298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ToFilterColumnNamesPipe, decorators: [{
1299
+ type: Pipe,
1300
+ args: [{
1301
+ name: 'toFilterColumnNames',
1302
+ standalone: true,
1303
+ }]
1304
+ }] });
1305
+
1306
+ class TableFilterModule {
1307
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1308
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: TableFilterModule, imports: [ToFilterColumnNamesPipe,
1309
+ FilterHeaderRowDirective], exports: [ToFilterColumnNamesPipe,
1310
+ FilterHeaderRowDirective] }); }
1311
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableFilterModule }); }
1312
+ }
1313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableFilterModule, decorators: [{
1314
+ type: NgModule,
1315
+ args: [{
1316
+ exports: [
1317
+ ToFilterColumnNamesPipe,
1318
+ FilterHeaderRowDirective,
1319
+ ],
1320
+ imports: [
1321
+ ToFilterColumnNamesPipe,
1322
+ FilterHeaderRowDirective,
1323
+ ],
1324
+ }]
1325
+ }] });
1326
+
1327
+ const TABLE_CREATE_REMOTE_METHOD = new InjectionToken('table-create-remote-method');
1328
+
1329
+ class TableCreateButtonDirective {
1330
+ constructor(method, elementRef, renderer) {
1331
+ this.method = method;
1332
+ this.elementRef = elementRef;
1333
+ this.renderer = renderer;
1334
+ }
1335
+ ngOnInit() {
1336
+ this.renderer.setStyle(this.elementRef.nativeElement, 'margin-bottom', '6px');
1337
+ }
1338
+ ngOnDestroy() {
1339
+ if (this._createObservable instanceof Subject) {
1340
+ this._createObservable.complete();
1341
+ }
1342
+ }
1343
+ async onClick() {
1344
+ const result = this._createObservable = await this.method.call();
1345
+ if (isObservable(result)) {
1346
+ await result.toPromise();
1347
+ }
1348
+ this.dataSource.refresh();
1349
+ }
1350
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableCreateButtonDirective, deps: [{ token: TABLE_CREATE_REMOTE_METHOD }, { token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1351
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: TableCreateButtonDirective, isStandalone: true, selector: "button[rxapTableCreate]", inputs: { dataSource: ["rxapTableCreate", "dataSource"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
1352
+ }
1353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableCreateButtonDirective, decorators: [{
1354
+ type: Directive,
1355
+ args: [{
1356
+ selector: 'button[rxapTableCreate]',
1357
+ standalone: true,
1358
+ }]
1359
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1360
+ type: Inject,
1361
+ args: [TABLE_CREATE_REMOTE_METHOD]
1362
+ }] }, { type: i0.ElementRef, decorators: [{
1363
+ type: Inject,
1364
+ args: [ElementRef]
1365
+ }] }, { type: i0.Renderer2, decorators: [{
1366
+ type: Inject,
1367
+ args: [Renderer2]
1368
+ }] }]; }, propDecorators: { dataSource: [{
1369
+ type: Input,
1370
+ args: [{
1371
+ required: true,
1372
+ alias: 'rxapTableCreate',
1373
+ }]
1374
+ }], onClick: [{
1375
+ type: HostListener,
1376
+ args: ['click']
1377
+ }] } });
1378
+
1379
+ class TableColumnOptionComponent {
1380
+ /**
1381
+ * The displayed value of the option. It is necessary to show the selected option in the
1382
+ * select's trigger.
1383
+ */
1384
+ get display() {
1385
+ return (this._element.nativeElement.textContent || '').trim();
1386
+ }
1387
+ set inactive(value) {
1388
+ this.active = !coerceBoolean(value);
1389
+ }
1390
+ set hidden(value) {
1391
+ this._hidden = coerceBoolean(value);
1392
+ }
1393
+ get hidden() {
931
1394
  return this._hidden;
932
1395
  }
933
1396
  set show(value) {
@@ -963,21 +1426,18 @@ class TableColumnOptionComponent {
963
1426
  this.active = false;
964
1427
  localStorage.setItem(this.cacheId, 'false');
965
1428
  }
966
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableColumnOptionComponent, deps: [{ token: ElementRef }, { token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
967
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: TableColumnOptionComponent, isStandalone: true, selector: "rxap-table-column-option", inputs: { name: "name", active: "active", inactive: "inactive", hidden: "hidden", show: "show" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
1429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableColumnOptionComponent, deps: [{ token: ElementRef }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1430
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TableColumnOptionComponent, isStandalone: true, selector: "rxap-table-column-option", inputs: { name: "name", active: "active", inactive: "inactive", hidden: "hidden", show: "show" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
968
1431
  }
969
- __decorate([
970
- Required,
971
- __metadata("design:type", String)
972
- ], TableColumnOptionComponent.prototype, "name", void 0);
973
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableColumnOptionComponent, decorators: [{
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableColumnOptionComponent, decorators: [{
974
1433
  type: Component,
975
1434
  args: [{ selector: 'rxap-table-column-option', standalone: true, template: "<ng-content></ng-content>\n" }]
976
1435
  }], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
977
1436
  type: Inject,
978
1437
  args: [ElementRef]
979
- }] }, { type: i1$3.Router }]; }, propDecorators: { name: [{
980
- type: Input
1438
+ }] }, { type: i1$2.Router }]; }, propDecorators: { name: [{
1439
+ type: Input,
1440
+ args: [{ required: true }]
981
1441
  }], active: [{
982
1442
  type: Input
983
1443
  }], inactive: [{
@@ -1019,20 +1479,20 @@ class TableColumnMenuComponent {
1019
1479
  .forEach((column) => column.deactivate());
1020
1480
  this.updateDisplayColumns();
1021
1481
  }
1022
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableColumnMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1023
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: TableColumnMenuComponent, isStandalone: true, selector: "rxap-table-column-menu", inputs: { matCard: "matCard" }, host: { properties: { "class.mat-card-mode": "this._matCardMode" }, classAttribute: "mfd-table-column-menu" }, queries: [{ propertyName: "columns", predicate: TableColumnOptionComponent }], exportAs: ["rxapTableColumns"], ngImport: i0, template: "<button type=\"button\" mat-icon-button [matMenuTriggerFor]=\"columnMenu\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n <span\n rxapStopPropagation\n *ngFor=\"let column of columns\"\n [disableRipple]=\"true\"\n [fxHide]=\"column.hidden\"\n mat-menu-item\n >\n <mat-checkbox\n (change)=\"column.toggle(); updateDisplayColumns()\"\n [checked]=\"column.active\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode{position:absolute;inset:8px 8px auto auto}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i2$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: StopPropagationDirective, selector: "[rxapStopPropagation]" }, { kind: "ngmodule", type: ExtendedModule }, { kind: "directive", type: i4.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1482
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableColumnMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1483
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TableColumnMenuComponent, isStandalone: true, selector: "rxap-table-column-menu", inputs: { matCard: "matCard" }, host: { properties: { "class.mat-card-mode": "this._matCardMode" } }, queries: [{ propertyName: "columns", predicate: TableColumnOptionComponent }], exportAs: ["rxapTableColumns"], ngImport: i0, template: "<button [matMenuTriggerFor]=\"columnMenu\" mat-icon-button type=\"button\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n <span\n *ngFor=\"let column of columns\"\n [disableRipple]=\"true\"\n [fxHide]=\"column.hidden\"\n mat-menu-item\n rxapStopPropagation\n >\n <mat-checkbox\n (change)=\"column.toggle(); updateDisplayColumns()\"\n [checked]=\"column.active\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode{position:absolute;inset:8px 8px auto auto}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i2$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: StopPropagationDirective, selector: "[rxapStopPropagation]" }, { kind: "ngmodule", type: ExtendedModule }, { kind: "directive", type: i4$1.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1024
1484
  }
1025
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableColumnMenuComponent, decorators: [{
1485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableColumnMenuComponent, decorators: [{
1026
1486
  type: Component,
1027
- args: [{ selector: 'rxap-table-column-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-table-column-menu' }, exportAs: 'rxapTableColumns', standalone: true, imports: [
1487
+ args: [{ selector: 'rxap-table-column-menu', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'rxapTableColumns', standalone: true, imports: [
1028
1488
  MatButtonModule,
1029
1489
  MatMenuModule,
1030
1490
  MatIconModule,
1031
1491
  NgFor,
1032
1492
  StopPropagationDirective,
1033
1493
  ExtendedModule,
1034
- MatCheckboxModule
1035
- ], template: "<button type=\"button\" mat-icon-button [matMenuTriggerFor]=\"columnMenu\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n <span\n rxapStopPropagation\n *ngFor=\"let column of columns\"\n [disableRipple]=\"true\"\n [fxHide]=\"column.hidden\"\n mat-menu-item\n >\n <mat-checkbox\n (change)=\"column.toggle(); updateDisplayColumns()\"\n [checked]=\"column.active\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode{position:absolute;inset:8px 8px auto auto}\n"] }]
1494
+ MatCheckboxModule,
1495
+ ], template: "<button [matMenuTriggerFor]=\"columnMenu\" mat-icon-button type=\"button\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n <span\n *ngFor=\"let column of columns\"\n [disableRipple]=\"true\"\n [fxHide]=\"column.hidden\"\n mat-menu-item\n rxapStopPropagation\n >\n <mat-checkbox\n (change)=\"column.toggle(); updateDisplayColumns()\"\n [checked]=\"column.active\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode{position:absolute;inset:8px 8px auto auto}\n"] }]
1036
1496
  }], propDecorators: { columns: [{
1037
1497
  type: ContentChildren,
1038
1498
  args: [TableColumnOptionComponent]
@@ -1049,7 +1509,8 @@ class TableShowArchivedSlideComponent {
1049
1509
  this.tableColumnMenu = tableColumnMenu;
1050
1510
  }
1051
1511
  onChange($event) {
1052
- this.tableFilter.set('__archived', $event.checked);
1512
+ this.paginator?.firstPage();
1513
+ this.tableFilter?.set('__archived', $event.checked);
1053
1514
  if ($event.checked) {
1054
1515
  this.tableColumnMenu.activate('removedAt');
1055
1516
  }
@@ -1057,387 +1518,392 @@ class TableShowArchivedSlideComponent {
1057
1518
  this.tableColumnMenu.deactivate('removedAt');
1058
1519
  }
1059
1520
  }
1060
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableShowArchivedSlideComponent, deps: [{ token: TableFilterService }, { token: TableColumnMenuComponent }], target: i0.ɵɵFactoryTarget.Component }); }
1061
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: TableShowArchivedSlideComponent, isStandalone: true, selector: "mfd-table-show-archived-slide", host: { classAttribute: "mfd-table-show-archived-slide" }, ngImport: i0, template: "<div rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\">\n <ng-container i18n>Show archived documents</ng-container>\n </mat-slide-toggle>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: StopPropagationDirective, selector: "[rxapStopPropagation]" }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i3$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1521
+ ngAfterViewInit() {
1522
+ this.tableColumnMenu.deactivate('removedAt');
1523
+ }
1524
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableShowArchivedSlideComponent, deps: [{ token: TableFilterService, optional: true }, { token: TableColumnMenuComponent }], target: i0.ɵɵFactoryTarget.Component }); }
1525
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TableShowArchivedSlideComponent, isStandalone: true, selector: "rxap-table-show-archived-slide", inputs: { paginator: "paginator" }, ngImport: i0, template: "<div class=\"m-6\" rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\">\n <span class=\"mx-2 whitespace-nowrap\" i18n>Show archived documents</span>\n </mat-slide-toggle>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: StopPropagationDirective, selector: "[rxapStopPropagation]" }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1062
1526
  }
1063
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableShowArchivedSlideComponent, decorators: [{
1527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableShowArchivedSlideComponent, decorators: [{
1064
1528
  type: Component,
1065
- args: [{ selector: 'mfd-table-show-archived-slide', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-table-show-archived-slide' }, standalone: true, imports: [StopPropagationDirective, MatSlideToggleModule], template: "<div rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\">\n <ng-container i18n>Show archived documents</ng-container>\n </mat-slide-toggle>\n</div>\n" }]
1066
- }], ctorParameters: function () { return [{ type: TableFilterService }, { type: TableColumnMenuComponent }]; } });
1529
+ args: [{ selector: 'rxap-table-show-archived-slide', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [StopPropagationDirective, MatSlideToggleModule], template: "<div class=\"m-6\" rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\">\n <span class=\"mx-2 whitespace-nowrap\" i18n>Show archived documents</span>\n </mat-slide-toggle>\n</div>\n" }]
1530
+ }], ctorParameters: function () { return [{ type: TableFilterService, decorators: [{
1531
+ type: Optional
1532
+ }, {
1533
+ type: Inject,
1534
+ args: [TableFilterService]
1535
+ }] }, { type: TableColumnMenuComponent, decorators: [{
1536
+ type: Inject,
1537
+ args: [TableColumnMenuComponent]
1538
+ }] }]; }, propDecorators: { paginator: [{
1539
+ type: Input
1540
+ }] } });
1067
1541
 
1068
- const TABLE_CREATE_REMOTE_METHOD = new InjectionToken('table-create-remote-method');
1542
+ class TableColumnMenuModule {
1543
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableColumnMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1544
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: TableColumnMenuModule, imports: [TableColumnMenuComponent,
1545
+ TableShowArchivedSlideComponent,
1546
+ TableColumnOptionComponent], exports: [TableColumnMenuComponent,
1547
+ TableShowArchivedSlideComponent,
1548
+ TableColumnOptionComponent] }); }
1549
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableColumnMenuModule, imports: [TableColumnMenuComponent,
1550
+ TableShowArchivedSlideComponent] }); }
1551
+ }
1552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TableColumnMenuModule, decorators: [{
1553
+ type: NgModule,
1554
+ args: [{
1555
+ imports: [
1556
+ TableColumnMenuComponent,
1557
+ TableShowArchivedSlideComponent,
1558
+ TableColumnOptionComponent,
1559
+ ],
1560
+ exports: [
1561
+ TableColumnMenuComponent,
1562
+ TableShowArchivedSlideComponent,
1563
+ TableColumnOptionComponent,
1564
+ ],
1565
+ }]
1566
+ }] });
1069
1567
 
1070
- class TableCreateButtonDirective {
1071
- constructor(remoteMethod, elementRef, renderer) {
1072
- this.remoteMethod = remoteMethod;
1073
- this.elementRef = elementRef;
1074
- this.renderer = renderer;
1568
+ class CheckboxHeaderCellComponent {
1569
+ constructor(cdkTable, selectRow) {
1570
+ this.cdkTable = cdkTable;
1571
+ this.selectRow = selectRow;
1572
+ this.indeterminate$ = EMPTY;
1573
+ this.checked$ = EMPTY;
1574
+ this.isMultipleSelection = false;
1575
+ this.isMultipleSelection =
1576
+ this.selectRow.selectionModel.isMultipleSelection();
1075
1577
  }
1076
1578
  ngOnInit() {
1077
- this.renderer.setStyle(this.elementRef.nativeElement, 'margin-bottom', '6px');
1579
+ this.indeterminate$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
1580
+ this.cdkTable['_data'].length !== selectedRows.length));
1581
+ this.checked$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
1582
+ this.cdkTable['_data'].length === selectedRows.length));
1078
1583
  }
1079
- ngOnDestroy() {
1080
- if (this._createObservable instanceof Subject) {
1081
- this._createObservable.complete();
1584
+ onChange($event) {
1585
+ if ($event.checked) {
1586
+ this.selectRow.selectionModel.select(...this.cdkTable['_data']);
1082
1587
  }
1083
- }
1084
- async onClick() {
1085
- const result = this._createObservable = await this.remoteMethod.call();
1086
- if (isObservable(result)) {
1087
- await result.toPromise();
1588
+ else {
1589
+ this.selectRow.selectionModel.clear();
1088
1590
  }
1089
- this.dataSource.refresh();
1090
1591
  }
1091
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableCreateButtonDirective, deps: [{ token: TABLE_CREATE_REMOTE_METHOD }, { token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1092
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: TableCreateButtonDirective, isStandalone: true, selector: "button[rxapTableCreate]", inputs: { dataSource: ["rxapTableCreate", "dataSource"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
1592
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CheckboxHeaderCellComponent, deps: [{ token: CdkTable }, { token: SelectRowService }], target: i0.ɵɵFactoryTarget.Component }); }
1593
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: CheckboxHeaderCellComponent, isStandalone: true, selector: "th[rxap-checkbox-header-cell]", ngImport: i0, template: "<mat-checkbox\n (change)=\"onChange($event)\"\n *ngIf=\"isMultipleSelection\"\n [checked]=\"(checked$ | async) ?? false\"\n [indeterminate]=\"indeterminate$ | async\">\n</mat-checkbox>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1093
1594
  }
1094
- __decorate([
1095
- Required,
1096
- __metadata("design:type", TableDataSourceDirective)
1097
- ], TableCreateButtonDirective.prototype, "dataSource", void 0);
1098
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableCreateButtonDirective, decorators: [{
1099
- type: Directive,
1100
- args: [{
1101
- selector: 'button[rxapTableCreate]',
1102
- standalone: true
1103
- }]
1104
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1105
- type: Inject,
1106
- args: [TABLE_CREATE_REMOTE_METHOD]
1107
- }] }, { type: i0.ElementRef, decorators: [{
1108
- type: Inject,
1109
- args: [ElementRef]
1110
- }] }, { type: i0.Renderer2, decorators: [{
1595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CheckboxHeaderCellComponent, decorators: [{
1596
+ type: Component,
1597
+ args: [{ selector: 'th[rxap-checkbox-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
1598
+ NgIf,
1599
+ MatCheckboxModule,
1600
+ AsyncPipe,
1601
+ ], template: "<mat-checkbox\n (change)=\"onChange($event)\"\n *ngIf=\"isMultipleSelection\"\n [checked]=\"(checked$ | async) ?? false\"\n [indeterminate]=\"indeterminate$ | async\">\n</mat-checkbox>\n" }]
1602
+ }], ctorParameters: function () { return [{ type: i1.CdkTable, decorators: [{
1111
1603
  type: Inject,
1112
- args: [Renderer2]
1113
- }] }]; }, propDecorators: { dataSource: [{
1114
- type: Input,
1115
- args: ['rxapTableCreate']
1116
- }], onClick: [{
1117
- type: HostListener,
1118
- args: ['click']
1119
- }] } });
1120
-
1121
- const ROW_ARCHIVE_METHOD = new InjectionToken('archive-remote-method');
1122
- const ROW_RESTORE_METHOD = new InjectionToken('unarchive-remote-method');
1123
- const ROW_DELETE_METHOD = new InjectionToken('delete-remote-method');
1124
- const ROW_EDIT_METHOD = new InjectionToken('edit-remote-method');
1125
- const ROW_VIEW_METHOD = new InjectionToken('view-remote-method');
1126
- const ROW_LINK_METHOD = new InjectionToken('link-remote-method');
1127
- const ROW_EDIT_LOADER_METHOD = new InjectionToken('edit-loader-method');
1604
+ args: [CdkTable]
1605
+ }] }, { type: SelectRowService }]; } });
1128
1606
 
1129
- class RowControlsCellComponent {
1130
- constructor(tableDataSource, deleteRemoteMethod = null, archiveRemoteMethod = null, unarchiveRemoteMethod = null, editRemoteMethod = null, rowViewMethod = null, rowLinkMethod = null, editLoaderMethod = null) {
1131
- this.tableDataSource = tableDataSource;
1132
- this.deleteRemoteMethod = deleteRemoteMethod;
1133
- this.archiveRemoteMethod = archiveRemoteMethod;
1134
- this.unarchiveRemoteMethod = unarchiveRemoteMethod;
1135
- this.editRemoteMethod = editRemoteMethod;
1136
- this.rowViewMethod = rowViewMethod;
1137
- this.rowLinkMethod = rowLinkMethod;
1138
- this.editLoaderMethod = editLoaderMethod;
1139
- }
1140
- async archive() {
1141
- if (this.archiveRemoteMethod) {
1142
- await this.archiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
1143
- this.tableDataSource.refresh();
1144
- }
1145
- }
1146
- async unarchive() {
1147
- if (this.unarchiveRemoteMethod) {
1148
- await this.unarchiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
1149
- this.tableDataSource.refresh();
1150
- }
1151
- }
1152
- async remove() {
1153
- if (this.deleteRemoteMethod) {
1154
- await this.deleteRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
1155
- this.tableDataSource.refresh();
1156
- }
1157
- }
1158
- async view() {
1159
- if (this.rowViewMethod) {
1160
- await this.rowViewMethod.call(this.element);
1161
- }
1162
- }
1163
- async link() {
1164
- if (this.rowLinkMethod) {
1165
- await this.rowLinkMethod.call(this.element);
1166
- }
1167
- }
1168
- async edit() {
1169
- if (this.editRemoteMethod) {
1170
- let initial = this.element;
1171
- if (this.editLoaderMethod) {
1172
- initial = await this.editLoaderMethod.call(initial);
1173
- }
1174
- const result = await this.editRemoteMethod.call(initial, { context: this.element });
1175
- if (isObservable(result)) {
1176
- await result.toPromise();
1177
- }
1178
- this.tableDataSource.refresh();
1179
- }
1607
+ class CheckboxCellComponent {
1608
+ constructor(selectRow) {
1609
+ this.selectRow = selectRow;
1180
1610
  }
1181
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RowControlsCellComponent, deps: [{ token: TableDataSourceDirective }, { token: ROW_DELETE_METHOD, optional: true }, { token: ROW_ARCHIVE_METHOD, optional: true }, { token: ROW_RESTORE_METHOD, optional: true }, { token: ROW_EDIT_METHOD, optional: true }, { token: ROW_VIEW_METHOD, optional: true }, { token: ROW_LINK_METHOD, optional: true }, { token: ROW_EDIT_LOADER_METHOD, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1182
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: RowControlsCellComponent, isStandalone: true, selector: "td[mfd-row-controls-cell]", inputs: { element: "element" }, host: { classAttribute: "mfd-row-controls-cell" }, ngImport: i0, template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button (confirmed)=\"archive()\" *ngIf=\"!element.__archived && archiveRemoteMethod\" mat-icon-button matTooltip=\"Archivieren\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button (confirmed)=\"unarchive()\" *ngIf=\"element.__archived && unarchiveRemoteMethod\" mat-icon-button matTooltip=\"Wiederherstellen\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button *ngIf=\"(element.__archived && deleteRemoteMethod) || (deleteRemoteMethod && !unarchiveRemoteMethod && !archiveRemoteMethod)\" matTooltip=\"L\u00F6schen\"\n type=\"button\"\n (confirmed)=\"remove()\" mat-icon-button color=\"warn\"\n rxapConfirm fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- edit -->\n <button (click)=\"edit()\" *ngIf=\"!element.__archived && editRemoteMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Bearbeiten\" type=\"button\">\n <mat-icon>edit</mat-icon>\n </button>\n\n <!-- view -->\n <button (click)=\"view()\" *ngIf=\"rowViewMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Details\" type=\"button\">\n <mat-icon>visibility</mat-icon>\n </button>\n\n <!-- link -->\n <button type=\"button\" *ngIf=\"rowLinkMethod\" (click)=\"link()\" mat-icon-button fxFlex=\"40px\">\n <mat-icon svgIcon=\"database-import\"></mat-icon>\n </button>\n\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: ConfirmDirective, selector: "[rxapConfirm]", inputs: ["rxapConfirm"], outputs: ["confirmed", "unconfirmed"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1611
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CheckboxCellComponent, deps: [{ token: SelectRowService }], target: i0.ɵɵFactoryTarget.Component }); }
1612
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: CheckboxCellComponent, isStandalone: true, selector: "td[rxap-checkbox-cell]", inputs: { element: "element" }, ngImport: i0, template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element)\"\n [checked]=\"selectRow.selectionModel.isSelected(element)\">\n</mat-checkbox>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
1183
1613
  }
1184
- __decorate([
1185
- Required,
1186
- __metadata("design:type", Object)
1187
- ], RowControlsCellComponent.prototype, "element", void 0);
1188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RowControlsCellComponent, decorators: [{
1614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CheckboxCellComponent, decorators: [{
1189
1615
  type: Component,
1190
- args: [{ selector: 'td[mfd-row-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-row-controls-cell' }, standalone: true, imports: [FlexModule, NgIf, MatButtonModule, MatTooltipModule, ConfirmDirective, MatIconModule], template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button (confirmed)=\"archive()\" *ngIf=\"!element.__archived && archiveRemoteMethod\" mat-icon-button matTooltip=\"Archivieren\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button (confirmed)=\"unarchive()\" *ngIf=\"element.__archived && unarchiveRemoteMethod\" mat-icon-button matTooltip=\"Wiederherstellen\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button *ngIf=\"(element.__archived && deleteRemoteMethod) || (deleteRemoteMethod && !unarchiveRemoteMethod && !archiveRemoteMethod)\" matTooltip=\"L\u00F6schen\"\n type=\"button\"\n (confirmed)=\"remove()\" mat-icon-button color=\"warn\"\n rxapConfirm fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- edit -->\n <button (click)=\"edit()\" *ngIf=\"!element.__archived && editRemoteMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Bearbeiten\" type=\"button\">\n <mat-icon>edit</mat-icon>\n </button>\n\n <!-- view -->\n <button (click)=\"view()\" *ngIf=\"rowViewMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Details\" type=\"button\">\n <mat-icon>visibility</mat-icon>\n </button>\n\n <!-- link -->\n <button type=\"button\" *ngIf=\"rowLinkMethod\" (click)=\"link()\" mat-icon-button fxFlex=\"40px\">\n <mat-icon svgIcon=\"database-import\"></mat-icon>\n </button>\n\n</div>\n" }]
1191
- }], ctorParameters: function () { return [{ type: TableDataSourceDirective }, { type: undefined, decorators: [{
1192
- type: Optional
1193
- }, {
1194
- type: Inject,
1195
- args: [ROW_DELETE_METHOD]
1196
- }] }, { type: undefined, decorators: [{
1197
- type: Optional
1198
- }, {
1199
- type: Inject,
1200
- args: [ROW_ARCHIVE_METHOD]
1201
- }] }, { type: undefined, decorators: [{
1202
- type: Optional
1203
- }, {
1204
- type: Inject,
1205
- args: [ROW_RESTORE_METHOD]
1206
- }] }, { type: undefined, decorators: [{
1207
- type: Optional
1208
- }, {
1209
- type: Inject,
1210
- args: [ROW_EDIT_METHOD]
1211
- }] }, { type: undefined, decorators: [{
1212
- type: Optional
1213
- }, {
1214
- type: Inject,
1215
- args: [ROW_VIEW_METHOD]
1216
- }] }, { type: undefined, decorators: [{
1217
- type: Optional
1218
- }, {
1219
- type: Inject,
1220
- args: [ROW_LINK_METHOD]
1221
- }] }, { type: undefined, decorators: [{
1222
- type: Optional
1223
- }, {
1616
+ args: [{ selector: 'td[rxap-checkbox-cell]', changeDetection: ChangeDetectionStrategy.Default, standalone: true, imports: [MatCheckboxModule], template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element)\"\n [checked]=\"selectRow.selectionModel.isSelected(element)\">\n</mat-checkbox>\n" }]
1617
+ }], ctorParameters: function () { return [{ type: SelectRowService, decorators: [{
1224
1618
  type: Inject,
1225
- args: [ROW_EDIT_LOADER_METHOD]
1619
+ args: [SelectRowService]
1226
1620
  }] }]; }, propDecorators: { element: [{
1227
- type: Input
1621
+ type: Input,
1622
+ args: [{ required: true }]
1228
1623
  }] } });
1229
1624
 
1230
- class RowControlsHeaderCellComponent {
1231
- constructor(tableDataSource, tableFilter = null, selectRow = null, deleteRemoteMethod = null, archiveRemoteMethod = null, unarchiveRemoteMethod = null) {
1232
- this.tableDataSource = tableDataSource;
1233
- this.tableFilter = tableFilter;
1234
- this.selectRow = selectRow;
1235
- this.deleteRemoteMethod = deleteRemoteMethod;
1236
- this.archiveRemoteMethod = archiveRemoteMethod;
1237
- this.unarchiveRemoteMethod = unarchiveRemoteMethod;
1238
- this.disabled$ =
1239
- this.selectRow?.selectedRows$.pipe(map((selectedRows) => selectedRows.length === 0), startWith(true)) ?? of(true);
1240
- this.showUnarchive$ = this.showDelete$ =
1241
- this.tableFilter?.change.pipe(map((filter) => filter &&
1242
- filter.hasOwnProperty('__archived') &&
1243
- filter['__archived'] === true), distinctUntilChanged()) ?? of(false);
1244
- this.showArchive$ =
1245
- this.tableFilter?.change.pipe(map((filter) => !filter ||
1246
- !filter.hasOwnProperty('__archived') ||
1247
- filter['__archived'] === false), distinctUntilChanged()) ?? of(true);
1248
- if (!this.archiveRemoteMethod) {
1249
- this.showArchive$ = of(false);
1250
- }
1251
- if (!this.unarchiveRemoteMethod) {
1252
- this.showUnarchive$ = of(false);
1253
- }
1254
- if (!this.deleteRemoteMethod) {
1255
- this.showDelete$ = of(false);
1256
- }
1257
- }
1258
- async archiveSelected(selectedRows) {
1259
- if (this.archiveRemoteMethod && selectedRows) {
1260
- await Promise.all(selectedRows.map((selectedRow) => this.archiveRemoteMethod?.call({
1261
- parameters: { uuid: selectedRow.uuid },
1262
- })));
1263
- this.tableDataSource.refresh();
1264
- }
1265
- }
1266
- async unarchiveSelected(selectedRows) {
1267
- if (this.unarchiveRemoteMethod && selectedRows) {
1268
- await Promise.all(selectedRows.map((selectedRow) => this.unarchiveRemoteMethod?.call({
1269
- parameters: { uuid: selectedRow.uuid },
1270
- })));
1271
- this.tableDataSource.refresh();
1272
- }
1273
- }
1274
- async deleteSelected(selectedRows) {
1275
- if (this.deleteRemoteMethod && selectedRows) {
1276
- await Promise.all(selectedRows.map((selectedRow) => this.deleteRemoteMethod?.call({
1277
- parameters: { uuid: selectedRow.uuid },
1278
- })));
1279
- this.tableDataSource.refresh();
1280
- }
1281
- }
1282
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RowControlsHeaderCellComponent, deps: [{ token: TableDataSourceDirective }, { token: TableFilterService, optional: true }, { token: SelectRowService, optional: true }, { token: ROW_DELETE_METHOD, optional: true }, { token: ROW_ARCHIVE_METHOD, optional: true }, { token: ROW_RESTORE_METHOD, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1283
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: RowControlsHeaderCellComponent, isStandalone: true, selector: "th[mfd-row-controls-header-cell]", host: { classAttribute: "mfd-row-controls-header-cell" }, ngImport: i0, template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button *ngIf=\"selectRow && (showArchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Archivieren\" type=\"button\"\n (confirmed)=\"archiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button *ngIf=\"selectRow && (showUnarchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Wiederherstellen\" type=\"button\"\n (confirmed)=\"unarchiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button (confirmed)=\"deleteSelected($event)\" *ngIf=\"selectRow && (showDelete$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"L\u00F6schen\" type=\"button\"\n mat-icon-button color=\"warn\"\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: ConfirmDirective, selector: "[rxapConfirm]", inputs: ["rxapConfirm"], outputs: ["confirmed", "unconfirmed"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1625
+ class SelectedRowsDirective {
1626
+ constructor(template, viewContainerRef, cdr, selectRowService) {
1627
+ this.template = template;
1628
+ this.viewContainerRef = viewContainerRef;
1629
+ this.cdr = cdr;
1630
+ this.selectRowService = selectRowService;
1631
+ }
1632
+ ngOnDestroy() {
1633
+ this._subscription?.unsubscribe();
1634
+ }
1635
+ ngOnInit() {
1636
+ this._subscription = this.selectRowService.selectedRows$.pipe(distinctUntilChanged(), tap(selectedAllRows => {
1637
+ this.viewContainerRef.clear();
1638
+ if (selectedAllRows) {
1639
+ this.viewContainerRef.createEmbeddedView(this.template, { $implicit: this.selectRowService.selectedRows });
1640
+ }
1641
+ this.cdr.detectChanges();
1642
+ })).subscribe();
1643
+ }
1644
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectedRowsDirective, deps: [{ token: TemplateRef }, { token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: SelectRowService }], target: i0.ɵɵFactoryTarget.Directive }); }
1645
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: SelectedRowsDirective, isStandalone: true, selector: "[rxapSelectedRows]", ngImport: i0 }); }
1284
1646
  }
1285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RowControlsHeaderCellComponent, decorators: [{
1286
- type: Component,
1287
- args: [{ selector: 'th[mfd-row-controls-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-row-controls-header-cell' }, standalone: true, imports: [
1288
- FlexModule,
1289
- NgIf,
1290
- MatButtonModule,
1291
- MatTooltipModule,
1292
- ConfirmDirective,
1293
- MatIconModule,
1294
- AsyncPipe
1295
- ], template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button *ngIf=\"selectRow && (showArchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Archivieren\" type=\"button\"\n (confirmed)=\"archiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button *ngIf=\"selectRow && (showUnarchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Wiederherstellen\" type=\"button\"\n (confirmed)=\"unarchiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button (confirmed)=\"deleteSelected($event)\" *ngIf=\"selectRow && (showDelete$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"L\u00F6schen\" type=\"button\"\n mat-icon-button color=\"warn\"\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n</div>\n" }]
1296
- }], ctorParameters: function () { return [{ type: TableDataSourceDirective }, { type: TableFilterService, decorators: [{
1297
- type: Optional
1298
- }, {
1299
- type: Inject,
1300
- args: [TableFilterService]
1301
- }] }, { type: SelectRowService, decorators: [{
1302
- type: Optional
1303
- }, {
1647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectedRowsDirective, decorators: [{
1648
+ type: Directive,
1649
+ args: [{
1650
+ selector: '[rxapSelectedRows]',
1651
+ standalone: true,
1652
+ }]
1653
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1304
1654
  type: Inject,
1305
- args: [SelectRowService]
1306
- }] }, { type: undefined, decorators: [{
1307
- type: Optional
1308
- }, {
1655
+ args: [TemplateRef]
1656
+ }] }, { type: i0.ViewContainerRef, decorators: [{
1309
1657
  type: Inject,
1310
- args: [ROW_DELETE_METHOD]
1311
- }] }, { type: undefined, decorators: [{
1312
- type: Optional
1313
- }, {
1658
+ args: [ViewContainerRef]
1659
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
1314
1660
  type: Inject,
1315
- args: [ROW_ARCHIVE_METHOD]
1316
- }] }, { type: undefined, decorators: [{
1317
- type: Optional
1318
- }, {
1661
+ args: [ChangeDetectorRef]
1662
+ }] }, { type: SelectRowService, decorators: [{
1319
1663
  type: Inject,
1320
- args: [ROW_RESTORE_METHOD]
1664
+ args: [SelectRowService]
1321
1665
  }] }]; } });
1322
1666
 
1323
- class TableSelectControlsComponent {
1324
- constructor(selectRows, windowRef) {
1325
- this.selectRows = selectRows;
1326
- this.windowRef = windowRef;
1327
- this.hasNotSelected$ = this.selectRows.selectedRows$.pipe(map((selected) => selected.length === 0));
1328
- }
1329
- cancel() {
1330
- this.windowRef.close();
1667
+ class SelectRowModule {
1668
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1669
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: SelectRowModule, imports: [SelectedRowsDirective,
1670
+ CheckboxCellComponent,
1671
+ CheckboxHeaderCellComponent], exports: [CheckboxCellComponent,
1672
+ CheckboxHeaderCellComponent,
1673
+ SelectedRowsDirective] }); }
1674
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectRowModule, imports: [CheckboxCellComponent,
1675
+ CheckboxHeaderCellComponent] }); }
1676
+ }
1677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SelectRowModule, decorators: [{
1678
+ type: NgModule,
1679
+ args: [{
1680
+ exports: [
1681
+ CheckboxCellComponent,
1682
+ CheckboxHeaderCellComponent,
1683
+ SelectedRowsDirective,
1684
+ ],
1685
+ imports: [
1686
+ SelectedRowsDirective,
1687
+ CheckboxCellComponent,
1688
+ CheckboxHeaderCellComponent,
1689
+ ],
1690
+ }]
1691
+ }] });
1692
+
1693
+ class ExpandRowContentDirective {
1694
+ static ngTemplateContextGuard(dir, ctx) {
1695
+ return true;
1331
1696
  }
1332
- select() {
1333
- this.windowRef.close(this.selectRows.selectedRows);
1697
+ constructor(template) {
1698
+ this.template = template;
1334
1699
  }
1335
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableSelectControlsComponent, deps: [{ token: SelectRowService }, { token: RXAP_WINDOW_REF }], target: i0.ɵɵFactoryTarget.Component }); }
1336
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: TableSelectControlsComponent, isStandalone: true, selector: "mfd-table-select-controls", host: { classAttribute: "mfd-table-select-controls" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\"16px\">\n <button fxFlex=\"nogrow\" mat-stroked-button (click)=\"cancel()\" type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button fxFlex=\"nogrow\" mat-raised-button (click)=\"select()\" type=\"button\" [disabled]=\"hasNotSelected$ | async\">\n <ng-container i18n>Select</ng-container>\n </button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1700
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowContentDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1701
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: ExpandRowContentDirective, isStandalone: true, selector: "[rxapExpandRowContent]", ngImport: i0 }); }
1337
1702
  }
1338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableSelectControlsComponent, decorators: [{
1339
- type: Component,
1340
- args: [{ selector: 'mfd-table-select-controls', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-table-select-controls' }, standalone: true, imports: [
1341
- FlexModule,
1342
- MatButtonModule,
1343
- AsyncPipe
1344
- ], template: "<div fxLayout=\"row\" fxLayoutGap=\"16px\">\n <button fxFlex=\"nogrow\" mat-stroked-button (click)=\"cancel()\" type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button fxFlex=\"nogrow\" mat-raised-button (click)=\"select()\" type=\"button\" [disabled]=\"hasNotSelected$ | async\">\n <ng-container i18n>Select</ng-container>\n </button>\n</div>\n" }]
1345
- }], ctorParameters: function () { return [{ type: SelectRowService }, { type: undefined, decorators: [{
1703
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowContentDirective, decorators: [{
1704
+ type: Directive,
1705
+ args: [{
1706
+ selector: '[rxapExpandRowContent]',
1707
+ standalone: true,
1708
+ }]
1709
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1346
1710
  type: Inject,
1347
- args: [RXAP_WINDOW_REF]
1711
+ args: [TemplateRef]
1348
1712
  }] }]; } });
1349
1713
 
1350
- class ImageCellComponent {
1714
+ class ExpandRowService {
1351
1715
  constructor() {
1352
- this.size = BackgroundSizeOptions.COVER;
1353
- this.repeat = BackgroundRepeatOptions.NO_REPEAT;
1354
- this.position = BackgroundPositionOptions.CENTER_CENTER;
1355
- this.value = null;
1716
+ this.expandedRow = new BehaviorSubject(null);
1717
+ }
1718
+ toggleRow(row) {
1719
+ if (this.expandedRow.value === row) {
1720
+ this.expandedRow.next(null);
1721
+ }
1722
+ else {
1723
+ this.expandedRow.next(row);
1724
+ }
1725
+ }
1726
+ isExpanded(row) {
1727
+ return this.expandedRow.value === row;
1356
1728
  }
1357
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ImageCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1358
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ImageCellComponent, isStandalone: true, selector: "td[rxap-image-cell]", inputs: { preset: "preset", size: "size", repeat: "repeat", position: "position", value: ["rxap-image-cell", "value"] }, host: { classAttribute: "rxap-image-cell" }, ngImport: i0, template: "<div\n *ngIf=\"value\"\n [ngClass]=\"[preset]\"\n [repeat]=\"repeat\"\n [size]=\"size\"\n [position]=\"position\"\n [rxapBackgroundImage]=\"value\"\n class=\"image\">\n</div>\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: BackgroundImageDirective, selector: "[rxapBackgroundImage]", inputs: ["rxapBackgroundImage", "placeholderImageUrl", "size", "repeat", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1729
+ isExpanded$(row) {
1730
+ return this.expandedRow.pipe(map((expandedRow) => expandedRow === row));
1731
+ }
1732
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1733
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowService }); }
1359
1734
  }
1360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ImageCellComponent, decorators: [{
1361
- type: Component,
1362
- args: [{ selector: 'td[rxap-image-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-image-cell' }, standalone: true, imports: [NgIf, NgClass, BackgroundImageDirective], template: "<div\n *ngIf=\"value\"\n [ngClass]=\"[preset]\"\n [repeat]=\"repeat\"\n [size]=\"size\"\n [position]=\"position\"\n [rxapBackgroundImage]=\"value\"\n class=\"image\">\n</div>\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"] }]
1363
- }], propDecorators: { preset: [{
1364
- type: Input
1365
- }], size: [{
1366
- type: Input
1367
- }], repeat: [{
1368
- type: Input
1369
- }], position: [{
1370
- type: Input
1371
- }], value: [{
1372
- type: Input,
1373
- args: ['rxap-image-cell']
1374
- }] } });
1735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowService, decorators: [{
1736
+ type: Injectable
1737
+ }] });
1375
1738
 
1376
- class CopyToClipboardCellComponent {
1377
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: CopyToClipboardCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1378
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: CopyToClipboardCellComponent, isStandalone: true, selector: "td[rxap-copy-to-clipboard-cell]", inputs: { value: ["rxap-copy-to-clipboard-cell", "value"] }, host: { classAttribute: "rxap-copy-to-clipboard-cell" }, ngImport: i0, template: "<rxap-copy-to-clipboard *ngIf=\"value !== null && value !== undefined && value !== ''\" [value]=\"value\" class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CopyToClipboardComponent, selector: "rxap-copy-to-clipboard", inputs: ["active", "disabled", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1739
+ class ExpandRowContainerComponent {
1740
+ constructor(viewContainerRef, expandCell) {
1741
+ this.viewContainerRef = viewContainerRef;
1742
+ this.expandCell = expandCell;
1743
+ this.portal = null;
1744
+ }
1745
+ ngOnDestroy() {
1746
+ this._subscription?.unsubscribe();
1747
+ }
1748
+ ngAfterContentInit() {
1749
+ if (this.expandCellContent) {
1750
+ this._subscription = this.expandCell.isExpanded$(this.element).pipe(filter(Boolean), tap(() => {
1751
+ if (!this.portal) {
1752
+ this.portal =
1753
+ new TemplatePortal(this.expandCellContent.template, this.viewContainerRef, { $implicit: this.element });
1754
+ }
1755
+ })).subscribe();
1756
+ }
1757
+ }
1758
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowContainerComponent, deps: [{ token: ViewContainerRef }, { token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component }); }
1759
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ExpandRowContainerComponent, isStandalone: true, selector: "td[rxap-expand-row]", inputs: { element: "element" }, queries: [{ propertyName: "expandCellContent", first: true, predicate: ExpandRowContentDirective, descendants: true }], ngImport: i0, template: "<div [@detailExpand]=\"(expandCell.isExpanded$(element) | async) ? 'expanded' : 'collapsed'\" class=\"element-detail\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [
1760
+ trigger('detailExpand', [
1761
+ state('collapsed', style({
1762
+ height: '0px',
1763
+ minHeight: '0',
1764
+ })),
1765
+ state('expanded', style({ height: '*' })),
1766
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
1767
+ ]),
1768
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1379
1769
  }
1380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: CopyToClipboardCellComponent, decorators: [{
1770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowContainerComponent, decorators: [{
1381
1771
  type: Component,
1382
- args: [{ selector: 'td[rxap-copy-to-clipboard-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-copy-to-clipboard-cell' }, standalone: true, imports: [NgIf, CopyToClipboardComponent], template: "<rxap-copy-to-clipboard *ngIf=\"value !== null && value !== undefined && value !== ''\" [value]=\"value\" class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
1383
- }], propDecorators: { value: [{
1772
+ args: [{ selector: 'td[rxap-expand-row]', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
1773
+ trigger('detailExpand', [
1774
+ state('collapsed', style({
1775
+ height: '0px',
1776
+ minHeight: '0',
1777
+ })),
1778
+ state('expanded', style({ height: '*' })),
1779
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
1780
+ ]),
1781
+ ], standalone: true, imports: [PortalModule, AsyncPipe], template: "<div [@detailExpand]=\"(expandCell.isExpanded$(element) | async) ? 'expanded' : 'collapsed'\" class=\"element-detail\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"] }]
1782
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef, decorators: [{
1783
+ type: Inject,
1784
+ args: [ViewContainerRef]
1785
+ }] }, { type: ExpandRowService, decorators: [{
1786
+ type: Inject,
1787
+ args: [ExpandRowService]
1788
+ }] }]; }, propDecorators: { element: [{
1384
1789
  type: Input,
1385
- args: ['rxap-copy-to-clipboard-cell']
1790
+ args: [{ required: true }]
1791
+ }], expandCellContent: [{
1792
+ type: ContentChild,
1793
+ args: [ExpandRowContentDirective]
1386
1794
  }] } });
1387
1795
 
1388
- class IconCellComponent {
1389
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: IconCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1390
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: IconCellComponent, isStandalone: true, selector: "td[rxap-icon-cell]", inputs: { icon: ["rxap-icon-cell", "icon"] }, host: { classAttribute: "rxap-icon-cell" }, ngImport: i0, template: "<mat-icon *ngIf=\"icon\" [rxapIcon]=\"icon\"></mat-icon>\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1796
+ class ExpandControlsCellComponent {
1797
+ constructor(expandCell) {
1798
+ this.expandCell = expandCell;
1799
+ }
1800
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandControlsCellComponent, deps: [{ token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component }); }
1801
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ExpandControlsCellComponent, isStandalone: true, selector: "td[rxap-expand-controls-cell]", inputs: { element: "element" }, ngImport: i0, template: "<button mat-icon-button>\n <mat-icon *ngIf=\"expandCell.isExpanded$(element) | async; else notExpanded\">expand_more</mat-icon>\n <ng-template #notExpanded>\n <mat-icon>keyboard_arrow_right</mat-icon>\n </ng-template>\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1391
1802
  }
1392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: IconCellComponent, decorators: [{
1803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandControlsCellComponent, decorators: [{
1393
1804
  type: Component,
1394
- args: [{ selector: 'td[rxap-icon-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-icon-cell' }, standalone: true, imports: [NgIf, MatIconModule, IconDirective], template: "<mat-icon *ngIf=\"icon\" [rxapIcon]=\"icon\"></mat-icon>\n<ng-content></ng-content>\n" }]
1395
- }], propDecorators: { icon: [{
1805
+ args: [{ selector: 'td[rxap-expand-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatButtonModule, NgIf, MatIconModule, AsyncPipe], template: "<button mat-icon-button>\n <mat-icon *ngIf=\"expandCell.isExpanded$(element) | async; else notExpanded\">expand_more</mat-icon>\n <ng-template #notExpanded>\n <mat-icon>keyboard_arrow_right</mat-icon>\n </ng-template>\n</button>\n" }]
1806
+ }], ctorParameters: function () { return [{ type: ExpandRowService, decorators: [{
1807
+ type: Inject,
1808
+ args: [ExpandRowService]
1809
+ }] }]; }, propDecorators: { element: [{
1396
1810
  type: Input,
1397
- args: ['rxap-icon-cell']
1811
+ args: [{ required: true }]
1398
1812
  }] } });
1399
1813
 
1400
- class DateCellComponent {
1401
- constructor() {
1402
- this.date = null;
1403
- this.format = 'dd.MM.yyyy HH:mm';
1814
+ class ExpandRowDirective {
1815
+ get isExpanded() {
1816
+ return this.expandCell.isExpanded(this.element);
1817
+ }
1818
+ constructor(expandCell) {
1819
+ this.expandCell = expandCell;
1820
+ }
1821
+ onClick() {
1822
+ this.expandCell.toggleRow(this.element);
1404
1823
  }
1405
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DateCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1406
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: DateCellComponent, isStandalone: true, selector: "td[rxap-date-cell]", inputs: { date: ["rxap-date-cell", "date"], format: "format" }, host: { classAttribute: "rxap-date-cell" }, ngImport: i0, template: "<ng-template [ngIf]=\"date\">\n {{date | date:format}}\n</ng-template>\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1824
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowDirective, deps: [{ token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Directive }); }
1825
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: ExpandRowDirective, isStandalone: true, selector: "tr[rxapExpandRow]", inputs: { element: "element" }, host: { listeners: { "expanded-row": "isExpanded()", "click": "onClick()" } }, ngImport: i0 }); }
1407
1826
  }
1408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DateCellComponent, decorators: [{
1409
- type: Component,
1410
- args: [{ selector: 'td[rxap-date-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-date-cell' }, standalone: true, imports: [NgIf, DatePipe], template: "<ng-template [ngIf]=\"date\">\n {{date | date:format}}\n</ng-template>\n<ng-content></ng-content>\n" }]
1411
- }], propDecorators: { date: [{
1827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowDirective, decorators: [{
1828
+ type: Directive,
1829
+ args: [{
1830
+ selector: 'tr[rxapExpandRow]',
1831
+ standalone: true,
1832
+ }]
1833
+ }], ctorParameters: function () { return [{ type: ExpandRowService, decorators: [{
1834
+ type: Inject,
1835
+ args: [ExpandRowService]
1836
+ }] }]; }, propDecorators: { isExpanded: [{
1837
+ type: HostListener,
1838
+ args: ['expanded-row']
1839
+ }], element: [{
1412
1840
  type: Input,
1413
- args: ['rxap-date-cell']
1414
- }], format: [{
1415
- type: Input
1841
+ args: [{ required: true }]
1842
+ }], onClick: [{
1843
+ type: HostListener,
1844
+ args: ['click']
1416
1845
  }] } });
1417
1846
 
1418
- class LinkCellComponent {
1419
- constructor() {
1420
- this.short = true;
1847
+ class ExpandRowModule {
1848
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1849
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowModule, imports: [ExpandRowDirective], exports: [ExpandRowDirective] }); }
1850
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowModule, providers: [
1851
+ ExpandRowService,
1852
+ ] }); }
1853
+ }
1854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ExpandRowModule, decorators: [{
1855
+ type: NgModule,
1856
+ args: [{
1857
+ imports: [ExpandRowDirective],
1858
+ exports: [
1859
+ ExpandRowDirective,
1860
+ ],
1861
+ providers: [
1862
+ ExpandRowService,
1863
+ ],
1864
+ }]
1865
+ }] });
1866
+
1867
+ class TreeControlCellComponent {
1868
+ ngOnInit() {
1869
+ this.offset = (this.element.__node.depth * 24) + 'px';
1870
+ this.updateIcon();
1421
1871
  }
1422
- get href() {
1423
- if (this.protocol) {
1424
- return [this.protocol, this.value].join(':');
1872
+ ngDoCheck() {
1873
+ this.updateIcon();
1874
+ }
1875
+ toggleExpand() {
1876
+ return this.element.__node.toggleExpand();
1877
+ }
1878
+ updateIcon() {
1879
+ this.icon = this.element.icon;
1880
+ if (this.element.__node.hasChildren) {
1881
+ if (this.element.__node.expanded) {
1882
+ this.expandIcon = 'expand_more';
1883
+ }
1884
+ else {
1885
+ this.expandIcon = 'expand_less';
1886
+ }
1887
+ }
1888
+ else {
1889
+ this.icon ??= { icon: 'subdirectory_arrow_right' };
1425
1890
  }
1426
- return this.value;
1427
1891
  }
1428
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LinkCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1429
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: LinkCellComponent, isStandalone: true, selector: "td[rxap-link-cell]", inputs: { value: ["rxap-link-cell", "value"], protocol: "protocol", short: "short" }, host: { classAttribute: "rxap-link-cell" }, ngImport: i0, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <span *ngIf=\"short\" i18n fxFlex=\"nogrow\" class=\"content\">Open</span>\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span *ngIf=\"!short\" fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1892
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeControlCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1893
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TreeControlCellComponent, isStandalone: true, selector: "rxap-tree-control-cell, td[rxap-tree-control-cell]", inputs: { element: ["rxap-tree-control-cell", "element"] }, ngImport: i0, template: "<div class=\"flex flex-row justify-start items-center\">\n <div [fxFlexOffset]=\"offset\">\n <button (click)=\"toggleExpand()\" mat-icon-button>\n <mat-icon>{{expandIcon}}</mat-icon>\n </button>\n </div>\n <div *ngIf=\"icon\">\n <mat-icon [rxapIcon]=\"icon\"></mat-icon>\n </div>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1430
1894
  }
1431
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LinkCellComponent, decorators: [{
1895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeControlCellComponent, decorators: [{
1432
1896
  type: Component,
1433
- args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-link-cell' }, standalone: true, imports: [NgIf, MatTooltipModule, FlexModule, NgSwitch, NgSwitchCase, MatIconModule, NgSwitchDefault], template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <span *ngIf=\"short\" i18n fxFlex=\"nogrow\" class=\"content\">Open</span>\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span *ngIf=\"!short\" fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
1434
- }], propDecorators: { value: [{
1897
+ args: [{ selector: 'rxap-tree-control-cell, td[rxap-tree-control-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
1898
+ FlexModule,
1899
+ MatButtonModule,
1900
+ MatIconModule,
1901
+ IconDirective,
1902
+ NgIf,
1903
+ ], template: "<div class=\"flex flex-row justify-start items-center\">\n <div [fxFlexOffset]=\"offset\">\n <button (click)=\"toggleExpand()\" mat-icon-button>\n <mat-icon>{{expandIcon}}</mat-icon>\n </button>\n </div>\n <div *ngIf=\"icon\">\n <mat-icon [rxapIcon]=\"icon\"></mat-icon>\n </div>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
1904
+ }], propDecorators: { element: [{
1435
1905
  type: Input,
1436
- args: ['rxap-link-cell']
1437
- }], protocol: [{
1438
- type: Input
1439
- }], short: [{
1440
- type: Input
1906
+ args: ['rxap-tree-control-cell']
1441
1907
  }] } });
1442
1908
 
1443
1909
  class OptionsCellComponent {
@@ -1483,12 +1949,12 @@ class OptionsCellComponent {
1483
1949
  ngOnDestroy() {
1484
1950
  this._subscription?.unsubscribe();
1485
1951
  }
1486
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OptionsCellComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
1487
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: OptionsCellComponent, isStandalone: true, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, host: { classAttribute: "rxap-options-cell" }, queries: [{ propertyName: "options", predicate: MatOption, descendants: true }], usesOnChanges: true, ngImport: i0, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1952
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OptionsCellComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
1953
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: OptionsCellComponent, isStandalone: true, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, queries: [{ propertyName: "options", predicate: MatOption, descendants: true }], usesOnChanges: true, ngImport: i0, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1488
1954
  }
1489
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OptionsCellComponent, decorators: [{
1955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OptionsCellComponent, decorators: [{
1490
1956
  type: Component,
1491
- args: [{ selector: 'td[rxap-options-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-options-cell' }, standalone: true, template: "{{viewValue}}\n<ng-content></ng-content>\n" }]
1957
+ args: [{ selector: 'td[rxap-options-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "{{viewValue}}\n<ng-content></ng-content>\n" }]
1492
1958
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { value: [{
1493
1959
  type: Input,
1494
1960
  args: ['rxap-options-cell']
@@ -1503,460 +1969,198 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
1503
1969
  args: [MatOption, { descendants: true }]
1504
1970
  }] } });
1505
1971
 
1506
- class BooleanCellComponent {
1972
+ class LinkCellComponent {
1507
1973
  constructor() {
1508
- this.value = null;
1509
- }
1510
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BooleanCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1511
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: BooleanCellComponent, isStandalone: true, selector: "td[rxap-boolean-cell]", inputs: { value: ["rxap-boolean-cell", "value"] }, host: { classAttribute: "rxap-boolean-cell" }, ngImport: i0, template: "<ng-template [ngIf]=\"value\" [ngIfElse]=\"isFalse\">\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n</ng-template>\n<ng-template #isFalse>\n <mat-icon class=\"falsy\">cancel</mat-icon>\n</ng-template>\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1512
- }
1513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BooleanCellComponent, decorators: [{
1514
- type: Component,
1515
- args: [{ selector: 'td[rxap-boolean-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-boolean-cell' }, standalone: true, imports: [NgIf, MatIconModule], template: "<ng-template [ngIf]=\"value\" [ngIfElse]=\"isFalse\">\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n</ng-template>\n<ng-template #isFalse>\n <mat-icon class=\"falsy\">cancel</mat-icon>\n</ng-template>\n<ng-content></ng-content>\n" }]
1516
- }], propDecorators: { value: [{
1517
- type: Input,
1518
- args: ['rxap-boolean-cell']
1519
- }] } });
1520
-
1521
- /**
1522
- * @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
1523
- */
1524
- const RXAP_TABLE_ACTION_METHOD_TYPE_METADATA = 'rxap-table-action-method-type-metadata';
1525
- const RXAP_TABLE_ACTION_METHOD_METADATA = 'rxap-table-action-method-metadata';
1526
- /**
1527
- * @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
1528
- */
1529
- const RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA = 'rxap-table-action-method-check-function-metadata';
1530
- function TableActionMethod(typeOrOptions, checkFunction) {
1531
- let type;
1532
- let options;
1533
- if (typeof typeOrOptions === 'string') {
1534
- type = typeOrOptions;
1535
- options = { type, checkFunction };
1536
- }
1537
- else {
1538
- options = typeOrOptions;
1539
- type = options.type;
1540
- checkFunction = options.checkFunction;
1541
- }
1542
- return function (target) {
1543
- setMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, options, target);
1544
- if (type) {
1545
- setMetadata(RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, type, target);
1546
- }
1547
- if (checkFunction) {
1548
- setMetadata(RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA, checkFunction, target);
1549
- }
1550
- };
1551
- }
1552
-
1553
- class TableRowActionExecutingDirective {
1554
- constructor(templateRef, vcr) {
1555
- this.templateRef = templateRef;
1556
- this.vcr = vcr;
1557
- }
1558
- show() {
1559
- this.vcr.createEmbeddedView(this.templateRef);
1560
- }
1561
- hide() {
1562
- this.vcr.clear();
1563
- }
1564
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableRowActionExecutingDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1565
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: TableRowActionExecutingDirective, isStandalone: true, selector: "[rxapTableRowActionExecuting]", ngImport: i0 }); }
1566
- }
1567
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableRowActionExecutingDirective, decorators: [{
1568
- type: Directive,
1569
- args: [{
1570
- selector: '[rxapTableRowActionExecuting]',
1571
- standalone: true
1572
- }]
1573
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
1574
-
1575
- var TableRowActionStatus;
1576
- (function (TableRowActionStatus) {
1577
- TableRowActionStatus["EXECUTING"] = "executing";
1578
- TableRowActionStatus["DONE"] = "done";
1579
- TableRowActionStatus["ERROR"] = "error";
1580
- TableRowActionStatus["SUCCESS"] = "success";
1581
- })(TableRowActionStatus || (TableRowActionStatus = {}));
1582
-
1583
- function IsTableRowActionTypeSwitchMethod(method) {
1584
- return getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.type === undefined;
1585
- }
1586
- function IsTableRowActionTypeMethod(type) {
1587
- return (method) => {
1588
- return (getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.type === type);
1589
- };
1590
- }
1591
- function HasTableRowActionCheckFunction(method) {
1592
- return getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.checkFunction !== undefined;
1593
- }
1594
- function GetTableRowActionCheckFunction(method) {
1595
- const checkFunction = getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.checkFunction;
1596
- if (!checkFunction) {
1597
- throw new Error(`Extracted check function from '${method.constructor.name}' is empty`);
1598
- }
1599
- return checkFunction;
1600
- }
1601
- function HasTableRowActionMetadata(method) {
1602
- return hasMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor);
1603
- }
1604
- function GetTableRowActionMetadata(method) {
1605
- const metadata = getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor);
1606
- if (!metadata) {
1607
- throw new Error(`Extracted metadata from '${method.constructor.name}' is empty`);
1608
- }
1609
- return metadata;
1610
- }
1611
-
1612
- const RXAP_TABLE_ROW_ACTION_METHOD = new InjectionToken('rxap-table-row-action-method');
1613
-
1614
- class TableRowActionDirective extends ConfirmDirective {
1615
- set hasConfirmDirective(value) {
1616
- this._hasConfirmDirective = coerceBoolean(value);
1617
- }
1618
- constructor(overlay, elementRef, actionMethodList, cdr, vcr, tableDataSourceDirective, snackBar, matButton, matTooltip) {
1619
- super(overlay, elementRef);
1620
- this.cdr = cdr;
1621
- this.vcr = vcr;
1622
- this.tableDataSourceDirective = tableDataSourceDirective;
1623
- this.snackBar = snackBar;
1624
- this.matButton = matButton;
1625
- this.matTooltip = matTooltip;
1626
- this._hasConfirmDirective = false;
1627
- this._currentStatus = TableRowActionStatus.DONE;
1628
- this._actionDisabled = false;
1629
- this.options = null;
1630
- this.actionMethodList = coerceArray(actionMethodList);
1631
- }
1632
- ngOnInit() {
1633
- this.options = this.getTableActionOptions();
1634
- if (this.options) {
1635
- this.refresh ??= this.options.refresh ?? false;
1636
- this.errorMessage ??= this.options.errorMessage ?? undefined;
1637
- this.successMessage ??= this.options.successMessage ?? undefined;
1638
- if (this.matTooltip && this.options.tooltip) {
1639
- this.matTooltip.message = this.options.tooltip;
1640
- }
1641
- }
1642
- }
1643
- onConfirmed() {
1644
- return this.execute();
1645
- }
1646
- onClick($event) {
1647
- $event.stopPropagation();
1648
- if (!this._hasConfirmDirective && !this.options?.confirm) {
1649
- return this.execute();
1650
- }
1651
- else if (this.options?.confirm) {
1652
- this.openConfirmOverly();
1653
- }
1654
- else {
1655
- if (isDevMode()) {
1656
- console.debug('skip remote method call. Wait for confirmation.');
1657
- }
1658
- }
1659
- return Promise.resolve();
1660
- }
1661
- async execute() {
1662
- if (this._actionDisabled) {
1663
- return Promise.resolve();
1664
- }
1665
- this.setStatus(TableRowActionStatus.EXECUTING);
1666
- try {
1667
- await Promise.all(this.getElementList().map((element) => {
1668
- return Promise.all([
1669
- Promise.all(this.findUntypedActionMethod().map((am) => am.call({ element, type: this.type }))),
1670
- Promise.all(this.findTypedActionMethod().map((am) => am.call(element)))
1671
- ]);
1672
- }));
1673
- this.setStatus(TableRowActionStatus.SUCCESS);
1674
- }
1675
- catch (e) {
1676
- console.error(`Failed to execute row action: ${e.message}`);
1677
- this.setStatus(TableRowActionStatus.ERROR);
1678
- }
1679
- }
1680
- getElementList() {
1681
- return [this.element];
1682
- }
1683
- /**
1684
- * find all method instance in the actionMethodList member that
1685
- * do not have a @TableActionMethod decorators
1686
- * @private
1687
- */
1688
- findUntypedActionMethod() {
1689
- return this.actionMethodList.filter(IsTableRowActionTypeSwitchMethod);
1690
- }
1691
- /**
1692
- * find all method instance in the actionMethodList member that
1693
- * do have a @TableActionMethod decorators with the current type
1694
- * @private
1695
- */
1696
- findTypedActionMethod() {
1697
- return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type));
1698
- }
1699
- /**
1700
- * Disables the action. If the button is pressed the action is NOT executed
1701
- *
1702
- * Hint: the button is set to disabled = true to prevent any conflict with
1703
- * extern button enable features linke : rxapHasEnablePermission
1704
- * @protected
1705
- */
1706
- setButtonDisabled() {
1707
- this._actionDisabled = true;
1708
- }
1709
- /**
1710
- * Enables the action. If the button is pressed the action is executed
1711
- *
1712
- * TODO : find a way to communicate the disabled state between the features
1713
- * Hint: the button is set to disabled = false to prevent any conflict with
1714
- * extern button enable features linke : rxapHasEnablePermission
1715
- * @protected
1716
- */
1717
- setButtonEnabled() {
1718
- this._actionDisabled = false;
1719
- }
1720
- setStatus(status) {
1721
- if (this._currentStatus === status) {
1722
- return;
1723
- }
1724
- this._currentStatus = status;
1725
- switch (status) {
1726
- case TableRowActionStatus.EXECUTING:
1727
- this.setButtonDisabled();
1728
- this.executingDirective?.show();
1729
- break;
1730
- case TableRowActionStatus.SUCCESS:
1731
- if (this.refresh) {
1732
- this.tableDataSourceDirective.refresh();
1733
- }
1734
- if (this.successMessage) {
1735
- this.snackBar.open(this.successMessage, 'ok', { duration: 2560 });
1736
- }
1737
- this.setStatus(TableRowActionStatus.DONE);
1738
- break;
1739
- case TableRowActionStatus.ERROR:
1740
- this.setStatus(TableRowActionStatus.DONE);
1741
- if (this.errorMessage) {
1742
- this.snackBar.open(this.errorMessage, 'ok', { duration: 5120 });
1743
- }
1744
- break;
1745
- case TableRowActionStatus.DONE:
1746
- this.setButtonEnabled();
1747
- this.executingDirective?.hide();
1748
- break;
1749
- }
1750
- this.cdr.detectChanges();
1974
+ this.short = true;
1751
1975
  }
1752
- getTableActionOptions() {
1753
- const metadataList = this.actionMethodList.map(actionMethod => GetTableRowActionMetadata(actionMethod));
1754
- if (metadataList.length === 0) {
1755
- return null;
1976
+ get href() {
1977
+ if (this.protocol) {
1978
+ return [this.protocol, this.value].join(':');
1756
1979
  }
1757
- return metadataList.filter(metadata => metadata.type === this.type).sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))[0];
1980
+ return this.value;
1758
1981
  }
1759
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableRowActionDirective, deps: [{ token: Overlay }, { token: ElementRef }, { token: RXAP_TABLE_ROW_ACTION_METHOD }, { token: ChangeDetectorRef }, { token: ViewContainerRef }, { token: TableDataSourceDirective }, { token: MatSnackBar }, { token: MatButton, optional: true }, { token: MatTooltip, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1760
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: TableRowActionDirective, isStandalone: true, selector: "button[rxapTableRowAction]", inputs: { hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"], element: "element", type: ["rxapTableRowAction", "type"], errorMessage: "errorMessage", successMessage: "successMessage", refresh: "refresh" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick($event)" } }, queries: [{ propertyName: "executingDirective", first: true, predicate: TableRowActionExecutingDirective, descendants: true }], usesInheritance: true, ngImport: i0 }); }
1982
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LinkCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1983
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: LinkCellComponent, isStandalone: true, selector: "td[rxap-link-cell]", inputs: { value: ["rxap-link-cell", "value"], protocol: "protocol", short: "short" }, ngImport: i0, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\">\n <span *ngIf=\"short\" class=\"content\" fxFlex=\"nogrow\" i18n>Open</span>\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span *ngIf=\"!short\" class=\"content\" fxFlex=\"nogrow\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1761
1984
  }
1762
- __decorate([
1763
- Required,
1764
- __metadata("design:type", Object)
1765
- ], TableRowActionDirective.prototype, "element", void 0);
1766
- __decorate([
1767
- Required,
1768
- __metadata("design:type", String)
1769
- ], TableRowActionDirective.prototype, "type", void 0);
1770
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableRowActionDirective, decorators: [{
1771
- type: Directive,
1772
- args: [{
1773
- selector: 'button[rxapTableRowAction]',
1774
- standalone: true
1775
- }]
1776
- }], ctorParameters: function () { return [{ type: i1$4.Overlay, decorators: [{
1777
- type: Inject,
1778
- args: [Overlay]
1779
- }] }, { type: i0.ElementRef, decorators: [{
1780
- type: Inject,
1781
- args: [ElementRef]
1782
- }] }, { type: undefined, decorators: [{
1783
- type: Inject,
1784
- args: [RXAP_TABLE_ROW_ACTION_METHOD]
1785
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
1786
- type: Inject,
1787
- args: [ChangeDetectorRef]
1788
- }] }, { type: i0.ViewContainerRef, decorators: [{
1789
- type: Inject,
1790
- args: [ViewContainerRef]
1791
- }] }, { type: TableDataSourceDirective, decorators: [{
1792
- type: Inject,
1793
- args: [TableDataSourceDirective]
1794
- }] }, { type: i3$3.MatSnackBar, decorators: [{
1795
- type: Inject,
1796
- args: [MatSnackBar]
1797
- }] }, { type: i3.MatButton, decorators: [{
1798
- type: Optional
1799
- }, {
1800
- type: Inject,
1801
- args: [MatButton]
1802
- }] }, { type: i4$1.MatTooltip, decorators: [{
1803
- type: Optional
1804
- }, {
1805
- type: Inject,
1806
- args: [MatTooltip]
1807
- }] }]; }, propDecorators: { hasConfirmDirective: [{
1985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LinkCellComponent, decorators: [{
1986
+ type: Component,
1987
+ args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, MatTooltipModule, FlexModule, NgSwitch, NgSwitchCase, MatIconModule, NgSwitchDefault], template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\">\n <span *ngIf=\"short\" class=\"content\" fxFlex=\"nogrow\" i18n>Open</span>\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span *ngIf=\"!short\" class=\"content\" fxFlex=\"nogrow\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
1988
+ }], propDecorators: { value: [{
1808
1989
  type: Input,
1809
- args: ['rxapConfirm']
1810
- }], element: [{
1990
+ args: ['rxap-link-cell']
1991
+ }], protocol: [{
1811
1992
  type: Input
1812
- }], type: [{
1813
- type: Input,
1814
- args: ['rxapTableRowAction']
1815
- }], errorMessage: [{
1993
+ }], short: [{
1816
1994
  type: Input
1817
- }], successMessage: [{
1995
+ }] } });
1996
+
1997
+ class ImageCellComponent {
1998
+ constructor() {
1999
+ this.size = BackgroundSizeOptions.COVER;
2000
+ this.repeat = BackgroundRepeatOptions.NO_REPEAT;
2001
+ this.position = BackgroundPositionOptions.CENTER_CENTER;
2002
+ this.value = null;
2003
+ }
2004
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ImageCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2005
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ImageCellComponent, isStandalone: true, selector: "td[rxap-image-cell]", inputs: { preset: "preset", size: "size", repeat: "repeat", position: "position", value: ["rxap-image-cell", "value"] }, ngImport: i0, template: "<div\n *ngIf=\"value\"\n [ngClass]=\"[preset]\"\n [position]=\"position\"\n [repeat]=\"repeat\"\n [rxapBackgroundImage]=\"value\"\n [size]=\"size\"\n class=\"image\">\n</div>\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: BackgroundImageDirective, selector: "[rxapBackgroundImage]", inputs: ["rxapBackgroundImage", "placeholderImageUrl", "size", "repeat", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2006
+ }
2007
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ImageCellComponent, decorators: [{
2008
+ type: Component,
2009
+ args: [{ selector: 'td[rxap-image-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, NgClass, BackgroundImageDirective], template: "<div\n *ngIf=\"value\"\n [ngClass]=\"[preset]\"\n [position]=\"position\"\n [repeat]=\"repeat\"\n [rxapBackgroundImage]=\"value\"\n [size]=\"size\"\n class=\"image\">\n</div>\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"] }]
2010
+ }], propDecorators: { preset: [{
1818
2011
  type: Input
1819
- }], refresh: [{
2012
+ }], size: [{
1820
2013
  type: Input
1821
- }], executingDirective: [{
1822
- type: ContentChild,
1823
- args: [TableRowActionExecutingDirective]
1824
- }], onConfirmed: [{
1825
- type: HostListener,
1826
- args: ['confirmed']
1827
- }], onClick: [{
1828
- type: HostListener,
1829
- args: ['click', ['$event']]
2014
+ }], repeat: [{
2015
+ type: Input
2016
+ }], position: [{
2017
+ type: Input
2018
+ }], value: [{
2019
+ type: Input,
2020
+ args: ['rxap-image-cell']
1830
2021
  }] } });
1831
2022
 
1832
- class TableRowHeaderActionDirective extends TableRowActionDirective {
1833
- constructor(overlay, elementRef, actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton, matTooltip, selectRowService) {
1834
- super(overlay, elementRef, actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton, matTooltip);
1835
- this.selectRowService = selectRowService;
1836
- }
1837
- ngOnDestroy() {
1838
- this._subscription?.unsubscribe();
1839
- }
1840
- ngOnInit() {
1841
- if (this.selectRowService) {
1842
- this._subscription = this.selectRowService.selectedRows$
1843
- .pipe(startWith(this.selectRowService.selectedRows), map((rows) => rows.length !== 0), tap((hasSelected) => {
1844
- if (hasSelected) {
1845
- this.setButtonEnabled();
1846
- }
1847
- else {
1848
- this.setButtonDisabled();
1849
- }
1850
- this.cdr.detectChanges();
1851
- }))
1852
- .subscribe();
1853
- }
1854
- else {
1855
- this.setButtonDisabled();
1856
- }
2023
+ class IconCellComponent {
2024
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: IconCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2025
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: IconCellComponent, isStandalone: true, selector: "td[rxap-icon-cell]", inputs: { icon: ["rxap-icon-cell", "icon"] }, ngImport: i0, template: "<mat-icon *ngIf=\"icon\" [rxapIcon]=\"icon\"></mat-icon>\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2026
+ }
2027
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: IconCellComponent, decorators: [{
2028
+ type: Component,
2029
+ args: [{ selector: 'td[rxap-icon-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, MatIconModule, IconDirective], template: "<mat-icon *ngIf=\"icon\" [rxapIcon]=\"icon\"></mat-icon>\n<ng-content></ng-content>\n" }]
2030
+ }], propDecorators: { icon: [{
2031
+ type: Input,
2032
+ args: ['rxap-icon-cell']
2033
+ }] } });
2034
+
2035
+ class DateCellComponent {
2036
+ constructor() {
2037
+ this.date = null;
2038
+ this.format = 'dd.MM.yyyy HH:mm';
1857
2039
  }
1858
- getElementList() {
1859
- return this.selectRowService?.selectedRows ?? [];
2040
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DateCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2041
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DateCellComponent, isStandalone: true, selector: "td[rxap-date-cell]", inputs: { date: ["rxap-date-cell", "date"], format: "format" }, ngImport: i0, template: "<ng-template [ngIf]=\"date\">\n {{date | date:format}}\n</ng-template>\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2042
+ }
2043
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DateCellComponent, decorators: [{
2044
+ type: Component,
2045
+ args: [{ selector: 'td[rxap-date-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, DatePipe], template: "<ng-template [ngIf]=\"date\">\n {{date | date:format}}\n</ng-template>\n<ng-content></ng-content>\n" }]
2046
+ }], propDecorators: { date: [{
2047
+ type: Input,
2048
+ args: ['rxap-date-cell']
2049
+ }], format: [{
2050
+ type: Input
2051
+ }] } });
2052
+
2053
+ class CopyToClipboardCellComponent {
2054
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CopyToClipboardCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2055
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: CopyToClipboardCellComponent, isStandalone: true, selector: "td[rxap-copy-to-clipboard-cell]", inputs: { value: ["rxap-copy-to-clipboard-cell", "value"] }, ngImport: i0, template: "<rxap-copy-to-clipboard *ngIf=\"value !== null && value !== undefined && value !== ''\" [value]=\"value\"\n class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CopyToClipboardComponent, selector: "rxap-copy-to-clipboard", inputs: ["active", "disabled", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2056
+ }
2057
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CopyToClipboardCellComponent, decorators: [{
2058
+ type: Component,
2059
+ args: [{ selector: 'td[rxap-copy-to-clipboard-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, CopyToClipboardComponent], template: "<rxap-copy-to-clipboard *ngIf=\"value !== null && value !== undefined && value !== ''\" [value]=\"value\"\n class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
2060
+ }], propDecorators: { value: [{
2061
+ type: Input,
2062
+ args: ['rxap-copy-to-clipboard-cell']
2063
+ }] } });
2064
+
2065
+ class BooleanCellComponent {
2066
+ constructor() {
2067
+ this.value = null;
1860
2068
  }
1861
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableRowHeaderActionDirective, deps: [{ token: Overlay }, { token: ElementRef }, { token: RXAP_TABLE_ROW_ACTION_METHOD }, { token: ChangeDetectorRef }, { token: ViewContainerRef }, { token: TableDataSourceDirective }, { token: MatSnackBar }, { token: MatButton, optional: true }, { token: MatTooltip, optional: true }, { token: SelectRowService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1862
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: TableRowHeaderActionDirective, isStandalone: true, selector: "button[rxapTableRowHeaderAction]", inputs: { type: ["rxapTableRowHeaderAction", "type"] }, usesInheritance: true, ngImport: i0 }); }
2069
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BooleanCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2070
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: BooleanCellComponent, isStandalone: true, selector: "td[rxap-boolean-cell]", inputs: { value: ["rxap-boolean-cell", "value"] }, host: { classAttribute: "rxap-boolean-cell" }, ngImport: i0, template: "<ng-template [ngIfElse]=\"isFalse\" [ngIf]=\"value\">\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n</ng-template>\n<ng-template #isFalse>\n <mat-icon class=\"falsy\">cancel</mat-icon>\n</ng-template>\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1863
2071
  }
1864
- __decorate([
1865
- Required,
1866
- __metadata("design:type", String)
1867
- ], TableRowHeaderActionDirective.prototype, "type", void 0);
1868
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TableRowHeaderActionDirective, decorators: [{
1869
- type: Directive,
1870
- args: [{
1871
- selector: 'button[rxapTableRowHeaderAction]',
1872
- standalone: true
1873
- }]
1874
- }], ctorParameters: function () { return [{ type: i1$4.Overlay, decorators: [{
1875
- type: Inject,
1876
- args: [Overlay]
1877
- }] }, { type: i0.ElementRef, decorators: [{
1878
- type: Inject,
1879
- args: [ElementRef]
1880
- }] }, { type: undefined, decorators: [{
1881
- type: Inject,
1882
- args: [RXAP_TABLE_ROW_ACTION_METHOD]
1883
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
1884
- type: Inject,
1885
- args: [ChangeDetectorRef]
1886
- }] }, { type: i0.ViewContainerRef, decorators: [{
1887
- type: Inject,
1888
- args: [ViewContainerRef]
1889
- }] }, { type: TableDataSourceDirective, decorators: [{
1890
- type: Inject,
1891
- args: [TableDataSourceDirective]
1892
- }] }, { type: i3$3.MatSnackBar, decorators: [{
1893
- type: Inject,
1894
- args: [MatSnackBar]
1895
- }] }, { type: i3.MatButton, decorators: [{
1896
- type: Optional
1897
- }, {
1898
- type: Inject,
1899
- args: [MatButton]
1900
- }] }, { type: i4$1.MatTooltip, decorators: [{
1901
- type: Optional
1902
- }, {
1903
- type: Inject,
1904
- args: [MatTooltip]
1905
- }] }, { type: SelectRowService, decorators: [{
1906
- type: Optional
1907
- }, {
1908
- type: Inject,
1909
- args: [SelectRowService]
1910
- }] }]; }, propDecorators: { type: [{
2072
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BooleanCellComponent, decorators: [{
2073
+ type: Component,
2074
+ args: [{ selector: 'td[rxap-boolean-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-boolean-cell' }, standalone: true, imports: [NgIf, MatIconModule], template: "<ng-template [ngIfElse]=\"isFalse\" [ngIf]=\"value\">\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n</ng-template>\n<ng-template #isFalse>\n <mat-icon class=\"falsy\">cancel</mat-icon>\n</ng-template>\n<ng-content></ng-content>\n" }]
2075
+ }], propDecorators: { value: [{
1911
2076
  type: Input,
1912
- args: ['rxapTableRowHeaderAction']
2077
+ args: ['rxap-boolean-cell']
1913
2078
  }] } });
1914
2079
 
1915
- class RowActionCheckPipe {
1916
- constructor(tableRowActionMethodList) {
1917
- this.actionMethodList = coerceArray(tableRowActionMethodList);
2080
+ class PersistentPaginatorDirective {
2081
+ constructor(matPaginator) {
2082
+ this.matPaginator = matPaginator;
1918
2083
  }
1919
- transform(value, type) {
1920
- if (!type) {
1921
- throw new Error(`The provided type is empty '${type}'`);
1922
- }
1923
- const actionMethodList = this.actionMethodList.filter(IsTableRowActionTypeMethod(type));
1924
- if (actionMethodList.length > 1) {
1925
- throw new Error(`Multiple (${actionMethodList.length}) action method with the same type '${type}' found`);
1926
- }
1927
- if (actionMethodList.length === 0) {
1928
- throw new Error(`Could not find a action method with the type '${type}'`);
2084
+ ngOnInit() {
2085
+ const config = this.restoreConfig();
2086
+ if (config) {
2087
+ this.matPaginator.pageSize = config.pageSize;
1929
2088
  }
1930
- const actionMethod = actionMethodList[0];
1931
- if (HasTableRowActionCheckFunction(actionMethod)) {
1932
- const checkFunction = GetTableRowActionCheckFunction(actionMethod);
1933
- const input = coerceArray(value);
1934
- return input.length !== 0 && input.every(checkFunction);
2089
+ this._subscription = this.matPaginator.page.pipe(tap(() => this.storeConfig())).subscribe();
2090
+ }
2091
+ ngOnDestroy() {
2092
+ this._subscription?.unsubscribe();
2093
+ }
2094
+ getKey() {
2095
+ return 'rxap_mat-paginator-persistent' + this.id;
2096
+ }
2097
+ storeConfig() {
2098
+ const pageSize = this.matPaginator.pageSize;
2099
+ localStorage.setItem(this.getKey(), JSON.stringify({ pageSize }));
2100
+ }
2101
+ restoreConfig() {
2102
+ const configStorage = localStorage.getItem(this.getKey());
2103
+ if (configStorage) {
2104
+ try {
2105
+ return JSON.parse(configStorage);
2106
+ }
2107
+ catch (e) {
2108
+ console.warn(`Could not parse mat paginator persistent config: ${e.message}`);
2109
+ }
1935
2110
  }
1936
- return true;
2111
+ return null;
1937
2112
  }
1938
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RowActionCheckPipe, deps: [{ token: RXAP_TABLE_ROW_ACTION_METHOD, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
1939
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: RowActionCheckPipe, isStandalone: true, name: "rxapRowActionCheck" }); }
2113
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PersistentPaginatorDirective, deps: [{ token: i1$5.MatPaginator }], target: i0.ɵɵFactoryTarget.Directive }); }
2114
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: PersistentPaginatorDirective, isStandalone: true, selector: "mat-paginator[rxapPersistent]", inputs: { id: "id" }, ngImport: i0 }); }
1940
2115
  }
1941
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RowActionCheckPipe, decorators: [{
1942
- type: Pipe,
2116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PersistentPaginatorDirective, decorators: [{
2117
+ type: Directive,
1943
2118
  args: [{
1944
- name: 'rxapRowActionCheck',
1945
- standalone: true
2119
+ selector: 'mat-paginator[rxapPersistent]',
2120
+ standalone: true,
1946
2121
  }]
1947
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1948
- type: Optional
1949
- }, {
1950
- type: Inject,
1951
- args: [RXAP_TABLE_ROW_ACTION_METHOD]
1952
- }] }]; } });
2122
+ }], ctorParameters: function () { return [{ type: i1$5.MatPaginator }]; }, propDecorators: { id: [{
2123
+ type: Input
2124
+ }] } });
1953
2125
 
1954
- // endregion
2126
+ const offset = '50';
2127
+ const RowAnimation = trigger('rowsAnimation', [
2128
+ transition('void => *', [
2129
+ style({
2130
+ height: '*',
2131
+ opacity: '0',
2132
+ transform: 'translateY(' + (-offset).toString() + 'px)',
2133
+ 'box-shadow': 'none',
2134
+ }),
2135
+ sequence([
2136
+ animate('.2s ease', style({
2137
+ height: '*',
2138
+ opacity: '.2',
2139
+ transform: 'translateX(0)',
2140
+ 'box-shadow': 'none',
2141
+ })),
2142
+ animate('.35s ease', style({
2143
+ height: '*',
2144
+ opacity: 1,
2145
+ transform: 'translateX(0)',
2146
+ })),
2147
+ ]),
2148
+ ]),
2149
+ transition('* => void', [
2150
+ style({
2151
+ height: '0',
2152
+ opacity: '0',
2153
+ 'box-shadow': 'none',
2154
+ }),
2155
+ ]),
2156
+ ]);
2157
+
2158
+ // region table-select-controls
1955
2159
  // endregion
1956
2160
 
1957
2161
  /**
1958
2162
  * Generated bundle index. Do not edit.
1959
2163
  */
1960
2164
 
1961
- export { BooleanCellComponent, CheckboxCellComponent, CheckboxHeaderCellComponent, CopyToClipboardCellComponent, DateCellComponent, ExpandControlsCellComponent, ExpandRowContainerComponent, ExpandRowContentDirective, ExpandRowDirective, ExpandRowModule, ExpandRowService, FilterHeaderRowDirective, GetTableRowActionCheckFunction, GetTableRowActionMetadata, HasTableRowActionCheckFunction, HasTableRowActionMetadata, IconCellComponent, ImageCellComponent, IsTableRowActionTypeMethod, IsTableRowActionTypeSwitchMethod, LinkCellComponent, OptionsCellComponent, PersistentPaginatorDirective, ROW_ARCHIVE_METHOD, ROW_DELETE_METHOD, ROW_EDIT_LOADER_METHOD, ROW_EDIT_METHOD, ROW_LINK_METHOD, ROW_RESTORE_METHOD, ROW_VIEW_METHOD, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA, RXAP_TABLE_ACTION_METHOD_METADATA, RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_TABLE_ROW_ACTION_METHOD, RowActionCheckPipe, RowAnimation, RowControlsCellComponent, RowControlsHeaderCellComponent, SelectRowService, SelectedRowsDirective, TABLE_CREATE_REMOTE_METHOD, TABLE_DATA_SOURCE, TABLE_REMOTE_METHOD, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, TableActionMethod, TableColumnMenuComponent, TableColumnOptionComponent, TableCreateButtonDirective, TableDataSourceDirective, TableFilterService, TableRowActionDirective, TableRowActionExecutingDirective, TableRowActionStatus, TableRowHeaderActionDirective, TableSelectControlsComponent, TableShowArchivedSlideComponent, ToFilterColumnNamesPipe };
2165
+ export { AbstractTableRowAction, BooleanCellComponent, CheckboxCellComponent, CheckboxHeaderCellComponent, CopyToClipboardCellComponent, DateCellComponent, ExpandControlsCellComponent, ExpandRowContainerComponent, ExpandRowContentDirective, ExpandRowDirective, ExpandRowModule, ExpandRowService, FilterHeaderRowDirective, GetTableHeaderButtonMetadata, GetTableRowActionCheckFunction, GetTableRowActionMetadata, HasTableRowActionCheckFunction, HasTableRowActionMetadata, IconCellComponent, ImageCellComponent, IsTableRowActionTypeMethod, IsTableRowActionTypeSwitchMethod, LinkCellComponent, OptionsCellComponent, PersistentPaginatorDirective, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA, RXAP_TABLE_ACTION_METHOD_METADATA, RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA, RXAP_TABLE_ROW_ACTION_METHOD, RowActionCheckPipe, RowAnimation, SelectRowModule, SelectRowService, SelectedRowsDirective, SelectionModel, TABLE_CREATE_REMOTE_METHOD, TABLE_DATA_SOURCE, TABLE_HEADER_BUTTON_METHOD, TABLE_REMOTE_METHOD, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, TableActionMethod, TableColumnMenuComponent, TableColumnMenuModule, TableColumnOptionComponent, TableCreateButtonDirective, TableDataSourceDirective, TableFilterModule, TableFilterService, TableHeaderButtonActionStatus, TableHeaderButtonDirective, TableHeaderButtonMethod, TableRowActionDirective, TableRowActionExecutingDirective, TableRowActionStatus, TableRowActionsModule, TableRowHeaderActionDirective, TableSelectControlsComponent, TableShowArchivedSlideComponent, ToFilterColumnNamesPipe, TreeControlCellComponent, getMultipleValuesInSingleSelectionError };
1962
2166
  //# sourceMappingURL=rxap-material-table-system.mjs.map