@sumaris-net/ngx-components 1.10.1 → 1.10.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/bundles/sumaris-net.ngx-components.umd.js +44 -43
- 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/core.module.js +7 -3
- package/esm2015/src/app/core/form/entity-editor.class.js +17 -15
- package/esm2015/src/app/core/services/account.service.js +22 -25
- package/esm2015/src/app/core/services/base-entity-service.class.js +3 -3
- package/esm2015/src/environments/environment.js +3 -3
- package/fesm2015/sumaris-net.ngx-components.js +43 -41
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/core.module.d.ts +2 -1
- package/src/app/core/form/entity-editor.class.d.ts +9 -5
- package/src/app/core/services/account.service.d.ts +3 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { Environment } from '../../environments/environment.class';
|
|
2
3
|
export declare class CoreModule {
|
|
3
|
-
static forRoot(): ModuleWithProviders<CoreModule>;
|
|
4
|
+
static forRoot(environment: Environment): ModuleWithProviders<CoreModule>;
|
|
4
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, ChangeDetectorRef, EventEmitter, Injector, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { Subject
|
|
2
|
+
import { Subject } 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';
|
|
@@ -8,6 +8,7 @@ import { AppTabEditor, AppTabEditorOptions } from './editor.class';
|
|
|
8
8
|
import { FormErrors } from './form.utils';
|
|
9
9
|
import { EntityServiceLoadOptions, IEntityService } from '../../shared/services/entity-service.class';
|
|
10
10
|
import { DateFormatPipe } from '../../shared/pipes/date-format.pipe';
|
|
11
|
+
import { Environment } from '../../../environments/environment.class';
|
|
11
12
|
import { HistoryPageReference } from '../services/model/history.model';
|
|
12
13
|
import { WaitForOptions } from '../../shared/observables';
|
|
13
14
|
import { FormErrorTranslator } from '../../shared/validator/form-error-adapter.class';
|
|
@@ -16,6 +17,7 @@ export declare class AppEditorOptions extends AppTabEditorOptions {
|
|
|
16
17
|
autoLoadDelay?: number;
|
|
17
18
|
pathIdAttribute?: string;
|
|
18
19
|
enableListenChanges?: boolean;
|
|
20
|
+
listenIntervalInSeconds?: number;
|
|
19
21
|
/**
|
|
20
22
|
* Change page route (window URL) when saving for the first time
|
|
21
23
|
*/
|
|
@@ -40,18 +42,20 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
|
|
|
40
42
|
protected dataService?: S;
|
|
41
43
|
private _usageMode;
|
|
42
44
|
private readonly _enableListenChanges;
|
|
45
|
+
private readonly _listenIntervalInSeconds;
|
|
43
46
|
private readonly _pathIdAttribute;
|
|
44
47
|
private readonly _autoLoad;
|
|
45
48
|
private readonly _autoLoadDelay;
|
|
46
49
|
private readonly _autoUpdateRoute;
|
|
47
50
|
private _autoOpenNextTab;
|
|
48
|
-
|
|
49
|
-
protected
|
|
50
|
-
protected
|
|
51
|
+
private _listenChangesSubscription;
|
|
52
|
+
protected readonly dateFormat: DateFormatPipe;
|
|
53
|
+
protected readonly cd: ChangeDetectorRef;
|
|
54
|
+
protected readonly settings: LocalSettingsService;
|
|
51
55
|
protected errorTranslator: FormErrorTranslator;
|
|
56
|
+
protected readonly environement: Environment;
|
|
52
57
|
data: T;
|
|
53
58
|
saving: boolean;
|
|
54
|
-
listenRemoteSubscription: Subscription;
|
|
55
59
|
defaultBackHref: string;
|
|
56
60
|
historyIcon: {
|
|
57
61
|
icon?: string;
|
|
@@ -59,6 +59,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
59
59
|
onAuthBasicChange: Subject<string>;
|
|
60
60
|
private _listenChangesSubscription;
|
|
61
61
|
private readonly _enableListenChanges;
|
|
62
|
+
private readonly _listenIntervalInSeconds;
|
|
62
63
|
private _cache;
|
|
63
64
|
private _$additionalFields;
|
|
64
65
|
private _tokenType$;
|
|
@@ -153,8 +154,8 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
153
154
|
*/
|
|
154
155
|
protected saveSettingsRemotely(settings: UserSettings): Promise<void>;
|
|
155
156
|
protected authenticateAndGetToken(token?: string, counter?: number): Promise<string>;
|
|
156
|
-
protected
|
|
157
|
-
protected
|
|
157
|
+
protected startListenRemoteChanges(opts?: AccountWatchOptions): Subscription;
|
|
158
|
+
protected stopListenRemoteChanges(): void;
|
|
158
159
|
protected watchChanges(opts?: AccountWatchOptions): Observable<Account>;
|
|
159
160
|
protected copyIdAndUpdateDate(source: Account | undefined, target: Account): void;
|
|
160
161
|
protected copyIdAndUpdateDateSettings(source: UserSettings | undefined, target: UserSettings): void;
|