@sumaris-net/ngx-components 18.2.2 → 18.2.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "18.2.2",
4
+ "version": "18.2.3",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -6,7 +6,7 @@ import { NetworkService } from '../../../core/services/network.service';
6
6
  import { TranslateService } from '@ngx-translate/core';
7
7
  import { Environment } from '../../../../environments/environment.class';
8
8
  import { FetchPolicy } from '@apollo/client/core';
9
- import { EntityServiceLoadOptions, LoadResult } from '../../../shared/services/entity-service.class';
9
+ import { LoadResult } from '../../../shared/services/entity-service.class';
10
10
  import { SortDirection } from '@angular/material/sort';
11
11
  import { UserEventTest, UserEventTestFilter } from './user-event.testing.model';
12
12
  import * as i0 from "@angular/core";
@@ -28,15 +28,14 @@ export declare class UserEventTestService extends AbstractUserEventService<UserE
28
28
  }): Promise<number>;
29
29
  delete(entity: any): Promise<any>;
30
30
  deleteAll(data: any[], opts?: any): Promise<any>;
31
- listenAllChanges(filter: any, options?: UserEventWatchOptions & {
31
+ listenAllChanges(filter: any, options?: UserEventLoadOptions<UserEventTest> & {
32
32
  interval?: number;
33
- fetchPolicy?: FetchPolicy;
34
33
  }): Observable<any[]>;
35
- save(entity: any, options?: EntityServiceLoadOptions): Promise<any>;
34
+ save(entity: any, options?: UserEventLoadOptions<UserEventTest>): Promise<any>;
36
35
  saveAll(data: any[], opts?: any): Promise<any[]>;
37
36
  protected defaultRecipient(): any;
38
- watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventWatchOptions): Observable<LoadResult<any>>;
39
- loadAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventLoadOptions): Promise<LoadResult<any>>;
37
+ watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventWatchOptions<UserEventTest>): Observable<LoadResult<any>>;
38
+ loadAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventLoadOptions<UserEventTest>): Promise<LoadResult<any>>;
40
39
  static ɵfac: i0.ɵɵFactoryDeclaration<UserEventTestService, never>;
41
40
  static ɵprov: i0.ɵɵInjectableDeclaration<UserEventTestService>;
42
41
  }
@@ -14,11 +14,11 @@ import { IStartableService } from '../../shared/services/startable-service.class
14
14
  import { DocumentNode } from 'graphql/index';
15
15
  import { MutableWatchQueriesUpdatePolicy } from '../../core/services/base-entity-service.class';
16
16
  import * as i0 from "@angular/core";
