@sumaris-net/ngx-components 0.25.4 → 0.25.5
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 +18 -12
- 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 +18 -14
- package/fesm2015/sumaris-net.ngx-components.js +16 -12
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -21359,7 +21359,7 @@
|
|
|
21359
21359
|
this.offline = this.network.offline;
|
|
21360
21360
|
// Listen pod config
|
|
21361
21361
|
this._subscription.add(this.configService.config
|
|
21362
|
-
.pipe(operators.debounceTime(1000))
|
|
21362
|
+
.pipe(operators.debounceTime(1000), operators.filter(function () { return _this.network.online; }))
|
|
21363
21363
|
.subscribe(function (config) { return _this.checkNeedInstallOrUpdate(config); }));
|
|
21364
21364
|
// Listen network changes
|
|
21365
21365
|
this._subscription.add(this.network.onNetworkStatusChanges
|
|
@@ -21447,6 +21447,7 @@
|
|
|
21447
21447
|
AppInstallUpgradeCard.prototype.checkNeedInstallOrUpdate = function (config) {
|
|
21448
21448
|
return __awaiter(this, void 0, void 0, function () {
|
|
21449
21449
|
var links;
|
|
21450
|
+
var _this = this;
|
|
21450
21451
|
return __generator(this, function (_a) {
|
|
21451
21452
|
switch (_a.label) {
|
|
21452
21453
|
case 0:
|
|
@@ -21459,7 +21460,7 @@
|
|
|
21459
21460
|
this.upgradeLinks = this.getCompatibleUpgradeLinks(links, config);
|
|
21460
21461
|
// Check for install links (if no upgrade need)
|
|
21461
21462
|
this.installLinks = !this.upgradeLinks && this.getCompatibleInstallLinks(links);
|
|
21462
|
-
return [4 /*yield*/, sleep(
|
|
21463
|
+
return [4 /*yield*/, sleep(1000)];
|
|
21463
21464
|
case 2:
|
|
21464
21465
|
_a.sent(); // Add a delay, for animation
|
|
21465
21466
|
return [3 /*break*/, 4];
|
|
@@ -21467,7 +21468,17 @@
|
|
|
21467
21468
|
this.loading = false;
|
|
21468
21469
|
this.markForCheck();
|
|
21469
21470
|
return [7 /*endfinally*/];
|
|
21470
|
-
case 4:
|
|
21471
|
+
case 4:
|
|
21472
|
+
// Listening downloading files
|
|
21473
|
+
(this.upgradeLinks || []).forEach(function (link) {
|
|
21474
|
+
var promise = _this.platform.getDownloadingPromise(link.url);
|
|
21475
|
+
// Listening download promise, if exists
|
|
21476
|
+
if (promise) {
|
|
21477
|
+
console.info("[install-upgrade-card] Platform is already downloading this file '" + link.url + "': listening promise...");
|
|
21478
|
+
_this.listenDownloadPromise(link, promise);
|
|
21479
|
+
}
|
|
21480
|
+
});
|
|
21481
|
+
return [2 /*return*/];
|
|
21471
21482
|
}
|
|
21472
21483
|
});
|
|
21473
21484
|
});
|
|
@@ -21498,12 +21509,6 @@
|
|
|
21498
21509
|
// Use min version as default version
|
|
21499
21510
|
upgradeLinks.forEach(function (link) {
|
|
21500
21511
|
link.version = link.version || appMinVersionFromPod;
|
|
21501
|
-
var promise = _this.platform.getDownloadingPromise(link.url);
|
|
21502
|
-
// Listening download promise, if exists
|
|
21503
|
-
if (promise) {
|
|
21504
|
-
console.info("[install-upgrade-card] Platform is already downloading this file '" + link.url + "': listening promise...");
|
|
21505
|
-
_this.listenDownloadPromise(link, promise);
|
|
21506
|
-
}
|
|
21507
21512
|
});
|
|
21508
21513
|
return isNotEmptyArray(upgradeLinks) ? upgradeLinks : undefined;
|
|
21509
21514
|
};
|
|
@@ -21592,13 +21597,14 @@
|
|
|
21592
21597
|
case 0:
|
|
21593
21598
|
if (!link || !promise)
|
|
21594
21599
|
return [2 /*return*/]; // Skip
|
|
21600
|
+
_a.label = 1;
|
|
21601
|
+
case 1:
|
|
21602
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
21603
|
+
// Mark link as loading
|
|
21595
21604
|
if (!link.downloading) {
|
|
21596
21605
|
link.downloading = true;
|
|
21597
21606
|
this.markForCheck();
|
|
21598
21607
|
}
|
|
21599
|
-
_a.label = 1;
|
|
21600
|
-
case 1:
|
|
21601
|
-
_a.trys.push([1, 3, 4, 5]);
|
|
21602
21608
|
return [4 /*yield*/, promise];
|
|
21603
21609
|
case 2:
|
|
21604
21610
|
location = _a.sent();
|