@rxap/data-grid 16.0.0-dev.2 → 16.0.0-dev.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
4
  export * from './index';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnhhcC1kYXRhLWdyaWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2RhdGEtZ3JpZC9zcmMvcnhhcC1kYXRhLWdyaWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnhhcC1kYXRhLWdyaWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyL2RhdGEtZ3JpZC9zcmMvcnhhcC1kYXRhLWdyaWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
@@ -1,9 +1,24 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, Directive, Inject, Input, ContentChild, QueryList, Component, ChangeDetectionStrategy, ContentChildren } from '@angular/core';
3
- import { __decorate, __metadata } from 'tslib';
4
- import { Required } from '@rxap/utilities';
5
- import { GetFromObjectPipe } from '@rxap/pipes';
6
- import { NgIf, NgFor, NgTemplateOutlet } from '@angular/common';
2
+ import { TemplateRef, Directive, Inject, Input, ContentChild, Pipe, isDevMode, EventEmitter, Component, ChangeDetectionStrategy, Optional, ContentChildren, Output, NgModule } from '@angular/core';
3
+ import { getFromObject, clone } from '@rxap/utilities';
4
+ import { map, filter, tap, shareReplay, take } from 'rxjs/operators';
5
+ import { AsyncPipe, NgIf, NgFor, NgTemplateOutlet, NgClass } from '@angular/common';
6
+ import * as i3 from '@angular/material/button';
7
+ import { MatButtonModule } from '@angular/material/button';
8
+ import * as i5 from '@angular/material/divider';
9
+ import { MatDividerModule } from '@angular/material/divider';
10
+ import * as i6 from '@angular/material/form-field';
11
+ import { MatFormFieldModule } from '@angular/material/form-field';
12
+ import { MatIconModule } from '@angular/material/icon';
13
+ import * as i4 from '@angular/material/progress-spinner';
14
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
15
+ import * as i1 from '@angular/router';
16
+ import { ActivationEnd } from '@angular/router';
17
+ import * as i2 from '@rxap/forms';
18
+ import { RxapFormsModule } from '@rxap/forms';
19
+ import { GetFromObjectPipe, ReplacePipe, EscapeQuotationMarkPipe } from '@rxap/pipes';
20
+ import { ToggleSubject } from '@rxap/rxjs';
21
+ import { EMPTY, of, BehaviorSubject, merge, debounceTime, combineLatest } from 'rxjs';
7
22
 
8
23
  class DataGridCellDefDirective {
9
24
  static ngTemplateContextGuard(dir, ctx) {
@@ -12,14 +27,14 @@ class DataGridCellDefDirective {
12
27
  constructor(template) {
13
28
  this.template = template;
14
29
  }
15
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
16
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: DataGridCellDefDirective, isStandalone: true, selector: "[rxapDataGridCellDef]", ngImport: i0 }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
31
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DataGridCellDefDirective, isStandalone: true, selector: "[rxapDataGridCellDef]", ngImport: i0 }); }
17
32
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridCellDefDirective, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridCellDefDirective, decorators: [{
19
34
  type: Directive,
20
35
  args: [{
21
36
  selector: '[rxapDataGridCellDef]',
22
- standalone: true
37
+ standalone: true,
23
38
  }]
24
39
  }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
25
40
  type: Inject,
@@ -33,14 +48,14 @@ class DataGridHeaderCellDefDirective {
33
48
  constructor(template) {
34
49
  this.template = template;
35
50
  }
36
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridHeaderCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
37
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: DataGridHeaderCellDefDirective, isStandalone: true, selector: "[rxapDataGridHeaderCellDef]", ngImport: i0 }); }
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridHeaderCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
52
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DataGridHeaderCellDefDirective, isStandalone: true, selector: "[rxapDataGridHeaderCellDef]", ngImport: i0 }); }
38
53
  }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridHeaderCellDefDirective, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridHeaderCellDefDirective, decorators: [{
40
55
  type: Directive,
41
56
  args: [{
42
57
  selector: '[rxapDataGridHeaderCellDef]',
43
- standalone: true
58
+ standalone: true,
44
59
  }]
45
60
  }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
46
61
  type: Inject,
@@ -54,14 +69,14 @@ class DataGridEditCellDefDirective {
54
69
  constructor(template) {
55
70
  this.template = template;
56
71
  }
57
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridEditCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
58
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: DataGridEditCellDefDirective, isStandalone: true, selector: "[rxapDataGridEditCellDef]", ngImport: i0 }); }
72
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridEditCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
73
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DataGridEditCellDefDirective, isStandalone: true, selector: "[rxapDataGridEditCellDef]", ngImport: i0 }); }
59
74
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridEditCellDefDirective, decorators: [{
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridEditCellDefDirective, decorators: [{
61
76
  type: Directive,
62
77
  args: [{
63
78
  selector: '[rxapDataGridEditCellDef]',
64
- standalone: true
79
+ standalone: true,
65
80
  }]
66
81
  }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
67
82
  type: Inject,
@@ -71,26 +86,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
71
86
  class DataGridRowDefDirective {
72
87
  constructor() {
73
88
  this.data = null;
89
+ /**
90
+ * true - the header and content cell are "rotated" by 90°. The header is above the content cell and both have a
91
+ * colspan
92
+ *
93
+ * **flip: false**
94
+ * Label | Value
95
+ * --- | ---
96
+ * Header | Content
97
+ *
98
+ * **flip: true**
99
+ * Label | Value
100
+ * --- | ---
101
+ * Header (colspan 2)
102
+ * Content (colspan 2)
103
+ *
104
+ */
105
+ this.flip = false;
74
106
  }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridRowDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
76
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: DataGridRowDefDirective, isStandalone: true, selector: "[rxapDataGridRowDef]", inputs: { data: "data", name: ["rxapDataGridRowDef", "name"] }, queries: [{ propertyName: "cell", first: true, predicate: DataGridCellDefDirective, descendants: true }, { propertyName: "headerCell", first: true, predicate: DataGridHeaderCellDefDirective, descendants: true }, { propertyName: "editCell", first: true, predicate: DataGridEditCellDefDirective, descendants: true }], ngImport: i0 }); }
107
+ get isSubHeader() {
108
+ return !this.name;
109
+ }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridRowDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
111
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DataGridRowDefDirective, isStandalone: true, selector: "[rxapDataGridRowDef]", inputs: { data: "data", name: ["rxapDataGridRowDef", "name"], flip: "flip" }, queries: [{ propertyName: "cell", first: true, predicate: DataGridCellDefDirective, descendants: true }, { propertyName: "headerCell", first: true, predicate: DataGridHeaderCellDefDirective, descendants: true }, { propertyName: "editCell", first: true, predicate: DataGridEditCellDefDirective, descendants: true }], ngImport: i0 }); }
77
112
  }
78
- __decorate([
79
- Required,
80
- __metadata("design:type", String)
81
- ], DataGridRowDefDirective.prototype, "name", void 0);
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridRowDefDirective, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridRowDefDirective, decorators: [{
83
114
  type: Directive,
84
115
  args: [{
85
- // tslint:disable-next-line:directive-selector
86
116
  selector: '[rxapDataGridRowDef]',
87
- standalone: true
117
+ standalone: true,
88
118
  }]
89
119
  }], propDecorators: { data: [{
90
120
  type: Input
91
121
  }], name: [{
92
122
  type: Input,
93
123
  args: ['rxapDataGridRowDef']
124
+ }], flip: [{
125
+ type: Input
94
126
  }], cell: [{
95
127
  type: ContentChild,
96
128
  args: [DataGridCellDefDirective]
@@ -102,36 +134,288 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
102
134
  args: [DataGridEditCellDefDirective]
103
135
  }] } });
104
136
 
