@sumaris-net/ngx-components 1.9.2 → 1.9.5
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 -185
- 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/doc/changelog.md +8 -3
- package/esm2015/src/app/core/account/account.js +2 -2
- package/esm2015/src/app/core/form/entity-editor.class.js +18 -9
- package/esm2015/src/app/core/graphql/graphql.service.js +1 -3
- package/esm2015/src/app/core/register/confirm/confirm.js +2 -2
- package/esm2015/src/app/core/services/account.service.js +92 -63
- package/esm2015/src/app/core/table/table.class.js +4 -4
- package/esm2015/src/environments/environment.class.js +1 -1
- package/esm2015/src/environments/environment.js +8 -3
- package/fesm2015/sumaris-net.ngx-components.js +116 -75
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +3 -2
- package/src/app/core/services/account.service.d.ts +10 -4
- package/src/environments/environment.class.d.ts +7 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, ChangeDetectorRef, EventEmitter, Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
2
|
+
import { Subject, Subscription } from 'rxjs';
|
|
3
3
|
import { AddToPageHistoryOptions, LocalSettingsService } from '../services/local-settings.service';
|
|
4
4
|
import { Entity } from '../services/model/entity.model';
|
|
5
5
|
import { UsageMode } from '../services/model/settings.model';
|
|
@@ -51,7 +51,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
|
|
|
51
51
|
protected errorTranslator: FormErrorTranslator;
|
|
52
52
|
data: T;
|
|
53
53
|
saving: boolean;
|
|
54
|
-
|
|
54
|
+
listenRemoteSubscription: Subscription;
|
|
55
55
|
defaultBackHref: string;
|
|
56
56
|
historyIcon: {
|
|
57
57
|
icon?: string;
|
|
@@ -94,6 +94,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
|
|
|
94
94
|
[key: string]: any;
|
|
95
95
|
}): Promise<void>;
|
|
96
96
|
startListenRemoteChanges(): void;
|
|
97
|
+
stopListenRemoteChanges(): void;
|
|
97
98
|
updateView(data: T | null, opts?: {
|
|
98
99
|
emitEvent?: boolean;
|
|
99
100
|
openTabIndex?: number;
|
|
@@ -35,6 +35,9 @@ export declare interface IsEmailExistsVariables {
|
|
|
35
35
|
email: string;
|
|
36
36
|
hash: string;
|
|
37
37
|
}
|
|
38
|
+
export interface AccountWatchOptions {
|
|
39
|
+
intervalInSecond?: number;
|
|
40
|
+
}
|
|
38
41
|
export declare class AccountService extends BaseGraphqlService<Account, any, number, Account> {
|
|
39
42
|
private cryptoService;
|
|
40
43
|
protected network: NetworkService;
|
|
@@ -48,7 +51,8 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
48
51
|
onChange: Subject<Account>;
|
|
49
52
|
onAuthTokenChange: Subject<string>;
|
|
50
53
|
onAuthBasicChange: Subject<string>;
|
|
51
|
-
private
|
|
54
|
+
private _listenChangesSubscription;
|
|
55
|
+
private readonly _enableListenChanges;
|
|
52
56
|
private _cache;
|
|
53
57
|
private _$additionalFields;
|
|
54
58
|
private _tokenType$;
|
|
@@ -78,7 +82,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
78
82
|
register(data: RegisterData): Promise<Account>;
|
|
79
83
|
authenticate(data?: AuthData): Promise<void>;
|
|
80
84
|
login(data: AuthData): Promise<Account>;
|
|
81
|
-
|
|
85
|
+
reload(): Promise<Account>;
|
|
82
86
|
/**
|
|
83
87
|
* Create or update an user account, to the remote storage
|
|
84
88
|
*
|
|
@@ -110,8 +114,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
110
114
|
isEmailExists(email: string): Promise<boolean>;
|
|
111
115
|
sendConfirmationEmail(email: string, locale?: string): Promise<boolean>;
|
|
112
116
|
confirmEmail(email: String, code: String): Promise<boolean>;
|
|
113
|
-
|
|
114
|
-
listenChanges(): Subscription;
|
|
117
|
+
listenChanges(opts?: AccountWatchOptions): Subscription;
|
|
115
118
|
get additionalFields(): FormFieldDefinition[];
|
|
116
119
|
get $additionalFields(): Observable<FormFieldDefinition[]>;
|
|
117
120
|
getAdditionalField(key: string): FormFieldDefinition | undefined;
|
|
@@ -142,6 +145,9 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
142
145
|
*/
|
|
143
146
|
protected saveSettingsRemotely(settings: UserSettings): Promise<void>;
|
|
144
147
|
protected authenticateAndGetToken(token?: string, counter?: number): Promise<string>;
|
|
148
|
+
protected startListenChanges(opts?: AccountWatchOptions): Subscription;
|
|
149
|
+
protected stopListenChanges(): void;
|
|
150
|
+
protected watchChanges(opts?: AccountWatchOptions): Observable<Account>;
|
|
145
151
|
protected copyIdAndUpdateDate(source: Account | undefined, target: Account): void;
|
|
146
152
|
protected copyIdAndUpdateDateSettings(source: UserSettings | undefined, target: UserSettings): void;
|
|
147
153
|
}
|
|
@@ -7,7 +7,6 @@ export declare class Environment {
|
|
|
7
7
|
version: string;
|
|
8
8
|
production: boolean;
|
|
9
9
|
baseUrl: string;
|
|
10
|
-
listenRemoteChanges?: boolean;
|
|
11
10
|
defaultPeer?: {
|
|
12
11
|
host: string;
|
|
13
12
|
port: number;
|
|
@@ -39,4 +38,11 @@ export declare class Environment {
|
|
|
39
38
|
username?: string;
|
|
40
39
|
password?: string;
|
|
41
40
|
};
|
|
41
|
+
account?: {
|
|
42
|
+
enableListenChanges?: boolean;
|
|
43
|
+
listenIntervalInSecond?: number;
|
|
44
|
+
};
|
|
45
|
+
entityEditor?: {
|
|
46
|
+
enableListenChanges?: boolean;
|
|
47
|
+
};
|
|
42
48
|
}
|