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

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-beta19",
4
+ "version": "1.21.0-beta21",
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;
@@ -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 { BehaviorSubject, Observable, Subscription } from 'rxjs';
5
+ import { BehaviorSubject, Observable } 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';
@@ -13,6 +13,7 @@ import { TranslateService } from '@ngx-translate/core';
13
13
  import { NetworkService } from '../../core/services/network.service';
14
14
  import { BaseGraphqlService } from '../../core/services/base-graphql-service.class';
15
15
  import { Environment } from '../../../environments/environment.class';
16
+ import { Moment } from 'moment';
16
17
  export declare const UserEventServiceToken: InjectionToken<IUserEventService<any, any, UserEventWatchOptions>>;
17
18
  export declare interface UserEventWatchOptions extends EntitiesServiceWatchOptions {
18
19
  withContent?: boolean;
@@ -24,6 +25,7 @@ export interface IUserEventQueries {
24
25
  }
25
26
  export interface IUserEventMutations {
26
27
  save: any;
28
+ saveAll?: any;
27
29
  deleteByIds: any;
28
30
  }
29
31
  export interface IUserEventSubscriptions {
@@ -51,7 +53,7 @@ export interface IUserEventService<E extends IUserEvent<E>, F extends IUserEvent
51
53
  }): Observable<E[]>;
52
54
  save(entity: E, options?: EntityServiceLoadOptions): Promise<E>;
53
55
  delete(entity: E): Promise<any>;
54
- markAsRead(entity: E): any;
56
+ markAsRead(entities: E[]): any;
55
57
  registerListener(listener: IUserEventListener<E>): any;
56
58
  resetCount(): any;
57
59
  }
@@ -64,9 +66,10 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, a
64
66
  protected mutations: IUserEventMutations;
65
67
  protected subscriptions: IUserEventSubscriptions;
66
68
  protected environment: Environment;
67
- protected _count$: BehaviorSubject<number>;
68
- protected _subscriptions: Subscription;
69
+ protected count$: BehaviorSubject<number>;
70
+ protected resetCountDate: Moment;
69
71
  protected listeners: IUserEventListener<E>[];
72
+ private _subscriptions;
70
73
  private _listenSubscription;
71
74
  get userEventCount(): Observable<number>;
72
75
  protected constructor(graphql: GraphqlService, accountService: AccountService, network: NetworkService, translate: TranslateService, queries: IUserEventQueries, mutations: IUserEventMutations, subscriptions: IUserEventSubscriptions, environment: Environment);
@@ -91,14 +94,14 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, a
91
94
  delete(entity: E): Promise<any>;
92
95
  deleteAll(entities: E[], opts?: any): Promise<any>;
93
96
  save(entity: E, options?: EntityServiceLoadOptions): Promise<E>;
94
- saveAll(data: E[], opts?: any): Promise<E[]>;
95
- markAsRead(entity: E): Promise<void>;
97
+ saveAll(entities: E[], opts?: any): Promise<E[]>;
98
+ markAsRead(entities: E[]): Promise<void>;
96
99
  registerListener(listener: IUserEventListener<E>): void;
97
100
  resetCount(): void;
98
101
  protected onLogin(): Promise<void>;
99
102
  protected onLogout(): void;
100
103
  protected processUserEvent(source: any, that?: AbstractUserEventService<E, F>): E;
101
- protected defaultMarkAsRead(userEvent: E): Promise<void>;
104
+ protected defaultMarkAsRead(userEvents: E[]): Promise<void>;
102
105
  protected defaultFilter(): F;
103
106
  protected defaultRecipient(): any;
104
107
  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,