@sumaris-net/ngx-components 0.25.4 → 0.25.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "0.25.4",
4
+ "version": "0.25.8",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -28,12 +28,12 @@ export declare class AppInstallUpgradeCard implements OnInit, OnDestroy {
28
28
  private _subscription;
29
29
  private _showUpdateOfflineFeature;
30
30
  loading: boolean;
31
+ downloading: boolean;
31
32
  waitingNetwork: boolean;
32
33
  installLinks: InstallAppLink[];
33
34
  upgradeLinks: InstallAppLink[];
34
35
  offline: boolean;
35
36
  upgradeVersion: string;
36
- canDownload: boolean;
37
37
  isLogin: boolean;
38
38
  showUpgradeWarning: boolean;
39
39
  showOfflineWarning: boolean;
@@ -55,7 +55,7 @@ export declare class AppInstallUpgradeCard implements OnInit, OnDestroy {
55
55
  private getFilename;
56
56
  private markForCheck;
57
57
  private showToast;
58
- private listenDownloadPromise;
58
+ private listenDownloadJob;
59
59
  private showDownloadFailedToast;
60
60
  private showDownloadCompleteDialog;
61
61
  }
@@ -15,6 +15,7 @@ import { EntitiesStorage } from './storage/entities-storage.service';
15
15
  import { ShowToastOptions } from '../../shared/toasts';
16
16
  import { TranslateService } from '@ngx-translate/core';
17
17
  import { AccountService } from './account.service';
18
+ import { Observable } from 'rxjs';
18
19
  import { ConfigService } from './config.service';
19
20
  import { MomentDateAdapter } from '@angular/material-moment-adapter';
20
21
  import { Downloader, DownloadRequest } from '@ionic-native/downloader/ngx';
@@ -44,7 +45,7 @@ export declare class PlatformService {
44
45
  private _mobile;
45
46
  private _cordova;
46
47
  private _android;
47
- private _downloadingPromise;
48
+ private _downloadingJobs;
48
49
  touchUi: boolean;
49
50
  get started(): boolean;
50
51
  get mobile(): boolean;
@@ -70,11 +71,11 @@ export declare class PlatformService {
70
71
  checkPeriod: number;
71
72
  }): Promise<any>;
72
73
  open(url: string, target?: string, features?: string, replace?: boolean): void;
73
- getDownloadingPromise(uri: string): Promise<string> | undefined;
74
+ getDownloadingJob(uri: string): Observable<string>;
74
75
  download(request: {
75
76
  uri: string;
76
77
  filename?: string;
77
- } & Partial<DownloadRequest>): Promise<string>;
78
+ } & Partial<DownloadRequest>): Observable<string>;
78
79
  protected configureCordovaPlugins(mobile: boolean): void;
79
80
  protected configureTranslate(): void;
80
81
  protected configureCache(online?: boolean): void;
@@ -469,6 +469,7 @@
469
469
  "BAD_UPDATE_DATE": "Unable to save.<small><br/>Concurrent change detected. Please reload this page and retry.</small>",
470
470
  "DATA_LOCKED": "Unable to save.<small><br/>Data locked on server. Please retry later</small>",
471
471
  "DATA_NOT_FOUND": "Data not found",
472
+ "DOWNLOAD_FAILED": "Download failed: {{error}}",
472
473
  "LOAD_ACCOUNT_ERROR": "Error loading user account.<small><br/>If the problem persists, please contact your administrator.</small>",
473
474
  "SAVE_ACCOUNT_ERROR": "Error saving your account.<small><br/>If the problem persists, please contact your administrator.</small>",
474
475
  "LOAD_CONFIG_ERROR": "Error while loading configuration",
@@ -527,6 +528,7 @@
527
528
  "SEND_DEBUG_DATA": "Do you want to send this data to the administrator for help?"
528
529
  },
529
530
  "INFO": {
531
+ "ALERT_HEADER": "Information",
530
532
  "SYNCHRONIZATION_SUCCEED": "Synchronization completed! <br/> The data has been received by the server.",
531
533
  "DEBUG_DATA_SEND": "Help request sent to administrator",
532
534
  "DATA_MIGRATION_STARTED": "Data recovery in progress. <br/><b>Please wait ...</b>",
@@ -536,6 +538,7 @@
536
538
  "UPDATE_APP": "<b>Please upgrade {{name}}</b>",
537
539
  "UPDATE_APP_TO_VERSION": "<b>Please upgrade {{name}}</b> in version {{version}} (or more)",
538
540
  "UPDATE_APP_HELP": "If you do not do this upgrade, communication with the network node may not work.",
541
+ "UPDATE_APP_DOWNLOADED": "The update download is complete.<br/><b>Please install</b> from the downloaded files.",
539
542
  "PLEASE_TYPE_MORE_CHARACTERS": "Please type at least {{minLength}} characters"
540
543
  },
541
544
  "TABLE": {
@@ -543,6 +546,7 @@
543
546
  "SEARCH_TEXT": "Search: code, name",
544
547
  "LABEL": "Code",
545
548
  "NAME": "Name",
549
+ "LEVEL_ID": "Level",
546
550
  "CREATION_DATE": "Creation date",
547
551
  "UPDATE_DATE": "Update date",
548
552
  "COMMENTS": "Comments",
@@ -469,6 +469,7 @@
469
469
  "BAD_UPDATE_DATE": "Unable to save.<small><br/>Concurrent change detected. Please reload this page and retry.</small>",
470
470
  "DATA_LOCKED": "Unable to save.<small><br/>Data locked on server. Please retry later</small>",
471
471
  "DATA_NOT_FOUND": "Data not found",
472
+ "DOWNLOAD_FAILED": "Download failed: {{error}}",
472
473
  "LOAD_ACCOUNT_ERROR": "Error loading user account.<small><br/>If the problem persists, please contact your administrator.</small>",
473
474
  "SAVE_ACCOUNT_ERROR": "Error saving your account.<small><br/>If the problem persists, please contact your administrator.</small>",
474
475
  "LOAD_CONFIG_ERROR": "Error while loading configuration",
@@ -527,6 +528,7 @@
527
528
  "SEND_DEBUG_DATA": "Do you want to send this data to the administrator for help?"
528
529
  },
529
530
  "INFO": {
531
+ "ALERT_HEADER": "Information",
530
532
  "SYNCHRONIZATION_SUCCEED": "Synchronization completed! <br/> The data has been received by the server.",
531
533
  "DEBUG_DATA_SEND": "Help request sent to administrator",
532
534
  "DATA_MIGRATION_STARTED": "Data recovery in progress. <br/><b>Please wait ...</b>",
@@ -536,6 +538,7 @@
536
538
  "UPDATE_APP": "<b>Please upgrade {{name}}</b>",
537
539
  "UPDATE_APP_TO_VERSION": "<b>Please upgrade {{name}}</b> in version {{version}} (or more)",
538
540
  "UPDATE_APP_HELP": "If you do not do this upgrade, communication with the network node may not work.",
541
+ "UPDATE_APP_DOWNLOADED": "The update download is complete.<br/><b>Please install</b> from the downloaded files.",
539
542
  "PLEASE_TYPE_MORE_CHARACTERS": "Please type at least {{minLength}} characters"
540
543
  },
541
544
  "TABLE": {
@@ -543,6 +546,7 @@
543
546
  "SEARCH_TEXT": "Search: code, name",
544
547
  "LABEL": "Code",
545
548
  "NAME": "Name",
549
+ "LEVEL_ID": "Level",
546
550
  "CREATION_DATE": "Creation date",
547
551
  "UPDATE_DATE": "Update date",
548
552
  "COMMENTS": "Comments",