@sumaris-net/ngx-components 1.10.1 → 1.10.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "1.10.1",
4
+ "version": "1.10.2",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -1,5 +1,5 @@
1
1
  import { AfterViewInit, ChangeDetectorRef, EventEmitter, Injector, OnDestroy, OnInit } from '@angular/core';
2
- import { Subject, Subscription } from 'rxjs';
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
- protected dateFormat: DateFormatPipe;
49
- protected cd: ChangeDetectorRef;
50
- protected settings: LocalSettingsService;
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 startListenChanges(opts?: AccountWatchOptions): Subscription;
157
- protected stopListenChanges(): void;
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;