@softpak/components 21.2.0-capwesome.5 → 21.2.0-capwesome.6

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.
@@ -10,7 +10,7 @@ import { createActionGroup, props, createFeature, createReducer, on, createSelec
10
10
  import { TranslatePipe, TranslateService } from '@ngx-translate/core';
11
11
  import { map, of, from } from 'rxjs';
12
12
  import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
13
- import { spxTextChange, spxTextLiveUpdateChannelSetFailed } from '@softpak/components/spx-translate';
13
+ import { spxTextChange, spxTextLiveUpdateChannelSetFailedWithReason, spxTextLiveUpdateChannelSetFailed } from '@softpak/components/spx-translate';
14
14
  import { toSignal } from '@angular/core/rxjs-interop';
15
15
  import { Actions, createEffect, ofType } from '@ngrx/effects';
16
16
  import { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
@@ -166,29 +166,59 @@ class Effects {
166
166
  }
167
167
  return from(App.getInfo()).pipe(switchMap((binaryInfo) => from(LiveUpdate.setChannel({
168
168
  channel: `${action.channelType}-${getBinaryVersionGroup(binaryInfo.version)}.x`
169
- })).pipe(map$1(() => true), catchError((err) => {
170
- captureMessage(`SPX Channel setChannel Error: ${JSON.stringify(err)}`);
171
- return of(false);
169
+ })).pipe(map$1(() => ({ setChannelSucceeded: true })), catchError((err) => {
170
+ const errorReason = this.getReadableErrorReason(err);
171
+ captureMessage(`SPX Channel setChannel Error: ${errorReason}`);
172
+ return of({ errorReason, setChannelSucceeded: false });
172
173
  }))), tap(() => {
173
174
  this.router.navigate([spxUpdateUrl]);
174
- }), map$1((setChannelSucceeded) => setChannelSucceeded
175
+ }), map$1((result) => result.setChannelSucceeded
175
176
  ? spxToasterActions.createSuccess({
176
177
  autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
177
178
  messageText: action.channel?.brand,
178
179
  })
179
- : spxToasterActions.createWarning({
180
+ : spxToasterActions.createError({
180
181
  autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
181
- messageText: this.translateService.instant(spxTextLiveUpdateChannelSetFailed),
182
+ messageText: result.errorReason
183
+ ? this.translateService.instant(spxTextLiveUpdateChannelSetFailedWithReason, { reason: result.errorReason })
184
+ : this.translateService.instant(spxTextLiveUpdateChannelSetFailed),
182
185
  })), catchError((err) => {
183
- captureMessage(`SPX Channel Error: ${JSON.stringify(err)}`);
186
+ const errorReason = this.getReadableErrorReason(err);
187
+ captureMessage(`SPX Channel Error: ${errorReason}`);
184
188
  this.router.navigate([spxUpdateUrl]);
185
- return of(spxToasterActions.createWarning({
189
+ return of(spxToasterActions.createError({
186
190
  autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
187
- messageText: this.translateService.instant(spxTextLiveUpdateChannelSetFailed),
191
+ messageText: errorReason
192
+ ? this.translateService.instant(spxTextLiveUpdateChannelSetFailedWithReason, { reason: errorReason })
193
+ : this.translateService.instant(spxTextLiveUpdateChannelSetFailed),
188
194
  }));
189
195
  }));
190
196
  })), { dispatch: true });
191
197
  }
198
+ getReadableErrorReason(err) {
199
+ if (err instanceof Error && err.message?.trim()) {
200
+ return err.message.trim();
201
+ }
202
+ if (typeof err === 'string' && err.trim()) {
203
+ return err.trim();
204
+ }
205
+ if (err && typeof err === 'object') {
206
+ const withMessage = err;
207
+ if (typeof withMessage.message === 'string' && withMessage.message.trim()) {
208
+ return withMessage.message.trim();
209
+ }
210
+ try {
211
+ const serialized = JSON.stringify(err);
212
+ if (serialized && serialized !== '{}') {
213
+ return serialized.length > 180 ? `${serialized.slice(0, 177)}...` : serialized;
214
+ }
215
+ }
216
+ catch {
217
+ // ignore serialization errors
218
+ }
219
+ }
220
+ return '';
221
+ }
192
222
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
193
223
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects }); }
194
224
  }
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.actions.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.reducer.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.html","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-guard.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.effects.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { createActionGroup, props } from '@ngrx/store';\n\nexport const spxChannelActions = createActionGroup({\n source: 'SpxChannel',\n events: {\n Choose: props<{ channel: SpxAppChannelI; channelType: SpxAppChannelTypeEnum; }>(),\n Initialize: props<{ channels: SpxAppChannelI[]; }>(),\n },\n});\n","import { SpxAppChannelI, SpxAppChannelTypeEnum, SpxChannelTypeI } from '@softpak/components/spx-app-configuration';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { createFeature, createReducer, createSelector, on } from '@ngrx/store';\n\nimport { Capacitor } from '@capacitor/core';\nimport { spxChannelActions } from './spx-channel.actions';\n\nexport const initialState: StateI = {\n previousChannel: null,\n channel: null,\n channelType: null,\n channels: [],\n};\n\nexport interface StateI {\n previousChannel: SpxAppChannelI | null;\n channel: SpxAppChannelI | null;\n channels: SpxAppChannelI[];\n channelType: SpxChannelTypeI | null;\n}\n\nconst determineActiveChannel = (channels: SpxAppChannelI[]): SpxAppChannelI | null => {\n if (SpxStorage.getSetting(SpxStorageKeyEnum.brand) && SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n const channelResult = channels.find(channel => channel.brand === SpxStorage.getSetting(SpxStorageKeyEnum.brand) && channel.channelTypes.some((e: SpxChannelTypeI) => e.name === SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum));\n if (channelResult) {\n return channelResult;\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n } else {\n SpxStorage.clearSetting(SpxStorageKeyEnum.brand);\n return null;\n }\n }\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n }\n return null;\n }\n}\n\nexport default createFeature({\n name: 'spxChannel',\n extraSelectors: ({ selectChannel }) => ({\n selectCompanyName: createSelector(selectChannel, (channel) => channel?.brand),\n }),\n reducer: createReducer(\n initialState,\n on(spxChannelActions.choose, (state, { channel, channelType }): StateI => {\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand, channel?.brand);\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType, channelType);\n return {\n ...state,\n previousChannel: state.channel,\n channel,\n };\n }),\n on(spxChannelActions.initialize, (state, { channels }): StateI => {\n\n let channelType: SpxChannelTypeI | null = null;\n\n if (SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n channelType = { name: SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum };\n }\n else {\n channelType = { name: Capacitor.getPlatform() === 'web' ? SpxAppChannelTypeEnum.webLive : SpxAppChannelTypeEnum.production }; // Default to production if no type is set\n }\n\n return {\n ...state,\n channel: determineActiveChannel(channels),\n channels: channels.slice().sort((a, b) => a.brand.localeCompare(b.brand)),\n channelType: channelType,\n }\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\n\nimport { Capacitor } from '@capacitor/core';\nimport { NavController } from '@ionic/angular/standalone';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { Store } from '@ngrx/store';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { map } from 'rxjs';\nimport spxChannelReducer from '../../store/spx-channel.reducer';\nimport { spxTextChange } from '@softpak/components/spx-translate';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nexport const spxChannelSelectionUrl = 'wlc';\n\n@Component({\n selector: 'spx-channel-indicator',\n templateUrl: './spx-channel-indicator.component.html',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxChannelIndicatorComponent {\n private readonly navController = inject(NavController);\n private readonly store = inject(Store);\n protected readonly channel = this.store.selectSignal(spxChannelReducer.selectChannel);\n protected readonly channelType = toSignal(this.store.select(spxChannelReducer.selectChannelType).pipe(\n map(channelType => channelType?.name)\n ));\n protected readonly spxTextChange = spxTextChange;\n\n protected onChange() {\n this.navController.navigateRoot([spxChannelSelectionUrl]);\n }\n\n protected canShowChannelType() {\n return Capacitor.getPlatform() !== 'web';\n }\n}\n","<div class=\"bg-white p-3 rounded flex gap-3 items-center text-black\">\n <div class=\"grow\">\n <div class=\"text-lg font-bold\">{{ channel()?.brand }}</div>\n @if (canShowChannelType() && channelType() !== 'Production') {\n <div class=\"text-base text-gray-600\">{{ channelType() }}</div>\n }\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ spxTextChange | translate | capitalize }}</spx-button>\n</div>","import { Router } from '@angular/router';\nimport { inject, Injectable } from '@angular/core';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { spxChannelSelectionUrl } from './spx-channel-indicator/spx-channel-indicator.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SpxChannelGuard {\n\n private readonly router = inject(Router);\n\n canActivate(): boolean {\n if (\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand) ||\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType)\n ) {\n this.router.navigate([spxChannelSelectionUrl]);\n return false;\n }\n return true;\n }\n}\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Injectable, inject } from '@angular/core';\nimport { SpxToasterAutoCloseSpeedEnum, spxToasterActions } from '@softpak/components/spx-toaster';\n\nimport { App } from '@capacitor/app';\nimport { Capacitor } from '@capacitor/core';\nimport { LiveUpdate } from \"@capawesome/capacitor-live-update\";\nimport { Router } from '@angular/router';\nimport { captureMessage } from '@sentry/angular';\nimport { getBinaryVersionGroup } from '@softpak/components/spx-helpers';\nimport { spxChannelActions } from './spx-channel.actions';\nimport { spxUpdateUrl } from '@softpak/components/spx-update';\nimport { TranslateService } from '@ngx-translate/core';\nimport { spxTextLiveUpdateChannelSetFailed } from '@softpak/components/spx-translate';\nimport { from, of } from 'rxjs';\nimport { catchError, map, switchMap, tap } from 'rxjs/operators';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n private readonly router = inject(Router);\n private readonly translateService = inject(TranslateService);\n\n onChoose$ =\n createEffect(() =>\n this.actions$.pipe(\n ofType(spxChannelActions.choose),\n switchMap((action) => {\n if (Capacitor.getPlatform() === 'web') {\n const channelType = action.channel.channelTypes.find(channelType => channelType.name === action.channelType)!;\n if (channelType.webUrl && !window.location.href.includes('http://localhost') && window.location.href.replace(channelType.webUrl!, '').replace(channelType.oldWebUrl!, '').split('/').at(0) !== '') {\n window.location.href = channelType.webUrl!;\n } else {\n this.router.navigate(['tabs/hme']);\n }\n return of(spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n }));\n }\n return from(App.getInfo()).pipe(\n switchMap((binaryInfo) => from(LiveUpdate.setChannel({\n channel: `${action.channelType}-${getBinaryVersionGroup(binaryInfo.version)}.x`\n })).pipe(\n map(() => true),\n catchError((err) => {\n captureMessage(`SPX Channel setChannel Error: ${JSON.stringify(err)}`);\n return of(false);\n }),\n )),\n tap(() => {\n this.router.navigate([spxUpdateUrl]);\n }),\n map((setChannelSucceeded) => setChannelSucceeded\n ? spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n })\n : spxToasterActions.createWarning({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: this.translateService.instant(spxTextLiveUpdateChannelSetFailed),\n })),\n catchError((err) => {\n captureMessage(`SPX Channel Error: ${JSON.stringify(err)}`);\n this.router.navigate([spxUpdateUrl]);\n return of(spxToasterActions.createWarning({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: this.translateService.instant(spxTextLiveUpdateChannelSetFailed),\n }));\n }),\n );\n }),\n ), { dispatch: true });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxChannelReducer","map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AACjD,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,MAAM,EAAE;QACN,MAAM,EAAE,KAAK,EAAoE;QACjF,UAAU,EAAE,KAAK,EAAmC;AACrD,KAAA;AACF,CAAA;;ACFM,MAAM,YAAY,GAAW;AAClC,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,EAAE;CACb;AASD,MAAM,sBAAsB,GAAG,CAAC,QAA0B,KAA2B;AACnF,IAAA,IAAI,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;QAC1G,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,KAAK,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,Y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A,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.actions.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.reducer.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.html","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-guard.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.effects.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { createActionGroup, props } from '@ngrx/store';\n\nexport const spxChannelActions = createActionGroup({\n source: 'SpxChannel',\n events: {\n Choose: props<{ channel: SpxAppChannelI; channelType: SpxAppChannelTypeEnum; }>(),\n Initialize: props<{ channels: SpxAppChannelI[]; }>(),\n },\n});\n","import { SpxAppChannelI, SpxAppChannelTypeEnum, SpxChannelTypeI } from '@softpak/components/spx-app-configuration';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { createFeature, createReducer, createSelector, on } from '@ngrx/store';\n\nimport { Capacitor } from '@capacitor/core';\nimport { spxChannelActions } from './spx-channel.actions';\n\nexport const initialState: StateI = {\n previousChannel: null,\n channel: null,\n channelType: null,\n channels: [],\n};\n\nexport interface StateI {\n previousChannel: SpxAppChannelI | null;\n channel: SpxAppChannelI | null;\n channels: SpxAppChannelI[];\n channelType: SpxChannelTypeI | null;\n}\n\nconst determineActiveChannel = (channels: SpxAppChannelI[]): SpxAppChannelI | null => {\n if (SpxStorage.getSetting(SpxStorageKeyEnum.brand) && SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n const channelResult = channels.find(channel => channel.brand === SpxStorage.getSetting(SpxStorageKeyEnum.brand) && channel.channelTypes.some((e: SpxChannelTypeI) => e.name === SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum));\n if (channelResult) {\n return channelResult;\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n } else {\n SpxStorage.clearSetting(SpxStorageKeyEnum.brand);\n return null;\n }\n }\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n }\n return null;\n }\n}\n\nexport default createFeature({\n name: 'spxChannel',\n extraSelectors: ({ selectChannel }) => ({\n selectCompanyName: createSelector(selectChannel, (channel) => channel?.brand),\n }),\n reducer: createReducer(\n initialState,\n on(spxChannelActions.choose, (state, { channel, channelType }): StateI => {\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand, channel?.brand);\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType, channelType);\n return {\n ...state,\n previousChannel: state.channel,\n channel,\n };\n }),\n on(spxChannelActions.initialize, (state, { channels }): StateI => {\n\n let channelType: SpxChannelTypeI | null = null;\n\n if (SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n channelType = { name: SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum };\n }\n else {\n channelType = { name: Capacitor.getPlatform() === 'web' ? SpxAppChannelTypeEnum.webLive : SpxAppChannelTypeEnum.production }; // Default to production if no type is set\n }\n\n return {\n ...state,\n channel: determineActiveChannel(channels),\n channels: channels.slice().sort((a, b) => a.brand.localeCompare(b.brand)),\n channelType: channelType,\n }\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\n\nimport { Capacitor } from '@capacitor/core';\nimport { NavController } from '@ionic/angular/standalone';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { Store } from '@ngrx/store';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { map } from 'rxjs';\nimport spxChannelReducer from '../../store/spx-channel.reducer';\nimport { spxTextChange } from '@softpak/components/spx-translate';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nexport const spxChannelSelectionUrl = 'wlc';\n\n@Component({\n selector: 'spx-channel-indicator',\n templateUrl: './spx-channel-indicator.component.html',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxChannelIndicatorComponent {\n private readonly navController = inject(NavController);\n private readonly store = inject(Store);\n protected readonly channel = this.store.selectSignal(spxChannelReducer.selectChannel);\n protected readonly channelType = toSignal(this.store.select(spxChannelReducer.selectChannelType).pipe(\n map(channelType => channelType?.name)\n ));\n protected readonly spxTextChange = spxTextChange;\n\n protected onChange() {\n this.navController.navigateRoot([spxChannelSelectionUrl]);\n }\n\n protected canShowChannelType() {\n return Capacitor.getPlatform() !== 'web';\n }\n}\n","<div class=\"bg-white p-3 rounded flex gap-3 items-center text-black\">\n <div class=\"grow\">\n <div class=\"text-lg font-bold\">{{ channel()?.brand }}</div>\n @if (canShowChannelType() && channelType() !== 'Production') {\n <div class=\"text-base text-gray-600\">{{ channelType() }}</div>\n }\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ spxTextChange | translate | capitalize }}</spx-button>\n</div>","import { Router } from '@angular/router';\nimport { inject, Injectable } from '@angular/core';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { spxChannelSelectionUrl } from './spx-channel-indicator/spx-channel-indicator.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SpxChannelGuard {\n\n private readonly router = inject(Router);\n\n canActivate(): boolean {\n if (\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand) ||\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType)\n ) {\n this.router.navigate([spxChannelSelectionUrl]);\n return false;\n }\n return true;\n }\n}\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Injectable, inject } from '@angular/core';\nimport { SpxToasterAutoCloseSpeedEnum, spxToasterActions } from '@softpak/components/spx-toaster';\n\nimport { App } from '@capacitor/app';\nimport { Capacitor } from '@capacitor/core';\nimport { LiveUpdate } from \"@capawesome/capacitor-live-update\";\nimport { Router } from '@angular/router';\nimport { captureMessage } from '@sentry/angular';\nimport { getBinaryVersionGroup } from '@softpak/components/spx-helpers';\nimport { spxChannelActions } from './spx-channel.actions';\nimport { spxUpdateUrl } from '@softpak/components/spx-update';\nimport { TranslateService } from '@ngx-translate/core';\nimport { spxTextLiveUpdateChannelSetFailed, spxTextLiveUpdateChannelSetFailedWithReason } from '@softpak/components/spx-translate';\nimport { from, of } from 'rxjs';\nimport { catchError, map, switchMap, tap } from 'rxjs/operators';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n private readonly router = inject(Router);\n private readonly translateService = inject(TranslateService);\n\n onChoose$ =\n createEffect(() =>\n this.actions$.pipe(\n ofType(spxChannelActions.choose),\n switchMap((action) => {\n if (Capacitor.getPlatform() === 'web') {\n const channelType = action.channel.channelTypes.find(channelType => channelType.name === action.channelType)!;\n if (channelType.webUrl && !window.location.href.includes('http://localhost') && window.location.href.replace(channelType.webUrl!, '').replace(channelType.oldWebUrl!, '').split('/').at(0) !== '') {\n window.location.href = channelType.webUrl!;\n } else {\n this.router.navigate(['tabs/hme']);\n }\n return of(spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n }));\n }\n return from(App.getInfo()).pipe(\n switchMap((binaryInfo) => from(LiveUpdate.setChannel({\n channel: `${action.channelType}-${getBinaryVersionGroup(binaryInfo.version)}.x`\n })).pipe(\n map((): { errorReason?: string; setChannelSucceeded: boolean } => ({ setChannelSucceeded: true })),\n catchError((err) => {\n const errorReason = this.getReadableErrorReason(err);\n captureMessage(`SPX Channel setChannel Error: ${errorReason}`);\n return of<{ errorReason?: string; setChannelSucceeded: boolean }>({ errorReason, setChannelSucceeded: false });\n }),\n )),\n tap(() => {\n this.router.navigate([spxUpdateUrl]);\n }),\n map((result) => result.setChannelSucceeded\n ? spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n })\n : spxToasterActions.createError({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: result.errorReason\n ? this.translateService.instant(spxTextLiveUpdateChannelSetFailedWithReason, { reason: result.errorReason })\n : this.translateService.instant(spxTextLiveUpdateChannelSetFailed),\n })),\n catchError((err) => {\n const errorReason = this.getReadableErrorReason(err);\n captureMessage(`SPX Channel Error: ${errorReason}`);\n this.router.navigate([spxUpdateUrl]);\n return of(spxToasterActions.createError({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: errorReason\n ? this.translateService.instant(spxTextLiveUpdateChannelSetFailedWithReason, { reason: errorReason })\n : this.translateService.instant(spxTextLiveUpdateChannelSetFailed),\n }));\n }),\n );\n }),\n ), { dispatch: true });\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":["spxCh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O,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;AACvC,YAAA,OAAO,GAAG,CAAC,IAAI,EAAE;QACrB;AACA,QAAA,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAChC,MAAM,WAAW,GAAG,GAA4B;AAChD,YAAA,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE;AACvE,gBAAA,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE;YACrC;AACA,YAAA,IAAI;gBACA,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;AACtC,gBAAA,IAAI,UAAU,IAAI,UAAU,KAAK,IAAI,EAAE;oBACnC,OAAO,UAAU,CAAC,MAAM,GAAG,GAAG,GAAG,CAAA,EAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,GAAG,UAAU;gBAClF;YACJ;AAAE,YAAA,MAAM;;YAER;QACJ;AACA,QAAA,OAAO,EAAE;IACb;8GApFS,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;ACjBD;;AAEG;;;;"}
@@ -27,7 +27,9 @@ const spxTextDateMayNotBeFuture = "spxTextDateMayNotBeFuture";
27
27
  const spxTextDateMayNotBePast = "spxTextDateMayNotBePast";
28
28
  const spxTextInvalidCode = "spxTextInvalidCode";
29
29
  const spxTextLiveUpdateChannelSetFailed = "spxTextLiveUpdateChannelSetFailed";
30
+ const spxTextLiveUpdateChannelSetFailedWithReason = "spxTextLiveUpdateChannelSetFailedWithReason";
30
31
  const spxTextLiveUpdateCheckFailed = "spxTextLiveUpdateCheckFailed";
32
+ const spxTextLiveUpdateCheckFailedWithReason = "spxTextLiveUpdateCheckFailedWithReason";
31
33
  const spxTextUpdateAppVersion = "spxTextUpdateAppVersion";
32
34
  const spxTextUpdateBinaryVersionGroup = "spxTextUpdateBinaryVersionGroup";
33
35
  const spxTextUpdateBuildVersion = "spxTextUpdateBuildVersion";
@@ -70,7 +72,9 @@ const SpxTranslateEn = {
70
72
  [spxTextDateMayNotBePast]: "The selected date may not be in the past.",
71
73
  [spxTextInvalidCode]: "The {{codeName}} code {{codeCode}} does not exist.",
72
74
  [spxTextLiveUpdateChannelSetFailed]: "Channel selected, but live update channel could not be set.",
75
+ [spxTextLiveUpdateChannelSetFailedWithReason]: "Channel selected, but live update channel could not be set: {{reason}}.",
73
76
  [spxTextLiveUpdateCheckFailed]: "Unable to check for updates right now. Please try again later.",
77
+ [spxTextLiveUpdateCheckFailedWithReason]: "Unable to check for updates: {{reason}}.",
74
78
  [spxTextUpdateStatus]: "status",
75
79
  [spxTextUpdateStatusPreparing]: "preparing update check",
76
80
  [spxTextUpdateStatusSyncing]: "synchronizing update information",
@@ -114,7 +118,9 @@ const SpxTranslateNl = {
114
118
  [spxTextDateMayNotBeFuture]: "De geselecteerde datum mag niet in de toekomst liggen.",
115
119
  [spxTextDateMayNotBePast]: "De geselecteerde datum mag niet in het verleden liggen.",
116
120
  [spxTextLiveUpdateChannelSetFailed]: "Kanaal geselecteerd, maar het live update kanaal kon niet worden ingesteld.",
121
+ [spxTextLiveUpdateChannelSetFailedWithReason]: "Kanaal geselecteerd, maar het live update kanaal kon niet worden ingesteld: {{reason}}.",
117
122
  [spxTextLiveUpdateCheckFailed]: "Kan nu niet op updates controleren. Probeer het later opnieuw.",
123
+ [spxTextLiveUpdateCheckFailedWithReason]: "Kan nu niet op updates controleren: {{reason}}.",
118
124
  [spxTextUpdateStatus]: "status",
119
125
  [spxTextUpdateStatusPreparing]: "updatecontrole voorbereiden",
120
126
  [spxTextUpdateStatusSyncing]: "update-informatie synchroniseren",
@@ -132,5 +138,5 @@ const SpxTranslateNl = {
132
138
  * Generated bundle index. Do not edit.
133
139
  */
134
140
 
135
- export { SpxTranslateEn, SpxTranslateNl, spxText404PageNotFound, spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextCompany, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextGoHome, spxTextInvalidCode, spxTextLiveUpdateChannelSetFailed, spxTextLiveUpdateCheckFailed, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPageNotFound, spxTextPageNotFoundDescription, spxTextPatchAvailable, spxTextPatternNotValid, spxTextReadyToBeInstalled, spxTextRequired, spxTextSelect, spxTextSelectYourCompany, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort, spxTextUpdate, spxTextUpdateAppVersion, spxTextUpdateAvailable, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateStatusCompleted, spxTextUpdateStatusFailed, spxTextUpdateStatusPreparing, spxTextUpdateStatusSyncing, spxTextUpdateVersionInfo };
141
+ export { SpxTranslateEn, SpxTranslateNl, spxText404PageNotFound, spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextCompany, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextGoHome, spxTextInvalidCode, spxTextLiveUpdateChannelSetFailed, spxTextLiveUpdateChannelSetFailedWithReason, spxTextLiveUpdateCheckFailed, spxTextLiveUpdateCheckFailedWithReason, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPageNotFound, spxTextPageNotFoundDescription, spxTextPatchAvailable, spxTextPatternNotValid, spxTextReadyToBeInstalled, spxTextRequired, spxTextSelect, spxTextSelectYourCompany, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort, spxTextUpdate, spxTextUpdateAppVersion, spxTextUpdateAvailable, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateStatusCompleted, spxTextUpdateStatusFailed, spxTextUpdateStatusPreparing, spxTextUpdateStatusSyncing, spxTextUpdateVersionInfo };
136
142
  //# sourceMappingURL=softpak-components-spx-translate.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-translate.mjs","sources":["../../../../projects/softpak/components/spx-translate/spx-translate._const.ts","../../../../projects/softpak/components/spx-translate/spx-translate.en.ts","../../../../projects/softpak/components/spx-translate/spx-translate.nl.ts","../../../../projects/softpak/components/spx-translate/softpak-components-spx-translate.ts"],"sourcesContent":["export const spxTextCheckingForUpdates = 'spxTextCheckingForUpdates';\nexport const spxTextOneMomentPlease = 'spxTextOneMomentPlease';\nexport const spxTextPatchAvailable = 'spxTextPatchAvailable';\nexport const spxTextUpdateAvailable = 'spxTextUpdateAvailable';\nexport const spxTextReadyToBeInstalled = 'spxTextReadyToBeInstalled';\nexport const spxTextUpdate = 'spxTextUpdate';\nexport const spxTextOpenAppStore = 'spxTextOpenAppStore';\nexport const spxTextChannel = 'spxTextChannel';\nexport const spxTextCompany = 'spxTextCompany';\nexport const spxTextSelect = 'spxTextSelect';\nexport const spxTextSelectYourCompany = 'spxSelectYourCompany';\nexport const spxTextChange = 'spxTextChange';\nexport const spxText404PageNotFound = \"spxText404PageNotFound\";\nexport const spxTextPageNotFound = \"spxTextPageNotFound\";\nexport const spxTextPageNotFoundDescription = \"spxTextPageNotFoundDescription\";\nexport const spxTextGoHome = \"spxTextGoHome\";\nexport const spxTextTooLong = \"spxTextTooLong\";\nexport const spxTextTooShort = \"spxTextTooShort\";\nexport const spxTextTooHigh = \"spxTextTooHigh\";\nexport const spxTextTooLow = \"spxTextTooLow\";\nexport const spxTextPatternNotValid = \"spxTextPatternNotValid\";\nexport const spxTextRequired = \"spxTextRequired\";\nexport const spxTextChoosePast = \"spxTextChoosePast\";\nexport const spxTextChooseFuture = \"spxTextChooseFuture\";\nexport const spxTextChooseValidMonth = \"spxTextChooseValidMonth\";\nexport const spxTextDateMayNotBeFuture = \"spxTextDateMayNotBeFuture\";\nexport const spxTextDateMayNotBePast = \"spxTextDateMayNotBePast\";\nexport const spxTextInvalidCode = \"spxTextInvalidCode\";\nexport const spxTextLiveUpdateChannelSetFailed = \"spxTextLiveUpdateChannelSetFailed\";\nexport const spxTextLiveUpdateCheckFailed = \"spxTextLiveUpdateCheckFailed\";\nexport const spxTextUpdateAppVersion = \"spxTextUpdateAppVersion\";\nexport const spxTextUpdateBinaryVersionGroup = \"spxTextUpdateBinaryVersionGroup\";\nexport const spxTextUpdateBuildVersion = \"spxTextUpdateBuildVersion\";\nexport const spxTextUpdateLiveBundle = \"spxTextUpdateLiveBundle\";\nexport const spxTextUpdateLiveChannel = \"spxTextUpdateLiveChannel\";\nexport const spxTextUpdateStatus = \"spxTextUpdateStatus\";\nexport const spxTextUpdateStatusCompleted = \"spxTextUpdateStatusCompleted\";\nexport const spxTextUpdateStatusFailed = \"spxTextUpdateStatusFailed\";\nexport const spxTextUpdateStatusPreparing = \"spxTextUpdateStatusPreparing\";\nexport const spxTextUpdateStatusSyncing = \"spxTextUpdateStatusSyncing\";\nexport const spxTextUpdateVersionInfo = \"spxTextUpdateVersionInfo\";\n\nexport interface SpxTranslateI {\n [spxTextChange]: string;\n [spxTextCheckingForUpdates]: string;\n [spxTextOneMomentPlease]: string;\n [spxTextPatchAvailable]: string;\n [spxTextUpdateAvailable]: string;\n [spxTextReadyToBeInstalled]: string;\n [spxTextUpdate]: string;\n [spxTextOpenAppStore]: string;\n [spxTextChannel]: string;\n [spxTextCompany]: string;\n [spxTextSelect]: string;\n [spxTextSelectYourCompany]: string;\n [spxText404PageNotFound]: string;\n [spxTextPageNotFound]: string;\n [spxTextPageNotFoundDescription]: string;\n [spxTextGoHome]: string;\n [spxTextInvalidCode]: string;\n [spxTextTooLong]: string;\n [spxTextTooShort]: string;\n [spxTextTooHigh]: string;\n [spxTextTooLow]: string;\n [spxTextPatternNotValid]: string;\n [spxTextRequired]: string;\n [spxTextChoosePast]: string;\n [spxTextChooseFuture]: string;\n [spxTextChooseValidMonth]: string;\n [spxTextDateMayNotBeFuture]: string;\n [spxTextDateMayNotBePast]: string;\n [spxTextInvalidCode]: string;\n [spxTextLiveUpdateChannelSetFailed]: string;\n [spxTextLiveUpdateCheckFailed]: string;\n [spxTextUpdateAppVersion]: string;\n [spxTextUpdateBinaryVersionGroup]: string;\n [spxTextUpdateBuildVersion]: string;\n [spxTextUpdateLiveBundle]: string;\n [spxTextUpdateLiveChannel]: string;\n [spxTextUpdateStatus]: string;\n [spxTextUpdateStatusCompleted]: string;\n [spxTextUpdateStatusFailed]: string;\n [spxTextUpdateStatusPreparing]: string;\n [spxTextUpdateStatusSyncing]: string;\n [spxTextUpdateVersionInfo]: string;\n}\n","import {\n spxText404PageNotFound,\n spxTextChange,\n spxTextChannel,\n spxTextCheckingForUpdates,\n spxTextChooseFuture,\n spxTextChoosePast,\n spxTextChooseValidMonth,\n spxTextCompany,\n spxTextDateMayNotBeFuture,\n spxTextDateMayNotBePast,\n spxTextGoHome,\n spxTextInvalidCode,\n spxTextLiveUpdateCheckFailed,\n spxTextLiveUpdateChannelSetFailed,\n spxTextOneMomentPlease,\n spxTextOpenAppStore,\n spxTextPageNotFound,\n spxTextPageNotFoundDescription,\n spxTextPatchAvailable,\n spxTextPatternNotValid,\n spxTextReadyToBeInstalled,\n spxTextRequired,\n spxTextSelect,\n spxTextSelectYourCompany,\n spxTextTooHigh,\n spxTextTooLong,\n spxTextTooLow,\n spxTextTooShort,\n spxTextUpdate,\n spxTextUpdateAppVersion,\n spxTextUpdateAvailable,\n spxTextUpdateBinaryVersionGroup,\n spxTextUpdateBuildVersion,\n spxTextUpdateLiveBundle,\n spxTextUpdateLiveChannel,\n spxTextUpdateStatus,\n spxTextUpdateStatusCompleted,\n spxTextUpdateStatusFailed,\n spxTextUpdateStatusPreparing,\n spxTextUpdateStatusSyncing,\n spxTextUpdateVersionInfo,\n SpxTranslateI\n} from \"./spx-translate._const\";\n\nexport const SpxTranslateEn: SpxTranslateI = {\n [spxTextCheckingForUpdates]: 'checking for updates',\n [spxTextOneMomentPlease]: 'one moment please',\n [spxTextReadyToBeInstalled]: 'ready to be installed',\n [spxTextPatchAvailable]: 'patch available',\n [spxTextUpdateAvailable]: 'update available',\n [spxTextUpdate]: 'update',\n [spxTextOpenAppStore]: 'open app store',\n [spxTextChannel]: 'channel',\n [spxTextCompany]: 'company',\n [spxTextSelect]: 'select',\n [spxTextSelectYourCompany]: 'select your company',\n [spxTextChange]: 'change',\n [spxText404PageNotFound]: \"404 page not found\",\n [spxTextPageNotFound]: \"Page not found\",\n [spxTextPageNotFoundDescription]: \"Sorry, the page you’re looking for doesn’t exist or has been moved.\",\n [spxTextGoHome]: \"Go home\",\n [spxTextTooLong]: \"'{{fieldLabel}}' is too long (the maximum length is {{error}})\",\n [spxTextTooShort]: \"'{{fieldLabel}}' is too short (the minimum length is {{error}})\",\n [spxTextTooHigh]: \"The value of '{{fieldLabel}}' is too high, the maximum is {{error}}.\",\n [spxTextTooLow]: \"The value of '{{fieldLabel}}' is too low, the minimum is {{error}}.\",\n [spxTextPatternNotValid]: \"The pattern of '{{fieldLabel}}' is not valid.\",\n [spxTextRequired]: \"The field '{{fieldLabel}}' is required.\",\n [spxTextChoosePast]: \"Please choose a year between 1991 and the current year.\",\n [spxTextChooseFuture]: \"Please choose a year between the current year and 2050.\",\n [spxTextChooseValidMonth]: \"Please choose a valid month (a value between 01 and 12).\",\n [spxTextDateMayNotBeFuture]: \"The selected date may not be in the future.\",\n [spxTextDateMayNotBePast]: \"The selected date may not be in the past.\",\n [spxTextInvalidCode]: \"The {{codeName}} code {{codeCode}} does not exist.\",\n [spxTextLiveUpdateChannelSetFailed]: \"Channel selected, but live update channel could not be set.\",\n [spxTextLiveUpdateCheckFailed]: \"Unable to check for updates right now. Please try again later.\",\n [spxTextUpdateStatus]: \"status\",\n [spxTextUpdateStatusPreparing]: \"preparing update check\",\n [spxTextUpdateStatusSyncing]: \"synchronizing update information\",\n [spxTextUpdateStatusCompleted]: \"update check completed\",\n [spxTextUpdateStatusFailed]: \"update check failed\",\n [spxTextUpdateVersionInfo]: \"version information\",\n [spxTextUpdateAppVersion]: \"app version\",\n [spxTextUpdateBuildVersion]: \"build version\",\n [spxTextUpdateBinaryVersionGroup]: \"binary version group\",\n [spxTextUpdateLiveChannel]: \"live update channel\",\n [spxTextUpdateLiveBundle]: \"downloaded live bundle\",\n}\n","import {\n spxText404PageNotFound,\n spxTextChange,\n spxTextChannel,\n spxTextCheckingForUpdates,\n spxTextChooseFuture,\n spxTextChoosePast,\n spxTextChooseValidMonth,\n spxTextCompany,\n spxTextDateMayNotBeFuture,\n spxTextDateMayNotBePast,\n spxTextGoHome,\n spxTextInvalidCode,\n spxTextLiveUpdateCheckFailed,\n spxTextLiveUpdateChannelSetFailed,\n spxTextOneMomentPlease,\n spxTextOpenAppStore,\n spxTextPageNotFound,\n spxTextPageNotFoundDescription,\n spxTextPatchAvailable,\n spxTextPatternNotValid,\n spxTextReadyToBeInstalled,\n spxTextRequired,\n spxTextSelect,\n spxTextSelectYourCompany,\n spxTextTooHigh,\n spxTextTooLong,\n spxTextTooLow,\n spxTextTooShort,\n spxTextUpdate,\n spxTextUpdateAppVersion,\n spxTextUpdateAvailable,\n spxTextUpdateBinaryVersionGroup,\n spxTextUpdateBuildVersion,\n spxTextUpdateLiveBundle,\n spxTextUpdateLiveChannel,\n spxTextUpdateStatus,\n spxTextUpdateStatusCompleted,\n spxTextUpdateStatusFailed,\n spxTextUpdateStatusPreparing,\n spxTextUpdateStatusSyncing,\n spxTextUpdateVersionInfo,\n SpxTranslateI\n} from \"./spx-translate._const\";\n\nexport const SpxTranslateNl: SpxTranslateI = {\n [spxTextCheckingForUpdates]: 'controleren op updates',\n [spxTextOneMomentPlease]: 'een moment geduld alstublieft',\n [spxTextReadyToBeInstalled]: 'ready to be installed',\n [spxTextPatchAvailable]: 'patch available',\n [spxTextUpdateAvailable]: 'update available',\n [spxTextUpdate]: 'updaten',\n [spxTextOpenAppStore]: 'open app store',\n [spxTextChannel]: 'kanaal',\n [spxTextCompany]: 'bedrijf',\n [spxTextSelect]: 'selecteer',\n [spxTextSelectYourCompany]: 'selecteer uw bedrijf',\n [spxTextChange]: 'wissel',\n [spxText404PageNotFound]: \"404 pagina niet gevonden\",\n [spxTextPageNotFound]: \"Pagina niet gevonden\",\n [spxTextPageNotFoundDescription]: \"Sorry, de pagina die u zoekt bestaat niet of is verplaatst.\",\n [spxTextGoHome]: \"Ga naar het hoofdscherm\",\n [spxTextInvalidCode]: \"De {{codeName}} code {{codeCode}} is ongeldig.\",\n [spxTextTooLong]: \"De waarde van '{{fieldLabel}}' is te lang (de maximale lengte is {{error}}).\",\n [spxTextTooShort]: \"De waarde van '{{fieldLabel}}' is te kort (de minimale lengte is {{error}}).\",\n [spxTextTooHigh]: \"De waarde van '{{fieldLabel}}' is te hoog (de maximale waarde is {{error}}).\",\n [spxTextTooLow]: \"De waarde van '{{fieldLabel}}' is te laag (de minimale waarde is {{error}}).\",\n [spxTextPatternNotValid]: \"Het patroon van '{{fieldLabel}}' is ongeldig.\",\n [spxTextRequired]: \"Het veld '{{fieldLabel}}' is verplicht.\",\n [spxTextChoosePast]: \"Kies een jaar tussen 1991 en het huidige jaar.\",\n [spxTextChooseFuture]: \"Kies een jaar tussen het huidige jaar en 2050.\",\n [spxTextChooseValidMonth]: \"Kies een geldige maand (een waarde tussen 01 en 12).\",\n [spxTextDateMayNotBeFuture]: \"De geselecteerde datum mag niet in de toekomst liggen.\",\n [spxTextDateMayNotBePast]: \"De geselecteerde datum mag niet in het verleden liggen.\",\n [spxTextLiveUpdateChannelSetFailed]: \"Kanaal geselecteerd, maar het live update kanaal kon niet worden ingesteld.\",\n [spxTextLiveUpdateCheckFailed]: \"Kan nu niet op updates controleren. Probeer het later opnieuw.\",\n [spxTextUpdateStatus]: \"status\",\n [spxTextUpdateStatusPreparing]: \"updatecontrole voorbereiden\",\n [spxTextUpdateStatusSyncing]: \"update-informatie synchroniseren\",\n [spxTextUpdateStatusCompleted]: \"updatecontrole voltooid\",\n [spxTextUpdateStatusFailed]: \"updatecontrole mislukt\",\n [spxTextUpdateVersionInfo]: \"versie-informatie\",\n [spxTextUpdateAppVersion]: \"app-versie\",\n [spxTextUpdateBuildVersion]: \"build-versie\",\n [spxTextUpdateBinaryVersionGroup]: \"binaire versiegroep\",\n [spxTextUpdateLiveChannel]: \"live update kanaal\",\n [spxTextUpdateLiveBundle]: \"gedownloade live bundle\",\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,yBAAyB,GAAG;AAClC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,sBAAsB,GAAG;AAC/B,MAAM,yBAAyB,GAAG;AAClC,MAAM,aAAa,GAAG;AACtB,MAAM,mBAAmB,GAAG;AAC5B,MAAM,cAAc,GAAG;AACvB,MAAM,cAAc,GAAG;AACvB,MAAM,aAAa,GAAG;AACtB,MAAM,wBAAwB,GAAG;AACjC,MAAM,aAAa,GAAG;AACtB,MAAM,sBAAsB,GAAG;AAC/B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,8BAA8B,GAAG;AACvC,MAAM,aAAa,GAAG;AACtB,MAAM,cAAc,GAAG;AACvB,MAAM,eAAe,GAAG;AACxB,MAAM,cAAc,GAAG;AACvB,MAAM,aAAa,GAAG;AACtB,MAAM,sBAAsB,GAAG;AAC/B,MAAM,eAAe,GAAG;AACxB,MAAM,iBAAiB,GAAG;AAC1B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,uBAAuB,GAAG;AAChC,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG;AAChC,MAAM,kBAAkB,GAAG;AAC3B,MAAM,iCAAiC,GAAG;AAC1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AC,aAAa,GAAG,8EAA8E;IAC/F,CAAC,sBAAsB,GAAG,+CAA+C;IACzE,CAAC,eAAe,GAAG,yCAAyC;IAC5D,CAAC,iBAAiB,GAAG,gDAAgD;IACrE,CAAC,mBAAmB,GAAG,gDAAgD;IACvE,CAAC,uBAAuB,GAAG,sDAAsD;IACjF,CAAC,yBAAyB,GAAG,wDAAwD;IACrF,CAAC,uBAAuB,GAAG,yDAAyD;IACpF,CAAC,iCAAiC,GAAG,6EAA6E;IAClH,CAAC,4BAA4B,GAAG,gEAAgE;IAChG,CAAC,mBAAmB,GAAG,QAAQ;IAC/B,CAAC,4BAA4B,GAAG,6BAA6B;IAC7D,CAAC,0BAA0B,GAAG,kCAAkC;IAChE,CAAC,4BAA4B,GAAG,yBAAyB;IACzD,CAAC,yBAAyB,GAAG,wBAAwB;IACrD,CAAC,wBAAwB,GAAG,mBAAmB;IAC/C,CAAC,uBAAuB,GAAG,YAAY;IACvC,CAAC,yBAAyB,GAAG,cAAc;IAC3C,CAAC,+BAA+B,GAAG,qBAAqB;IACxD,CAAC,wBAAwB,GAAG,oBAAoB;IAChD,CAAC,uBAAuB,GAAG,yBAAyB;;;ACtFtD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-translate.mjs","sources":["../../../../projects/softpak/components/spx-translate/spx-translate._const.ts","../../../../projects/softpak/components/spx-translate/spx-translate.en.ts","../../../../projects/softpak/components/spx-translate/spx-translate.nl.ts","../../../../projects/softpak/components/spx-translate/softpak-components-spx-translate.ts"],"sourcesContent":["export const spxTextCheckingForUpdates = 'spxTextCheckingForUpdates';\nexport const spxTextOneMomentPlease = 'spxTextOneMomentPlease';\nexport const spxTextPatchAvailable = 'spxTextPatchAvailable';\nexport const spxTextUpdateAvailable = 'spxTextUpdateAvailable';\nexport const spxTextReadyToBeInstalled = 'spxTextReadyToBeInstalled';\nexport const spxTextUpdate = 'spxTextUpdate';\nexport const spxTextOpenAppStore = 'spxTextOpenAppStore';\nexport const spxTextChannel = 'spxTextChannel';\nexport const spxTextCompany = 'spxTextCompany';\nexport const spxTextSelect = 'spxTextSelect';\nexport const spxTextSelectYourCompany = 'spxSelectYourCompany';\nexport const spxTextChange = 'spxTextChange';\nexport const spxText404PageNotFound = \"spxText404PageNotFound\";\nexport const spxTextPageNotFound = \"spxTextPageNotFound\";\nexport const spxTextPageNotFoundDescription = \"spxTextPageNotFoundDescription\";\nexport const spxTextGoHome = \"spxTextGoHome\";\nexport const spxTextTooLong = \"spxTextTooLong\";\nexport const spxTextTooShort = \"spxTextTooShort\";\nexport const spxTextTooHigh = \"spxTextTooHigh\";\nexport const spxTextTooLow = \"spxTextTooLow\";\nexport const spxTextPatternNotValid = \"spxTextPatternNotValid\";\nexport const spxTextRequired = \"spxTextRequired\";\nexport const spxTextChoosePast = \"spxTextChoosePast\";\nexport const spxTextChooseFuture = \"spxTextChooseFuture\";\nexport const spxTextChooseValidMonth = \"spxTextChooseValidMonth\";\nexport const spxTextDateMayNotBeFuture = \"spxTextDateMayNotBeFuture\";\nexport const spxTextDateMayNotBePast = \"spxTextDateMayNotBePast\";\nexport const spxTextInvalidCode = \"spxTextInvalidCode\";\nexport const spxTextLiveUpdateChannelSetFailed = \"spxTextLiveUpdateChannelSetFailed\";\nexport const spxTextLiveUpdateChannelSetFailedWithReason = \"spxTextLiveUpdateChannelSetFailedWithReason\";\nexport const spxTextLiveUpdateCheckFailed = \"spxTextLiveUpdateCheckFailed\";\nexport const spxTextLiveUpdateCheckFailedWithReason = \"spxTextLiveUpdateCheckFailedWithReason\";\nexport const spxTextUpdateAppVersion = \"spxTextUpdateAppVersion\";\nexport const spxTextUpdateBinaryVersionGroup = \"spxTextUpdateBinaryVersionGroup\";\nexport const spxTextUpdateBuildVersion = \"spxTextUpdateBuildVersion\";\nexport const spxTextUpdateLiveBundle = \"spxTextUpdateLiveBundle\";\nexport const spxTextUpdateLiveChannel = \"spxTextUpdateLiveChannel\";\nexport const spxTextUpdateStatus = \"spxTextUpdateStatus\";\nexport const spxTextUpdateStatusCompleted = \"spxTextUpdateStatusCompleted\";\nexport const spxTextUpdateStatusFailed = \"spxTextUpdateStatusFailed\";\nexport const spxTextUpdateStatusPreparing = \"spxTextUpdateStatusPreparing\";\nexport const spxTextUpdateStatusSyncing = \"spxTextUpdateStatusSyncing\";\nexport const spxTextUpdateVersionInfo = \"spxTextUpdateVersionInfo\";\n\nexport interface SpxTranslateI {\n [spxTextChange]: string;\n [spxTextCheckingForUpdates]: string;\n [spxTextOneMomentPlease]: string;\n [spxTextPatchAvailable]: string;\n [spxTextUpdateAvailable]: string;\n [spxTextReadyToBeInstalled]: string;\n [spxTextUpdate]: string;\n [spxTextOpenAppStore]: string;\n [spxTextChannel]: string;\n [spxTextCompany]: string;\n [spxTextSelect]: string;\n [spxTextSelectYourCompany]: string;\n [spxText404PageNotFound]: string;\n [spxTextPageNotFound]: string;\n [spxTextPageNotFoundDescription]: string;\n [spxTextGoHome]: string;\n [spxTextInvalidCode]: string;\n [spxTextTooLong]: string;\n [spxTextTooShort]: string;\n [spxTextTooHigh]: string;\n [spxTextTooLow]: string;\n [spxTextPatternNotValid]: string;\n [spxTextRequired]: string;\n [spxTextChoosePast]: string;\n [spxTextChooseFuture]: string;\n [spxTextChooseValidMonth]: string;\n [spxTextDateMayNotBeFuture]: string;\n [spxTextDateMayNotBePast]: string;\n [spxTextInvalidCode]: string;\n [spxTextLiveUpdateChannelSetFailed]: string;\n [spxTextLiveUpdateChannelSetFailedWithReason]: string;\n [spxTextLiveUpdateCheckFailed]: string;\n [spxTextLiveUpdateCheckFailedWithReason]: string;\n [spxTextUpdateAppVersion]: string;\n [spxTextUpdateBinaryVersionGroup]: string;\n [spxTextUpdateBuildVersion]: string;\n [spxTextUpdateLiveBundle]: string;\n [spxTextUpdateLiveChannel]: string;\n [spxTextUpdateStatus]: string;\n [spxTextUpdateStatusCompleted]: string;\n [spxTextUpdateStatusFailed]: string;\n [spxTextUpdateStatusPreparing]: string;\n [spxTextUpdateStatusSyncing]: string;\n [spxTextUpdateVersionInfo]: string;\n}\n","import {\n spxText404PageNotFound,\n spxTextChange,\n spxTextChannel,\n spxTextCheckingForUpdates,\n spxTextChooseFuture,\n spxTextChoosePast,\n spxTextChooseValidMonth,\n spxTextCompany,\n spxTextDateMayNotBeFuture,\n spxTextDateMayNotBePast,\n spxTextGoHome,\n spxTextInvalidCode,\n spxTextLiveUpdateCheckFailed,\n spxTextLiveUpdateCheckFailedWithReason,\n spxTextLiveUpdateChannelSetFailed,\n spxTextLiveUpdateChannelSetFailedWithReason,\n spxTextOneMomentPlease,\n spxTextOpenAppStore,\n spxTextPageNotFound,\n spxTextPageNotFoundDescription,\n spxTextPatchAvailable,\n spxTextPatternNotValid,\n spxTextReadyToBeInstalled,\n spxTextRequired,\n spxTextSelect,\n spxTextSelectYourCompany,\n spxTextTooHigh,\n spxTextTooLong,\n spxTextTooLow,\n spxTextTooShort,\n spxTextUpdate,\n spxTextUpdateAppVersion,\n spxTextUpdateAvailable,\n spxTextUpdateBinaryVersionGroup,\n spxTextUpdateBuildVersion,\n spxTextUpdateLiveBundle,\n spxTextUpdateLiveChannel,\n spxTextUpdateStatus,\n spxTextUpdateStatusCompleted,\n spxTextUpdateStatusFailed,\n spxTextUpdateStatusPreparing,\n spxTextUpdateStatusSyncing,\n spxTextUpdateVersionInfo,\n SpxTranslateI\n} from \"./spx-translate._const\";\n\nexport const SpxTranslateEn: SpxTranslateI = {\n [spxTextCheckingForUpdates]: 'checking for updates',\n [spxTextOneMomentPlease]: 'one moment please',\n [spxTextReadyToBeInstalled]: 'ready to be installed',\n [spxTextPatchAvailable]: 'patch available',\n [spxTextUpdateAvailable]: 'update available',\n [spxTextUpdate]: 'update',\n [spxTextOpenAppStore]: 'open app store',\n [spxTextChannel]: 'channel',\n [spxTextCompany]: 'company',\n [spxTextSelect]: 'select',\n [spxTextSelectYourCompany]: 'select your company',\n [spxTextChange]: 'change',\n [spxText404PageNotFound]: \"404 page not found\",\n [spxTextPageNotFound]: \"Page not found\",\n [spxTextPageNotFoundDescription]: \"Sorry, the page you’re looking for doesn’t exist or has been moved.\",\n [spxTextGoHome]: \"Go home\",\n [spxTextTooLong]: \"'{{fieldLabel}}' is too long (the maximum length is {{error}})\",\n [spxTextTooShort]: \"'{{fieldLabel}}' is too short (the minimum length is {{error}})\",\n [spxTextTooHigh]: \"The value of '{{fieldLabel}}' is too high, the maximum is {{error}}.\",\n [spxTextTooLow]: \"The value of '{{fieldLabel}}' is too low, the minimum is {{error}}.\",\n [spxTextPatternNotValid]: \"The pattern of '{{fieldLabel}}' is not valid.\",\n [spxTextRequired]: \"The field '{{fieldLabel}}' is required.\",\n [spxTextChoosePast]: \"Please choose a year between 1991 and the current year.\",\n [spxTextChooseFuture]: \"Please choose a year between the current year and 2050.\",\n [spxTextChooseValidMonth]: \"Please choose a valid month (a value between 01 and 12).\",\n [spxTextDateMayNotBeFuture]: \"The selected date may not be in the future.\",\n [spxTextDateMayNotBePast]: \"The selected date may not be in the past.\",\n [spxTextInvalidCode]: \"The {{codeName}} code {{codeCode}} does not exist.\",\n [spxTextLiveUpdateChannelSetFailed]: \"Channel selected, but live update channel could not be set.\",\n [spxTextLiveUpdateChannelSetFailedWithReason]: \"Channel selected, but live update channel could not be set: {{reason}}.\",\n [spxTextLiveUpdateCheckFailed]: \"Unable to check for updates right now. Please try again later.\",\n [spxTextLiveUpdateCheckFailedWithReason]: \"Unable to check for updates: {{reason}}.\",\n [spxTextUpdateStatus]: \"status\",\n [spxTextUpdateStatusPreparing]: \"preparing update check\",\n [spxTextUpdateStatusSyncing]: \"synchronizing update information\",\n [spxTextUpdateStatusCompleted]: \"update check completed\",\n [spxTextUpdateStatusFailed]: \"update check failed\",\n [spxTextUpdateVersionInfo]: \"version information\",\n [spxTextUpdateAppVersion]: \"app version\",\n [spxTextUpdateBuildVersion]: \"build version\",\n [spxTextUpdateBinaryVersionGroup]: \"binary version group\",\n [spxTextUpdateLiveChannel]: \"live update channel\",\n [spxTextUpdateLiveBundle]: \"downloaded live bundle\",\n}\n","import {\n spxText404PageNotFound,\n spxTextChange,\n spxTextChannel,\n spxTextCheckingForUpdates,\n spxTextChooseFuture,\n spxTextChoosePast,\n spxTextChooseValidMonth,\n spxTextCompany,\n spxTextDateMayNotBeFuture,\n spxTextDateMayNotBePast,\n spxTextGoHome,\n spxTextInvalidCode,\n spxTextLiveUpdateCheckFailed,\n spxTextLiveUpdateCheckFailedWithReason,\n spxTextLiveUpdateChannelSetFailed,\n spxTextLiveUpdateChannelSetFailedWithReason,\n spxTextOneMomentPlease,\n spxTextOpenAppStore,\n spxTextPageNotFound,\n spxTextPageNotFoundDescription,\n spxTextPatchAvailable,\n spxTextPatternNotValid,\n spxTextReadyToBeInstalled,\n spxTextRequired,\n spxTextSelect,\n spxTextSelectYourCompany,\n spxTextTooHigh,\n spxTextTooLong,\n spxTextTooLow,\n spxTextTooShort,\n spxTextUpdate,\n spxTextUpdateAppVersion,\n spxTextUpdateAvailable,\n spxTextUpdateBinaryVersionGroup,\n spxTextUpdateBuildVersion,\n spxTextUpdateLiveBundle,\n spxTextUpdateLiveChannel,\n spxTextUpdateStatus,\n spxTextUpdateStatusCompleted,\n spxTextUpdateStatusFailed,\n spxTextUpdateStatusPreparing,\n spxTextUpdateStatusSyncing,\n spxTextUpdateVersionInfo,\n SpxTranslateI\n} from \"./spx-translate._const\";\n\nexport const SpxTranslateNl: SpxTranslateI = {\n [spxTextCheckingForUpdates]: 'controleren op updates',\n [spxTextOneMomentPlease]: 'een moment geduld alstublieft',\n [spxTextReadyToBeInstalled]: 'ready to be installed',\n [spxTextPatchAvailable]: 'patch available',\n [spxTextUpdateAvailable]: 'update available',\n [spxTextUpdate]: 'updaten',\n [spxTextOpenAppStore]: 'open app store',\n [spxTextChannel]: 'kanaal',\n [spxTextCompany]: 'bedrijf',\n [spxTextSelect]: 'selecteer',\n [spxTextSelectYourCompany]: 'selecteer uw bedrijf',\n [spxTextChange]: 'wissel',\n [spxText404PageNotFound]: \"404 pagina niet gevonden\",\n [spxTextPageNotFound]: \"Pagina niet gevonden\",\n [spxTextPageNotFoundDescription]: \"Sorry, de pagina die u zoekt bestaat niet of is verplaatst.\",\n [spxTextGoHome]: \"Ga naar het hoofdscherm\",\n [spxTextInvalidCode]: \"De {{codeName}} code {{codeCode}} is ongeldig.\",\n [spxTextTooLong]: \"De waarde van '{{fieldLabel}}' is te lang (de maximale lengte is {{error}}).\",\n [spxTextTooShort]: \"De waarde van '{{fieldLabel}}' is te kort (de minimale lengte is {{error}}).\",\n [spxTextTooHigh]: \"De waarde van '{{fieldLabel}}' is te hoog (de maximale waarde is {{error}}).\",\n [spxTextTooLow]: \"De waarde van '{{fieldLabel}}' is te laag (de minimale waarde is {{error}}).\",\n [spxTextPatternNotValid]: \"Het patroon van '{{fieldLabel}}' is ongeldig.\",\n [spxTextRequired]: \"Het veld '{{fieldLabel}}' is verplicht.\",\n [spxTextChoosePast]: \"Kies een jaar tussen 1991 en het huidige jaar.\",\n [spxTextChooseFuture]: \"Kies een jaar tussen het huidige jaar en 2050.\",\n [spxTextChooseValidMonth]: \"Kies een geldige maand (een waarde tussen 01 en 12).\",\n [spxTextDateMayNotBeFuture]: \"De geselecteerde datum mag niet in de toekomst liggen.\",\n [spxTextDateMayNotBePast]: \"De geselecteerde datum mag niet in het verleden liggen.\",\n [spxTextLiveUpdateChannelSetFailed]: \"Kanaal geselecteerd, maar het live update kanaal kon niet worden ingesteld.\",\n [spxTextLiveUpdateChannelSetFailedWithReason]: \"Kanaal geselecteerd, maar het live update kanaal kon niet worden ingesteld: {{reason}}.\",\n [spxTextLiveUpdateCheckFailed]: \"Kan nu niet op updates controleren. Probeer het later opnieuw.\",\n [spxTextLiveUpdateCheckFailedWithReason]: \"Kan nu niet op updates controleren: {{reason}}.\",\n [spxTextUpdateStatus]: \"status\",\n [spxTextUpdateStatusPreparing]: \"updatecontrole voorbereiden\",\n [spxTextUpdateStatusSyncing]: \"update-informatie synchroniseren\",\n [spxTextUpdateStatusCompleted]: \"updatecontrole voltooid\",\n [spxTextUpdateStatusFailed]: \"updatecontrole mislukt\",\n [spxTextUpdateVersionInfo]: \"versie-informatie\",\n [spxTextUpdateAppVersion]: \"app-versie\",\n [spxTextUpdateBuildVersion]: \"build-versie\",\n [spxTextUpdateBinaryVersionGroup]: \"binaire versiegroep\",\n [spxTextUpdateLiveChannel]: \"live update kanaal\",\n [spxTextUpdateLiveBundle]: \"gedownloade live bundle\",\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,yBAAyB,GAAG;AAClC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,sBAAsB,GAAG;AAC/B,MAAM,yBAAyB,GAAG;AAClC,MAAM,aAAa,GAAG;AACtB,MAAM,mBAAmB,GAAG;AAC5B,MAAM,cAAc,GAAG;AACvB,MAAM,cAAc,GAAG;AACvB,MAAM,aAAa,GAAG;AACtB,MAAM,wBAAwB,GAAG;AACjC,MAAM,aAAa,GAAG;AACtB,MAAM,sBAAsB,GAAG;AAC/B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,8BAA8B,GAAG;AACvC,MAAM,aAAa,GAAG;AACtB,MAAM,cAAc,GAAG;AACvB,MAAM,eAAe,GAAG;AACxB,MAAM,cAAc,GAAG;AACvB,MAAM,aAAa,GAAG;AACtB,MAAM,sBAAsB,GAAG;AAC/B,MAAM,eAAe,GAAG;AACxB,MAAM,iBAAiB,GAAG;AAC1B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,uBAAuB,GAAG;AAChC,MAAM,yBAAyB,GAAG;AAClC,MAAM,uBAAuB,GAAG;AAChC,MAAM,kBAAkB,GAAG;AAC3B,MAAM,iCAAiC,GAAG;AAC1C,MAAM,2CAA2C,GAAG;AACpD,MAAM,4BAA4B,GAAG;AACrC,MAAM,sCAAsC,GAAG;AAC/C,MAAM,uBAAuB,GAAG;AAChC,MAAM,+BAA+B,GAAG;AACxC,MAAM,y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A8E;IAC/F,CAAC,sBAAsB,GAAG,+CAA+C;IACzE,CAAC,eAAe,GAAG,yCAAyC;IAC5D,CAAC,iBAAiB,GAAG,gDAAgD;IACrE,CAAC,mBAAmB,GAAG,gDAAgD;IACvE,CAAC,uBAAuB,GAAG,sDAAsD;IACjF,CAAC,yBAAyB,GAAG,wDAAwD;IACrF,CAAC,uBAAuB,GAAG,yDAAyD;IACpF,CAAC,iCAAiC,GAAG,6EAA6E;IAClH,CAAC,2CAA2C,GAAG,yFAAyF;IACxI,CAAC,4BAA4B,GAAG,gEAAgE;IAChG,CAAC,sCAAsC,GAAG,iDAAiD;IAC3F,CAAC,mBAAmB,GAAG,QAAQ;IAC/B,CAAC,4BAA4B,GAAG,6BAA6B;IAC7D,CAAC,0BAA0B,GAAG,kCAAkC;IAChE,CAAC,4BAA4B,GAAG,yBAAyB;IACzD,CAAC,yBAAyB,GAAG,wBAAwB;IACrD,CAAC,wBAAwB,GAAG,mBAAmB;IAC/C,CAAC,uBAAuB,GAAG,YAAY;IACvC,CAAC,yBAAyB,GAAG,cAAc;IAC3C,CAAC,+BAA+B,GAAG,qBAAqB;IACxD,CAAC,wBAAwB,GAAG,oBAAoB;IAChD,CAAC,uBAAuB,GAAG,yBAAyB;;;AC1FtD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
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, spxTextUpdateStatusPreparing, spxTextUpdateStatusFailed, spxTextUpdateStatusSyncing, spxTextUpdateStatusCompleted, spxTextUpdate, spxTextReadyToBeInstalled, spxTextPatchAvailable, spxTextUpdateAvailable, spxTextOpenAppStore, spxTextLiveUpdateCheckFailed } from '@softpak/components/spx-translate';
3
+ import { spxTextCheckingForUpdates, spxTextOneMomentPlease, spxTextUpdateAppVersion, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateVersionInfo, spxTextUpdateStatusPreparing, spxTextUpdateStatusFailed, spxTextUpdateStatusSyncing, spxTextUpdateStatusCompleted, 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';
@@ -8,13 +8,12 @@ import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
8
8
  import { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';
9
9
  import { TranslatePipe, TranslateService } from '@ngx-translate/core';
10
10
  import * as i1 from '@ngrx/store';
11
- import { createActionGroup, props, emptyProps, createFeature, createReducer, on } from '@ngrx/store';
11
+ import { createActionGroup, props, emptyProps, createFeature, createReducer, on, Store } from '@ngrx/store';
12
12
  import { DateTime } from 'luxon';
13
13
  import * as i2 from '@angular/router';
14
14
  import { unsubscribeSubscriptions, SpxSeverityEnum, getBinaryVersionGroup } from '@softpak/components/spx-helpers';
15
15
  import { SpxButtonComponent } from '@softpak/components/spx-button';
16
16
  import * as i2$1 from '@angular/platform-browser';
17
- import * as i1$1 from '@ngrx/effects';
18
17
  import { Actions, createEffect, ofType } from '@ngrx/effects';
19
18
  import { LiveUpdate } from '@capawesome/capacitor-live-update';
20
19
  import { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
@@ -288,20 +287,31 @@ let Effects$1 = class Effects {
288
287
  SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdateChannel, `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`);
289
288
  // End migrate from e.g. 1.2.x to 1.3.x
290
289
  return from(LiveUpdate.sync({ channel: SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel) }));
291
- }), map((syncResult) => {
290
+ }), mergeMap((syncResult) => {
292
291
  if (syncResult.nextBundleId) {
293
292
  SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.nextBundleId);
294
293
  if (action.forceWaitForUpdate) {
295
- LiveUpdate.reload();
294
+ return from(LiveUpdate.reload()).pipe(map(() => spxUpdateCheckActions.anUpdateIsReady()), catchError((err) => {
295
+ const errorReason = this.getReadableErrorReason(err);
296
+ captureMessage(`[UPD] Reload failed: ${errorReason}`);
297
+ return of(spxUpdateCheckActions.checkFailed({
298
+ errorReason,
299
+ startUpdateAgainAfterTimeout: false,
300
+ }));
301
+ }));
296
302
  }
297
- return spxUpdateCheckActions.anUpdateIsReady();
303
+ return of(spxUpdateCheckActions.anUpdateIsReady());
298
304
  }
299
305
  else {
300
- return spxUpdateCheckActions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });
306
+ return of(spxUpdateCheckActions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }));
301
307
  }
302
308
  }), catchError((err) => {
303
- captureMessage("[UPD] Handled: " + err.message);
304
- return of(spxUpdateCheckActions.checkFailed({ startUpdateAgainAfterTimeout: false }));
309
+ const errorReason = this.getReadableErrorReason(err);
310
+ captureMessage(`[UPD] Handled: ${errorReason}`);
311
+ return of(spxUpdateCheckActions.checkFailed({
312
+ errorReason,
313
+ startUpdateAgainAfterTimeout: false,
314
+ }));
305
315
  }));
