@softpak/components 19.1.0-beta.1 → 19.1.0-beta.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.
Files changed (34) hide show
  1. package/fesm2022/softpak-components-spx-helpers.mjs +9 -1
  2. package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
  3. package/fesm2022/softpak-components-spx-translate.mjs +34 -0
  4. package/fesm2022/softpak-components-spx-translate.mjs.map +1 -0
  5. package/fesm2022/softpak-components-spx-update.mjs +340 -111
  6. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  7. package/package.json +13 -13
  8. package/spx-helpers/public-api.d.ts +1 -0
  9. package/spx-helpers/unsubscribe-subscriptions.function.d.ts +1 -0
  10. package/{spx-app-update → spx-translate}/index.d.ts +1 -1
  11. package/spx-translate/public-api.d.ts +3 -0
  12. package/spx-translate/spx-translate._const.d.ts +16 -0
  13. package/spx-translate/spx-translate.en.d.ts +2 -0
  14. package/spx-translate/spx-translate.nl.d.ts +2 -0
  15. package/spx-update/public-api.d.ts +12 -2
  16. package/spx-update/spx-upd-page.component.d.ts +17 -0
  17. package/spx-update/spx-upd-pending.component.d.ts +28 -0
  18. package/spx-update/store/upd-check/upd-check.actions.d.ts +28 -0
  19. package/spx-update/store/upd-check/upd-check.effects.d.ts +14 -0
  20. package/spx-update/store/upd-check/upd-check.initial.d.ts +2 -0
  21. package/spx-update/store/upd-check/upd-check.reducer.d.ts +10 -0
  22. package/spx-update/store/upd-check/upd-check.state.d.ts +5 -0
  23. package/spx-update/store/upd-pending/upd-pending.actions.d.ts +8 -0
  24. package/spx-update/store/upd-pending/upd-pending.effects.d.ts +10 -0
  25. package/spx-update/store/upd-pending/upd-pending.initial.d.ts +2 -0
  26. package/spx-update/store/upd-pending/upd-pending.reducer.d.ts +9 -0
  27. package/spx-update/store/upd-pending/upd-pending.state.d.ts +4 -0
  28. package/tailwind.css +1 -1
  29. package/fesm2022/softpak-components-spx-app-update.mjs +0 -329
  30. package/fesm2022/softpak-components-spx-app-update.mjs.map +0 -1
  31. package/spx-app-update/public-api.d.ts +0 -1
  32. package/spx-app-update/spx-app-update.component.d.ts +0 -49
  33. package/spx-update/src/spx-update-info.component.d.ts +0 -18
  34. package/spx-update/src/spx-update-progress.component.d.ts +0 -14
