@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/bundles/sumaris-net.ngx-components.umd.js +223 -70
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/social/user-event/notification/user-event-notification.component.js +7 -2
- package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +12 -4
- package/esm2015/src/app/social/user-event/testing/user-event.testing.service.js +9 -3
- package/esm2015/src/app/social/user-event/user-event.service.js +100 -38
- package/fesm2015/sumaris-net.ngx-components.js +121 -42
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/social/user-event/notification/user-event-notification.component.d.ts +1 -0
- package/src/app/social/user-event/notification/user-event-notification.list.d.ts +4 -1
- package/src/app/social/user-event/user-event.service.d.ts +10 -7
- package/src/assets/i18n/en.json +2 -1
- package/src/assets/i18n/fr.json +2 -1
- package/src/theme/_ngx-components.scss +1 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -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(
|
|
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
|
|
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(
|
|
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
|
|
68
|
-
protected
|
|
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(
|
|
95
|
-
markAsRead(
|
|
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(
|
|
104
|
+
protected defaultMarkAsRead(userEvents: E[]): Promise<void>;
|
|
102
105
|
protected defaultFilter(): F;
|
|
103
106
|
protected defaultRecipient(): any;
|
|
104
107
|
protected fillDefaultProperties(entity: E): void;
|
package/src/assets/i18n/en.json
CHANGED
package/src/assets/i18n/fr.json
CHANGED
|
@@ -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",
|