@devopmaat/badaboom 1.4.1 → 1.4.3
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/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, EnvironmentProviders, TemplateRef, Type, PipeTransform, EventEmitter, OnInit, OnDestroy, AfterViewInit, ElementRef, Signal, TrackByFunction, OnChanges, AfterContentInit, Renderer2, InputSignal, ChangeDetectorRef, ProviderToken } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders, TemplateRef, Type, PipeTransform, EventEmitter, OnInit, DestroyRef, OnDestroy, AfterViewInit, ElementRef, Signal, TrackByFunction, OnChanges, AfterContentInit, Renderer2, InputSignal, ChangeDetectorRef, ProviderToken } from '@angular/core';
|
|
3
3
|
import { Routes, Router, ActivatedRoute, Route, CanActivateFn, ResolveFn } from '@angular/router';
|
|
4
4
|
import { DataSource, SelectionModel, CollectionViewer, ListRange } from '@angular/cdk/collections';
|
|
5
|
-
import { Observable, BehaviorSubject, Subject } from 'rxjs';
|
|
6
5
|
import { HttpClient, HttpErrorResponse, HttpInterceptorFn } from '@angular/common/http';
|
|
6
|
+
import { Observable, BehaviorSubject, Subject } from 'rxjs';
|
|
7
7
|
import { FormGroup, FormControl, ControlValueAccessor, NgControl, ControlContainer, AbstractControl, ValidatorFn } from '@angular/forms';
|
|
8
8
|
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
9
9
|
import * as _devopmaat_badaboom from '@devopmaat/badaboom';
|
|
10
10
|
import { Sort } from '@angular/material/sort';
|
|
11
|
+
import { MatTableDataSource } from '@angular/material/table';
|
|
12
|
+
import * as _angular_material_paginator from '@angular/material/paginator';
|
|
11
13
|
import { PageEvent } from '@angular/material/paginator';
|
|
12
14
|
import { MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
|
|
13
15
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
@@ -72,17 +74,6 @@ declare const BDB_OPTIONS: InjectionToken<BdbOptions>;
|
|
|
72
74
|
*/
|
|
73
75
|
declare function provideBaDaBoom(optionsConfigure: BdbOptionsConfigure, routes: Routes): EnvironmentProviders;
|
|
74
76
|
|
|
75
|
-
interface BdbEntityRead {
|
|
76
|
-
id: number;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface BdbResponse<T> {
|
|
80
|
-
page: number;
|
|
81
|
-
pageSize: number;
|
|
82
|
-
rows: T[];
|
|
83
|
-
count: number;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
77
|
interface BdbFilter {
|
|
87
78
|
type: 'Field' | 'Group';
|
|
88
79
|
field?: string;
|
|
@@ -107,10 +98,21 @@ interface BdbRequestOptions {
|
|
|
107
98
|
replaceUrl?: boolean;
|
|
108
99
|
}
|
|
109
100
|
|
|
101
|
+
interface BdbResponse<T> {
|
|
102
|
+
page: number;
|
|
103
|
+
pageSize: number;
|
|
104
|
+
rows: T[];
|
|
105
|
+
count: number;
|
|
106
|
+
}
|
|
107
|
+
|
|
110
108
|
interface BdbEntity {
|
|
111
109
|
id: number;
|
|
112
110
|
}
|
|
113
111
|
|
|
112
|
+
interface BdbEntityRead {
|
|
113
|
+
id: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
114
116
|
declare abstract class BdbService {
|
|
115
117
|
baseUrl: string;
|
|
116
118
|
httpClient: HttpClient;
|
|
@@ -229,7 +231,7 @@ interface DataSourceState {
|
|
|
229
231
|
sortDirection?: 'asc' | 'desc';
|
|
230
232
|
query?: string;
|
|
231
233
|
}
|
|
232
|
-
declare abstract class BdbDataSourceV2<TEntity extends BdbEntity, TState extends DataSourceState = DataSourceState>
|
|
234
|
+
declare abstract class BdbDataSourceV2<TEntity extends BdbEntity, TState extends DataSourceState = DataSourceState> extends MatTableDataSource<TEntity> {
|
|
233
235
|
private destroyRef;
|
|
234
236
|
private router;
|
|
235
237
|
private route;
|
|
@@ -252,19 +254,18 @@ declare abstract class BdbDataSourceV2<TEntity extends BdbEntity, TState extends
|
|
|
252
254
|
request$: Observable<[BdbRequest, BdbRequestOptions]>;
|
|
253
255
|
private responseSubject;
|
|
254
256
|
response$: Observable<BdbResponse<TEntity> | undefined>;
|
|
257
|
+
private dataSubject;
|
|
255
258
|
private _loading;
|
|
256
259
|
loading: i0.Signal<boolean>;
|
|
257
260
|
private _error;
|
|
258
261
|
error: i0.Signal<HttpErrorResponse | undefined>;
|
|
259
|
-
get data(): readonly TEntity[];
|
|
260
262
|
private _persistenceRead?;
|
|
261
263
|
private _persistenceWrite?;
|
|
262
264
|
private _identifier;
|
|
263
265
|
get identifier(): string | undefined;
|
|
264
266
|
set identifier(value: string | undefined);
|
|
265
267
|
constructor();
|
|
266
|
-
|
|
267
|
-
connect(): Observable<TEntity[] | readonly TEntity[]>;
|
|
268
|
+
connect(): BehaviorSubject<TEntity[]>;
|
|
268
269
|
load(loadOptions?: BdbRequestOptions): void;
|
|
269
270
|
abstract loadMethod(request: BdbRequest): Observable<BdbResponse<TEntity>>;
|
|
270
271
|
createRequest(): BdbRequest;
|
|
@@ -279,36 +280,33 @@ declare abstract class BdbDataSourceV2<TEntity extends BdbEntity, TState extends
|
|
|
279
280
|
|
|
280
281
|
declare class BdbGridComponent<TEntityRead extends BdbEntity> {
|
|
281
282
|
dataSource: i0.InputSignal<BdbDataSourceV2<TEntityRead, _devopmaat_badaboom.DataSourceState>>;
|
|
282
|
-
columns: BdbColumn<TEntityRead, unknown>[]
|
|
283
|
-
displayedColumns: string[]
|
|
284
|
-
selection
|
|
283
|
+
columns: i0.InputSignal<BdbColumn<TEntityRead, unknown>[]>;
|
|
284
|
+
displayedColumns: i0.InputSignal<string[]>;
|
|
285
|
+
selection: i0.InputSignal<SelectionModel<TEntityRead> | undefined>;
|
|
285
286
|
contextActions: i0.InputSignal<BdbContextAction<TEntityRead>[]>;
|
|
286
287
|
contextAction: i0.OutputEmitterRef<{
|
|
287
288
|
action: BdbContextAction<TEntityRead>;
|
|
288
289
|
row: TEntityRead;
|
|
289
290
|
}>;
|
|
290
291
|
rowColor: i0.InputSignal<((x: TEntityRead) => BdbM3Palette) | undefined>;
|
|
291
|
-
rowClick:
|
|
292
|
-
filterDrawerOpen:
|
|
292
|
+
rowClick: i0.OutputEmitterRef<TEntityRead>;
|
|
293
|
+
filterDrawerOpen: boolean;
|
|
293
294
|
filterDrawerOpened: i0.OutputEmitterRef<boolean>;
|
|
294
295
|
onContextAction(action: BdbContextAction<TEntityRead>, row: TEntityRead): void;
|
|
295
296
|
readonly cellTemplates: i0.Signal<readonly BdbCellDirective[]>;
|
|
296
297
|
sortChange(event: Sort): void;
|
|
297
298
|
static ɵfac: i0.ɵɵFactoryDeclaration<BdbGridComponent<any>, never>;
|
|
298
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BdbGridComponent<any>, "bdb-grid", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; "isSignal": true; }; "rowColor": { "alias": "rowColor"; "required": false; "isSignal": true; }; }, { "contextAction": "contextAction"; "rowClick": "rowClick"; "filterDrawerOpened": "filterDrawerOpened"; }, ["cellTemplates"], ["toolbar-item", "filter-drawer"], true, never>;
|
|
299
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BdbGridComponent<any>, "bdb-grid", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "contextActions": { "alias": "contextActions"; "required": false; "isSignal": true; }; "rowColor": { "alias": "rowColor"; "required": false; "isSignal": true; }; }, { "contextAction": "contextAction"; "rowClick": "rowClick"; "filterDrawerOpened": "filterDrawerOpened"; }, ["cellTemplates"], ["toolbar-item", "filter-drawer"], true, never>;
|
|
299
300
|
}
|
|
300
301
|
|
|
301
|
-
declare class BdbPaginatorV2Component<TEntity extends BdbEntity> implements OnInit
|
|
302
|
+
declare class BdbPaginatorV2Component<TEntity extends BdbEntity> implements OnInit {
|
|
302
303
|
dataSource: i0.InputSignal<BdbDataSourceV2<TEntity, _devopmaat_badaboom.DataSourceState>>;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
page?: number;
|
|
309
|
-
length?: number;
|
|
304
|
+
destroyRef: DestroyRef;
|
|
305
|
+
disabled: i0.WritableSignal<boolean>;
|
|
306
|
+
pageSize: i0.WritableSignal<number | undefined>;
|
|
307
|
+
page: i0.WritableSignal<number | undefined>;
|
|
308
|
+
length: i0.WritableSignal<number | undefined>;
|
|
310
309
|
ngOnInit(): void;
|
|
311
|
-
ngOnDestroy(): void;
|
|
312
310
|
changePage(event: PageEvent): void;
|
|
313
311
|
static ɵfac: i0.ɵɵFactoryDeclaration<BdbPaginatorV2Component<any>, never>;
|
|
314
312
|
static ɵcmp: i0.ɵɵComponentDeclaration<BdbPaginatorV2Component<any>, "bdb-paginator-v2", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -466,8 +464,8 @@ declare class BdbSearchComponent<TEntityRead extends BdbEntityRead> implements C
|
|
|
466
464
|
static ɵcmp: i0.ɵɵComponentDeclaration<BdbSearchComponent<any>, "bdb-search", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "displayFn": { "alias": "displayFn"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
|
|
467
465
|
}
|
|
468
466
|
|
|
469
|
-
declare class BdbTableV2Component<TEntity
|
|
470
|
-
dataSource: i0.InputSignal<
|
|
467
|
+
declare class BdbTableV2Component<TEntity> {
|
|
468
|
+
dataSource: i0.InputSignal<MatTableDataSource<TEntity, _angular_material_paginator.MatPaginator>>;
|
|
471
469
|
columns: i0.InputSignal<BdbColumn<TEntity, unknown>[]>;
|
|
472
470
|
displayedColumns: i0.InputSignal<string[]>;
|
|
473
471
|
activeColumns: Signal<string[]>;
|