@processpuzzle/base-entity 0.3.1 → 0.3.4

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,10 +1,10 @@
1
1
  {
2
2
  "name": "@processpuzzle/base-entity",
3
- "version": "0.3.1",
3
+ "version": "0.3.4",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Zsolt Zsuffa",
7
- "email": "zsolt.zsuffa@gmailmcom"
7
+ "email": "zsolt.zsuffa@gmail.com"
8
8
  },
9
9
  "publishConfig": {
10
10
  "access": "public"
@@ -16,16 +16,16 @@
16
16
  },
17
17
  "homepage": "https://github.com/ZsZs/processpuzzle#readme",
18
18
  "peerDependencies": {
19
- "@angular/cdk": "^20.2.10",
20
- "@angular/common": "~20.3.9",
21
- "@angular/core": "~20.3.9",
22
- "@angular/forms": "~20.3.9",
23
- "@angular/material": "^20.2.10",
24
- "@angular/platform-browser": "~20.3.9",
25
- "@angular/router": "~20.3.9",
19
+ "@angular/cdk": "^21.2.2",
20
+ "@angular/common": "~21.2.3",
21
+ "@angular/core": "~21.2.3",
22
+ "@angular/forms": "~21.2.3",
23
+ "@angular/material": "^21.2.2",
24
+ "@angular/platform-browser": "~21.2.3",
25
+ "@angular/router": "~21.2.3",
26
26
  "@angular/fire": "^20.0.1",
27
- "@ngrx/operators": "^20.1.0",
28
- "@ngrx/signals": "^20.1.0",
27
+ "@ngrx/operators": "^21.0.1",
28
+ "@ngrx/signals": "^21.0.1",
29
29
  "@processpuzzle/util": "^0.2.4",
30
30
  "build-url-ts": "^6.2.0",
31
31
  "rxjs": "~7.8.2",
@@ -36,13 +36,13 @@
36
36
  },
37
37
  "sideEffects": false,
38
38
  "module": "fesm2022/processpuzzle-base-entity.mjs",
39
- "typings": "index.d.ts",
39
+ "typings": "types/processpuzzle-base-entity.d.ts",
40
40
  "exports": {
41
41
  "./package.json": {
42
42
  "default": "./package.json"
43
43
  },
44
44
  ".": {
45
- "types": "./index.d.ts",
45
+ "types": "./types/processpuzzle-base-entity.d.ts",
46
46
  "default": "./fesm2022/processpuzzle-base-entity.mjs"
47
47
  }
48
48
  }
@@ -1,19 +1,17 @@
1
- import { Routes, Router } from '@angular/router';
2
1
  import * as _ngrx_signals from '@ngrx/signals';
3
2
  import * as i0 from '@angular/core';
4
- import { OnDestroy, OnInit, ViewContainerRef, Signal, AfterViewInit, InjectionToken, ProviderToken } from '@angular/core';
5
- import { MatSnackBar } from '@angular/material/snack-bar';
3
+ import { ViewContainerRef, OnInit, Signal, InjectionToken, AfterViewInit, ProviderToken } from '@angular/core';
6
4
  import { FormGroup } from '@angular/forms';
7
5
  import { MatTableDataSource } from '@angular/material/table';
8
6
  import { MatSort } from '@angular/material/sort';
7
+ import * as _angular_material_paginator from '@angular/material/paginator';
9
8
  import { MatPaginator } from '@angular/material/paginator';
9
+ import { Router, Routes } from '@angular/router';
10
10
  import { SelectionModel } from '@angular/cdk/collections';
11
11
  import { WhereFilterOp, Firestore } from '@angular/fire/firestore';
12
12
  import { Observable } from 'rxjs';
13
- import { HttpClient, HttpHeaders } from '@angular/common/http';
14
13
  import * as _processpuzzle_base_entity from '@processpuzzle/base-entity';
15
14
  import * as _ngrx_signals_rxjs_interop from '@ngrx/signals/rxjs-interop';
16
- import * as _angular_material_paginator_d from '@angular/material/paginator.d';
17
15
  import * as _firebase_firestore from '@firebase/firestore';