@@ -1,329 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Input } from '@angular/core';
3
- import * as i3 from '@angular/forms';
4
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import * as i2 from '@ngx-translate/core';
6
- import { TranslateModule } from '@ngx-translate/core';
7
- import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
8
- import { SpxInputComponent } from '@softpak/components/spx-inputs';
9
- import { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';
10
- import { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';
11
- import { Device } from '@capacitor/device';
12
- import { getCurrentScope } from '@sentry/angular';
13
- import * as i4 from '@ionic/angular/standalone';
14
- import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
15
- import * as i1 from 'cordova-plugin-ionic/dist/ngx';
16
-
17
- const ctrlNextVersionNumber = 'ctrlNextVersionNumber';
18
- const ctrlVersionNumber = 'ctrlVersionNumber';
19
- const ctrlConfiguredChannel = 'ctrlConfiguredChannel';
20
- const ctrlAppStoreVersion = 'ctrlAppStoreVersion';
21
- class SpxAppUpdateComponent {
22
- constructor(deploy, changeDetector, applicationRef, translateService, formBuilder, navController) {
23
- this.deploy = deploy;
24
- this.changeDetector = changeDetector;
25
- this.applicationRef = applicationRef;
26
- this.translateService = translateService;
27
- this.formBuilder = formBuilder;
28
- this.navController = navController;
29
- this.delayedPercentage = 0;
30
- this.percentage = 0;
31
- this.syncTruckInterval = null;
32
- this.updateStatus = this.textCheckingForUpdates;
33
- this.form = this.formBuilder.group({
34
- [ctrlNextVersionNumber]: [null, []],
35
- [ctrlVersionNumber]: [null, []],
36
- [ctrlConfiguredChannel]: [null, []],
37
- [ctrlAppStoreVersion]: [null, []],
38
- });
39
- }
40
- get ctrlVersionNumber() { return this.form.get(ctrlVersionNumber); }
41
- get ctrlNextVersionNumber() { return this.form.get(ctrlNextVersionNumber); }
42
- get ctrlConfiguredChannel() { return this.form.get(ctrlConfiguredChannel); }
43
- get ctrlAppStoreVersion() { return this.form.get(ctrlAppStoreVersion); }
44
- init() {
45
- this.delayedPercentage = 0;
46
- this.percentage = 0;
47
- this.performAutomaticUpdate().then(() => { });
48
- this.startLoaderSync();
49
- this.changeStatus({
50
- percentage: 0,
51
- text: this.translateService.instant(this.textCheckingForUpdates),
52
- });
53
- }
54
- destroy() {
55
- this.stopLoaderSync();
56
- }
57
- async performAutomaticUpdate() {
58
- const deviceInfo = await Device.getInfo();
59
- if (deviceInfo?.platform === 'web') {
60
- // Local? Skip the update page.
61
- this.closeUpdateScreen();
62
- }
63
- try {
64
- this.updateInfo();
65
- // Start upgrade
66
- const currentVersion = await this.deploy.getCurrentVersion();
67
- if (currentVersion?.binaryVersionName) {
68
- const binaryGroup = currentVersion.binaryVersionName.substring(0, 3); // e.g. "1.4"
69
- const channelGroup = currentVersion.channel.split('-')[1].substring(0, 3); // e.g. "1.4"
70
- const channelType = currentVersion.channel.split('-')[0];
71
- if (binaryGroup != channelGroup) {
72
- await this.deploy.configure({
73
- appId: this.spxAppId,
74
- channel: `${channelType}-${binaryGroup}.x`
75
- }).then(() => {
76
- this.sync().then(() => { });
77
- });
78
- }
79
- else {
80
- this.sync().then(() => { });
81
- }
82
- }
83
- else {
84
- this.sync().then(() => { });
85
- }
86
- // End upgrade
87
- }
88
- catch (error) {
89
- this.changeStatus({
90
- closeScreen: true,
91
- error,
92
- percentage: 100,
93
- text: this.translateService.instant(this.textUnexpectedError)
94
- });
95
- }
96
- }
97
- async sync() {
98
- try {
99
- this.updateInfo();
100
- const updateAvailableInfo = await this.deploy.checkForUpdate();
101
- if (!updateAvailableInfo.available) {
102
- // No update available
103
- this.changeStatus({
104
- closeScreen: true,
105
- percentage: 0,
106
- text: this.translateService.instant(this.textNoUpdatesAvailable),
107
- });
108
- }
109
- else {
110
- // Download update
111
- await this.deploy.sync({ updateMethod: 'auto' }, (percentage) => {
112
- this.changeStatus({
113
- percentage: percentage ?? 0,
114
- text: this.translateService.instant(this.textDownloadingUpdate, { percentage, version: updateAvailableInfo.build }),
115
- });
116
- }).catch((error) => {
117
- this.changeStatus({
118
- closeScreen: true,
119
- error,
120
- percentage: 100,
121
- text: this.translateService.instant(this.textErrorWhileUpdatingApp),
122
- });
123
- });
124
- this.changeStatus({
125
- closeScreen: true,
126
- percentage: 100,
127
- text: this.translateService.instant(this.textFinishedUpdating, { version: updateAvailableInfo.build })
128
- });
129
- }
130
- }
131
- catch (error) {
132
- // Catch unexpected plug-in errors
133
- this.changeStatus({
134
- closeScreen: true,
135
- error,
136
- percentage: 100,
137
- text: this.translateService.instant(this.textUnexpectedError)
138
- });
139
- }
140
- }
141
- async updateInfo() {
142
- const currentVersion = await this.deploy.getCurrentVersion();
143
- const configuration = await this.deploy.getConfiguration();
144
- const updateAvailableInfo = await this.deploy.checkForUpdate();
145
- if (currentVersion) {
146
- this.ctrlVersionNumber.setValue({
147
- value: configuration?.currentBuildId,
148
- });
149
- this.ctrlNextVersionNumber.setValue({
150
- value: updateAvailableInfo?.build
151
- });
152
- this.ctrlConfiguredChannel.setValue({
153
- value: configuration ? configuration.channel : null
154
- });
155
- this.ctrlAppStoreVersion.setValue({
156
- value: configuration ? configuration.binaryVersionName : null
157
- });
158
- {
159
- const scope = getCurrentScope();
160
- scope.setTag('version_binary_code', currentVersion?.binaryVersionCode);
161
- scope.setTag('version_binary_name', currentVersion?.binaryVersionName);
162
- scope.setTag('version_build_id', currentVersion?.buildId);
163
- scope.setTag('channel_type', currentVersion?.channel);
164
- scope.setTag('version_snapshot_id', currentVersion?.versionId);
165
- }
166
- ;
167
- this.changeDetector.markForCheck();
168
- this.applicationRef.tick();
169
- }
170
- }
171
- changeStatus(status) {
172
- this.updateStatus = status.text;
173
- this.percentage = status.percentage;
174
- if (status.closeScreen) {
175
- this.closeUpdateScreen();
176
- }
177
- if (status.error) {
178
- // this.appStore.dispatch(
179
- // sharedToasterActions.CREATE_ERROR({
180
- // messageText: status.error,
181
- // })
182
- // );
183
- }
184
- this.changeDetector.markForCheck();
185
- this.applicationRef.tick();
186
- }
187
- closeUpdateScreen() {
188
- // Allowing some time to make a screenshot of version info
189
- SpxStorage.clearSetting(SpxStorageKeyEnum.updateInProgress);
190
- setTimeout(() => {
191
- if (SpxStorage.getSetting(SpxStorageKeyEnum.afterSignIn) &&
192
- this.spxIsSignedIn) {
193
- this.navController.navigateRoot([SpxStorage.getSetting(SpxStorageKeyEnum.afterSignIn)]);
194
- SpxStorage.clearSetting(SpxStorageKeyEnum.afterSignIn);
195
- }
196
- else {
197
- this.navController.navigateRoot([this.spxHomeUrl]);
198
- }
199
- }, 0);
200
- }
201
- startLoaderSync() {
202
- SpxStorage.setSetting(SpxStorageKeyEnum.updateInProgress, '1');
203
- if (this.syncTruckInterval === null) {
204
- this.syncTruckInterval = setInterval(() => {
205
- this.delayedPercentage = this.percentage;
206
- }, 200);
207
- }
208
- }
209
- stopLoaderSync() {
210
- if (this.syncTruckInterval !== null) {
211
- clearInterval(this.syncTruckInterval);
212
- this.syncTruckInterval = null;
213
- }
214
- }
215
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxAppUpdateComponent, deps: [{ token: i1.Deploy }, { token: i0.ChangeDetectorRef }, { token: i0.ApplicationRef }, { token: i2.TranslateService }, { token: i3.FormBuilder }, { token: i4.NavController }], target: i0.ɵɵFactoryTarget.Component }); }
216
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxAppUpdateComponent, isStandalone: true, selector: "spx-app-update", inputs: { spxHomeUrl: "spxHomeUrl", spxIsSignedIn: "spxIsSignedIn", textCheckingForUpdates: "textCheckingForUpdates", textDownloadingUpdate: "textDownloadingUpdate", textErrorWhileUpdatingApp: "textErrorWhileUpdatingApp", textFinishedUpdating: "textFinishedUpdating", textNoUpdatesAvailable: "textNoUpdatesAvailable", textUnexpectedError: "textUnexpectedError", txtAppStoreVersion: "txtAppStoreVersion", txtChannel: "txtChannel", txtNextVersion: "txtNextVersion", txtUpdate: "txtUpdate", txtVersion: "txtVersion", spxAppId: "spxAppId" }, ngImport: i0, template: `<ion-header>
217
- <ion-toolbar>
218
- <ion-title>
219
- {{ txtUpdate | translate | capitalize }}
220
- </ion-title>
221
- </ion-toolbar>
222
- </ion-header>
223
-
224
- <ion-content class="ion-content--upd" [fullscreen]="true">
225
- <div class="ion-padding">
226
- <spx-progress-bar [spxPercentage]="delayedPercentage" [spxTitle]="updateStatus | capitalize">
227
- </spx-progress-bar>
228
- <form [formGroup]="form" class="mt-3">
229
- @if (ctrlAppStoreVersion.value && ctrlAppStoreVersion.value.value) {
230
- <div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3">
231
- <spx-input [formControl]="ctrlAppStoreVersion" [spxLabel]="txtAppStoreVersion | translate | capitalize"
232
- [spxReadonly]="true"></spx-input>
233
- <spx-input [formControl]="ctrlConfiguredChannel" [spxLabel]="txtChannel | translate | capitalize"
234
- [spxReadonly]="true"></spx-input>
235
- <spx-input [formControl]="ctrlVersionNumber" [spxLabel]="txtVersion | translate | capitalize"
236
- [spxReadonly]="true"></spx-input>
237
- @if (ctrlNextVersionNumber.value && ctrlNextVersionNumber.value.value) {
238
- <spx-input [formControl]="ctrlNextVersionNumber" [spxLabel]="txtNextVersion | translate | capitalize"
239
- [spxReadonly]="true"></spx-input>
240
- }
241
- </div>
242
- }
243
- </form>
244
- </div>
245
- </ion-content>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }, { kind: "component", type: SpxProgressBarComponent, selector: "spx-progress-bar", inputs: ["spxPercentage", "spxTitle"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
246
- }
247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxAppUpdateComponent, decorators: [{
248
- type: Component,
249
- args: [{
250
- selector: 'spx-app-update',
251
- imports: [
252
- FormsModule,
253
- IonHeader,
254
- IonToolbar,
255
- IonTitle,
256
- IonContent,
257
- ReactiveFormsModule,
258
- SpxCapitalizePipe,
259
- SpxInputComponent,
260
- SpxProgressBarComponent,
261
- TranslateModule
262
- ],
263
- template: `<ion-header>
264
- <ion-toolbar>
265
- <ion-title>
266
- {{ txtUpdate | translate | capitalize }}
267
- </ion-title>
268
- </ion-toolbar>
269
- </ion-header>
270
-
271
- <ion-content class="ion-content--upd" [fullscreen]="true">
272
- <div class="ion-padding">
273
- <spx-progress-bar [spxPercentage]="delayedPercentage" [spxTitle]="updateStatus | capitalize">
274
- </spx-progress-bar>
275
- <form [formGroup]="form" class="mt-3">
276
- @if (ctrlAppStoreVersion.value && ctrlAppStoreVersion.value.value) {
277
- <div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3">
278
- <spx-input [formControl]="ctrlAppStoreVersion" [spxLabel]="txtAppStoreVersion | translate | capitalize"
279
- [spxReadonly]="true"></spx-input>
280
- <spx-input [formControl]="ctrlConfiguredChannel" [spxLabel]="txtChannel | translate | capitalize"
281
- [spxReadonly]="true"></spx-input>
282
- <spx-input [formControl]="ctrlVersionNumber" [spxLabel]="txtVersion | translate | capitalize"
283
- [spxReadonly]="true"></spx-input>
284
- @if (ctrlNextVersionNumber.value && ctrlNextVersionNumber.value.value) {
285
- <spx-input [formControl]="ctrlNextVersionNumber" [spxLabel]="txtNextVersion | translate | capitalize"
286
- [spxReadonly]="true"></spx-input>
287
- }
288
- </div>
289
- }
290
- </form>
291
- </div>
292
- </ion-content>`
293
- }]
294
- }], ctorParameters: () => [{ type: i1.Deploy }, { type: i0.ChangeDetectorRef }, { type: i0.ApplicationRef }, { type: i2.TranslateService }, { type: i3.FormBuilder }, { type: i4.NavController }], propDecorators: { spxHomeUrl: [{
295
- type: Input
296
- }], spxIsSignedIn: [{
297
- type: Input
298
- }], textCheckingForUpdates: [{
299
- type: Input
300
- }], textDownloadingUpdate: [{
301
- type: Input
302
- }], textErrorWhileUpdatingApp: [{
303
- type: Input
304
- }], textFinishedUpdating: [{
305
- type: Input
306
- }], textNoUpdatesAvailable: [{
307
- type: Input
308
- }], textUnexpectedError: [{
309
- type: Input
310
- }], txtAppStoreVersion: [{
311
- type: Input
312
- }], txtChannel: [{
313
- type: Input
314
- }], txtNextVersion: [{
315
- type: Input
316
- }], txtUpdate: [{
317
- type: Input
318
- }], txtVersion: [{
319
- type: Input
320
- }], spxAppId: [{
321
- type: Input
322
- }] } });
323
-
324
- /**
325
- * Generated bundle index. Do not edit.
326
- */
327
-
328
- export { SpxAppUpdateComponent };
329
- //# sourceMappingURL=softpak-components-spx-app-update.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"softpak-components-spx-app-update.mjs","sources":["../../../../projects/softpak/components/spx-app-update/spx-app-update.component.ts","../../../../projects/softpak/components/spx-app-update/softpak-components-spx-app-update.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport { ApplicationRef, ChangeDetectorRef, Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxInputComponent } from '@softpak/components/spx-inputs';\nimport { SpxProgressBarComponent } from '@softpak/components/spx-progress-bar';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { Device } from '@capacitor/device';\nimport { Deploy } from 'cordova-plugin-ionic/dist/ngx';\nimport { getCurrentScope } from '@sentry/angular';\nimport { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\n\nconst ctrlNextVersionNumber = 'ctrlNextVersionNumber';\nconst ctrlVersionNumber = 'ctrlVersionNumber';\nconst ctrlConfiguredChannel = 'ctrlConfiguredChannel';\nconst ctrlAppStoreVersion = 'ctrlAppStoreVersion';\n\n@Component({\n selector: 'spx-app-update',\n imports: [\n FormsModule,\n IonHeader,\n IonToolbar,\n IonTitle,\n IonContent,\n ReactiveFormsModule,\n SpxCapitalizePipe,\n SpxInputComponent,\n SpxProgressBarComponent,\n TranslateModule\n ],\n template: `<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ txtUpdate | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n </ion-header>\n \n <ion-content class=\"ion-content--upd\" [fullscreen]=\"true\">\n <div class=\"ion-padding\">\n <spx-progress-bar [spxPercentage]=\"delayedPercentage\" [spxTitle]=\"updateStatus | capitalize\">\n </spx-progress-bar>\n <form [formGroup]=\"form\" class=\"mt-3\">\n @if (ctrlAppStoreVersion.value && ctrlAppStoreVersion.value.value) {\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"ctrlAppStoreVersion\" [spxLabel]=\"txtAppStoreVersion | translate | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlConfiguredChannel\" [spxLabel]=\"txtChannel | translate | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n <spx-input [formControl]=\"ctrlVersionNumber\" [spxLabel]=\"txtVersion | translate | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n @if (ctrlNextVersionNumber.value && ctrlNextVersionNumber.value.value) {\n <spx-input [formControl]=\"ctrlNextVersionNumber\" [spxLabel]=\"txtNextVersion | translate | capitalize\"\n [spxReadonly]=\"true\"></spx-input>\n }\n </div>\n }\n </form>\n </div>\n </ion-content>`\n})\nexport class SpxAppUpdateComponent {\n @Input() spxHomeUrl!: string;\n @Input() spxIsSignedIn!: boolean;\n @Input() textCheckingForUpdates!: string;\n @Input() textDownloadingUpdate!: string;\n @Input() textErrorWhileUpdatingApp!: string;\n @Input() textFinishedUpdating!: string;\n @Input() textNoUpdatesAvailable!: string;\n @Input() textUnexpectedError!: string;\n @Input() txtAppStoreVersion!: string;\n @Input() txtChannel!: string;\n @Input() txtNextVersion!: string;\n @Input() txtUpdate!: string;\n @Input() txtVersion!: string;\n @Input() spxAppId!: string;\n\n form: FormGroup;\n\n delayedPercentage: number = 0;\n percentage: number = 0;\n syncTruckInterval: any | null = null;\n updateStatus: string = this.textCheckingForUpdates;\n\n constructor(\n private readonly deploy: Deploy,\n private readonly changeDetector: ChangeDetectorRef,\n private readonly applicationRef: ApplicationRef,\n private readonly translateService: TranslateService,\n private readonly formBuilder: FormBuilder,\n private readonly navController: NavController,\n ) {\n this.form = this.formBuilder.group({\n [ctrlNextVersionNumber]: [null, []],\n [ctrlVersionNumber]: [null, []],\n [ctrlConfiguredChannel]: [null, []],\n [ctrlAppStoreVersion]: [null, []],\n });\n }\n\n get ctrlVersionNumber(): FormControl { return this.form.get(ctrlVersionNumber) as FormControl; }\n get ctrlNextVersionNumber(): FormControl { return this.form.get(ctrlNextVersionNumber) as FormControl; }\n get ctrlConfiguredChannel(): FormControl { return this.form.get(ctrlConfiguredChannel) as FormControl; }\n get ctrlAppStoreVersion(): FormControl { return this.form.get(ctrlAppStoreVersion) as FormControl; }\n\n init() {\n this.delayedPercentage = 0;\n this.percentage = 0;\n this.performAutomaticUpdate().then(() => { });\n this.startLoaderSync();\n this.changeStatus({\n percentage: 0,\n text: this.translateService.instant(this.textCheckingForUpdates),\n });\n }\n\n destroy() {\n this.stopLoaderSync();\n }\n\n async performAutomaticUpdate() {\n const deviceInfo = await Device.getInfo();\n\n if (deviceInfo?.platform === 'web') {\n // Local? Skip the update page.\n this.closeUpdateScreen();\n }\n try {\n this.updateInfo();\n\n // Start upgrade\n const currentVersion = await this.deploy.getCurrentVersion();\n if (currentVersion?.binaryVersionName) {\n const binaryGroup = currentVersion.binaryVersionName.substring(0, 3); // e.g. \"1.4\"\n const channelGroup = currentVersion.channel.split('-')[1].substring(0, 3); // e.g. \"1.4\"\n const channelType = currentVersion.channel.split('-')[0];\n\n if (binaryGroup != channelGroup) {\n await this.deploy.configure({\n appId: this.spxAppId,\n channel: `${channelType}-${binaryGroup}.x`\n }).then(() => {\n this.sync().then(() => { });\n });\n } else {\n this.sync().then(() => { });\n }\n } else {\n this.sync().then(() => { });\n }\n // End upgrade\n } catch (error: any) {\n this.changeStatus({\n closeScreen: true,\n error,\n percentage: 100,\n text: this.translateService.instant(this.textUnexpectedError)\n });\n }\n }\n\n private async sync() {\n try {\n this.updateInfo();\n\n const updateAvailableInfo = await this.deploy.checkForUpdate();\n if (!updateAvailableInfo.available) {\n // No update available\n this.changeStatus({\n closeScreen: true,\n percentage: 0,\n text: this.translateService.instant(this.textNoUpdatesAvailable),\n });\n } else {\n // Download update\n await this.deploy.sync({ updateMethod: 'auto' }, (percentage) => {\n this.changeStatus({\n percentage: percentage ?? 0,\n text: this.translateService.instant(this.textDownloadingUpdate, { percentage, version: updateAvailableInfo.build }),\n });\n }).catch((error) => {\n this.changeStatus({\n closeScreen: true,\n error,\n percentage: 100,\n text: this.translateService.instant(this.textErrorWhileUpdatingApp),\n });\n });\n\n this.changeStatus({\n closeScreen: true,\n percentage: 100,\n text: this.translateService.instant(this.textFinishedUpdating, { version: updateAvailableInfo.build })\n });\n }\n } catch (error: any) {\n // Catch unexpected plug-in errors\n this.changeStatus({\n closeScreen: true,\n error,\n percentage: 100,\n text: this.translateService.instant(this.textUnexpectedError)\n });\n }\n }\n\n private async updateInfo(): Promise<void> {\n const currentVersion = await this.deploy.getCurrentVersion();\n const configuration = await this.deploy.getConfiguration();\n const updateAvailableInfo = await this.deploy.checkForUpdate();\n\n if (currentVersion) {\n this.ctrlVersionNumber.setValue({\n value: configuration?.currentBuildId,\n });\n this.ctrlNextVersionNumber.setValue({\n value: updateAvailableInfo?.build\n });\n this.ctrlConfiguredChannel.setValue({\n value: configuration ? configuration.channel : null\n });\n this.ctrlAppStoreVersion.setValue({\n value: configuration ? configuration.binaryVersionName : null\n });\n\n {\n const scope = getCurrentScope();\n scope.setTag('version_binary_code', currentVersion?.binaryVersionCode);\n scope.setTag('version_binary_name', currentVersion?.binaryVersionName);\n scope.setTag('version_build_id', currentVersion?.buildId);\n scope.setTag('channel_type', currentVersion?.channel);\n scope.setTag('version_snapshot_id', currentVersion?.versionId);\n };\n\n this.changeDetector.markForCheck();\n this.applicationRef.tick();\n }\n }\n\n private changeStatus(status: {\n error?: string;\n text: string;\n closeScreen?: boolean;\n percentage: number;\n }) {\n this.updateStatus = status.text;\n this.percentage = status.percentage;\n if (status.closeScreen) {\n this.closeUpdateScreen();\n }\n if (status.error) {\n // this.appStore.dispatch(\n // sharedToasterActions.CREATE_ERROR({\n // messageText: status.error,\n // })\n // );\n }\n this.changeDetector.markForCheck();\n this.applicationRef.tick();\n }\n\n private closeUpdateScreen() {\n // Allowing some time to make a screenshot of version info\n SpxStorage.clearSetting<any>(SpxStorageKeyEnum.updateInProgress);\n setTimeout(() => {\n if (\n SpxStorage.getSetting<any>(SpxStorageKeyEnum.afterSignIn) &&\n this.spxIsSignedIn\n ) {\n this.navController.navigateRoot([SpxStorage.getSetting<any>(SpxStorageKeyEnum.afterSignIn)]);\n SpxStorage.clearSetting<any>(SpxStorageKeyEnum.afterSignIn)\n } else {\n this.navController.navigateRoot([this.spxHomeUrl]);\n }\n }, 0);\n }\n\n private startLoaderSync() {\n SpxStorage.setSetting<any>(SpxStorageKeyEnum.updateInProgress, '1');\n if (this.syncTruckInterval === null) {\n this.syncTruckInterval = setInterval(() => {\n this.delayedPercentage = this.percentage;\n }, 200);\n }\n }\n\n private stopLoaderSync() {\n if (this.syncTruckInterval !== null) {\n clearInterval(this.syncTruckInterval);\n this.syncTruckInterval = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAM,qBAAqB,GAAG,uBAAuB;AACrD,MAAM,iBAAiB,GAAG,mBAAmB;AAC7C,MAAM,qBAAqB,GAAG,uBAAuB;AACrD,MAAM,mBAAmB,GAAG,qBAAqB;MA+CpC,qBAAqB,CAAA;IAuBhC,WACmB,CAAA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aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAiCV,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBA7CjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,SAAS;wBACT,UAAU;wBACV,QAAQ;wBACR,UAAU;wBACV,mBAAmB;wBACnB,iBAAiB;wBACjB,iBAAiB;wBACjB,uBAAuB;wBACvB;AACH,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG,gBAAA;AAChB,iBAAA;6NAEU,UAAU,EAAA,CAAA;sBAAlB;gBACQ,aAAa,EAAA,CAAA;sBAArB;gBACQ,sBAAsB,EAAA,CAAA;sBAA9B;gBACQ,qBAAqB,EAAA,CAAA;sBAA7B;gBACQ,yBAAyB,EAAA,CAAA;sBAAjC;gBACQ,oBAAoB,EAAA,CAAA;sBAA5B;gBACQ,sBAAsB,EAAA,CAAA;sBAA9B;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,kBAAkB,EAAA,CAAA;sBAA1B;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,cAAc,EAAA,CAAA;sBAAtB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;;;AC7EH;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- export * from './spx-app-update.component';
@@ -1,49 +0,0 @@
1
- import { ApplicationRef, ChangeDetectorRef } from '@angular/core';
2
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
- import { TranslateService } from '@ngx-translate/core';
4
- import { Deploy } from 'cordova-plugin-ionic/dist/ngx';
5
- import { NavController } from '@ionic/angular/standalone';
6
- import * as i0 from "@angular/core";
7
- export declare class SpxAppUpdateComponent {
8
- private readonly deploy;
9
- private readonly changeDetector;
10
- private readonly applicationRef;
11
- private readonly translateService;
12
- private readonly formBuilder;
13
- private readonly navController;
14
- spxHomeUrl: string;
15
- spxIsSignedIn: boolean;
16
- textCheckingForUpdates: string;
17
- textDownloadingUpdate: string;
18
- textErrorWhileUpdatingApp: string;
19
- textFinishedUpdating: string;
20
- textNoUpdatesAvailable: string;
21
- textUnexpectedError: string;
22
- txtAppStoreVersion: string;
23
- txtChannel: string;
24
- txtNextVersion: string;
25
- txtUpdate: string;
26
- txtVersion: string;
27
- spxAppId: string;
28
- form: FormGroup;
29
- delayedPercentage: number;
30
- percentage: number;
31
- syncTruckInterval: any | null;
32
- updateStatus: string;
33
- constructor(deploy: Deploy, changeDetector: ChangeDetectorRef, applicationRef: ApplicationRef, translateService: TranslateService, formBuilder: FormBuilder, navController: NavController);
34
- get ctrlVersionNumber(): FormControl;
35
- get ctrlNextVersionNumber(): FormControl;
36
- get ctrlConfiguredChannel(): FormControl;
37
- get ctrlAppStoreVersion(): FormControl;
38
- init(): void;
39
- destroy(): void;
40
- performAutomaticUpdate(): Promise<void>;
41
- private sync;
42
- private updateInfo;
43
- private changeStatus;
44
- private closeUpdateScreen;
45
- private startLoaderSync;
46
- private stopLoaderSync;
47
- static ɵfac: i0.ɵɵFactoryDeclaration<SpxAppUpdateComponent, never>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<SpxAppUpdateComponent, "spx-app-update", never, { "spxHomeUrl": { "alias": "spxHomeUrl"; "required": false; }; "spxIsSignedIn": { "alias": "spxIsSignedIn"; "required": false; }; "textCheckingForUpdates": { "alias": "textCheckingForUpdates"; "required": false; }; "textDownloadingUpdate": { "alias": "textDownloadingUpdate"; "required": false; }; "textErrorWhileUpdatingApp": { "alias": "textErrorWhileUpdatingApp"; "required": false; }; "textFinishedUpdating": { "alias": "textFinishedUpdating"; "required": false; }; "textNoUpdatesAvailable": { "alias": "textNoUpdatesAvailable"; "required": false; }; "textUnexpectedError": { "alias": "textUnexpectedError"; "required": false; }; "txtAppStoreVersion": { "alias": "txtAppStoreVersion"; "required": false; }; "txtChannel": { "alias": "txtChannel"; "required": false; }; "txtNextVersion": { "alias": "txtNextVersion"; "required": false; }; "txtUpdate": { "alias": "txtUpdate"; "required": false; }; "txtVersion": { "alias": "txtVersion"; "required": false; }; "spxAppId": { "alias": "spxAppId"; "required": false; }; }, {}, never, never, true, never>;
49
- }
@@ -1,18 +0,0 @@
1
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
2
- import * as i0 from "@angular/core";
3
- export declare class SpxUpdateInfoComponent {
4
- private readonly formBuilder;
5
- form: FormGroup;
6
- txtAppStoreVersion: string;
7
- txtChannel: string;
8
- txtNextVersion: string;
9
- txtVersion: string;
10
- get ctrlVersionNumber(): FormControl;
11
- get ctrlNextVersionNumber(): FormControl;
12
- get ctrlConfiguredChannel(): FormControl;
13
- get ctrlAppStoreVersion(): FormControl;
14
- constructor(formBuilder: FormBuilder);
15
- update(appStoreVersion: string, channel: string, nextVersion: string, version: string): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<SpxUpdateInfoComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<SpxUpdateInfoComponent, "spx-update-info", never, { "txtAppStoreVersion": { "alias": "txtAppStoreVersion"; "required": false; }; "txtChannel": { "alias": "txtChannel"; "required": false; }; "txtNextVersion": { "alias": "txtNextVersion"; "required": false; }; "txtVersion": { "alias": "txtVersion"; "required": false; }; }, {}, never, never, true, never>;
18
- }
@@ -1,14 +0,0 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class SpxUpdateProgressComponent implements OnInit, OnDestroy {
4
- title: string;
5
- percentage: number;
6
- delayedPercentage: number;
7
- syncTruckInterval?: any;
8
- ngOnInit(): void;
9
- ngOnDestroy(): void;
10
- private startLoaderSync;
11
- private stopLoaderSync;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<SpxUpdateProgressComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<SpxUpdateProgressComponent, "spx-update-progress", never, { "title": { "alias": "title"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; }, {}, never, never, true, never>;
14
- }