@sumaris-net/ngx-components 1.9.5 → 1.9.8
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 +42 -16
- 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/core/services/account.service.js +38 -13
- package/esm2015/src/app/shared/services/startable-service.class.js +4 -1
- package/esm2015/src/environments/environment.class.js +1 -1
- package/esm2015/src/environments/environment.js +4 -3
- package/fesm2015/sumaris-net.ngx-components.js +36 -12
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/account.service.d.ts +9 -2
- package/src/app/shared/services/startable-service.class.d.ts +1 -0
- package/src/environments/environment.class.d.ts +2 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -13,6 +13,10 @@ import { FormFieldDefinition } from '../../shared/form/field.model';
|
|
|
13
13
|
import { AuthTokenType, NetworkService } from './network.service';
|
|
14
14
|
import { FileService } from '../../shared/file/file.service';
|
|
15
15
|
import { Referential } from './model/referential.model';
|
|
16
|
+
import { ShowToastOptions } from '../../shared/toasts';
|
|
17
|
+
import { OverlayEventDetail } from '@ionic/core';
|
|
18
|
+
import { ToastController } from '@ionic/angular';
|
|
19
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
16
20
|
export declare interface AccountDetails {
|
|
17
21
|
loaded: boolean;
|
|
18
22
|
keypair: KeyPair;
|
|
@@ -36,7 +40,7 @@ export declare interface IsEmailExistsVariables {
|
|
|
36
40
|
hash: string;
|
|
37
41
|
}
|
|
38
42
|
export interface AccountWatchOptions {
|
|
39
|
-
|
|
43
|
+
intervalInSeconds?: number;
|
|
40
44
|
}
|
|
41
45
|
export declare class AccountService extends BaseGraphqlService<Account, any, number, Account> {
|
|
42
46
|
private cryptoService;
|
|
@@ -45,6 +49,8 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
45
49
|
protected settings: LocalSettingsService;
|
|
46
50
|
protected storage: Storage;
|
|
47
51
|
protected file: FileService;
|
|
52
|
+
private translate;
|
|
53
|
+
private toastController;
|
|
48
54
|
protected environment: any;
|
|
49
55
|
onLogin: Subject<Account>;
|
|
50
56
|
onLogout: Subject<any>;
|
|
@@ -61,7 +67,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
61
67
|
get department(): Department;
|
|
62
68
|
get tokenType(): AuthTokenType;
|
|
63
69
|
set tokenType(value: AuthTokenType);
|
|
64
|
-
constructor(cryptoService: CryptoService, network: NetworkService, graphql: GraphqlService, settings: LocalSettingsService, storage: Storage, file: FileService, environment: any);
|
|
70
|
+
constructor(cryptoService: CryptoService, network: NetworkService, graphql: GraphqlService, settings: LocalSettingsService, storage: Storage, file: FileService, translate: TranslateService, toastController: ToastController, environment: any);
|
|
65
71
|
ngOnStart(): Promise<Account>;
|
|
66
72
|
protected ngOnStop(): Promise<void>;
|
|
67
73
|
isLogin(): boolean;
|
|
@@ -150,4 +156,5 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
150
156
|
protected watchChanges(opts?: AccountWatchOptions): Observable<Account>;
|
|
151
157
|
protected copyIdAndUpdateDate(source: Account | undefined, target: Account): void;
|
|
152
158
|
protected copyIdAndUpdateDateSettings(source: UserSettings | undefined, target: UserSettings): void;
|
|
159
|
+
protected showToast<T = any>(opts: ShowToastOptions): Promise<OverlayEventDetail<T>>;
|
|
153
160
|
}
|
|
@@ -24,6 +24,7 @@ export declare abstract class StartableService<T = any> implements IStartableSer
|
|
|
24
24
|
get starting(): boolean;
|
|
25
25
|
ready(): Promise<T>;
|
|
26
26
|
protected registerSubscription(sub: Subscription): Subscription;
|
|
27
|
+
protected unregisterSubscription(sub: Subscription): void;
|
|
27
28
|
protected ngOnStop(): Promise<void>;
|
|
28
29
|
protected abstract ngOnStart(): Promise<T>;
|
|
29
30
|
}
|
|
@@ -40,9 +40,10 @@ export declare class Environment {
|
|
|
40
40
|
};
|
|
41
41
|
account?: {
|
|
42
42
|
enableListenChanges?: boolean;
|
|
43
|
-
|
|
43
|
+
listenIntervalInSeconds?: number;
|
|
44
44
|
};
|
|
45
45
|
entityEditor?: {
|
|
46
46
|
enableListenChanges?: boolean;
|
|
47
|
+
listenIntervalInSeconds?: number;
|
|
47
48
|
};
|
|
48
49
|
}
|