@rxap/service-worker 21.0.1-dev.0 → 21.0.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/compodoc/changelog.html +36 -0
  3. package/compodoc/components/ServiceWorkerUpdateDialogComponent.html +78 -42
  4. package/compodoc/dependencies.html +2 -2
  5. package/compodoc/injectables/AutoUpdateService.html +4 -59
  6. package/compodoc/injectables/CheckForUpdateService.html +6 -72
  7. package/compodoc/injectables/DialogUpdateService.html +15 -78
  8. package/compodoc/injectables/LogUpdateService.html +4 -53
  9. package/compodoc/js/search/search_index.js +2 -2
  10. package/compodoc/properties.html +1 -1
  11. package/docs/documentation.json +201 -461
  12. package/docs/html/assets/search.js +1 -1
  13. package/docs/html/classes/AutoUpdateService.html +2 -2
  14. package/docs/html/classes/CheckForUpdateService.html +2 -2
  15. package/docs/html/classes/DialogUpdateService.html +2 -2
  16. package/docs/html/classes/LogUpdateService.html +2 -2
  17. package/docs/html/classes/ServiceWorkerUpdateDialogComponent.html +2 -6
  18. package/docs/html/classes/SnackbarUpdateService.html +2 -2
  19. package/docs/html/functions/ProvideServiceWorkerUpdater.html +1 -1
  20. package/docs/html/functions/UnregisterServiceWorker.html +1 -1
  21. package/docs/html/functions/withAutoUpdater.html +1 -1
  22. package/docs/html/functions/withDialogUpdater.html +1 -1
  23. package/docs/html/functions/withLogUpdater.html +1 -1
  24. package/docs/html/functions/withSnackbarUpdater.html +1 -1
  25. package/docs/html/index.html +2 -2
  26. package/docs/html/modules.html +1 -1
  27. package/docs/html/variables/UPDATE_AVAILABLE_EVENT.html +1 -1
  28. package/docs/markdown/README.md +1 -1
  29. package/docs/markdown/classes/AutoUpdateService.md +4 -12
  30. package/docs/markdown/classes/CheckForUpdateService.md +4 -16
  31. package/docs/markdown/classes/DialogUpdateService.md +4 -16
  32. package/docs/markdown/classes/LogUpdateService.md +4 -12
  33. package/docs/markdown/classes/ServiceWorkerUpdateDialogComponent.md +10 -32
  34. package/docs/markdown/classes/SnackbarUpdateService.md +3 -3
  35. package/docs/markdown/functions/ProvideServiceWorkerUpdater.md +2 -2
  36. package/docs/markdown/functions/UnregisterServiceWorker.md +2 -2
  37. package/docs/markdown/functions/withAutoUpdater.md +2 -2
  38. package/docs/markdown/functions/withDialogUpdater.md +2 -2
  39. package/docs/markdown/functions/withLogUpdater.md +2 -2
  40. package/docs/markdown/functions/withSnackbarUpdater.md +2 -2
  41. package/docs/markdown/globals.md +2 -2
  42. package/docs/markdown/variables/UPDATE_AVAILABLE_EVENT.md +2 -2
  43. package/docs/wiki/Class.AutoUpdateService.md +3 -11
  44. package/docs/wiki/Class.CheckForUpdateService.md +3 -15
  45. package/docs/wiki/Class.DialogUpdateService.md +3 -15
  46. package/docs/wiki/Class.LogUpdateService.md +3 -11
  47. package/docs/wiki/Class.ServiceWorkerUpdateDialogComponent.md +9 -31
  48. package/docs/wiki/Class.SnackbarUpdateService.md +2 -2
  49. package/docs/wiki/Function.ProvideServiceWorkerUpdater.md +1 -1
  50. package/docs/wiki/Function.UnregisterServiceWorker.md +1 -1
  51. package/docs/wiki/Function.withAutoUpdater.md +1 -1
  52. package/docs/wiki/Function.withDialogUpdater.md +1 -1
  53. package/docs/wiki/Function.withLogUpdater.md +1 -1
  54. package/docs/wiki/Function.withSnackbarUpdater.md +1 -1
  55. package/docs/wiki/Variable.UPDATE_AVAILABLE_EVENT.md +1 -1
  56. package/docs/wiki/globals.md +1 -1
  57. package/fesm2022/rxap-service-worker.mjs +38 -65
  58. package/fesm2022/rxap-service-worker.mjs.map +1 -1
  59. package/package.json +6 -6
  60. package/types/rxap-service-worker.d.ts +6 -11
