@rxap/data-grid 18.0.5-dev.1 → 18.0.6-dev.0

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.
@@ -27,10 +27,10 @@ class DataGridCellDefDirective {
27
27
  constructor(template) {
28
28
  this.template = template;
29
29
  }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
31
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: DataGridCellDefDirective, isStandalone: true, selector: "[rxapDataGridCellDef]", ngImport: i0 }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
31
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.0", type: DataGridCellDefDirective, isStandalone: true, selector: "[rxapDataGridCellDef]", ngImport: i0 }); }
32
32
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridCellDefDirective, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridCellDefDirective, decorators: [{
34
34
  type: Directive,
35
35
  args: [{
36
36
  selector: '[rxapDataGridCellDef]',
@@ -48,10 +48,10 @@ class DataGridEditCellDefDirective {
48
48
  constructor(template) {
49
49
  this.template = template;
50
50
  }
51
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridEditCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
52
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: DataGridEditCellDefDirective, isStandalone: true, selector: "[rxapDataGridEditCellDef]", ngImport: i0 }); }
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridEditCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
52
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.0", type: DataGridEditCellDefDirective, isStandalone: true, selector: "[rxapDataGridEditCellDef]", ngImport: i0 }); }
53
53
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridEditCellDefDirective, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridEditCellDefDirective, decorators: [{
55
55
  type: Directive,
56
56
  args: [{
57
57
  selector: '[rxapDataGridEditCellDef]',
@@ -69,10 +69,10 @@ class DataGridHeaderCellDefDirective {
69
69
  constructor(template) {
70
70
  this.template = template;
71
71
  }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridHeaderCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
73
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: DataGridHeaderCellDefDirective, isStandalone: true, selector: "[rxapDataGridHeaderCellDef]", ngImport: i0 }); }
72
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridHeaderCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
73
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.0", type: DataGridHeaderCellDefDirective, isStandalone: true, selector: "[rxapDataGridHeaderCellDef]", ngImport: i0 }); }
74
74
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridHeaderCellDefDirective, decorators: [{
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridHeaderCellDefDirective, decorators: [{
76
76
  type: Directive,
77
77
  args: [{
78
78
  selector: '[rxapDataGridHeaderCellDef]',
@@ -107,10 +107,10 @@ class DataGridRowDefDirective {
107
107
  get isSubHeader() {
108
108
  return !this.name;
109
109
  }
110
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridRowDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
111
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", 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 }); }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridRowDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
111
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.0", 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 }); }
112
112
  }
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridRowDefDirective, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridRowDefDirective, decorators: [{
114
114
  type: Directive,
115
115
  args: [{
116
116
  selector: '[rxapDataGridRowDef]',
@@ -141,10 +141,10 @@ class DataGridValuePipe {
141
141
  }
142
142
  return data.pipe(map(source => getFromObject(source, path)));
143
143
  }
144
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
145
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.6", ngImport: i0, type: DataGridValuePipe, isStandalone: true, name: "dataGridValue" }); }
144
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
145
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: DataGridValuePipe, isStandalone: true, name: "dataGridValue" }); }
146
146
  }
147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridValuePipe, decorators: [{
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridValuePipe, decorators: [{
148
148
  type: Pipe,
149
149
  args: [{
150
150
  name: 'dataGridValue',
@@ -159,10 +159,10 @@ class IsEmptyPipe {
159
159
  }
160
160
  return data.pipe(map(source => getFromObject(source, path)), map(value => value === null || value === undefined || value === ''));
161
161
  }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: IsEmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
163
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.6", ngImport: i0, type: IsEmptyPipe, isStandalone: true, name: "isEmpty" }); }
162
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: IsEmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
163
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: IsEmptyPipe, isStandalone: true, name: "isEmpty" }); }
164
164
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: IsEmptyPipe, decorators: [{
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: IsEmptyPipe, decorators: [{
166
166
  type: Pipe,
167
167
  args: [{
168
168
  name: 'isEmpty',
@@ -378,10 +378,10 @@ class DataGridComponent {
378
378
  retry() {
379
379
  this.refresh();
380
380
  }
381
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Router }, { token: i2.FormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
382
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.6", type: DataGridComponent, isStandalone: true, selector: "rxap-data-grid", inputs: { header: "header", dataSource: "dataSource", viewer: "viewer", data: "data", displayProperties: "displayProperties", hideEmptyProperties: "hideEmptyProperties", 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 (click)=\"retry()\" i18n mat-stroked-button type=\"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 class=\"py-2\" i18n>Label</th>\n <th class=\"py-2\" i18n>Value</th>\n </tr>\n </thead>\n <tbody>\n <ng-template [ngForOf]=\"rows$ | async\" let-first=\"first\" let-row ngFor>\n <ng-template\n [ngIf]=\"(!displayProperties || row.isSubHeader || (row.name && displayProperties.includes(row.name))) && (!hideEmptyProperties || false === (data$ | isEmpty: row.name | async))\">\n <!-- region horizontal view -->\n <ng-template [ngIfElse]=\"normal\" [ngIf]=\"row.flip\">\n <tr>\n <td class=\"py-2\" 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) && false,\n }\" class=\"pl-8 pr-4 w-full py-2\">\n <ng-template [ngIfThen]=\"editMode\" [ngIf]=\"row.editCell?.template && (isEditMode || isFormMode)\"></ng-template>\n <ng-template [ngIfThen]=\"viewMode\"\n [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 class=\"py-2\" 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.error?.message ?? 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=\"py-2 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] ", 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"] }, { kind: "pipe", type: IsEmptyPipe, name: "isEmpty" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Router }, { token: i2.FormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
382
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: DataGridComponent, isStandalone: true, selector: "rxap-data-grid", inputs: { header: "header", dataSource: "dataSource", viewer: "viewer", data: "data", displayProperties: "displayProperties", hideEmptyProperties: "hideEmptyProperties", 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 (click)=\"retry()\" i18n mat-stroked-button type=\"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 class=\"py-2\" i18n>Label</th>\n <th class=\"py-2\" i18n>Value</th>\n </tr>\n </thead>\n <tbody>\n <ng-template [ngForOf]=\"rows$ | async\" let-first=\"first\" let-row ngFor>\n <ng-template\n [ngIf]=\"(!displayProperties || row.isSubHeader || (row.name && displayProperties.includes(row.name))) && (!hideEmptyProperties || false === (data$ | isEmpty: row.name | async))\">\n <!-- region horizontal view -->\n <ng-template [ngIfElse]=\"normal\" [ngIf]=\"row.flip\">\n <tr>\n <td class=\"py-2\" 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) && false,\n }\" class=\"pl-8 pr-4 w-full py-2\">\n <ng-template [ngIfThen]=\"editMode\" [ngIf]=\"row.editCell?.template && (isEditMode || isFormMode)\"></ng-template>\n <ng-template [ngIfThen]=\"viewMode\"\n [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 class=\"py-2\" 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.error?.message ?? 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=\"py-2 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] ", 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"] }, { kind: "pipe", type: IsEmptyPipe, name: "isEmpty" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
383
383
  }
384
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridComponent, decorators: [{
384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridComponent, decorators: [{
385
385
  type: Component,
386
386
  args: [{ selector: 'rxap-data-grid', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
387
387
  AsyncPipe,
@@ -425,8 +425,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
425
425
  }] } });
426
426
 
427
427
  class DataGridModule {
428
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
429
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.6", ngImport: i0, type: DataGridModule, imports: [DataGridComponent,
428
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
429
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: DataGridModule, imports: [DataGridComponent,
430
430
  DataGridRowDefDirective,
431
431
  DataGridHeaderCellDefDirective,
432
432
  DataGridCellDefDirective,
@@ -435,9 +435,9 @@ class DataGridModule {
435
435
  DataGridHeaderCellDefDirective,
436
436
  DataGridCellDefDirective,
437
437
  DataGridEditCellDefDirective] }); }
438
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridModule, imports: [DataGridComponent] }); }
438
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridModule, imports: [DataGridComponent] }); }
439
439
  }
440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: DataGridModule, decorators: [{
440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DataGridModule, decorators: [{
441
441
  type: NgModule,
442
442
  args: [{
443
443
  imports: [
@@ -31,7 +31,7 @@ export declare class DataGridComponent<T extends Record<string, any>> implements
31
31
  rows: QueryList<DataGridRowDefDirective<T>>;
32
32
  editModeChange: EventEmitter<{
33
33
  mode: boolean;
34
- data?: T | undefined;
34
+ data?: T;
35
35
  done: () => void;
36
36
  }>;
37
37
  rows$: Observable<QueryList<DataGridRowDefDirective<T>>>;
@@ -45,7 +45,7 @@ export declare class DataGridComponent<T extends Record<string, any>> implements
45
45
  private _editMode$;
46
46
  private _mode$;
47
47
  private _routerEventSubscription;
48
- constructor(cdr: ChangeDetectorRef, router: Router, formDirective?: FormDirective<any> | undefined);
48
+ constructor(cdr: ChangeDetectorRef, router: Router, formDirective?: FormDirective | undefined);
49
49
  set mode(value: DataGridMode | string);
50
50
  get isFormModeOrHasAnyEditCells(): boolean;
51
51
  get isFormMode(): boolean;
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
- "version": "18.0.5-dev.1",
2
+ "version": "18.0.6-dev.0",
3
3
  "name": "@rxap/data-grid",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "dependencies": {
6
- "@nx/devkit": "19.4.2",
6
+ "@nx/devkit": "19.6.2",
7
7
  "tslib": "2.6.2"
8
8
  },
9
9
  "peerDependencies": {
10
- "@angular/common": "^18.0.6",
11
- "@angular/core": "^18.0.6",
12
- "@angular/material": "^18.0.6",
13
- "@angular/router": "^18.0.6",
14
- "@rxap/forms": "^18.1.0-dev.0",
15
- "@rxap/pattern": "^1.1.7-dev.1",
16
- "@rxap/pipes": "^18.0.5-dev.0",
17
- "@rxap/rxjs": "^1.1.8-dev.2",
18
- "@rxap/utilities": "^16.3.0-dev.2",
10
+ "@angular/common": "^18.2.0",
11
+ "@angular/core": "^18.2.0",
12
+ "@angular/material": "^18.2.0",
13
+ "@angular/router": "^18.2.0",
14
+ "@rxap/forms": "^18.1.0",
15
+ "@rxap/pattern": "^1.1.7",
16
+ "@rxap/pipes": "^18.0.5",
17
+ "@rxap/rxjs": "^1.1.9-dev.0",
18
+ "@rxap/utilities": "^16.3.1-dev.0",
19
19
  "rxjs": "^7.8.1"
20
20
  },
21
21
  "author": {
@@ -73,43 +73,43 @@
73
73
  },
74
74
  {
75
75
  "package": "@rxap/definition",
76
- "version": "18.0.5-dev.0"
76
+ "version": "18.0.5"
77
77
  },
78
78
  {
79
79
  "package": "@rxap/directives",
80
- "version": "18.0.5-dev.0"
80
+ "version": "18.0.5"
81
81
  },
82
82
  {
83
83
  "package": "@rxap/forms",
84
- "version": "18.1.0-dev.0"
84
+ "version": "18.1.0"
85
85
  },
86
86
  {
87
87
  "package": "@rxap/pattern",
88
- "version": "1.1.7-dev.1"
88
+ "version": "1.1.7"
89
89
  },
90
90
  {
91
91
  "package": "@rxap/pipes",
92
- "version": "18.0.5-dev.0"
92
+ "version": "18.0.5"
93
93
  },
94
94
  {
95
95
  "package": "@rxap/reflect-metadata",
96
- "version": "1.0.9-dev.2"
96
+ "version": "1.0.10-dev.0"
97
97
  },
98
98
  {
99
99
  "package": "@rxap/rxjs",
100
- "version": "1.1.8-dev.2"
100
+ "version": "1.1.9-dev.0"
101
101
  },
102
102
  {
103
103
  "package": "@rxap/services",
104
- "version": "18.0.5-dev.0"
104
+ "version": "18.0.5"
105
105
  },
106
106
  {
107
107
  "package": "@rxap/utilities",
108
- "version": "16.3.0-dev.2"
108
+ "version": "16.3.1-dev.0"
109
109
  },
110
110
  {
111
111
  "package": "@rxap/validator",
112
- "version": "3.0.7-dev.0"
112
+ "version": "3.0.7"
113
113
  }
114
114
  ]
115
115
  },
@@ -123,7 +123,7 @@
123
123
  "directory": "packages/angular/data-grid"
124
124
  },
125
125
  "sideEffects": false,
126
- "gitHead": "915dce5e90d6633f881f0bcaafbeb8e5395821d4",
126
+ "gitHead": "2da304d546ada9d6a46fc699fee56349dd070d9c",
127
127
  "module": "fesm2022/rxap-data-grid.mjs",
128
128
  "typings": "index.d.ts",
129
129
  "exports": {