@sumaris-net/ngx-components 0.25.0 → 0.25.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 +293 -97
- 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/graphql/graphql.service.js +10 -11
- package/esm2015/src/app/core/install/install-upgrade-card.component.js +152 -51
- package/esm2015/src/app/core/services/model/peer.model.js +15 -2
- package/esm2015/src/app/core/services/network.service.js +2 -2
- package/esm2015/src/app/core/services/platform.service.js +35 -13
- package/esm2015/src/app/shared/services/startable-service.class.js +4 -1
- package/fesm2015/sumaris-net.ngx-components.js +205 -70
- 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 +20 -10
- package/src/app/core/services/model/peer.model.d.ts +1 -0
- package/src/app/core/services/platform.service.d.ts +3 -0
- package/src/app/shared/services/startable-service.class.d.ts +1 -0
- package/src/assets/i18n/fr.json +3 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -1,51 +1,61 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { ModalController } 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';
|
|
6
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
6
7
|
export declare interface InstallAppLink {
|
|
7
8
|
name: string;
|
|
8
9
|
url: string;
|
|
9
10
|
platform?: 'android' | 'ios';
|
|
10
11
|
version?: string;
|
|
11
|
-
|
|
12
|
+
filename?: string;
|
|
13
|
+
title?: string;
|
|
12
14
|
description?: string;
|
|
13
15
|
mimeType?: string;
|
|
16
|
+
downloading?: boolean;
|
|
14
17
|
}
|
|
15
18
|
export declare class AppInstallUpgradeCard implements OnInit, OnDestroy {
|
|
16
19
|
private modalCtrl;
|
|
17
20
|
private configService;
|
|
18
|
-
private
|
|
21
|
+
private toastController;
|
|
22
|
+
private alertController;
|
|
23
|
+
private translate;
|
|
19
24
|
private cd;
|
|
25
|
+
platform: PlatformService;
|
|
20
26
|
network: NetworkService;
|
|
21
27
|
protected environment: any;
|
|
22
28
|
private _subscription;
|
|
23
29
|
private _showUpdateOfflineFeature;
|
|
24
30
|
loading: boolean;
|
|
25
31
|
waitingNetwork: boolean;
|
|
26
|
-
allLinks: InstallAppLink[];
|
|
27
32
|
installLinks: InstallAppLink[];
|
|
28
|
-
|
|
33
|
+
upgradeLinks: InstallAppLink[];
|
|
29
34
|
offline: boolean;
|
|
30
35
|
upgradeVersion: string;
|
|
31
|
-
|
|
36
|
+
canDownload: boolean;
|
|
32
37
|
isLogin: boolean;
|
|
33
38
|
showUpgradeWarning: boolean;
|
|
34
39
|
showOfflineWarning: boolean;
|
|
35
40
|
showInstallButton: boolean;
|
|
36
41
|
set showUpdateOfflineFeature(value: boolean);
|
|
37
42
|
get showUpdateOfflineFeature(): boolean;
|
|
38
|
-
constructor(modalCtrl: ModalController, configService: ConfigService, platform: PlatformService, cd: ChangeDetectorRef, network: NetworkService, environment: any);
|
|
39
43
|
onUpdateOfflineModeClick: EventEmitter<UIEvent>;
|
|
44
|
+
constructor(modalCtrl: ModalController, configService: ConfigService, toastController: ToastController, alertController: AlertController, translate: TranslateService, cd: ChangeDetectorRef, platform: PlatformService, network: NetworkService, environment: any);
|
|
40
45
|
ngOnInit(): Promise<void>;
|
|
41
46
|
ngOnDestroy(): void;
|
|
42
|
-
|
|
43
|
-
tryOnline(): void
|
|
47
|
+
download(event: UIEvent, link: InstallAppLink): Promise<void>;
|
|
48
|
+
tryOnline(): Promise<void>;
|
|
44
49
|
getPlatformName(platform: 'android' | 'ios'): "" | "Android" | "iOS";
|
|
45
50
|
asLink(value: any): InstallAppLink;
|
|
51
|
+
private checkNeedInstallOrUpdate;
|
|
46
52
|
private getCompatibleInstallLinks;
|
|
47
53
|
private getCompatibleUpgradeLinks;
|
|
48
|
-
private
|
|
54
|
+
private getLinks;
|
|
49
55
|
private getFilename;
|
|
50
56
|
private markForCheck;
|
|
57
|
+
private showToast;
|
|
58
|
+
private listenDownloadPromise;
|
|
59
|
+
private showDownloadFailedToast;
|
|
60
|
+
private showDownloadCompleteDialog;
|
|
51
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;
|
|
@@ -55,6 +56,7 @@ export declare class PlatformService {
|
|
|
55
56
|
*/
|
|
56
57
|
isWebOrDesktop(): boolean;
|
|
57
58
|
isAndroidCordova(): boolean;
|
|
59
|
+
get canDownload(): boolean;
|
|
58
60
|
width(): number;
|
|
59
61
|
height(): number;
|
|
60
62
|
start(): Promise<void>;
|
|
@@ -68,6 +70,7 @@ export declare class PlatformService {
|
|
|
68
70
|
checkPeriod: number;
|
|
69
71
|
}): Promise<any>;
|
|
70
72
|
open(url: string, target?: string, features?: string, replace?: boolean): void;
|
|
73
|
+
getDownloadingPromise(uri: string): Promise<string> | undefined;
|
|
71
74
|
download(request: {
|
|
72
75
|
uri: string;
|
|
73
76
|
filename?: string;
|
|
@@ -19,6 +19,7 @@ export declare abstract class StartableService<T = any> implements IStartableSer
|
|
|
19
19
|
stop(): Promise<void>;
|
|
20
20
|
restart(): Promise<T>;
|
|
21
21
|
get started(): boolean;
|
|
22
|
+
get starting(): boolean;
|
|
22
23
|
ready(): Promise<T>;
|
|
23
24
|
protected ngOnStop(): Promise<void>;
|
|
24
25
|
protected abstract ngOnStart(): Promise<T>;
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -469,6 +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": "Echec du téléchargement : {{error}}",
|
|
472
473
|
"LOAD_ACCOUNT_ERROR": "Erreur de chargement du compte utilisateur.<small><br/>Si le problème persiste, veuillez contacter votre administrateur.</small>",
|
|
473
474
|
"SAVE_ACCOUNT_ERROR": "Erreur lors de la sauvegarde de votre compte.<small><br/>Si le problème persiste, veuillez contacter votre administrateur.</small>",
|
|
474
475
|
"LOAD_CONFIG_ERROR": "Erreur du chargement de la configuration",
|
|
@@ -527,6 +528,7 @@
|
|
|
527
528
|
"SEND_DEBUG_DATA": "Voulez-vous envoyer ces données à l'administrateur, afin qu'il vous aide ?"
|
|
528
529
|
},
|
|
529
530
|
"INFO": {
|
|
531
|
+
"ALERT_HEADER": "Information",
|
|
530
532
|
"SYNCHRONIZATION_SUCCEED": "Synchronisation terminée avec succès !<br/>Les données ont bien été recues par le serveur.",
|
|
531
533
|
"DEBUG_DATA_SEND": "Demande d'aide envoyée à l'administrateur.",
|
|
532
534
|
"DATA_MIGRATION_STARTED": "Restauration de données en cours.<br/><b>Veuillez patienter...</b>",
|
|
@@ -536,6 +538,7 @@
|
|
|
536
538
|
"UPDATE_APP": "<b>Veuillez mettre à jour {{name}}</b>",
|
|
537
539
|
"UPDATE_APP_TO_VERSION": "<b>Veuillez mettre à jour {{name}}</b> (en v{{version}} ou +)",
|
|
538
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>.",
|
|
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.",
|
|
539
542
|
"PLEASE_TYPE_MORE_CHARACTERS": "Veuillez taper au moins {{minLength}} caractères"
|
|
540
543
|
},
|
|
541
544
|
"TABLE": {
|