306
316
  })));
307
317
  this.whenAndUpdateIsReady$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.anUpdateIsReady), mergeMap(() => [
@@ -310,14 +320,40 @@ let Effects$1 = class Effects {
310
320
  this.whenCheckHasFailed$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), delay(30000), mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [
311
321
  spxUpdateCheckActions.runCheck({}),
312
322
  ])));
313
- this.whenCheckHasFailedShowError$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), map(() => spxToasterActions.createError({
323
+ this.whenCheckHasFailedShowError$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.checkFailed), map((action) => spxToasterActions.createError({
314
324
  autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
315
- messageText: this.translateService.instant(spxTextLiveUpdateCheckFailed),
325
+ messageText: action.errorReason
326
+ ? this.translateService.instant(spxTextLiveUpdateCheckFailedWithReason, { reason: action.errorReason })
327
+ : this.translateService.instant(spxTextLiveUpdateCheckFailed),
316
328
  }))));
317
329
  this.whenNoUpdateWasFound$ = createEffect(() => this.actions$.pipe(ofType(spxUpdateCheckActions.noUpdateWasFound), delay(120000), mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [
318
330
  spxUpdateCheckActions.runCheck({}),
319
331
  ])));
320
332
  }
333
+ getReadableErrorReason(err) {
334
+ if (err instanceof Error && err.message?.trim()) {
335
+ return err.message.trim();
336
+ }
337
+ if (typeof err === 'string' && err.trim()) {
338
+ return err.trim();
339
+ }
340
+ if (err && typeof err === 'object') {
341
+ const withMessage = err;
342
+ if (typeof withMessage.message === 'string' && withMessage.message.trim()) {
343
+ return withMessage.message.trim();
344
+ }
345
+ try {
346
+ const serialized = JSON.stringify(err);
347
+ if (serialized && serialized !== '{}') {
348
+ return serialized.length > 180 ? `${serialized.slice(0, 177)}...` : serialized;
349
+ }
350
+ }
351
+ catch {
352
+ // ignore serialization errors
353
+ }
354
+ }
355
+ return '';
356
+ }
321
357
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
322
358
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects }); }
323
359
  };
