@rxap/material-table-system 16.0.0-dev.13 → 16.0.0-dev.15

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