@processpuzzle/base-entity 0.7.12 → 0.8.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@processpuzzle/base-entity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Zsolt Zsuffa",
|
|
@@ -12,23 +12,23 @@
|
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/ZsZs/processpuzzle.git",
|
|
15
|
-
"directory": "libs/base-entity"
|
|
15
|
+
"directory": "libs/js-shared/base-entity"
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/ZsZs/processpuzzle#readme",
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@angular-architects/ngrx-toolkit": "^21.0.1",
|
|
20
|
-
"@angular/cdk": "^
|
|
21
|
-
"@angular/common": "~
|
|
22
|
-
"@angular/core": "~
|
|
23
|
-
"@angular/forms": "~
|
|
24
|
-
"@angular/material": "^
|
|
25
|
-
"@angular/platform-browser": "~
|
|
26
|
-
"@angular/router": "~
|
|
20
|
+
"@angular/cdk": "^22.0.1",
|
|
21
|
+
"@angular/common": "~22.0.1",
|
|
22
|
+
"@angular/core": "~22.0.1",
|
|
23
|
+
"@angular/forms": "~22.0.1",
|
|
24
|
+
"@angular/material": "^22.0.1",
|
|
25
|
+
"@angular/platform-browser": "~22.0.1",
|
|
26
|
+
"@angular/router": "~22.0.1",
|
|
27
27
|
"@angular/fire": "^20.0.1",
|
|
28
28
|
"@jsverse/transloco": "8.3.0",
|
|
29
|
-
"@ngrx/operators": "^21.1.
|
|
30
|
-
"@ngrx/signals": "^21.1.
|
|
31
|
-
"@processpuzzle/util": "^0.
|
|
29
|
+
"@ngrx/operators": "^21.1.1",
|
|
30
|
+
"@ngrx/signals": "^21.1.1",
|
|
31
|
+
"@processpuzzle/util": "^0.8.0",
|
|
32
32
|
"build-url-ts": "^6.2.0",
|
|
33
33
|
"ngx-logging-kit": "^21.0.1",
|
|
34
34
|
"rxjs": "~7.8.2",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, Type, OnDestroy, OnInit, ViewContainerRef,
|
|
2
|
+
import { InjectionToken, Type, Signal, OnDestroy, OnInit, ViewContainerRef, InputSignal, AfterViewInit, ProviderToken } from '@angular/core';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
|
-
import { WhereFilterOp, Firestore } from '@angular/fire/firestore';
|
|
4
|
+
import { WhereFilterOp, DocumentData, Firestore } from '@angular/fire/firestore';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
+
import * as _ngrx_signals_rxjs_interop from '@ngrx/signals/rxjs-interop';
|
|
7
|
+
import * as _angular_material_paginator from '@angular/material/paginator';
|
|
8
|
+
import { MatPaginator } from '@angular/material/paginator';
|
|
6
9
|
import * as _ngrx_signals from '@ngrx/signals';
|
|
10
|
+
import { MatTableDataSource } from '@angular/material/table';
|
|
7
11
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
8
12
|
import * as _processpuzzle_base_entity from '@processpuzzle/base-entity';
|
|
9
13
|
import { FormGroup } from '@angular/forms';
|
|
10
|
-
import { MatTableDataSource } from '@angular/material/table';
|
|
11
14
|
import { MatSort } from '@angular/material/sort';
|
|
12
|
-
import * as _angular_material_paginator from '@angular/material/paginator';
|
|
13
|
-
import { MatPaginator } from '@angular/material/paginator';
|
|
14
15
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
15
|
-
import * as _ngrx_signals_rxjs_interop from '@ngrx/signals/rxjs-interop';
|
|
16
16
|
import * as _firebase_firestore from '@firebase/firestore';
|
|
17
17
|
import { Routes } from '@angular/router';
|
|
18
18
|
|
|
@@ -37,7 +37,7 @@ declare abstract class AbstractAttrDescriptor {
|
|
|
37
37
|
formControlType: FormControlType;
|
|
38
38
|
disabled: boolean;
|
|
39
39
|
style: {
|
|
40
|
-
[p: string]:
|
|
40
|
+
[p: string]: unknown;
|
|
41
41
|
} | null | undefined;
|
|
42
42
|
protected constructor(attrName: string, formControlType: FormControlType);
|
|
43
43
|
}
|
|
@@ -49,19 +49,20 @@ interface ArtifactAttr {
|
|
|
49
49
|
readonly mimeType: string;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
type EntityTitle = string | (() => string);
|
|
52
53
|
interface BaseEntityDescriptorOptions {
|
|
53
|
-
store?:
|
|
54
|
+
store?: unknown;
|
|
54
55
|
attrDescriptors: AbstractAttrDescriptor[];
|
|
55
56
|
entityName: string;
|
|
56
|
-
entityTitle?:
|
|
57
|
+
entityTitle?: EntityTitle;
|
|
57
58
|
isAbstract?: boolean;
|
|
58
59
|
parentEntity?: string;
|
|
59
60
|
}
|
|
60
61
|
declare class BaseEntityDescriptor {
|
|
61
|
-
store:
|
|
62
|
+
store: unknown;
|
|
62
63
|
attrDescriptors: AbstractAttrDescriptor[];
|
|
63
64
|
entityName: string;
|
|
64
|
-
entityTitle:
|
|
65
|
+
entityTitle: EntityTitle;
|
|
65
66
|
parentEntity: string | undefined;
|
|
66
67
|
readonly isAbstract: boolean;
|
|
67
68
|
constructor({ store, attrDescriptors, entityName, entityTitle, isAbstract, parentEntity }: BaseEntityDescriptorOptions);
|
|
@@ -79,18 +80,18 @@ interface PersistedBaseEntity extends BaseEntity {
|
|
|
79
80
|
type PersistedEntity<Entity extends BaseEntity> = Entity & PersistedBaseEntity;
|
|
80
81
|
|
|
81
82
|
interface BaseEntityMapper<Entity extends BaseEntity> {
|
|
82
|
-
fromDto(dto:
|
|
83
|
-
toDto(entity: Entity):
|
|
83
|
+
fromDto(dto: unknown, index?: number): Entity;
|
|
84
|
+
toDto(entity: Entity): unknown;
|
|
84
85
|
}
|
|
85
86
|
declare class SimpleEntityMapper<Entity extends BaseEntity> implements BaseEntityMapper<Entity> {
|
|
86
87
|
private readonly entityType;
|
|
87
|
-
constructor(entityType: new (...args:
|
|
88
|
-
fromDto(dto:
|
|
89
|
-
toDto(entity: Entity):
|
|
88
|
+
constructor(entityType: new (...args: unknown[]) => Entity);
|
|
89
|
+
fromDto(dto: unknown): Entity;
|
|
90
|
+
toDto(entity: Entity): unknown;
|
|
90
91
|
}
|
|
91
92
|
declare function getEnumKeyByValue<E>(myEnum: {
|
|
92
93
|
[key: number]: string;
|
|
93
|
-
}, enumValue:
|
|
94
|
+
}, enumValue: number): E | undefined;
|
|
94
95
|
declare function getEnumValueByKey<E>(myEnum: {
|
|
95
96
|
[key: string]: E | string;
|
|
96
97
|
}, enumKey: string): E | undefined;
|
|
@@ -128,7 +129,7 @@ interface BaseEntityLoadResponse<Entity extends BaseEntity> {
|
|
|
128
129
|
content: Entity[];
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
declare const BASE_ENTITY_SERVICE: InjectionToken<BaseEntityService<
|
|
132
|
+
declare const BASE_ENTITY_SERVICE: InjectionToken<BaseEntityService<BaseEntity>>;
|
|
132
133
|
interface BaseEntityService<Entity extends BaseEntity> {
|
|
133
134
|
add(entity: Entity, id?: number): Observable<PersistedEntity<Entity>>;
|
|
134
135
|
delete(id: string): Observable<unknown>;
|
|
@@ -141,7 +142,7 @@ interface BaseEntityService<Entity extends BaseEntity> {
|
|
|
141
142
|
|
|
142
143
|
type EntityServiceKind = 'rest' | 'firestore';
|
|
143
144
|
declare abstract class BaseEntityFacade<Entity extends BaseEntity> {
|
|
144
|
-
abstract readonly entityType: new (...args:
|
|
145
|
+
abstract readonly entityType: new (...args: unknown[]) => Entity;
|
|
145
146
|
protected readonly serviceKind: EntityServiceKind;
|
|
146
147
|
protected readonly endpoint?: string;
|
|
147
148
|
protected readonly backendRoot?: string;
|
|
@@ -154,7 +155,7 @@ declare abstract class BaseEntityFacade<Entity extends BaseEntity> {
|
|
|
154
155
|
get mapper(): BaseEntityMapper<Entity>;
|
|
155
156
|
get service(): BaseEntityService<Entity>;
|
|
156
157
|
get storeClass(): Type<unknown>;
|
|
157
|
-
get store():
|
|
158
|
+
get store(): unknown;
|
|
158
159
|
get descriptor(): BaseEntityDescriptor;
|
|
159
160
|
get entityName(): string;
|
|
160
161
|
get attrDescriptors(): AbstractAttrDescriptor[];
|
|
@@ -167,13 +168,80 @@ declare abstract class BaseEntityFacade<Entity extends BaseEntity> {
|
|
|
167
168
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BaseEntityFacade<any>>;
|
|
168
169
|
}
|
|
169
170
|
|
|
171
|
+
declare const BASE_ENTITY_STORE: InjectionToken<unknown>;
|
|
172
|
+
interface BaseEntityStoreApi<Entity extends BaseEntity> {
|
|
173
|
+
entities: Signal<Entity[]>;
|
|
174
|
+
selectedEntities: Signal<Entity[]>;
|
|
175
|
+
currentEntity: Signal<Entity | undefined>;
|
|
176
|
+
currentId: Signal<string | undefined>;
|
|
177
|
+
isLoading: Signal<boolean>;
|
|
178
|
+
error: Signal<string | undefined>;
|
|
179
|
+
page: Signal<number>;
|
|
180
|
+
pageSize: Signal<number>;
|
|
181
|
+
totalPageCount: Signal<number>;
|
|
182
|
+
filterKey: Signal<string | undefined>;
|
|
183
|
+
activeTabs: Signal<string[]>;
|
|
184
|
+
currentTab: Signal<string | undefined>;
|
|
185
|
+
countOfEntities: Signal<number>;
|
|
186
|
+
matTableDataSource: Signal<MatTableDataSource<Entity>>;
|
|
187
|
+
add(entity: Entity): Promise<PersistedEntity<Entity> | undefined>;
|
|
188
|
+
delete(id: string): Promise<void>;
|
|
189
|
+
deleteAll(input?: void): void;
|
|
190
|
+
deselectAll(): void;
|
|
191
|
+
deselectEntity(id: string): void;
|
|
192
|
+
load(query: BaseEntityQueryCondition): void;
|
|
193
|
+
loadById(id: string): Entity | undefined;
|
|
194
|
+
resetErrorState(): void;
|
|
195
|
+
selectEntity(id: string): void;
|
|
196
|
+
setCurrentEntity(id: string | undefined): void;
|
|
197
|
+
update(entity: PersistedEntity<Entity>): Promise<PersistedEntity<Entity> | undefined>;
|
|
198
|
+
clearCurrentEntity(): void;
|
|
199
|
+
createEntity(): Entity;
|
|
200
|
+
doFilter(filterKey: string): void;
|
|
201
|
+
reset(): void;
|
|
202
|
+
tabIsActive(tabName: string): void;
|
|
203
|
+
tabIsInactive(tabName: string): void;
|
|
204
|
+
}
|
|
205
|
+
declare function BaseEntityStore<Entity extends BaseEntity>(entityType: new () => Entity, getRepository: () => BaseEntityService<Entity>): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
|
|
206
|
+
state: {
|
|
207
|
+
entities: Entity[];
|
|
208
|
+
page: number;
|
|
209
|
+
pageSize: number;
|
|
210
|
+
totalPageCount: number;
|
|
211
|
+
currentId: string | undefined;
|
|
212
|
+
currentEntity: Entity | undefined;
|
|
213
|
+
isLoading: boolean;
|
|
214
|
+
error: string | undefined;
|
|
215
|
+
selectedEntities: Entity[];
|
|
216
|
+
};
|
|
217
|
+
props: {
|
|
218
|
+
countOfEntities: Signal<number>;
|
|
219
|
+
matTableDataSource: Signal<MatTableDataSource<Entity, _angular_material_paginator.MatPaginator>>;
|
|
220
|
+
};
|
|
221
|
+
methods: {
|
|
222
|
+
clearCurrentEntity: () => void;
|
|
223
|
+
createEntity: () => Entity;
|
|
224
|
+
add: (entity: Entity) => Promise<PersistedEntity<Entity> | undefined>;
|
|
225
|
+
delete: (id: string) => Promise<void>;
|
|
226
|
+
deleteAll: _ngrx_signals_rxjs_interop.RxMethod<void>;
|
|
227
|
+
deselectAll: () => void;
|
|
228
|
+
deselectEntity: (id: string) => void;
|
|
229
|
+
load: _ngrx_signals_rxjs_interop.RxMethod<BaseEntityQueryCondition>;
|
|
230
|
+
loadById: (id: string) => Entity | undefined;
|
|
231
|
+
resetErrorState: () => void;
|
|
232
|
+
selectEntity: (id: string) => void;
|
|
233
|
+
setCurrentEntity: (id: string | undefined) => void;
|
|
234
|
+
update: (entity: PersistedEntity<Entity>) => Promise<PersistedEntity<Entity> | undefined>;
|
|
235
|
+
};
|
|
236
|
+
}>;
|
|
237
|
+
|
|
170
238
|
declare class BaseEntityContainerComponent implements OnDestroy, OnInit {
|
|
171
239
|
entityDescriptor: _angular_core.InputSignal<BaseEntityDescriptor | undefined>;
|
|
172
|
-
facade: _angular_core.InputSignal<BaseEntityFacade<
|
|
240
|
+
facade: _angular_core.InputSignal<BaseEntityFacade<BaseEntity> | undefined>;
|
|
173
241
|
private readonly injectedFacade;
|
|
174
242
|
protected snackBar: MatSnackBar;
|
|
175
|
-
store:
|
|
176
|
-
protected activeFacade: _angular_core.Signal<BaseEntityFacade<
|
|
243
|
+
store: BaseEntityStoreApi<BaseEntity>;
|
|
244
|
+
protected activeFacade: _angular_core.Signal<BaseEntityFacade<BaseEntity> | undefined>;
|
|
177
245
|
protected resolvedDescriptor: _angular_core.Signal<BaseEntityDescriptor>;
|
|
178
246
|
constructor();
|
|
179
247
|
ngOnDestroy(): void;
|
|
@@ -203,7 +271,7 @@ declare class BaseEntityRestService<Entity extends BaseEntity> implements BaseEn
|
|
|
203
271
|
protected headers: HttpHeaders;
|
|
204
272
|
constructor(entityMapper: BaseEntityMapper<Entity>, urlProperty: string, resourceUrl: string);
|
|
205
273
|
delete(id: string): Observable<unknown>;
|
|
206
|
-
deleteAll(): Observable<
|
|
274
|
+
deleteAll(): Observable<unknown>;
|
|
207
275
|
findAll(page?: number): Observable<BaseEntityLoadResponse<PersistedEntity<Entity>> | PersistedEntity<Entity>[] | PersistedEntity<Entity>>;
|
|
208
276
|
findByQuery(queryCondition: BaseEntityQueryCondition): Observable<BaseEntityLoadResponse<PersistedEntity<Entity>> | PersistedEntity<Entity>[] | PersistedEntity<Entity>>;
|
|
209
277
|
findById(id: string): Observable<void | PersistedEntity<Entity>>;
|
|
@@ -223,7 +291,7 @@ declare class BaseEntityAttrDescriptor extends AbstractAttrDescriptor {
|
|
|
223
291
|
isLinkToDetails?: boolean;
|
|
224
292
|
selectables?: Array<{
|
|
225
293
|
key: string;
|
|
226
|
-
value:
|
|
294
|
+
value: unknown;
|
|
227
295
|
}>;
|
|
228
296
|
visible: boolean;
|
|
229
297
|
hideInTable?: boolean;
|
|
@@ -238,7 +306,7 @@ declare class BaseEntityAttrDescriptor extends AbstractAttrDescriptor {
|
|
|
238
306
|
private _linkedEntityType?;
|
|
239
307
|
constructor(attrName: string, formControlType: FormControlType, label?: string, selectables?: Array<{
|
|
240
308
|
key: string;
|
|
241
|
-
value:
|
|
309
|
+
value: unknown;
|
|
242
310
|
}>, isLinkToDetails?: boolean, options?: object);
|
|
243
311
|
get label(): string;
|
|
244
312
|
set label(label: string);
|
|
@@ -271,7 +339,7 @@ declare class BaseEntityFormComponent<Entity extends BaseEntity> implements OnIn
|
|
|
271
339
|
entityId: InputSignal<string>;
|
|
272
340
|
isAbstract: Signal<boolean>;
|
|
273
341
|
isNewObject: Signal<boolean>;
|
|
274
|
-
store: Signal<
|
|
342
|
+
store: Signal<BaseEntityStoreApi<Entity>>;
|
|
275
343
|
componentHost: BaseFormHostDirective;
|
|
276
344
|
private readonly entityFormBuilder;
|
|
277
345
|
private readonly formBuilder;
|
|
@@ -333,7 +401,7 @@ declare class BaseEntityListComponent<Entity extends BaseEntity> implements Afte
|
|
|
333
401
|
displayedColumns: Signal<string[]>;
|
|
334
402
|
sort: MatSort;
|
|
335
403
|
paginator: MatPaginator;
|
|
336
|
-
store:
|
|
404
|
+
store: BaseEntityStoreApi<PersistedEntity<Entity>>;
|
|
337
405
|
protected selectOrCreateMode: _angular_core.WritableSignal<boolean>;
|
|
338
406
|
private requestPayload?;
|
|
339
407
|
constructor();
|
|
@@ -359,7 +427,7 @@ declare class BaseEntityListComponent<Entity extends BaseEntity> implements Afte
|
|
|
359
427
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseEntityListComponent<any>, "base-list", never, {}, {}, never, never, true, never>;
|
|
360
428
|
}
|
|
361
429
|
|
|
362
|
-
declare const ACTIVE_ENTITY_FACADE: InjectionToken<BaseEntityFacade<
|
|
430
|
+
declare const ACTIVE_ENTITY_FACADE: InjectionToken<BaseEntityFacade<BaseEntity>>;
|
|
363
431
|
|
|
364
432
|
declare function BaseEntityTabsStore(): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
|
|
365
433
|
state: {
|
|
@@ -374,47 +442,13 @@ declare function BaseEntityTabsStore(): _ngrx_signals.SignalStoreFeature<_ngrx_s
|
|
|
374
442
|
};
|
|
375
443
|
}>;
|
|
376
444
|
|
|
377
|
-
|
|
378
|
-
declare function BaseEntityStore<Entity extends BaseEntity>(entityType: new () => Entity, getRepository: () => BaseEntityService<Entity>): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
|
|
379
|
-
state: {
|
|
380
|
-
entities: Entity[];
|
|
381
|
-
page: number;
|
|
382
|
-
pageSize: number;
|
|
383
|
-
totalPageCount: number;
|
|
384
|
-
currentId: string | undefined;
|
|
385
|
-
currentEntity: Entity | undefined;
|
|
386
|
-
isLoading: boolean;
|
|
387
|
-
error: string | undefined;
|
|
388
|
-
selectedEntities: Entity[];
|
|
389
|
-
};
|
|
390
|
-
props: {
|
|
391
|
-
countOfEntities: _angular_core.Signal<number>;
|
|
392
|
-
matTableDataSource: _angular_core.Signal<MatTableDataSource<Entity, _angular_material_paginator.MatPaginator>>;
|
|
393
|
-
};
|
|
394
|
-
methods: {
|
|
395
|
-
clearCurrentEntity: () => void;
|
|
396
|
-
createEntity: () => Entity;
|
|
397
|
-
add: (entity: Entity) => Promise<PersistedEntity<Entity> | undefined>;
|
|
398
|
-
delete: (id: string) => Promise<void>;
|
|
399
|
-
deleteAll: _ngrx_signals_rxjs_interop.RxMethod<void>;
|
|
400
|
-
deselectAll: () => void;
|
|
401
|
-
deselectEntity: (id: string) => void;
|
|
402
|
-
load: _ngrx_signals_rxjs_interop.RxMethod<_processpuzzle_base_entity.BaseEntityQueryCondition>;
|
|
403
|
-
loadById: (id: string) => Entity | undefined;
|
|
404
|
-
resetErrorState: () => void;
|
|
405
|
-
selectEntity: (id: string) => void;
|
|
406
|
-
setCurrentEntity: (id: string) => void;
|
|
407
|
-
update: (entity: PersistedEntity<Entity>) => Promise<PersistedEntity<Entity> | undefined>;
|
|
408
|
-
};
|
|
409
|
-
}>;
|
|
410
|
-
|
|
411
|
-
type BaseEntityFacadeRegistry = Record<string, ProviderToken<BaseEntityFacade<any>>>;
|
|
445
|
+
type BaseEntityFacadeRegistry = Record<string, ProviderToken<BaseEntityFacade<BaseEntity>>>;
|
|
412
446
|
declare const BASE_ENTITY_FACADE_REGISTRY: InjectionToken<BaseEntityFacadeRegistry>;
|
|
413
447
|
declare class EntityRegistryComponent {
|
|
414
|
-
private registry;
|
|
415
|
-
private injector;
|
|
416
|
-
private queryParams;
|
|
417
|
-
private descriptors;
|
|
448
|
+
private readonly registry;
|
|
449
|
+
private readonly injector;
|
|
450
|
+
private readonly queryParams;
|
|
451
|
+
private readonly descriptors;
|
|
418
452
|
protected registryJson: _angular_core.Signal<string>;
|
|
419
453
|
private buildDescriptors;
|
|
420
454
|
private serializeAttr;
|
|
@@ -510,7 +544,7 @@ declare function BaseFormNavigatorStore(entityName: string): _ngrx_signals.Signa
|
|
|
510
544
|
declare class BaseEntityFirestoreService<Entity extends BaseEntity> implements BaseEntityService<Entity> {
|
|
511
545
|
protected entityMapper: BaseEntityMapper<Entity>;
|
|
512
546
|
protected collectionName: string;
|
|
513
|
-
protected collection: _firebase_firestore.CollectionReference<
|
|
547
|
+
protected collection: _firebase_firestore.CollectionReference<DocumentData, DocumentData>;
|
|
514
548
|
protected readonly firestore: Firestore;
|
|
515
549
|
constructor(entityMapper: BaseEntityMapper<Entity>, collectionName: string);
|
|
516
550
|
add(entity: Entity): Observable<PersistedEntity<Entity>>;
|
|
@@ -521,10 +555,10 @@ declare class BaseEntityFirestoreService<Entity extends BaseEntity> implements B
|
|
|
521
555
|
findByQuery(queryCondition: BaseEntityQueryCondition): Observable<BaseEntityLoadResponse<PersistedEntity<Entity>> | PersistedEntity<Entity>[]>;
|
|
522
556
|
update(entity: PersistedEntity<Entity>): Observable<PersistedEntity<Entity>>;
|
|
523
557
|
protected addAsync(entity: Entity): Promise<PersistedEntity<Entity>>;
|
|
524
|
-
protected createQuery(queryCondition: BaseEntityQueryCondition): _firebase_firestore.Query<
|
|
558
|
+
protected createQuery(queryCondition: BaseEntityQueryCondition): _firebase_firestore.Query<DocumentData, DocumentData>;
|
|
525
559
|
protected findByQueryAsync(queryCondition: BaseEntityQueryCondition): Promise<BaseEntityLoadResponse<PersistedEntity<Entity>> | PersistedEntity<Entity>[]>;
|
|
526
|
-
protected mapCollection(
|
|
527
|
-
protected mapDocument(
|
|
560
|
+
protected mapCollection(source: Observable<unknown[]>): PersistedEntity<Entity>[];
|
|
561
|
+
protected mapDocument(docData: unknown): PersistedEntity<Entity>;
|
|
528
562
|
private mapEntity;
|
|
529
563
|
private updateAsync;
|
|
530
564
|
}
|
|
@@ -544,8 +578,8 @@ declare class FlexboxDescriptor extends AbstractAttrDescriptor {
|
|
|
544
578
|
* Defines an entity data transformer capable of transforming data to and from the server.
|
|
545
579
|
*/
|
|
546
580
|
interface IEntityTransformer {
|
|
547
|
-
fromServer?: (data:
|
|
548
|
-
toServer?: (entity:
|
|
581
|
+
fromServer?: (data: unknown, criteria?: unknown) => unknown;
|
|
582
|
+
toServer?: (entity: unknown, criteria?: unknown) => unknown;
|
|
549
583
|
}
|
|
550
584
|
interface EntityOptions {
|
|
551
585
|
modelName: string;
|
|
@@ -564,7 +598,7 @@ declare function Entity(options: EntityOptions): ClassDecorator;
|
|
|
564
598
|
* @param instance An instance of a class decorated with @Entity
|
|
565
599
|
* @returns The entity options or undefined if not found
|
|
566
600
|
*/
|
|
567
|
-
declare function getEntityOptions(instance:
|
|
601
|
+
declare function getEntityOptions(instance: object | null | undefined): EntityOptions | undefined;
|
|
568
602
|
/**
|
|
569
603
|
* Property decorator for marking entity properties as ID fields
|
|
570
604
|
* @returns PropertyDecorator function
|
|
@@ -575,7 +609,7 @@ declare function Id(): PropertyDecorator;
|
|
|
575
609
|
* @param instance An instance of a class with properties decorated with @Id
|
|
576
610
|
* @returns Array of property names marked as IDs or empty array if none found
|
|
577
611
|
*/
|
|
578
|
-
declare function getEntityIds(instance:
|
|
612
|
+
declare function getEntityIds(instance: object | null | undefined): string[];
|
|
579
613
|
|
|
580
614
|
declare const BASE_ENTITY_ROUTES: Routes;
|
|
581
615
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processpuzzle-base-entity.d.ts","sources":["
|
|
1
|
+
{"version":3,"file":"processpuzzle-base-entity.d.ts","sources":["../../../../../libs/js-shared/base-entity/src/lib/base-entity/abstact-attr.descriptor.ts","../../../../../libs/js-shared/base-entity/src/lib/base-form/artifact/artifact-attr.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity/base-entity.descriptor.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity/base-entity.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity.mapper.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-service/base-entity-load-response.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-service/base-entity.service.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-facade/base-entity-facade.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-store/base-entity.store.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-container.component.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-container.store.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-service/base-entity-rest.service.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity/base-entity-attr.descriptor.ts","../../../../../libs/js-shared/base-entity/src/lib/base-form-navigator/navigation-payload.ts","../../../../../libs/js-shared/base-entity/src/lib/base-form/base-form-host.directive.ts","../../../../../libs/js-shared/base-entity/src/lib/base-form/base-entity-form.component.ts","../../../../../libs/js-shared/base-entity/src/lib/base-list/base-entity-list.component.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-facade/active-entity-facade.token.ts","../../../../../libs/js-shared/base-entity/src/lib/base-tabs/base-entity-tabs.store.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-facade/base-entity-facade-registry.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-facade/base-entity-descriptor.registry.ts","../../../../../libs/js-shared/base-entity/src/lib/base-form-navigator/base-form-navigator.store.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity-service/base-entity-firestore.service.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity/flexboxDescriptor.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity/decorators/entity.decorator.ts","../../../../../libs/js-shared/base-entity/src/lib/base-entity.routes.ts","../../../../../libs/js-shared/base-entity/src/lib/base-form/lookup/lookup-table.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,aAAY,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED,uBAAsB,sBAAsB;;qBAEzB,eAAe;AAChC;AACA;AAAS;;AAET,6DAAyD,eAAe;AAIzE;;UC3BgB,YAAY;AAC3B;AACA;AACA;AACA;AACD;;ACDK,KAAM,WAAW;UAEN,2BAA2B;;qBAEzB,sBAAsB;;kBAEzB,WAAW;;;AAG1B;AAED,cAAa,oBAAoB;;qBAEd,sBAAsB;;iBAE1B,WAAW;AACxB;AACA;AAEY,+FAA+E,2BAA2B;AAS/G;AAIP;;AAaD;;UCjDgB,UAAU;AACzB;AACD;AAEK,UAAW,mBAAoB,SAAQ,UAAU;AACrD;AACD;AAEK,KAAM,eAAe,gBAAgB,UAAU,aAAa,mBAAmB;;ACH/E,UAAW,gBAAgB,gBAAgB,UAAU;;AAEzD;AACD;AAED,cAAa,kBAAkB,gBAAgB,UAAU,aAAa,gBAAgB;;;AAGpF;AAMA;AAGD;AAED,iBAAgB,iBAAiB;AAAc;AAAuB;AAItE,iB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