@rxap/service-worker 19.2.0 → 21.0.1-dev.1
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/CHANGELOG.md +32 -0
- package/compodoc/changelog.html +30 -0
- package/compodoc/components/ServiceWorkerUpdateDialogComponent.html +123 -93
- package/compodoc/dependencies.html +7 -7
- package/compodoc/injectables/AutoUpdateService.html +4 -59
- package/compodoc/injectables/CheckForUpdateService.html +6 -72
- package/compodoc/injectables/DialogUpdateService.html +15 -78
- package/compodoc/injectables/LogUpdateService.html +4 -53
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +212 -472
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/AutoUpdateService.html +2 -2
- package/docs/html/classes/CheckForUpdateService.html +2 -2
- package/docs/html/classes/DialogUpdateService.html +2 -2
- package/docs/html/classes/LogUpdateService.html +2 -2
- package/docs/html/classes/ServiceWorkerUpdateDialogComponent.html +2 -6
- package/docs/html/classes/SnackbarUpdateService.html +2 -2
- package/docs/html/functions/ProvideServiceWorkerUpdater.html +1 -1
- package/docs/html/functions/UnregisterServiceWorker.html +1 -1
- package/docs/html/functions/withAutoUpdater.html +1 -1
- package/docs/html/functions/withDialogUpdater.html +1 -1
- package/docs/html/functions/withLogUpdater.html +1 -1
- package/docs/html/functions/withSnackbarUpdater.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/variables/UPDATE_AVAILABLE_EVENT.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AutoUpdateService.md +4 -12
- package/docs/markdown/classes/CheckForUpdateService.md +4 -16
- package/docs/markdown/classes/DialogUpdateService.md +4 -16
- package/docs/markdown/classes/LogUpdateService.md +4 -12
- package/docs/markdown/classes/ServiceWorkerUpdateDialogComponent.md +10 -32
- package/docs/markdown/classes/SnackbarUpdateService.md +3 -3
- package/docs/markdown/functions/ProvideServiceWorkerUpdater.md +2 -2
- package/docs/markdown/functions/UnregisterServiceWorker.md +2 -2
- package/docs/markdown/functions/withAutoUpdater.md +2 -2
- package/docs/markdown/functions/withDialogUpdater.md +2 -2
- package/docs/markdown/functions/withLogUpdater.md +2 -2
- package/docs/markdown/functions/withSnackbarUpdater.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/variables/UPDATE_AVAILABLE_EVENT.md +2 -2
- package/docs/wiki/Class.AutoUpdateService.md +3 -11
- package/docs/wiki/Class.CheckForUpdateService.md +3 -15
- package/docs/wiki/Class.DialogUpdateService.md +3 -15
- package/docs/wiki/Class.LogUpdateService.md +3 -11
- package/docs/wiki/Class.ServiceWorkerUpdateDialogComponent.md +9 -31
- package/docs/wiki/Class.SnackbarUpdateService.md +2 -2
- package/docs/wiki/Function.ProvideServiceWorkerUpdater.md +1 -1
- package/docs/wiki/Function.UnregisterServiceWorker.md +1 -1
- package/docs/wiki/Function.withAutoUpdater.md +1 -1
- package/docs/wiki/Function.withDialogUpdater.md +1 -1
- package/docs/wiki/Function.withLogUpdater.md +1 -1
- package/docs/wiki/Function.withSnackbarUpdater.md +1 -1
- package/docs/wiki/Variable.UPDATE_AVAILABLE_EVENT.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-service-worker.mjs +51 -82
- package/fesm2022/rxap-service-worker.mjs.map +1 -1
- package/package.json +20 -19
- package/types/rxap-service-worker.d.ts +66 -0
- package/index.d.ts +0 -8
- package/lib/auto-update.service.d.ts +0 -9
- package/lib/check-for-update.service.d.ts +0 -12
- package/lib/dialog-update.service.d.ts +0 -12
- package/lib/log-update.service.d.ts +0 -9
- package/lib/provide-service-worker-updater.d.ts +0 -6
- package/lib/service-worker-update-dialog/service-worker-update-dialog.component.d.ts +0 -13
- package/lib/snackbar-update.service.d.ts +0 -9
- package/lib/unregister-service-worker.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
## 21.0.1-dev.1 (2026-11-22)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **angular:** add ng-prism showcases from the leaf library outwards
|
|
6
|
+
- **angular:** add ng-prism styleguide targets and environment showcase
|
|
7
|
+
|
|
8
|
+
### 🧱 Updated Dependencies
|
|
9
|
+
|
|
10
|
+
- Updated angular-environment to 21.0.1-dev.1
|
|
11
|
+
- Updated angular-life-cycle to 21.0.1-dev.1
|
|
12
|
+
|
|
13
|
+
### ❤️ Thank You
|
|
14
|
+
|
|
15
|
+
- Claude Opus 5.5
|
|
16
|
+
- Merzough Münker
|
|
17
|
+
|
|
18
|
+
## 21.0.1-dev.0 (2026-11-20)
|
|
19
|
+
|
|
20
|
+
### 🩹 Fixes
|
|
21
|
+
|
|
22
|
+
- **upgrade:** TestBed.get->inject (removed in angular) + dedupe rxjs to single version
|
|
23
|
+
|
|
24
|
+
### 🧱 Updated Dependencies
|
|
25
|
+
|
|
26
|
+
- Updated angular-environment to 21.0.1-dev.0
|
|
27
|
+
- Updated angular-life-cycle to 21.0.1-dev.0
|
|
28
|
+
|
|
29
|
+
### ❤️ Thank You
|
|
30
|
+
|
|
31
|
+
- Merzough Münker
|
|
32
|
+
|
|
1
33
|
## 19.2.0 (2026-11-20)
|
|
2
34
|
|
|
3
35
|
This was a version bump only for angular-service-worker to align it with other projects, there were no code changes.
|
package/compodoc/changelog.html
CHANGED
|
@@ -82,6 +82,36 @@
|
|
|
82
82
|
<div class="content getting-started">
|
|
83
83
|
<div class="content-data">
|
|
84
84
|
|
|
85
|
+
<h2>21.0.1-dev.1 (2026-11-22)</h2>
|
|
86
|
+
<h3>🚀 Features</h3>
|
|
87
|
+
<ul>
|
|
88
|
+
<li><strong>angular:</strong> add ng-prism showcases from the leaf library outwards</li>
|
|
89
|
+
<li><strong>angular:</strong> add ng-prism styleguide targets and environment showcase</li>
|
|
90
|
+
</ul>
|
|
91
|
+
<h3>🧱 Updated Dependencies</h3>
|
|
92
|
+
<ul>
|
|
93
|
+
<li>Updated angular-environment to 21.0.1-dev.1</li>
|
|
94
|
+
<li>Updated angular-life-cycle to 21.0.1-dev.1</li>
|
|
95
|
+
</ul>
|
|
96
|
+
<h3>❤️ Thank You</h3>
|
|
97
|
+
<ul>
|
|
98
|
+
<li>Claude Opus 5.5</li>
|
|
99
|
+
<li>Merzough Münker</li>
|
|
100
|
+
</ul>
|
|
101
|
+
<h2>21.0.1-dev.0 (2026-11-20)</h2>
|
|
102
|
+
<h3>🩹 Fixes</h3>
|
|
103
|
+
<ul>
|
|
104
|
+
<li><strong>upgrade:</strong> TestBed.get->inject (removed in angular) + dedupe rxjs to single version</li>
|
|
105
|
+
</ul>
|
|
106
|
+
<h3>🧱 Updated Dependencies</h3>
|
|
107
|
+
<ul>
|
|
108
|
+
<li>Updated angular-environment to 21.0.1-dev.0</li>
|
|
109
|
+
<li>Updated angular-life-cycle to 21.0.1-dev.0</li>
|
|
110
|
+
</ul>
|
|
111
|
+
<h3>❤️ Thank You</h3>
|
|
112
|
+
<ul>
|
|
113
|
+
<li>Merzough Münker</li>
|
|
114
|
+
</ul>
|
|
85
115
|
<h2>19.2.0 (2026-11-20)</h2>
|
|
86
116
|
<p>This was a version bump only for angular-service-worker to align it with other projects, there were no code changes.</p>
|
|
87
117
|
<h2>19.2.0-dev.0 (2026-06-19)</h2>
|
|
@@ -126,12 +126,6 @@
|
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
<p class="comment">
|
|
130
|
-
<h3>Implements</h3>
|
|
131
|
-
</p>
|
|
132
|
-
<p class="comment">
|
|
133
|
-
<code>AfterViewInit</code>
|
|
134
|
-
</p>
|
|
135
129
|
|
|
136
130
|
|
|
137
131
|
<section data-compodoc="block-metadata">
|
|
@@ -139,6 +133,10 @@
|
|
|
139
133
|
<table class="table table-sm table-hover metadata">
|
|
140
134
|
<tbody>
|
|
141
135
|
|
|
136
|
+
<tr>
|
|
137
|
+
<td class="col-md-3">changeDetection</td>
|
|
138
|
+
<td class="col-md-9"><code>ChangeDetectionStrategy.OnPush</code></td>
|
|
139
|
+
</tr>
|
|
142
140
|
|
|
143
141
|
|
|
144
142
|
|
|
@@ -156,13 +154,6 @@
|
|
|
156
154
|
</tr>
|
|
157
155
|
|
|
158
156
|
|
|
159
|
-
<tr>
|
|
160
|
-
<td class="col-md-3">imports</td>
|
|
161
|
-
<td class="col-md-9">
|
|
162
|
-
<code>NgSwitch</code>
|
|
163
|
-
<code>NgSwitchCase</code>
|
|
164
|
-
</td>
|
|
165
|
-
</tr>
|
|
166
157
|
|
|
167
158
|
<tr>
|
|
168
159
|
<td class="col-md-3">styleUrls</td>
|
|
@@ -200,8 +191,13 @@
|
|
|
200
191
|
<td class="col-md-4">
|
|
201
192
|
<ul class="index-list">
|
|
202
193
|
<li>
|
|
203
|
-
<span class="modifier"></span>
|
|
204
194
|
<span class="modifier">Public</span>
|
|
195
|
+
<span class="modifier">Readonly</span>
|
|
196
|
+
<a href="#closeDialog" >closeDialog</a>
|
|
197
|
+
</li>
|
|
198
|
+
<li>
|
|
199
|
+
<span class="modifier">Public</span>
|
|
200
|
+
<span class="modifier">Readonly</span>
|
|
205
201
|
<a href="#dialog" >dialog</a>
|
|
206
202
|
</li>
|
|
207
203
|
<li>
|
|
@@ -250,6 +246,24 @@
|
|
|
250
246
|
</table>
|
|
251
247
|
</section>
|
|
252
248
|
|
|
249
|
+
<section data-compodoc="block-constructor">
|
|
250
|
+
<h3 id="constructor">Constructor</h3>
|
|
251
|
+
<table class="table table-sm table-bordered">
|
|
252
|
+
<tbody>
|
|
253
|
+
<tr>
|
|
254
|
+
<td class="col-md-4">
|
|
255
|
+
<code>constructor()</code>
|
|
256
|
+
</td>
|
|
257
|
+
</tr>
|
|
258
|
+
<tr>
|
|
259
|
+
<td class="col-md-4">
|
|
260
|
+
<div class="io-line">Defined in <a href="" data-line="39" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:39</a></div>
|
|
261
|
+
</td>
|
|
262
|
+
</tr>
|
|
263
|
+
|
|
264
|
+
</tbody>
|
|
265
|
+
</table>
|
|
266
|
+
</section>
|
|
253
267
|
|
|
254
268
|
|
|
255
269
|
<section data-compodoc="block-outputs">
|
|
@@ -261,16 +275,10 @@
|
|
|
261
275
|
<a name="closeDialog"></a>
|
|
262
276
|
<b>closeDialog</b>
|
|
263
277
|
</td>
|
|
264
|
-
</tr>
|
|
265
|
-
<tr>
|
|
266
|
-
<td class="col-md-4">
|
|
267
|
-
<i>Type : </i> <code>EventEmitter</code>
|
|
268
|
-
|
|
269
|
-
</td>
|
|
270
278
|
</tr>
|
|
271
279
|
<tr>
|
|
272
280
|
<td class="col-md-2" colspan="2">
|
|
273
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
281
|
+
<div class="io-line">Defined in <a href="" data-line="37" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:37</a></div>
|
|
274
282
|
</td>
|
|
275
283
|
</tr>
|
|
276
284
|
</tbody>
|
|
@@ -303,8 +311,8 @@
|
|
|
303
311
|
|
|
304
312
|
<tr>
|
|
305
313
|
<td class="col-md-4">
|
|
306
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
307
|
-
class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:
|
|
314
|
+
<div class="io-line">Defined in <a href="" data-line="45"
|
|
315
|
+
class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:45</a></div>
|
|
308
316
|
</td>
|
|
309
317
|
</tr>
|
|
310
318
|
|
|
@@ -326,14 +334,36 @@
|
|
|
326
334
|
<h3 id="inputs">
|
|
327
335
|
Properties
|
|
328
336
|
</h3>
|
|
337
|
+
<table class="table table-sm table-bordered">
|
|
338
|
+
<tbody>
|
|
339
|
+
<tr>
|
|
340
|
+
<td class="col-md-4">
|
|
341
|
+
<a name="closeDialog"></a>
|
|
342
|
+
<span class="name">
|
|
343
|
+
<span class="modifier">Public</span>
|
|
344
|
+
<span class="modifier">Readonly</span>
|
|
345
|
+
<span ><b>closeDialog</b></span>
|
|
346
|
+
<a href="#closeDialog"><span class="icon ion-ios-link"></span></a>
|
|
347
|
+
</span>
|
|
348
|
+
</td>
|
|
349
|
+
</tr>
|
|
350
|
+
<tr>
|
|
351
|
+
<td class="col-md-4">
|
|
352
|
+
<div class="io-line">Defined in <a href="" data-line="37" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:37</a></div>
|
|
353
|
+
</td>
|
|
354
|
+
</tr>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
</tbody>
|
|
358
|
+
</table>
|
|
329
359
|
<table class="table table-sm table-bordered">
|
|
330
360
|
<tbody>
|
|
331
361
|
<tr>
|
|
332
362
|
<td class="col-md-4">
|
|
333
363
|
<a name="dialog"></a>
|
|
334
364
|
<span class="name">
|
|
335
|
-
<span class="modifier"></span>
|
|
336
365
|
<span class="modifier">Public</span>
|
|
366
|
+
<span class="modifier">Readonly</span>
|
|
337
367
|
<span ><b>dialog</b></span>
|
|
338
368
|
<a href="#dialog"><span class="icon ion-ios-link"></span></a>
|
|
339
369
|
</span>
|
|
@@ -341,22 +371,12 @@
|
|
|
341
371
|
</tr>
|
|
342
372
|
<tr>
|
|
343
373
|
<td class="col-md-4">
|
|
344
|
-
<i>
|
|
345
|
-
|
|
346
|
-
</td>
|
|
347
|
-
</tr>
|
|
348
|
-
<tr>
|
|
349
|
-
<td class="col-md-4">
|
|
350
|
-
<b>Decorators : </b>
|
|
351
|
-
<br />
|
|
352
|
-
<code>
|
|
353
|
-
@ViewChild('dialog', {static: true})<br />
|
|
354
|
-
</code>
|
|
374
|
+
<i>Default value : </i><code>viewChild.required<ElementRef<HTMLDialogElement>>('dialog')</code>
|
|
355
375
|
</td>
|
|
356
376
|
</tr>
|
|
357
377
|
<tr>
|
|
358
378
|
<td class="col-md-4">
|
|
359
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
379
|
+
<div class="io-line">Defined in <a href="" data-line="35" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:35</a></div>
|
|
360
380
|
</td>
|
|
361
381
|
</tr>
|
|
362
382
|
|
|
@@ -383,7 +403,7 @@
|
|
|
383
403
|
</tr>
|
|
384
404
|
<tr>
|
|
385
405
|
<td class="col-md-4">
|
|
386
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
406
|
+
<div class="io-line">Defined in <a href="" data-line="39" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:39</a></div>
|
|
387
407
|
</td>
|
|
388
408
|
</tr>
|
|
389
409
|
|
|
@@ -397,48 +417,50 @@
|
|
|
397
417
|
|
|
398
418
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
399
419
|
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
} from '@angular/common';
|
|
403
|
-
import {
|
|
404
|
-
AfterViewInit,
|
|
420
|
+
afterNextRender,
|
|
421
|
+
ChangeDetectionStrategy,
|
|
405
422
|
Component,
|
|
406
423
|
ElementRef,
|
|
407
|
-
EventEmitter,
|
|
408
424
|
inject,
|
|
409
425
|
InjectionToken,
|
|
410
|
-
|
|
411
|
-
|
|
426
|
+
output,
|
|
427
|
+
viewChild
|
|
412
428
|
} from '@angular/core';
|
|
413
429
|
import { VersionEvent } from '@angular/service-worker';
|
|
430
|
+
import { Showcase } from '@ng-prism/core';
|
|
414
431
|
|
|
415
432
|
export const UPDATE_AVAILABLE_EVENT = new InjectionToken<VersionEvent>('UPDATE_AVAILABLE_EVENT');
|
|
416
433
|
|
|
434
|
+
@Showcase({
|
|
435
|
+
title: 'Service Worker Update Dialog',
|
|
436
|
+
category: 'Service Worker',
|
|
437
|
+
description: 'Modal dialog that informs the user about an available app update. The `UPDATE_AVAILABLE_EVENT` is provided by the styleguide host.',
|
|
438
|
+
status: 'stable',
|
|
439
|
+
variants: [
|
|
440
|
+
{ name: 'Default' },
|
|
441
|
+
],
|
|
442
|
+
})
|
|
417
443
|
@Component({
|
|
418
444
|
selector: 'rxap-service-worker-update-dialog',
|
|
419
|
-
imports: [
|
|
420
|
-
|
|
421
|
-
NgSwitchCase,
|
|
422
|
-
],
|
|
445
|
+
imports: [],
|
|
446
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
423
447
|
templateUrl: './service-worker-update-dialog.component.html',
|
|
424
448
|
styleUrls: ['./service-worker-update-dialog.component.scss']
|
|
425
449
|
})
|
|
426
|
-
export class ServiceWorkerUpdateDialogComponent
|
|
450
|
+
export class ServiceWorkerUpdateDialogComponent {
|
|
427
451
|
|
|
428
|
-
|
|
429
|
-
public dialog!: ElementRef<HTMLDialogElement>;
|
|
452
|
+
public readonly dialog = viewChild.required<ElementRef<HTMLDialogElement>>('dialog');
|
|
430
453
|
|
|
431
|
-
|
|
432
|
-
public closeDialog = new EventEmitter<void>();
|
|
454
|
+
public readonly closeDialog = output<void>();
|
|
433
455
|
|
|
434
456
|
public readonly updateAvailableEvent = inject(UPDATE_AVAILABLE_EVENT);
|
|
435
457
|
|
|
436
|
-
|
|
437
|
-
this.dialog.nativeElement.showModal();
|
|
458
|
+
constructor() {
|
|
459
|
+
afterNextRender(() => this.dialog().nativeElement.showModal());
|
|
438
460
|
}
|
|
439
461
|
|
|
440
462
|
close() {
|
|
441
|
-
this.dialog.nativeElement.close();
|
|
463
|
+
this.dialog().nativeElement.close();
|
|
442
464
|
this.closeDialog.emit();
|
|
443
465
|
}
|
|
444
466
|
|
|
@@ -448,42 +470,50 @@ export class ServiceWorkerUpdateDialogComponent implements AfterViewInit {
|
|
|
448
470
|
|
|
449
471
|
<div class="tab-pane fade " id="templateData">
|
|
450
472
|
<pre class="line-numbers"><code class="language-html"><dialog #dialog
|
|
451
|
-
|
|
473
|
+
class="max-w-6xl rounded overflow-auto drop-shadow-2xl bg-white text-black dark:bg-black dark:text-white flex flex-col gap-3 p-6">
|
|
452
474
|
<h2 class="text-2xl font-bold" i18n>A new application version is available</h2>
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
<
|
|
456
|
-
<
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
<
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
<
|
|
476
|
-
<
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
<
|
|
484
|
-
</
|
|
485
|
-
|
|
486
|
-
|
|
475
|
+
@switch ($any(updateAvailableEvent).type) {
|
|
476
|
+
@case ('VERSION_DETECTED') {
|
|
477
|
+
<table class="table-auto">
|
|
478
|
+
<tr>
|
|
479
|
+
<th i18n>Version hash</th>
|
|
480
|
+
<td>{{$any(updateAvailableEvent)['version'].hash}}</td>
|
|
481
|
+
</tr>
|
|
482
|
+
</table>
|
|
483
|
+
}
|
|
484
|
+
@case ('VERSION_INSTALLATION_FAILED') {
|
|
485
|
+
<table class="table-auto">
|
|
486
|
+
<tr>
|
|
487
|
+
<th i18n>Version hash</th>
|
|
488
|
+
<td>{{$any(updateAvailableEvent)['version'].hash}}</td>
|
|
489
|
+
</tr>
|
|
490
|
+
<tr>
|
|
491
|
+
<th i18n>Version installation error</th>
|
|
492
|
+
<td>{{$any(updateAvailableEvent)['error']}}</td>
|
|
493
|
+
</tr>
|
|
494
|
+
</table>
|
|
495
|
+
}
|
|
496
|
+
@case ('VERSION_READY') {
|
|
497
|
+
<table class="table-auto">
|
|
498
|
+
<tr>
|
|
499
|
+
<th i18n>Current version hash</th>
|
|
500
|
+
<td>{{$any(updateAvailableEvent)['currentVersion'].hash}}</td>
|
|
501
|
+
</tr>
|
|
502
|
+
<tr>
|
|
503
|
+
<th i18n>Last version hash</th>
|
|
504
|
+
<td>{{$any(updateAvailableEvent)['latestVersion'].hash}}</td>
|
|
505
|
+
</tr>
|
|
506
|
+
</table>
|
|
507
|
+
}
|
|
508
|
+
@case ('NoNewVersionDetectedEvent') {
|
|
509
|
+
<table class="table-auto">
|
|
510
|
+
<tr>
|
|
511
|
+
<th i18n>Version hash</th>
|
|
512
|
+
<td>{{$any(updateAvailableEvent)['version'].hash}}</td>
|
|
513
|
+
</tr>
|
|
514
|
+
</table>
|
|
515
|
+
}
|
|
516
|
+
}
|
|
487
517
|
<button (click)="close()" class="px-4 py-2 rounded bg-primary-500" i18n>Update</button>
|
|
488
518
|
</dialog>
|
|
489
519
|
</code></pre>
|
|
@@ -521,7 +551,7 @@ export class ServiceWorkerUpdateDialogComponent implements AfterViewInit {
|
|
|
521
551
|
<script src="../js/libs/htmlparser.js"></script>
|
|
522
552
|
<script src="../js/libs/deep-iterator.js"></script>
|
|
523
553
|
<script>
|
|
524
|
-
var COMPONENT_TEMPLATE = '<div><dialog #dialog
|
|
554
|
+
var COMPONENT_TEMPLATE = '<div><dialog #dialog class="max-w-6xl rounded overflow-auto drop-shadow-2xl bg-white text-black dark:bg-black dark:text-white flex flex-col gap-3 p-6"> <h2 class="text-2xl font-bold" i18n>A new application version is available</h2> @switch ($any(updateAvailableEvent).type) { @case (\'VERSION_DETECTED\') { <table class="table-auto"> <tr> <th i18n>Version hash</th> <td>{{$any(updateAvailableEvent)[\'version\'].hash}}</td> </tr> </table> } @case (\'VERSION_INSTALLATION_FAILED\') { <table class="table-auto"> <tr> <th i18n>Version hash</th> <td>{{$any(updateAvailableEvent)[\'version\'].hash}}</td> </tr> <tr> <th i18n>Version installation error</th> <td>{{$any(updateAvailableEvent)[\'error\']}}</td> </tr> </table> } @case (\'VERSION_READY\') { <table class="table-auto"> <tr> <th i18n>Current version hash</th> <td>{{$any(updateAvailableEvent)[\'currentVersion\'].hash}}</td> </tr> <tr> <th i18n>Last version hash</th> <td>{{$any(updateAvailableEvent)[\'latestVersion\'].hash}}</td> </tr> </table> } @case (\'NoNewVersionDetectedEvent\') { <table class="table-auto"> <tr> <th i18n>Version hash</th> <td>{{$any(updateAvailableEvent)[\'version\'].hash}}</td> </tr> </table> } } <button (click)="close()" class="px-4 py-2 rounded bg-primary-500" i18n>Update</button></dialog></div>'
|
|
525
555
|
var COMPONENTS = [{'name': 'ServiceWorkerUpdateDialogComponent', 'selector': 'rxap-service-worker-update-dialog'}];
|
|
526
556
|
var DIRECTIVES = [];
|
|
527
557
|
var ACTUAL_COMPONENT = {'name': 'ServiceWorkerUpdateDialogComponent'};
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
</ol>
|
|
102
102
|
<ul class="dependencies-list">
|
|
103
103
|
<li>
|
|
104
|
-
<b>@nx/devkit</b> :
|
|
104
|
+
<b>@nx/devkit</b> : 22.7.5</li>
|
|
105
105
|
<li>
|
|
106
106
|
<b>tslib</b> : 2.6.2</li>
|
|
107
107
|
</ul>
|
|
@@ -113,17 +113,17 @@
|
|
|
113
113
|
</ol>
|
|
114
114
|
<ul class="dependencies-list">
|
|
115
115
|
<li>
|
|
116
|
-
<b>@angular/common</b> : ^
|
|
116
|
+
<b>@angular/common</b> : ^21.2.9</li>
|
|
117
117
|
<li>
|
|
118
|
-
<b>@angular/core</b> : ^
|
|
118
|
+
<b>@angular/core</b> : ^21.2.9</li>
|
|
119
119
|
<li>
|
|
120
|
-
<b>@angular/service-worker</b> : ^
|
|
120
|
+
<b>@angular/service-worker</b> : ^21.2.9</li>
|
|
121
121
|
<li>
|
|
122
|
-
<b>@rxap/environment</b> : ^
|
|
122
|
+
<b>@rxap/environment</b> : ^21.0.1-dev.1</li>
|
|
123
123
|
<li>
|
|
124
|
-
<b>@rxap/life-cycle</b> : ^
|
|
124
|
+
<b>@rxap/life-cycle</b> : ^21.0.1-dev.1</li>
|
|
125
125
|
<li>
|
|
126
|
-
<b>rxjs</b> : ^7.8.
|
|
126
|
+
<b>rxjs</b> : ^7.8.2</li>
|
|
127
127
|
</ul>
|
|
128
128
|
|
|
129
129
|
|
|
@@ -151,54 +151,6 @@
|
|
|
151
151
|
</table>
|
|
152
152
|
</section>
|
|
153
153
|
|
|
154
|
-
<section data-compodoc="block-constructor">
|
|
155
|
-
<h3 id="constructor">Constructor</h3>
|
|
156
|
-
<table class="table table-sm table-bordered">
|
|
157
|
-
<tbody>
|
|
158
|
-
<tr>
|
|
159
|
-
<td class="col-md-4">
|
|
160
|
-
<code>constructor(updates: SwUpdate)</code>
|
|
161
|
-
</td>
|
|
162
|
-
</tr>
|
|
163
|
-
<tr>
|
|
164
|
-
<td class="col-md-4">
|
|
165
|
-
<div class="io-line">Defined in <a href="" data-line="12" class="link-to-prism">src/lib/auto-update.service.ts:12</a></div>
|
|
166
|
-
</td>
|
|
167
|
-
</tr>
|
|
168
|
-
|
|
169
|
-
<tr>
|
|
170
|
-
<td class="col-md-4">
|
|
171
|
-
<div>
|
|
172
|
-
<b>Parameters :</b>
|
|
173
|
-
<table class="params">
|
|
174
|
-
<thead>
|
|
175
|
-
<tr>
|
|
176
|
-
<td>Name</td>
|
|
177
|
-
<td>Type</td>
|
|
178
|
-
<td>Optional</td>
|
|
179
|
-
</tr>
|
|
180
|
-
</thead>
|
|
181
|
-
<tbody>
|
|
182
|
-
<tr>
|
|
183
|
-
<td>updates</td>
|
|
184
|
-
|
|
185
|
-
<td>
|
|
186
|
-
<code>SwUpdate</code>
|
|
187
|
-
</td>
|
|
188
|
-
|
|
189
|
-
<td>
|
|
190
|
-
No
|
|
191
|
-
</td>
|
|
192
|
-
|
|
193
|
-
</tr>
|
|
194
|
-
</tbody>
|
|
195
|
-
</table>
|
|
196
|
-
</div>
|
|
197
|
-
</td>
|
|
198
|
-
</tr>
|
|
199
|
-
</tbody>
|
|
200
|
-
</table>
|
|
201
|
-
</section>
|
|
202
154
|
|
|
203
155
|
<section data-compodoc="block-methods">
|
|
204
156
|
|
|
@@ -227,8 +179,8 @@
|
|
|
227
179
|
|
|
228
180
|
<tr>
|
|
229
181
|
<td class="col-md-4">
|
|
230
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
231
|
-
class="link-to-prism">src/lib/auto-update.service.ts:
|
|
182
|
+
<div class="io-line">Defined in <a href="" data-line="13"
|
|
183
|
+
class="link-to-prism">src/lib/auto-update.service.ts:13</a></div>
|
|
232
184
|
</td>
|
|
233
185
|
</tr>
|
|
234
186
|
|
|
@@ -250,10 +202,7 @@
|
|
|
250
202
|
|
|
251
203
|
|
|
252
204
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
253
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
254
|
-
Inject,
|
|
255
|
-
Injectable,
|
|
256
|
-
} from '@angular/core';
|
|
205
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injectable, inject } from '@angular/core';
|
|
257
206
|
import { SwUpdate } from '@angular/service-worker';
|
|
258
207
|
import { filter } from 'rxjs';
|
|
259
208
|
import { tap } from 'rxjs/operators';
|
|
@@ -262,12 +211,8 @@ import { tap } from 'rxjs/operators';
|
|
|
262
211
|
providedIn: 'root',
|
|
263
212
|
})
|
|
264
213
|
export class AutoUpdateService {
|
|
214
|
+
private readonly updates = inject<SwUpdate>(SwUpdate);
|
|
265
215
|
|
|
266
|
-
constructor(
|
|
267
|
-
@Inject(SwUpdate)
|
|
268
|
-
private readonly updates: SwUpdate,
|
|
269
|
-
) {
|
|
270
|
-
}
|
|
271
216
|
|
|
272
217
|
public start(): void {
|
|
273
218
|
console.debug('start auto update service');
|
|
@@ -151,66 +151,6 @@
|
|
|
151
151
|
</table>
|
|
152
152
|
</section>
|
|
153
153
|
|
|
154
|
-
<section data-compodoc="block-constructor">
|
|
155
|
-
<h3 id="constructor">Constructor</h3>
|
|
156
|
-
<table class="table table-sm table-bordered">
|
|
157
|
-
<tbody>
|
|
158
|
-
<tr>
|
|
159
|
-
<td class="col-md-4">
|
|
160
|
-
<code>constructor(lifeCycle: LifeCycleService, updates: SwUpdate)</code>
|
|
161
|
-
</td>
|
|
162
|
-
</tr>
|
|
163
|
-
<tr>
|
|
164
|
-
<td class="col-md-4">
|
|
165
|
-
<div class="io-line">Defined in <a href="" data-line="18" class="link-to-prism">src/lib/check-for-update.service.ts:18</a></div>
|
|
166
|
-
</td>
|
|
167
|
-
</tr>
|
|
168
|
-
|
|
169
|
-
<tr>
|
|
170
|
-
<td class="col-md-4">
|
|
171
|
-
<div>
|
|
172
|
-
<b>Parameters :</b>
|
|
173
|
-
<table class="params">
|
|
174
|
-
<thead>
|
|
175
|
-
<tr>
|
|
176
|
-
<td>Name</td>
|
|
177
|
-
<td>Type</td>
|
|
178
|
-
<td>Optional</td>
|
|
179
|
-
</tr>
|
|
180
|
-
</thead>
|
|
181
|
-
<tbody>
|
|
182
|
-
<tr>
|
|
183
|
-
<td>lifeCycle</td>
|
|
184
|
-
|
|
185
|
-
<td>
|
|
186
|
-
<code>LifeCycleService</code>
|
|
187
|
-
</td>
|
|
188
|
-
|
|
189
|
-
<td>
|
|
190
|
-
No
|
|
191
|
-
</td>
|
|
192
|
-
|
|
193
|
-
</tr>
|
|
194
|
-
<tr>
|
|
195
|
-
<td>updates</td>
|
|
196
|
-
|
|
197
|
-
<td>
|
|
198
|
-
<code>SwUpdate</code>
|
|
199
|
-
</td>
|
|
200
|
-
|
|
201
|
-
<td>
|
|
202
|
-
No
|
|
203
|
-
</td>
|
|
204
|
-
|
|
205
|
-
</tr>
|
|
206
|
-
</tbody>
|
|
207
|
-
</table>
|
|
208
|
-
</div>
|
|
209
|
-
</td>
|
|
210
|
-
</tr>
|
|
211
|
-
</tbody>
|
|
212
|
-
</table>
|
|
213
|
-
</section>
|
|
214
154
|
|
|
215
155
|
<section data-compodoc="block-methods">
|
|
216
156
|
|
|
@@ -239,8 +179,8 @@
|
|
|
239
179
|
|
|
240
180
|
<tr>
|
|
241
181
|
<td class="col-md-4">
|
|
242
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
243
|
-
class="link-to-prism">src/lib/check-for-update.service.ts:
|
|
182
|
+
<div class="io-line">Defined in <a href="" data-line="20"
|
|
183
|
+
class="link-to-prism">src/lib/check-for-update.service.ts:20</a></div>
|
|
244
184
|
</td>
|
|
245
185
|
</tr>
|
|
246
186
|
|
|
@@ -262,10 +202,7 @@
|
|
|
262
202
|
|
|
263
203
|
|
|
264
204
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
265
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
266
|
-
Inject,
|
|
267
|
-
Injectable,
|
|
268
|
-
} from '@angular/core';
|
|
205
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injectable, inject } from '@angular/core';
|
|
269
206
|
import { SwUpdate } from '@angular/service-worker';
|
|
270
207
|
import { LifeCycleService } from '@rxap/life-cycle';
|
|
271
208
|
import { interval } from 'rxjs';
|
|
@@ -278,14 +215,11 @@ import {
|
|
|
278
215
|
providedIn: 'root',
|
|
279
216
|
})
|
|
280
217
|
export class CheckForUpdateService {
|
|
218
|
+
private readonly lifeCycle = inject<LifeCycleService>(LifeCycleService);
|
|
219
|
+
private readonly updates = inject<SwUpdate>(SwUpdate);
|
|
281
220
|
|
|
282
|
-
private _started = false;
|
|
283
221
|
|
|
284
|
-
|
|
285
|
-
@Inject(LifeCycleService) private readonly lifeCycle: LifeCycleService,
|
|
286
|
-
@Inject(SwUpdate) private readonly updates: SwUpdate,
|
|
287
|
-
) {
|
|
288
|
-
}
|
|
222
|
+
private _started = false;
|
|
289
223
|
|
|
290
224
|
public start(): void {
|
|
291
225
|
if (this._started) {
|