@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/bundles/sumaris-net.ngx-components.umd.js +231 -83
- 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 +9 -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 +10 -8
- package/esm2015/src/app/social/user-event/user-event.service.js +93 -31
- package/fesm2015/sumaris-net.ngx-components.js +116 -39
- 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/testing/user-event.testing.service.d.ts +0 -2
- 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;
|
|
@@ -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(
|
|
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
|
-
|
|
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(
|
|
94
|
-
markAsRead(
|
|
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(
|
|
102
|
+
protected defaultMarkAsRead(userEvents: E[]): Promise<void>;
|
|
100
103
|
protected defaultFilter(): F;
|
|
101
104
|
protected defaultRecipient(): any;
|
|
102
105
|
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",
|