package/CHANGELOG.md CHANGED
@@ -1,3 +1,41 @@
1
+ ## 21.0.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
+ ### 🩹 Fixes
9
+
10
+ - **upgrade:** TestBed.get->inject (removed in angular) + dedupe rxjs to single version
11
+
12
+ ### 🧱 Updated Dependencies
13
+
14
+ - Updated angular-environment to 21.0.1
15
+ - Updated angular-life-cycle to 21.0.1
16
+
17
+ ### ❤️ Thank You
18
+
19
+ - Claude Opus 5.5
20
+ - Merzough Münker
21
+
22
+ ## 21.0.1-dev.1 (2026-11-22)
23
+
24
+ ### 🚀 Features
25
+
26
+ - **angular:** add ng-prism showcases from the leaf library outwards
27
+ - **angular:** add ng-prism styleguide targets and environment showcase
28
+
29
+ ### 🧱 Updated Dependencies
30
+
31
+ - Updated angular-environment to 21.0.1-dev.1
32
+ - Updated angular-life-cycle to 21.0.1-dev.1
33
+
34
+ ### ❤️ Thank You
35
+
36
+ - Claude Opus 5.5
37
+ - Merzough Münker
38
+
1
39
  ## 21.0.1-dev.0 (2026-11-20)
2
40
 
3
41
  ### 🩹 Fixes
@@ -82,6 +82,42 @@
82
82
  <div class="content getting-started">
83
83
  <div class="content-data">
84
84
 
85
+ <h2>21.0.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>🩹 Fixes</h3>
92
+ <ul>
93
+ <li><strong>upgrade:</strong> TestBed.get-&gt;inject (removed in angular) + dedupe rxjs to single version</li>
94
+ </ul>
95
+ <h3>🧱 Updated Dependencies</h3>
96
+ <ul>
97
+ <li>Updated angular-environment to 21.0.1</li>
98
+ <li>Updated angular-life-cycle to 21.0.1</li>
99
+ </ul>
100
+ <h3>❤️ Thank You</h3>
101
+ <ul>
102
+ <li>Claude Opus 5.5</li>
103
+ <li>Merzough Münker</li>
104
+ </ul>
105
+ <h2>21.0.1-dev.1 (2026-11-22)</h2>
106
+ <h3>🚀 Features</h3>
107
+ <ul>
108
+ <li><strong>angular:</strong> add ng-prism showcases from the leaf library outwards</li>
109
+ <li><strong>angular:</strong> add ng-prism styleguide targets and environment showcase</li>
110
+ </ul>
111
+ <h3>🧱 Updated Dependencies</h3>
112
+ <ul>
113
+ <li>Updated angular-environment to 21.0.1-dev.1</li>
114
+ <li>Updated angular-life-cycle to 21.0.1-dev.1</li>
115
+ </ul>
116
+ <h3>❤️ Thank You</h3>
117
+ <ul>
118
+ <li>Claude Opus 5.5</li>
119
+ <li>Merzough Münker</li>
120
+ </ul>
85
121
  <h2>21.0.1-dev.0 (2026-11-20)</h2>
86
122
  <h3>🩹 Fixes</h3>
87
123
  <ul>
@@ -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
 
@@ -193,8 +191,13 @@
193
191
  <td class="col-md-4">
194
192
  <ul class="index-list">
195
193
  <li>
