@softpak/components 21.2.0-capwesome.10 → 21.2.0-capwesome.11
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/fesm2022/softpak-components-spx-channel-selection.mjs +37 -7
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-translate.mjs +25 -1
- package/fesm2022/softpak-components-spx-translate.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +204 -46
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind.css +1 -1
- package/types/softpak-components-spx-channel-selection.d.ts +2 -1
- package/types/softpak-components-spx-translate.d.ts +17 -1
- package/types/softpak-components-spx-update.d.ts +43 -13
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import * as i3 from '@ionic/angular/standalone';
|
|
2
2
|
import { IonContent, IonHeader, IonToolbar, IonTitle } from '@ionic/angular/standalone';
|
|
3
|
-
import { spxTextCheckingForUpdates, spxTextOneMomentPlease, spxTextUpdateAppVersion, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateVersionInfo,
|
|
3
|
+
import { spxTextCheckingForUpdates, spxTextOneMomentPlease, spxTextUpdateErrorReason, spxTextUpdateAppVersion, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLastCheck, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateVersionInfo, spxTextUpdateStatusCompleted, spxTextUpdateStatusWebNotAvailable, spxTextUpdateStatusFailed, spxTextUpdateStatusUpdateReady, spxTextUpdateStatusUpToDate, spxTextUpdateStatusReloading, spxTextUpdateStatusSyncing, spxTextUpdateStatusPreparing, spxTextUpdate, spxTextReadyToBeInstalled, spxTextPatchAvailable, spxTextUpdateAvailable, spxTextOpenAppStore, spxTextLiveUpdateCheckFailedWithReason, spxTextLiveUpdateCheckFailed } from '@softpak/components/spx-translate';
|
|
4
4
|
import { App } from '@capacitor/app';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { signal, computed, effect, Component, HostBinding, ChangeDetectionStrategy, inject, Injectable } from '@angular/core';
|
|
7
|
+
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
7
8
|
import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
|
|
9
|
+
import { getBinaryVersionGroup, unsubscribeSubscriptions, SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
8
10
|
import { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';
|
|
9
11
|
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
|
|
10
12
|
import * as i1 from '@ngrx/store';
|
|
11
|
-
import { createActionGroup,
|
|
13
|
+
import { createActionGroup, emptyProps, props, createFeature, createReducer, on, Store } from '@ngrx/store';
|
|
12
14
|
import { DateTime } from 'luxon';
|
|
13
15
|
import * as i2 from '@angular/router';
|
|
14
|
-
import { unsubscribeSubscriptions, SpxSeverityEnum, getBinaryVersionGroup } from '@softpak/components/spx-helpers';
|
|
15
16
|
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
16
17
|
import * as i2$1 from '@angular/platform-browser';
|
|
17
|
-
import * as i1$1 from '@ngrx/effects';
|
|
18
18
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
|
19
19
|
import { LiveUpdate } from '@capawesome/capacitor-live-update';
|
|
20
20
|
import { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
|
|
21
|
-
import { of, from } from 'rxjs';
|
|
21
|
+
import { of, concat, from, timer } from 'rxjs';
|
|
22
22
|
import { delay, mergeMap, exhaustMap, map, catchError, tap } from 'rxjs/operators';
|
|
23
23
|
import { Capacitor } from '@capacitor/core';
|
|
24
|
-
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
25
24
|
import { captureMessage } from '@sentry/angular';
|
|
26
25
|
|
|
27
26
|
const spxUpdateCheckActions = createActionGroup({
|
|
@@ -33,14 +32,35 @@ const spxUpdateCheckActions = createActionGroup({
|
|
|
33
32
|
initialize: emptyProps(),
|
|
34
33
|
noUpdateWasFound: props(),
|
|
35
34
|
notAvailableOnWeb: emptyProps(),
|
|
35
|
+
reloadStarted: emptyProps(),
|
|
36
36
|
runCheck: props(),
|
|
37
|
+
syncStarted: emptyProps(),
|
|
37
38
|
},
|
|
38
39
|
});
|
|
39
40
|
|
|
41
|
+
var SpxUpdateCheckStatusEnum;
|
|
42
|
+
(function (SpxUpdateCheckStatusEnum) {
|
|
43
|
+
SpxUpdateCheckStatusEnum["failed"] = "failed";
|
|
44
|
+
SpxUpdateCheckStatusEnum["idle"] = "idle";
|
|
45
|
+
SpxUpdateCheckStatusEnum["notAvailableOnWeb"] = "notAvailableOnWeb";
|
|
46
|
+
SpxUpdateCheckStatusEnum["preparing"] = "preparing";
|
|
47
|
+
SpxUpdateCheckStatusEnum["reloading"] = "reloading";
|
|
48
|
+
SpxUpdateCheckStatusEnum["syncing"] = "syncing";
|
|
49
|
+
SpxUpdateCheckStatusEnum["upToDate"] = "upToDate";
|
|
50
|
+
SpxUpdateCheckStatusEnum["updateReady"] = "updateReady";
|
|
51
|
+
})(SpxUpdateCheckStatusEnum || (SpxUpdateCheckStatusEnum = {}));
|
|
52
|
+
|
|
53
|
+
var spxUpdateCheck_state = /*#__PURE__*/Object.freeze({
|
|
54
|
+
__proto__: null,
|
|
55
|
+
get SpxUpdateCheckStatusEnum () { return SpxUpdateCheckStatusEnum; }
|
|
56
|
+
});
|
|
57
|
+
|
|
40
58
|
const initialState$1 = {
|
|
41
59
|
forceWaitForUpdate: false,
|
|
60
|
+
lastErrorReason: null,
|
|
42
61
|
lastCheck: null,
|
|
43
62
|
showError: false,
|
|
63
|
+
status: SpxUpdateCheckStatusEnum.idle,
|
|
44
64
|
};
|
|
45
65
|
|
|
46
66
|
var spxUpdateCheck_initial = /*#__PURE__*/Object.freeze({
|
|
@@ -54,35 +74,56 @@ var updCheck = createFeature({
|
|
|
54
74
|
return {
|
|
55
75
|
...state,
|
|
56
76
|
lastCheck: DateTime.now().toISO(),
|
|
77
|
+
lastErrorReason: null,
|
|
57
78
|
showError: false,
|
|
79
|
+
status: SpxUpdateCheckStatusEnum.updateReady,
|
|
58
80
|
};
|
|
59
81
|
}), on(spxUpdateCheckActions.clearError, (state) => {
|
|
60
82
|
return {
|
|
61
83
|
...state,
|
|
84
|
+
lastErrorReason: null,
|
|
62
85
|
showError: false,
|
|
63
86
|
};
|
|
64
|
-
}), on(spxUpdateCheckActions.checkFailed, (state) => {
|
|
87
|
+
}), on(spxUpdateCheckActions.checkFailed, (state, { errorReason }) => {
|
|
65
88
|
return {
|
|
66
89
|
...state,
|
|
67
90
|
forceWaitForUpdate: false,
|
|
91
|
+
lastErrorReason: errorReason || null,
|
|
68
92
|
showError: true,
|
|
93
|
+
status: SpxUpdateCheckStatusEnum.failed,
|
|
69
94
|
};
|
|
70
95
|
}), on(spxUpdateCheckActions.noUpdateWasFound, (state) => {
|
|
71
96
|
return {
|
|
72
97
|
...state,
|
|
73
98
|
forceWaitForUpdate: false,
|
|
74
99
|
lastCheck: DateTime.now().toISO(),
|
|
100
|
+
lastErrorReason: null,
|
|
75
101
|
showError: false,
|
|
102
|
+
status: SpxUpdateCheckStatusEnum.upToDate,
|
|
76
103
|
};
|
|
77
104
|
}), on(spxUpdateCheckActions.runCheck, (state, { forceWaitForUpdate }) => {
|
|
78
105
|
return {
|
|
79
106
|
...state,
|
|
80
|
-
forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate
|
|
107
|
+
forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate,
|
|
108
|
+
lastErrorReason: null,
|
|
109
|
+
showError: false,
|
|
110
|
+
status: SpxUpdateCheckStatusEnum.preparing,
|
|
111
|
+
};
|
|
112
|
+
}), on(spxUpdateCheckActions.syncStarted, (state) => {
|
|
113
|
+
return {
|
|
114
|
+
...state,
|
|
115
|
+
status: SpxUpdateCheckStatusEnum.syncing,
|
|
116
|
+
};
|
|
117
|
+
}), on(spxUpdateCheckActions.reloadStarted, (state) => {
|
|
118
|
+
return {
|
|
119
|
+
...state,
|
|
120
|
+
status: SpxUpdateCheckStatusEnum.reloading,
|
|
81
121
|
};
|
|
82
122
|
}), on(spxUpdateCheckActions.notAvailableOnWeb, (state) => {
|
|
83
123
|
return {
|
|
84
124
|
...state,
|
|
85
|
-
forceWaitForUpdate: false
|
|
125
|
+
forceWaitForUpdate: false,
|
|
126
|
+
status: SpxUpdateCheckStatusEnum.notAvailableOnWeb,
|
|
86
127
|
};
|
|
87
128
|
})),
|
|
88
129
|
});
|
|
@@ -105,34 +146,53 @@ class SpxUpdatePageComponent {
|
|
|
105
146
|
this.appVersion = signal('-', ...(ngDevMode ? [{ debugName: "appVersion" }] : []));
|
|
106
147
|
this.binaryVersionGroup = signal('-', ...(ngDevMode ? [{ debugName: "binaryVersionGroup" }] : []));
|
|
107
148
|
this.buildVersion = signal('-', ...(ngDevMode ? [{ debugName: "buildVersion" }] : []));
|
|
149
|
+
this.lastCheck = this.appStore.selectSignal(updCheck.selectLastCheck);
|
|
150
|
+
this.lastErrorReason = this.appStore.selectSignal(updCheck.selectLastErrorReason);
|
|
108
151
|
this.forceWaitForUpdate = this.appStore.selectSignal(updCheck.selectForceWaitForUpdate);
|
|
109
152
|
this.hasStarted = signal(false, ...(ngDevMode ? [{ debugName: "hasStarted" }] : []));
|
|
110
153
|
this.liveBundle = signal('-', ...(ngDevMode ? [{ debugName: "liveBundle" }] : []));
|
|
111
154
|
this.liveUpdateChannel = signal('-', ...(ngDevMode ? [{ debugName: "liveUpdateChannel" }] : []));
|
|
155
|
+
this.status = this.appStore.selectSignal(updCheck.selectStatus);
|
|
112
156
|
this.spxTextCheckingForUpdates = spxTextCheckingForUpdates;
|
|
113
157
|
this.spxTextOneMomentPlease = spxTextOneMomentPlease;
|
|
158
|
+
this.spxTextUpdateErrorReason = spxTextUpdateErrorReason;
|
|
114
159
|
this.spxTextUpdateAppVersion = spxTextUpdateAppVersion;
|
|
115
160
|
this.spxTextUpdateBinaryVersionGroup = spxTextUpdateBinaryVersionGroup;
|
|
116
161
|
this.spxTextUpdateBuildVersion = spxTextUpdateBuildVersion;
|
|
162
|
+
this.spxTextUpdateLastCheck = spxTextUpdateLastCheck;
|
|
117
163
|
this.spxTextUpdateLiveBundle = spxTextUpdateLiveBundle;
|
|
118
164
|
this.spxTextUpdateLiveChannel = spxTextUpdateLiveChannel;
|
|
119
165
|
this.spxTextUpdateStatus = spxTextUpdateStatus;
|
|
120
166
|
this.spxTextUpdateVersionInfo = spxTextUpdateVersionInfo;
|
|
121
167
|
this.statusText = computed(() => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
168
|
+
switch (this.status()) {
|
|
169
|
+
case SpxUpdateCheckStatusEnum.idle:
|
|
170
|
+
return spxTextUpdateStatusPreparing;
|
|
171
|
+
case SpxUpdateCheckStatusEnum.preparing:
|
|
172
|
+
return spxTextUpdateStatusPreparing;
|
|
173
|
+
case SpxUpdateCheckStatusEnum.syncing:
|
|
174
|
+
return spxTextUpdateStatusSyncing;
|
|
175
|
+
case SpxUpdateCheckStatusEnum.reloading:
|
|
176
|
+
return spxTextUpdateStatusReloading;
|
|
177
|
+
case SpxUpdateCheckStatusEnum.upToDate:
|
|
178
|
+
return spxTextUpdateStatusUpToDate;
|
|
179
|
+
case SpxUpdateCheckStatusEnum.updateReady:
|
|
180
|
+
return spxTextUpdateStatusUpdateReady;
|
|
181
|
+
case SpxUpdateCheckStatusEnum.failed:
|
|
182
|
+
return spxTextUpdateStatusFailed;
|
|
183
|
+
case SpxUpdateCheckStatusEnum.notAvailableOnWeb:
|
|
184
|
+
return spxTextUpdateStatusWebNotAvailable;
|
|
185
|
+
default:
|
|
186
|
+
return spxTextUpdateStatusCompleted;
|
|
127
187
|
}
|
|
128
|
-
if (this.forceWaitForUpdate()) {
|
|
129
|
-
return spxTextUpdateStatusSyncing;
|
|
130
|
-
}
|
|
131
|
-
return spxTextUpdateStatusCompleted;
|
|
132
188
|
}, ...(ngDevMode ? [{ debugName: "statusText" }] : []));
|
|
133
189
|
this.showError = this.appStore.selectSignal(updCheck.selectShowError);
|
|
134
190
|
effect(() => {
|
|
135
|
-
|
|
191
|
+
this.status();
|
|
192
|
+
this.refreshStorageVersionInfo();
|
|
193
|
+
});
|
|
194
|
+
effect(() => {
|
|
195
|
+
if (!this.hasStarted() || this.forceWaitForUpdate() || this.showError()) {
|
|
136
196
|
return;
|
|
137
197
|
}
|
|
138
198
|
if (this.activatedRoute.snapshot.data['url'] === undefined) {
|
|
@@ -143,14 +203,37 @@ class SpxUpdatePageComponent {
|
|
|
143
203
|
}
|
|
144
204
|
async loadVersionInfo() {
|
|
145
205
|
const appInfo = await App.getInfo();
|
|
146
|
-
|
|
206
|
+
const appVersion = appInfo.version || '-';
|
|
207
|
+
this.appVersion.set(appVersion);
|
|
147
208
|
this.buildVersion.set(appInfo.build || '-');
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
209
|
+
try {
|
|
210
|
+
const computedBinaryVersionGroup = `${getBinaryVersionGroup(appVersion)}.x`;
|
|
211
|
+
const storedBinaryVersionGroup = SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup);
|
|
212
|
+
this.binaryVersionGroup.set(storedBinaryVersionGroup || computedBinaryVersionGroup);
|
|
213
|
+
const storedLiveUpdateChannel = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel);
|
|
214
|
+
const channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType) || SpxAppChannelTypeEnum.production;
|
|
215
|
+
this.liveUpdateChannel.set(storedLiveUpdateChannel || `${channelType}-${computedBinaryVersionGroup}`);
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
this.binaryVersionGroup.set(SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup) || '-');
|
|
219
|
+
this.liveUpdateChannel.set(SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel) || '-');
|
|
220
|
+
}
|
|
221
|
+
this.refreshStorageVersionInfo();
|
|
222
|
+
}
|
|
223
|
+
refreshStorageVersionInfo() {
|
|
224
|
+
const storedBinaryVersionGroup = SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup);
|
|
225
|
+
const storedLiveUpdateChannel = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel);
|
|
226
|
+
const storedLiveBundle = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdate);
|
|
227
|
+
if (storedBinaryVersionGroup) {
|
|
228
|
+
this.binaryVersionGroup.set(storedBinaryVersionGroup);
|
|
229
|
+
}
|
|
230
|
+
if (storedLiveUpdateChannel) {
|
|
231
|
+
this.liveUpdateChannel.set(storedLiveUpdateChannel);
|
|
232
|
+
}
|
|
233
|
+
this.liveBundle.set(storedLiveBundle || '-');
|
|
151
234
|
}
|
|
152
235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SpxUpdatePageComponent, deps: [{ token: i1.Store }, { token: i2.ActivatedRoute }, { token: i3.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
236
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: SpxUpdatePageComponent, isStandalone: true, selector: "spx-update-page", ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n <p>{{ spxTextOneMomentPlease | translate | capitalize }}...</p>\n <p class=\"mt-2\">\n <strong>{{ spxTextUpdateStatus | translate | capitalize }}:</strong>\n {{ statusText() | translate | capitalize }}\n </p>\n @if (lastErrorReason()) {\n <p class=\"mt-2 text-red-700\">\n <strong>{{ spxTextUpdateErrorReason | translate | capitalize }}:</strong>\n {{ lastErrorReason() }}\n </p>\n }\n @if (lastCheck()) {\n <p class=\"mt-1 text-sm text-zinc-600\">\n <strong>{{ spxTextUpdateLastCheck | translate | capitalize }}:</strong>\n {{ lastCheck() }}\n </p>\n }\n\n <div class=\"mt-6 text-sm text-zinc-600\">\n <p><strong>{{ spxTextUpdateVersionInfo | translate | capitalize }}</strong></p>\n <p>{{ spxTextUpdateAppVersion | translate | capitalize }}: {{ appVersion() }}</p>\n <p>{{ spxTextUpdateBuildVersion | translate | capitalize }}: {{ buildVersion() }}</p>\n <p>{{ spxTextUpdateBinaryVersionGroup | translate | capitalize }}: {{ binaryVersionGroup() }}</p>\n <p>{{ spxTextUpdateLiveChannel | translate | capitalize }}: {{ liveUpdateChannel() }}</p>\n <p>{{ spxTextUpdateLiveBundle | translate | capitalize }}: {{ liveBundle() }}</p>\n </div>\n</ion-content>\n", dependencies: [{ kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
154
237
|
}
|
|
155
238
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SpxUpdatePageComponent, decorators: [{
|
|
156
239
|
type: Component,
|
|
@@ -161,7 +244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
161
244
|
IonTitle,
|
|
162
245
|
SpxCapitalizePipe,
|
|
163
246
|
TranslatePipe,
|
|
164
|
-
], standalone: true, template: "<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n <p>{{ spxTextOneMomentPlease | translate | capitalize }}...</p>\n <p class=\"mt-2\">\n <strong>{{ spxTextUpdateStatus | translate | capitalize }}:</strong>\n {{ statusText() | translate | capitalize }}\n </p>\n\n <div class=\"mt-6 text-sm text-zinc-600\">\n <p><strong>{{ spxTextUpdateVersionInfo | translate | capitalize }}</strong></p>\n <p>{{ spxTextUpdateAppVersion | translate | capitalize }}: {{ appVersion() }}</p>\n <p>{{ spxTextUpdateBuildVersion | translate | capitalize }}: {{ buildVersion() }}</p>\n <p>{{ spxTextUpdateBinaryVersionGroup | translate | capitalize }}: {{ binaryVersionGroup() }}</p>\n <p>{{ spxTextUpdateLiveChannel | translate | capitalize }}: {{ liveUpdateChannel() }}</p>\n <p>{{ spxTextUpdateLiveBundle | translate | capitalize }}: {{ liveBundle() }}</p>\n </div>\n</ion-content>\n" }]
|
|
247
|
+
], standalone: true, template: "<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n <p>{{ spxTextOneMomentPlease | translate | capitalize }}...</p>\n <p class=\"mt-2\">\n <strong>{{ spxTextUpdateStatus | translate | capitalize }}:</strong>\n {{ statusText() | translate | capitalize }}\n </p>\n @if (lastErrorReason()) {\n <p class=\"mt-2 text-red-700\">\n <strong>{{ spxTextUpdateErrorReason | translate | capitalize }}:</strong>\n {{ lastErrorReason() }}\n </p>\n }\n @if (lastCheck()) {\n <p class=\"mt-1 text-sm text-zinc-600\">\n <strong>{{ spxTextUpdateLastCheck | translate | capitalize }}:</strong>\n {{ lastCheck() }}\n </p>\n }\n\n <div class=\"mt-6 text-sm text-zinc-600\">\n <p><strong>{{ spxTextUpdateVersionInfo | translate | capitalize }}</strong></p>\n <p>{{ spxTextUpdateAppVersion | translate | capitalize }}: {{ appVersion() }}</p>\n <p>{{ spxTextUpdateBuildVersion | translate | capitalize }}: {{ buildVersion() }}</p>\n <p>{{ spxTextUpdateBinaryVersionGroup | translate | capitalize }}: {{ binaryVersionGroup() }}</p>\n <p>{{ spxTextUpdateLiveChannel | translate | capitalize }}: {{ liveUpdateChannel() }}</p>\n <p>{{ spxTextUpdateLiveBundle | translate | capitalize }}: {{ liveBundle() }}</p>\n </div>\n</ion-content>\n" }]
|
|
165
248
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.ActivatedRoute }, { type: i3.NavController }] });
|
|
166
249
|
|
|
167
250
|
const SpxUpdatePendingActions = createActionGroup({
|
|
@@ -277,10 +360,10 @@ let Effects$1 = class Effects {
|
|
|
277
360
|
if (Capacitor.getPlatform() === 'web') {
|
|
278
361
|
return of(spxUpdateCheckActions.notAvailableOnWeb());
|
|
279
362
|
}
|
|
280
|
-
return from(App.getInfo()).pipe(mergeMap((binaryInfo) => {
|
|
363
|
+
return concat(of(spxUpdateCheckActions.syncStarted()), from(App.getInfo()).pipe(mergeMap((binaryInfo) => {
|
|
281
364
|
// Migrate from e.g. 1.2.x to 1.3.x
|
|
282
365
|
const binaryVersionGroup = getBinaryVersionGroup(binaryInfo.version);
|
|
283
|
-
|
|
366
|
+
const channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType);
|
|
284
367
|
if (SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup)) {
|
|
285
368
|
SpxStorage.setSetting(SpxStorageKeyEnum.lastBinaryVersionGroup, SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup));
|
|
286
369
|
}
|
|
@@ -288,21 +371,35 @@ let Effects$1 = class Effects {
|
|
|
288
371
|
SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdateChannel, `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`);
|
|
289
372
|
// End migrate from e.g. 1.2.x to 1.3.x
|
|
290
373
|
return from(LiveUpdate.sync({ channel: SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel) }));
|
|
291
|
-
}),
|
|
374
|
+
}), mergeMap((syncResult) => {
|
|
292
375
|
if (syncResult.nextBundleId) {
|
|
376
|
+
SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.nextBundleId);
|
|
293
377
|
if (action.forceWaitForUpdate) {
|
|
294
|
-
|
|
295
|
-
|
|
378
|
+
return concat(of(spxUpdateCheckActions.reloadStarted()), from(LiveUpdate.reload()).pipe(map(() => spxUpdateCheckActions.anUpdateIsReady()), catchError((err) => {
|
|
379
|
+
const errorReason = this.getReadableErrorReason(err);
|
|
380
|
+
captureMessage(`[UPD] Reload failed: ${errorReason}`);
|
|
381
|
+
return of(spxUpdateCheckActions.checkFailed({
|
|
382
|
+
errorReason,
|
|
383
|
+
startUpdateAgainAfterTimeout: false,
|
|
384
|
+
}));
|
|
385
|
+
})));
|
|
296
386
|
}
|
|
297
|
-
return spxUpdateCheckActions.anUpdateIsReady();
|
|
387
|
+
return of(spxUpdateCheckActions.anUpdateIsReady());
|
|
298
388
|
}
|
|
299
389
|
else {
|
|
300
|
-
return spxUpdateCheckActions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });
|
|
390
|
+
return of(spxUpdateCheckActions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }));
|
|
301
391
|
}
|
|
302
392
|
}), catchError((err) => {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
393
|
+
const errorReason = this.getReadableErrorReason(err);
|
|
394
|
+
if (this.isSyncAlreadyInProgress(errorReason)) {
|
|
395
|
+
return timer(1500).pipe(map(() => spxUpdateCheckActions.runCheck({ forceWaitForUpdate: action.forceWaitForUpdate })));
|
|
396
|
+
}
|
|
397
|
+
captureMessage(`[UPD] Handled: ${errorReason}`);
|
|
398
|
+
return of(spxUpdateCheckActions.checkFailed({
|
|
399
|
+
errorReason,
|
|
400
|
+
startUpdateAgainAfterTimeout: false,
|
|
401
|
+
}));
|
|
402
|
+
})));
|
|
306
403
|
})));
|
|
307
404
|
this.whenAndUpdateIsReady$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.anUpdateIsReady), mergeMap(() => [
|
|
308
405
|
SpxUpdatePendingActions.hasBeenDownloaded(),
|
|
@@ -310,14 +407,44 @@ let Effects$1 = class Effects {
|
|
|
310
407
|
this.whenCheckHasFailed$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), delay(30000), mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [
|
|
311
408
|
spxUpdateCheckActions.runCheck({}),
|
|
312
409
|
])));
|
|
313
|
-
this.whenCheckHasFailedShowError$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), map(() => spxToasterActions.createError({
|
|
410
|
+
this.whenCheckHasFailedShowError$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), map((action) => spxToasterActions.createError({
|
|
314
411
|
autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
|
|
315
|
-
messageText:
|
|
412
|
+
messageText: action.errorReason
|
|
413
|
+
? this.translateService.instant(spxTextLiveUpdateCheckFailedWithReason, { reason: action.errorReason })
|
|
414
|
+
: this.translateService.instant(spxTextLiveUpdateCheckFailed),
|
|
316
415
|
}))));
|
|
317
416
|
this.whenNoUpdateWasFound$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.noUpdateWasFound), delay(120000), mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [
|
|
318
417
|
spxUpdateCheckActions.runCheck({}),
|
|
319
418
|
])));
|
|
320
419
|
}
|
|
420
|
+
getReadableErrorReason(err) {
|
|
421
|
+
if (err instanceof Error && err.message?.trim()) {
|
|
422
|
+
return err.message.trim();
|
|
423
|
+
}
|
|
424
|
+
if (typeof err === 'string' && err.trim()) {
|
|
425
|
+
return err.trim();
|
|
426
|
+
}
|
|
427
|
+
if (err && typeof err === 'object') {
|
|
428
|
+
const withMessage = err;
|
|
429
|
+
if (typeof withMessage.message === 'string' && withMessage.message.trim()) {
|
|
430
|
+
return withMessage.message.trim();
|
|
431
|
+
}
|
|
432
|
+
try {
|
|
433
|
+
const serialized = JSON.stringify(err);
|
|
434
|
+
if (serialized && serialized !== '{}') {
|
|
435
|
+
return serialized.length > 180 ? `${serialized.slice(0, 177)}...` : serialized;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
catch {
|
|
439
|
+
// ignore serialization errors
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return '';
|
|
443
|
+
}
|
|
444
|
+
isSyncAlreadyInProgress(errorReason) {
|
|
445
|
+
const normalized = errorReason.toLowerCase();
|
|
446
|
+
return normalized.includes('sync is already in progress');
|
|
447
|
+
}
|
|
321
448
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
322
449
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects }); }
|
|
323
450
|
};
|
|
@@ -330,23 +457,54 @@ var spxUpdateCheck_effects = /*#__PURE__*/Object.freeze({
|
|
|
330
457
|
Effects: Effects$1
|
|
331
458
|
});
|
|
332
459
|
|
|
333
|
-
var spxUpdateCheck_state = /*#__PURE__*/Object.freeze({
|
|
334
|
-
__proto__: null
|
|
335
|
-
});
|
|
336
|
-
|
|
337
460
|
class Effects {
|
|
338
|
-
constructor(
|
|
339
|
-
this.actions$ =
|
|
461
|
+
constructor() {
|
|
462
|
+
this.actions$ = inject(Actions);
|
|
463
|
+
this.appStore = inject(Store);
|
|
464
|
+
this.translateService = inject(TranslateService);
|
|
340
465
|
this.whenAccepted$ = createEffect(() => this.actions$.pipe(ofType(SpxUpdatePendingActions.acceptUpdate), tap(() => {
|
|
341
|
-
void LiveUpdate.reload()
|
|
466
|
+
void LiveUpdate.reload().catch((err) => {
|
|
467
|
+
const errorReason = this.getReadableErrorReason(err);
|
|
468
|
+
captureMessage(`[UPD] Accept reload failed: ${errorReason}`);
|
|
469
|
+
this.appStore.dispatch(spxToasterActions.createError({
|
|
470
|
+
autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
|
|
471
|
+
messageText: errorReason
|
|
472
|
+
? this.translateService.instant(spxTextLiveUpdateCheckFailedWithReason, { reason: errorReason })
|
|
473
|
+
: this.translateService.instant(spxTextLiveUpdateCheckFailed),
|
|
474
|
+
}));
|
|
475
|
+
});
|
|
342
476
|
})), { dispatch: false });
|
|
343
477
|
}
|
|
344
|
-
|
|
478
|
+
getReadableErrorReason(err) {
|
|
479
|
+
if (err instanceof Error && err.message?.trim()) {
|
|
480
|
+
return err.message.trim();
|
|
481
|
+
}
|
|
482
|
+
if (typeof err === 'string' && err.trim()) {
|
|
483
|
+
return err.trim();
|
|
484
|
+
}
|
|
485
|
+
if (err && typeof err === 'object') {
|
|
486
|
+
const withMessage = err;
|
|
487
|
+
if (typeof withMessage.message === 'string' && withMessage.message.trim()) {
|
|
488
|
+
return withMessage.message.trim();
|
|
489
|
+
}
|
|
490
|
+
try {
|
|
491
|
+
const serialized = JSON.stringify(err);
|
|
492
|
+
if (serialized && serialized !== '{}') {
|
|
493
|
+
return serialized.length > 180 ? `${serialized.slice(0, 177)}...` : serialized;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
catch {
|
|
497
|
+
// ignore serialization errors
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return '';
|
|
501
|
+
}
|
|
502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
345
503
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects }); }
|
|
346
504
|
}
|
|
347
505
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, decorators: [{
|
|
348
506
|
type: Injectable
|
|
349
|
-
}]
|
|
507
|
+
}] });
|
|
350
508
|
|
|
351
509
|
var spxUpdatePending_effects = /*#__PURE__*/Object.freeze({
|
|
352
510
|
__proto__: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.html","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.html","../../../../projects/softpak/components/spx-update/spx-update-url.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.effects.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.effects.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { createActionGroup, emptyProps, props } from '@ngrx/store';\n\nexport const spxUpdateCheckActions = createActionGroup({\n source: 'SpxUpdateCheck',\n events: {\n anUpdateIsReady: emptyProps(),\n checkFailed: props<{ startUpdateAgainAfterTimeout?: boolean; }>(),\n clearError: emptyProps(),\n initialize: emptyProps(),\n noUpdateWasFound: props<{ startUpdateAgainAfterTimeout?: boolean; }>(),\n notAvailableOnWeb: emptyProps(),\n runCheck: props<{ forceWaitForUpdate?: boolean }>(),\n },\n});\n","import { StateI } from \"./spx-update-check.state\";\n\nexport const initialState: StateI = {\n forceWaitForUpdate: false,\n lastCheck: null,\n showError: false,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { DateTime } from 'luxon';\nimport { StateI } from './spx-update-check.state';\nimport { initialState } from './spx-update-check.initial';\nimport { spxUpdateCheckActions } from './spx-update-check.actions';\n\nexport default createFeature({\n name: 'spxUpdateCheck',\n reducer: createReducer(\n initialState,\n on(spxUpdateCheckActions.anUpdateIsReady, (state: StateI): StateI => {\n return {\n ...state,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(spxUpdateCheckActions.clearError, (state: StateI): StateI => {\n return {\n ...state,\n showError: false,\n };\n }),\n on(spxUpdateCheckActions.checkFailed, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n showError: true,\n };\n }),\n on(spxUpdateCheckActions.noUpdateWasFound, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(spxUpdateCheckActions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate\n };\n }),\n on(spxUpdateCheckActions.notAvailableOnWeb, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false\n };\n }),\n ),\n});\n","import { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\nimport {\n spxTextCheckingForUpdates,\n spxTextOneMomentPlease,\n spxTextUpdateAppVersion,\n spxTextUpdateBinaryVersionGroup,\n spxTextUpdateBuildVersion,\n spxTextUpdateLiveBundle,\n spxTextUpdateLiveChannel,\n spxTextUpdateStatus,\n spxTextUpdateStatusCompleted,\n spxTextUpdateStatusFailed,\n spxTextUpdateStatusPreparing,\n spxTextUpdateStatusSyncing,\n spxTextUpdateVersionInfo\n} from '@softpak/components/spx-translate';\n\nimport { ActivatedRoute } from '@angular/router';\nimport { App } from '@capacitor/app';\nimport { Component, computed, effect, signal } from '@angular/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { Store } from '@ngrx/store';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { spxUpdateCheckActions } from './store/spx-update-check/spx-update-check.actions';\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\n\n@Component({\n selector: 'spx-update-page',\n imports: [\n IonContent,\n IonHeader,\n IonToolbar,\n IonTitle,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-page.component.html`,\n standalone: true,\n})\nexport class SpxUpdatePageComponent {\n appVersion = signal<string>('-');\n binaryVersionGroup = signal<string>('-');\n buildVersion = signal<string>('-');\n forceWaitForUpdate = this.appStore.selectSignal(updCheck.selectForceWaitForUpdate);\n hasStarted = signal<boolean>(false);\n liveBundle = signal<string>('-');\n liveUpdateChannel = signal<string>('-');\n spxTextCheckingForUpdates = spxTextCheckingForUpdates;\n spxTextOneMomentPlease = spxTextOneMomentPlease;\n spxTextUpdateAppVersion = spxTextUpdateAppVersion;\n spxTextUpdateBinaryVersionGroup = spxTextUpdateBinaryVersionGroup;\n spxTextUpdateBuildVersion = spxTextUpdateBuildVersion;\n spxTextUpdateLiveBundle = spxTextUpdateLiveBundle;\n spxTextUpdateLiveChannel = spxTextUpdateLiveChannel;\n spxTextUpdateStatus = spxTextUpdateStatus;\n spxTextUpdateVersionInfo = spxTextUpdateVersionInfo;\n statusText = computed(() => {\n if (!this.hasStarted()) {\n return spxTextUpdateStatusPreparing;\n }\n if (this.showError()) {\n return spxTextUpdateStatusFailed;\n }\n if (this.forceWaitForUpdate()) {\n return spxTextUpdateStatusSyncing;\n }\n return spxTextUpdateStatusCompleted;\n });\n showError = this.appStore.selectSignal(updCheck.selectShowError);\n\n ngOnInit() {\n this.hasStarted.set(true);\n void this.loadVersionInfo();\n this.appStore.dispatch(spxUpdateCheckActions.runCheck({ forceWaitForUpdate: true }));\n }\n\n constructor(\n private readonly appStore: Store,\n private readonly activatedRoute: ActivatedRoute,\n private readonly navController: NavController,\n ) {\n effect(() => {\n if (!this.hasStarted() || this.forceWaitForUpdate()) {\n return;\n }\n if (this.activatedRoute.snapshot.data['url'] === undefined) {\n console.error('configure data property \\'url\\' in route for update page');\n }\n this.navController.navigateRoot(this.activatedRoute.snapshot.data['url']);\n });\n }\n\n private async loadVersionInfo(): Promise<void> {\n const appInfo = await App.getInfo();\n this.appVersion.set(appInfo.version || '-');\n this.buildVersion.set(appInfo.build || '-');\n this.binaryVersionGroup.set(SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup) || '-');\n this.liveUpdateChannel.set(SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel) || '-');\n this.liveBundle.set(SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdate) || '-');\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n <p>{{ spxTextOneMomentPlease | translate | capitalize }}...</p>\n <p class=\"mt-2\">\n <strong>{{ spxTextUpdateStatus | translate | capitalize }}:</strong>\n {{ statusText() | translate | capitalize }}\n </p>\n\n <div class=\"mt-6 text-sm text-zinc-600\">\n <p><strong>{{ spxTextUpdateVersionInfo | translate | capitalize }}</strong></p>\n <p>{{ spxTextUpdateAppVersion | translate | capitalize }}: {{ appVersion() }}</p>\n <p>{{ spxTextUpdateBuildVersion | translate | capitalize }}: {{ buildVersion() }}</p>\n <p>{{ spxTextUpdateBinaryVersionGroup | translate | capitalize }}: {{ binaryVersionGroup() }}</p>\n <p>{{ spxTextUpdateLiveChannel | translate | capitalize }}: {{ liveUpdateChannel() }}</p>\n <p>{{ spxTextUpdateLiveBundle | translate | capitalize }}: {{ liveBundle() }}</p>\n </div>\n</ion-content>\n","import { createActionGroup, emptyProps } from '@ngrx/store';\n\nexport const SpxUpdatePendingActions = createActionGroup({\n source: 'SpxUpdatePending',\n events: {\n AcceptUpdate: emptyProps(),\n HasBeenDownloaded: emptyProps(),\n HasBeenInstalled: emptyProps(),\n Postpone: emptyProps(),\n PostponeExpired: emptyProps(),\n },\n});\n","import { StateI } from \"./spx-update-pending.state\";\n\nexport const initialState: StateI = {\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { SpxUpdatePendingActions } from './spx-update-pending.actions';\nimport { StateI } from './spx-update-pending.state';\nimport { initialState } from './spx-update-pending.initial';\n\nexport default createFeature({\n name: 'spxUpdatePending',\n reducer: createReducer(\n initialState,\n on(SpxUpdatePendingActions.hasBeenDownloaded, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n updateIsDownloadedAndPending: true,\n };\n }),\n on(SpxUpdatePendingActions.hasBeenInstalled, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n };\n }),\n on(SpxUpdatePendingActions.postpone, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n };\n }),\n on(SpxUpdatePendingActions.postponeExpired, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n };\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, HostBinding, signal } from '@angular/core';\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser';\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\n\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxUpdatePendingActions } from './public-api';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\n\n@Component({\n selector: 'spx-update-pending',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-pending.component.html`,\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxUpdatePendingComponent {\n @HostBinding('style') baseStyle?: SafeStyle;\n availableStoreVersion = signal<undefined | string>(undefined);\n currentStoreVersion = signal<undefined | string>(undefined);\n severitySuccess = SpxSeverityEnum.success;\n showLiveUpdateReady = signal<boolean>(false);\n spxTextUpdate = spxTextUpdate;\n spxTextReadyToBeInstalled = spxTextReadyToBeInstalled;\n spxTextPatchAvailable = spxTextPatchAvailable;\n spxTextUpdateAvailable = spxTextUpdateAvailable;\n spxTextOpenAppStore = spxTextOpenAppStore;\n\n private subscriptions: {\n updPending?: Subscription;\n } = {};\n\n ngOnInit() {\n this.subscriptions.updPending = this.appStore.select(updPending.selectShowLiveUpdateReady).subscribe(showLiveUpdateReady => {\n this.showLiveUpdateReady.set(showLiveUpdateReady);\n if (showLiveUpdateReady) {\n this.baseStyle = this.sanitizer.bypassSecurityTrustStyle('display: block;');\n } else {\n this.baseStyle = this.sanitizer.bypassSecurityTrustStyle('display: none;');\n }\n });\n }\n\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n private sanitizer: DomSanitizer,\n ) {}\n\n onUpdate(): void {\n this.appStore.dispatch(SpxUpdatePendingActions.acceptUpdate());\n }\n}\n","@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}","export const spxUpdateUrl = '';","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Injectable, inject } from '@angular/core';\nimport { LiveUpdate, SyncResult } from '@capawesome/capacitor-live-update';\nimport { SpxToasterAutoCloseSpeedEnum, spxToasterActions } from '@softpak/components/spx-toaster';\nimport { Observable, from, of } from 'rxjs';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { catchError, delay, exhaustMap, map, mergeMap } from 'rxjs/operators';\n\nimport { App } from '@capacitor/app';\nimport { Capacitor } from '@capacitor/core';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { getBinaryVersionGroup } from '@softpak/components/spx-helpers';\nimport { SpxUpdatePendingActions } from '../spx-update-pending/spx-update-pending.actions';\nimport { TranslateService } from '@ngx-translate/core';\nimport { captureMessage } from '@sentry/angular';\nimport { spxTextLiveUpdateCheckFailed } from '@softpak/components/spx-translate';\nimport { spxUpdateCheckActions } from './spx-update-check.actions';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n private readonly translateService = inject(TranslateService);\n\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.initialize),\n delay(120000),\n mergeMap(() => [\n spxUpdateCheckActions.runCheck({}),\n ]))\n );\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.runCheck),\n exhaustMap((action) => {\n if (Capacitor.getPlatform() === 'web') {\n return of(spxUpdateCheckActions.notAvailableOnWeb());\n }\n return from(App.getInfo()).pipe(\n mergeMap((binaryInfo) => {\n // Migrate from e.g. 1.2.x to 1.3.x\n const binaryVersionGroup = getBinaryVersionGroup(binaryInfo.version);\n let channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType);\n\n if (SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup)) {\n SpxStorage.setSetting(SpxStorageKeyEnum.lastBinaryVersionGroup, SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup)!);\n }\n\n SpxStorage.setSetting(SpxStorageKeyEnum.binaryVersionGroup, `${binaryVersionGroup}.x`);\n SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdateChannel, `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`);\n // End migrate from e.g. 1.2.x to 1.3.x\n\n return from(LiveUpdate.sync({ channel: SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel)! }));\n }),\n map((syncResult: SyncResult) => {\n if (syncResult.nextBundleId) {\n if (action.forceWaitForUpdate) {\n SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.nextBundleId as string);\n LiveUpdate.reload();\n }\n return spxUpdateCheckActions.anUpdateIsReady();\n } else {\n return spxUpdateCheckActions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });\n }\n }),\n catchError((err) => {\n captureMessage(\"[UPD] Handled: \" + err.message);\n return of(spxUpdateCheckActions.checkFailed({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }));\n })\n );\n }),\n ));\n\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.anUpdateIsReady),\n mergeMap(() => [\n SpxUpdatePendingActions.hasBeenDownloaded(),\n ]))\n );\n\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.checkFailed),\n delay(30000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n spxUpdateCheckActions.runCheck({}),\n ]))\n );\n\n whenCheckHasFailedShowError$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.checkFailed),\n map(() => spxToasterActions.createError({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: this.translateService.instant(spxTextLiveUpdateCheckFailed),\n })),\n ));\n\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.noUpdateWasFound),\n delay(120000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n spxUpdateCheckActions.runCheck({}),\n ]))\n );\n}\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\n\nimport { Injectable } from '@angular/core';\nimport { LiveUpdate } from \"@capawesome/capacitor-live-update\";\nimport { SpxUpdatePendingActions } from './spx-update-pending.actions';\nimport { tap } from 'rxjs/operators';\n\n@Injectable()\nexport class Effects {\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAccepted$ = createEffect(() => this.actions$.pipe(\n ofType(SpxUpdatePendingActions.acceptUpdate),\n tap(() => {\n void LiveUpdate.reload();\n }),\n ), { dispatch: false });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["initialState","i2","Effects","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AACrD,IAAA,MAAM,EAAE,gBAAgB;AACxB,IAAA,MAAM,EAAE;QACN,eAAe,EAAE,UAAU,EAAE;QAC7B,WAAW,EAAE,KAAK,EAA+C;QACjE,UAAU,EAAE,UAAU,EAAE;QACxB,UAAU,EAAE,UAAU,EAAE;QACxB,gBAAgB,EAAE,KAAK,EAA+C;QACtE,iBAAiB,EAAE,UAAU,EAAE;QAC/B,QAAQ,EA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A,EAAAC,IAAA,CAAA,OAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;;;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.state.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.html","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.html","../../../../projects/softpak/components/spx-update/spx-update-url.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.effects.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.effects.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { createActionGroup, emptyProps, props } from '@ngrx/store';\n\nexport const spxUpdateCheckActions = createActionGroup({\n source: 'SpxUpdateCheck',\n events: {\n anUpdateIsReady: emptyProps(),\n checkFailed: props<{ errorReason?: string; startUpdateAgainAfterTimeout?: boolean; }>(),\n clearError: emptyProps(),\n initialize: emptyProps(),\n noUpdateWasFound: props<{ startUpdateAgainAfterTimeout?: boolean; }>(),\n notAvailableOnWeb: emptyProps(),\n reloadStarted: emptyProps(),\n runCheck: props<{ forceWaitForUpdate?: boolean }>(),\n syncStarted: emptyProps(),\n },\n});\n","export enum SpxUpdateCheckStatusEnum {\n failed = 'failed',\n idle = 'idle',\n notAvailableOnWeb = 'notAvailableOnWeb',\n preparing = 'preparing',\n reloading = 'reloading',\n syncing = 'syncing',\n upToDate = 'upToDate',\n updateReady = 'updateReady',\n}\n\nexport interface StateI {\n forceWaitForUpdate: boolean;\n lastErrorReason: string | null;\n lastCheck: string | null;\n showError: boolean;\n status: SpxUpdateCheckStatusEnum;\n}\n","import { SpxUpdateCheckStatusEnum, StateI } from \"./spx-update-check.state\";\n\nexport const initialState: StateI = {\n forceWaitForUpdate: false,\n lastErrorReason: null,\n lastCheck: null,\n showError: false,\n status: SpxUpdateCheckStatusEnum.idle,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { DateTime } from 'luxon';\nimport { SpxUpdateCheckStatusEnum, StateI } from './spx-update-check.state';\nimport { initialState } from './spx-update-check.initial';\nimport { spxUpdateCheckActions } from './spx-update-check.actions';\n\nexport default createFeature({\n name: 'spxUpdateCheck',\n reducer: createReducer(\n initialState,\n on(spxUpdateCheckActions.anUpdateIsReady, (state: StateI): StateI => {\n return {\n ...state,\n lastCheck: DateTime.now().toISO(),\n lastErrorReason: null,\n showError: false,\n status: SpxUpdateCheckStatusEnum.updateReady,\n };\n }),\n on(spxUpdateCheckActions.clearError, (state: StateI): StateI => {\n return {\n ...state,\n lastErrorReason: null,\n showError: false,\n };\n }),\n on(spxUpdateCheckActions.checkFailed, (state: StateI, { errorReason }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastErrorReason: errorReason || null,\n showError: true,\n status: SpxUpdateCheckStatusEnum.failed,\n };\n }),\n on(spxUpdateCheckActions.noUpdateWasFound, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastCheck: DateTime.now().toISO(),\n lastErrorReason: null,\n showError: false,\n status: SpxUpdateCheckStatusEnum.upToDate,\n };\n }),\n on(spxUpdateCheckActions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate,\n lastErrorReason: null,\n showError: false,\n status: SpxUpdateCheckStatusEnum.preparing,\n };\n }),\n on(spxUpdateCheckActions.syncStarted, (state: StateI): StateI => {\n return {\n ...state,\n status: SpxUpdateCheckStatusEnum.syncing,\n };\n }),\n on(spxUpdateCheckActions.reloadStarted, (state: StateI): StateI => {\n return {\n ...state,\n status: SpxUpdateCheckStatusEnum.reloading,\n };\n }),\n on(spxUpdateCheckActions.notAvailableOnWeb, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n status: SpxUpdateCheckStatusEnum.notAvailableOnWeb,\n };\n }),\n ),\n});\n","import { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\nimport {\n spxTextCheckingForUpdates,\n spxTextOneMomentPlease,\n spxTextUpdateErrorReason,\n spxTextUpdateAppVersion,\n spxTextUpdateBinaryVersionGroup,\n spxTextUpdateBuildVersion,\n spxTextUpdateLastCheck,\n spxTextUpdateLiveBundle,\n spxTextUpdateLiveChannel,\n spxTextUpdateStatus,\n spxTextUpdateStatusCompleted,\n spxTextUpdateStatusFailed,\n spxTextUpdateStatusPreparing,\n spxTextUpdateStatusReloading,\n spxTextUpdateStatusSyncing,\n spxTextUpdateStatusUpdateReady,\n spxTextUpdateStatusUpToDate,\n spxTextUpdateStatusWebNotAvailable,\n spxTextUpdateVersionInfo\n} from '@softpak/components/spx-translate';\n\nimport { ActivatedRoute } from '@angular/router';\nimport { App } from '@capacitor/app';\nimport { Component, computed, effect, signal } from '@angular/core';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { getBinaryVersionGroup } from '@softpak/components/spx-helpers';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { Store } from '@ngrx/store';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { spxUpdateCheckActions } from './store/spx-update-check/spx-update-check.actions';\nimport { SpxUpdateCheckStatusEnum } from './store/spx-update-check/spx-update-check.state';\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\n\n@Component({\n selector: 'spx-update-page',\n imports: [\n IonContent,\n IonHeader,\n IonToolbar,\n IonTitle,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-page.component.html`,\n standalone: true,\n})\nexport class SpxUpdatePageComponent {\n appVersion = signal<string>('-');\n binaryVersionGroup = signal<string>('-');\n buildVersion = signal<string>('-');\n lastCheck = this.appStore.selectSignal(updCheck.selectLastCheck);\n lastErrorReason = this.appStore.selectSignal(updCheck.selectLastErrorReason);\n forceWaitForUpdate = this.appStore.selectSignal(updCheck.selectForceWaitForUpdate);\n hasStarted = signal<boolean>(false);\n liveBundle = signal<string>('-');\n liveUpdateChannel = signal<string>('-');\n status = this.appStore.selectSignal(updCheck.selectStatus);\n spxTextCheckingForUpdates = spxTextCheckingForUpdates;\n spxTextOneMomentPlease = spxTextOneMomentPlease;\n spxTextUpdateErrorReason = spxTextUpdateErrorReason;\n spxTextUpdateAppVersion = spxTextUpdateAppVersion;\n spxTextUpdateBinaryVersionGroup = spxTextUpdateBinaryVersionGroup;\n spxTextUpdateBuildVersion = spxTextUpdateBuildVersion;\n spxTextUpdateLastCheck = spxTextUpdateLastCheck;\n spxTextUpdateLiveBundle = spxTextUpdateLiveBundle;\n spxTextUpdateLiveChannel = spxTextUpdateLiveChannel;\n spxTextUpdateStatus = spxTextUpdateStatus;\n spxTextUpdateVersionInfo = spxTextUpdateVersionInfo;\n statusText = computed(() => {\n switch (this.status()) {\n case SpxUpdateCheckStatusEnum.idle:\n return spxTextUpdateStatusPreparing;\n case SpxUpdateCheckStatusEnum.preparing:\n return spxTextUpdateStatusPreparing;\n case SpxUpdateCheckStatusEnum.syncing:\n return spxTextUpdateStatusSyncing;\n case SpxUpdateCheckStatusEnum.reloading:\n return spxTextUpdateStatusReloading;\n case SpxUpdateCheckStatusEnum.upToDate:\n return spxTextUpdateStatusUpToDate;\n case SpxUpdateCheckStatusEnum.updateReady:\n return spxTextUpdateStatusUpdateReady;\n case SpxUpdateCheckStatusEnum.failed:\n return spxTextUpdateStatusFailed;\n case SpxUpdateCheckStatusEnum.notAvailableOnWeb:\n return spxTextUpdateStatusWebNotAvailable;\n default:\n return spxTextUpdateStatusCompleted;\n }\n });\n showError = this.appStore.selectSignal(updCheck.selectShowError);\n\n ngOnInit() {\n this.hasStarted.set(true);\n void this.loadVersionInfo();\n this.appStore.dispatch(spxUpdateCheckActions.runCheck({ forceWaitForUpdate: true }));\n }\n\n constructor(\n private readonly appStore: Store,\n private readonly activatedRoute: ActivatedRoute,\n private readonly navController: NavController,\n ) {\n effect(() => {\n this.status();\n this.refreshStorageVersionInfo();\n });\n\n effect(() => {\n if (!this.hasStarted() || this.forceWaitForUpdate() || this.showError()) {\n return;\n }\n if (this.activatedRoute.snapshot.data['url'] === undefined) {\n console.error('configure data property \\'url\\' in route for update page');\n }\n this.navController.navigateRoot(this.activatedRoute.snapshot.data['url']);\n });\n }\n\n private async loadVersionInfo(): Promise<void> {\n const appInfo = await App.getInfo();\n const appVersion = appInfo.version || '-';\n this.appVersion.set(appVersion);\n this.buildVersion.set(appInfo.build || '-');\n\n try {\n const computedBinaryVersionGroup = `${getBinaryVersionGroup(appVersion)}.x`;\n const storedBinaryVersionGroup = SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup);\n this.binaryVersionGroup.set(storedBinaryVersionGroup || computedBinaryVersionGroup);\n\n const storedLiveUpdateChannel = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel);\n const channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType) || SpxAppChannelTypeEnum.production;\n this.liveUpdateChannel.set(storedLiveUpdateChannel || `${channelType}-${computedBinaryVersionGroup}`);\n } catch {\n this.binaryVersionGroup.set(SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup) || '-');\n this.liveUpdateChannel.set(SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel) || '-');\n }\n\n this.refreshStorageVersionInfo();\n }\n\n private refreshStorageVersionInfo(): void {\n const storedBinaryVersionGroup = SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup);\n const storedLiveUpdateChannel = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel);\n const storedLiveBundle = SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdate);\n\n if (storedBinaryVersionGroup) {\n this.binaryVersionGroup.set(storedBinaryVersionGroup);\n }\n if (storedLiveUpdateChannel) {\n this.liveUpdateChannel.set(storedLiveUpdateChannel);\n }\n this.liveBundle.set(storedLiveBundle || '-');\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n <p>{{ spxTextOneMomentPlease | translate | capitalize }}...</p>\n <p class=\"mt-2\">\n <strong>{{ spxTextUpdateStatus | translate | capitalize }}:</strong>\n {{ statusText() | translate | capitalize }}\n </p>\n @if (lastErrorReason()) {\n <p class=\"mt-2 text-red-700\">\n <strong>{{ spxTextUpdateErrorReason | translate | capitalize }}:</strong>\n {{ lastErrorReason() }}\n </p>\n }\n @if (lastCheck()) {\n <p class=\"mt-1 text-sm text-zinc-600\">\n <strong>{{ spxTextUpdateLastCheck | translate | capitalize }}:</strong>\n {{ lastCheck() }}\n </p>\n }\n\n <div class=\"mt-6 text-sm text-zinc-600\">\n <p><strong>{{ spxTextUpdateVersionInfo | translate | capitalize }}</strong></p>\n <p>{{ spxTextUpdateAppVersion | translate | capitalize }}: {{ appVersion() }}</p>\n <p>{{ spxTextUpdateBuildVersion | translate | capitalize }}: {{ buildVersion() }}</p>\n <p>{{ spxTextUpdateBinaryVersionGroup | translate | capitalize }}: {{ binaryVersionGroup() }}</p>\n <p>{{ spxTextUpdateLiveChannel | translate | capitalize }}: {{ liveUpdateChannel() }}</p>\n <p>{{ spxTextUpdateLiveBundle | translate | capitalize }}: {{ liveBundle() }}</p>\n </div>\n</ion-content>\n","import { createActionGroup, emptyProps } from '@ngrx/store';\n\nexport const SpxUpdatePendingActions = createActionGroup({\n source: 'SpxUpdatePending',\n events: {\n AcceptUpdate: emptyProps(),\n HasBeenDownloaded: emptyProps(),\n HasBeenInstalled: emptyProps(),\n Postpone: emptyProps(),\n PostponeExpired: emptyProps(),\n },\n});\n","import { StateI } from \"./spx-update-pending.state\";\n\nexport const initialState: StateI = {\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { SpxUpdatePendingActions } from './spx-update-pending.actions';\nimport { StateI } from './spx-update-pending.state';\nimport { initialState } from './spx-update-pending.initial';\n\nexport default createFeature({\n name: 'spxUpdatePending',\n reducer: createReducer(\n initialState,\n on(SpxUpdatePendingActions.hasBeenDownloaded, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n updateIsDownloadedAndPending: true,\n };\n }),\n on(SpxUpdatePendingActions.hasBeenInstalled, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n };\n }),\n on(SpxUpdatePendingActions.postpone, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n };\n }),\n on(SpxUpdatePendingActions.postponeExpired, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n };\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, HostBinding, signal } from '@angular/core';\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser';\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\n\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxUpdatePendingActions } from './public-api';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\n\n@Component({\n selector: 'spx-update-pending',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-pending.component.html`,\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxUpdatePendingComponent {\n @HostBinding('style') baseStyle?: SafeStyle;\n availableStoreVersion = signal<undefined | string>(undefined);\n currentStoreVersion = signal<undefined | string>(undefined);\n severitySuccess = SpxSeverityEnum.success;\n showLiveUpdateReady = signal<boolean>(false);\n spxTextUpdate = spxTextUpdate;\n spxTextReadyToBeInstalled = spxTextReadyToBeInstalled;\n spxTextPatchAvailable = spxTextPatchAvailable;\n spxTextUpdateAvailable = spxTextUpdateAvailable;\n spxTextOpenAppStore = spxTextOpenAppStore;\n\n private subscriptions: {\n updPending?: Subscription;\n } = {};\n\n ngOnInit() {\n this.subscriptions.updPending = this.appStore.select(updPending.selectShowLiveUpdateReady).subscribe(showLiveUpdateReady => {\n this.showLiveUpdateReady.set(showLiveUpdateReady);\n if (showLiveUpdateReady) {\n this.baseStyle = this.sanitizer.bypassSecurityTrustStyle('display: block;');\n } else {\n this.baseStyle = this.sanitizer.bypassSecurityTrustStyle('display: none;');\n }\n });\n }\n\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n private sanitizer: DomSanitizer,\n ) {}\n\n onUpdate(): void {\n this.appStore.dispatch(SpxUpdatePendingActions.acceptUpdate());\n }\n}\n","@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}","export const spxUpdateUrl = '';","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Injectable, inject } from '@angular/core';\nimport { LiveUpdate, SyncResult } from '@capawesome/capacitor-live-update';\nimport { SpxToasterAutoCloseSpeedEnum, spxToasterActions } from '@softpak/components/spx-toaster';\nimport { Observable, concat, from, of, timer } from 'rxjs';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { catchError, delay, exhaustMap, map, mergeMap } from 'rxjs/operators';\n\nimport { App } from '@capacitor/app';\nimport { Capacitor } from '@capacitor/core';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { getBinaryVersionGroup } from '@softpak/components/spx-helpers';\nimport { SpxUpdatePendingActions } from '../spx-update-pending/spx-update-pending.actions';\nimport { TranslateService } from '@ngx-translate/core';\nimport { captureMessage } from '@sentry/angular';\nimport { spxTextLiveUpdateCheckFailed, spxTextLiveUpdateCheckFailedWithReason } from '@softpak/components/spx-translate';\nimport { spxUpdateCheckActions } from './spx-update-check.actions';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n private readonly translateService = inject(TranslateService);\n\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.initialize),\n delay(120000),\n mergeMap(() => [\n spxUpdateCheckActions.runCheck({}),\n ]))\n );\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.runCheck),\n exhaustMap((action) => {\n if (Capacitor.getPlatform() === 'web') {\n return of(spxUpdateCheckActions.notAvailableOnWeb());\n }\n return concat(\n of(spxUpdateCheckActions.syncStarted()),\n from(App.getInfo()).pipe(\n mergeMap((binaryInfo) => {\n // Migrate from e.g. 1.2.x to 1.3.x\n const binaryVersionGroup = getBinaryVersionGroup(binaryInfo.version);\n const channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType);\n\n if (SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup)) {\n SpxStorage.setSetting(SpxStorageKeyEnum.lastBinaryVersionGroup, SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup)!);\n }\n\n SpxStorage.setSetting(SpxStorageKeyEnum.binaryVersionGroup, `${binaryVersionGroup}.x`);\n SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdateChannel, `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`);\n // End migrate from e.g. 1.2.x to 1.3.x\n\n return from(LiveUpdate.sync({ channel: SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel)! }));\n }),\n mergeMap((syncResult: SyncResult) => {\n if (syncResult.nextBundleId) {\n SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.nextBundleId as string);\n if (action.forceWaitForUpdate) {\n return concat(\n of(spxUpdateCheckActions.reloadStarted()),\n from(LiveUpdate.reload()).pipe(\n map(() => spxUpdateCheckActions.anUpdateIsReady()),\n catchError((err) => {\n const errorReason = this.getReadableErrorReason(err);\n captureMessage(`[UPD] Reload failed: ${errorReason}`);\n return of(spxUpdateCheckActions.checkFailed({\n errorReason,\n startUpdateAgainAfterTimeout: false,\n }));\n }),\n ),\n );\n }\n return of(spxUpdateCheckActions.anUpdateIsReady());\n } else {\n return of(spxUpdateCheckActions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }));\n }\n }),\n catchError((err) => {\n const errorReason = this.getReadableErrorReason(err);\n if (this.isSyncAlreadyInProgress(errorReason)) {\n return timer(1500).pipe(\n map(() => spxUpdateCheckActions.runCheck({ forceWaitForUpdate: action.forceWaitForUpdate })),\n );\n }\n captureMessage(`[UPD] Handled: ${errorReason}`);\n return of(spxUpdateCheckActions.checkFailed({\n errorReason,\n startUpdateAgainAfterTimeout: false,\n }));\n })\n )\n );\n }),\n ));\n\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.anUpdateIsReady),\n mergeMap(() => [\n SpxUpdatePendingActions.hasBeenDownloaded(),\n ]))\n );\n\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.checkFailed),\n delay(30000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n spxUpdateCheckActions.runCheck({}),\n ]))\n );\n\n whenCheckHasFailedShowError$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.checkFailed),\n map((action) => spxToasterActions.createError({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.errorReason\n ? this.translateService.instant(spxTextLiveUpdateCheckFailedWithReason, { reason: action.errorReason })\n : this.translateService.instant(spxTextLiveUpdateCheckFailed),\n })),\n ));\n\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(spxUpdateCheckActions.noUpdateWasFound),\n delay(120000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n spxUpdateCheckActions.runCheck({}),\n ]))\n );\n\n private getReadableErrorReason(err: unknown): string {\n if (err instanceof Error && err.message?.trim()) {\n return err.message.trim();\n }\n if (typeof err === 'string' && err.trim()) {\n return err.trim();\n }\n if (err && typeof err === 'object') {\n const withMessage = err as { message?: unknown };\n if (typeof withMessage.message === 'string' && withMessage.message.trim()) {\n return withMessage.message.trim();\n }\n try {\n const serialized = JSON.stringify(err);\n if (serialized && serialized !== '{}') {\n return serialized.length > 180 ? `${serialized.slice(0, 177)}...` : serialized;\n }\n } catch {\n // ignore serialization errors\n }\n }\n return '';\n }\n\n private isSyncAlreadyInProgress(errorReason: string): boolean {\n const normalized = errorReason.toLowerCase();\n return normalized.includes('sync is already in progress');\n }\n}\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\n\nimport { Injectable, inject } from '@angular/core';\nimport { LiveUpdate } from \"@capawesome/capacitor-live-update\";\nimport { SpxToasterAutoCloseSpeedEnum, spxToasterActions } from '@softpak/components/spx-toaster';\nimport { SpxUpdatePendingActions } from './spx-update-pending.actions';\nimport { Store } from '@ngrx/store';\nimport { TranslateService } from '@ngx-translate/core';\nimport { captureMessage } from '@sentry/angular';\nimport { spxTextLiveUpdateCheckFailed, spxTextLiveUpdateCheckFailedWithReason } from '@softpak/components/spx-translate';\nimport { tap } from 'rxjs/operators';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n private readonly appStore = inject(Store);\n private readonly translateService = inject(TranslateService);\n\n whenAccepted$ = createEffect(() => this.actions$.pipe(\n ofType(SpxUpdatePendingActions.acceptUpdate),\n tap(() => {\n void LiveUpdate.reload().catch((err) => {\n const errorReason = this.getReadableErrorReason(err);\n captureMessage(`[UPD] Accept reload failed: ${errorReason}`);\n this.appStore.dispatch(spxToasterActions.createError({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: errorReason\n ? this.translateService.instant(spxTextLiveUpdateCheckFailedWithReason, { reason: errorReason })\n : this.translateService.instant(spxTextLiveUpdateCheckFailed),\n }));\n });\n }),\n ), { dispatch: false });\n\n private getReadableErrorReason(err: unknown): string {\n if (err instanceof Error && err.message?.trim()) {\n return err.message.trim();\n }\n if (typeof err === 'string' && err.trim()) {\n return err.trim();\n }\n if (err && typeof err === 'object') {\n const withMessage = err as { message?: unknown };\n if (typeof withMessage.message === 'string' && withMessage.message.trim()) {\n return withMessage.message.trim();\n }\n try {\n const serialized = JSON.stringify(err);\n if (serialized && serialized !== '{}') {\n return serialized.length > 180 ? `${serialized.slice(0, 177)}...` : serialized;\n }\n } catch {\n // ignore serialization errors\n }\n }\n return '';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["initialState","i2","Effects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AACrD,IAAA,MAAM,EAAE,gBAAgB;AACxB,IAAA,MAAM,EAAE;QACN,eAAe,EAAE,UAAU,EAAE;QAC7B,WAAW,EAAE,KAAK,EAAqE;QACvF,UAAU,EAAE,UAAU,EAAE;QACxB,UAAU,EAAE,UAAU,EAAE;QACxB,gBAAgB,EAAE,KAAK,EAA+C;QACtE,iBAAiB,EAAE,UAAU,EAAE;QAC/B,aAAa,EAAE,UAAU,EAAE;QAC3B,QAAQ,EAAE,KAAK,EAAoC;QACnD,WAAW,EAAE,UAAU,EAAE;AAC1B,KAAA;AACF,CAAA;;ACfD,IAAY,wBASX;AATD,CAAA,UAAY,wBAAwB,EAAA;AAChC,IAAA,wBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,wBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,wBAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;AACvC,IAAA,wBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,wBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,wBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,wBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,wBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC/B,CAAC,EATW,wBAAwB,KAAxB,wBAAwB,GAAA,EAAA,CAAA,CAAA;;;;;;;ACE7B,MAAMA,cAAY,GAAW;AAChC,IAAA,kBAAkB,E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