@rxap/service-worker 21.0.1-dev.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/compodoc/changelog.html +16 -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
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **withDialogUpdater**(): `EnvironmentProviders`
6
6
 
7
- Defined in: [provide-service-worker-updater.ts:30](https://gitlab.com/rxap/packages/-/blob/b20edab0a4af1993e07e7860064bb449d7fa067b/packages/angular/service-worker/src/lib/provide-service-worker-updater.ts#L30)
7
+ Defined in: [provide-service-worker-updater.ts:30](https://gitlab.com/rxap/packages/-/blob/be7e221de2deba638078b6c685a94021679a1a5b/packages/angular/service-worker/src/lib/provide-service-worker-updater.ts#L30)
8
8
 
9
9
  ## Returns
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **withLogUpdater**(): `EnvironmentProviders`
6
6
 
7
- Defined in: [provide-service-worker-updater.ts:23](https://gitlab.com/rxap/packages/-/blob/b20edab0a4af1993e07e7860064bb449d7fa067b/packages/angular/service-worker/src/lib/provide-service-worker-updater.ts#L23)
7
+ Defined in: [provide-service-worker-updater.ts:23](https://gitlab.com/rxap/packages/-/blob/be7e221de2deba638078b6c685a94021679a1a5b/packages/angular/service-worker/src/lib/provide-service-worker-updater.ts#L23)
8
8
 
9
9
  ## Returns
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **withSnackbarUpdater**(): `EnvironmentProviders`
6
6
 
7
- Defined in: [provide-service-worker-updater.ts:44](https://gitlab.com/rxap/packages/-/blob/b20edab0a4af1993e07e7860064bb449d7fa067b/packages/angular/service-worker/src/lib/provide-service-worker-updater.ts#L44)
7
+ Defined in: [provide-service-worker-updater.ts:44](https://gitlab.com/rxap/packages/-/blob/be7e221de2deba638078b6c685a94021679a1a5b/packages/angular/service-worker/src/lib/provide-service-worker-updater.ts#L44)
8
8
 
9
9
  ## Returns
10
10
 
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **UPDATE\_AVAILABLE\_EVENT**: `InjectionToken`\<`VersionEvent`\>
6
6
 
7
- Defined in: [service-worker-update-dialog/service-worker-update-dialog.component.ts:14](https://gitlab.com/rxap/packages/-/blob/b20edab0a4af1993e07e7860064bb449d7fa067b/packages/angular/service-worker/src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts#L14)
7
+ Defined in: [service-worker-update-dialog/service-worker-update-dialog.component.ts:15](https://gitlab.com/rxap/packages/-/blob/be7e221de2deba638078b6c685a94021679a1a5b/packages/angular/service-worker/src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts#L15)
@@ -1,4 +1,4 @@
1
- # @rxap/service-worker v21.0.1-dev.0
1
+ # @rxap/service-worker v21.0.1-dev.1
2
2
 
3
3
  ## Classes
4
4
 
@@ -1,42 +1,37 @@
1
+ import { __decorate, __metadata } from 'tslib';
1
2
  import * as i0 from '@angular/core';
2
- import { InjectionToken, EventEmitter, inject, Output, ViewChild, Component, Inject, Injectable, createComponent, Injector, ApplicationRef, provideAppInitializer } from '@angular/core';
3
- import * as i1 from '@angular/service-worker';
3
+ import { InjectionToken, viewChild, output, inject, afterNextRender, ChangeDetectionStrategy, Component, Injectable, ApplicationRef, createComponent, Injector, provideAppInitializer } from '@angular/core';
4
4
  import { SwUpdate } from '@angular/service-worker';
5
- import { filter, interval, take } from 'rxjs';
5
+ import { filter, interval, take, finalize } from 'rxjs';
6
6
  import { tap, startWith, concatMap } from 'rxjs/operators';
7
- import * as i1$1 from '@rxap/life-cycle';
8
7
  import { LifeCycleService } from '@rxap/life-cycle';
8
+ import { outputToObservable } from '@angular/core/rxjs-interop';
9
9
  import { MatSnackBar } from '@angular/material/snack-bar';
10
-
11
10
  const UPDATE_AVAILABLE_EVENT = new InjectionToken('UPDATE_AVAILABLE_EVENT');
12
- class ServiceWorkerUpdateDialogComponent {
11
+ let ServiceWorkerUpdateDialogComponent = class ServiceWorkerUpdateDialogComponent {
13
12
  constructor() {
14
- this.closeDialog = new EventEmitter();
13
+ this.dialog = viewChild.required('dialog');
14
+ this.closeDialog = output();
15
15
  this.updateAvailableEvent = inject(UPDATE_AVAILABLE_EVENT);
16
- }
17
- ngAfterViewInit() {
18
- this.dialog.nativeElement.showModal();
16
+ afterNextRender(() => this.dialog().nativeElement.showModal());
19
17
  }
20
18
  close() {
21
- this.dialog.nativeElement.close();
19
+ this.dialog().nativeElement.close();
22
20
  this.closeDialog.emit();
23
21
  }
24
22
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ServiceWorkerUpdateDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ServiceWorkerUpdateDialogComponent, isStandalone: true, selector: "rxap-service-worker-update-dialog", outputs: { closeDialog: "closeDialog" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, static: true }], ngImport: i0, template: "<dialog #dialog\n 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\">\n <h2 class=\"text-2xl font-bold\" i18n>A new application version is available</h2>\n @switch ($any(updateAvailableEvent).type) {\n @case ('VERSION_DETECTED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_INSTALLATION_FAILED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Version installation error</th>\n <td>{{$any(updateAvailableEvent)['error']}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_READY') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Current version hash</th>\n <td>{{$any(updateAvailableEvent)['currentVersion'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Last version hash</th>\n <td>{{$any(updateAvailableEvent)['latestVersion'].hash}}</td>\n </tr>\n </table>\n }\n @case ('NoNewVersionDetectedEvent') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n }\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>Update</button>\n</dialog>\n", styles: [""] }); }
26
- }
23
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ServiceWorkerUpdateDialogComponent, isStandalone: true, selector: "rxap-service-worker-update-dialog", outputs: { closeDialog: "closeDialog" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "<dialog #dialog\n 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\">\n <h2 class=\"text-2xl font-bold\" i18n>A new application version is available</h2>\n @switch ($any(updateAvailableEvent).type) {\n @case ('VERSION_DETECTED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_INSTALLATION_FAILED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Version installation error</th>\n <td>{{$any(updateAvailableEvent)['error']}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_READY') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Current version hash</th>\n <td>{{$any(updateAvailableEvent)['currentVersion'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Last version hash</th>\n <td>{{$any(updateAvailableEvent)['latestVersion'].hash}}</td>\n </tr>\n </table>\n }\n @case ('NoNewVersionDetectedEvent') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n }\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>Update</button>\n</dialog>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24
+ };
25
+ ServiceWorkerUpdateDialogComponent = __decorate([
26
+ __metadata("design:paramtypes", [])
27
+ ], ServiceWorkerUpdateDialogComponent);
27
28
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ServiceWorkerUpdateDialogComponent, decorators: [{
28
29
  type: Component,
29
- args: [{ selector: 'rxap-service-worker-update-dialog', imports: [], template: "<dialog #dialog\n 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\">\n <h2 class=\"text-2xl font-bold\" i18n>A new application version is available</h2>\n @switch ($any(updateAvailableEvent).type) {\n @case ('VERSION_DETECTED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_INSTALLATION_FAILED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Version installation error</th>\n <td>{{$any(updateAvailableEvent)['error']}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_READY') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Current version hash</th>\n <td>{{$any(updateAvailableEvent)['currentVersion'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Last version hash</th>\n <td>{{$any(updateAvailableEvent)['latestVersion'].hash}}</td>\n </tr>\n </table>\n }\n @case ('NoNewVersionDetectedEvent') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n }\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>Update</button>\n</dialog>\n" }]
30
- }], propDecorators: { dialog: [{
31
- type: ViewChild,
32
- args: ['dialog', { static: true }]
33
- }], closeDialog: [{
34
- type: Output
35
- }] } });
36
-
30
+ args: [{ selector: 'rxap-service-worker-update-dialog', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<dialog #dialog\n 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\">\n <h2 class=\"text-2xl font-bold\" i18n>A new application version is available</h2>\n @switch ($any(updateAvailableEvent).type) {\n @case ('VERSION_DETECTED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_INSTALLATION_FAILED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Version installation error</th>\n <td>{{$any(updateAvailableEvent)['error']}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_READY') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Current version hash</th>\n <td>{{$any(updateAvailableEvent)['currentVersion'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Last version hash</th>\n <td>{{$any(updateAvailableEvent)['latestVersion'].hash}}</td>\n </tr>\n </table>\n }\n @case ('NoNewVersionDetectedEvent') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n }\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>Update</button>\n</dialog>\n" }]
31
+ }], ctorParameters: () => [], propDecorators: { dialog: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }], closeDialog: [{ type: i0.Output, args: ["closeDialog"] }] } });
37
32
  class AutoUpdateService {
38
- constructor(updates) {
39
- this.updates = updates;
33
+ constructor() {
34
+ this.updates = inject(SwUpdate);
40
35
  }
41
36
  start() {
42
37
  console.debug('start auto update service');
@@ -47,7 +42,7 @@ class AutoUpdateService {
47
42
  })))