196
- <span class="modifier"></span>
197
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>
198
201
  <a href="#dialog" >dialog</a>
199
202
  </li>
200
203
  <li>
@@ -243,6 +246,24 @@
243
246
  </table>
244
247
  </section>
245
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>
246
267
 
247
268
 
248
269
  <section data-compodoc="block-outputs">
@@ -254,16 +275,10 @@
254
275
  <a name="closeDialog"></a>
255
276
  <b>closeDialog</b>
256
277
  </td>
257
- </tr>
258
- <tr>
259
- <td class="col-md-4">
260
- <i>Type : </i> <code>EventEmitter</code>
261
-
262
- </td>
263
278
  </tr>
264
279
  <tr>
265
280
  <td class="col-md-2" colspan="2">
266
- <div class="io-line">Defined in <a href="" data-line="28" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:28</a></div>
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>
267
282
  </td>
268
283
  </tr>
269
284
  </tbody>
@@ -296,8 +311,8 @@
296
311
 
297
312
  <tr>
298
313
  <td class="col-md-4">
299
- <div class="io-line">Defined in <a href="" data-line="36"
300
- class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:36</a></div>
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>
301
316
  </td>
302
317
  </tr>
303
318
 
@@ -319,14 +334,36 @@
319
334
  <h3 id="inputs">
320
335
  Properties
321
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>
322
359
  <table class="table table-sm table-bordered">
323
360
  <tbody>
324
361
  <tr>
325
362
  <td class="col-md-4">
326
363
  <a name="dialog"></a>
327
364
  <span class="name">
328
- <span class="modifier"></span>
329
365
  <span class="modifier">Public</span>
366
+ <span class="modifier">Readonly</span>
330
367
  <span ><b>dialog</b></span>
331
368
  <a href="#dialog"><span class="icon ion-ios-link"></span></a>
332
369
  </span>
@@ -334,22 +371,12 @@
334
371
  </tr>
335
372
  <tr>
336
373
  <td class="col-md-4">
