@sumaris-net/ngx-components 18.2.2 → 18.2.4
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/esm2022/src/app/core/services/base-entity-service.class.mjs +5 -5
- package/esm2022/src/app/social/user-event/testing/user-event.testing.service.mjs +3 -3
- package/esm2022/src/app/social/user-event/user-event.service.mjs +1 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +5 -5
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/base-entity-service.class.d.ts +3 -3
- package/src/app/social/user-event/testing/user-event.testing.service.d.ts +5 -6
- package/src/app/social/user-event/user-event.service.d.ts +11 -16
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -50,11 +50,11 @@ export interface EntitySaveOptions<T = any, V = any> {
|
|
|
50
50
|
}>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude;
|
|
51
51
|
awaitRefetchQueries?: boolean;
|
|
52
52
|
update?: MutationUpdaterFn<{
|
|
53
|
-
data:
|
|
53
|
+
data: any;
|
|
54
54
|
}> | MutationUpdaterFunction<{
|
|
55
|
-
data:
|
|
55
|
+
data: any;
|
|
56
56
|
}, V, any, ApolloCache<{
|
|
57
|
-
data:
|
|
57
|
+
data: any;
|
|
58
58
|
}>>;
|
|
59
59
|
}
|
|
60
60
|
export declare abstract class BaseEntityService<T extends Entity<T, ID>, F extends EntityFilter<F, T, ID>, ID = number, WO extends EntitiesServiceWatchOptions = EntitiesServiceWatchOptions<T>, LO extends EntitiesServiceLoadOptions = EntitiesServiceLoadOptions<T>, Q extends BaseEntityGraphqlQueries = BaseEntityGraphqlQueries, M extends BaseEntityGraphqlMutations = BaseEntityGraphqlMutations, S extends BaseEntityGraphqlSubscriptions = BaseEntityGraphqlSubscriptions> extends BaseGraphqlService<T, F, ID> implements IEntitiesService<T, F, WO>, IEntityService<T, ID, LO> {
|
|
@@ -6,7 +6,7 @@ import { NetworkService } from '../../../core/services/network.service';
|
|
|
6
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
7
|
import { Environment } from '../../../../environments/environment.class';
|
|
8
8
|
import { FetchPolicy } from '@apollo/client/core';
|
|
9
|
-
import {
|
|
9
|
+
import { LoadResult } from '../../../shared/services/entity-service.class';
|
|
10
10
|
import { SortDirection } from '@angular/material/sort';
|
|
11
11
|
import { UserEventTest, UserEventTestFilter } from './user-event.testing.model';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
@@ -28,15 +28,14 @@ export declare class UserEventTestService extends AbstractUserEventService<UserE
|
|
|
28
28
|
}): Promise<number>;
|
|
29
29
|
delete(entity: any): Promise<any>;
|
|
30
30
|
deleteAll(data: any[], opts?: any): Promise<any>;
|
|
31
|
-
listenAllChanges(filter: any, options?:
|
|
31
|
+
listenAllChanges(filter: any, options?: UserEventLoadOptions<UserEventTest> & {
|
|
32
32
|
interval?: number;
|
|
33
|
-
fetchPolicy?: FetchPolicy;
|
|
34
33
|
}): Observable<any[]>;
|
|
35
|
-
save(entity: any, options?:
|
|
34
|
+
save(entity: any, options?: UserEventLoadOptions<UserEventTest>): Promise<any>;
|
|
36
35
|
saveAll(data: any[], opts?: any): Promise<any[]>;
|
|
37
36
|
protected defaultRecipient(): any;
|
|
38
|
-
watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventWatchOptions): Observable<LoadResult<any>>;
|
|
39
|
-
loadAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventLoadOptions): Promise<LoadResult<any>>;
|
|
37
|
+
watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventWatchOptions<UserEventTest>): Observable<LoadResult<any>>;
|
|
38
|
+
loadAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<any>, opts?: UserEventLoadOptions<UserEventTest>): Promise<LoadResult<any>>;
|
|
40
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserEventTestService, never>;
|
|
41
40
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserEventTestService>;
|
|
42
41
|
}
|
|
@@ -14,11 +14,11 @@ import { IStartableService } from '../../shared/services/startable-service.class
|
|
|
14
14
|
import { DocumentNode } from 'graphql/index';
|
|
15
15
|
import { MutableWatchQueriesUpdatePolicy } from '../../core/services/base-entity-service.class';
|
|
16
16
|
import * as i0 from "@angular/core";
|
|
17
|
-
export declare const APP_USER_EVENT_SERVICE: InjectionToken<IUserEventService<any, any, number, UserEventWatchOptions
|
|
18
|
-
export declare interface UserEventLoadOptions extends EntitiesServiceLoadOptions {
|
|
17
|
+
export declare const APP_USER_EVENT_SERVICE: InjectionToken<IUserEventService<any, any, number, UserEventWatchOptions<any>, UserEventLoadOptions<any>>>;
|
|
18
|
+
export declare interface UserEventLoadOptions<T> extends EntitiesServiceLoadOptions<T> {
|
|
19
19
|
withContent?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export declare interface UserEventWatchOptions extends EntitiesServiceWatchOptions {
|
|
21
|
+
export declare interface UserEventWatchOptions<T> extends EntitiesServiceWatchOptions<T> {
|
|
22
22
|
withContent?: boolean;
|
|
23
23
|
}
|
|
24
24
|
export interface IUserEventQueries {
|
|
@@ -46,28 +46,26 @@ export interface UserEventServiceOptions<Q extends IUserEventQueries = IUserEven
|
|
|
46
46
|
subscriptions?: Partial<S>;
|
|
47
47
|
watchQueriesUpdatePolicy?: MutableWatchQueriesUpdatePolicy;
|
|
48
48
|
}
|
|
49
|
-
export interface IUserEventService<E extends IUserEvent<E, ID>, F extends IUserEventFilter<E, ID>, ID = number, WO extends UserEventWatchOptions = UserEventWatchOptions
|
|
49
|
+
export interface IUserEventService<E extends IUserEvent<E, ID>, F extends IUserEventFilter<E, ID>, ID = number, WO extends UserEventWatchOptions<E> = UserEventWatchOptions<E>, LO extends UserEventLoadOptions<E> = UserEventLoadOptions<E>> extends IEntitiesService<E, F, WO>, IStartableService {
|
|
50
50
|
countSubject: Observable<number>;
|
|
51
51
|
add(entity: E): Promise<E>;
|
|
52
52
|
load(id: ID, opts?: LO): Promise<E>;
|
|
53
53
|
count(filter: Partial<F>, options?: {
|
|
54
54
|
fetchPolicy?: FetchPolicy;
|
|
55
55
|
}): Promise<number>;
|
|
56
|
-
listenCountChanges(filter: Partial<F>, options?:
|
|
56
|
+
listenCountChanges(filter: Partial<F>, options?: Omit<LO, 'toEntity'> & {
|
|
57
57
|
interval?: number;
|
|
58
|
-
fetchPolicy?: FetchPolicy;
|
|
59
58
|
}): Observable<number>;
|
|
60
|
-
listenAllChanges(filter: Partial<F>, options?:
|
|
59
|
+
listenAllChanges(filter: Partial<F>, options?: LO & {
|
|
61
60
|
interval?: number;
|
|
62
|
-
fetchPolicy?: FetchPolicy;
|
|
63
61
|
}): Observable<E[]>;
|
|
64
|
-
save(entity: E, options?:
|
|
62
|
+
save(entity: E, options?: LO): Promise<E>;
|
|
65
63
|
delete(entity: E): Promise<any>;
|
|
66
64
|
markAllAsRead(entities: E[]): any;
|
|
67
65
|
registerListener(listener: IUserEventListener<E, ID>): any;
|
|
68
66
|
resetCount(): any;
|
|
69
67
|
}
|
|
70
|
-
export declare abstract class AbstractUserEventService<E extends IUserEvent<E, ID, any>, F extends IUserEventFilter<E, ID, any>, ID = number, WO extends UserEventWatchOptions = UserEventWatchOptions
|
|
68
|
+
export declare abstract class AbstractUserEventService<E extends IUserEvent<E, ID, any>, F extends IUserEventFilter<E, ID, any>, ID = number, WO extends UserEventWatchOptions<E> = UserEventWatchOptions<E>, LO extends UserEventLoadOptions<E> = UserEventLoadOptions<E>, Q extends IUserEventQueries = IUserEventQueries, M extends IUserEventMutations = IUserEventMutations, S extends IUserEventSubscriptions = IUserEventSubscriptions> extends BaseGraphqlService<E, F, ID> implements IUserEventService<E, F, ID, WO, LO>, OnDestroy {
|
|
71
69
|
protected graphql: GraphqlService;
|
|
72
70
|
protected accountService: AccountService;
|
|
73
71
|
protected network: NetworkService;
|
|
@@ -96,18 +94,15 @@ export declare abstract class AbstractUserEventService<E extends IUserEvent<E, I
|
|
|
96
94
|
count(filter: Partial<F>, options?: {
|
|
97
95
|
fetchPolicy?: FetchPolicy;
|
|
98
96
|
}): Promise<number>;
|
|
99
|
-
listenCountChanges(filter: Partial<F>, options?:
|
|
97
|
+
listenCountChanges(filter: Partial<F>, options?: Omit<LO, 'toEntity'> & {
|
|
100
98
|
interval?: number;
|
|
101
|
-
fetchPolicy?: FetchPolicy;
|
|
102
99
|
}): Observable<number>;
|
|
103
|
-
listenAllChanges(filter: Partial<F>, opts?:
|
|
100
|
+
listenAllChanges(filter: Partial<F>, opts?: LO & {
|
|
104
101
|
interval?: number;
|
|
105
|
-
fetchPolicy?: FetchPolicy;
|
|
106
|
-
toEntity?: boolean;
|
|
107
102
|
}): Observable<E[]>;
|
|
108
103
|
delete(entity: E): Promise<any>;
|
|
109
104
|
deleteAll(entities: E[], opts?: any): Promise<any>;
|
|
110
|
-
save(entity: E, options?: EntityServiceLoadOptions): Promise<E>;
|
|
105
|
+
save(entity: E, options?: EntityServiceLoadOptions<E>): Promise<E>;
|
|
111
106
|
saveAll(entities: E[], opts?: any): Promise<E[]>;
|
|
112
107
|
markAllAsRead(entities: E[]): Promise<void>;
|
|
113
108
|
registerListener(listener: IUserEventListener<E, ID>): void;
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "18.2.
|
|
5
|
+
"version": "18.2.4",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|