105
- class DataGridReadonlyComponent {
106
- constructor() {
107
- this.header = true;
137
+ class DataGridValuePipe {
138
+ transform(data, path) {
139
+ if (!path) {
140
+ throw new Error('FATAL: The path is required! Ensure the data grid row has a defined name property!');
141
+ }
142
+ return data.pipe(map(source => getFromObject(source, path)));
143
+ }
144
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
145
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DataGridValuePipe, isStandalone: true, name: "dataGridValue" }); }
146
+ }
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridValuePipe, decorators: [{
148
+ type: Pipe,
149
+ args: [{
150
+ name: 'dataGridValue',
151
+ standalone: true,
152
+ }]
153
+ }] });
154
+
155
+ var DataGridMode;
156
+ (function (DataGridMode) {
157
+ /**
158
+ * The view cell template is used to display the property value
159
+ */
160
+ DataGridMode["PLAIN"] = "plain";
161
+ /**
162
+ * The edit cell template is used to display the property value, but the form and all controls are marked as disabled
163
+ */
164
+ DataGridMode["FORM"] = "form";
165
+ })(DataGridMode || (DataGridMode = {}));
166
+ function IsDataGridMode(value) {
167
+ return [DataGridMode.PLAIN, DataGridMode.FORM].includes(value);
168
+ }
169
+ class DataGridComponent {
170
+ constructor(cdr, router, formDirective) {
171
+ this.cdr = cdr;
172
+ this.router = router;
173
+ this.formDirective = formDirective;
174
+ this.isDevMode = isDevMode();
175
+ this.header = false;
176
+ this.viewer = this;
177
+ this.displayProperties = null;
178
+ this.editModeChange = new EventEmitter();
179
+ this.rows$ = EMPTY;
180
+ this.hasError$ = of(false);
181
+ this.dataLoading$ = of(false);
182
+ this.loading$ = new ToggleSubject();
183
+ this._editMode$ = new BehaviorSubject(false);
184
+ this._mode$ = new BehaviorSubject(DataGridMode.PLAIN);
185
+ this._routerEventSubscription = null;
186
+ this.isEditMode$ = this._editMode$.asObservable();
187
+ this.mode$ = this._mode$.asObservable();
188
+ this.isFormMode$ = this.mode$.pipe(map(mode => mode === DataGridMode.FORM));
189
+ this.isPlainMode$ = this.mode$.pipe(map(mode => mode === DataGridMode.PLAIN));
190
+ }
191
+ set mode(value) {
192
+ if (IsDataGridMode(value)) {
193
+ this._mode$.next(value);
194
+ }
195
+ else {
196
+ throw new Error(`The data grid mode only support 'plain' and 'form' - given '${value}'`);
197
+ }
198
+ }
199
+ get isFormMode() {
200
+ return this._mode$.value === DataGridMode.FORM;
201
+ }
202
+ get hasAnyEditCells() {
203
+ return this.rows.some(row => !!row.editCell);
204
+ }
205
+ get isEditMode() {
206
+ return this._editMode$.value;
207
+ }
208
+ set editMode(value) {
209
+ this._editMode$.next(value);
210
+ }
211
+ /**
212
+ * @deprecated use the loading$ property instead
213
+ */
214
+ get loading() {
215
+ return this.loading$.value;
216
+ }
217
+ ngAfterContentInit() {
218
+ this.rows$ = merge(of(this.rows), this.rows.changes);
219
+ }
220
+ logCurrentFormState() {
221
+ console.log(clone(this.formDirective?.form.value));
108
222
  }
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridReadonlyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
110
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: DataGridReadonlyComponent, isStandalone: true, selector: "rxap-data-grid-readonly", inputs: { header: "header", data: "data" }, host: { classAttribute: "rxap-data-grid-readonly" }, queries: [{ propertyName: "rows", predicate: DataGridRowDefDirective }], ngImport: i0, template: "<table>\n <thead *ngIf=\"header\">\n <tr>\n <th>Label</th>\n <th>Wert</th>\n </tr>\n </thead>\n <tr *ngFor=\"let row of rows\">\n <ng-container\n *ngTemplateOutlet=\"\n row.headerCell ? row.headerCell.template : defaultHeaderCell;\n context: { $implicit: row.name }\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n row.cell ? row.cell.template : defaultCell;\n context: { $implicit: data | getFromObject: row.name, data: data }\n \"\n ></ng-container>\n </tr>\n</table>\n\n<ng-template #defaultCell let-value>\n <td>{{ value }}</td>\n</ng-template>\n<ng-template #defaultHeaderCell let-name>\n <th>{{ name }}</th>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: GetFromObjectPipe, name: "getFromObject" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
223
+ ngOnInit() {
224
+ // resets the edit mode if this component is used in a sibling router path
225
+ // if not reset the edit mode is president after the route changes
226
+ this._routerEventSubscription = this.router.events.pipe(filter(event => event instanceof ActivationEnd), tap(() => this.disableEditMode())).subscribe();
227
+ if (this.dataSource && this.data) {
228
+ throw new Error('You can not use both dataSource and data input');
229
+ }
230
+ let data$ = EMPTY;
231
+ if (this.dataSource) {
232
+ data$ = this.dataSource.connect(this.viewer);
233
+ }
234
+ if (this.data) {
235
+ data$ = of(this.data);
236
+ }
237
+ if (data$ === EMPTY && isDevMode()) {
238
+ console.warn('No data source or data input provided');
239
+ }
240
+ this.data$ = data$.pipe(debounceTime(100), tap(data => this.data = data), tap(data => {
241
+ if (this.formDirective) {
242
+ this.formDirective.form.patchValue(data, {
243
+ coerce: true,
244
+ strict: true,
245
+ });
246
+ if (this.isFormMode) {
247
+ this.formDirective.form.disable();
248
+ }
249
+ }
250
+ }), shareReplay(1));
251
+ if (this.dataSource) {
252
+ this.hasError$ = this.dataSource.hasError$ ?? this.hasError$;
253
+ this.dataLoading$ = this.dataSource.loading$ ?? this.dataLoading$;
254
+ }
255
+ if (this.formDirective && this.isFormMode) {
256
+ this.formDirective.form.disabledWhile(combineLatest([
257
+ this._editMode$,
258
+ this._mode$,
259
+ ]).pipe(map(([editMode, mode]) => !editMode && mode === 'form')), { onlySelf: false });
260
+ }
261
+ }
262
+ ngOnDestroy() {
263
+ this.dataSource?.disconnect(this.viewer);
264
+ this._routerEventSubscription?.unsubscribe();
265
+ }
266
+ enableEditMode() {
267
+ if (!this.formDirective) {
268
+ if (isDevMode()) {
269
+ console.warn('Can not enable edit mode without a form directive');
270
+ }
271
+ return;
272
+ }
273
+ this.editMode = true;
274
+ if (this.data) {
275
+ this.formDirective.form.patchValue(this.data, {
276
+ coerce: true,
277
+ strict: true,
278
+ });
279
+ }
280
+ }
281
+ disableEditMode() {
282
+ if (!this.formDirective) {
283
+ if (isDevMode()) {
284
+ console.warn('Can not enable edit mode without a form directive');
285
+ }
286
+ return;
287
+ }
288
+ this.editMode = false;
289
+ }
290
+ submit() {
291
+ if (!this.formDirective) {
292
+ if (isDevMode()) {
293
+ console.warn('Can not support without a form directive');
294
+ }
295
+ return;
296
+ }
297
+ this.loading$.enable();
298
+ this.formDirective.form.markAllAsDirty();
299
+ this.formDirective.form.markAllAsTouched();
300
+ this.formDirective.cdr.markForCheck();
301
+ this.formDirective.rxapSubmit.pipe(take(1), tap(() => {
302
+ this.disableEditMode();
303
+ })).subscribe();
304
+ this.formDirective.invalidSubmit.pipe(take(1), tap(() => {
305
+ this.loading$.disable();
306
+ })).subscribe();
307
+ this.formDirective.submitError$.pipe(filter(Boolean), // if the error is undefined we do not want to disable the loading
308
+ take(1), tap(() => {
309
+ this.loading$.disable();
310
+ })).subscribe();
311
+ this.formDirective.submitSuccessful$.pipe(take(1), tap(() => {
312
+ this.loading$.disable();
313
+ this.refresh();
314
+ })).subscribe();
315
+ this.formDirective.onSubmit(new Event('submit'));
316
+ }
317
+ reset() {
318
+ if (this.formDirective && this.data) {
319
+ this.formDirective.form.patchValue(this.data, {
320
+ coerce: true,
321
+ strict: true,
322
+ });
323
+ }
324
+ }
325
+ refresh() {
326
+ if (this.dataSource) {
327
+ this.dataSource.refresh();
328
+ }
329
+ else if (isDevMode()) {
330
+ console.warn('can not refresh the data. data source is not defined');
331
+ }
332
+ }
333
+ cancel() {
334
+ this.reset();
335
+ this.disableEditMode();
336
+ }
337
+ retry() {
338
+ this.refresh();
339
+ }
340
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Router }, { token: i2.FormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
341
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DataGridComponent, isStandalone: true, selector: "rxap-data-grid", inputs: { header: "header", dataSource: "dataSource", viewer: "viewer", data: "data", displayProperties: "displayProperties", mode: "mode" }, outputs: { editModeChange: "editModeChange" }, queries: [{ propertyName: "rows", predicate: DataGridRowDefDirective }], ngImport: i0, template: "<div *ngIf=\"(hasError$ | async)\" class=\"flex flex-col items-center justify-center gap-y-8\">\n <span i18n>Something has gone wrong!</span>\n <button type=\"button\" (click)=\"retry()\" i18n mat-stroked-button>Retry</button>\n</div>\n<div *ngIf=\"(dataLoading$ | async)\" class=\"flex flex-col items-center justify-center gap-y-8\">\n <mat-spinner></mat-spinner>\n</div>\n<!-- if the dataSource input is used. It is possible the the hasError$ or loading$ property is === EMPTY. this would\nresults in an null as output. If the === false check is used this can result into the behavior that the data grid is\nnever shown. -->\n<!-- eslint-disable-next-line @angular-eslint/template/no-negated-async -->\n<table *ngIf=\"!(hasError$ | async) && !(dataLoading$ | async)\" class=\"w-full table-auto\">\n <thead *ngIf=\"header\">\n <tr>\n <th i18n>Label</th>\n <th i18n>Value</th>\n </tr>\n </thead>\n <tbody>\n <ng-template [ngForOf]=\"rows$ | async\" let-first=\"first\" let-row ngFor>\n <ng-template [ngIf]=\"!displayProperties || row.isSubHeader || (row.name && displayProperties.includes(row.name))\">\n <!-- region horizontal view -->\n <ng-template [ngIfElse]=\"normal\" [ngIf]=\"row.flip\">\n <tr>\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name + '-header'\">\n <ng-container\n *ngTemplateOutlet=\"row.headerCell?.template ?? defaultHeaderCell; context: { $implicit: row.name }\"></ng-container>\n </tr>\n <tr [attr.data-name]=\"row.name + '-value'\">\n <ng-template [ngIfThen]=\"content\" [ngIf]=\"row.name\"></ng-template>\n </tr>\n <tr>\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n </ng-template>\n <!-- endregion -->\n <!-- region normal view -->\n <ng-template #normal>\n <tr *ngIf=\"!first && row.isSubHeader\">\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name\" [ngClass]=\"{ 'sub-header text-2xl': row.isSubHeader }\">\n <ng-container\n *ngTemplateOutlet=\"row.headerCell?.template ?? defaultHeaderCell; context: { $implicit: row.name }\"></ng-container>\n <ng-template [ngIfThen]=\"content\" [ngIf]=\"row.name\"></ng-template>\n </tr>\n </ng-template>\n <!-- endregion -->\n </ng-template>\n <ng-template #content>\n <td [attr.colspan]=\"row.flip ? 2 : 1\" [ngClass]=\"{\n 'h-20': row.editCell?.template && (isEditMode || isFormMode),\n }\" class=\"pl-8 pr-4 w-full\">\n <ng-template [ngIfThen]=\"editMode\" [ngIf]=\"row.editCell?.template && (isEditMode || isFormMode)\"></ng-template>\n <ng-template [ngIfThen]=\"viewMode\" [ngIf]=\"!row.editCell?.template || !isEditMode || !isFormMode\"></ng-template>\n </td>\n <ng-template #viewMode>\n <ng-container\n *ngTemplateOutlet=\"row.cell?.template ?? defaultCell;context: { $implicit: data$ | dataGridValue: row.name | async, data: data$ | async }\"></ng-container>\n </ng-template>\n <ng-template #editMode>\n <ng-container\n *ngTemplateOutlet=\"row.editCell?.template ?? row.cell?.template ?? defaultCell;context: { $implicit: data$ | dataGridValue: row.name | async, data: data$ | async }\"></ng-container>\n </ng-template>\n </ng-template>\n </ng-template>\n </tbody>\n <tfoot *ngIf=\"hasAnyEditCells\">\n <tr>\n <td colspan=\"2\">\n <ng-template [ngIfElse]=\"viewModeButton\" [ngIf]=\"isEditMode\">\n <div class=\"pt-8 flex flex-col gap-y-6\">\n <div class=\"flex flex-row gap-x-6 items-center justify-start\">\n <button (click)=\"submit()\" [disabled]=\"loading$ | async\" color=\"primary\" mat-raised-button type=\"button\">\n <span class=\"flex flex-row gap-x-6 items-center justify-center\">\n <span i18n>Save</span>\n <mat-spinner *ngIf=\"loading$ | async\" color=\"accent\" diameter=\"15\"></mat-spinner>\n </span>\n </button>\n <button (click)=\"reset()\" [disabled]=\"loading$ | async\" mat-stroked-button type=\"button\">\n <ng-container i18n>Reset</ng-container>\n </button>\n <button (click)=\"cancel()\" [disabled]=\"loading$ | async\" color=\"warn\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"logCurrentFormState()\" *ngIf=\"isDevMode\" mat-button type=\"button\">\n <ng-container i18n>Current Form State</ng-container>\n </button>\n </div>\n\n <ng-template rxapFormSubmitInvalid>\n <mat-error i18n>Ensure all formula fields are valid.</mat-error>\n </ng-template>\n\n <ng-template let-error rxapFormSubmitFailed>\n <mat-error>{{ error.message }}</mat-error>\n </ng-template>\n\n <ng-template rxapFormSubmitSuccessful>\n <span i18n>Submit successfully.</span>\n </ng-template>\n\n </div>\n </ng-template>\n <ng-template #viewModeButton>\n <div class=\"pt-8\">\n <button (click)=\"enableEditMode()\" color=\"primary\" mat-raised-button type=\"button\">\n <span class=\"flex flex-row gap-x-6 items-center justify-center\">\n <span i18n>Edit</span>\n <mat-spinner *ngIf=\"loading$ | async\" color=\"accent\" diameter=\"15\"></mat-spinner>\n </span>\n </button>\n </div>\n </ng-template>\n </td>\n </tr>\n </tfoot>\n</table>\n\n<ng-template #defaultCell let-value>\n <span>{{ value }}</span>\n</ng-template>\n<ng-template #defaultHeaderCell let-name>\n <th class=\"whitespace-nowrap\">{{ name }}</th>\n</ng-template>\n", styles: [":host ::ng-deep th{text-align:right;width:auto}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: RxapFormsModule }, { kind: "directive", type: i2.FormSubmitFailedDirective, selector: "[rxapFormSubmitFailed]" }, { kind: "directive", type: i2.FormSubmitSuccessfulDirective, selector: "[rxapFormSubmitSuccessful]" }, { kind: "directive", type: i2.FormSubmitInvalidDirective, selector: "[rxapFormSubmitInvalid]" }, { kind: "pipe", type: DataGridValuePipe, name: "dataGridValue" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
111
342
  }
112
- __decorate([
113
- Required,
114
- __metadata("design:type", Object)
115
- ], DataGridReadonlyComponent.prototype, "data", void 0);
116
- __decorate([
117
- Required,
118
- __metadata("design:type", QueryList)
119
- ], DataGridReadonlyComponent.prototype, "rows", void 0);
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: DataGridReadonlyComponent, decorators: [{
343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridComponent, decorators: [{
121
344
  type: Component,
122
- args: [{ selector: 'rxap-data-grid-readonly', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-data-grid-readonly' }, standalone: true, imports: [NgIf, NgFor, NgTemplateOutlet, GetFromObjectPipe], template: "<table>\n <thead *ngIf=\"header\">\n <tr>\n <th>Label</th>\n <th>Wert</th>\n </tr>\n </thead>\n <tr *ngFor=\"let row of rows\">\n <ng-container\n *ngTemplateOutlet=\"\n row.headerCell ? row.headerCell.template : defaultHeaderCell;\n context: { $implicit: row.name }\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n row.cell ? row.cell.template : defaultCell;\n context: { $implicit: data | getFromObject: row.name, data: data }\n \"\n ></ng-container>\n </tr>\n</table>\n\n<ng-template #defaultCell let-value>\n <td>{{ value }}</td>\n</ng-template>\n<ng-template #defaultHeaderCell let-name>\n <th>{{ name }}</th>\n</ng-template>\n" }]
123
- }], propDecorators: { header: [{
345
+ args: [{ selector: 'rxap-data-grid', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
346
+ AsyncPipe,
347
+ NgIf,
348
+ NgFor,
349
+ MatButtonModule,
350
+ MatIconModule,
351
+ GetFromObjectPipe,
352
+ ReplacePipe,
353
+ EscapeQuotationMarkPipe,
354
+ RxapFormsModule,
355
+ DataGridValuePipe,
356
+ MatProgressSpinnerModule,
357
+ MatDividerModule,
358
+ NgTemplateOutlet,
359
+ MatFormFieldModule,
360
+ NgClass,
361
+ ], template: "<div *ngIf=\"(hasError$ | async)\" class=\"flex flex-col items-center justify-center gap-y-8\">\n <span i18n>Something has gone wrong!</span>\n <button type=\"button\" (click)=\"retry()\" i18n mat-stroked-button>Retry</button>\n</div>\n<div *ngIf=\"(dataLoading$ | async)\" class=\"flex flex-col items-center justify-center gap-y-8\">\n <mat-spinner></mat-spinner>\n</div>\n<!-- if the dataSource input is used. It is possible the the hasError$ or loading$ property is === EMPTY. this would\nresults in an null as output. If the === false check is used this can result into the behavior that the data grid is\nnever shown. -->\n<!-- eslint-disable-next-line @angular-eslint/template/no-negated-async -->\n<table *ngIf=\"!(hasError$ | async) && !(dataLoading$ | async)\" class=\"w-full table-auto\">\n <thead *ngIf=\"header\">\n <tr>\n <th i18n>Label</th>\n <th i18n>Value</th>\n </tr>\n </thead>\n <tbody>\n <ng-template [ngForOf]=\"rows$ | async\" let-first=\"first\" let-row ngFor>\n <ng-template [ngIf]=\"!displayProperties || row.isSubHeader || (row.name && displayProperties.includes(row.name))\">\n <!-- region horizontal view -->\n <ng-template [ngIfElse]=\"normal\" [ngIf]=\"row.flip\">\n <tr>\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name + '-header'\">\n <ng-container\n *ngTemplateOutlet=\"row.headerCell?.template ?? defaultHeaderCell; context: { $implicit: row.name }\"></ng-container>\n </tr>\n <tr [attr.data-name]=\"row.name + '-value'\">\n <ng-template [ngIfThen]=\"content\" [ngIf]=\"row.name\"></ng-template>\n </tr>\n <tr>\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n </ng-template>\n <!-- endregion -->\n <!-- region normal view -->\n <ng-template #normal>\n <tr *ngIf=\"!first && row.isSubHeader\">\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name\" [ngClass]=\"{ 'sub-header text-2xl': row.isSubHeader }\">\n <ng-container\n *ngTemplateOutlet=\"row.headerCell?.template ?? defaultHeaderCell; context: { $implicit: row.name }\"></ng-container>\n <ng-template [ngIfThen]=\"content\" [ngIf]=\"row.name\"></ng-template>\n </tr>\n </ng-template>\n <!-- endregion -->\n </ng-template>\n <ng-template #content>\n <td [attr.colspan]=\"row.flip ? 2 : 1\" [ngClass]=\"{\n 'h-20': row.editCell?.template && (isEditMode || isFormMode),\n }\" class=\"pl-8 pr-4 w-full\">\n <ng-template [ngIfThen]=\"editMode\" [ngIf]=\"row.editCell?.template && (isEditMode || isFormMode)\"></ng-template>\n <ng-template [ngIfThen]=\"viewMode\" [ngIf]=\"!row.editCell?.template || !isEditMode || !isFormMode\"></ng-template>\n </td>\n <ng-template #viewMode>\n <ng-container\n *ngTemplateOutlet=\"row.cell?.template ?? defaultCell;context: { $implicit: data$ | dataGridValue: row.name | async, data: data$ | async }\"></ng-container>\n </ng-template>\n <ng-template #editMode>\n <ng-container\n *ngTemplateOutlet=\"row.editCell?.template ?? row.cell?.template ?? defaultCell;context: { $implicit: data$ | dataGridValue: row.name | async, data: data$ | async }\"></ng-container>\n </ng-template>\n </ng-template>\n </ng-template>\n </tbody>\n <tfoot *ngIf=\"hasAnyEditCells\">\n <tr>\n <td colspan=\"2\">\n <ng-template [ngIfElse]=\"viewModeButton\" [ngIf]=\"isEditMode\">\n <div class=\"pt-8 flex flex-col gap-y-6\">\n <div class=\"flex flex-row gap-x-6 items-center justify-start\">\n <button (click)=\"submit()\" [disabled]=\"loading$ | async\" color=\"primary\" mat-raised-button type=\"button\">\n <span class=\"flex flex-row gap-x-6 items-center justify-center\">\n <span i18n>Save</span>\n <mat-spinner *ngIf=\"loading$ | async\" color=\"accent\" diameter=\"15\"></mat-spinner>\n </span>\n </button>\n <button (click)=\"reset()\" [disabled]=\"loading$ | async\" mat-stroked-button type=\"button\">\n <ng-container i18n>Reset</ng-container>\n </button>\n <button (click)=\"cancel()\" [disabled]=\"loading$ | async\" color=\"warn\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"logCurrentFormState()\" *ngIf=\"isDevMode\" mat-button type=\"button\">\n <ng-container i18n>Current Form State</ng-container>\n </button>\n </div>\n\n <ng-template rxapFormSubmitInvalid>\n <mat-error i18n>Ensure all formula fields are valid.</mat-error>\n </ng-template>\n\n <ng-template let-error rxapFormSubmitFailed>\n <mat-error>{{ error.message }}</mat-error>\n </ng-template>\n\n <ng-template rxapFormSubmitSuccessful>\n <span i18n>Submit successfully.</span>\n </ng-template>\n\n </div>\n </ng-template>\n <ng-template #viewModeButton>\n <div class=\"pt-8\">\n <button (click)=\"enableEditMode()\" color=\"primary\" mat-raised-button type=\"button\">\n <span class=\"flex flex-row gap-x-6 items-center justify-center\">\n <span i18n>Edit</span>\n <mat-spinner *ngIf=\"loading$ | async\" color=\"accent\" diameter=\"15\"></mat-spinner>\n </span>\n </button>\n </div>\n </ng-template>\n </td>\n </tr>\n </tfoot>\n</table>\n\n<ng-template #defaultCell let-value>\n <span>{{ value }}</span>\n</ng-template>\n<ng-template #defaultHeaderCell let-name>\n <th class=\"whitespace-nowrap\">{{ name }}</th>\n</ng-template>\n", styles: [":host ::ng-deep th{text-align:right;width:auto}\n"] }]
362
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.Router }, { type: i2.FormDirective, decorators: [{
363
+ type: Optional
364
+ }] }]; }, propDecorators: { header: [{
365
+ type: Input
366
+ }], dataSource: [{
367
+ type: Input
368
+ }], viewer: [{
124
369
  type: Input
125
370
  }], data: [{
126
371
  type: Input
372
+ }], displayProperties: [{
373
+ type: Input
127
374
  }], rows: [{
128
375
  type: ContentChildren,
129
376
  args: [DataGridRowDefDirective]
377
+ }], editModeChange: [{
378
+ type: Output
379
+ }], mode: [{
380
+ type: Input
130
381
  }] } });
131
382
 
383
+ class DataGridModule {
384
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
385
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DataGridModule, imports: [DataGridComponent,
386
+ DataGridRowDefDirective,
387
+ DataGridHeaderCellDefDirective,
388
+ DataGridCellDefDirective,
389
+ DataGridEditCellDefDirective], exports: [DataGridComponent,
390
+ DataGridRowDefDirective,
391
+ DataGridHeaderCellDefDirective,
392
+ DataGridCellDefDirective,
393
+ DataGridEditCellDefDirective] }); }
394
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridModule, imports: [DataGridComponent] }); }
395
+ }
396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DataGridModule, decorators: [{
397
+ type: NgModule,
398
+ args: [{
399
+ imports: [
400
+ DataGridComponent,
401
+ DataGridRowDefDirective,
402
+ DataGridHeaderCellDefDirective,
403
+ DataGridCellDefDirective,
404
+ DataGridEditCellDefDirective,
405
+ ],
406
+ exports: [
407
+ DataGridComponent,
408
+ DataGridRowDefDirective,
409
+ DataGridHeaderCellDefDirective,
410
+ DataGridCellDefDirective,
411
+ DataGridEditCellDefDirective,
412
+ ],
413
+ }]
414
+ }] });
415
+
132
416
  /**
133
417
  * Generated bundle index. Do not edit.
134
418
  */
