@sumaris-net/ngx-components 1.22.11-rc14 → 1.22.11-rc15
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 +113 -125
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/public_api.js +1 -2
- package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +1 -1
- package/esm2015/src/app/social/user-event/testing/user-event.testing.js +9 -9
- package/esm2015/src/app/social/user-event/testing/user-event.testing.model.js +103 -0
- package/esm2015/src/app/social/user-event/testing/user-event.testing.service.js +3 -3
- package/esm2015/src/app/social/user-event/user-event.model.js +2 -106
- package/fesm2015/sumaris-net.ngx-components.js +103 -133
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +0 -1
- package/src/app/social/user-event/notification/user-event-notification.list.d.ts +3 -3
- package/src/app/social/user-event/testing/user-event.testing.d.ts +2 -2
- package/src/app/social/user-event/testing/user-event.testing.model.d.ts +41 -0
- package/src/app/social/user-event/testing/user-event.testing.service.d.ts +4 -4
- package/src/app/social/user-event/user-event.model.d.ts +9 -44
- package/sumaris-net.ngx-components.metadata.json +1 -1
- package/esm2015/src/app/social/user-event/user-event.fragments.js +0 -27
- package/src/app/social/user-event/user-event.fragments.d.ts +0 -4
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -169,7 +169,6 @@ export * from './src/app/social/social.module';
|
|
|
169
169
|
export * from './src/app/social/social.errors';
|
|
170
170
|
export * from './src/app/social/user-event/user-event.module';
|
|
171
171
|
export * from './src/app/social/user-event/user-event.model';
|
|
172
|
-
export * from './src/app/social/user-event/user-event.fragments';
|
|
173
172
|
export * from './src/app/social/user-event/user-event.service';
|
|
174
173
|
export * from './src/app/social/user-event/notification/user-event-notification.icon';
|
|
175
174
|
export * from './src/app/social/job/job.module';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
|
-
import { IUserEvent, IUserEventFilter,
|
|
2
|
+
import { IUserEvent, IUserEventFilter, IUserEventAction } from '../user-event.model';
|
|
3
3
|
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
4
4
|
import { IonContent, IonItem, PopoverController } from '@ionic/angular';
|
|
5
5
|
import { IUserEventService } from '../user-event.service';
|
|
@@ -43,10 +43,10 @@ export declare class UserEventNotificationList<E extends IUserEvent<any> = IUser
|
|
|
43
43
|
ngOnInit(): void;
|
|
44
44
|
ngOnDestroy(): void;
|
|
45
45
|
click(event: UIEvent, userEvent: E): void;
|
|
46
|
-
isDefaultAction(action:
|
|
46
|
+
isDefaultAction(action: IUserEventAction): boolean;
|
|
47
47
|
markAsRead(event: UIEvent, userEvent: E): void;
|
|
48
48
|
markAllAsRead(event: UIEvent): void;
|
|
49
|
-
executeAction(event: UIEvent, action:
|
|
49
|
+
executeAction(event: UIEvent, action: IUserEventAction, userEvent: IUserEvent<any>): Promise<void>;
|
|
50
50
|
dismiss(): void;
|
|
51
51
|
fetchMore(event?: CustomEvent & {
|
|
52
52
|
target?: EventTarget & {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import { UserEvent } from '../user-event.model';
|
|
3
2
|
import { Router } from '@angular/router';
|
|
4
3
|
import { AlertController } from '@ionic/angular';
|
|
5
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
6
5
|
import { UserEventTestService } from './user-event.testing.service';
|
|
7
6
|
import { AppUserEventNotificationIcon } from '../notification/user-event-notification.icon';
|
|
7
|
+
import { UserEventTest } from './user-event.testing.model';
|
|
8
8
|
export declare class UserEventTestingPage implements OnDestroy {
|
|
9
9
|
protected userEventService: UserEventTestService;
|
|
10
10
|
protected router: Router;
|
|
@@ -15,7 +15,7 @@ export declare class UserEventTestingPage implements OnDestroy {
|
|
|
15
15
|
get timerStarted(): boolean;
|
|
16
16
|
constructor(userEventService: UserEventTestService, router: Router, alertController: AlertController, translateService: TranslateService);
|
|
17
17
|
ngOnDestroy(): void;
|
|
18
|
-
protected customize(userEvent:
|
|
18
|
+
protected customize(userEvent: UserEventTest): void;
|
|
19
19
|
addNotification(): void;
|
|
20
20
|
addError(): void;
|
|
21
21
|
addWarning(): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Entity, EntityAsObjectOptions } from '../../../core/services/model/entity.model';
|
|
2
|
+
import { Moment } from 'moment';
|
|
3
|
+
import { IconRef } from '../../../shared/types';
|
|
4
|
+
import { EventLevel, IUserEvent, IUserEventFilter, IUserEventAction } from '../user-event.model';
|
|
5
|
+
import { EntityFilter } from '../../../core/services/model/filter.model';
|
|
6
|
+
import { FilterFn } from '../../../shared/services/entity-service.class';
|
|
7
|
+
import { StoreObject } from '@apollo/client/core';
|
|
8
|
+
export declare class UserEventTest extends Entity<UserEventTest> implements IUserEvent<UserEventTest> {
|
|
9
|
+
static fromObject: (source: any, opts?: any) => UserEventTest;
|
|
10
|
+
type: string;
|
|
11
|
+
level: EventLevel;
|
|
12
|
+
issuer: string;
|
|
13
|
+
recipient: string;
|
|
14
|
+
updateDate: Moment;
|
|
15
|
+
creationDate: Moment;
|
|
16
|
+
readDate: Moment;
|
|
17
|
+
message: string | undefined;
|
|
18
|
+
content: string | any;
|
|
19
|
+
hash: string;
|
|
20
|
+
signature: string;
|
|
21
|
+
readSignature: string;
|
|
22
|
+
avatar?: string;
|
|
23
|
+
avatarIcon?: IconRef;
|
|
24
|
+
icon?: IconRef;
|
|
25
|
+
actions?: IUserEventAction[];
|
|
26
|
+
constructor();
|
|
27
|
+
asObject(opts?: EntityAsObjectOptions): any;
|
|
28
|
+
fromObject(source: any): void;
|
|
29
|
+
}
|
|
30
|
+
export declare class UserEventTestFilter extends EntityFilter<UserEventTestFilter, UserEventTest> implements IUserEventFilter<UserEventTest> {
|
|
31
|
+
static fromObject: (source: any, opts?: any) => UserEventTestFilter;
|
|
32
|
+
types: string[];
|
|
33
|
+
levels: EventLevel[];
|
|
34
|
+
issuers: string[];
|
|
35
|
+
recipients: string[];
|
|
36
|
+
startDate: Moment;
|
|
37
|
+
excludeRead: boolean;
|
|
38
|
+
fromObject(source: any, opts?: any): void;
|
|
39
|
+
protected buildFilter(): FilterFn<UserEventTest>[];
|
|
40
|
+
asObject(opts?: EntityAsObjectOptions): StoreObject;
|
|
41
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AbstractUserEventService, UserEventLoadOptions, UserEventWatchOptions } from '../user-event.service';
|
|
2
|
-
import { IUserEvent, UserEvent, UserEventFilter } from '../user-event.model';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import { GraphqlService } from '../../../core/graphql/graphql.service';
|
|
5
4
|
import { AccountService } from '../../../core/services/account.service';
|
|
@@ -9,7 +8,8 @@ import { Environment } from '../../../../environments/environment.class';
|
|
|
9
8
|
import { FetchPolicy } from '@apollo/client/core';
|
|
10
9
|
import { EntityServiceLoadOptions, LoadResult } from '../../../shared/services/entity-service.class';
|
|
11
10
|
import { SortDirection } from '@angular/material/sort';
|
|
12
|
-
|
|
11
|
+
import { UserEventTest, UserEventTestFilter } from './user-event.testing.model';
|
|
12
|
+
export declare class UserEventTestService extends AbstractUserEventService<UserEventTest, UserEventTestFilter> {
|
|
13
13
|
protected graphql: GraphqlService;
|
|
14
14
|
protected accountService: AccountService;
|
|
15
15
|
protected network: NetworkService;
|
|
@@ -18,8 +18,8 @@ export declare class UserEventTestService extends AbstractUserEventService<UserE
|
|
|
18
18
|
private $userEvents;
|
|
19
19
|
private $newUserEvents;
|
|
20
20
|
constructor(graphql: GraphqlService, accountService: AccountService, network: NetworkService, translate: TranslateService, environment: Environment);
|
|
21
|
-
fromObject(source: any):
|
|
22
|
-
add(entity:
|
|
21
|
+
fromObject(source: any): UserEventTest;
|
|
22
|
+
add(entity: UserEventTest): Promise<void>;
|
|
23
23
|
asFilter(filter: Partial<any>): any;
|
|
24
24
|
count(filter: any, options?: {
|
|
25
25
|
fetchPolicy?: FetchPolicy;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { Moment } from 'moment';
|
|
2
|
-
import { Entity,
|
|
3
|
-
import {
|
|
4
|
-
import { FilterFn } from '../../shared/services/entity-service.class';
|
|
2
|
+
import { Entity, IEntity } from '../../core/services/model/entity.model';
|
|
3
|
+
import { IEntityFilter } from '../../core/services/model/filter.model';
|
|
5
4
|
import { AppColors, IconRef } from '../../shared/types';
|
|
6
|
-
import { StoreObject } from '@apollo/client/core';
|
|
7
|
-
export declare const UserEventTypes: {
|
|
8
|
-
DEBUG_DATA: string;
|
|
9
|
-
INBOX_MESSAGE: string;
|
|
10
|
-
};
|
|
11
5
|
export declare type EventLevel = 'ERROR' | 'WARNING' | 'INFO' | 'DEBUG';
|
|
12
6
|
export interface IUserEvent<E extends Entity<E>, U = string, L = EventLevel> extends IEntity<E> {
|
|
13
7
|
issuer: U;
|
|
@@ -23,29 +17,7 @@ export interface IUserEvent<E extends Entity<E>, U = string, L = EventLevel> ext
|
|
|
23
17
|
avatarIcon?: IconRef;
|
|
24
18
|
avatarJdenticon?: any;
|
|
25
19
|
icon?: IconRef;
|
|
26
|
-
actions?:
|
|
27
|
-
}
|
|
28
|
-
export declare class UserEvent extends Entity<UserEvent> implements IUserEvent<UserEvent> {
|
|
29
|
-
static fromObject: (source: any, opts?: any) => UserEvent;
|
|
30
|
-
type: string;
|
|
31
|
-
level: EventLevel;
|
|
32
|
-
issuer: string;
|
|
33
|
-
recipient: string;
|
|
34
|
-
updateDate: Moment;
|
|
35
|
-
creationDate: Moment;
|
|
36
|
-
readDate: Moment;
|
|
37
|
-
message: string | undefined;
|
|
38
|
-
content: string | any;
|
|
39
|
-
hash: string;
|
|
40
|
-
signature: string;
|
|
41
|
-
readSignature: string;
|
|
42
|
-
avatar?: string;
|
|
43
|
-
avatarIcon?: IconRef;
|
|
44
|
-
icon?: IconRef;
|
|
45
|
-
actions?: UserEventAction[];
|
|
46
|
-
constructor();
|
|
47
|
-
asObject(opts?: EntityAsObjectOptions): any;
|
|
48
|
-
fromObject(source: any): void;
|
|
20
|
+
actions?: IUserEventAction[];
|
|
49
21
|
}
|
|
50
22
|
export interface IUserEventFilter<E extends IUserEvent<E, U, L>, U = string, L = EventLevel> extends IEntityFilter<any, E> {
|
|
51
23
|
types: string[];
|
|
@@ -55,19 +27,7 @@ export interface IUserEventFilter<E extends IUserEvent<E, U, L>, U = string, L =
|
|
|
55
27
|
startDate: Moment;
|
|
56
28
|
excludeRead: boolean;
|
|
57
29
|
}
|
|
58
|
-
export
|
|
59
|
-
static fromObject: (source: any, opts?: any) => UserEventFilter;
|
|
60
|
-
types: string[];
|
|
61
|
-
levels: EventLevel[];
|
|
62
|
-
issuers: string[];
|
|
63
|
-
recipients: string[];
|
|
64
|
-
startDate: Moment;
|
|
65
|
-
excludeRead: boolean;
|
|
66
|
-
fromObject(source: any, opts?: any): void;
|
|
67
|
-
protected buildFilter(): FilterFn<UserEvent>[];
|
|
68
|
-
asObject(opts?: EntityAsObjectOptions): StoreObject;
|
|
69
|
-
}
|
|
70
|
-
export interface UserEventAction {
|
|
30
|
+
export interface IUserEventAction {
|
|
71
31
|
name: string | any;
|
|
72
32
|
title?: string;
|
|
73
33
|
color?: AppColors;
|
|
@@ -75,3 +35,8 @@ export interface UserEventAction {
|
|
|
75
35
|
default?: boolean;
|
|
76
36
|
executeAction: (event: IUserEvent<any>) => any | Promise<any>;
|
|
77
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated use IUserEventAction instead
|
|
40
|
+
*/
|
|
41
|
+
export interface UserEventAction extends IUserEventAction {
|
|
42
|
+
}
|