@sumaris-net/ngx-components 18.5.0-alpha1 → 18.5.0-alpha2
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/graphql/graphql.service.mjs +5 -4
- package/esm2022/src/app/core/services/base-entity-service.class.mjs +2 -2
- package/esm2022/src/app/core/services/network.service.mjs +10 -11
- package/esm2022/src/app/core/services/network.utils.mjs +8 -10
- package/fesm2022/sumaris-net.ngx-components.mjs +20 -23
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +17 -17
- package/src/app/core/graphql/graphql.service.d.ts +7 -6
- package/src/app/core/services/network.service.d.ts +1 -1
- package/src/app/core/services/network.utils.d.ts +1 -1
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": "18.5.0-
|
|
4
|
+
"version": "18.5.0-alpha2",
|
|
5
5
|
"author": "contact@e-is.pro",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
7
7
|
"readmeFilename": "README.md",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"tslib": "^2.3.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@apollo/client": "
|
|
32
|
+
"@apollo/client": "^3.12.4",
|
|
33
33
|
"@ionic/storage": "~4.0.0",
|
|
34
34
|
"d3": "~7.6.1",
|
|
35
35
|
"localforage": "~1.10.0",
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
"zone.js": "~0.14.10"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@capacitor-community/native-audio": "~
|
|
41
|
-
"@capacitor/android": "
|
|
42
|
-
"@capacitor/app": "~
|
|
43
|
-
"@capacitor/browser": "~
|
|
44
|
-
"@capacitor/camera": "~
|
|
45
|
-
"@capacitor/clipboard": "~
|
|
46
|
-
"@capacitor/core": "~
|
|
47
|
-
"@capacitor/geolocation": "~
|
|
48
|
-
"@capacitor/haptics": "~
|
|
49
|
-
"@capacitor/keyboard": "~
|
|
50
|
-
"@capacitor/network": "^
|
|
51
|
-
"@capacitor/splash-screen": "~
|
|
52
|
-
"@capacitor/status-bar": "~
|
|
53
|
-
"@e-is/cordova-plugin-audiomanagement": "
|
|
54
|
-
"@e-is/cordova-plugin-downloader": "
|
|
40
|
+
"@capacitor-community/native-audio": "~6.0.0",
|
|
41
|
+
"@capacitor/android": "6.2.0",
|
|
42
|
+
"@capacitor/app": "~6.0.2",
|
|
43
|
+
"@capacitor/browser": "~6.0.4",
|
|
44
|
+
"@capacitor/camera": "~6.1.2",
|
|
45
|
+
"@capacitor/clipboard": "~6.0.2",
|
|
46
|
+
"@capacitor/core": "~6.2.0",
|
|
47
|
+
"@capacitor/geolocation": "~6.1.0",
|
|
48
|
+
"@capacitor/haptics": "~6.0.2",
|
|
49
|
+
"@capacitor/keyboard": "~6.0.3",
|
|
50
|
+
"@capacitor/network": "^6.0.3",
|
|
51
|
+
"@capacitor/splash-screen": "~6.0.3",
|
|
52
|
+
"@capacitor/status-bar": "~6.0.2",
|
|
53
|
+
"@e-is/cordova-plugin-audiomanagement": "^1.0.3",
|
|
54
|
+
"@e-is/cordova-plugin-downloader": "^1.2.0",
|
|
55
55
|
"@ionic-native/audio-management": "^5.36.0",
|
|
56
56
|
"@ionic-native/core": "^5.36.0",
|
|
57
57
|
"@ionic-native/downloader": "^5.36.0",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { Apollo, ExtraSubscriptionOptions, QueryRef } from 'apollo-angular';
|
|
3
|
-
import { ApolloCache, ApolloClient, FetchPolicy, MutationUpdaterFn, MutationUpdaterFunction, OperationVariables, TypePolicies, WatchQueryFetchPolicy } from '@apollo/client/core';
|
|
3
|
+
import { ApolloCache, ApolloClient, FetchPolicy, MutationUpdaterFn, MutationUpdaterFunction, OperationVariables, TypePolicies, Unmasked, WatchQueryFetchPolicy } from '@apollo/client/core';
|
|
4
4
|
import { ServiceError } from '../services/errors';
|
|
5
5
|
import { InjectionToken } from '@angular/core';
|
|
6
6
|
import { NetworkService } from '../services/network.service';
|
|
7
7
|
import { EmptyObject } from './graphql.utils';
|
|
8
8
|
import { Platform } from '@ionic/angular';
|
|
9
9
|
import { IEntity } from '../services/model/entity.model';
|
|
10
|
-
import { Resolvers } from '@apollo/client/core/types';
|
|
10
|
+
import { type DefaultContext, Resolvers } from '@apollo/client/core/types';
|
|
11
11
|
import { HttpLink } from 'apollo-angular/http';
|
|
12
12
|
import { ErrorPolicy, MutationBaseOptions } from '@apollo/client/core/watchQueryOptions';
|
|
13
13
|
import { Cache } from '@apollo/client/cache/core/types/Cache';
|
|
@@ -16,6 +16,7 @@ import { PropertyMap } from '../../shared/types';
|
|
|
16
16
|
import { StartableService } from '../../shared/services/startable-service.class';
|
|
17
17
|
import { StorageService } from '../../shared/storage/storage.service';
|
|
18
18
|
import { DocumentNode } from 'graphql';
|
|
19
|
+
import type { MaybeMasked } from '@apollo/client/masking';
|
|
19
20
|
import * as i0 from "@angular/core";
|
|
20
21
|
export interface WatchQueryOptions<V> {
|
|
21
22
|
query: any;
|
|
@@ -23,7 +24,7 @@ export interface WatchQueryOptions<V> {
|
|
|
23
24
|
error?: ServiceError;
|
|
24
25
|
fetchPolicy?: WatchQueryFetchPolicy;
|
|
25
26
|
}
|
|
26
|
-
export interface MutateQueryOptions<TData, TVariables = OperationVariables> extends MutationBaseOptions<TData, TVariables> {
|
|
27
|
+
export interface MutateQueryOptions<TData, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache<any> = ApolloCache<any>> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {
|
|
27
28
|
mutation: any;
|
|
28
29
|
variables?: TVariables;
|
|
29
30
|
error?: ServiceError;
|
|
@@ -32,9 +33,9 @@ export interface MutateQueryOptions<TData, TVariables = OperationVariables> exte
|
|
|
32
33
|
tracked?: boolean;
|
|
33
34
|
timeout?: number;
|
|
34
35
|
};
|
|
35
|
-
optimisticResponse?: TData
|
|
36
|
+
optimisticResponse?: Unmasked<NoInfer<TData>>;
|
|
36
37
|
offlineResponse?: TData | ((context: any) => Promise<TData>);
|
|
37
|
-
update?: MutationUpdaterFn<TData> | MutationUpdaterFunction<TData, TVariables,
|
|
38
|
+
update?: MutationUpdaterFn<TData> | MutationUpdaterFunction<TData, TVariables, TContext, TCache>;
|
|
38
39
|
forceOffline?: boolean;
|
|
39
40
|
}
|
|
40
41
|
export declare const APP_GRAPHQL_TYPE_POLICIES: InjectionToken<TypePolicies>;
|
|
@@ -78,7 +79,7 @@ export declare class GraphqlService extends StartableService<ApolloClient<any>>
|
|
|
78
79
|
variables?: V;
|
|
79
80
|
error?: ServiceError;
|
|
80
81
|
fetchPolicy?: FetchPolicy;
|
|
81
|
-
}): Promise<T
|
|
82
|
+
}): Promise<MaybeMasked<T>>;
|
|
82
83
|
watchQueryRef<T, V = EmptyObject>(opts: WatchQueryOptions<V>): QueryRef<T, V>;
|
|
83
84
|
queryRefValuesChanges<T, V = EmptyObject>(queryRef: QueryRef<T, V>, opts: WatchQueryOptions<V>): Observable<T>;
|
|
84
85
|
watchQuery<T, V = EmptyObject>(opts: WatchQueryOptions<V>): Observable<T>;
|
|
@@ -21,6 +21,7 @@ export declare const PEER_URL_REGEXP: RegExp;
|
|
|
21
21
|
export declare const NETWORK_DEFAULT_CONNECTION_TIMEOUT = 10000;
|
|
22
22
|
export declare class NetworkService extends StartableObservableService<Peer, Peer> {
|
|
23
23
|
private _document;
|
|
24
|
+
private platform;
|
|
24
25
|
private modalCtrl;
|
|
25
26
|
private storage;
|
|
26
27
|
private settings;
|
|
@@ -35,7 +36,6 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
|
|
|
35
36
|
onResetNetworkCache: EventEmitter<any>;
|
|
36
37
|
private readonly _mobile;
|
|
37
38
|
private readonly _logger;
|
|
38
|
-
private _isNetworkPluginAvailable;
|
|
39
39
|
private _timerSubscription;
|
|
40
40
|
private readonly _timerRefreshPeriod;
|
|
41
41
|
private readonly _timerRefreshCondition;
|
|
@@ -32,7 +32,7 @@ export declare class NetworkUtils {
|
|
|
32
32
|
};
|
|
33
33
|
responseType?: 'json';
|
|
34
34
|
}): Promise<NodeInfo>;
|
|
35
|
+
static isPluginAvailable(): boolean;
|
|
35
36
|
static statusChanges(): Observable<ConnectionStatus>;
|
|
36
|
-
static getStatus(): Promise<ConnectionStatus>;
|
|
37
37
|
static getConnectionType(): Promise<ConnectionType>;
|
|
38
38
|
}
|