@sumaris-net/ngx-components 0.25.2 → 0.25.6
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 +169 -59
- 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/install/install-upgrade-card.component.js +102 -52
- package/esm2015/src/app/core/services/model/peer.model.js +15 -2
- package/esm2015/src/app/core/services/platform.service.js +23 -6
- package/fesm2015/sumaris-net.ngx-components.js +133 -54
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/install/install-upgrade-card.component.d.ts +11 -6
- package/src/app/core/services/model/peer.model.d.ts +1 -0
- package/src/app/core/services/platform.service.d.ts +2 -0
- package/src/assets/i18n/fr.json +3 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { ModalController, ToastController } from '@ionic/angular';
|
|
2
|
+
import { AlertController, ModalController, ToastController } from '@ionic/angular';
|
|
3
3
|
import { ConfigService } from '../services/config.service';
|
|
4
4
|
import { PlatformService } from '../services/platform.service';
|
|
5
5
|
import { NetworkService } from '../services/network.service';
|
|
@@ -9,14 +9,17 @@ export declare interface InstallAppLink {
|
|
|
9
9
|
url: string;
|
|
10
10
|
platform?: 'android' | 'ios';
|
|
11
11
|
version?: string;
|
|
12
|
-
|
|
12
|
+
filename?: string;
|
|
13
|
+
title?: string;
|
|
13
14
|
description?: string;
|
|
14
15
|
mimeType?: string;
|
|
16
|
+
downloading?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare class AppInstallUpgradeCard implements OnInit, OnDestroy {
|
|
17
19
|
private modalCtrl;
|
|
18
20
|
private configService;
|
|
19
21
|
private toastController;
|
|
22
|
+
private alertController;
|
|
20
23
|
private translate;
|
|
21
24
|
private cd;
|
|
22
25
|
platform: PlatformService;
|
|
@@ -28,18 +31,17 @@ export declare class AppInstallUpgradeCard implements OnInit, OnDestroy {
|
|
|
28
31
|
downloading: boolean;
|
|
29
32
|
waitingNetwork: boolean;
|
|
30
33
|
installLinks: InstallAppLink[];
|
|
31
|
-
|
|
34
|
+
upgradeLinks: InstallAppLink[];
|
|
32
35
|
offline: boolean;
|
|
33
36
|
upgradeVersion: string;
|
|
34
|
-
canDownload: boolean;
|
|
35
37
|
isLogin: boolean;
|
|
36
38
|
showUpgradeWarning: boolean;
|
|
37
39
|
showOfflineWarning: boolean;
|
|
38
40
|
showInstallButton: boolean;
|
|
39
41
|
set showUpdateOfflineFeature(value: boolean);
|
|
40
42
|
get showUpdateOfflineFeature(): boolean;
|
|
41
|
-
constructor(modalCtrl: ModalController, configService: ConfigService, toastController: ToastController, translate: TranslateService, cd: ChangeDetectorRef, platform: PlatformService, network: NetworkService, environment: any);
|
|
42
43
|
onUpdateOfflineModeClick: EventEmitter<UIEvent>;
|
|
44
|
+
constructor(modalCtrl: ModalController, configService: ConfigService, toastController: ToastController, alertController: AlertController, translate: TranslateService, cd: ChangeDetectorRef, platform: PlatformService, network: NetworkService, environment: any);
|
|
43
45
|
ngOnInit(): Promise<void>;
|
|
44
46
|
ngOnDestroy(): void;
|
|
45
47
|
download(event: UIEvent, link: InstallAppLink): Promise<void>;
|
|
@@ -49,8 +51,11 @@ export declare class AppInstallUpgradeCard implements OnInit, OnDestroy {
|
|
|
49
51
|
private checkNeedInstallOrUpdate;
|
|
50
52
|
private getCompatibleInstallLinks;
|
|
51
53
|
private getCompatibleUpgradeLinks;
|
|
52
|
-
private
|
|
54
|
+
private getLinks;
|
|
53
55
|
private getFilename;
|
|
54
56
|
private markForCheck;
|
|
55
57
|
private showToast;
|
|
58
|
+
private listenDownloadPromise;
|
|
59
|
+
private showDownloadFailedToast;
|
|
60
|
+
private showDownloadCompleteDialog;
|
|
56
61
|
}
|
|
@@ -2,6 +2,7 @@ import { Cloneable, Entity, EntityAsObjectOptions } from './entity.model';
|
|
|
2
2
|
export declare class Peer extends Entity<Peer> implements Cloneable<Peer> {
|
|
3
3
|
static fromObject: (source: any, opts?: any) => Peer;
|
|
4
4
|
static parseUrl(peerUrl: string): Peer;
|
|
5
|
+
static path(peer: Peer, ...paths: string[]): string;
|
|
5
6
|
dns: string;
|
|
6
7
|
ipv4: string;
|
|
7
8
|
ipv6: string;
|
|
@@ -44,6 +44,7 @@ export declare class PlatformService {
|
|
|
44
44
|
private _mobile;
|
|
45
45
|
private _cordova;
|
|
46
46
|
private _android;
|
|
47
|
+
private _downloadingPromise;
|
|
47
48
|
touchUi: boolean;
|
|
48
49
|
get started(): boolean;
|
|
49
50
|
get mobile(): boolean;
|
|
@@ -69,6 +70,7 @@ export declare class PlatformService {
|
|
|
69
70
|
checkPeriod: number;
|
|
70
71
|
}): Promise<any>;
|
|
71
72
|
open(url: string, target?: string, features?: string, replace?: boolean): void;
|
|
73
|
+
getDownloadingPromise(uri: string): Promise<string> | undefined;
|
|
72
74
|
download(request: {
|
|
73
75
|
uri: string;
|
|
74
76
|
filename?: string;
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
"BAD_UPDATE_DATE": "Sauvegarde impossible (modification concurrente détectée).",
|
|
470
470
|
"DATA_LOCKED": "Sauvegarde impossible (donnée verrouillée).",
|
|
471
471
|
"DATA_NOT_FOUND": "Donnée non trouvée",
|
|
472
|
-
"DOWNLOAD_FAILED": "
|
|
472
|
+
"DOWNLOAD_FAILED": "Echec du téléchargement : {{error}}",
|
|
473
473
|
"LOAD_ACCOUNT_ERROR": "Erreur de chargement du compte utilisateur.<small><br/>Si le problème persiste, veuillez contacter votre administrateur.</small>",
|
|
474
474
|
"SAVE_ACCOUNT_ERROR": "Erreur lors de la sauvegarde de votre compte.<small><br/>Si le problème persiste, veuillez contacter votre administrateur.</small>",
|
|
475
475
|
"LOAD_CONFIG_ERROR": "Erreur du chargement de la configuration",
|
|
@@ -528,6 +528,7 @@
|
|
|
528
528
|
"SEND_DEBUG_DATA": "Voulez-vous envoyer ces données à l'administrateur, afin qu'il vous aide ?"
|
|
529
529
|
},
|
|
530
530
|
"INFO": {
|
|
531
|
+
"ALERT_HEADER": "Information",
|
|
531
532
|
"SYNCHRONIZATION_SUCCEED": "Synchronisation terminée avec succès !<br/>Les données ont bien été recues par le serveur.",
|
|
532
533
|
"DEBUG_DATA_SEND": "Demande d'aide envoyée à l'administrateur.",
|
|
533
534
|
"DATA_MIGRATION_STARTED": "Restauration de données en cours.<br/><b>Veuillez patienter...</b>",
|
|
@@ -537,7 +538,7 @@
|
|
|
537
538
|
"UPDATE_APP": "<b>Veuillez mettre à jour {{name}}</b>",
|
|
538
539
|
"UPDATE_APP_TO_VERSION": "<b>Veuillez mettre à jour {{name}}</b> (en v{{version}} ou +)",
|
|
539
540
|
"UPDATE_APP_HELP": "Cette mise à jour est <b>nécessaire pour se connecter correctement</b> au nœud réseau. En cas de problème pour l'installation, veuillez <b>contacter votre administrateur</b>.",
|
|
540
|
-
"
|
|
541
|
+
"UPDATE_APP_DOWNLOADED": "Le téléchargement de la mise à jour est terminée.<br/><b>Veuillez l'installer</b> à partir des fichiers de l'appareil.",
|
|
541
542
|
"PLEASE_TYPE_MORE_CHARACTERS": "Veuillez taper au moins {{minLength}} caractères"
|
|
542
543
|
},
|
|
543
544
|
"TABLE": {
|