@sumaris-net/ngx-components 2.6.6-rc4 → 2.6.6-rc6

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": "2.6.6-rc4",
4
+ "version": "2.6.6-rc6",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './src/environments/environment.class';
2
+ export * from './src/environments/environment.loader';
2
3
  export * from './src/app/shared/constants';
3
4
  export * from './src/app/shared/shared.module';
4
5
  export { SharedRoutingModule } from './src/app/shared/shared-routing.module';
@@ -32,7 +32,6 @@ export declare class HomePage implements OnDestroy {
32
32
  locales: LocaleConfig[];
33
33
  buttons: IMenuItem[];
34
34
  private readonly _debug;
35
- private _started;
36
35
  private _subscription;
37
36
  private _config;
38
37
  loading: boolean;
@@ -1,5 +1,4 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { CryptoService } from './crypto.service';
3
2
  import { TranslateService } from '@ngx-translate/core';
4
3
  import { Storage } from '@ionic/storage-angular';
5
4
  import { Peer } from './model/peer.model';
@@ -20,14 +19,12 @@ import { ILoggingService } from '../../shared/logging/logger.model';
20
19
  import * as i0 from "@angular/core";
21
20
  export declare const PEER_URL_REGEXP: RegExp;
22
21
  export declare class NetworkService extends StartableObservableService<Peer, Peer> {
23
- private _document;
24
- private platform;
25
22
  private modalCtrl;
26
- private cryptoService;
27
23
  private storage;
28
24
  private settings;
29
25
  private cache;
30
26
  private http;
27
+ private _document;
31
28
  protected environment: Environment;
32
29
  private loggingService;
33
30
  private translate;
@@ -49,7 +46,7 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
49
46
  get connectionType(): ConnectionType;
50
47
  get peer(): Peer;
51
48
  set peer(peer: Peer);
52
- constructor(_document: any, platform: Platform, modalCtrl: ModalController, cryptoService: CryptoService, storage: Storage, settings: LocalSettingsService, cache: CacheService, http: HttpClient, environment: Environment, loggingService: ILoggingService, network: Network, translate: TranslateService, toastController: ToastController);
49
+ constructor(platform: Platform, modalCtrl: ModalController, storage: Storage, settings: LocalSettingsService, cache: CacheService, http: HttpClient, _document: any, environment: Environment, loggingService: ILoggingService, network: Network, translate: TranslateService, toastController: ToastController);
53
50
  /**
54
51
  * Register to network event
55
52
  *
@@ -145,6 +142,6 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
145
142
  protected showToast<T = any>(opts: ShowToastOptions): Promise<OverlayEventDetail<T>>;
146
143
  protected addListener<T = any>(name: NetworkEventType, callback: (data?: T) => Promise<void>): Subscription;
147
144
  protected emit<T = any>(name: NetworkEventType, data?: T): Promise<void[]>;
148
- static ɵfac: i0.ɵɵFactoryDeclaration<NetworkService, [null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
145
+ static ɵfac: i0.ɵɵFactoryDeclaration<NetworkService, [null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
149
146
  static ɵprov: i0.ɵɵInjectableDeclaration<NetworkService>;
150
147
  }
@@ -1,6 +1,5 @@
1
- import { ModuleWithProviders } from '@angular/core';
1
+ import { ModuleWithProviders, Provider } from '@angular/core';
2
2
  import { CloseScrollStrategy, Overlay } from '@angular/cdk/overlay';
3
- import { Environment } from '../../environments/environment.class';
4
3
  import * as i0 from "@angular/core";
5
4
  import * as i1 from "./form/field.component";
6
5
  import * as i2 from "./form/loading-spinner";
@@ -24,8 +23,11 @@ import * as i19 from "./toolbar/toolbar.module";
24
23
  import * as i20 from "./named-filter/named-filter.module";
25
24
  import * as i21 from "ngx-jdenticon";
26
25
  export declare function scrollFactory(overlay: Overlay): () => CloseScrollStrategy;
26
+ export interface SharedModuleConfig {
27
+ loader?: Provider;
28
+ }
27
29
  export declare class SharedModule {
28
- static forRoot(environment?: Environment): ModuleWithProviders<SharedModule>;
30
+ static forRoot(config?: SharedModuleConfig): ModuleWithProviders<SharedModule>;
29
31
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
30
32
  static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.AppFormField, typeof i2.AppLoadingSpinner, typeof i3.AppHelpModal, typeof i4.UploadFileComponent, typeof i5.UploadFilePopover, typeof i6.SharedTestsPage], [typeof i7.CommonModule, typeof i8.IonicModule, typeof i9.ReactiveFormsModule, typeof i10.TranslateModule, typeof i11.ColorPickerModule, typeof i12.TextMaskModule, typeof i13.DragDropModule, typeof i14.MarkdownModule, typeof i15.SharedMaterialModule, typeof i16.SharedDirectivesModule, typeof i17.SharedPipesModule, typeof i18.SharedHotkeysModule, typeof i19.SharedToolbarModule, typeof i20.SharedNamedFilterModule], [typeof i7.CommonModule, typeof i8.IonicModule, typeof i10.TranslateModule, typeof i9.ReactiveFormsModule, typeof i11.ColorPickerModule, typeof i12.TextMaskModule, typeof i13.DragDropModule, typeof i14.MarkdownModule, typeof i21.NgxJdenticonModule, typeof i15.SharedMaterialModule, typeof i16.SharedDirectivesModule, typeof i17.SharedPipesModule, typeof i18.SharedHotkeysModule, typeof i19.SharedToolbarModule, typeof i20.SharedNamedFilterModule, typeof i1.AppFormField, typeof i2.AppLoadingSpinner, typeof i3.AppHelpModal, typeof i4.UploadFileComponent, typeof i5.UploadFilePopover, typeof i6.SharedTestsPage]>;
31
33
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "2.6.6-rc4",
5
+ "version": "2.6.6-rc6",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -8,6 +8,7 @@ export declare class Environment {
8
8
  name: string;
9
9
  version: string;
10
10
  production: boolean;
11
+ externalEnvironmentUrl?: string;
11
12
  baseUrl: string;
12
13
  sameUrlPeer?: boolean;
13
14
  defaultPeer?: {
@@ -0,0 +1,26 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Environment } from './environment.class';
3
+ import * as i0 from "@angular/core";
4
+ export declare abstract class EnvironmentLoader<T extends Environment = Environment> {
5
+ abstract load(): Promise<T>;
6
+ abstract get(): T;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentLoader<any>, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EnvironmentLoader<any>, never, never, {}, {}, never, never, false>;
9
+ }
10
+ export declare class EnvironmentHttpLoader<T extends Environment = Environment> extends EnvironmentLoader<T> {
11
+ protected http: HttpClient;
12
+ private readonly _logPrefix;
13
+ protected _debug: boolean;
14
+ protected _environment: T;
15
+ protected _loaded: boolean;
16
+ protected readonly _externalEnvironmentUrl: string;
17
+ constructor(http: HttpClient, defaultEnvironment?: T);
18
+ /**
19
+ * Get the loaded environment. Should be call after loaded
20
+ */
21
+ get(): T;
22
+ load(): Promise<T>;
23
+ protected fetch(url: string): Promise<Partial<T>>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentHttpLoader<any>, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<EnvironmentHttpLoader<any>>;
26
+ }