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

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