18
16
 
19
17
  declare enum FormControlType {
@@ -38,8 +36,6 @@ declare abstract class AbstractAttrDescriptor {
38
36
  protected constructor(attrName: string, formControlType: FormControlType);
39
37
  }
40
38
 
41
- declare const BASE_ENTITY_ROUTES: Routes;
42
-
43
39
  declare function BaseEntityContainerStore(): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
44
40
  state: {
45
41
  filterKey: string | undefined;
@@ -54,25 +50,6 @@ interface BaseEntity {
54
50
  readonly id: string;
55
51
  }
56
52
 
57
- interface BaseEntityDescriptor {
58
- store: any;
59
- attrDescriptors: AbstractAttrDescriptor[];
60
- entityName: string;
61
- entityTitle: string;
62
- }
63
-
64
- declare class BaseEntityContainerComponent implements OnDestroy, OnInit {
65
- baseEntityListOptions: i0.InputSignal<BaseEntityDescriptor>;
66
- protected snackBar: MatSnackBar;
67
- store: any;
68
- constructor();
69
- ngOnDestroy(): void;
70
- ngOnInit(): void;
71
- private registerEffects;
72
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseEntityContainerComponent, never>;
73
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityContainerComponent, "base-entity-container", never, { "baseEntityListOptions": { "alias": "baseEntityListOptions"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
74
- }
75
-
76
53
  declare class BaseEntityAttrDescriptor extends AbstractAttrDescriptor {
77
54
  description?: string;
78
55
  styleClass?: string | undefined;
@@ -102,6 +79,13 @@ declare class BaseEntityAttrDescriptor extends AbstractAttrDescriptor {
102
79
  set linkedEntityType(linkedEntityType: string);
103
80
  }
104
81
 
82
+ interface BaseEntityDescriptor {
83
+ store: any;
84
+ attrDescriptors: AbstractAttrDescriptor[];
85
+ entityName: string;
86
+ entityTitle: string;
87
+ }
88
+
105
89
  declare class BaseFormHostDirective {
106
90
  viewContainerRef: ViewContainerRef;
107
91
  constructor(viewContainerRef: ViewContainerRef);
@@ -196,38 +180,6 @@ interface BaseEntityMapper<Entity extends BaseEntity> {
196
180
  toDto(entity: Entity): any;
197
181
  }
198
182
 
199
- declare const BASE_ENTITY_SERVICE: InjectionToken<BaseEntityService<any>>;
200
- interface BaseEntityService<Entity extends BaseEntity> {
201
- add(entity: Entity, id?: number): Observable<Entity>;
202
- delete(id: string): Observable<unknown>;
203
- deleteAll(): Observable<unknown>;
204
- findAll(page?: number, pageSize?: number): Observable<BaseEntityLoadResponse<Entity> | Entity[] | Entity>;
205
- findById(id: string): Observable<Entity | void>;
206
- findByQuery(condition: BaseEntityQueryCondition): Observable<BaseEntityLoadResponse<Entity> | Entity[] | Entity>;
207
- update(entity: Entity): Observable<Entity>;
208
- }
209
-
210
- declare abstract class BaseEntityRestService<Entity extends BaseEntity> implements BaseEntityService<Entity> {
211
- protected entityMapper: BaseEntityMapper<Entity>;
212
- protected urlProperty: string;
213
- protected resourceUrl: string;
214
- private readonly runtimeConfiguration;
215
- private readonly baseUrl;
216
- protected httpClient: HttpClient;
217
- protected headers: HttpHeaders;
218
- protected constructor(entityMapper: BaseEntityMapper<Entity>, urlProperty: string, resourceUrl: string);
219
- delete(id: string): Observable<unknown>;
220
- deleteAll(): Observable<any>;
221
- findAll(page?: number): Observable<BaseEntityLoadResponse<Entity> | Entity[] | Entity>;
222
- findByQuery(queryCondition: BaseEntityQueryCondition): Observable<BaseEntityLoadResponse<Entity> | Entity[] | Entity>;
223
- findById(id: string): Observable<void | Entity>;
224
- add(entity: Entity, id?: number): Observable<Entity>;
225
- update(entity: Entity): Observable<Entity>;
226
- protected buildFullUrl(resourceUri: string, queryCondition: BaseEntityQueryCondition): string | undefined;
227
- private mapPagedResponse;
228
- private mapSimpleResponse;
229
- }
230
-
231
183
  declare function BaseEntityTabsStore(): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
232
184
  state: {
233
185
  activeTabs: string[];
@@ -241,6 +193,17 @@ declare function BaseEntityTabsStore(): _ngrx_signals.SignalStoreFeature<_ngrx_s
241
193
  };
242
194
  }>;
243
195
 
196
+ declare const BASE_ENTITY_SERVICE: InjectionToken<BaseEntityService<any>>;
197
+ interface BaseEntityService<Entity extends BaseEntity> {
198
+ add(entity: Entity, id?: number): Observable<Entity>;
199
+ delete(id: string): Observable<unknown>;
200
+ deleteAll(): Observable<unknown>;
201
+ findAll(page?: number, pageSize?: number): Observable<BaseEntityLoadResponse<Entity> | Entity[] | Entity>;
202
+ findById(id: string): Observable<Entity | void>;
203
+ findByQuery(condition: BaseEntityQueryCondition): Observable<BaseEntityLoadResponse<Entity> | Entity[] | Entity>;
204
+ update(entity: Entity): Observable<Entity>;
205
+ }
206
+
244
207
  declare const BASE_ENTITY_STORE: InjectionToken<any>;
245
208
  declare function BaseEntityStore<Entity extends BaseEntity>(entityType: new () => Entity, repositoryType: ProviderToken<BaseEntityService<Entity>>): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
246
209
  state: {
@@ -256,7 +219,7 @@ declare function BaseEntityStore<Entity extends BaseEntity>(entityType: new () =
256
219
  };
257
220
  props: {
258
221
  countOfEntities: i0.Signal<number>;
259
- matTableDataSource: i0.Signal<MatTableDataSource<Entity, _angular_material_paginator_d.MatPaginator>>;
222
+ matTableDataSource: i0.Signal<MatTableDataSource<Entity, _angular_material_paginator.MatPaginator>>;
260
223
  };
261
224
  methods: {
262
225
  clearCurrentEntity: () => void;
@@ -376,5 +339,7 @@ declare function Id(): PropertyDecorator;
376
339
  */
377
340
  declare function getEntityIds(instance: any): string[];
378
341
 
379
- export { AbstractAttrDescriptor, BASE_ENTITY_ROUTES, BASE_ENTITY_SERVICE, BASE_ENTITY_STORE, BASE_LIST_DESCRIPTORS, BaseEntityAttrDescriptor, BaseEntityContainerComponent, BaseEntityContainerStore, BaseEntityFirestoreService, BaseEntityFormComponent, BaseEntityListComponent, BaseEntityRestService, BaseEntityStore, BaseEntityTabsStore, BaseFormHostDirective, BaseFormNavigatorStore, Entity, FlexDirection, FlexboxDescriptor, FormControlType, Id, OrderByDirection, RouteSegments, getEntityIds, getEntityOptions };
342
+ declare const BASE_ENTITY_ROUTES: Routes;
343
+
344
+ export { AbstractAttrDescriptor, BASE_ENTITY_ROUTES, BASE_ENTITY_SERVICE, BASE_ENTITY_STORE, BASE_LIST_DESCRIPTORS, BaseEntityAttrDescriptor, BaseEntityContainerStore, BaseEntityFirestoreService, BaseEntityFormComponent, BaseEntityListComponent, BaseEntityStore, BaseEntityTabsStore, BaseFormHostDirective, BaseFormNavigatorStore, Entity, FlexDirection, FlexboxDescriptor, FormControlType, Id, OrderByDirection, RouteSegments, getEntityIds, getEntityOptions };
380
345
  export type { BaseEntity, BaseEntityDescriptor, BaseEntityLoadResponse, BaseEntityMapper, BaseEntityQueryCondition, EntityOptions, FilterCondition, NavigationState, OrderByCondition };