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

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-beta20",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -14,6 +14,7 @@ export declare class UserEventNotificationComponent implements OnInit, OnDestroy
14
14
  get count(): Observable<number>;
15
15
  private _logPrefix;
16
16
  private _readEvent;
17
+ private _readEvents;
17
18
  constructor(userEventService: IUserEventService<IUserEvent<any>, IUserEventFilter<any>>, accountService: AccountService, popoverController: PopoverController);
18
19
  ngOnInit(): Promise<void>;
19
20
  showList(event: UIEvent): Promise<void>;
@@ -7,6 +7,7 @@ export interface UserEventNotificationListOptions {
7
7
  debug?: boolean;
8
8
  titleI18n?: string;
9
9
  readEvent?: EventEmitter<IUserEvent<any>>;
10
+ readEvents?: EventEmitter<IUserEvent<any>[]>;
10
11
  }
11
12
  export declare class UserEventNotificationList implements OnInit, OnDestroy, UserEventNotificationListOptions {
12
13
  protected cd: ChangeDetectorRef;
@@ -15,12 +16,14 @@ export declare class UserEventNotificationList implements OnInit, OnDestroy, Use
15
16
  debug: boolean;
16
17
  titleI18n: string;
17
18
  readEvent: EventEmitter<IUserEvent<any>>;
19
+ readEvents: EventEmitter<IUserEvent<any>[]>;
18
20
  userEvents: BehaviorSubject<IUserEvent<any, string, import("../user-event.model").EventLevel>[]>;
19
21
  protected subscriptions: Subscription;
20
22
  constructor(cd: ChangeDetectorRef, popoverController: PopoverController, userEventService: IUserEventService<IUserEvent<any>, IUserEventFilter<any>>);
21
23
  ngOnInit(): void;
22
24
  ngOnDestroy(): void;
23
- read($event: UIEvent, userEvent: IUserEvent<any>): void;
25
+ read(event: UIEvent, userEvent: IUserEvent<any>): void;
26
+ readAll(event: UIEvent): void;
24
27
  executeAction(action: UserEventAction, userEvent: IUserEvent<any>): void;
25
28
  dismiss(): void;
26
29
  protected markForCheck(): void;
@@ -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';
@@ -24,6 +24,7 @@ export interface IUserEventQueries {
24
24
  }
25
25
  export interface IUserEventMutations {
26
26
  save: any;
27
+ saveAll?: any;
27
28
  deleteByIds: any;
28
29
  }
29
30
  export interface IUserEventSubscriptions {
@@ -51,8 +52,9 @@ export interface IUserEventService<E extends IUserEvent<E>, F extends IUserEvent
51
52
  }): Observable<E[]>;
52
53
  save(entity: E, options?: EntityServiceLoadOptions): Promise<E>;
53
54
  delete(entity: E): Promise<any>;
54
- markAsRead(entity: E): any;
55
+ markAsRead(entities: E[]): any;
55
56
  registerListener(listener: IUserEventListener<E>): any;
57
+ resetCount(): any;
56
58
  }
57
59
  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
60
  protected graphql: GraphqlService;
@@ -63,10 +65,10 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, a
63
65
  protected mutations: IUserEventMutations;
64
66
  protected subscriptions: IUserEventSubscriptions;
65
67
  protected environment: Environment;
66
- private _count$;
68
+ protected _count$: BehaviorSubject<number>;
67
69
  protected _subscriptions: Subscription;
68
- private _listenSubscription;
69
70
  protected listeners: IUserEventListener<E>[];
71
+ private _listenSubscription;
70
72
  get userEventCount(): Observable<number>;
71
73
  protected constructor(graphql: GraphqlService, accountService: AccountService, network: NetworkService, translate: TranslateService, queries: IUserEventQueries, mutations: IUserEventMutations, subscriptions: IUserEventSubscriptions, environment: Environment);
72
74
  protected ngOnStart(): Promise<void>;
@@ -90,13 +92,14 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, a
90
92
  delete(entity: E): Promise<any>;
91
93
  deleteAll(entities: E[], opts?: any): Promise<any>;
92
94
  save(entity: E, options?: EntityServiceLoadOptions): Promise<E>;
93
- saveAll(data: E[], opts?: any): Promise<E[]>;
94
- markAsRead(entity: E): Promise<void>;
95
+ saveAll(entities: E[], opts?: any): Promise<E[]>;
96
+ markAsRead(entities: E[]): Promise<void>;
95
97
  registerListener(listener: IUserEventListener<E>): void;
98
+ resetCount(): void;
96
99
  protected onLogin(): Promise<void>;
97
100
  protected onLogout(): void;
98
101
  protected processUserEvent(source: any, that?: AbstractUserEventService<E, F>): E;
99
- protected defaultMarkAsRead(userEvent: E): Promise<void>;
102
+ protected defaultMarkAsRead(userEvents: E[]): Promise<void>;
100
103
  protected defaultFilter(): F;
101
104
  protected defaultRecipient(): any;
102
105
  protected fillDefaultProperties(entity: E): void;
@@ -389,7 +389,8 @@
389
389
  "USER_EVENT": {
390
390
  "NOTIFICATION": {
391
391
  "TITLE": "Notifications",
392
- "EMPTY": "No notification"
392
+ "EMPTY": "No notification",
393
+ "READ_ALL": "Mark all as read"
393
394
  },
394
395
  "EVENT_TYPE": "Type",
395
396
  "CREATION_DATE": "Date/Time",
@@ -392,7 +392,8 @@
392
392
  "USER_EVENT": {
393
393
  "NOTIFICATION": {
394
394
  "TITLE": "Notifications",
395
- "EMPTY": "Aucune notification"
395
+ "EMPTY": "Aucune notification",
396
+ "READ_ALL": "Marquer tout comme lu"
396
397
  },
397
398
  "EVENT_TYPE": "Type",
398
399
  "CREATION_DATE": "Date/Heure",
@@ -402,6 +402,7 @@ ion-list,
402
402
 
403
403
  }
404
404
 
405
+ ion-row.ion-list-footer,
405
406
  ion-row.mat-select-footer,
406
407
  ion-row.mat-menu-footer,
407
408
  ion-row.mat-autocomplete-footer,