48
43
  .subscribe();
49
44
  }
50
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AutoUpdateService, deps: [{ token: SwUpdate }], target: i0.ɵɵFactoryTarget.Injectable }); }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AutoUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51
46
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AutoUpdateService, providedIn: 'root' }); }
52
47
  }
53
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AutoUpdateService, decorators: [{
@@ -55,15 +50,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
55
50
  args: [{
56
51
  providedIn: 'root',
57
52
  }]
58
- }], ctorParameters: () => [{ type: i1.SwUpdate, decorators: [{
59
- type: Inject,
60
- args: [SwUpdate]
61
- }] }] });
62
-
53
+ }] });
63
54
  class CheckForUpdateService {
64
- constructor(lifeCycle, updates) {
65
- this.lifeCycle = lifeCycle;
66
- this.updates = updates;
55
+ constructor() {
56
+ this.lifeCycle = inject(LifeCycleService);
57
+ this.updates = inject(SwUpdate);
67
58
  this._started = false;
68
59
  }
69
60
  start() {
@@ -85,7 +76,7 @@ class CheckForUpdateService {
85
76
  console.warn('service worker updates are not enabled');
86
77
  }
87
78
  }
88
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckForUpdateService, deps: [{ token: LifeCycleService }, { token: SwUpdate }], target: i0.ɵɵFactoryTarget.Injectable }); }
79
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckForUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
89
80
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckForUpdateService, providedIn: 'root' }); }
90
81
  }
91
82
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckForUpdateService, decorators: [{
@@ -93,18 +84,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
93
84
  args: [{
94
85
  providedIn: 'root',
95
86
  }]
96
- }], ctorParameters: () => [{ type: i1$1.LifeCycleService, decorators: [{
97
- type: Inject,
98
- args: [LifeCycleService]
99
- }] }, { type: i1.SwUpdate, decorators: [{
100
- type: Inject,
101
- args: [SwUpdate]
102
- }] }] });
103
-
87
+ }] });
104
88
  class DialogUpdateService {
105
- constructor(applicationRef, updates) {
106
- this.applicationRef = applicationRef;
107
- this.updates = updates;
89
+ constructor() {
90
+ this.applicationRef = inject(ApplicationRef);
91
+ this.updates = inject(SwUpdate);
108
92
  }
109
93
  start() {
110
94
  console.debug('start dialog update service');
@@ -133,13 +117,16 @@ class DialogUpdateService {
133
117
  }),
134
118
  });
