@devopmaat/badaboom 1.4.1 → 1.4.2
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.
|
@@ -26,7 +26,7 @@ import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
|
26
26
|
import * as i4 from '@angular/material/sort';
|
|
27
27
|
import { MatSortModule } from '@angular/material/sort';
|
|
28
28
|
import * as i2$1 from '@angular/material/table';
|
|
29
|
-
import { MatTableModule } from '@angular/material/table';
|
|
29
|
+
import { MatTableModule, MatTableDataSource } from '@angular/material/table';
|
|
30
30
|
import * as i5$1 from '@angular/material/sidenav';
|
|
31
31
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
32
32
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -1304,25 +1304,25 @@ class BdbTableV2Component {
|
|
|
1304
1304
|
if (!selection) {
|
|
1305
1305
|
return false;
|
|
1306
1306
|
}
|
|
1307
|
-
return this.dataSource()?.every((x) => selection.isSelected(x)) ?? false;
|
|
1307
|
+
return this.dataSource()?.data.every((x) => selection.isSelected(x)) ?? false;
|
|
1308
1308
|
}
|
|
1309
1309
|
anySelected() {
|
|
1310
1310
|
const selection = this.selection();
|
|
1311
1311
|
if (!selection) {
|
|
1312
1312
|
return false;
|
|
1313
1313
|
}
|
|
1314
|
-
return this.dataSource()?.some((x) => selection.isSelected(x)) ?? false;
|
|
1314
|
+
return this.dataSource()?.data.some((x) => selection.isSelected(x)) ?? false;
|
|
1315
1315
|
}
|
|
1316
1316
|
toggleAllRows() {
|
|
1317
1317
|
const selection = this.selection();
|
|
1318
|
-
if (!(selection && this.dataSource)) {
|
|
1318
|
+
if (!(selection && this.dataSource())) {
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
1321
1321
|
if (this.isAllSelected()) {
|
|
1322
|
-
selection.deselect(...this.dataSource());
|
|
1322
|
+
selection.deselect(...this.dataSource().data);
|
|
1323
1323
|
}
|
|
1324
1324
|
else {
|
|
1325
|
-
selection.select(...this.dataSource());
|
|
1325
|
+
selection.select(...this.dataSource().data);
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
rowClass(row) {
|
|
@@ -1372,7 +1372,7 @@ class BdbGridComponent {
|
|
|
1372
1372
|
this.contextActions = input([], ...(ngDevMode ? [{ debugName: "contextActions" }] : []));
|
|
1373
1373
|
this.contextAction = output();
|
|
1374
1374
|
this.rowColor = input(...(ngDevMode ? [undefined, { debugName: "rowColor" }] : []));
|
|
1375
|
-
this.rowClick =
|
|
1375
|
+
this.rowClick = output();
|
|
1376
1376
|
this.filterDrawerOpened = output();
|
|
1377
1377
|
this.cellTemplates = contentChildren(BdbCellDirective, { ...(ngDevMode ? { debugName: "cellTemplates" } : {}), descendants: true });
|
|
1378
1378
|
}
|
|
@@ -1389,7 +1389,7 @@ class BdbGridComponent {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
1391
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BdbGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1392
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: BdbGridComponent, isStandalone: true, selector: "bdb-grid", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, displayedColumns: { classPropertyName: "displayedColumns", publicName: "displayedColumns", isSignal: false, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: false, isRequired: false, transformFunction: null }, contextActions: { classPropertyName: "contextActions", publicName: "contextActions", isSignal: true, isRequired: false, transformFunction: null }, rowColor: { classPropertyName: "rowColor", publicName: "rowColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextAction: "contextAction", rowClick: "rowClick", filterDrawerOpened: "filterDrawerOpened" }, queries: [{ propertyName: "cellTemplates", predicate: BdbCellDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-toolbar>\r\n <button mat-icon-button (click)=\"filterDrawerOpen = !filterDrawerOpen; filterDrawerOpened.emit(filterDrawerOpen)\">\r\n @if (filterDrawerOpen) {\r\n <mat-icon>filter_alt</mat-icon>\r\n } @else {\r\n <mat-icon>filter_arrow_right</mat-icon>\r\n }\r\n </button>\r\n <div style=\"flex: 1; display: flex; align-items: center; gap: 8px\">\r\n <ng-content select=\"toolbar-item\"></ng-content>\r\n </div>\r\n <bdb-paginator-v2 [dataSource]=\"dataSource()\"></bdb-paginator-v2>\r\n <bdb-query-input-v2 [dataSource]=\"dataSource()\"></bdb-query-input-v2>\r\n</mat-toolbar>\r\n\r\n<mat-drawer-container class=\"filter-drawer\">\r\n <mat-drawer mode=\"side\" [opened]=\"filterDrawerOpen\">\r\n <ng-content select=\"filter-drawer\"></ng-content>\r\n </mat-drawer>\r\n <mat-drawer-content>\r\n <bdb-table-v2\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource()
|
|
1392
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: BdbGridComponent, isStandalone: true, selector: "bdb-grid", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, displayedColumns: { classPropertyName: "displayedColumns", publicName: "displayedColumns", isSignal: false, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: false, isRequired: false, transformFunction: null }, contextActions: { classPropertyName: "contextActions", publicName: "contextActions", isSignal: true, isRequired: false, transformFunction: null }, rowColor: { classPropertyName: "rowColor", publicName: "rowColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextAction: "contextAction", rowClick: "rowClick", filterDrawerOpened: "filterDrawerOpened" }, queries: [{ propertyName: "cellTemplates", predicate: BdbCellDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-toolbar>\r\n <button mat-icon-button (click)=\"filterDrawerOpen = !filterDrawerOpen; filterDrawerOpened.emit(filterDrawerOpen)\">\r\n @if (filterDrawerOpen) {\r\n <mat-icon>filter_alt</mat-icon>\r\n } @else {\r\n <mat-icon>filter_arrow_right</mat-icon>\r\n }\r\n </button>\r\n <div style=\"flex: 1; display: flex; align-items: center; gap: 8px\">\r\n <ng-content select=\"toolbar-item\"></ng-content>\r\n </div>\r\n <bdb-paginator-v2 [dataSource]=\"dataSource()\"></bdb-paginator-v2>\r\n <bdb-query-input-v2 [dataSource]=\"dataSource()\"></bdb-query-input-v2>\r\n</mat-toolbar>\r\n\r\n<mat-drawer-container class=\"filter-drawer\">\r\n <mat-drawer mode=\"side\" [opened]=\"filterDrawerOpen\">\r\n <ng-content select=\"filter-drawer\"></ng-content>\r\n </mat-drawer>\r\n <mat-drawer-content>\r\n <bdb-table-v2\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource()\"\r\n [error]=\"dataSource().error()\"\r\n [displayedColumns]=\"displayedColumns\"\r\n [selection]=\"selection\"\r\n [rowColor]=\"rowColor()\"\r\n [contextActions]=\"contextActions()\"\r\n (contextAction)=\"contextAction.emit($event)\"\r\n (rowClick)=\"rowClick.emit($event)\"\r\n (sortChange)=\"sortChange($event)\">\r\n @for (cellTemplate of cellTemplates(); track cellTemplate.bdbCellDef) {\r\n <ng-template bdbCellDef=\"{{ cellTemplate.bdbCellDef }}\" let-element>\r\n <ng-container *ngTemplateOutlet=\"cellTemplate.templateRef; context: { $implicit: element }\"></ng-container>\r\n </ng-template>\r\n }\r\n </bdb-table-v2>\r\n </mat-drawer-content>\r\n</mat-drawer-container>\r\n", styles: [":host{display:flex;flex-direction:column;justify-content:stretch;flex:0 1 100%}:host mat-toolbar{flex:0 0 auto;display:flex;flex-direction:row;gap:8px;justify-content:start;align-items:center}:host bdb-table{display:contents;flex:0 1 100%}:host bdb-query-input{--mdc-filled-text-field-container-color: var(--mat-sys-surface-container-lowest)}:host bdb-paginator{flex:0 0 auto}.filter-drawer{flex-grow:1;--mat-sidenav-content-background-color: var(--mat-sys-surface)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2$2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i5$1.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i5$1.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i5$1.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: BdbTableV2Component, selector: "bdb-table-v2", inputs: ["dataSource", "columns", "displayedColumns", "selection", "selectOnRowClick", "contextActions", "rowColor", "error", "matSortDisabled", "trackBy"], outputs: ["contextAction", "rowClick", "sortChange"] }, { kind: "directive", type: BdbCellDirective, selector: "ng-template[bdbCellDef]", inputs: ["bdbCellDef"] }, { kind: "component", type: BdbQueryInputV2Component, selector: "bdb-query-input-v2[dataSource]", inputs: ["dataSource"] }, { kind: "component", type: BdbPaginatorV2Component, selector: "bdb-paginator-v2", inputs: ["dataSource"] }] }); }
|
|
1393
1393
|
}
|
|
1394
1394
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BdbGridComponent, decorators: [{
|
|
1395
1395
|
type: Component,
|
|
@@ -1404,16 +1404,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
1404
1404
|
BdbCellDirective,
|
|
1405
1405
|
BdbQueryInputV2Component,
|
|
1406
1406
|
BdbPaginatorV2Component,
|
|
1407
|
-
], template: "<mat-toolbar>\r\n <button mat-icon-button (click)=\"filterDrawerOpen = !filterDrawerOpen; filterDrawerOpened.emit(filterDrawerOpen)\">\r\n @if (filterDrawerOpen) {\r\n <mat-icon>filter_alt</mat-icon>\r\n } @else {\r\n <mat-icon>filter_arrow_right</mat-icon>\r\n }\r\n </button>\r\n <div style=\"flex: 1; display: flex; align-items: center; gap: 8px\">\r\n <ng-content select=\"toolbar-item\"></ng-content>\r\n </div>\r\n <bdb-paginator-v2 [dataSource]=\"dataSource()\"></bdb-paginator-v2>\r\n <bdb-query-input-v2 [dataSource]=\"dataSource()\"></bdb-query-input-v2>\r\n</mat-toolbar>\r\n\r\n<mat-drawer-container class=\"filter-drawer\">\r\n <mat-drawer mode=\"side\" [opened]=\"filterDrawerOpen\">\r\n <ng-content select=\"filter-drawer\"></ng-content>\r\n </mat-drawer>\r\n <mat-drawer-content>\r\n <bdb-table-v2\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource()
|
|
1407
|
+
], template: "<mat-toolbar>\r\n <button mat-icon-button (click)=\"filterDrawerOpen = !filterDrawerOpen; filterDrawerOpened.emit(filterDrawerOpen)\">\r\n @if (filterDrawerOpen) {\r\n <mat-icon>filter_alt</mat-icon>\r\n } @else {\r\n <mat-icon>filter_arrow_right</mat-icon>\r\n }\r\n </button>\r\n <div style=\"flex: 1; display: flex; align-items: center; gap: 8px\">\r\n <ng-content select=\"toolbar-item\"></ng-content>\r\n </div>\r\n <bdb-paginator-v2 [dataSource]=\"dataSource()\"></bdb-paginator-v2>\r\n <bdb-query-input-v2 [dataSource]=\"dataSource()\"></bdb-query-input-v2>\r\n</mat-toolbar>\r\n\r\n<mat-drawer-container class=\"filter-drawer\">\r\n <mat-drawer mode=\"side\" [opened]=\"filterDrawerOpen\">\r\n <ng-content select=\"filter-drawer\"></ng-content>\r\n </mat-drawer>\r\n <mat-drawer-content>\r\n <bdb-table-v2\r\n [columns]=\"columns\"\r\n [dataSource]=\"dataSource()\"\r\n [error]=\"dataSource().error()\"\r\n [displayedColumns]=\"displayedColumns\"\r\n [selection]=\"selection\"\r\n [rowColor]=\"rowColor()\"\r\n [contextActions]=\"contextActions()\"\r\n (contextAction)=\"contextAction.emit($event)\"\r\n (rowClick)=\"rowClick.emit($event)\"\r\n (sortChange)=\"sortChange($event)\">\r\n @for (cellTemplate of cellTemplates(); track cellTemplate.bdbCellDef) {\r\n <ng-template bdbCellDef=\"{{ cellTemplate.bdbCellDef }}\" let-element>\r\n <ng-container *ngTemplateOutlet=\"cellTemplate.templateRef; context: { $implicit: element }\"></ng-container>\r\n </ng-template>\r\n }\r\n </bdb-table-v2>\r\n </mat-drawer-content>\r\n</mat-drawer-container>\r\n", styles: [":host{display:flex;flex-direction:column;justify-content:stretch;flex:0 1 100%}:host mat-toolbar{flex:0 0 auto;display:flex;flex-direction:row;gap:8px;justify-content:start;align-items:center}:host bdb-table{display:contents;flex:0 1 100%}:host bdb-query-input{--mdc-filled-text-field-container-color: var(--mat-sys-surface-container-lowest)}:host bdb-paginator{flex:0 0 auto}.filter-drawer{flex-grow:1;--mat-sidenav-content-background-color: var(--mat-sys-surface)}\n"] }]
|
|
1408
1408
|
}], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], columns: [{
|
|
1409
1409
|
type: Input
|
|
1410
1410
|
}], displayedColumns: [{
|
|
1411
1411
|
type: Input
|
|
1412
1412
|
}], selection: [{
|
|
1413
1413
|
type: Input
|
|
1414
|
-
}], contextActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextActions", required: false }] }], contextAction: [{ type: i0.Output, args: ["contextAction"] }], rowColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowColor", required: false }] }], rowClick: [{
|
|
1415
|
-
type: Output
|
|
1416
|
-
}], filterDrawerOpened: [{ type: i0.Output, args: ["filterDrawerOpened"] }], cellTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BdbCellDirective), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
1414
|
+
}], contextActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextActions", required: false }] }], contextAction: [{ type: i0.Output, args: ["contextAction"] }], rowColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowColor", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], filterDrawerOpened: [{ type: i0.Output, args: ["filterDrawerOpened"] }], cellTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BdbCellDirective), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
1417
1415
|
|
|
1418
1416
|
class BdbSearchInputComponent {
|
|
1419
1417
|
// MatFormFieldControl required properties
|
|
@@ -3135,7 +3133,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
3135
3133
|
/// <summary>
|
|
3136
3134
|
/// A data source that can be used with the BdbTableComponent, that supports persistence of the state (e.g. in queryParameters).
|
|
3137
3135
|
/// </summary>
|
|
3138
|
-
class BdbDataSourceV2 {
|
|
3136
|
+
class BdbDataSourceV2 extends MatTableDataSource {
|
|
3139
3137
|
get state() {
|
|
3140
3138
|
return {
|
|
3141
3139
|
pageSize: this.pageSize == this.defaultPageSize ? undefined : this.pageSize,
|
|
@@ -3159,9 +3157,6 @@ class BdbDataSourceV2 {
|
|
|
3159
3157
|
this.sortDirection === state.sortDirection &&
|
|
3160
3158
|
this.query === state.query);
|
|
3161
3159
|
}
|
|
3162
|
-
get data() {
|
|
3163
|
-
return this.responseSubject.getValue()?.rows ?? [];
|
|
3164
|
-
}
|
|
3165
3160
|
get identifier() {
|
|
3166
3161
|
return this._identifier;
|
|
3167
3162
|
}
|
|
@@ -3170,7 +3165,7 @@ class BdbDataSourceV2 {
|
|
|
3170
3165
|
this.setPersistence();
|
|
3171
3166
|
}
|
|
3172
3167
|
constructor() {
|
|
3173
|
-
|
|
3168
|
+
super();
|
|
3174
3169
|
this.destroyRef = inject(DestroyRef);
|
|
3175
3170
|
this.router = inject(Router);
|
|
3176
3171
|
this.route = inject(ActivatedRoute);
|
|
@@ -3183,6 +3178,7 @@ class BdbDataSourceV2 {
|
|
|
3183
3178
|
this.request$ = this.requestSubject.asObservable();
|
|
3184
3179
|
this.responseSubject = new BehaviorSubject(undefined);
|
|
3185
3180
|
this.response$ = this.responseSubject.asObservable();
|
|
3181
|
+
this.dataSubject = new BehaviorSubject([]);
|
|
3186
3182
|
this._loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
|
|
3187
3183
|
this.loading = this._loading.asReadonly();
|
|
3188
3184
|
this._error = signal(undefined, ...(ngDevMode ? [{ debugName: "_error" }] : []));
|
|
@@ -3196,15 +3192,13 @@ class BdbDataSourceV2 {
|
|
|
3196
3192
|
return of({ page: 0, count: 0, rows: [], pageSize: 15 });
|
|
3197
3193
|
}), tap$1(response => {
|
|
3198
3194
|
this.responseSubject.next(response);
|
|
3195
|
+
this.dataSubject.next(response.rows);
|
|
3199
3196
|
}), finalize(() => this._loading.set(false)))))
|
|
3200
3197
|
.subscribe();
|
|
3201
3198
|
}
|
|
3202
|
-
disconnect() {
|
|
3203
|
-
return;
|
|
3204
|
-
}
|
|
3205
3199
|
// Connects the data source to the table.
|
|
3206
3200
|
connect() {
|
|
3207
|
-
return this.
|
|
3201
|
+
return this.dataSubject;
|
|
3208
3202
|
}
|
|
3209
3203
|
load(loadOptions = {}) {
|
|
3210
3204
|
this.requestSubject.next([this.createRequest(), loadOptions]);
|