135
419
 
136
- export { DataGridCellDefDirective, DataGridEditCellDefDirective, DataGridHeaderCellDefDirective, DataGridReadonlyComponent, DataGridRowDefDirective };
420
+ export { DataGridCellDefDirective, DataGridComponent, DataGridEditCellDefDirective, DataGridHeaderCellDefDirective, DataGridMode, DataGridModule, DataGridRowDefDirective, DataGridValuePipe };
137
421
  //# sourceMappingURL=rxap-data-grid.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-data-grid.mjs","sources":["../../../../libs/data-grid/src/lib/data-grid-cell-def.directive.ts","../../../../libs/data-grid/src/lib/data-grid-header-cell-def.directive.ts","../../../../libs/data-grid/src/lib/data-grid-edit-cell-def.directive.ts","../../../../libs/data-grid/src/lib/data-grid-row-def.directive.ts","../../../../libs/data-grid/src/lib/readonly/data-grid-readonly.component.ts","../../../../libs/data-grid/src/lib/readonly/data-grid-readonly.component.html","../../../../libs/data-grid/src/rxap-data-grid.ts"],"sourcesContent":["import {\n Directive,\n TemplateRef,\n Inject\n} from '@angular/core';\n\nexport interface DataGridCellDefDirectiveContext<\n T extends Record<string, any> = Record<string, any>\n> {\n $implicit: T[keyof T];\n data: T;\n}\n\n@Directive({\n selector: '[rxapDataGridCellDef]',\n standalone: true\n})\nexport class DataGridCellDefDirective<T extends Record<string, any>> {\n public static ngTemplateContextGuard<T extends Record<string, any>>(\n dir: DataGridCellDefDirective<T>,\n ctx: any\n ): ctx is DataGridCellDefDirectiveContext<T> {\n return true;\n }\n\n $implicit!: T[keyof T];\n data!: T;\n\n constructor(\n @Inject(TemplateRef)\n public template: TemplateRef<DataGridCellDefDirectiveContext<T>>\n ) {}\n}\n","import {\n Directive,\n TemplateRef,\n Inject\n} from '@angular/core';\n\nexport interface DataGridHeaderCellDefDirectiveContext {\n $implicit: string;\n}\n\n@Directive({\n selector: '[rxapDataGridHeaderCellDef]',\n standalone: true\n})\nexport class DataGridHeaderCellDefDirective {\n public static ngTemplateContextGuard(\n dir: DataGridHeaderCellDefDirective,\n ctx: any\n ): ctx is DataGridHeaderCellDefDirectiveContext {\n return true;\n }\n\n constructor(\n @Inject(TemplateRef)\n public template: TemplateRef<DataGridHeaderCellDefDirectiveContext>\n ) {}\n}\n","import {\n Directive,\n Inject,\n TemplateRef\n} from '@angular/core';\nimport {\n FormDirective,\n RxapFormGroup\n} from '@rxap/forms';\n\nexport interface DataGridEditCellDefDirectiveContext<T extends Record<string, any> = Record<string, any>> {\n $implicit: RxapFormGroup<T>;\n formDirective: FormDirective<T>;\n}\n\n@Directive({\n selector: '[rxapDataGridEditCellDef]',\n standalone: true\n})\nexport class DataGridEditCellDefDirective<T extends Record<string, any>> {\n public static ngTemplateContextGuard<T extends Record<string, any>>(\n dir: DataGridEditCellDefDirective<T>,\n ctx: any\n ): ctx is DataGridEditCellDefDirectiveContext<T> {\n return true;\n }\n\n constructor(\n @Inject(TemplateRef)\n public template: TemplateRef<DataGridEditCellDefDirectiveContext<T>>\n ) {}\n}\n","import {\n Directive,\n Input,\n ContentChild\n} from '@angular/core';\nimport { DataGridCellDefDirective } from './data-grid-cell-def.directive';\nimport { DataGridHeaderCellDefDirective } from './data-grid-header-cell-def.directive';\nimport { Required } from '@rxap/utilities';\nimport { DataGridEditCellDefDirective } from './data-grid-edit-cell-def.directive';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[rxapDataGridRowDef]',\n standalone: true\n})\nexport class DataGridRowDefDirective<T extends Record<string, any>> {\n\n @Input()\n public data: any | null = null;\n\n @Input('rxapDataGridRowDef')\n @Required\n public name!: string;\n\n @ContentChild(DataGridCellDefDirective)\n public cell?: DataGridCellDefDirective<T>;\n\n @ContentChild(DataGridHeaderCellDefDirective)\n public headerCell?: DataGridHeaderCellDefDirective;\n\n @ContentChild(DataGridEditCellDefDirective)\n public editCell?: DataGridEditCellDefDirective<T>;\n\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n Input,\n ContentChildren,\n QueryList\n} from '@angular/core';\nimport { DataGridRowDefDirective } from '../data-grid-row-def.directive';\nimport { Required } from '@rxap/utilities';\nimport { GetFromObjectPipe } from '@rxap/pipes';\nimport {\n NgIf,\n NgFor,\n NgTemplateOutlet\n} from '@angular/common';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'rxap-data-grid-readonly',\n templateUrl: './data-grid-readonly.component.html',\n styleUrls: [ './data-grid-readonly.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-data-grid-readonly' },\n standalone: true,\n imports: [ NgIf, NgFor, NgTemplateOutlet, GetFromObjectPipe ]\n})\nexport class DataGridReadonlyComponent<T extends Record<string, any>> {\n\n @Input()\n public header: boolean = true;\n\n @Input()\n @Required\n public data!: object;\n\n @ContentChildren(DataGridRowDefDirective)\n @Required\n public rows!: QueryList<DataGridRowDefDirective<T>>;\n}\n","<table>\n <thead *ngIf=\"header\">\n <tr>\n <th>Label</th>\n <th>Wert</th>\n </tr>\n </thead>\n <tr *ngFor=\"let row of rows\">\n <ng-container\n *ngTemplateOutlet=\"\n row.headerCell ? row.headerCell.template : defaultHeaderCell;\n context: { $implicit: row.name }\n \"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n row.cell ? row.cell.template : defaultCell;\n context: { $implicit: data | getFromObject: row.name, data: data }\n \"\n ></ng-container>\n </tr>\n</table>\n\n<ng-template #defaultCell let-value>\n <td>{{ value }}</td>\n</ng-template>\n<ng-template #defaultHeaderCell let-name>\n <th>{{ name }}</th>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA,MAIa,wBAAwB,CAAA;AAC5B,IAAA,OAAO,sBAAsB,CAClC,GAAgC,EAChC,GAAQ,EAAA;AAER,QAAA,OAAO,IAAI,CAAC;KACb;AAKD,IAAA,WAAA,CAES,QAAyD,EAAA;QAAzD,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAiD;KAC9D;AAdO,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,kBAYzB,WAAW,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAZV,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAI,uBAAuB;AACnC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;0BAaI,MAAM;2BAAC,WAAW,CAAA;;;ACnBvB,MAIa,8BAA8B,CAAA;AAClC,IAAA,OAAO,sBAAs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AAA,IAAA,EAAE,KAAK,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;AAS5D,UAAA,CAAA;IADN,QAAQ;;AACY,CAAA,EAAA,yBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAId,UAAA,CAAA;IADN,QAAQ;8BACK,SAAS,CAAA;AAA6B,CAAA,EAAA,yBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;2FAXzC,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAVrC,SAAS;+BAES,yBAAyB,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,QAC9B,EAAE,KAAK,EAAE,yBAAyB,EAAE,cACpC,IAAI,EAAA,OAAA,EACJ,CAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,CAAE,EAAA,QAAA,EAAA,+tBAAA,EAAA,CAAA;8BAK9D,MAAM,EAAA,CAAA;sBADZ,KAAK;gBAKC,IAAI,EAAA,CAAA;sBAFV,KAAK;gBAMC,IAAI,EAAA,CAAA;sBAFV,eAAe;uBAAC,uBAAuB,CAAA;;;AEnC1C;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-data-grid.mjs","sources":["../../../../../packages/angular/data-grid/src/lib/data-grid-cell-def.directive.ts","../../../../../packages/angular/data-grid/src/lib/data-grid-header-cell-def.directive.ts","../../../../../packages/angular/data-grid/src/lib/data-grid-edit-cell-def.directive.ts","../../../../../packages/angular/data-grid/src/lib/data-grid-row-def.directive.ts","../../../../../packages/angular/data-grid/src/lib/data-grid-value.pipe.ts","../../../../../packages/angular/data-grid/src/lib/data-grid.component.ts","../../../../../packages/angular/data-grid/src/lib/data-grid.component.html","../../../../../packages/angular/data-grid/src/lib/data-grid.module.ts","../../../../../packages/angular/data-grid/src/rxap-data-grid.ts"],"sourcesContent":["import {\n Directive,\n Inject,\n TemplateRef,\n} from '@angular/core';\n\nexport interface DataGridCellDefDirectiveContext<T extends Record<string, any> = Record<string, any>> {\n $implicit: T[keyof T];\n data: T;\n}\n\n@Directive({\n selector: '[rxapDataGridCellDef]',\n standalone: true,\n})\nexport class DataGridCellDefDirective<T extends Record<string, any>> {\n public static ngTemplateContextGuard<T extends Record<string, any>>(\n dir: DataGridCellDefDirective<T>,\n ctx: any,\n ): ctx is DataGridCellDefDirectiveContext<T> {\n return true;\n }\n\n $implicit!: T[keyof T];\n data!: T;\n\n constructor(\n @Inject(TemplateRef)\n public template: TemplateRef<DataGridCellDefDirectiveContext<T>>,\n ) {\n }\n}\n","import {\n Directive,\n Inject,\n TemplateRef,\n} from '@angular/core';\n\nexport interface DataGridHeaderCellDefDirectiveContext {\n $implicit: string;\n}\n\n@Directive({\n selector: '[rxapDataGridHeaderCellDef]',\n standalone: true,\n})\nexport class DataGridHeaderCellDefDirective {\n public static ngTemplateContextGuard(\n dir: DataGridHeaderCellDefDirective,\n ctx: any,\n ): ctx is DataGridHeaderCellDefDirectiveContext {\n return true;\n }\n\n constructor(\n @Inject(TemplateRef)\n public template: TemplateRef<DataGridHeaderCellDefDirectiveContext>,\n ) {\n }\n}\n","import {\n Directive,\n Inject,\n TemplateRef,\n} from '@angular/core';\n\nexport interface DataGridEditCellDefDirectiveContext<T extends Record<string, any> = Record<string, any>> {\n $implicit: T[keyof T];\n data: T;\n}\n\n@Directive({\n selector: '[rxapDataGridEditCellDef]',\n standalone: true,\n})\nexport class DataGridEditCellDefDirective<T extends Record<string, any>> {\n public static ngTemplateContextGuard<T extends Record<string, any>>(\n dir: DataGridEditCellDefDirective<T>,\n ctx: any,\n ): ctx is DataGridEditCellDefDirectiveContext<T> {\n return true;\n }\n\n constructor(\n @Inject(TemplateRef)\n public template: TemplateRef<DataGridEditCellDefDirectiveContext<T>>,\n ) {\n }\n}\n","import {\n ContentChild,\n Directive,\n Input,\n} from '@angular/core';\nimport { DataGridCellDefDirective } from './data-grid-cell-def.directive';\nimport { DataGridHeaderCellDefDirective } from './data-grid-header-cell-def.directive';\nimport { DataGridEditCellDefDirective } from './data-grid-edit-cell-def.directive';\n\n@Directive({\n selector: '[rxapDataGridRowDef]',\n standalone: true,\n})\nexport class DataGridRowDefDirective<T extends Record<string, any>> {\n\n @Input()\n public data: any | null = null;\n\n @Input('rxapDataGridRowDef')\n public name?: string;\n\n /**\n * true - the header and content cell are \"rotated\" by 90°. The header is above the content cell and both have a\n * colspan\n *\n * **flip: false**\n * Label | Value\n * --- | ---\n * Header | Content\n *\n * **flip: true**\n * Label | Value\n * --- | ---\n * Header (colspan 2)\n * Content (colspan 2)\n *\n */\n @Input()\n public flip = false;\n\n @ContentChild(DataGridCellDefDirective)\n public cell?: DataGridCellDefDirective<T>;\n\n @ContentChild(DataGridHeaderCellDefDirective)\n public headerCell?: DataGridHeaderCellDefDirective;\n\n @ContentChild(DataGridEditCellDefDirective)\n public editCell?: DataGridEditCellDefDirective<T>;\n\n public get isSubHeader() {\n return !this.name;\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { getFromObject } from '@rxap/utilities';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Pipe({\n name: 'dataGridValue',\n standalone: true,\n})\nexport class DataGridValuePipe<T extends Record<string, unknown>> implements PipeTransform {\n\n public transform(data: Observable<T>, path?: string): Observable<unknown> {\n if (!path) {\n throw new Error('FATAL: The path is required! Ensure the data grid row has a defined name property!');\n }\n return data.pipe(\n map(source => getFromObject(source, path)),\n );\n }\n\n}\n","import {\n AsyncPipe,\n NgClass,\n NgFor,\n NgIf,\n NgTemplateOutlet,\n} from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n EventEmitter,\n Input,\n isDevMode,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport {\n ActivationEnd,\n Router,\n} from '@angular/router';\nimport {\n FormDirective,\n RxapFormsModule,\n} from '@rxap/forms';\nimport {\n DataSource,\n DataSourceViewer,\n} from '@rxap/pattern';\nimport {\n EscapeQuotationMarkPipe,\n GetFromObjectPipe,\n ReplacePipe,\n} from '@rxap/pipes';\nimport { ToggleSubject } from '@rxap/rxjs';\nimport { clone } from '@rxap/utilities';\nimport {\n BehaviorSubject,\n combineLatest,\n debounceTime,\n EMPTY,\n merge,\n Observable,\n of,\n Subscription,\n} from 'rxjs';\nimport {\n filter,\n map,\n shareReplay,\n take,\n tap,\n} from 'rxjs/operators';\nimport { DataGridRowDefDirective } from './data-grid-row-def.directive';\nimport { DataGridValuePipe } from './data-grid-value.pipe';\n\nexport enum DataGridMode {\n /**\n * The view cell template is used to display the property value\n */\n PLAIN = 'plain',\n /**\n * The edit cell template is used to display the property value, but the form and all controls are marked as disabled\n */\n FORM = 'form',\n}\n\nfunction IsDataGridMode(value: string): value is DataGridMode {\n return [ DataGridMode.PLAIN, DataGridMode.FORM ].includes(value as any);\n}\n\n@Component({\n selector: 'rxap-data-grid',\n templateUrl: './data-grid.component.html',\n styleUrls: [ './data-grid.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n AsyncPipe,\n NgIf,\n NgFor,\n MatButtonModule,\n MatIconModule,\n GetFromObjectPipe,\n ReplacePipe,\n EscapeQuotationMarkPipe,\n RxapFormsModule,\n DataGridValuePipe,\n MatProgressSpinnerModule,\n MatDividerModule,\n NgTemplateOutlet,\n MatFormFieldModule,\n NgClass,\n ],\n})\nexport class DataGridComponent<T extends Record<string, any>> implements OnInit, OnDestroy, AfterContentInit {\n\n public isDevMode = isDevMode();\n\n @Input()\n public header = false;\n\n @Input()\n public dataSource?: DataSource<T>;\n\n public data$!: Observable<T>;\n\n @Input()\n public viewer: DataSourceViewer = this;\n\n @Input()\n public data?: T;\n\n @Input()\n public displayProperties: string[] | null = null;\n\n @ContentChildren(DataGridRowDefDirective)\n public rows!: QueryList<DataGridRowDefDirective<T>>;\n @Output()\n public editModeChange = new EventEmitter<{ mode: boolean, data?: T, done: () => void }>();\n public rows$: Observable<QueryList<DataGridRowDefDirective<T>>> = EMPTY;\n public hasError$: Observable<boolean> = of(false);\n public dataLoading$: Observable<boolean> = of(false);\n public loading$ = new ToggleSubject();\n public readonly isEditMode$: Observable<boolean>;\n public readonly mode$: Observable<DataGridMode>;\n public readonly isFormMode$: Observable<boolean>;\n public readonly isPlainMode$: Observable<boolean>;\n private _editMode$ = new BehaviorSubject<boolean>(false);\n private _mode$ = new BehaviorSubject<DataGridMode>(DataGridMode.PLAIN);\n private _routerEventSubscription: Subscription | null = null;\n\n constructor(\n private readonly cdr: ChangeDetectorRef,\n private readonly router: Router,\n @Optional()\n private readonly formDirective?: FormDirective,\n ) {\n this.isEditMode$ = this._editMode$.asObservable();\n this.mode$ = this._mode$.asObservable();\n this.isFormMode$ = this.mode$.pipe(map(mode => mode === DataGridMode.FORM));\n this.isPlainMode$ = this.mode$.pipe(map(mode => mode === DataGridMode.PLAIN));\n }\n\n @Input()\n public set mode(value: DataGridMode | string) {\n if (IsDataGridMode(value)) {\n this._mode$.next(value);\n } else {\n throw new Error(`The data grid mode only support 'plain' and 'form' - given '${ value }'`);\n }\n }\n\n public get isFormMode() {\n return this._mode$.value === DataGridMode.FORM;\n }\n\n public get hasAnyEditCells() {\n return this.rows.some(row => !!row.editCell);\n }\n\n public get isEditMode() {\n return this._editMode$.value;\n }\n\n public set editMode(value: boolean) {\n this._editMode$.next(value);\n }\n\n /**\n * @deprecated use the loading$ property instead\n */\n public get loading() {\n return this.loading$.value;\n }\n\n public ngAfterContentInit() {\n this.rows$ = merge(\n of(this.rows),\n this.rows.changes,\n );\n }\n\n public logCurrentFormState() {\n console.log(clone(this.formDirective?.form.value));\n }\n\n public ngOnInit() {\n // resets the edit mode if this component is used in a sibling router path\n // if not reset the edit mode is president after the route changes\n this._routerEventSubscription = this.router.events.pipe(\n filter(event => event instanceof ActivationEnd),\n tap(() => this.disableEditMode()),\n ).subscribe();\n\n if (this.dataSource && this.data) {\n throw new Error('You can not use both dataSource and data input');\n }\n\n let data$: Observable<T> = EMPTY;\n\n if (this.dataSource) {\n data$ = this.dataSource.connect(this.viewer);\n }\n\n if (this.data) {\n data$ = of(this.data);\n }\n\n if (data$ === EMPTY && isDevMode()) {\n console.warn('No data source or data input provided');\n }\n\n this.data$ = data$.pipe(\n debounceTime(100),\n tap(data => this.data = data),\n tap(data => {\n if (this.formDirective) {\n this.formDirective.form.patchValue(data, {\n coerce: true,\n strict: true,\n });\n if (this.isFormMode) {\n this.formDirective.form.disable();\n }\n }\n }),\n shareReplay(1),\n );\n if (this.dataSource) {\n this.hasError$ = this.dataSource.hasError$ ?? this.hasError$;\n this.dataLoading$ = this.dataSource.loading$ ?? this.dataLoading$;\n }\n if (this.formDirective && this.isFormMode) {\n this.formDirective.form.disabledWhile(combineLatest([\n this._editMode$,\n this._mode$,\n ]).pipe(\n map(([ editMode, mode ]) => !editMode && mode === 'form'),\n ), { onlySelf: false });\n }\n }\n\n public ngOnDestroy() {\n this.dataSource?.disconnect(this.viewer);\n this._routerEventSubscription?.unsubscribe();\n }\n\n public enableEditMode() {\n if (!this.formDirective) {\n if (isDevMode()) {\n console.warn('Can not enable edit mode without a form directive');\n }\n return;\n }\n this.editMode = true;\n if (this.data) {\n this.formDirective.form.patchValue(this.data, {\n coerce: true,\n strict: true,\n });\n }\n }\n\n public disableEditMode() {\n if (!this.formDirective) {\n if (isDevMode()) {\n console.warn('Can not enable edit mode without a form directive');\n }\n return;\n }\n this.editMode = false;\n }\n\n public submit() {\n if (!this.formDirective) {\n if (isDevMode()) {\n console.warn('Can not support without a form directive');\n }\n return;\n }\n this.loading$.enable();\n this.formDirective.form.markAllAsDirty();\n this.formDirective.form.markAllAsTouched();\n this.formDirective.cdr.markForCheck();\n this.formDirective.rxapSubmit.pipe(\n take(1),\n tap(() => {\n this.disableEditMode();\n }),\n ).subscribe();\n this.formDirective.invalidSubmit.pipe(\n take(1),\n tap(() => {\n this.loading$.disable();\n }),\n ).subscribe();\n this.formDirective.submitError$.pipe(\n filter(Boolean), // if the error is undefined we do not want to disable the loading\n take(1),\n tap(() => {\n this.loading$.disable();\n }),\n ).subscribe();\n this.formDirective.submitSuccessful$.pipe(\n take(1),\n tap(() => {\n this.loading$.disable();\n this.refresh();\n }),\n ).subscribe();\n this.formDirective.onSubmit(new Event('submit'));\n }\n\n public reset() {\n if (this.formDirective && this.data) {\n this.formDirective.form.patchValue(this.data, {\n coerce: true,\n strict: true,\n });\n }\n }\n\n public refresh() {\n if (this.dataSource) {\n this.dataSource.refresh();\n } else if (isDevMode()) {\n console.warn('can not refresh the data. data source is not defined');\n }\n }\n\n public cancel() {\n this.reset();\n this.disableEditMode();\n }\n\n retry() {\n this.refresh();\n }\n}\n","<div *ngIf=\"(hasError$ | async)\" class=\"flex flex-col items-center justify-center gap-y-8\">\n <span i18n>Something has gone wrong!</span>\n <button type=\"button\" (click)=\"retry()\" i18n mat-stroked-button>Retry</button>\n</div>\n<div *ngIf=\"(dataLoading$ | async)\" class=\"flex flex-col items-center justify-center gap-y-8\">\n <mat-spinner></mat-spinner>\n</div>\n<!-- if the dataSource input is used. It is possible the the hasError$ or loading$ property is === EMPTY. this would\nresults in an null as output. If the === false check is used this can result into the behavior that the data grid is\nnever shown. -->\n<!-- eslint-disable-next-line @angular-eslint/template/no-negated-async -->\n<table *ngIf=\"!(hasError$ | async) && !(dataLoading$ | async)\" class=\"w-full table-auto\">\n <thead *ngIf=\"header\">\n <tr>\n <th i18n>Label</th>\n <th i18n>Value</th>\n </tr>\n </thead>\n <tbody>\n <ng-template [ngForOf]=\"rows$ | async\" let-first=\"first\" let-row ngFor>\n <ng-template [ngIf]=\"!displayProperties || row.isSubHeader || (row.name && displayProperties.includes(row.name))\">\n <!-- region horizontal view -->\n <ng-template [ngIfElse]=\"normal\" [ngIf]=\"row.flip\">\n <tr>\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name + '-header'\">\n <ng-container\n *ngTemplateOutlet=\"row.headerCell?.template ?? defaultHeaderCell; context: { $implicit: row.name }\"></ng-container>\n </tr>\n <tr [attr.data-name]=\"row.name + '-value'\">\n <ng-template [ngIfThen]=\"content\" [ngIf]=\"row.name\"></ng-template>\n </tr>\n <tr>\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n </ng-template>\n <!-- endregion -->\n <!-- region normal view -->\n <ng-template #normal>\n <tr *ngIf=\"!first && row.isSubHeader\">\n <td class=\"py-4\" colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name\" [ngClass]=\"{ 'sub-header text-2xl': row.isSubHeader }\">\n <ng-container\n *ngTemplateOutlet=\"row.headerCell?.template ?? defaultHeaderCell; context: { $implicit: row.name }\"></ng-container>\n <ng-template [ngIfThen]=\"content\" [ngIf]=\"row.name\"></ng-template>\n </tr>\n </ng-template>\n <!-- endregion -->\n </ng-template>\n <ng-template #content>\n <td [attr.colspan]=\"row.flip ? 2 : 1\" [ngClass]=\"{\n 'h-20': row.editCell?.template && (isEditMode || isFormMode),\n }\" class=\"pl-8 pr-4 w-full\">\n <ng-template [ngIfThen]=\"editMode\" [ngIf]=\"row.editCell?.template && (isEditMode || isFormMode)\"></ng-template>\n <ng-template [ngIfThen]=\"viewMode\" [ngIf]=\"!row.editCell?.template || !isEditMode || !isFormMode\"></ng-template>\n </td>\n <ng-template #viewMode>\n <ng-container\n *ngTemplateOutlet=\"row.cell?.template ?? defaultCell;context: { $implicit: data$ | dataGridValue: row.name | async, data: data$ | async }\"></ng-container>\n </ng-template>\n <ng-template #editMode>\n <ng-container\n *ngTemplateOutlet=\"row.editCell?.template ?? row.cell?.template ?? defaultCell;context: { $implicit: data$ | dataGridValue: row.name | async, data: data$ | async }\"></ng-container>\n </ng-template>\n </ng-template>\n </ng-template>\n </tbody>\n <tfoot *ngIf=\"hasAnyEditCells\">\n <tr>\n <td colspan=\"2\">\n <ng-template [ngIfElse]=\"viewModeButton\" [ngIf]=\"isEditMode\">\n <div class=\"pt-8 flex flex-col gap-y-6\">\n <div class=\"flex flex-row gap-x-6 items-center justify-start\">\n <button (click)=\"submit()\" [disabled]=\"loading$ | async\" color=\"primary\" mat-raised-button type=\"button\">\n <span class=\"flex flex-row gap-x-6 items-center justify-center\">\n <span i18n>Save</span>\n <mat-spinner *ngIf=\"loading$ | async\" color=\"accent\" diameter=\"15\"></mat-spinner>\n </span>\n </button>\n <button (click)=\"reset()\" [disabled]=\"loading$ | async\" mat-stroked-button type=\"button\">\n <ng-container i18n>Reset</ng-container>\n </button>\n <button (click)=\"cancel()\" [disabled]=\"loading$ | async\" color=\"warn\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"logCurrentFormState()\" *ngIf=\"isDevMode\" mat-button type=\"button\">\n <ng-container i18n>Current Form State</ng-container>\n </button>\n </div>\n\n <ng-template rxapFormSubmitInvalid>\n <mat-error i18n>Ensure all formula fields are valid.</mat-error>\n </ng-template>\n\n <ng-template let-error rxapFormSubmitFailed>\n <mat-error>{{ error.message }}</mat-error>\n </ng-template>\n\n <ng-template rxapFormSubmitSuccessful>\n <span i18n>Submit successfully.</span>\n </ng-template>\n\n </div>\n </ng-template>\n <ng-template #viewModeButton>\n <div class=\"pt-8\">\n <button (click)=\"enableEditMode()\" color=\"primary\" mat-raised-button type=\"button\">\n <span class=\"flex flex-row gap-x-6 items-center justify-center\">\n <span i18n>Edit</span>\n <mat-spinner *ngIf=\"loading$ | async\" color=\"accent\" diameter=\"15\"></mat-spinner>\n </span>\n </button>\n </div>\n </ng-template>\n </td>\n </tr>\n </tfoot>\n</table>\n\n<ng-template #defaultCell let-value>\n <span>{{ value }}</span>\n</ng-template>\n<ng-template #defaultHeaderCell let-name>\n <th class=\"whitespace-nowrap\">{{ name }}</th>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { DataGridCellDefDirective } from './data-grid-cell-def.directive';\nimport { DataGridEditCellDefDirective } from './data-grid-edit-cell-def.directive';\nimport { DataGridComponent } from './data-grid.component';\nimport { DataGridHeaderCellDefDirective } from './data-grid-header-cell-def.directive';\nimport { DataGridRowDefDirective } from './data-grid-row-def.directive';\n\n@NgModule({\n imports: [\n DataGridComponent,\n DataGridRowDefDirective,\n DataGridHeaderCellDefDirective,\n DataGridCellDefDirective,\n DataGridEditCellDefDirective,\n ],\n exports: [\n DataGridComponent,\n DataGridRowDefDirective,\n DataGridHeaderCellDefDirective,\n DataGridCellDefDirective,\n DataGridEditCellDefDirective,\n ],\n})\nexport class DataGridModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAea,wBAAwB,CAAA;AAC5B,IAAA,OAAO,sBAAsB,CAClC,GAAgC,EAChC,GAAQ,EAAA;AAER,QAAA,OAAO,IAAI,CAAC;KACb;AAKD,IAAA,WAAA,CAES,QAAyD,EAAA;QAAzD,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAiD;KAEjE;AAfU,IAAA,SAAA,IAAA,CAAA,IAAA,GA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AA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAdvB,iBAAiB;YACjB,uBAAuB;YACvB,8BAA8B;YAC9B,wBAAwB;AACxB,YAAA,4BAA4B,aAG5B,iBAAiB;YACjB,uBAAuB;YACvB,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B,CAAA,EAAA,CAAA,CAAA,EAAA;AAGnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAdvB,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAcR,cAAc,EAAA,UAAA,EAAA,CAAA;kBAhB1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,uBAAuB;wBACvB,8BAA8B;wBAC9B,wBAAwB;wBACxB,4BAA4B;AAC7B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,uBAAuB;wBACvB,8BAA8B;wBAC9B,wBAAwB;wBACxB,4BAA4B;AAC7B,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -2,4 +2,6 @@ export * from './lib/data-grid-cell-def.directive';
2
2
  export * from './lib/data-grid-header-cell-def.directive';
3
3
  export * from './lib/data-grid-edit-cell-def.directive';
4
4
  export * from './lib/data-grid-row-def.directive';
5
- export * from './lib/readonly/data-grid-readonly.component';
5
+ export * from './lib/data-grid-value.pipe';
6
+ export * from './lib/data-grid.component';
7
+ export * from './lib/data-grid.module';