135
119
  this.applicationRef.attachView(componentRef.hostView);
136
- return componentRef.instance.closeDialog.pipe(tap(() => {
120
+ // The cleanup must run after the close event has been forwarded. Destroying the component
121
+ // inside a tap completes the output observable before the value reaches the subscriber,
122
+ // so the update would never be activated.
123
+ return outputToObservable(componentRef.instance.closeDialog).pipe(take(1), finalize(() => {
137
124
  componentRef.destroy();
138
125
  body.removeChild(div);
139
126
  div.remove();
140
127
  }));
141
128
  }
142
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogUpdateService, deps: [{ token: ApplicationRef }, { token: SwUpdate }], target: i0.ɵɵFactoryTarget.Injectable }); }
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
143
130
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogUpdateService, providedIn: 'root' }); }
144
131
  }
145
132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogUpdateService, decorators: [{
@@ -147,17 +134,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
147
134
  args: [{
148
135
  providedIn: 'root',
149
136
  }]
150
- }], ctorParameters: () => [{ type: i0.ApplicationRef, decorators: [{
151
- type: Inject,
152
- args: [ApplicationRef]
153
- }] }, { type: i1.SwUpdate, decorators: [{
154
- type: Inject,
155
- args: [SwUpdate]
156
- }] }] });
157
-
137
+ }] });
158
138
  class LogUpdateService {
159
- constructor(updates) {
160
- this.updates = updates;
139
+ constructor() {
140
+ this.updates = inject(SwUpdate);
161
141
  }
162
142
  start() {
163
143
  console.debug('start log update');
@@ -165,7 +145,7 @@ class LogUpdateService {
165
145
  console.log('version update event', event);
166
146
  });
167
147
  }
168
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LogUpdateService, deps: [{ token: i1.SwUpdate }], target: i0.ɵɵFactoryTarget.Injectable }); }
148
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LogUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
169
149
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LogUpdateService, providedIn: 'root' }); }
170
150
  }
171
151
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LogUpdateService, decorators: [{
@@ -173,8 +153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
173
153
  args: [{
174
154
  providedIn: 'root',
175
155
  }]
176
- }], ctorParameters: () => [{ type: i1.SwUpdate }] });
177
-
156
+ }] });
178
157
  class SnackbarUpdateService {
179
158
  constructor() {
180
159
  this.snackBar = inject(MatSnackBar);
@@ -203,7 +182,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
203
182
  providedIn: 'root',
204
183
  }]
205
184
  }] });
