@rxap/data-grid 16.0.0-dev.11 → 16.0.0-dev.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/esm2022/lib/data-grid-cell-def.directive.mjs +3 -3
- package/esm2022/lib/data-grid-edit-cell-def.directive.mjs +3 -3
- package/esm2022/lib/data-grid-header-cell-def.directive.mjs +3 -3
- package/esm2022/lib/data-grid-row-def.directive.mjs +3 -3
- package/esm2022/lib/data-grid-value.pipe.mjs +3 -3
- package/esm2022/lib/data-grid.component.mjs +3 -3
- package/esm2022/lib/data-grid.module.mjs +4 -4
- package/fesm2022/rxap-data-grid.mjs +22 -22
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [16.0.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/data-grid@16.0.0-dev.11...@rxap/data-grid@16.0.0-dev.12) (2023-09-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/data-grid
|
|
9
|
+
|
|
6
10
|
# [16.0.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/data-grid@16.0.0-dev.10...@rxap/data-grid@16.0.0-dev.11) (2023-09-03)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @rxap/data-grid
|
package/README.md
CHANGED
|
@@ -17,5 +17,5 @@ yarn add @rxap/data-grid
|
|
|
17
17
|
```
|
|
18
18
|
**Install peer dependencies:**
|
|
19
19
|
```bash
|
|
20
|
-
yarn add @angular/common@^16.1.4 @angular/core@^16.1.4 @angular/material@^16.1.4 @angular/router@^16.1.4 @rxap/data-source@^16.0.0-dev.
|
|
20
|
+
yarn add @angular/common@^16.1.4 @angular/core@^16.1.4 @angular/material@^16.1.4 @angular/router@^16.1.4 @rxap/data-source@^16.0.0-dev.13 @rxap/forms@^16.0.0-dev.13 @rxap/pipes@^16.0.0-dev.11 @rxap/rxjs@^1.0.1-dev.7 @rxap/utilities@^16.0.0-dev.15 rxjs@^7.8.0
|
|
21
21
|
```
|
|
@@ -7,10 +7,10 @@ export class DataGridCellDefDirective {
|
|
|
7
7
|
constructor(template) {
|
|
8
8
|
this.template = template;
|
|
9
9
|
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
11
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.4", type: DataGridCellDefDirective, isStandalone: true, selector: "[rxapDataGridCellDef]", ngImport: i0 }); }
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridCellDefDirective, decorators: [{
|
|
14
14
|
type: Directive,
|
|
15
15
|
args: [{
|
|
16
16
|
selector: '[rxapDataGridCellDef]',
|
|
@@ -7,10 +7,10 @@ export class DataGridEditCellDefDirective {
|
|
|
7
7
|
constructor(template) {
|
|
8
8
|
this.template = template;
|
|
9
9
|
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
11
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridEditCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.4", type: DataGridEditCellDefDirective, isStandalone: true, selector: "[rxapDataGridEditCellDef]", ngImport: i0 }); }
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridEditCellDefDirective, decorators: [{
|
|
14
14
|
type: Directive,
|
|
15
15
|
args: [{
|
|
16
16
|
selector: '[rxapDataGridEditCellDef]',
|
|
@@ -7,10 +7,10 @@ export class DataGridHeaderCellDefDirective {
|
|
|
7
7
|
constructor(template) {
|
|
8
8
|
this.template = template;
|
|
9
9
|
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
11
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridHeaderCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.4", type: DataGridHeaderCellDefDirective, isStandalone: true, selector: "[rxapDataGridHeaderCellDef]", ngImport: i0 }); }
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridHeaderCellDefDirective, decorators: [{
|
|
14
14
|
type: Directive,
|
|
15
15
|
args: [{
|
|
16
16
|
selector: '[rxapDataGridHeaderCellDef]',
|
|
@@ -27,10 +27,10 @@ export class DataGridRowDefDirective {
|
|
|
27
27
|
get isSubHeader() {
|
|
28
28
|
return !this.name;
|
|
29
29
|
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
31
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridRowDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
31
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.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 }); }
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridRowDefDirective, decorators: [{
|
|
34
34
|
type: Directive,
|
|
35
35
|
args: [{
|
|
36
36
|
selector: '[rxapDataGridRowDef]',
|
|
@@ -9,10 +9,10 @@ export class DataGridValuePipe {
|
|
|
9
9
|
}
|
|
10
10
|
return data.pipe(map(source => getFromObject(source, path)));
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
13
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
13
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.4", ngImport: i0, type: DataGridValuePipe, isStandalone: true, name: "dataGridValue" }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridValuePipe, decorators: [{
|
|
16
16
|
type: Pipe,
|
|
17
17
|
args: [{
|
|
18
18
|
name: 'dataGridValue',
|
|
@@ -210,10 +210,10 @@ export class DataGridComponent {
|
|
|
210
210
|
retry() {
|
|
211
211
|
this.refresh();
|
|
212
212
|
}
|
|
213
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
214
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
213
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Router }, { token: i2.FormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
214
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.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 (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 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 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 colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name\" [ngClass]=\"{ 'sub-header': 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>{{ 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 }); }
|
|
215
215
|
}
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridComponent, decorators: [{
|
|
217
217
|
type: Component,
|
|
218
218
|
args: [{ selector: 'rxap-data-grid', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
219
219
|
AsyncPipe,
|
|
@@ -6,8 +6,8 @@ import { DataGridHeaderCellDefDirective } from './data-grid-header-cell-def.dire
|
|
|
6
6
|
import { DataGridRowDefDirective } from './data-grid-row-def.directive';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export class DataGridModule {
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
10
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, imports: [DataGridComponent,
|
|
11
11
|
DataGridRowDefDirective,
|
|
12
12
|
DataGridHeaderCellDefDirective,
|
|
13
13
|
DataGridCellDefDirective,
|
|
@@ -16,9 +16,9 @@ export class DataGridModule {
|
|
|
16
16
|
DataGridHeaderCellDefDirective,
|
|
17
17
|
DataGridCellDefDirective,
|
|
18
18
|
DataGridEditCellDefDirective] }); }
|
|
19
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.
|
|
19
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, imports: [DataGridComponent] }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, decorators: [{
|
|
22
22
|
type: NgModule,
|
|
23
23
|
args: [{
|
|
24
24
|
imports: [
|
|
@@ -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: "16.
|
|
31
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
31
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.4", type: DataGridCellDefDirective, isStandalone: true, selector: "[rxapDataGridCellDef]", ngImport: i0 }); }
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridCellDefDirective, decorators: [{
|
|
34
34
|
type: Directive,
|
|
35
35
|
args: [{
|
|
36
36
|
selector: '[rxapDataGridCellDef]',
|
|
@@ -48,10 +48,10 @@ class DataGridHeaderCellDefDirective {
|
|
|
48
48
|
constructor(template) {
|
|
49
49
|
this.template = template;
|
|
50
50
|
}
|
|
51
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
52
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
51
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridHeaderCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
52
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.4", type: DataGridHeaderCellDefDirective, isStandalone: true, selector: "[rxapDataGridHeaderCellDef]", ngImport: i0 }); }
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridHeaderCellDefDirective, decorators: [{
|
|
55
55
|
type: Directive,
|
|
56
56
|
args: [{
|
|
57
57
|
selector: '[rxapDataGridHeaderCellDef]',
|
|
@@ -69,10 +69,10 @@ class DataGridEditCellDefDirective {
|
|
|
69
69
|
constructor(template) {
|
|
70
70
|
this.template = template;
|
|
71
71
|
}
|
|
72
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
73
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridEditCellDefDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
73
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.4", type: DataGridEditCellDefDirective, isStandalone: true, selector: "[rxapDataGridEditCellDef]", ngImport: i0 }); }
|
|
74
74
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridEditCellDefDirective, decorators: [{
|
|
76
76
|
type: Directive,
|
|
77
77
|
args: [{
|
|
78
78
|
selector: '[rxapDataGridEditCellDef]',
|
|
@@ -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: "16.
|
|
111
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridRowDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
111
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.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 }); }
|
|
112
112
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", 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: "16.
|
|
145
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.
|
|
144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
145
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.4", ngImport: i0, type: DataGridValuePipe, isStandalone: true, name: "dataGridValue" }); }
|
|
146
146
|
}
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridValuePipe, decorators: [{
|
|
148
148
|
type: Pipe,
|
|
149
149
|
args: [{
|
|
150
150
|
name: 'dataGridValue',
|
|
@@ -341,10 +341,10 @@ class DataGridComponent {
|
|
|
341
341
|
retry() {
|
|
342
342
|
this.refresh();
|
|
343
343
|
}
|
|
344
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
345
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
344
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Router }, { token: i2.FormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
345
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.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 (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 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 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 colspan=\"2\">\n <mat-divider></mat-divider>\n </td>\n </tr>\n <tr [attr.data-name]=\"row.name\" [ngClass]=\"{ 'sub-header': 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>{{ 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 }); }
|
|
346
346
|
}
|
|
347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridComponent, decorators: [{
|
|
348
348
|
type: Component,
|
|
349
349
|
args: [{ selector: 'rxap-data-grid', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
350
350
|
AsyncPipe,
|
|
@@ -385,8 +385,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
385
385
|
}] } });
|
|
386
386
|
|
|
387
387
|
class DataGridModule {
|
|
388
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
389
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.
|
|
388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
389
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, imports: [DataGridComponent,
|
|
390
390
|
DataGridRowDefDirective,
|
|
391
391
|
DataGridHeaderCellDefDirective,
|
|
392
392
|
DataGridCellDefDirective,
|
|
@@ -395,9 +395,9 @@ class DataGridModule {
|
|
|
395
395
|
DataGridHeaderCellDefDirective,
|
|
396
396
|
DataGridCellDefDirective,
|
|
397
397
|
DataGridEditCellDefDirective] }); }
|
|
398
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.
|
|
398
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, imports: [DataGridComponent] }); }
|
|
399
399
|
}
|
|
400
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImport: i0, type: DataGridModule, decorators: [{
|
|
401
401
|
type: NgModule,
|
|
402
402
|
args: [{
|
|
403
403
|
imports: [
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/data-grid",
|
|
3
|
-
"version": "16.0.0-dev.
|
|
3
|
+
"version": "16.0.0-dev.12",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.1.4",
|
|
6
6
|
"@angular/core": "^16.1.4",
|
|
7
7
|
"@angular/material": "^16.1.4",
|
|
8
8
|
"@angular/router": "^16.1.4",
|
|
9
|
-
"@rxap/data-source": "^16.0.0-dev.
|
|
10
|
-
"@rxap/forms": "^16.0.0-dev.
|
|
11
|
-
"@rxap/pipes": "^16.0.0-dev.
|
|
12
|
-
"@rxap/rxjs": "^1.0.1-dev.
|
|
13
|
-
"@rxap/utilities": "^16.0.0-dev.
|
|
9
|
+
"@rxap/data-source": "^16.0.0-dev.13",
|
|
10
|
+
"@rxap/forms": "^16.0.0-dev.13",
|
|
11
|
+
"@rxap/pipes": "^16.0.0-dev.11",
|
|
12
|
+
"@rxap/rxjs": "^1.0.1-dev.7",
|
|
13
|
+
"@rxap/utilities": "^16.0.0-dev.15",
|
|
14
14
|
"rxjs": "^7.8.0",
|
|
15
|
-
"@rxap/material-form-system": "16.0.0-dev.
|
|
15
|
+
"@rxap/material-form-system": "16.0.0-dev.13"
|
|
16
16
|
},
|
|
17
17
|
"sideEffects": false,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"tslib": "2.
|
|
19
|
+
"tslib": "2.6.2"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public",
|
|
@@ -49,31 +49,31 @@
|
|
|
49
49
|
"packageGroup": [
|
|
50
50
|
{
|
|
51
51
|
"package": "@rxap/data-source",
|
|
52
|
-
"version": "16.0.0-dev.
|
|
52
|
+
"version": "16.0.0-dev.13"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"package": "@rxap/forms",
|
|
56
|
-
"version": "16.0.0-dev.
|
|
56
|
+
"version": "16.0.0-dev.13"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"package": "@rxap/pipes",
|
|
60
|
-
"version": "16.0.0-dev.
|
|
60
|
+
"version": "16.0.0-dev.11"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"package": "@rxap/rxjs",
|
|
64
|
-
"version": "1.0.1-dev.
|
|
64
|
+
"version": "1.0.1-dev.7"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"package": "@rxap/utilities",
|
|
68
|
-
"version": "16.0.0-dev.
|
|
68
|
+
"version": "16.0.0-dev.15"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"package": "@rxap/material-form-system",
|
|
72
|
-
"version": "16.0.0-dev.
|
|
72
|
+
"version": "16.0.0-dev.13"
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "b6e1ecbccc89aae6de3dc72b0206374dbaa44e69",
|
|
77
77
|
"module": "fesm2022/rxap-data-grid.mjs",
|
|
78
78
|
"typings": "index.d.ts",
|
|
79
79
|
"exports": {
|