@sumaris-net/ngx-components 0.25.3 → 0.25.7

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.
@@ -15808,6 +15808,13 @@
15808
15808
  window.open(url, target, features, replace);
15809
15809
  }
15810
15810
  };
15811
+ PlatformService.prototype.getDownloadingPromise = function (uri) {
15812
+ return __awaiter(this, void 0, void 0, function () {
15813
+ return __generator(this, function (_a) {
15814
+ return [2 /*return*/, this._downloadingPromise.get(uri)];
15815
+ });
15816
+ });
15817
+ };
15811
15818
  PlatformService.prototype.download = function (request) {
15812
15819
  return __awaiter(this, void 0, void 0, function () {
15813
15820
  var promise, location, err_1;
@@ -21353,7 +21360,7 @@
21353
21360
  this.offline = this.network.offline;
21354
21361
  // Listen pod config
21355
21362
  this._subscription.add(this.configService.config
21356
- .pipe(operators.debounceTime(1000))
21363
+ .pipe(operators.debounceTime(1000), operators.filter(function () { return _this.network.online; }))
21357
21364
  .subscribe(function (config) { return _this.checkNeedInstallOrUpdate(config); }));
21358
21365
  // Listen network changes
21359
21366
  this._subscription.add(this.network.onNetworkStatusChanges
@@ -21375,54 +21382,23 @@
21375
21382
  AppInstallUpgradeCard.prototype.ngOnDestroy = function () {
21376
21383
  this._subscription.unsubscribe();
21377
21384
  this._subscription = null;
21385
+ this.onUpdateOfflineModeClick.complete();
21386
+ this.installLinks = null;
21387
+ this.upgradeLinks = null;
21378
21388
  };
21379
21389
  AppInstallUpgradeCard.prototype.download = function (event, link) {
21380
21390
  return __awaiter(this, void 0, void 0, function () {
21381
- var location, err_1;
21382
21391
  return __generator(this, function (_a) {
21383
- switch (_a.label) {
21384
- case 0:
21385
- if (!link || !link.url) {
21386
- console.error('[install-upgrade-card] Missing required argument \'link.url\'');
21387
- return [2 /*return*/]; // Skip
21388
- }
21389
- this.downloading = true;
21390
- _a.label = 1;
21391
- case 1:
21392
- _a.trys.push([1, 3, 4, 5]);
21393
- console.info('[install-upgrade-card] User click to download file: ' + link.url);
21394
- return [4 /*yield*/, this.platform.download({
21395
- uri: link.url,
21396
- title: link.name,
21397
- filename: link.downloadFilename,
21398
- mimeType: link.mimeType
21399
- })];
21400
- case 2:
21401
- location = _a.sent();
21402
- console.info('[install-upgrade-card] File downloaded at: ' + location);
21403
- return [3 /*break*/, 5];
21404
- case 3:
21405
- err_1 = _a.sent();
21406
- console.error('[install-upgrade] Download failed: ' + (err_1 && err_1.message || err_1));
21407
- this.showToast({
21408
- message: 'ERROR.DOWNLOAD_FAILED',
21409
- messageParams: { error: err_1 },
21410
- type: 'error',
21411
- showCloseButton: true
21412
- });
21413
- return [2 /*return*/]; // Stop here
21414
- case 4:
21415
- this.downloading = false;
21416
- this.markForCheck();
21417
- return [7 /*endfinally*/];
21418
- case 5:
21419
- if (!this._subscription)
21420
- return [2 /*return*/]; // Skip if component destroyed
21421
- return [4 /*yield*/, this.showDownloadCompleteDialog()];
21422
- case 6:
21423
- _a.sent();
21424
- return [2 /*return*/];
21392
+ if (!link || !link.url) {
21393
+ console.error('[install-upgrade-card] Missing required argument \'link.url\'');
21394
+ return [2 /*return*/]; // Skip
21425
21395
  }
21396
+ return [2 /*return*/, this.listenDownloadPromise(link.url, this.platform.download({
21397
+ uri: link.url,
21398
+ title: link.title,
21399
+ filename: link.filename,
21400
+ mimeType: link.mimeType
21401
+ }))];
21426
21402
  });
21427
21403
  });
21428
21404
  };
@@ -21469,7 +21445,8 @@
21469
21445
  /* -- private method -- */
21470
21446
  AppInstallUpgradeCard.prototype.checkNeedInstallOrUpdate = function (config) {
21471
21447
  return __awaiter(this, void 0, void 0, function () {
21472
- var installLinks;
21448
+ var links;
21449
+ var _this = this;
21473
21450
  return __generator(this, function (_a) {
21474
21451
  switch (_a.label) {
21475
21452
  case 0:
@@ -21477,12 +21454,12 @@
21477
21454
  _a.label = 1;
21478
21455
  case 1:
21479
21456
  _a.trys.push([1, , 3, 4]);
21480
- installLinks = this.getAllInstallLinks(config);
21457
+ links = this.getLinks(config);
21481
21458
  // Check for upgrade
21482
- this.updateLinks = this.getCompatibleUpgradeLinks(installLinks, config);
21459
+ this.upgradeLinks = this.getCompatibleUpgradeLinks(links, config);
21483
21460
  // Check for install links (if no upgrade need)
21484
- this.installLinks = !this.updateLinks && this.getCompatibleInstallLinks(installLinks);
21485
- return [4 /*yield*/, sleep(500)];
21461
+ this.installLinks = !this.upgradeLinks && this.getCompatibleInstallLinks(links);
21462
+ return [4 /*yield*/, sleep(1000)];
21486
21463
  case 2:
21487
21464
  _a.sent(); // Add a delay, for animation
21488
21465
  return [3 /*break*/, 4];
@@ -21490,7 +21467,14 @@
21490
21467
  this.loading = false;
21491
21468
  this.markForCheck();
21492
21469
  return [7 /*endfinally*/];
21493
- case 4: return [2 /*return*/];
21470
+ case 4:
21471
+ // Listening downloading promise, if exists
21472
+ (this.upgradeLinks || []).forEach(function (link) {
21473
+ var promise = _this.platform.getDownloadingPromise(link.url);
21474
+ if (promise)
21475
+ _this.listenDownloadPromise(link.url, promise);
21476
+ });
21477
+ return [2 /*return*/];
21494
21478
  }
21495
21479
  });
21496
21480
  });
@@ -21524,7 +21508,7 @@
21524
21508
  });
21525
21509
  return isNotEmptyArray(upgradeLinks) ? upgradeLinks : undefined;
21526
21510
  };
21527
- AppInstallUpgradeCard.prototype.getAllInstallLinks = function (config) {
21511
+ AppInstallUpgradeCard.prototype.getLinks = function (config) {
21528
21512
  var result = [];
21529
21513
  // Android
21530
21514
  {
@@ -21541,12 +21525,11 @@
21541
21525
  // Compute App name
21542
21526
  var name = isNotNilOrBlank(url) && config.label || this.environment.defaultAppName || 'SUMARiS';
21543
21527
  if (url) {
21544
- var downloadFilename = void 0;
21545
- var version = void 0;
21528
+ var title = void 0;
21546
21529
  var mimeType = void 0;
21547
21530
  // Get file name
21548
21531
  var filename = this.getFilename(url);
21549
- version = minVersion || 'latest';
21532
+ var version = minVersion || 'latest';
21550
21533
  // OK, this is a downloadable APK file (e.g. NOT a link to a playstore)
21551
21534
  if (filename === null || filename === void 0 ? void 0 : filename.endsWith('.apk')) {
21552
21535
  // Define mime type
@@ -21555,18 +21538,18 @@
21555
21538
  var versionMatches = /-v([1-9][0-9]*\.[0-9]+\.(:?(:?alpha|beta|rc)?[0-9]*))/i.exec(filename);
21556
21539
  version = versionMatches && versionMatches[1] || version;
21557
21540
  // Compute a new file name, with the version
21558
- if (isNotNilOrBlank(name)) {
21559
- downloadFilename = (name + "-v" + version + ".apk").toLowerCase();
21541
+ if (isNotNilOrBlank(name) && version !== 'latest') {
21542
+ filename = (name + "-v" + version + ".apk").toLowerCase();
21543
+ title = name + " v" + version;
21560
21544
  }
21561
21545
  else {
21562
- downloadFilename = filename;
21563
21546
  // Replace 'latest' with the app version, if present
21564
- if (downloadFilename.indexOf('latest')) {
21565
- downloadFilename = downloadFilename.replace('latest', version);
21547
+ if (filename.indexOf('latest')) {
21548
+ filename = filename.replace('latest', version);
21566
21549
  }
21567
21550
  }
21568
21551
  }
21569
- result.push({ name: name, url: url, platform: 'android', version: version, downloadFilename: downloadFilename, mimeType: mimeType });
21552
+ result.push({ name: name, url: url, platform: 'android', version: version, filename: filename, title: title, mimeType: mimeType });
21570
21553
  }
21571
21554
  }
21572
21555
  // iOS - TODO
@@ -21602,21 +21585,67 @@
21602
21585
  });
21603
21586
  });
21604
21587
  };
21588
+ AppInstallUpgradeCard.prototype.listenDownloadPromise = function (url, promise) {
21589
+ return __awaiter(this, void 0, void 0, function () {
21590
+ var location, err_1;
21591
+ return __generator(this, function (_a) {
21592
+ switch (_a.label) {
21593
+ case 0:
21594
+ if (!url || !promise)
21595
+ return [2 /*return*/]; // Skip
21596
+ _a.label = 1;
21597
+ case 1:
21598
+ _a.trys.push([1, 3, 4, 5]);
21599
+ // Mark as downloading
21600
+ if (!this.downloading) {
21601
+ console.info("[install-upgrade-card] Platform is downloading '" + url + "' ...");
21602
+ this.downloading = true;
21603
+ this.markForCheck();
21604
+ }
21605
+ return [4 /*yield*/, promise];
21606
+ case 2:
21607
+ location = _a.sent();
21608
+ console.info('[install-upgrade-card] File downloaded at: ' + location);
21609
+ return [3 /*break*/, 5];
21610
+ case 3:
21611
+ err_1 = _a.sent();
21612
+ console.error('[install-upgrade] Download failed: ' + (err_1 && err_1.message || err_1));
21613
+ return [2 /*return*/, this.showDownloadFailedToast(err_1)];
21614
+ case 4:
21615
+ this.downloading = false;
21616
+ this.markForCheck();
21617
+ return [7 /*endfinally*/];
21618
+ case 5: return [2 /*return*/, this.showDownloadCompleteDialog()];
21619
+ }
21620
+ });
21621
+ });
21622
+ };
21623
+ AppInstallUpgradeCard.prototype.showDownloadFailedToast = function (err) {
21624
+ return this.showToast({
21625
+ message: 'ERROR.DOWNLOAD_FAILED',
21626
+ messageParams: { error: err },
21627
+ type: 'error',
21628
+ showCloseButton: true
21629
+ });
21630
+ };
21605
21631
  AppInstallUpgradeCard.prototype.showDownloadCompleteDialog = function () {
21606
21632
  return __awaiter(this, void 0, void 0, function () {
21607
21633
  var translations, alert;
21608
21634
  return __generator(this, function (_a) {
21609
21635
  switch (_a.label) {
21610
- case 0: return [4 /*yield*/, this.translate.get([
21611
- 'INFO.ALERT_HEADER',
21612
- 'INFO.DOWNLOAD_UPDATE_SUCCEED',
21613
- 'COMMON.BTN_CLOSE'
21614
- ]).toPromise()];
21636
+ case 0:
21637
+ if (!this._subscription)
21638
+ return [2 /*return*/]; // Skip if component has been destroyed
21639
+ return [4 /*yield*/, this.translate.get([
21640
+ 'INFO.ALERT_HEADER',
21641
+ 'INFO.UPDATE_APP_DOWNLOADED',
21642
+ 'COMMON.BTN_CLOSE'
21643
+ ]).toPromise()];
21615
21644
  case 1:
21616
21645
  translations = _a.sent();
21617
21646
  return [4 /*yield*/, this.alertController.create({
21618
21647
  header: translations['INFO.ALERT_HEADER'],
21619
- message: translations['INFO.DOWNLOAD_UPDATE_SUCCEED'],
21648
+ message: translations['INFO.UPDATE_APP_DOWNLOADED'],
21620
21649
  buttons: [
21621
21650
  {
21622
21651
  text: translations['COMMON.BTN_CLOSE'],
@@ -21643,7 +21672,7 @@
21643
21672
  AppInstallUpgradeCard.decorators = [
21644
21673
  { type: i0.Component, args: [{
21645
21674
  selector: 'app-install-upgrade-card',
21646
- template: "\n\n<!-- Offline mode card-->\n<ion-card *ngIf=\"showOfflineWarning && (!loading && offline || waitingNetwork)\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\" *ngIf=\"!waitingNetwork; else waitingNetworkText\">\n <h4>\n <b *ngIf=\"isLogin; else notLogin\" [innerHTML]=\"'NETWORK.INFO.OFFLINE_OR_UNAUTHORIZED'| translate\"></b>\n <ng-template #notLogin>\n <b [innerHTML]=\"'NETWORK.INFO.OFFLINE'| translate\"></b>\n </ng-template>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.OFFLINE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n <ng-template #waitingNetworkText>\n <ion-text class=\"ion-text-wrap\" [innerHTML]=\"'NETWORK.INFO.RETRY_TO_CONNECT'| translate\"></ion-text>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button *ngIf=\"!waitingNetwork; else waitingSpinner\" color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"tryOnline()\">\n <span translate>NETWORK.BTN_CHECK_ALIVE</span>\n </ion-button>\n\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Upgrade links -->\n<ion-card *ngIf=\"showUpgradeWarning && !loading && !offline && updateLinks\"\n color=\"accent\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of updateLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3>\n <span *ngIf=\"link.version\" [innerHTML]=\"'INFO.UPDATE_APP_TO_VERSION'| translate: link\"></span>\n <span *ngIf=\"!link.version\" [innerHTML]=\"'INFO.UPDATE_APP'| translate: link\"></span>\n </h3>\n <h4>\n <small *ngIf=\"last\" [innerHTML]=\"'INFO.UPDATE_APP_HELP'|translate\"></small>\n </h4>\n </ion-text>\n </ion-col>\n\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Install links -->\n<ion-card *ngIf=\"showInstallButton && !loading && !offline && installLinks\"\n color=\"secondary\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of installLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3 [innerHTML]=\"'INFO.DOWNLOAD_APP_TITLE'| translate: {name: link.name, platform: getPlatformName(link.platform) }\"></h3>\n <h4><small *ngIf=\"last\" [innerHTML]=\"'INFO.DOWNLOAD_APP_HELP'|translate\"></small></h4>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Update offline feature card-->\n<ion-card *ngIf=\"showUpdateOfflineFeature && !loading && !offline\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h4>\n <b [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE'| translate\"></b>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"onUpdateOfflineModeClick.emit($event)\">\n <span translate>NETWORK.BTN_UPDATE</span>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Display a download button, depending on the link URL, and the device platform -->\n<ng-template #downloadButton let-link>\n\n <ng-container *ngIf=\"link.downloadFilename; else redirectButton\">\n\n <ng-container *ngIf=\"platform.canDownload; else webDownloadButton\">\n <!-- Download using platform -->\n <ion-button *ngIf=\"!downloading; else waitingSpinner\"\n (click)=\"download($event, asLink(link))\"\n [disabled]=\"downloading\"\n color=\"tertiary\" class=\"ion-float-end\">\n <ion-icon slot=\"start\" *ngIf=\"!downloading\" name=\"download\"></ion-icon>\n <ion-spinner slot=\"start\" class=\"ion-no-padding\" *ngIf=\"downloading\"></ion-spinner>\n <ion-label translate>COMMON.BTN_DOWNLOAD</ion-label>\n </ion-button>\n </ng-container>\n\n <!-- Web download button -->\n <ng-template #webDownloadButton>\n <ion-button [download]=\"link.downloadFilename\"\n [href]=\"link.url\"\n color=\"tertiary\" class=\"ion-float-end\" >\n <ion-label translate>COMMON.BTN_DOWNLOAD</ion-label>\n </ion-button>\n </ng-template>\n </ng-container>\n\n <!-- Web redirect button -->\n <ng-template #redirectButton>\n <ion-button [href]=\"link.url\" rel=\"external\" color=\"tertiary\" class=\"ion-float-end\" target=\"_blank\">\n <ion-label translate>COMMON.BTN_SHOW_MORE</ion-label>\n </ion-button>\n </ng-template>\n</ng-template>\n\n\n<!-- Waiting spinner -->\n<ng-template #waitingSpinner>\n <ion-spinner color=\"light\"></ion-spinner>\n</ng-template>\n",
21675
+ template: "\n\n<!-- Offline mode card-->\n<ion-card *ngIf=\"showOfflineWarning && (!loading && offline || waitingNetwork)\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\" *ngIf=\"!waitingNetwork; else waitingNetworkText\">\n <h4>\n <b *ngIf=\"isLogin; else notLogin\" [innerHTML]=\"'NETWORK.INFO.OFFLINE_OR_UNAUTHORIZED'| translate\"></b>\n <ng-template #notLogin>\n <b [innerHTML]=\"'NETWORK.INFO.OFFLINE'| translate\"></b>\n </ng-template>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.OFFLINE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n <ng-template #waitingNetworkText>\n <ion-text class=\"ion-text-wrap\" [innerHTML]=\"'NETWORK.INFO.RETRY_TO_CONNECT'| translate\"></ion-text>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button *ngIf=\"!waitingNetwork; else waitingSpinner\" color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"tryOnline()\">\n <span translate>NETWORK.BTN_CHECK_ALIVE</span>\n </ion-button>\n\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Upgrade links -->\n<ion-card *ngIf=\"showUpgradeWarning && !loading && !offline && upgradeLinks\"\n color=\"accent\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of upgradeLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3>\n <span *ngIf=\"link.version\" [innerHTML]=\"'INFO.UPDATE_APP_TO_VERSION'| translate: link\"></span>\n <span *ngIf=\"!link.version\" [innerHTML]=\"'INFO.UPDATE_APP'| translate: link\"></span>\n </h3>\n <h4>\n <small *ngIf=\"last\" [innerHTML]=\"'INFO.UPDATE_APP_HELP'|translate\"></small>\n </h4>\n </ion-text>\n </ion-col>\n\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Install links -->\n<ion-card *ngIf=\"showInstallButton && !loading && !offline && installLinks\"\n color=\"secondary\"\n class=\"ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row *ngFor=\"let link of installLinks; last as last\">\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h3 [innerHTML]=\"'INFO.DOWNLOAD_APP_TITLE'| translate: {name: link.name, platform: getPlatformName(link.platform) }\"></h3>\n <h4><small *ngIf=\"last\" [innerHTML]=\"'INFO.DOWNLOAD_APP_HELP'|translate\"></small></h4>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"downloadButton; context: { $implicit: link }\"></ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Update offline feature card-->\n<ion-card *ngIf=\"showUpdateOfflineFeature && !loading && !offline\"\n color=\"accent\"\n class=\"main ion-no-margin\"\n @slideUpDownAnimation>\n <ion-card-content class=\"ion-no-padding\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <ion-text class=\"ion-text-wrap\">\n <h4>\n <b [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE'| translate\"></b>\n </h4>\n <h3>\n <small [innerHTML]=\"'NETWORK.INFO.UPDATE_OFFLINE_MODE_HELP'|translate\"></small>\n </h3>\n </ion-text>\n </ion-col>\n <ion-col size=\"auto\">\n\n <!-- Retry button -->\n <ion-button color=\"tertiary\" class=\"ion-float-end\"\n (click)=\"onUpdateOfflineModeClick.emit($event)\">\n <span translate>NETWORK.BTN_UPDATE</span>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n</ion-card>\n\n<!-- Display a download button, depending on the link URL, and the device platform -->\n<ng-template #downloadButton let-link>\n\n <ng-container *ngIf=\"link.downloadFilename; else redirectButton\">\n\n <ng-container *ngIf=\"platform.canDownload; else webDownloadButton\">\n <!-- Download using platform -->\n <ion-button (click)=\"download($event, asLink(link))\"\n [disabled]=\"link.downloading\"\n color=\"tertiary\" class=\"ion-float-end\">\n <ion-icon slot=\"start\" *ngIf=\"!link.downloading\" name=\"download\"></ion-icon>\n <ion-spinner slot=\"start\" class=\"ion-no-padding\" *ngIf=\"link.downloading\"></ion-spinner>\n <ion-label translate>COMMON.BTN_DOWNLOAD</ion-label>\n </ion-button>\n </ng-container>\n\n <!-- Web download button -->\n <ng-template #webDownloadButton>\n <ion-button [download]=\"link.downloadFilename\"\n [href]=\"link.url\"\n color=\"tertiary\" class=\"ion-float-end\" >\n <ion-label translate>COMMON.BTN_DOWNLOAD</ion-label>\n </ion-button>\n </ng-template>\n </ng-container>\n\n <!-- Web redirect button -->\n <ng-template #redirectButton>\n <ion-button [href]=\"link.url\" rel=\"external\" color=\"tertiary\" class=\"ion-float-end\" target=\"_blank\">\n <ion-label translate>COMMON.BTN_SHOW_MORE</ion-label>\n </ion-button>\n </ng-template>\n</ng-template>\n\n\n<!-- Waiting spinner -->\n<ng-template #waitingSpinner>\n <ion-spinner color=\"light\"></ion-spinner>\n</ng-template>\n",
21647
21676
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
21648
21677
  animations: [slideUpDownAnimation],
21649
21678
  styles: ["ion-text small{font-size:85%}"]