@@ -335,18 +371,53 @@ var spxUpdateCheck_state = /*#__PURE__*/Object.freeze({
335
371
  });
336
372
 
337
373
  class Effects {
338
- constructor(actions$) {
339
- this.actions$ = actions$;
374
+ constructor() {
375
+ this.actions$ = inject(Actions);
376
+ this.appStore = inject(Store);
377
+ this.translateService = inject(TranslateService);
340
378
  this.whenAccepted$ = createEffect(() => this.actions$.pipe(ofType(SpxUpdatePendingActions.acceptUpdate), tap(() => {
341
- void LiveUpdate.reload();
379
+ void LiveUpdate.reload().catch((err) => {
380
+ const errorReason = this.getReadableErrorReason(err);
381
+ captureMessage(`[UPD] Accept reload failed: ${errorReason}`);
382
+ this.appStore.dispatch(spxToasterActions.createError({
383
+ autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
384
+ messageText: errorReason
385
+ ? this.translateService.instant(spxTextLiveUpdateCheckFailedWithReason, { reason: errorReason })
386
+ : this.translateService.instant(spxTextLiveUpdateCheckFailed),
387
+ }));
388
+ });
342
389
  })), { dispatch: false });
343
390
  }
344
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, deps: [{ token: i1$1.Actions }], target: i0.ɵɵFactoryTarget.Injectable }); }
391
+ getReadableErrorReason(err) {
392
+ if (err instanceof Error && err.message?.trim()) {
393
+ return err.message.trim();
394
+ }
395
+ if (typeof err === 'string' && err.trim()) {
396
+ return err.trim();
397
+ }
398
+ if (err && typeof err === 'object') {
399
+ const withMessage = err;
400
+ if (typeof withMessage.message === 'string' && withMessage.message.trim()) {
401
+ return withMessage.message.trim();
402
+ }
403
+ try {
404
+ const serialized = JSON.stringify(err);
405
+ if (serialized && serialized !== '{}') {
406
+ return serialized.length > 180 ? `${serialized.slice(0, 177)}...` : serialized;
407
+ }
408
+ }
409
+ catch {
410
+ // ignore serialization errors
411
+ }
412
+ }
413
+ return '';
414
+ }
415
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
345
416
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects }); }
346
417
  }