206
-
207
185
  function ProvideServiceWorkerUpdater(...providers) {
208
186
  return [
209
187
  provideAppInitializer(() => {
@@ -237,7 +215,6 @@ function withSnackbarUpdater() {
237
215
  return initializerFn();
238
216
  });
239
217
  }
240
-
241
218
  function UnregisterServiceWorker(environment) {
242
219
  if (!environment.serviceWorker) {
243
220
  navigator?.serviceWorker?.getRegistrations().then(async (registrations) => {
@@ -254,13 +231,9 @@ function UnregisterServiceWorker(environment) {
254
231
  });
255
232
  }
256
233
  }
257
-
258
234
  // region service-worker-update-dialog
259
235
  // endregion
260
-
261
236
  /**
262
237
  * Generated bundle index. Do not edit.
263
238
  */
264
-
265
239
  export { AutoUpdateService, CheckForUpdateService, DialogUpdateService, LogUpdateService, ProvideServiceWorkerUpdater, ServiceWorkerUpdateDialogComponent, SnackbarUpdateService, UPDATE_AVAILABLE_EVENT, UnregisterServiceWorker, withAutoUpdater, withDialogUpdater, withLogUpdater, withSnackbarUpdater };
266
- //# sourceMappingURL=rxap-service-worker.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-service-worker.mjs","sources":["../../../../../packages/angular/service-worker/src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts","../../../../../packages/angular/service-worker/src/lib/service-worker-update-dialog/service-worker-update-dialog.component.html","../../../../../packages/angular/service-worker/src/lib/auto-update.service.ts","../../../../../packages/angular/service-worker/src/lib/check-for-update.service.ts","../../../../../packages/angular/service-worker/src/lib/dialog-update.service.ts","../../../../../packages/angular/service-worker/src/lib/log-update.service.ts","../../../../../packages/angular/service-worker/src/lib/snackbar-update.service.ts","../../../../../packages/angular/service-worker/src/lib/provide-service-worker-updater.ts","../../../../../packages/angular/service-worker/src/lib/unregister-service-worker.ts","../../../../../packages/angular/service-worker/src/index.ts","../../../../../packages/angular/service-worker/src/rxap-service-worker.ts"],"sourcesContent":["\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n InjectionToken,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { VersionEvent } from '@angular/service-worker';\n\nexport const UPDATE_AVAILABLE_EVENT = new InjectionToken<VersionEvent>('UPDATE_AVAILABLE_EVENT');\n\n@Component({\n selector: 'rxap-service-worker-update-dialog',\n imports: [],\n templateUrl: './service-worker-update-dialog.component.html',\n styleUrls: ['./service-worker-update-dialog.component.scss']\n})\nexport class ServiceWorkerUpdateDialogComponent implements AfterViewInit {\n\n @ViewChild('dialog', { static: true })\n public dialog!: ElementRef<HTMLDialogElement>;\n\n @Output()\n public closeDialog = new EventEmitter<void>();\n\n public readonly updateAvailableEvent = inject(UPDATE_AVAILABLE_EVENT);\n\n ngAfterViewInit() {\n this.dialog.nativeElement.showModal();\n }\n\n close() {\n this.dialog.nativeElement.close();\n this.closeDialog.emit();\n }\n\n}\n","<dialog #dialog\n 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\">\n <h2 class=\"text-2xl font-bold\" i18n>A new application version is available</h2>\n @switch ($any(updateAvailableEvent).type) {\n @case ('VERSION_DETECTED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_INSTALLATION_FAILED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Version installation error</th>\n <td>{{$any(updateAvailableEvent)['error']}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_READY') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Current version hash</th>\n <td>{{$any(updateAvailableEvent)['currentVersion'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Last version hash</th>\n <td>{{$any(updateAvailableEvent)['latestVersion'].hash}}</td>\n </tr>\n </table>\n }\n @case ('NoNewVersionDetectedEvent') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n }\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>Update</button>\n</dialog>\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { filter } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutoUpdateService {\n\n constructor(\n @Inject(SwUpdate)\n private readonly updates: SwUpdate,\n ) {\n }\n\n public start(): void {\n console.debug('start auto update service');\n this.updates.versionUpdates\n .pipe(\n filter(event => event.type === 'VERSION_READY'),\n tap(() => console.log('start auto app update')),\n tap(() =>\n this.updates.activateUpdate().then(() => {\n console.log('auto app update completed. Reload app.');\n document.location.reload();\n }),\n ),\n )\n .subscribe();\n }\n\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { LifeCycleService } from '@rxap/life-cycle';\nimport { interval } from 'rxjs';\nimport {\n startWith,\n tap,\n} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CheckForUpdateService {\n\n private _started = false;\n\n constructor(\n @Inject(LifeCycleService) private readonly lifeCycle: LifeCycleService,\n @Inject(SwUpdate) private readonly updates: SwUpdate,\n ) {\n }\n\n public start(): void {\n if (this._started) {\n console.warn('check for update already started');\n return;\n }\n this._started = true;\n if (this.updates.isEnabled) {\n\n console.debug('start check for update');\n\n this.updates.checkForUpdate();\n\n this\n .lifeCycle\n .whenReady(() => interval(15 * 60 * 1000)\n .pipe(\n startWith(null),\n tap(() => console.log('check for update')),\n tap(() => this.updates.checkForUpdate()),\n ),\n )\n .subscribe();\n\n } else {\n console.warn('service worker updates are not enabled');\n }\n }\n\n}\n","import {\n ApplicationRef,\n createComponent,\n Inject,\n Injectable,\n Injector,\n} from '@angular/core';\nimport {\n SwUpdate,\n VersionEvent,\n} from '@angular/service-worker';\nimport {\n filter,\n Observable,\n} from 'rxjs';\nimport {\n concatMap,\n tap,\n} from 'rxjs/operators';\nimport {\n ServiceWorkerUpdateDialogComponent,\n UPDATE_AVAILABLE_EVENT,\n} from './service-worker-update-dialog/service-worker-update-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogUpdateService {\n constructor(\n @Inject(ApplicationRef)\n private readonly applicationRef: ApplicationRef,\n @Inject(SwUpdate)\n private readonly updates: SwUpdate,\n ) {\n }\n\n public start(): void {\n console.debug('start dialog update service');\n this.updates.versionUpdates\n .pipe(\n filter(event => event.type === 'VERSION_READY'),\n concatMap((event) => this.openUpdateDialog(event)),\n tap(() => console.log('start app update')),\n tap(() =>\n this.updates.activateUpdate().then(() => {\n console.log('app update completed. Reload app.');\n document.location.reload();\n }),\n ),\n )\n .subscribe();\n }\n\n private openUpdateDialog(event: VersionEvent): Observable<void> {\n console.debug('open update dialog');\n const body = document.getElementsByTagName('body')[0];\n const div = document.createElement('div');\n body.appendChild(div);\n const componentRef = createComponent(ServiceWorkerUpdateDialogComponent, {\n hostElement: div,\n environmentInjector: this.applicationRef.injector,\n elementInjector: Injector.create({\n providers: [\n {\n provide: UPDATE_AVAILABLE_EVENT,\n useValue: event,\n },\n ],\n }),\n });\n this.applicationRef.attachView(componentRef.hostView);\n\n return componentRef.instance.closeDialog.pipe(\n tap(() => {\n componentRef.destroy();\n body.removeChild(div);\n div.remove();\n }),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { filter } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LogUpdateService {\n\n constructor(private readonly updates: SwUpdate) {\n }\n\n public start() {\n console.debug('start log update');\n this.updates.versionUpdates.pipe(\n filter(event => event.type !== 'NO_NEW_VERSION_DETECTED'),\n ).subscribe(event => {\n console.log('version update event', event);\n });\n }\n\n}\n\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SwUpdate,\n VersionEvent,\n} from '@angular/service-worker';\nimport {\n filter,\n Observable,\n take,\n} from 'rxjs';\nimport {\n concatMap,\n tap,\n} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackbarUpdateService {\n private readonly snackBar = inject(MatSnackBar);\n private readonly updates = inject(SwUpdate);\n\n public start(): void {\n console.debug('start dialog update service');\n this.updates.versionUpdates\n .pipe(\n filter(event => event.type === 'VERSION_READY'),\n concatMap((event) => this.openUpdateSnackBar(event)),\n tap(() => console.log('start app update')),\n tap(() =>\n this.updates.activateUpdate().then(() => {\n console.log('app update completed. Reload app.');\n document.location.reload();\n }),\n ),\n )\n .subscribe();\n }\n\n private openUpdateSnackBar(event: VersionEvent): Observable<any> {\n console.debug('open update snack bar');\n const ref = this.snackBar.open($localize`A new version is available`, $localize`Update`);\n return ref.afterDismissed().pipe(\n take(1),\n );\n }\n}\n","import {\n Provider,\n inject,\n provideAppInitializer,\n EnvironmentProviders,\n} from '@angular/core';\nimport { AutoUpdateService } from './auto-update.service';\nimport { CheckForUpdateService } from './check-for-update.service';\nimport { DialogUpdateService } from './dialog-update.service';\nimport { LogUpdateService } from './log-update.service';\nimport { SnackbarUpdateService } from './snackbar-update.service';\n\nexport function ProvideServiceWorkerUpdater(...providers: Array<Provider | EnvironmentProviders>): Array<Provider | EnvironmentProviders> {\n return [\n provideAppInitializer(() => {\n const initializerFn = ((checkForUpdate: CheckForUpdateService) => () => checkForUpdate.start())(inject(CheckForUpdateService));\n return initializerFn();\n }),\n ...providers,\n ];\n}\n\nexport function withLogUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((logUpdateService: LogUpdateService) => () => logUpdateService.start())(inject(LogUpdateService));\n return initializerFn();\n });\n}\n\nexport function withDialogUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((dus: DialogUpdateService) => () => dus.start())(inject(DialogUpdateService));\n return initializerFn();\n });\n}\n\nexport function withAutoUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((aus: AutoUpdateService) => () => aus.start())(inject(AutoUpdateService));\n return initializerFn();\n });\n}\n\nexport function withSnackbarUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((snackbarUpdateService: SnackbarUpdateService) => () => snackbarUpdateService.start())(inject(SnackbarUpdateService));\n return initializerFn();\n });\n}\n","import { Environment } from '@rxap/environment';\n\nexport function UnregisterServiceWorker(environment: Environment) {\n if (!environment.serviceWorker) {\n navigator?.serviceWorker?.getRegistrations().then(async (registrations) => {\n await Promise.all(registrations.map((registration) => {\n console.log('unregister service worker: ' + registration.scope);\n return registration.unregister();\n }));\n if (registrations.length) {\n const response = confirm(\n 'All dangling service worker are unregistered. Should the application be reloaded to complete the migration');\n if (response) {\n location.reload();\n }\n }\n });\n }\n}\n","// region service-worker-update-dialog\nexport * from './lib/service-worker-update-dialog/service-worker-update-dialog.component';\n// endregion\n\n// region \nexport * from './lib/auto-update.service';\nexport * from './lib/check-for-update.service';\nexport * from './lib/dialog-update.service';\nexport * from './lib/log-update.service';\nexport * from './lib/provide-service-worker-updater';\nexport * from './lib/snackbar-update.service';\nexport * from './lib/unregister-service-worker';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAaa,sBAAsB,GAAG,IAAI,cAAc,CAAe,wBAAwB;MAQlF,kCAAkC,CAAA;AAN/C,IAAA,WAAA,GAAA;AAYS,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAQ;AAE7B,QAAA,IAAA,CAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAWtE,IAAA;IATC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE;IACvC;IAEA,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CA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Aa,EAAE;AACxB,IAAA,CAAC,CAAC;AACR;SAEgB,eAAe,GAAA;IAC7B,OAAO,qBAAqB,CAAC,MAAK;QAC5B,MAAM,aAAa,GAAG,CAAC,CAAC,GAAsB,KAAK,MAAM,GAAG,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAChG,OAAO,aAAa,EAAE;AACxB,IAAA,CAAC,CAAC;AACR;SAEgB,mBAAmB,GAAA;IACjC,OAAO,qBAAqB,CAAC,MAAK;QAC5B,MAAM,aAAa,GAAG,CAAC,CAAC,qBAA4C,KAAK,MAAM,qBAAqB,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC5I,OAAO,aAAa,EAAE;AACxB,IAAA,CAAC,CAAC;AACR;;AC9CM,SAAU,uBAAuB,CAAC,WAAwB,EAAA;AAC9D,IAAA,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;AAC9B,QAAA,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,OAAO,aAAa,KAAI;YACxE,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,KAAI;gBACnD,OAAO,CAAC,GAAG,CAAC,6BAA6B,GAAG,YAAY,CAAC,KAAK,CAAC;AAC/D,gBAAA,OAAO,YAAY,CAAC,UAAU,EAAE;YAClC,CAAC,CAAC,CAAC;AACH,YAAA,IAAI,aAAa,CAAC,MAAM,EAAE;AACxB,gBAAA,MAAM,QAAQ,GAAG,OAAO,CACtB,4GAA4G,CAAC;gBAC/G,IAAI,QAAQ,EAAE;oBACZ,QAAQ,CAAC,MAAM,EAAE;gBACnB;YACF;AACF,QAAA,CAAC,CAAC;IACJ;AACF;;AClBA;AAYA;;ACZA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-service-worker.mjs","sources":["../../../../../packages/angular/service-worker/src/lib/service-worker-update-dialog/service-worker-update-dialog.component.ts","../../../../../packages/angular/service-worker/src/lib/service-worker-update-dialog/service-worker-update-dialog.component.html","../../../../../packages/angular/service-worker/src/lib/auto-update.service.ts","../../../../../packages/angular/service-worker/src/lib/check-for-update.service.ts","../../../../../packages/angular/service-worker/src/lib/dialog-update.service.ts","../../../../../packages/angular/service-worker/src/lib/log-update.service.ts","../../../../../packages/angular/service-worker/src/lib/snackbar-update.service.ts","../../../../../packages/angular/service-worker/src/lib/provide-service-worker-updater.ts","../../../../../packages/angular/service-worker/src/lib/unregister-service-worker.ts","../../../../../packages/angular/service-worker/src/index.ts","../../../../../packages/angular/service-worker/src/rxap-service-worker.ts"],"sourcesContent":["\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n InjectionToken,\n output,\n viewChild\n} from '@angular/core';\nimport { VersionEvent } from '@angular/service-worker';\nimport { Showcase } from '@ng-prism/core';\n\nexport const UPDATE_AVAILABLE_EVENT = new InjectionToken<VersionEvent>('UPDATE_AVAILABLE_EVENT');\n\n@Showcase({\n title: 'Service Worker Update Dialog',\n category: 'Service Worker',\n description: 'Modal dialog that informs the user about an available app update. The `UPDATE_AVAILABLE_EVENT` is provided by the styleguide host.',\n status: 'stable',\n variants: [\n { name: 'Default' },\n ],\n})\n@Component({\n selector: 'rxap-service-worker-update-dialog',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './service-worker-update-dialog.component.html',\n styleUrls: ['./service-worker-update-dialog.component.scss']\n})\nexport class ServiceWorkerUpdateDialogComponent {\n\n public readonly dialog = viewChild.required<ElementRef<HTMLDialogElement>>('dialog');\n\n public readonly closeDialog = output<void>();\n\n public readonly updateAvailableEvent = inject(UPDATE_AVAILABLE_EVENT);\n\n constructor() {\n afterNextRender(() => this.dialog().nativeElement.showModal());\n }\n\n close() {\n this.dialog().nativeElement.close();\n this.closeDialog.emit();\n }\n\n}\n","<dialog #dialog\n 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\">\n <h2 class=\"text-2xl font-bold\" i18n>A new application version is available</h2>\n @switch ($any(updateAvailableEvent).type) {\n @case ('VERSION_DETECTED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_INSTALLATION_FAILED') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Version installation error</th>\n <td>{{$any(updateAvailableEvent)['error']}}</td>\n </tr>\n </table>\n }\n @case ('VERSION_READY') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Current version hash</th>\n <td>{{$any(updateAvailableEvent)['currentVersion'].hash}}</td>\n </tr>\n <tr>\n <th i18n>Last version hash</th>\n <td>{{$any(updateAvailableEvent)['latestVersion'].hash}}</td>\n </tr>\n </table>\n }\n @case ('NoNewVersionDetectedEvent') {\n <table class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n }\n }\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>Update</button>\n</dialog>\n","import { Injectable, inject } from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { filter } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutoUpdateService {\n private readonly updates = inject<SwUpdate>(SwUpdate);\n\n\n public start(): void {\n console.debug('start auto update service');\n this.updates.versionUpdates\n .pipe(\n filter(event => event.type === 'VERSION_READY'),\n tap(() => console.log('start auto app update')),\n tap(() =>\n this.updates.activateUpdate().then(() => {\n console.log('auto app update completed. Reload app.');\n document.location.reload();\n }),\n ),\n )\n .subscribe();\n }\n\n}\n","import { Injectable, inject } from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { LifeCycleService } from '@rxap/life-cycle';\nimport { interval } from 'rxjs';\nimport {\n startWith,\n tap,\n} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CheckForUpdateService {\n private readonly lifeCycle = inject<LifeCycleService>(LifeCycleService);\n private readonly updates = inject<SwUpdate>(SwUpdate);\n\n\n private _started = false;\n\n public start(): void {\n if (this._started) {\n console.warn('check for update already started');\n return;\n }\n this._started = true;\n if (this.updates.isEnabled) {\n\n console.debug('start check for update');\n\n this.updates.checkForUpdate();\n\n this\n .lifeCycle\n .whenReady(() => interval(15 * 60 * 1000)\n .pipe(\n startWith(null),\n tap(() => console.log('check for update')),\n tap(() => this.updates.checkForUpdate()),\n ),\n )\n .subscribe();\n\n } else {\n console.warn('service worker updates are not enabled');\n }\n }\n\n}\n","import { ApplicationRef, createComponent, Injectable, Injector, inject } from '@angular/core';\nimport { outputToObservable } from '@angular/core/rxjs-interop';\nimport {\n SwUpdate,\n VersionEvent,\n} from '@angular/service-worker';\nimport {\n filter,\n finalize,\n Observable,\n take,\n} from 'rxjs';\nimport {\n concatMap,\n tap,\n} from 'rxjs/operators';\nimport {\n ServiceWorkerUpdateDialogComponent,\n UPDATE_AVAILABLE_EVENT,\n} from './service-worker-update-dialog/service-worker-update-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogUpdateService {\n private readonly applicationRef = inject<ApplicationRef>(ApplicationRef);\n private readonly updates = inject<SwUpdate>(SwUpdate);\n\n\n public start(): void {\n console.debug('start dialog update service');\n this.updates.versionUpdates\n .pipe(\n filter(event => event.type === 'VERSION_READY'),\n concatMap((event) => this.openUpdateDialog(event)),\n tap(() => console.log('start app update')),\n tap(() =>\n this.updates.activateUpdate().then(() => {\n console.log('app update completed. Reload app.');\n document.location.reload();\n }),\n ),\n )\n .subscribe();\n }\n\n private openUpdateDialog(event: VersionEvent): Observable<void> {\n console.debug('open update dialog');\n const body = document.getElementsByTagName('body')[0];\n const div = document.createElement('div');\n body.appendChild(div);\n const componentRef = createComponent(ServiceWorkerUpdateDialogComponent, {\n hostElement: div,\n environmentInjector: this.applicationRef.injector,\n elementInjector: Injector.create({\n providers: [\n {\n provide: UPDATE_AVAILABLE_EVENT,\n useValue: event,\n },\n ],\n }),\n });\n this.applicationRef.attachView(componentRef.hostView);\n\n // The cleanup must run after the close event has been forwarded. Destroying the component\n // inside a tap completes the output observable before the value reaches the subscriber,\n // so the update would never be activated.\n return outputToObservable(componentRef.instance.closeDialog).pipe(\n take(1),\n finalize(() => {\n componentRef.destroy();\n body.removeChild(div);\n div.remove();\n }),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { filter } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LogUpdateService {\n private readonly updates = inject(SwUpdate);\n\n\n public start() {\n console.debug('start log update');\n this.updates.versionUpdates.pipe(\n filter(event => event.type !== 'NO_NEW_VERSION_DETECTED'),\n ).subscribe(event => {\n console.log('version update event', event);\n });\n }\n\n}\n\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SwUpdate,\n VersionEvent,\n} from '@angular/service-worker';\nimport {\n filter,\n Observable,\n take,\n} from 'rxjs';\nimport {\n concatMap,\n tap,\n} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackbarUpdateService {\n private readonly snackBar = inject(MatSnackBar);\n private readonly updates = inject(SwUpdate);\n\n public start(): void {\n console.debug('start dialog update service');\n this.updates.versionUpdates\n .pipe(\n filter(event => event.type === 'VERSION_READY'),\n concatMap((event) => this.openUpdateSnackBar(event)),\n tap(() => console.log('start app update')),\n tap(() =>\n this.updates.activateUpdate().then(() => {\n console.log('app update completed. Reload app.');\n document.location.reload();\n }),\n ),\n )\n .subscribe();\n }\n\n private openUpdateSnackBar(event: VersionEvent): Observable<any> {\n console.debug('open update snack bar');\n const ref = this.snackBar.open($localize`A new version is available`, $localize`Update`);\n return ref.afterDismissed().pipe(\n take(1),\n );\n }\n}\n","import {\n Provider,\n inject,\n provideAppInitializer,\n EnvironmentProviders,\n} from '@angular/core';\nimport { AutoUpdateService } from './auto-update.service';\nimport { CheckForUpdateService } from './check-for-update.service';\nimport { DialogUpdateService } from './dialog-update.service';\nimport { LogUpdateService } from './log-update.service';\nimport { SnackbarUpdateService } from './snackbar-update.service';\n\nexport function ProvideServiceWorkerUpdater(...providers: Array<Provider | EnvironmentProviders>): Array<Provider | EnvironmentProviders> {\n return [\n provideAppInitializer(() => {\n const initializerFn = ((checkForUpdate: CheckForUpdateService) => () => checkForUpdate.start())(inject(CheckForUpdateService));\n return initializerFn();\n }),\n ...providers,\n ];\n}\n\nexport function withLogUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((logUpdateService: LogUpdateService) => () => logUpdateService.start())(inject(LogUpdateService));\n return initializerFn();\n });\n}\n\nexport function withDialogUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((dus: DialogUpdateService) => () => dus.start())(inject(DialogUpdateService));\n return initializerFn();\n });\n}\n\nexport function withAutoUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((aus: AutoUpdateService) => () => aus.start())(inject(AutoUpdateService));\n return initializerFn();\n });\n}\n\nexport function withSnackbarUpdater() {\n return provideAppInitializer(() => {\n const initializerFn = ((snackbarUpdateService: SnackbarUpdateService) => () => snackbarUpdateService.start())(inject(SnackbarUpdateService));\n return initializerFn();\n });\n}\n","import { Environment } from '@rxap/environment';\n\nexport function UnregisterServiceWorker(environment: Environment) {\n if (!environment.serviceWorker) {\n navigator?.serviceWorker?.getRegistrations().then(async (registrations) => {\n await Promise.all(registrations.map((registration) => {\n console.log('unregister service worker: ' + registration.scope);\n return registration.unregister();\n }));\n if (registrations.length) {\n const response = confirm(\n 'All dangling service worker are unregistered. Should the application be reloaded to complete the migration');\n if (response) {\n location.reload();\n }\n }\n });\n }\n}\n","// region service-worker-update-dialog\nexport * from './lib/service-worker-update-dialog/service-worker-update-dialog.component';\n// endregion\n\n// region \nexport * from './lib/auto-update.service';\nexport * from './lib/check-for-update.service';\nexport * from './lib/dialog-update.service';\nexport * from './lib/log-update.service';\nexport * from './lib/provide-service-worker-updater';\nexport * from './lib/snackbar-update.service';\nexport * from './lib/unregister-service-worker';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAca,sBAAsB,GAAG,IAAI,cAAc,CAAe,wBAAwB;AAkBxF,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC,CAAA;AAQ7C,IAAA,WAAA,GAAA;AANgB,QAAA,IAAA,CAAA,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAgC,QAAQ,CAAC;QAEpE,IAAA,CAAA,WAAW,GAAG,MAAM,EAAQ;AAE5B,QAAA,IAAA,CAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAGnE,QAAA,eAAe,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;IAChE;IAEA,KAAK,GAAA;QACH,IAAI,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;AACnC,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;IACzB;8GAfW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kCAAkC,wPChC/C,wlDA+CA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;ADfa,kCAAkC,GAAA,UAAA,CAAA;AAhB9C,IAAA,QAAQ,CAA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MAAM,aAAa,GAAG,CAAC,CAAC,qBAA4C,KAAK,MAAM,qBAAqB,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC5I,OAAO,aAAa,EAAE;AACxB,IAAA,CAAC,CAAC;AACR;;AC9CM,SAAU,uBAAuB,CAAC,WAAwB,EAAA;AAC9D,IAAA,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;AAC9B,QAAA,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,OAAO,aAAa,KAAI;YACxE,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,KAAI;gBACnD,OAAO,CAAC,GAAG,CAAC,6BAA6B,GAAG,YAAY,CAAC,KAAK,CAAC;AAC/D,gBAAA,OAAO,YAAY,CAAC,UAAU,EAAE;YAClC,CAAC,CAAC,CAAC;AACH,YAAA,IAAI,aAAa,CAAC,MAAM,EAAE;AACxB,gBAAA,MAAM,QAAQ,GAAG,OAAO,CACtB,4GAA4G,CAAC;gBAC/G,IAAI,QAAQ,EAAE;oBACZ,QAAQ,CAAC,MAAM,EAAE;gBACnB;YACF;AACF,QAAA,CAAC,CAAC;IACJ;AACF;;AClBA;AAYA;;ACZA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "21.0.1-dev.0",
2
+ "version": "21.0.1-dev.1",
3
3
  "name": "@rxap/service-worker",
4
4
  "description": "Provides services and components to simplify the management of service worker updates in Angular applications. It includes features such as automatic updates, dialog prompts for updates, and logging of update events. The package also offers utilities to unregister service workers and initialize peer dependencies.\n",
5
5
  "license": "GPL-3.0-or-later",
@@ -11,8 +11,8 @@
11
11
  "@angular/common": "^21.2.9",
12
12
  "@angular/core": "^21.2.9",
13
13
  "@angular/service-worker": "^21.2.9",
14
- "@rxap/environment": "^21.0.1-dev.0",
15
- "@rxap/life-cycle": "^21.0.1-dev.0",
14
+ "@rxap/environment": "^21.0.1-dev.1",
15
+ "@rxap/life-cycle": "^21.0.1-dev.1",
16
16
  "rxjs": "^7.8.2"
17
17
  },
18
18
  "author": {
@@ -58,15 +58,15 @@
58
58
  },
59
59
  {
60
60
  "package": "@rxap/environment",
61
- "version": "21.0.1-dev.0"
61
+ "version": "21.0.1-dev.1"
62
62
  },
63
63
  {
64
64
  "package": "@rxap/life-cycle",
65
- "version": "21.0.1-dev.0"
65
+ "version": "21.0.1-dev.1"
66
66
  },
67
67
  {
68
68
  "package": "@rxap/utilities",
69
- "version": "16.5.2-dev.0"
69
+ "version": "16.5.2-dev.1"
70
70
  }
71
71
  ]
72
72
  },
