@sumaris-net/ngx-components 1.21.0-beta18 → 1.21.0-beta19

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": "1.21.0-beta18",
4
+ "version": "1.21.0-beta19",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -16,11 +16,9 @@ export declare class UserEventTestService extends AbstractUserEventService<UserE
16
16
  protected translate: TranslateService;
17
17
  protected environment: Environment;
18
18
  private userEvents;
19
- private count$;
20
19
  constructor(graphql: GraphqlService, accountService: AccountService, network: NetworkService, translate: TranslateService, environment: Environment);
21
20
  fromObject(source: any): UserEvent;
22
21
  add(entity: IUserEvent<any>): void;
23
- get userEventCount(): Observable<number>;
24
22
  asFilter(filter: Partial<any>): any;
25
23
  count(filter: any, options?: {
26
24
  fetchPolicy?: FetchPolicy;
@@ -2,7 +2,7 @@ import { InjectionToken, OnDestroy } from '@angular/core';
2
2
  import { FetchPolicy } from '@apollo/client/core';
3
3
  import { AccountService } from '../../core/services/account.service';
4
4
  import { GraphqlService } from '../../core/graphql/graphql.service';
5
- import { Observable, Subscription } from 'rxjs';
5
+ import { BehaviorSubject, Observable, Subscription } from 'rxjs';
6
6
  import { IUserEvent, IUserEventFilter, UserEvent, UserEventFilter } from './user-event.model';
7
7
  import { SortDirection } from '@angular/material/sort';
8
8
  import { EntitiesServiceWatchOptions, EntityServiceLoadOptions, IEntitiesService, LoadResult, Page } from '../../shared/services/entity-service.class';
@@ -53,6 +53,7 @@ export interface IUserEventService<E extends IUserEvent<E>, F extends IUserEvent
53
53
  delete(entity: E): Promise<any>;
54
54
  markAsRead(entity: E): any;
55
55
  registerListener(listener: IUserEventListener<E>): any;
56
+ resetCount(): any;
56
57
  }
57
58
  export declare abstract class AbstractUserEventService<E extends IUserEvent<E, any>, F extends IUserEventFilter<E, any>, WO extends UserEventWatchOptions = UserEventWatchOptions> extends BaseGraphqlService<E, F> implements IUserEventService<E, F, WO>, OnDestroy {
58
59
  protected graphql: GraphqlService;
@@ -63,10 +64,10 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, a
63
64
  protected mutations: IUserEventMutations;
64
65
  protected subscriptions: IUserEventSubscriptions;
65
66
  protected environment: Environment;
66
- private _count$;
67
+ protected _count$: BehaviorSubject<number>;
67
68
  protected _subscriptions: Subscription;
68
- private _listenSubscription;
69
69
  protected listeners: IUserEventListener<E>[];
70
+ private _listenSubscription;
70
71
  get userEventCount(): Observable<number>;
71
72
  protected constructor(graphql: GraphqlService, accountService: AccountService, network: NetworkService, translate: TranslateService, queries: IUserEventQueries, mutations: IUserEventMutations, subscriptions: IUserEventSubscriptions, environment: Environment);
72
73
  protected ngOnStart(): Promise<void>;
@@ -93,6 +94,7 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, a
93
94
  saveAll(data: E[], opts?: any): Promise<E[]>;
94
95
  markAsRead(entity: E): Promise<void>;
95
96
  registerListener(listener: IUserEventListener<E>): void;
97
+ resetCount(): void;
96
98
  protected onLogin(): Promise<void>;
97
99
  protected onLogout(): void;
98
100
  protected processUserEvent(source: any, that?: AbstractUserEventService<E, F>): E;