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