@rxap/service-worker 19.2.0 → 21.0.1-dev.0
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 +15 -0
- package/compodoc/changelog.html +14 -0
- package/compodoc/components/ServiceWorkerUpdateDialogComponent.html +50 -56
- package/compodoc/dependencies.html +7 -7
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +73 -73
- 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 +3 -3
- 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 -4
- package/docs/markdown/classes/CheckForUpdateService.md +4 -4
- package/docs/markdown/classes/DialogUpdateService.md +4 -4
- package/docs/markdown/classes/LogUpdateService.md +4 -4
- package/docs/markdown/classes/ServiceWorkerUpdateDialogComponent.md +7 -7
- 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 -3
- package/docs/wiki/Class.CheckForUpdateService.md +3 -3
- package/docs/wiki/Class.DialogUpdateService.md +3 -3
- package/docs/wiki/Class.LogUpdateService.md +3 -3
- package/docs/wiki/Class.ServiceWorkerUpdateDialogComponent.md +6 -6
- 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 +20 -24
- package/fesm2022/rxap-service-worker.mjs.map +1 -1
- package/package.json +20 -19
- package/types/rxap-service-worker.d.ts +71 -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
|
@@ -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/
|
|
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)
|
|
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/
|
|
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)
|
|
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:
|
|
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)
|
package/docs/wiki/globals.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { NgSwitch, NgSwitchCase } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, EventEmitter, inject,
|
|
2
|
+
import { InjectionToken, EventEmitter, inject, Output, ViewChild, Component, Inject, Injectable, createComponent, Injector, ApplicationRef, provideAppInitializer } from '@angular/core';
|
|
4
3
|
import * as i1 from '@angular/service-worker';
|
|
5
4
|
import { SwUpdate } from '@angular/service-worker';
|
|
6
5
|
import { filter, interval, take } from 'rxjs';
|
|
@@ -22,15 +21,12 @@ class ServiceWorkerUpdateDialogComponent {
|
|
|
22
21
|
this.dialog.nativeElement.close();
|
|
23
22
|
this.closeDialog.emit();
|
|
24
23
|
}
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
24
|
+
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: [""] }); }
|
|
27
26
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ServiceWorkerUpdateDialogComponent, decorators: [{
|
|
29
28
|
type: Component,
|
|
30
|
-
args: [{ selector: 'rxap-service-worker-update-dialog', imports: [
|
|
31
|
-
NgSwitch,
|
|
32
|
-
NgSwitchCase,
|
|
33
|
-
], 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 <ng-container [ngSwitch]=\"$any(updateAvailableEvent).type\">\n <table *ngSwitchCase=\"'VERSION_DETECTED'\" class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n <table *ngSwitchCase=\"'VERSION_INSTALLATION_FAILED'\" 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 <table *ngSwitchCase=\"'VERSION_READY'\" 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 <table *ngSwitchCase=\"'NoNewVersionDetectedEvent'\" class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n </ng-container>\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>Update</button>\n</dialog>\n" }]
|
|
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" }]
|
|
34
30
|
}], propDecorators: { dialog: [{
|
|
35
31
|
type: ViewChild,
|
|
36
32
|
args: ['dialog', { static: true }]
|
|
@@ -51,10 +47,10 @@ class AutoUpdateService {
|
|
|
51
47
|
})))
|
|
52
48
|
.subscribe();
|
|
53
49
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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 }); }
|
|
51
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AutoUpdateService, providedIn: 'root' }); }
|
|
56
52
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AutoUpdateService, decorators: [{
|
|
58
54
|
type: Injectable,
|
|
59
55
|
args: [{
|
|
60
56
|
providedIn: 'root',
|
|
@@ -89,10 +85,10 @@ class CheckForUpdateService {
|
|
|
89
85
|
console.warn('service worker updates are not enabled');
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
93
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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 }); }
|
|
89
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckForUpdateService, providedIn: 'root' }); }
|
|
94
90
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckForUpdateService, decorators: [{
|
|
96
92
|
type: Injectable,
|
|
97
93
|
args: [{
|
|
98
94
|
providedIn: 'root',
|
|
@@ -143,10 +139,10 @@ class DialogUpdateService {
|
|
|
143
139
|
div.remove();
|
|
144
140
|
}));
|
|
145
141
|
}
|
|
146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
147
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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 }); }
|
|
143
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogUpdateService, providedIn: 'root' }); }
|
|
148
144
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogUpdateService, decorators: [{
|
|
150
146
|
type: Injectable,
|
|
151
147
|
args: [{
|
|
152
148
|
providedIn: 'root',
|
|
@@ -169,10 +165,10 @@ class LogUpdateService {
|
|
|
169
165
|
console.log('version update event', event);
|
|
170
166
|
});
|
|
171
167
|
}
|
|
172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
173
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
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 }); }
|
|
169
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LogUpdateService, providedIn: 'root' }); }
|
|
174
170
|
}
|
|
175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LogUpdateService, decorators: [{
|
|
176
172
|
type: Injectable,
|
|
177
173
|
args: [{
|
|
178
174
|
providedIn: 'root',
|
|
@@ -198,10 +194,10 @@ class SnackbarUpdateService {
|
|
|
198
194
|
const ref = this.snackBar.open($localize `A new version is available`, $localize `Update`);
|
|
199
195
|
return ref.afterDismissed().pipe(take(1));
|
|
200
196
|
}
|
|
201
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
202
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
197
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SnackbarUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
198
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SnackbarUpdateService, providedIn: 'root' }); }
|
|
203
199
|
}
|
|
204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SnackbarUpdateService, decorators: [{
|
|
205
201
|
type: Injectable,
|
|
206
202
|
args: [{
|
|
207
203
|
providedIn: 'root',
|
|
@@ -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":["import {\n NgSwitch,\n NgSwitchCase,\n} from '@angular/common';\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 NgSwitch,\n NgSwitchCase,\n ],\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 <ng-container [ngSwitch]=\"$any(updateAvailableEvent).type\">\n <table *ngSwitchCase=\"'VERSION_DETECTED'\" class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n <table *ngSwitchCase=\"'VERSION_INSTALLATION_FAILED'\" 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 <table *ngSwitchCase=\"'VERSION_READY'\" 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 <table *ngSwitchCase=\"'NoNewVersionDetectedEvent'\" class=\"table-auto\">\n <tr>\n <th i18n>Version hash</th>\n <td>{{$any(updateAvailableEvent)['version'].hash}}</td>\n </tr>\n </table>\n </ng-container>\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":";;;;;;;;;;;MAgBa,sBAAsB,GAAG,IAAI,cAAc,CAAe,wBAAwB;MAWlF,kCAAkC,CAAA;AAT/C,IAAA,WAAA,GAAA;AAeS,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAQ;AAE7B,QAAA,IAAA,CAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAWtE;IATC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE;;IAGvC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE;AACjC,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;;+GAhBd,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,SAAA,EAAA,IAAA,EAAA,kCAAkC,EC3B/C,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mCAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,QAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,8iDAuCA,EDlBQ,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA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M,aAAa,GAAG,CAAC,CAAC,qBAA4C,KAAK,MAAM,qBAAqB,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC5I,OAAO,aAAa,EAAE;AACxB,KAAC,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;aACjC,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;;;AAGvB,SAAC,CAAC;;AAEN;;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 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,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|
2
|
-
"version": "
|
|
2
|
+
"version": "21.0.1-dev.0",
|
|
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",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "
|
|
7
|
+
"@nx/devkit": "22.7.5",
|
|
8
8
|
"tslib": "2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^
|
|
12
|
-
"@angular/core": "^
|
|
13
|
-
"@angular/service-worker": "^
|
|
14
|
-
"@rxap/environment": "^
|
|
15
|
-
"@rxap/life-cycle": "^
|
|
16
|
-
"rxjs": "^7.8.
|
|
11
|
+
"@angular/common": "^21.2.9",
|
|
12
|
+
"@angular/core": "^21.2.9",
|
|
13
|
+
"@angular/service-worker": "^21.2.9",
|
|
14
|
+
"@rxap/environment": "^21.0.1-dev.0",
|
|
15
|
+
"@rxap/life-cycle": "^21.0.1-dev.0",
|
|
16
|
+
"rxjs": "^7.8.2"
|
|
17
17
|
},
|
|
18
18
|
"author": {
|
|
19
19
|
"name": "Merzough Münker",
|
|
@@ -38,35 +38,35 @@
|
|
|
38
38
|
"packageGroup": [
|
|
39
39
|
{
|
|
40
40
|
"package": "@angular/common",
|
|
41
|
-
"version": "
|
|
41
|
+
"version": "21.2.9"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"package": "@angular/core",
|
|
45
|
-
"version": "
|
|
45
|
+
"version": "21.2.9"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"package": "@angular/platform-browser",
|
|
49
|
-
"version": "
|
|
49
|
+
"version": "21.2.9"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"package": "@angular/router",
|
|
53
|
-
"version": "
|
|
53
|
+
"version": "21.2.9"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"package": "@angular/service-worker",
|
|
57
|
-
"version": "
|
|
57
|
+
"version": "21.2.9"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"package": "@rxap/environment",
|
|
61
|
-
"version": "
|
|
61
|
+
"version": "21.0.1-dev.0"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"package": "@rxap/life-cycle",
|
|
65
|
-
"version": "
|
|
65
|
+
"version": "21.0.1-dev.0"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"package": "@rxap/utilities",
|
|
69
|
-
"version": "16.5.
|
|
69
|
+
"version": "16.5.2-dev.0"
|
|
70
70
|
}
|
|
71
71
|
]
|
|
72
72
|
},
|
|
@@ -82,15 +82,16 @@
|
|
|
82
82
|
"schematics": "./generators.json",
|
|
83
83
|
"sideEffects": false,
|
|
84
84
|
"module": "fesm2022/rxap-service-worker.mjs",
|
|
85
|
-
"typings": "
|
|
85
|
+
"typings": "types/rxap-service-worker.d.ts",
|
|
86
86
|
"exports": {
|
|
87
87
|
"./package.json": {
|
|
88
88
|
"default": "./package.json"
|
|
89
89
|
},
|
|
90
90
|
".": {
|
|
91
|
-
"types": "./
|
|
91
|
+
"types": "./types/rxap-service-worker.d.ts",
|
|
92
92
|
"default": "./fesm2022/rxap-service-worker.mjs"
|
|
93
93
|
},
|
|
94
94
|
"./theme": "./theme.css"
|
|
95
|
-
}
|
|
95
|
+
},
|
|
96
|
+
"type": "module"
|
|
96
97
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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';
|
|
5
|
+
import { Environment } from '@rxap/environment';
|
|
6
|
+
|
|
7
|
+
declare const UPDATE_AVAILABLE_EVENT: InjectionToken<VersionEvent>;
|
|
8
|
+
declare class ServiceWorkerUpdateDialogComponent implements AfterViewInit {
|
|
9
|
+
dialog: ElementRef<HTMLDialogElement>;
|
|
10
|
+
closeDialog: EventEmitter<void>;
|
|
11
|
+
readonly updateAvailableEvent: VersionEvent;
|
|
12
|
+
ngAfterViewInit(): void;
|
|
13
|
+
close(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ServiceWorkerUpdateDialogComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ServiceWorkerUpdateDialogComponent, "rxap-service-worker-update-dialog", never, {}, { "closeDialog": "closeDialog"; }, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class AutoUpdateService {
|
|
19
|
+
private readonly updates;
|
|
20
|
+
constructor(updates: SwUpdate);
|
|
21
|
+
start(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AutoUpdateService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AutoUpdateService>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare class CheckForUpdateService {
|
|
27
|
+
private readonly lifeCycle;
|
|
28
|
+
private readonly updates;
|
|
29
|
+
private _started;
|
|
30
|
+
constructor(lifeCycle: LifeCycleService, updates: SwUpdate);
|
|
31
|
+
start(): void;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckForUpdateService, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CheckForUpdateService>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare class DialogUpdateService {
|
|
37
|
+
private readonly applicationRef;
|
|
38
|
+
private readonly updates;
|
|
39
|
+
constructor(applicationRef: ApplicationRef, updates: SwUpdate);
|
|
40
|
+
start(): void;
|
|
41
|
+
private openUpdateDialog;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogUpdateService, never>;
|
|
43
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DialogUpdateService>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class LogUpdateService {
|
|
47
|
+
private readonly updates;
|
|
48
|
+
constructor(updates: SwUpdate);
|
|
49
|
+
start(): void;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LogUpdateService, never>;
|
|
51
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LogUpdateService>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare function ProvideServiceWorkerUpdater(...providers: Array<Provider | EnvironmentProviders>): Array<Provider | EnvironmentProviders>;
|
|
55
|
+
declare function withLogUpdater(): EnvironmentProviders;
|
|
56
|
+
declare function withDialogUpdater(): EnvironmentProviders;
|
|
57
|
+
declare function withAutoUpdater(): EnvironmentProviders;
|
|
58
|
+
declare function withSnackbarUpdater(): EnvironmentProviders;
|
|
59
|
+
|
|
60
|
+
declare class SnackbarUpdateService {
|
|
61
|
+
private readonly snackBar;
|
|
62
|
+
private readonly updates;
|
|
63
|
+
start(): void;
|
|
64
|
+
private openUpdateSnackBar;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarUpdateService, never>;
|
|
66
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarUpdateService>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare function UnregisterServiceWorker(environment: Environment): void;
|
|
70
|
+
|
|
71
|
+
export { AutoUpdateService, CheckForUpdateService, DialogUpdateService, LogUpdateService, ProvideServiceWorkerUpdater, ServiceWorkerUpdateDialogComponent, SnackbarUpdateService, UPDATE_AVAILABLE_EVENT, UnregisterServiceWorker, withAutoUpdater, withDialogUpdater, withLogUpdater, withSnackbarUpdater };
|
package/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './lib/service-worker-update-dialog/service-worker-update-dialog.component';
|
|
2
|
-
export * from './lib/auto-update.service';
|
|
3
|
-
export * from './lib/check-for-update.service';
|
|
4
|
-
export * from './lib/dialog-update.service';
|
|
5
|
-
export * from './lib/log-update.service';
|
|
6
|
-
export * from './lib/provide-service-worker-updater';
|
|
7
|
-
export * from './lib/snackbar-update.service';
|
|
8
|
-
export * from './lib/unregister-service-worker';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SwUpdate } from '@angular/service-worker';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AutoUpdateService {
|
|
4
|
-
private readonly updates;
|
|
5
|
-
constructor(updates: SwUpdate);
|
|
6
|
-
start(): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AutoUpdateService, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AutoUpdateService>;
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SwUpdate } from '@angular/service-worker';
|
|
2
|
-
import { LifeCycleService } from '@rxap/life-cycle';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CheckForUpdateService {
|
|
5
|
-
private readonly lifeCycle;
|
|
6
|
-
private readonly updates;
|
|
7
|
-
private _started;
|
|
8
|
-
constructor(lifeCycle: LifeCycleService, updates: SwUpdate);
|
|
9
|
-
start(): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckForUpdateService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CheckForUpdateService>;
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ApplicationRef } from '@angular/core';
|
|
2
|
-
import { SwUpdate } from '@angular/service-worker';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class DialogUpdateService {
|
|
5
|
-
private readonly applicationRef;
|
|
6
|
-
private readonly updates;
|
|
7
|
-
constructor(applicationRef: ApplicationRef, updates: SwUpdate);
|
|
8
|
-
start(): void;
|
|
9
|
-
private openUpdateDialog;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DialogUpdateService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DialogUpdateService>;
|
|
12
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SwUpdate } from '@angular/service-worker';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class LogUpdateService {
|
|
4
|
-
private readonly updates;
|
|
5
|
-
constructor(updates: SwUpdate);
|
|
6
|
-
start(): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LogUpdateService, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LogUpdateService>;
|
|
9
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Provider, EnvironmentProviders } from '@angular/core';
|
|
2
|
-
export declare function ProvideServiceWorkerUpdater(...providers: Array<Provider | EnvironmentProviders>): Array<Provider | EnvironmentProviders>;
|
|
3
|
-
export declare function withLogUpdater(): EnvironmentProviders;
|
|
4
|
-
export declare function withDialogUpdater(): EnvironmentProviders;
|
|
5
|
-
export declare function withAutoUpdater(): EnvironmentProviders;
|
|
6
|
-
export declare function withSnackbarUpdater(): EnvironmentProviders;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter, InjectionToken } from '@angular/core';
|
|
2
|
-
import { VersionEvent } from '@angular/service-worker';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare const UPDATE_AVAILABLE_EVENT: InjectionToken<VersionEvent>;
|
|
5
|
-
export declare class ServiceWorkerUpdateDialogComponent implements AfterViewInit {
|
|
6
|
-
dialog: ElementRef<HTMLDialogElement>;
|
|
7
|
-
closeDialog: EventEmitter<void>;
|
|
8
|
-
readonly updateAvailableEvent: VersionEvent;
|
|
9
|
-
ngAfterViewInit(): void;
|
|
10
|
-
close(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ServiceWorkerUpdateDialogComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ServiceWorkerUpdateDialogComponent, "rxap-service-worker-update-dialog", never, {}, { "closeDialog": "closeDialog"; }, never, never, true, never>;
|
|
13
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class SnackbarUpdateService {
|
|
3
|
-
private readonly snackBar;
|
|
4
|
-
private readonly updates;
|
|
5
|
-
start(): void;
|
|
6
|
-
private openUpdateSnackBar;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarUpdateService, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarUpdateService>;
|
|
9
|
-
}
|