@@ -1,15 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, ApplicationRef, Provider, EnvironmentProviders } from '@angular/core';
3
- import { VersionEvent, SwUpdate } from '@angular/service-worker';
4
- import { LifeCycleService } from '@rxap/life-cycle';
2
+ import { ElementRef, InjectionToken, Provider, EnvironmentProviders } from '@angular/core';
3
+ import { VersionEvent } from '@angular/service-worker';
5
4
  import { Environment } from '@rxap/environment';
6
5
 
7
6
  declare const UPDATE_AVAILABLE_EVENT: InjectionToken<VersionEvent>;
8
- declare class ServiceWorkerUpdateDialogComponent implements AfterViewInit {
9
- dialog: ElementRef<HTMLDialogElement>;
10
- closeDialog: EventEmitter<void>;
7
+ declare class ServiceWorkerUpdateDialogComponent {
8
+ readonly dialog: i0.Signal<ElementRef<HTMLDialogElement>>;
9
+ readonly closeDialog: i0.OutputEmitterRef<void>;
11
10
  readonly updateAvailableEvent: VersionEvent;
12
- ngAfterViewInit(): void;
11
+ constructor();
13
12
  close(): void;
14
13
  static ɵfac: i0.ɵɵFactoryDeclaration<ServiceWorkerUpdateDialogComponent, never>;
15
14
  static ɵcmp: i0.ɵɵComponentDeclaration<ServiceWorkerUpdateDialogComponent, "rxap-service-worker-update-dialog", never, {}, { "closeDialog": "closeDialog"; }, never, never, true, never>;
@@ -17,7 +16,6 @@ declare class ServiceWorkerUpdateDialogComponent implements AfterViewInit {
17
16
 
18
17
  declare class AutoUpdateService {
19
18
  private readonly updates;
20
- constructor(updates: SwUpdate);
21
19
  start(): void;
22
20
  static ɵfac: i0.ɵɵFactoryDeclaration<AutoUpdateService, never>;
23
21
  static ɵprov: i0.ɵɵInjectableDeclaration<AutoUpdateService>;
@@ -27,7 +25,6 @@ declare class CheckForUpdateService {
27
25
  private readonly lifeCycle;
28
26
  private readonly updates;
29
27
  private _started;
30
- constructor(lifeCycle: LifeCycleService, updates: SwUpdate);
31
28
  start(): void;
32
29
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckForUpdateService, never>;
33
30
  static ɵprov: i0.ɵɵInjectableDeclaration<CheckForUpdateService>;
@@ -36,7 +33,6 @@ declare class CheckForUpdateService {
36
33
  declare class DialogUpdateService {
37
34
  private readonly applicationRef;
38
35
  private readonly updates;
39
- constructor(applicationRef: ApplicationRef, updates: SwUpdate);
40
36
  start(): void;
41
37
  private openUpdateDialog;
42
38
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogUpdateService, never>;
@@ -45,7 +41,6 @@ declare class DialogUpdateService {
45
41
 
46
42
  declare class LogUpdateService {
47
43
  private readonly updates;
48
- constructor(updates: SwUpdate);
49
44
  start(): void;
50
45
  static ɵfac: i0.ɵɵFactoryDeclaration<LogUpdateService, never>;
51
46
  static ɵprov: i0.ɵɵInjectableDeclaration<LogUpdateService>;