337
- <i>Type : </i> <code>ElementRef&lt;HTMLDialogElement&gt;</code>
338
-
339
- </td>
340
- </tr>
341
- <tr>
342
- <td class="col-md-4">
343
- <b>Decorators : </b>
344
- <br />
345
- <code>
346
- @ViewChild(&#x27;dialog&#x27;, {static: true})<br />
347
- </code>
374
+ <i>Default value : </i><code>viewChild.required&lt;ElementRef&lt;HTMLDialogElement&gt;&gt;(&#x27;dialog&#x27;)</code>
348
375
  </td>
349
376
  </tr>
350
377
  <tr>
351
378
  <td class="col-md-4">
352
- <div class="io-line">Defined in <a href="" data-line="25" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:25</a></div>
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>
353
380
  </td>
354
381
  </tr>
355
382
 
@@ -376,7 +403,7 @@
376
403
  </tr>
377
404
  <tr>
378
405
  <td class="col-md-4">
379
- <div class="io-line">Defined in <a href="" data-line="30" class="link-to-prism">src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts:30</a></div>
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>
380
407
  </td>
381
408
  </tr>
382
409
 
@@ -390,41 +417,50 @@
390
417
 
391
418
  <div class="tab-pane fade tab-source-code" id="source">
392
419
  <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
393
- AfterViewInit,
420
+ afterNextRender,
421
+ ChangeDetectionStrategy,
394
422
  Component,
395
423
  ElementRef,
396
- EventEmitter,
397
424
  inject,
398
425
  InjectionToken,
399
- Output,
400
- ViewChild,
426
+ output,
427
+ viewChild
401
428
  } from &#x27;@angular/core&#x27;;
402
429
  import { VersionEvent } from &#x27;@angular/service-worker&#x27;;
430
+ import { Showcase } from &#x27;@ng-prism/core&#x27;;
403
431
 
404
432
  export const UPDATE_AVAILABLE_EVENT &#x3D; new InjectionToken&lt;VersionEvent&gt;(&#x27;UPDATE_AVAILABLE_EVENT&#x27;);
405
433
 
434
+ @Showcase({
435
+ title: &#x27;Service Worker Update Dialog&#x27;,
436
+ category: &#x27;Service Worker&#x27;,
437
+ description: &#x27;Modal dialog that informs the user about an available app update. The &#x60;UPDATE_AVAILABLE_EVENT&#x60; is provided by the styleguide host.&#x27;,
438
+ status: &#x27;stable&#x27;,
439
+ variants: [
440
+ { name: &#x27;Default&#x27; },
441
+ ],
442
+ })
406
443
  @Component({
407
444
  selector: &#x27;rxap-service-worker-update-dialog&#x27;,
408
445
  imports: [],
446
+ changeDetection: ChangeDetectionStrategy.OnPush,
409
447
  templateUrl: &#x27;./service-worker-update-dialog.component.html&#x27;,
410
448
  styleUrls: [&#x27;./service-worker-update-dialog.component.scss&#x27;]
411
449
  })
412
- export class ServiceWorkerUpdateDialogComponent implements AfterViewInit {
450
+ export class ServiceWorkerUpdateDialogComponent {
413
451
 
414
- @ViewChild(&#x27;dialog&#x27;, { static: true })
415
- public dialog!: ElementRef&lt;HTMLDialogElement&gt;;
452
+ public readonly dialog &#x3D; viewChild.required&lt;ElementRef&lt;HTMLDialogElement&gt;&gt;(&#x27;dialog&#x27;);
416
453
 
417
- @Output()
418
- public closeDialog &#x3D; new EventEmitter&lt;void&gt;();
454
+ public readonly closeDialog &#x3D; output&lt;void&gt;();
419
455
 
420
456
  public readonly updateAvailableEvent &#x3D; inject(UPDATE_AVAILABLE_EVENT);
421
457
 
422
- ngAfterViewInit() {
423
- this.dialog.nativeElement.showModal();
458
+ constructor() {
459
+ afterNextRender(() &#x3D;&gt; this.dialog().nativeElement.showModal());
424
460
  }
425
461
 
426
462
  close() {
427
- this.dialog.nativeElement.close();
463
+ this.dialog().nativeElement.close();
428
464
  this.closeDialog.emit();
429
465
  }
430
466
 
@@ -119,9 +119,9 @@
119
119
  <li>
120
120
  <b>@angular/service-worker</b> : ^21.2.9</li>
121
121
  <li>
122
- <b>@rxap/environment</b> : ^21.0.1-dev.0</li>
122
+ <b>@rxap/environment</b> : ^21.0.1</li>
123
123
  <li>
124
- <b>@rxap/life-cycle</b> : ^21.0.1-dev.0</li>
124
+ <b>@rxap/life-cycle</b> : ^21.0.1</li>
125
125
  <li>
126
126
  <b>rxjs</b> : ^7.8.2</li>
127
127
  </ul>
@@ -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="20"
231
- class="link-to-prism">src/lib/auto-update.service.ts:20</a></div>
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 &#x27;@angular/core&#x27;;
205
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injectable, inject } from &#x27;@angular/core&#x27;;
257
206
  import { SwUpdate } from &#x27;@angular/service-worker&#x27;;
258
207
  import { filter } from &#x27;rxjs&#x27;;
259
208
  import { tap } from &#x27;rxjs/operators&#x27;;
@@ -262,12 +211,8 @@ import { tap } from &#x27;rxjs/operators&#x27;;
262
211
  providedIn: &#x27;root&#x27;,
263
212
  })
264
213
  export class AutoUpdateService {
214
+ private readonly updates &#x3D; inject&lt;SwUpdate&gt;(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(&#x27;start auto update service&#x27;);
@@ -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="26"
243
- class="link-to-prism">src/lib/check-for-update.service.ts:26</a></div>
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 &#x27;@angular/core&#x27;;
205
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injectable, inject } from &#x27;@angular/core&#x27;;
269
206
  import { SwUpdate } from &#x27;@angular/service-worker&#x27;;
270
207
  import { LifeCycleService } from &#x27;@rxap/life-cycle&#x27;;
271
208
  import { interval } from &#x27;rxjs&#x27;;
@@ -278,14 +215,11 @@ import {
278
215
  providedIn: &#x27;root&#x27;,
279
216
  })
280
217
  export class CheckForUpdateService {
218
+ private readonly lifeCycle &#x3D; inject&lt;LifeCycleService&gt;(LifeCycleService);
219
+ private readonly updates &#x3D; inject&lt;SwUpdate&gt;(SwUpdate);
281
220
 
282
- private _started &#x3D; false;
283
221
 
284
- constructor(
285
- @Inject(LifeCycleService) private readonly lifeCycle: LifeCycleService,
286
- @Inject(SwUpdate) private readonly updates: SwUpdate,
287
- ) {
288
- }
222
+ private _started &#x3D; false;
289
223
 
290
224
  public start(): void {
291
225
  if (this._started) {
@@ -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(applicationRef: ApplicationRef, 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="28" class="link-to-prism">src/lib/dialog-update.service.ts:28</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>applicationRef</td>
184
-
185
- <td>
186
- <code>ApplicationRef</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="37"
243
- class="link-to-prism">src/lib/dialog-update.service.ts:37</a></div>
182
+ <div class="io-line">Defined in <a href="" data-line="30"
183
+ class="link-to-prism">src/lib/dialog-update.service.ts:30</a></div>
244
184
  </td>
245
185
  </tr>
246
186
 
@@ -262,20 +202,17 @@
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
- ApplicationRef,
267
- createComponent,
268
- Inject,
269
- Injectable,
270
- Injector,
271
- } from &#x27;@angular/core&#x27;;
205
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { ApplicationRef, createComponent, Injectable, Injector, inject } from &#x27;@angular/core&#x27;;
206
+ import { outputToObservable } from &#x27;@angular/core/rxjs-interop&#x27;;
272
207
  import {
273
208
  SwUpdate,
274
209
  VersionEvent,
275
210
  } from &#x27;@angular/service-worker&#x27;;
276
211
  import {
277
212
  filter,
213
+ finalize,
278
214
  Observable,
215
+ take,
279
216
  } from &#x27;rxjs&#x27;;
280
217
  import {
281
218
  concatMap,
@@ -290,13 +227,9 @@ import {
290
227
  providedIn: &#x27;root&#x27;,
291
228
  })
292
229
  export class DialogUpdateService {
293
- constructor(
294
- @Inject(ApplicationRef)
295
- private readonly applicationRef: ApplicationRef,
296
- @Inject(SwUpdate)
297
- private readonly updates: SwUpdate,
298
- ) {
299
- }
230
+ private readonly applicationRef &#x3D; inject&lt;ApplicationRef&gt;(ApplicationRef);
231
+ private readonly updates &#x3D; inject&lt;SwUpdate&gt;(SwUpdate);
232
+
300
233
 
301
234
  public start(): void {
302
235
  console.debug(&#x27;start dialog update service&#x27;);
@@ -334,8 +267,12 @@ export class DialogUpdateService {
334
267
  });
335
268
  this.applicationRef.attachView(componentRef.hostView);
336
269
 
337
- return componentRef.instance.closeDialog.pipe(
338
- tap(() &#x3D;&gt; {
270
+ // The cleanup must run after the close event has been forwarded. Destroying the component
271
+ // inside a tap completes the output observable before the value reaches the subscriber,
272
+ // so the update would never be activated.
273
+ return outputToObservable(componentRef.instance.closeDialog).pipe(
274
+ take(1),
275
+ finalize(() &#x3D;&gt; {
339
276
  componentRef.destroy();
340
277
  body.removeChild(div);
341
278
  div.remove();