347
418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Effects, decorators: [{
348
419
  type: Injectable
349
- }], ctorParameters: () => [{ type: i1$1.Actions }] });
420
+ }] });
350
421
 
351
422
  var spxUpdatePending_effects = /*#__PURE__*/Object.freeze({
352
423
  __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 SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.nextBundleId as string);\n if (action.forceWaitForUpdate) {\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: false }));\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;Q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CAAC;IAPnB;8GAJK,OAAO,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,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.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 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, 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 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 mergeMap((syncResult: SyncResult) => {\n if (syncResult.nextBundleId) {\n SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.nextBundleId as string);\n if (action.forceWaitForUpdate) {\n return 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 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 captureMessage(`[UPD] Handled: ${errorReason}`);\n return of(spxUpdateCheckActions.checkFailed({\n errorReason,\n startUpdateAgainAfterTimeout: false,\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","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,EAAq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AAI,EAAE;QAC7B;QACA,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;AACvC,YAAA,OAAO,GAAG,CAAC,IAAI,EAAE;QACrB;AACA,QAAA,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAChC,MAAM,WAAW,GAAG,GAA4B;AAChD,YAAA,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE;AACvE,gBAAA,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE;YACrC;AACA,YAAA,IAAI;gBACA,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;AACtC,gBAAA,IAAI,UAAU,IAAI,UAAU,KAAK,IAAI,EAAE;oBACnC,OAAO,UAAU,CAAC,MAAM,GAAG,GAAG,GAAG,CAAA,EAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,GAAG,UAAU;gBAClF;YACJ;AAAE,YAAA,MAAM;;YAER;QACJ;AACA,QAAA,OAAO,EAAE;IACb;8GA3CS,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;;;;;ACZD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softpak/components",
3
- "version": "21.2.0-capwesome.5",
3
+ "version": "21.2.0-capwesome.6",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "21.x.x",
@@ -55,7 +55,8 @@ declare class Effects {
55
55
  closeable?: boolean;
56
56
  messageText: string;
57
57
  title?: string;
58
- } & _ngrx_store.Action<"[SpxToaster] CreateWarning">)> & _ngrx_effects.CreateEffectMetadata;
58
+ } & _ngrx_store.Action<"[SpxToaster] CreateError">)> & _ngrx_effects.CreateEffectMetadata;
59
+ private getReadableErrorReason;
59
60
  static ɵfac: i0.ɵɵFactoryDeclaration<Effects, never>;
60
61
  static ɵprov: i0.ɵɵInjectableDeclaration<Effects>;
61
62
  }
@@ -27,7 +27,9 @@ declare const spxTextDateMayNotBeFuture = "spxTextDateMayNotBeFuture";
27
27
  declare const spxTextDateMayNotBePast = "spxTextDateMayNotBePast";
28
28
  declare const spxTextInvalidCode = "spxTextInvalidCode";
29
29
  declare const spxTextLiveUpdateChannelSetFailed = "spxTextLiveUpdateChannelSetFailed";
30
+ declare const spxTextLiveUpdateChannelSetFailedWithReason = "spxTextLiveUpdateChannelSetFailedWithReason";
30
31
  declare const spxTextLiveUpdateCheckFailed = "spxTextLiveUpdateCheckFailed";
32
+ declare const spxTextLiveUpdateCheckFailedWithReason = "spxTextLiveUpdateCheckFailedWithReason";
31
33
  declare const spxTextUpdateAppVersion = "spxTextUpdateAppVersion";
32
34
  declare const spxTextUpdateBinaryVersionGroup = "spxTextUpdateBinaryVersionGroup";
33
35
  declare const spxTextUpdateBuildVersion = "spxTextUpdateBuildVersion";
@@ -70,7 +72,9 @@ interface SpxTranslateI {
70
72
  [spxTextDateMayNotBePast]: string;
71
73
  [spxTextInvalidCode]: string;
72
74
  [spxTextLiveUpdateChannelSetFailed]: string;
75
+ [spxTextLiveUpdateChannelSetFailedWithReason]: string;
73
76
  [spxTextLiveUpdateCheckFailed]: string;
77
+ [spxTextLiveUpdateCheckFailedWithReason]: string;
74
78
  [spxTextUpdateAppVersion]: string;
75
79
  [spxTextUpdateBinaryVersionGroup]: string;
76
80
  [spxTextUpdateBuildVersion]: string;
@@ -88,5 +92,5 @@ declare const SpxTranslateEn: SpxTranslateI;
88
92
 
89
93
  declare const SpxTranslateNl: SpxTranslateI;
90
94
 
91
- export { SpxTranslateEn, SpxTranslateNl, spxText404PageNotFound, spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextCompany, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextGoHome, spxTextInvalidCode, spxTextLiveUpdateChannelSetFailed, spxTextLiveUpdateCheckFailed, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPageNotFound, spxTextPageNotFoundDescription, spxTextPatchAvailable, spxTextPatternNotValid, spxTextReadyToBeInstalled, spxTextRequired, spxTextSelect, spxTextSelectYourCompany, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort, spxTextUpdate, spxTextUpdateAppVersion, spxTextUpdateAvailable, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateStatusCompleted, spxTextUpdateStatusFailed, spxTextUpdateStatusPreparing, spxTextUpdateStatusSyncing, spxTextUpdateVersionInfo };
95
+ export { SpxTranslateEn, SpxTranslateNl, spxText404PageNotFound, spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextCompany, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextGoHome, spxTextInvalidCode, spxTextLiveUpdateChannelSetFailed, spxTextLiveUpdateChannelSetFailedWithReason, spxTextLiveUpdateCheckFailed, spxTextLiveUpdateCheckFailedWithReason, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPageNotFound, spxTextPageNotFoundDescription, spxTextPatchAvailable, spxTextPatternNotValid, spxTextReadyToBeInstalled, spxTextRequired, spxTextSelect, spxTextSelectYourCompany, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort, spxTextUpdate, spxTextUpdateAppVersion, spxTextUpdateAvailable, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateStatusCompleted, spxTextUpdateStatusFailed, spxTextUpdateStatusPreparing, spxTextUpdateStatusSyncing, spxTextUpdateVersionInfo };
92
96
  export type { SpxTranslateI };
@@ -8,7 +8,6 @@ import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
8
8
  import * as rxjs from 'rxjs';
9
9
  import { Observable } from 'rxjs';
10
10
  import * as _ngrx_effects from '@ngrx/effects';
11
- import { Actions } from '@ngrx/effects';
12
11
 
13
12
  declare class SpxUpdatePageComponent {
14
13
  private readonly appStore;
@@ -66,8 +65,10 @@ declare const spxUpdateUrl = "";
66
65
  declare const spxUpdateCheckActions: {
67
66
  anUpdateIsReady: _ngrx_store.ActionCreator<"[SpxUpdateCheck] anUpdateIsReady", () => _ngrx_store.Action<"[SpxUpdateCheck] anUpdateIsReady">>;
68
67
  checkFailed: _ngrx_store.ActionCreator<"[SpxUpdateCheck] checkFailed", (props: {
68
+ errorReason?: string;
69
69
  startUpdateAgainAfterTimeout?: boolean;
70
70
  }) => {
71
+ errorReason?: string;
71
72
  startUpdateAgainAfterTimeout?: boolean;
72
73
  } & _ngrx_store.Action<"[SpxUpdateCheck] checkFailed">>;
73
74
  clearError: _ngrx_store.ActionCreator<"[SpxUpdateCheck] clearError", () => _ngrx_store.Action<"[SpxUpdateCheck] clearError">>;
@@ -94,6 +95,7 @@ declare class Effects$1 {
94
95
  whenCheckHasFailed$: Observable<any>;
95
96
  whenCheckHasFailedShowError$: Observable<any>;
96
97
  whenNoUpdateWasFound$: Observable<any>;
98
+ private getReadableErrorReason;
97
99
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Effects$1, never>;
98
100
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<Effects$1>;
99
101
  }
@@ -147,8 +149,10 @@ declare const SpxUpdatePendingActions: {
147
149
 
148
150
  declare class Effects {
149
151
  private readonly actions$;
150
- constructor(actions$: Actions);
152
+ private readonly appStore;
153
+ private readonly translateService;
151
154
  whenAccepted$: rxjs.Observable<_ngrx_store.Action<"[SpxUpdatePending] AcceptUpdate">> & _ngrx_effects.CreateEffectMetadata;
155
+ private getReadableErrorReason;
152
156
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Effects, never>;
153
157
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<Effects>;
154
158
  }