17
- export declare const APP_USER_EVENT_SERVICE: InjectionToken<IUserEventService<any, any, number, UserEventWatchOptions, UserEventLoadOptions>>;
18
- export declare interface UserEventLoadOptions extends EntitiesServiceLoadOptions {
17
+ export declare const APP_USER_EVENT_SERVICE: InjectionToken<IUserEventService<any, any, number, UserEventWatchOptions<any>, UserEventLoadOptions<any>>>;
18
+ export declare interface UserEventLoadOptions<T> extends EntitiesServiceLoadOptions<T> {
19
19
  withContent?: boolean;
20
20
  }
21
- export declare interface UserEventWatchOptions extends EntitiesServiceWatchOptions {
21
+ export declare interface UserEventWatchOptions<T> extends EntitiesServiceWatchOptions<T> {
22
22
  withContent?: boolean;
23
23
  }
24
24
  export interface IUserEventQueries {
@@ -46,28 +46,26 @@ export interface UserEventServiceOptions<Q extends IUserEventQueries = IUserEven
46
46
  subscriptions?: Partial<S>;
47
47
  watchQueriesUpdatePolicy?: MutableWatchQueriesUpdatePolicy;
48
48
  }
49
- export interface IUserEventService<E extends IUserEvent<E, ID>, F extends IUserEventFilter<E, ID>, ID = number, WO extends UserEventWatchOptions = UserEventWatchOptions, LO extends UserEventLoadOptions = UserEventLoadOptions> extends IEntitiesService<E, F, WO>, IStartableService {
49
+ export interface IUserEventService<E extends IUserEvent<E, ID>, F extends IUserEventFilter<E, ID>, ID = number, WO extends UserEventWatchOptions<E> = UserEventWatchOptions<E>, LO extends UserEventLoadOptions<E> = UserEventLoadOptions<E>> extends IEntitiesService<E, F, WO>, IStartableService {
50
50
  countSubject: Observable<number>;
51
51
  add(entity: E): Promise<E>;
52
52
  load(id: ID, opts?: LO): Promise<E>;
53
53
  count(filter: Partial<F>, options?: {
54
54
  fetchPolicy?: FetchPolicy;
55
55
  }): Promise<number>;
56
- listenCountChanges(filter: Partial<F>, options?: WO & {
56
+ listenCountChanges(filter: Partial<F>, options?: Omit<LO, 'toEntity'> & {
57
57
  interval?: number;
58
- fetchPolicy?: FetchPolicy;
59
58
  }): Observable<number>;
60
- listenAllChanges(filter: Partial<F>, options?: WO & {
59
+ listenAllChanges(filter: Partial<F>, options?: LO & {
61
60
  interval?: number;
62
- fetchPolicy?: FetchPolicy;
63
61
  }): Observable<E[]>;
64
- save(entity: E, options?: EntityServiceLoadOptions): Promise<E>;
62
+ save(entity: E, options?: LO): Promise<E>;
65
63
  delete(entity: E): Promise<any>;
66
64
  markAllAsRead(entities: E[]): any;
67
65
  registerListener(listener: IUserEventListener<E, ID>): any;
68
66
  resetCount(): any;
69
67
  }
70
- export declare abstract class AbstractUserEventService<E extends IUserEvent<E, ID, any>, F extends IUserEventFilter<E, ID, any>, ID = number, WO extends UserEventWatchOptions = UserEventWatchOptions, LO extends UserEventLoadOptions = UserEventLoadOptions, Q extends IUserEventQueries = IUserEventQueries, M extends IUserEventMutations = IUserEventMutations, S extends IUserEventSubscriptions = IUserEventSubscriptions> extends BaseGraphqlService<E, F, ID> implements IUserEventService<E, F, ID, WO, LO>, OnDestroy {
68
+ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, ID, any>, F extends IUserEventFilter<E, ID, any>, ID = number, WO extends UserEventWatchOptions<E> = UserEventWatchOptions<E>, LO extends UserEventLoadOptions<E> = UserEventLoadOptions<E>, Q extends IUserEventQueries = IUserEventQueries, M extends IUserEventMutations = IUserEventMutations, S extends IUserEventSubscriptions = IUserEventSubscriptions> extends BaseGraphqlService<E, F, ID> implements IUserEventService<E, F, ID, WO, LO>, OnDestroy {
71
69
  protected graphql: GraphqlService;
72
70
  protected accountService: AccountService;
73
71
  protected network: NetworkService;
@@ -96,18 +94,15 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, I
96
94
  count(filter: Partial<F>, options?: {
97
95
  fetchPolicy?: FetchPolicy;
98
96
  }): Promise<number>;
99
- listenCountChanges(filter: Partial<F>, options?: WO & {
97
+ listenCountChanges(filter: Partial<F>, options?: Omit<LO, 'toEntity'> & {
100
98
  interval?: number;
101
- fetchPolicy?: FetchPolicy;
102
99
  }): Observable<number>;
103
- listenAllChanges(filter: Partial<F>, opts?: WO & {
100
+ listenAllChanges(filter: Partial<F>, opts?: LO & {
104
101
  interval?: number;
105
- fetchPolicy?: FetchPolicy;
106
- toEntity?: boolean;
107
102
  }): Observable<E[]>;
108
103
  delete(entity: E): Promise<any>;
109
104
  deleteAll(entities: E[], opts?: any): Promise<any>;
110
- save(entity: E, options?: EntityServiceLoadOptions): Promise<E>;
105
+ save(entity: E, options?: EntityServiceLoadOptions<E>): Promise<E>;
111
106
  saveAll(entities: E[], opts?: any): Promise<E[]>;
112
107
  markAllAsRead(entities: E[]): Promise<void>;
113
108
  registerListener(listener: IUserEventListener<E, ID>): void;
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "18.2.2",
5
+ "version": "18.2.3",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{