@softpak/components 20.10.1 → 20.12.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/softpak-components-spx-channel-selection.mjs +26 -46
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-redux.mjs +17 -0
- package/fesm2022/softpak-components-spx-redux.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-storage.mjs +1 -0
- package/fesm2022/softpak-components-spx-storage.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +12 -21
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-welcome.mjs +8 -8
- package/fesm2022/softpak-components-spx-welcome.mjs.map +1 -1
- package/package.json +36 -32
- package/spx-channel-selection/index.d.ts +16 -34
- package/spx-redux/index.d.ts +16 -0
- package/spx-storage/index.d.ts +1 -0
- package/spx-welcome/index.d.ts +1 -1
|
@@ -1,38 +1,28 @@
|
|
|
1
|
-
import * as i2 from '@angular/router';
|
|
2
1
|
import { Router } from '@angular/router';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
3
|
import { inject, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
|
|
5
4
|
import { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';
|
|
6
|
-
import { createAction, props, union, createFeature, createReducer, on, Store } from '@ngrx/store';
|
|
7
|
-
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
8
|
-
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
9
5
|
import { Capacitor } from '@capacitor/core';
|
|
10
|
-
import {
|
|
6
|
+
import { NavController } from '@ionic/angular';
|
|
7
|
+
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
11
8
|
import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
|
|
9
|
+
import { createActionGroup, props, createFeature, createReducer, on, Store } from '@ngrx/store';
|
|
10
|
+
import { TranslatePipe } from '@ngx-translate/core';
|
|
11
|
+
import { map } from 'rxjs';
|
|
12
|
+
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
12
13
|
import { spxTextChange } from '@softpak/components/spx-translate';
|
|
13
|
-
import { NavController } from '@ionic/angular';
|
|
14
14
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
15
|
-
import {
|
|
16
|
-
import * as i1 from '@ngrx/effects';
|
|
17
|
-
import { createEffect, ofType } from '@ngrx/effects';
|
|
18
|
-
import { switchMap } from 'rxjs/operators';
|
|
19
|
-
import { setConfig } from '@capacitor/live-updates';
|
|
20
|
-
import { spxUpdateUrl } from '@softpak/components/spx-update';
|
|
15
|
+
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
|
21
16
|
import { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
const choose = createAction('[SPX / Channel] Select', props());
|
|
26
|
-
const initialize = createAction('[SPX / Channel] Initialize', props());
|
|
27
|
-
const all = union({
|
|
28
|
-
choose,
|
|
29
|
-
initialize,
|
|
30
|
-
});
|
|
17
|
+
import { spxUpdateUrl } from '@softpak/components/spx-update';
|
|
18
|
+
import { switchMap } from 'rxjs/operators';
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
const SpxChannelActions = createActionGroup({
|
|
21
|
+
source: 'SpxChannel',
|
|
22
|
+
events: {
|
|
23
|
+
Choose: props(),
|
|
24
|
+
Initialize: props(),
|
|
25
|
+
},
|
|
36
26
|
});
|
|
37
27
|
|
|
38
28
|
const initialState = {
|
|
@@ -68,7 +58,7 @@ const determineActiveChannel = (channels) => {
|
|
|
68
58
|
};
|
|
69
59
|
var spxChannelReducer$1 = createFeature({
|
|
70
60
|
name: 'spxChannel',
|
|
71
|
-
reducer: createReducer(initialState, on(choose, (state, { channel, channelType }) => {
|
|
61
|
+
reducer: createReducer(initialState, on(SpxChannelActions.choose, (state, { channel, channelType }) => {
|
|
72
62
|
SpxStorage.setSetting(SpxStorageKeyEnum.brand, channel?.brand);
|
|
73
63
|
SpxStorage.setSetting(SpxStorageKeyEnum.channelType, channelType);
|
|
74
64
|
return {
|
|
@@ -76,7 +66,7 @@ var spxChannelReducer$1 = createFeature({
|
|
|
76
66
|
previousChannel: state.channel,
|
|
77
67
|
channel,
|
|
78
68
|
};
|
|
79
|
-
}), on(initialize, (state, { channels }) => {
|
|
69
|
+
}), on(SpxChannelActions.initialize, (state, { channels }) => {
|
|
80
70
|
let channelType = null;
|
|
81
71
|
if (SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {
|
|
82
72
|
channelType = { name: SpxStorage.getSetting(SpxStorageKeyEnum.channelType) };
|
|
@@ -104,7 +94,7 @@ class SpxChannelIndicatorComponent {
|
|
|
104
94
|
constructor() {
|
|
105
95
|
this.navController = inject(NavController);
|
|
106
96
|
this.store = inject(Store);
|
|
107
|
-
this.channel =
|
|
97
|
+
this.channel = this.store.selectSignal(spxChannelReducer$1.selectChannel);
|
|
108
98
|
this.channelType = toSignal(this.store.select(spxChannelReducer$1.selectChannelType).pipe(map(channelType => channelType?.name)));
|
|
109
99
|
this.spxTextChange = spxTextChange;
|
|
110
100
|
}
|
|
@@ -149,11 +139,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
|
|
|
149
139
|
}] });
|
|
150
140
|
|
|
151
141
|
class Effects {
|
|
152
|
-
constructor(
|
|
153
|
-
this.actions$ =
|
|
154
|
-
this.router =
|
|
155
|
-
this.
|
|
156
|
-
this.onChoose$ = createEffect(() => this.actions$.pipe(ofType(choose), switchMap((action) => {
|
|
142
|
+
constructor() {
|
|
143
|
+
this.actions$ = inject(Actions);
|
|
144
|
+
this.router = inject(Router);
|
|
145
|
+
this.onChoose$ = createEffect(() => this.actions$.pipe(ofType(SpxChannelActions.choose), switchMap((action) => {
|
|
157
146
|
if (Capacitor.getPlatform() === 'web') {
|
|
158
147
|
const channelType = action.channel.channelTypes.find(channelType => channelType.name === action.channelType);
|
|
159
148
|
if (channelType.webUrl && !window.location.href.includes('http://localhost') && window.location.href.replace(channelType.webUrl, '').replace(channelType.oldWebUrl, '').split('/').at(0) !== '') {
|
|
@@ -164,16 +153,7 @@ class Effects {
|
|
|
164
153
|
}
|
|
165
154
|
}
|
|
166
155
|
else {
|
|
167
|
-
|
|
168
|
-
const binaryVersionGroup = binaryInfo.version.substring(0, 3);
|
|
169
|
-
setConfig({
|
|
170
|
-
channel: `${action.channelType}-${binaryVersionGroup}.x`
|
|
171
|
-
});
|
|
172
|
-
this.router.navigate([spxUpdateUrl]);
|
|
173
|
-
}).catch((err) => {
|
|
174
|
-
captureMessage(`SPX Channel Error: ${JSON.stringify(err)}`);
|
|
175
|
-
this.router.navigate([spxUpdateUrl]);
|
|
176
|
-
});
|
|
156
|
+
this.router.navigate([spxUpdateUrl]);
|
|
177
157
|
}
|
|
178
158
|
return [spxToasterActions.createSuccess({
|
|
179
159
|
autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,
|
|
@@ -181,12 +161,12 @@ class Effects {
|
|
|
181
161
|
})];
|
|
182
162
|
})), { dispatch: true });
|
|
183
163
|
}
|
|
184
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: Effects, deps: [
|
|
164
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: Effects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
185
165
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: Effects }); }
|
|
186
166
|
}
|
|
187
167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: Effects, decorators: [{
|
|
188
168
|
type: Injectable
|
|
189
|
-
}]
|
|
169
|
+
}] });
|
|
190
170
|
|
|
191
171
|
var spxChannel_effects = /*#__PURE__*/Object.freeze({
|
|
192
172
|
__proto__: null,
|
|
@@ -197,5 +177,5 @@ var spxChannel_effects = /*#__PURE__*/Object.freeze({
|
|
|
197
177
|
* Generated bundle index. Do not edit.
|
|
198
178
|
*/
|
|
199
179
|
|
|
200
|
-
export { SpxChannelGuard, SpxChannelIndicatorComponent,
|
|
180
|
+
export { SpxChannelActions, SpxChannelGuard, SpxChannelIndicatorComponent, spxChannel_effects as spxChannelEffects, spxChannel_reducer as spxChannelReducer, spxChannelSelectionUrl };
|
|
201
181
|
//# sourceMappingURL=softpak-components-spx-channel-selection.mjs.map
|
|
@@ -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 { createAction, props, union } from '@ngrx/store';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\n\nexport const choose = createAction('[SPX / Channel] Select', props<{\n channel: SpxAppChannelI;\n channelType: SpxAppChannelTypeEnum;\n}>());\nexport const initialize = createAction('[SPX / Channel] Initialize', props<{\n channels: SpxAppChannelI[];\n}>());\n\nconst all = union({\n choose,\n initialize,\n});\n\nexport type Actions = typeof all;\n","\nimport * as actions from './spx-channel.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum, SpxChannelTypeI } from '@softpak/components/spx-app-configuration';\nimport { Capacitor } from '@capacitor/core';\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 reducer: createReducer(\n initialState,\n on(actions.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(actions.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';\nimport { Store } from '@ngrx/store';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport spxChannelReducer from '../../store/spx-channel.reducer';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextChange } from '@softpak/components/spx-translate';\nimport { NavController } from '@ionic/angular';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { map } from 'rxjs';\nimport { Capacitor } from '@capacitor/core';\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 = toSignal(this.store.select(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 { switchMap, withLatestFrom } from 'rxjs/operators';\nimport { inject, Injectable } from '@angular/core';\nimport * as actions from './spx-channel.actions';\nimport { setConfig } from '@capacitor/live-updates';\nimport { Capacitor } from '@capacitor/core';\nimport { Router } from '@angular/router';\nimport { spxUpdateUrl } from '@softpak/components/spx-update';\nimport { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';\nimport { captureMessage } from '@sentry/angular';\nimport { App } from '@capacitor/app';\nimport { Store } from '@ngrx/store';\n\n@Injectable()\nexport class Effects {\n store = inject(Store);\n\n onChoose$ =\n createEffect(() =>\n this.actions$.pipe(\n ofType(actions.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 } else {\n App.getInfo().then((binaryInfo) => {\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\n setConfig({\n channel: `${action.channelType}-${binaryVersionGroup}.x`\n });\n this.router.navigate([spxUpdateUrl]);\n }).catch((err) => {\n captureMessage(`SPX Channel Error: ${JSON.stringify(err)}`);\n this.router.navigate([spxUpdateUrl]);\n });\n }\n\n return [spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n })];\n }),\n ), { dispatch: true });\n\n constructor(\n private readonly actions$: Actions,\n private readonly router: Router,\n ) { }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.choose","actions.initialize","spxChannelReducer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,MAAM,GAAG,YAAY,CAAC,wBAAwB,EAAE,KAAK,EAG9D,CAAC;AACE,MAAM,UAAU,GAAG,YAAY,CAAC,4BAA4B,EAAE,KAAK,EAEtE,CAAC;AAEL,MAAM,GAAG,GAAG,KAAK,CAAC;IACd,MAAM;IACN,UAAU;AACb,CAAA,CAAC;;;;;;;;ACPK,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,YAAY,CAAC,IAAI,CAAC,CAAC,CAAkB,KAAK,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAA0B,CAAC,CAAC;QAC/P,IAAI,a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,CAAC;IAK1B;8GAtCK,OAAO,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,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;;;;;;;;ACbD;;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<{\n channel: SpxAppChannelI;\n channelType: SpxAppChannelTypeEnum;\n }>(),\n Initialize: props<{\n channels: SpxAppChannelI[];\n }>(),\n },\n});\n","import { SpxAppChannelI, SpxAppChannelTypeEnum, SpxChannelTypeI } from '@softpak/components/spx-app-configuration';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { createFeature, createReducer, 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 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';\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 { Capacitor } from '@capacitor/core';\nimport { Router } from '@angular/router';\nimport { SpxChannelActions } from './spx-channel.actions';\nimport { spxUpdateUrl } from '@softpak/components/spx-update';\nimport { switchMap } from 'rxjs/operators';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n private readonly router = inject(Router);\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 } else {\n this.router.navigate([spxUpdateUrl]);\n }\n return [spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n })];\n }),\n ), { dispatch: true });\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxChannelReducer"],"mappings":";;;;;;;;;;;;;;;;;;;AAGO,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAC/C,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,MAAM,EAAE;QACJ,MAAM,EAAE,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oBAAA,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK;AACrC,iBAAA,CAAC,CAAC;QACP,CAAC,CAAC,CACL,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACjC,IAAA;8GAzBY,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;;;;;;;;ACVD;;AAEG;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { emptyProps, props } from '@ngrx/store';
|
|
2
|
+
|
|
3
|
+
function spxCreateActionsForAPI() {
|
|
4
|
+
return {
|
|
5
|
+
Error: props(),
|
|
6
|
+
Load: props(),
|
|
7
|
+
Received: props(),
|
|
8
|
+
Reset: emptyProps(),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Generated bundle index. Do not edit.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export { spxCreateActionsForAPI };
|
|
17
|
+
//# sourceMappingURL=softpak-components-spx-redux.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-redux.mjs","sources":["../../../../projects/softpak/components/spx-redux/src/spx-create-actions-for-api.ts","../../../../projects/softpak/components/spx-redux/softpak-components-spx-redux.ts"],"sourcesContent":["import { emptyProps, props } from \"@ngrx/store\";\n\nexport function spxCreateActionsForAPI<TQuery, TResult, TMsg = string>() {\n return {\n Error: props<{ error: TMsg }>(),\n Load: props<{ query: TQuery }>(),\n Received: props<{ result: TResult }>(),\n Reset: emptyProps(),\n };\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;SAEgB,sBAAsB,GAAA;IACpC,OAAO;QACL,KAAK,EAAE,KAAK,EAAmB;QAC/B,IAAI,EAAE,KAAK,EAAqB;QAChC,QAAQ,EAAE,KAAK,EAAuB;QACtC,KAAK,EAAE,UAAU,EAAE;KACpB;AACH;;ACTA;;AAEG;;;;"}
|
|
@@ -8,6 +8,7 @@ var SpxStorageKeyEnum;
|
|
|
8
8
|
SpxStorageKeyEnum["channelType"] = "channelType";
|
|
9
9
|
SpxStorageKeyEnum["channelSettings"] = "companySettings";
|
|
10
10
|
SpxStorageKeyEnum["liveUpdate"] = "liveUpdate";
|
|
11
|
+
SpxStorageKeyEnum["liveUpdateChannel"] = "liveUpdateChannel";
|
|
11
12
|
SpxStorageKeyEnum["platform"] = "platform";
|
|
12
13
|
SpxStorageKeyEnum["platformVersion"] = "platformVersion";
|
|
13
14
|
SpxStorageKeyEnum["token"] = "token";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-storage.mjs","sources":["../../../../projects/softpak/components/spx-storage/src/spx-storage-key.enum.ts","../../../../projects/softpak/components/spx-storage/src/spx-storage.class.ts","../../../../projects/softpak/components/spx-storage/softpak-components-spx-storage.ts"],"sourcesContent":["export enum SpxStorageKeyEnum {\n afterSignIn = 'afterSignIn',\n brand = 'brand',\n binaryVersionGroup = 'binaryVersionGroup',\n bundleVersion = 'bundleVersion',\n lastBinaryVersionGroup = 'lastBinaryVersionGroup',\n channelType = 'channelType',\n channelSettings = 'companySettings',\n liveUpdate = 'liveUpdate',\n platform = 'platform',\n platformVersion = 'platformVersion',\n token = 'token',\n updateInProgress = 'updateInProgress',\n randomDeviceId = 'randomDeviceId',\n release = 'release',\n patch = 'patch',\n username = 'username',\n};\n","import { SpxStorageKeyEnum } from './spx-storage-key.enum';\n\nexport class SpxStorage {\n private static get channelId() {\n return `${this.getSetting(SpxStorageKeyEnum.brand)?.toUpperCase()}_${this.getSetting(SpxStorageKeyEnum.channelType)?.toUpperCase()}`;\n }\n\n public static clearSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): void {\n localStorage.removeItem(key as string);\n }\n\n public static getSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | null {\n return localStorage.getItem(key as string);\n }\n\n public static setSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: string): void {\n localStorage.setItem(key as string, settingValue);\n }\n\n public static getChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | undefined {\n let storageObj;\n const storageObjStr = localStorage.getItem(SpxStorageKeyEnum.channelSettings);\n\n if (storageObjStr) {\n storageObj = JSON.parse(storageObjStr);\n if (!storageObj[this.channelId]) {\n return undefined;\n }\n return storageObj[this.channelId][key];\n } else {\n return undefined;\n }\n }\n\n public static setChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: any): void {\n const companySettings = this.getSetting(SpxStorageKeyEnum.channelSettings);\n let storageObj;\n\n if (companySettings) {\n storageObj = JSON.parse(companySettings);\n } else {\n storageObj = {};\n }\n\n if (!storageObj[this.channelId]) {\n storageObj[this.channelId] = {};\n }\n\n storageObj[this.channelId][key] = settingValue;\n this.setSetting(SpxStorageKeyEnum.channelSettings, JSON.stringify(storageObj));\n }\n}\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AACzB,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,oBAAA,CAAA,GAAA,oBAAyC;AACzC,IAAA,iBAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/B,IAAA,iBAAA,CAAA,wBAAA,CAAA,GAAA,wBAAiD;AACjD,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,iBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,iBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjC,IAAA,iBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACzB,CAAC,
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-storage.mjs","sources":["../../../../projects/softpak/components/spx-storage/src/spx-storage-key.enum.ts","../../../../projects/softpak/components/spx-storage/src/spx-storage.class.ts","../../../../projects/softpak/components/spx-storage/softpak-components-spx-storage.ts"],"sourcesContent":["export enum SpxStorageKeyEnum {\n afterSignIn = 'afterSignIn',\n brand = 'brand',\n binaryVersionGroup = 'binaryVersionGroup',\n bundleVersion = 'bundleVersion',\n lastBinaryVersionGroup = 'lastBinaryVersionGroup',\n channelType = 'channelType',\n channelSettings = 'companySettings',\n liveUpdate = 'liveUpdate',\n liveUpdateChannel = 'liveUpdateChannel',\n platform = 'platform',\n platformVersion = 'platformVersion',\n token = 'token',\n updateInProgress = 'updateInProgress',\n randomDeviceId = 'randomDeviceId',\n release = 'release',\n patch = 'patch',\n username = 'username',\n};\n","import { SpxStorageKeyEnum } from './spx-storage-key.enum';\n\nexport class SpxStorage {\n private static get channelId() {\n return `${this.getSetting(SpxStorageKeyEnum.brand)?.toUpperCase()}_${this.getSetting(SpxStorageKeyEnum.channelType)?.toUpperCase()}`;\n }\n\n public static clearSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): void {\n localStorage.removeItem(key as string);\n }\n\n public static getSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | null {\n return localStorage.getItem(key as string);\n }\n\n public static setSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: string): void {\n localStorage.setItem(key as string, settingValue);\n }\n\n public static getChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | undefined {\n let storageObj;\n const storageObjStr = localStorage.getItem(SpxStorageKeyEnum.channelSettings);\n\n if (storageObjStr) {\n storageObj = JSON.parse(storageObjStr);\n if (!storageObj[this.channelId]) {\n return undefined;\n }\n return storageObj[this.channelId][key];\n } else {\n return undefined;\n }\n }\n\n public static setChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: any): void {\n const companySettings = this.getSetting(SpxStorageKeyEnum.channelSettings);\n let storageObj;\n\n if (companySettings) {\n storageObj = JSON.parse(companySettings);\n } else {\n storageObj = {};\n }\n\n if (!storageObj[this.channelId]) {\n storageObj[this.channelId] = {};\n }\n\n storageObj[this.channelId][key] = settingValue;\n this.setSetting(SpxStorageKeyEnum.channelSettings, JSON.stringify(storageObj));\n }\n}\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AACzB,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,oBAAA,CAAA,GAAA,oBAAyC;AACzC,IAAA,iBAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/B,IAAA,iBAAA,CAAA,wBAAA,CAAA,GAAA,wBAAiD;AACjD,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,iBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,iBAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;AACvC,IA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aAAa,CAAC;YACtC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AAC7B,gBAAA,OAAO,SAAS;YACpB;YACA,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC;QAC1C;aAAO;AACH,YAAA,OAAO,SAAS;QACpB;IACJ;AAEO,IAAA,OAAO,iBAAiB,CAAU,GAAgC,EAAE,YAAiB,EAAA;QACxF,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,eAAe,CAAC;AAC1E,QAAA,IAAI,UAAU;QAEd,IAAI,eAAe,EAAE;AACjB,YAAA,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QAC5C;aAAO;YACH,UAAU,GAAG,EAAE;QACnB;QAEA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AAC7B,YAAA,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE;QACnC;QAEA,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,GAAG,YAAY;AAC9C,QAAA,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAClF;AACH;;ACnDD;;AAEG;;;;"}
|
|
@@ -14,9 +14,9 @@ import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
|
14
14
|
import * as i2$1 from '@angular/platform-browser';
|
|
15
15
|
import * as i1$1 from '@ngrx/effects';
|
|
16
16
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
|
17
|
+
import { LiveUpdate } from '@capawesome/capacitor-live-update';
|
|
17
18
|
import { from, of } from 'rxjs';
|
|
18
19
|
import { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';
|
|
19
|
-
import { getConfig, setConfig, sync, reload } from '@capacitor/live-updates';
|
|
20
20
|
import { delay, mergeMap, tap, exhaustMap, map, catchError } from 'rxjs/operators';
|
|
21
21
|
import { App } from '@capacitor/app';
|
|
22
22
|
import { Capacitor } from '@capacitor/core';
|
|
@@ -260,7 +260,7 @@ const spxUpdateUrl = '';
|
|
|
260
260
|
let Effects$1 = class Effects {
|
|
261
261
|
constructor() {
|
|
262
262
|
this.actions$ = inject(Actions);
|
|
263
|
-
this.afterInitialize$ = createEffect(() => this.actions$.pipe(ofType(initialize), delay(
|
|
263
|
+
this.afterInitialize$ = createEffect(() => this.actions$.pipe(ofType(initialize), delay(300000), mergeMap(() => [
|
|
264
264
|
runCheck({}),
|
|
265
265
|
])));
|
|
266
266
|
this.onRun$ = createEffect(() => this.actions$.pipe(ofType(runCheck), tap(async () => {
|
|
@@ -268,28 +268,19 @@ let Effects$1 = class Effects {
|
|
|
268
268
|
// Migrate from e.g. 1.2.x to 1.3.x
|
|
269
269
|
const binaryInfo = await App.getInfo();
|
|
270
270
|
const binaryVersionGroup = binaryInfo.version.substring(0, 3);
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
SpxStorage.setSetting(SpxStorageKeyEnum.binaryVersionGroup, `${binaryVersionGroup}.x`);
|
|
275
|
-
SpxStorage.setSetting(SpxStorageKeyEnum.lastBinaryVersionGroup, `${channelVersionGroup}.x`);
|
|
276
|
-
// Temp fix
|
|
277
|
-
if (channelType === 'null') {
|
|
278
|
-
channelType = 'Production';
|
|
279
|
-
}
|
|
280
|
-
// End temp fix
|
|
281
|
-
if (channelType === null || binaryVersionGroup != channelVersionGroup) {
|
|
282
|
-
await setConfig({
|
|
283
|
-
channel: `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`
|
|
284
|
-
});
|
|
271
|
+
let channelType = SpxStorage.getSetting(SpxStorageKeyEnum.channelType);
|
|
272
|
+
if (SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup)) {
|
|
273
|
+
SpxStorage.setSetting(SpxStorageKeyEnum.lastBinaryVersionGroup, SpxStorage.getSetting(SpxStorageKeyEnum.binaryVersionGroup));
|
|
285
274
|
}
|
|
275
|
+
SpxStorage.setSetting(SpxStorageKeyEnum.binaryVersionGroup, `${binaryVersionGroup}.x`);
|
|
276
|
+
SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdateChannel, `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`);
|
|
286
277
|
// End migrate from e.g. 1.2.x to 1.3.x
|
|
287
278
|
}
|
|
288
|
-
}), exhaustMap((action) => from(sync()).pipe(map((syncResult) => {
|
|
289
|
-
if (syncResult.
|
|
290
|
-
SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.
|
|
279
|
+
}), exhaustMap((action) => from(LiveUpdate.sync({ channel: SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel) })).pipe(map((syncResult) => {
|
|
280
|
+
if (syncResult.nextBundleId) {
|
|
281
|
+
SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.nextBundleId);
|
|
291
282
|
if (action.forceWaitForUpdate) {
|
|
292
|
-
reload();
|
|
283
|
+
LiveUpdate.reload();
|
|
293
284
|
}
|
|
294
285
|
return anUpdateIsReady({});
|
|
295
286
|
}
|
|
@@ -332,7 +323,7 @@ class Effects {
|
|
|
332
323
|
constructor(actions$) {
|
|
333
324
|
this.actions$ = actions$;
|
|
334
325
|
this.whenAccepted$ = createEffect(() => this.actions$.pipe(ofType(acceptUpdate), mergeMap(() => {
|
|
335
|
-
reload();
|
|
326
|
+
LiveUpdate.reload();
|
|
336
327
|
return [];
|
|
337
328
|
})));
|
|
338
329
|
}
|
|
@@ -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 { createAction, props, union } from '@ngrx/store';\n\nexport const anUpdateIsReady = createAction('[SPX / Update Check] An update is ready', props<Record<string, unknown>>());\nexport const clearError = createAction('[SPX / Update Check] Clear error', props<Record<string, unknown>>());\nexport const checkFailed = createAction('[SPX / Update Check] Error happened', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const initialize = createAction('[SPX / Update Check] Initialize', props<Record<string, unknown>>());\nexport const noUpdateWasFound = createAction('[SPX / Update Check] No update was found', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const notAvailableOnWeb = createAction('[SPX / Update Check] Not available on web', props<Record<string, unknown>>());\nexport const runCheck = createAction('[SPX / Update Check] Run', props<{ forceWaitForUpdate?: boolean; }>());\n\nconst all = union({\n anUpdateIsReady,\n clearError,\n checkFailed,\n initialize,\n noUpdateWasFound,\n notAvailableOnWeb,\n runCheck,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-check.state\";\n\nexport const initialState: StateI = {\n forceWaitForUpdate: false,\n lastCheck: null,\n showError: false,\n};\n","\nimport * as actions from './spx-update-check.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-update-check.state';\nimport { initialState } from './spx-update-check.initial';\nimport { DateTime } from 'luxon';\n \nexport default createFeature({\n name: 'spxUpdateCheck',\n reducer: createReducer(\n initialState,\n on(actions.anUpdateIsReady, (state: StateI): StateI => {\n return {\n ...state,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.clearError, (state: StateI): StateI => {\n return {\n ...state,\n showError: false,\n };\n }),\n on(actions.checkFailed, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n showError: true,\n };\n }),\n on(actions.noUpdateWasFound, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate\n };\n }),\n on(actions.notAvailableOnWeb, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false\n };\n }),\n ),\n});\n","import { Component } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { runCheck } from './store/spx-update-check/spx-update-check.actions';\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\nimport { unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextCheckingForUpdates, spxTextOneMomentPlease } from '@softpak/components/spx-translate';\nimport { ActivatedRoute } from '@angular/router';\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 spxTextCheckingForUpdates = spxTextCheckingForUpdates;\n spxTextOneMomentPlease = spxTextOneMomentPlease;\n\n private subscriptions: {\n updCheck?: Subscription;\n } = {};\n\n ngOnInit() {\n this.appStore.dispatch(runCheck({ forceWaitForUpdate: true }));\n this.subscriptions.updCheck = this.appStore.select(updCheck.selectForceWaitForUpdate).subscribe(forceWaitForUpdate => {\n if (forceWaitForUpdate === false) {\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\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n private readonly activatedRoute: ActivatedRoute,\n private readonly navController: NavController,\n ) {\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 {{ spxTextOneMomentPlease | translate | capitalize }}...\n</ion-content>\n","import { createAction, props, union } from '@ngrx/store';\n\nexport const acceptUpdate = createAction('[SPX / Update Pending] Accept update', props<Record<string, unknown>>());\nexport const hasBeenDownloaded = createAction('[SPX / Update Pending] Has been downloaded', props<Record<string, unknown>>());\nexport const hasBeenInstalled = createAction('[SPX / Update Pending] Has been installed', props<Record<string, unknown>>());\nexport const postpone = createAction('[SPX / Update Pending] Postpone', props<Record<string, unknown>>());\nexport const postponeExpired = createAction('[SPX / Update Pending] Postpone expired', props<Record<string, unknown>>());\n\nconst all = union({\n acceptUpdate,\n hasBeenDownloaded,\n hasBeenInstalled,\n postpone,\n postponeExpired,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-pending.state\";\n\nexport const initialState: StateI = {\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n};\n","\nimport * as actions from './spx-update-pending.actions';\nimport { createReducer, on, createFeature } from '@ngrx/store';\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(actions.hasBeenDownloaded, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n updateIsDownloadedAndPending: true,\n };\n }),\n on(actions.hasBeenInstalled, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n };\n }),\n on(actions.postpone, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n };\n }),\n on(actions.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 { TranslatePipe } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { acceptUpdate } from './store/spx-update-pending/spx-update-pending.actions';\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser';\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(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 * as actions from './spx-update-check.actions';\n\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable, from, of } from 'rxjs';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { SyncResult, getConfig, reload, setConfig, sync } from '@capacitor/live-updates';\nimport { catchError, delay, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\n\nimport { App } from '@capacitor/app';\nimport { Capacitor } from '@capacitor/core';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { captureMessage } from '@sentry/angular';\nimport { hasBeenDownloaded } from '../spx-update-pending/spx-update-pending.actions';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.initialize),\n delay(120000),\n mergeMap(() => [\n actions.runCheck({}),\n ]))\n );\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.runCheck),\n tap(async () => {\n if (Capacitor.getPlatform() !== 'web') {\n // Migrate from e.g. 1.2.x to 1.3.x\n const binaryInfo = await App.getInfo()\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\n const config = await getConfig();\n const channelVersionGroup = config.channel!.split('-')[1].substring(0, 3); // e.g. \"1.4\"\n let channelType = config.channel!.split('-')[0];\n\n SpxStorage.setSetting(SpxStorageKeyEnum.binaryVersionGroup, `${binaryVersionGroup}.x`);\n SpxStorage.setSetting(SpxStorageKeyEnum.lastBinaryVersionGroup, `${channelVersionGroup}.x`);\n\n // Temp fix\n if (channelType === 'null') {\n channelType = 'Production';\n }\n // End temp fix\n if (channelType === null || binaryVersionGroup != channelVersionGroup) {\n await setConfig({\n channel: `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`\n });\n }\n // End migrate from e.g. 1.2.x to 1.3.x\n }\n }),\n exhaustMap((action) => from(sync()).pipe(\n map((syncResult: SyncResult) => {\n if (syncResult.activeApplicationPathChanged) {\n SpxStorage.setSetting(SpxStorageKeyEnum.liveUpdate, syncResult.snapshot?.buildId as string);\n if (action.forceWaitForUpdate) {\n reload();\n }\n return actions.anUpdateIsReady({});\n } else {\n return actions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });\n }\n }),\n catchError((err) => {\n if (err.message !== 'Not implemented for web only') {\n captureMessage(\"[UPD] Handled: \" + err.message);\n }\n return err.message === 'Not implemented for web only' ? of(actions.notAvailableOnWeb({})) : of(actions.checkFailed({ startUpdateAgainAfterTimeout: false }))\n })\n )),\n ));\n\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.anUpdateIsReady),\n mergeMap(() => [\n hasBeenDownloaded({}),\n ]))\n );\n\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.checkFailed),\n delay(30000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.noUpdateWasFound),\n delay(120000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n}\n\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Observable } from 'rxjs';\nimport { mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-update-pending.actions';\nimport { reload } from '@capacitor/live-updates';\n\n@Injectable()\nexport class Effects {\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAccepted$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.acceptUpdate),\n mergeMap(() => {\n reload();\n return []; \n })) as any\n );\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["all","initialState","actions.anUpdateIsReady","actions.clearError","actions.checkFailed","actions.noUpdateWasFound","actions.runCheck","actions.notAvailableOnWeb","actions.hasBeenDownloaded","actions.hasBeenInstalled","actions.postpone","actions.postponeExpired","i2","actions.initialize","Effects","actions.acceptUpdate","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,YAAY,CAAC,yCAAyC,EAAE,KAAK,EAA2B,CAAC;AACjH,MAAM,UAAU,GAAG,YAAY,CAAC,kCAAkC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ects/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 { createAction, props, union } from '@ngrx/store';\n\nexport const anUpdateIsReady = createAction('[SPX / Update Check] An update is ready', props<Record<string, unknown>>());\nexport const clearError = createAction('[SPX / Update Check] Clear error', props<Record<string, unknown>>());\nexport const checkFailed = createAction('[SPX / Update Check] Error happened', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const initialize = createAction('[SPX / Update Check] Initialize', props<Record<string, unknown>>());\nexport const noUpdateWasFound = createAction('[SPX / Update Check] No update was found', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const notAvailableOnWeb = createAction('[SPX / Update Check] Not available on web', props<Record<string, unknown>>());\nexport const runCheck = createAction('[SPX / Update Check] Run', props<{ forceWaitForUpdate?: boolean; }>());\n\nconst all = union({\n anUpdateIsReady,\n clearError,\n checkFailed,\n initialize,\n noUpdateWasFound,\n notAvailableOnWeb,\n runCheck,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-check.state\";\n\nexport const initialState: StateI = {\n forceWaitForUpdate: false,\n lastCheck: null,\n showError: false,\n};\n","\nimport * as actions from './spx-update-check.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-update-check.state';\nimport { initialState } from './spx-update-check.initial';\nimport { DateTime } from 'luxon';\n \nexport default createFeature({\n name: 'spxUpdateCheck',\n reducer: createReducer(\n initialState,\n on(actions.anUpdateIsReady, (state: StateI): StateI => {\n return {\n ...state,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.clearError, (state: StateI): StateI => {\n return {\n ...state,\n showError: false,\n };\n }),\n on(actions.checkFailed, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n showError: true,\n };\n }),\n on(actions.noUpdateWasFound, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate\n };\n }),\n on(actions.notAvailableOnWeb, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false\n };\n }),\n ),\n});\n","import { Component } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { runCheck } from './store/spx-update-check/spx-update-check.actions';\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\nimport { unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextCheckingForUpdates, spxTextOneMomentPlease } from '@softpak/components/spx-translate';\nimport { ActivatedRoute } from '@angular/router';\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 spxTextCheckingForUpdates = spxTextCheckingForUpdates;\n spxTextOneMomentPlease = spxTextOneMomentPlease;\n\n private subscriptions: {\n updCheck?: Subscription;\n } = {};\n\n ngOnInit() {\n this.appStore.dispatch(runCheck({ forceWaitForUpdate: true }));\n this.subscriptions.updCheck = this.appStore.select(updCheck.selectForceWaitForUpdate).subscribe(forceWaitForUpdate => {\n if (forceWaitForUpdate === false) {\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\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n private readonly activatedRoute: ActivatedRoute,\n private readonly navController: NavController,\n ) {\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 {{ spxTextOneMomentPlease | translate | capitalize }}...\n</ion-content>\n","import { createAction, props, union } from '@ngrx/store';\n\nexport const acceptUpdate = createAction('[SPX / Update Pending] Accept update', props<Record<string, unknown>>());\nexport const hasBeenDownloaded = createAction('[SPX / Update Pending] Has been downloaded', props<Record<string, unknown>>());\nexport const hasBeenInstalled = createAction('[SPX / Update Pending] Has been installed', props<Record<string, unknown>>());\nexport const postpone = createAction('[SPX / Update Pending] Postpone', props<Record<string, unknown>>());\nexport const postponeExpired = createAction('[SPX / Update Pending] Postpone expired', props<Record<string, unknown>>());\n\nconst all = union({\n acceptUpdate,\n hasBeenDownloaded,\n hasBeenInstalled,\n postpone,\n postponeExpired,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-pending.state\";\n\nexport const initialState: StateI = {\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n};\n","\nimport * as actions from './spx-update-pending.actions';\nimport { createReducer, on, createFeature } from '@ngrx/store';\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(actions.hasBeenDownloaded, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n updateIsDownloadedAndPending: true,\n };\n }),\n on(actions.hasBeenInstalled, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n };\n }),\n on(actions.postpone, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n };\n }),\n on(actions.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 { TranslatePipe } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { acceptUpdate } from './store/spx-update-pending/spx-update-pending.actions';\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser';\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(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 * as actions from './spx-update-check.actions';\n\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Injectable, inject } from '@angular/core';\nimport { LiveUpdate, SyncResult } from '@capawesome/capacitor-live-update';\nimport { Observable, from, of } from 'rxjs';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { catchError, delay, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\n\nimport { App } from '@capacitor/app';\nimport { Capacitor } from '@capacitor/core';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { captureMessage } from '@sentry/angular';\nimport { hasBeenDownloaded } from '../spx-update-pending/spx-update-pending.actions';\n\n@Injectable()\nexport class Effects {\n private readonly actions$ = inject(Actions);\n\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.initialize),\n delay(300000),\n mergeMap(() => [\n actions.runCheck({}),\n ]))\n );\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.runCheck),\n tap(async () => {\n if (Capacitor.getPlatform() !== 'web') {\n // Migrate from e.g. 1.2.x to 1.3.x\n const binaryInfo = await App.getInfo()\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\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 }),\n exhaustMap((action) => from(LiveUpdate.sync({ channel: SpxStorage.getSetting(SpxStorageKeyEnum.liveUpdateChannel)! })).pipe(\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 actions.anUpdateIsReady({});\n } else {\n return actions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });\n }\n }),\n catchError((err) => {\n if (err.message !== 'Not implemented for web only') {\n captureMessage(\"[UPD] Handled: \" + err.message);\n }\n return err.message === 'Not implemented for web only' ? of(actions.notAvailableOnWeb({})) : of(actions.checkFailed({ startUpdateAgainAfterTimeout: false }))\n })\n )),\n ));\n\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.anUpdateIsReady),\n mergeMap(() => [\n hasBeenDownloaded({}),\n ]))\n );\n\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.checkFailed),\n delay(30000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.noUpdateWasFound),\n delay(120000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n}\n\n","import * as actions from './spx-update-pending.actions';\n\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\n\nimport { Injectable } from '@angular/core';\nimport { LiveUpdate } from \"@capawesome/capacitor-live-update\";\nimport { Observable } from 'rxjs';\nimport { mergeMap } from 'rxjs/operators';\n\n@Injectable()\nexport class Effects {\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAccepted$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.acceptUpdate),\n mergeMap(() => {\n LiveUpdate.reload();\n return []; \n })) as any\n );\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["all","initialState","actions.anUpdateIsReady","actions.clearError","actions.checkFailed","actions.noUpdateWasFound","actions.runCheck","actions.notAvailableOnWeb","actions.hasBeenDownloaded","actions.hasBeenInstalled","actions.postpone","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ular/core';
|
|
|
2
2
|
import { computed, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import {
|
|
5
|
+
import { IonHeader, IonToolbar, IonTitle, IonButtons, IonContent } from '@ionic/angular/standalone';
|
|
6
|
+
import { spxChannelReducer, SpxChannelActions } from '@softpak/components/spx-channel-selection';
|
|
6
7
|
import { SpxFormButtonTypeEnum, SpxFormViewComponent } from '@softpak/components/spx-form-view';
|
|
7
|
-
import { valuePairToValue, SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';
|
|
8
8
|
import { SpxInputTypeEnum } from '@softpak/components/spx-inputs';
|
|
9
|
-
import {
|
|
9
|
+
import { valuePairToValue, SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';
|
|
10
|
+
import { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
|
|
10
11
|
import { spxTextChannel, spxTextCompany, spxTextSelect, spxTextSelectYourCompany } from '@softpak/components/spx-translate';
|
|
11
|
-
import {
|
|
12
|
+
import { Capacitor } from '@capacitor/core';
|
|
13
|
+
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
12
14
|
import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
|
|
13
15
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
14
|
-
import {
|
|
15
|
-
import { spxChannelReducer, spxChannelActions } from '@softpak/components/spx-channel-selection';
|
|
16
|
+
import { spxValidatorRequired } from '@softpak/components/spx-validation';
|
|
16
17
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
17
|
-
import { Capacitor } from '@capacitor/core';
|
|
18
18
|
import * as i1 from '@ngrx/store';
|
|
19
19
|
|
|
20
20
|
const spxSectionWelcome = 'welcome';
|
|
@@ -105,7 +105,7 @@ class SpxWelcomeComponent {
|
|
|
105
105
|
}));
|
|
106
106
|
}
|
|
107
107
|
else {
|
|
108
|
-
this.store.dispatch(
|
|
108
|
+
this.store.dispatch(SpxChannelActions.choose({
|
|
109
109
|
channel: this.selectedBrand(),
|
|
110
110
|
channelType: this.inputChannelType(),
|
|
111
111
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-welcome.mjs","sources":["../../../../projects/softpak/components/spx-welcome/spx-welcome.component.ts","../../../../projects/softpak/components/spx-welcome/spx-welcome.component.html","../../../../projects/softpak/components/spx-welcome/softpak-components-spx-welcome.ts"],"sourcesContent":["import { Component, OnInit, OnDestroy, signal, computed, ChangeDetectionStrategy } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Store } from '@ngrx/store';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxFormButtonTypeEnum, SpxFormI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, unsubscribeSubscriptions, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\nimport { Subscription } from 'rxjs';\nimport { spxTextChannel, spxTextCompany, spxTextSelect, spxTextSelectYourCompany } from '@softpak/components/spx-translate';\nimport { IonHeader, IonToolbar, IonTitle, IonButtons, IonContent } from '@ionic/angular/standalone';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';\nimport { spxChannelReducer, spxChannelActions } from '@softpak/components/spx-channel-selection';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { Capacitor } from '@capacitor/core';\n\nexport const spxSectionWelcome = 'welcome';\nexport const spxCtrlChannel = 'channel';\nexport const spxCtrlChannelType = 'channelType';\n\n@Component({\n selector: 'spx-welcome',\n templateUrl: './spx-welcome.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxCapitalizePipe,\n SpxFormViewComponent,\n IonHeader,\n IonToolbar,\n IonTitle,\n IonButtons,\n IonContent,\n TranslatePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxWelcomeComponent implements OnInit, OnDestroy {\n allChannels = toSignal(this.store.select(spxChannelReducer.default.selectChannels));\n allBrands = computed(() => this.allChannels()?.filter(channel => channel.channelTypes.map(type => type.name).includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand })));\n inputBrand = signal<string | null>(null);\n inputChannelType = signal<SpxAppChannelTypeEnum | null>(null);\n selectedBrand = computed(() => this.allChannels()?.find(c => c.brand === this.inputBrand()));\n channelTypeSuggestions = computed(() => this.selectedBrand()?.channelTypes?.filter(channelType => Capacitor.getPlatform() === 'web' ? channelType.webUrl !== undefined : channelType.webUrl === undefined)?.map(channelType => ({\n description: channelType.name,\n value: channelType.name\n })));\n\n protected readonly formGroup = signal<FormGroup | undefined>(undefined);\n protected readonly suggestions = signal<{\n [spxCtrlChannelType]?: SpxValuePair<string>[];\n [spxCtrlChannel]?: SpxValuePair<string>[];\n }>({\n [spxCtrlChannelType]: [],\n [spxCtrlChannel]: [],\n });\n\n textChannel = spxTextChannel;\n textCompany = spxTextCompany;\n textSelect = spxTextSelect;\n textSelectYourCompany = spxTextSelectYourCompany;\n\n protected readonly formSection = computed(() => this.formGroup()?.get(spxSectionWelcome) as FormGroup);\n private readonly ctrlChannel = computed(() => this.formSection()?.get(spxCtrlChannel) as FormControl);\n private readonly ctrlChannelType = computed(() => this.formSection()?.get(spxCtrlChannelType) as FormControl);\n private subscriptions: {\n channel?: Subscription;\n channelType?: Subscription;\n } = {};\n\n protected readonly form = signal<SpxFormI>({\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSelect,\n }\n ],\n sections: [\n {\n key: spxSectionWelcome,\n showTitle: () => false,\n fields: [\n {\n key: spxCtrlChannel,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textCompany,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlChannelType,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textChannel,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlChannel().value),\n validators: () => [spxValidatorRequired()],\n },\n ]\n }\n ]\n });\n\n constructor(\n private readonly store: Store,\n private readonly formBuilder: FormBuilder\n ) {\n this.formGroup.set(this.formBuilder.group({\n [spxSectionWelcome]: SpxFormViewComponent.createForm(this.form())\n }));\n }\n\n ngOnDestroy(): void {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n ngOnInit(): void {\n this.suggestions()[spxCtrlChannel] = this.allBrands();\n\n this.subscriptions.channel = this.ctrlChannel().valueChanges.subscribe(valuePair => {\n this.inputBrand.set(valuePairToValue(valuePair));\n this.suggestions()[spxCtrlChannelType] = this.channelTypeSuggestions();\n this.ctrlChannelType().setValue({\n value: SpxAppChannelTypeEnum.production,\n });\n });\n\n this.subscriptions.channelType = this.ctrlChannelType().valueChanges.subscribe(valuePair => {\n this.inputChannelType.set(valuePairToValue(this.ctrlChannelType().value));\n });\n }\n\n protected onSubmit(): void {\n if (!this.selectedBrand() || !this.inputChannelType()) {\n this.store.dispatch(spxToasterActions.createWarning({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: 'Please select a company',\n }))\n } else {\n this.store.dispatch(spxChannelActions.choose({\n channel: this.selectedBrand()!,\n channelType: this.inputChannelType()!,\n }));\n }\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ textSelectYourCompany | translate | capitalize }}\n </ion-title>\n <ion-buttons slot=\"end\">\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content class=\"ion-padding\">\n <form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxForm]=\"form()\"\n [spxFormGroup]=\"formSection()\"\n [spxSuggestions]=\"suggestions()\">\n </spx-form-view>\n </form>\n</ion-content>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAkBO,MAAM,iBAAiB,GAAG;AAC1B,MAAM,cAAc,GAAG;AACvB,MAAM,kBAAkB,GAAG;MAoBrB,mBAAmB,CAAA;IAiE9B,WAAA,CACmB,KAAY,EACZ,WAAwB,EAAA;QADxB,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,WAAW,GAAX,WAAW;AAlE9B,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AACnF,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,qDAAC;AAC9M,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAgB,IAAI,sDAAC;AACxC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAA+B,IAAI,4DAAC;QAC7D,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC,EAAA,IAAA,SAAA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,WAAA,EAAA,IAAA,EACR,UAAU,8EACV,UAAU,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,oBAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EANV,iBAAiB,EAAA,IAAA,EAAA,YAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAOjB,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAlB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,OAAA,EAEd;wBACP,WAAW;wBACX,mBAAmB;wBACnB,iBAAiB;wBACjB,oBAAoB;wBACpB,SAAS;wBACT,UAAU;wBACV,QAAQ;wBACR,UAAU;wBACV,UAAU;wBACV,aAAa;AACd,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,4hBAAA,EAAA;;;AEtClB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-welcome.mjs","sources":["../../../../projects/softpak/components/spx-welcome/spx-welcome.component.ts","../../../../projects/softpak/components/spx-welcome/spx-welcome.component.html","../../../../projects/softpak/components/spx-welcome/softpak-components-spx-welcome.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, computed, signal } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';\nimport { SpxChannelActions, spxChannelReducer } from '@softpak/components/spx-channel-selection';\nimport { SpxFormButtonTypeEnum, SpxFormI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxSeverityEnum, unsubscribeSubscriptions, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxToasterAutoCloseSpeedEnum, spxToasterActions } from '@softpak/components/spx-toaster';\nimport { spxTextChannel, spxTextCompany, spxTextSelect, spxTextSelectYourCompany } from '@softpak/components/spx-translate';\n\nimport { Capacitor } from '@capacitor/core';\nimport { SpxAppChannelTypeEnum, } from '@softpak/components/spx-app-configuration';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nexport const spxSectionWelcome = 'welcome';\nexport const spxCtrlChannel = 'channel';\nexport const spxCtrlChannelType = 'channelType';\n\n@Component({\n selector: 'spx-welcome',\n templateUrl: './spx-welcome.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxCapitalizePipe,\n SpxFormViewComponent,\n IonHeader,\n IonToolbar,\n IonTitle,\n IonButtons,\n IonContent,\n TranslatePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxWelcomeComponent implements OnInit, OnDestroy {\n allChannels = toSignal(this.store.select(spxChannelReducer.default.selectChannels));\n allBrands = computed(() => this.allChannels()?.filter(channel => channel.channelTypes.map(type => type.name).includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand })));\n inputBrand = signal<string | null>(null);\n inputChannelType = signal<SpxAppChannelTypeEnum | null>(null);\n selectedBrand = computed(() => this.allChannels()?.find(c => c.brand === this.inputBrand()));\n channelTypeSuggestions = computed(() => this.selectedBrand()?.channelTypes?.filter(channelType => Capacitor.getPlatform() === 'web' ? channelType.webUrl !== undefined : channelType.webUrl === undefined)?.map(channelType => ({\n description: channelType.name,\n value: channelType.name\n })));\n\n protected readonly formGroup = signal<FormGroup | undefined>(undefined);\n protected readonly suggestions = signal<{\n [spxCtrlChannelType]?: SpxValuePair<string>[];\n [spxCtrlChannel]?: SpxValuePair<string>[];\n }>({\n [spxCtrlChannelType]: [],\n [spxCtrlChannel]: [],\n });\n\n textChannel = spxTextChannel;\n textCompany = spxTextCompany;\n textSelect = spxTextSelect;\n textSelectYourCompany = spxTextSelectYourCompany;\n\n protected readonly formSection = computed(() => this.formGroup()?.get(spxSectionWelcome) as FormGroup);\n private readonly ctrlChannel = computed(() => this.formSection()?.get(spxCtrlChannel) as FormControl);\n private readonly ctrlChannelType = computed(() => this.formSection()?.get(spxCtrlChannelType) as FormControl);\n private subscriptions: {\n channel?: Subscription;\n channelType?: Subscription;\n } = {};\n\n protected readonly form = signal<SpxFormI>({\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSelect,\n }\n ],\n sections: [\n {\n key: spxSectionWelcome,\n showTitle: () => false,\n fields: [\n {\n key: spxCtrlChannel,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textCompany,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlChannelType,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textChannel,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlChannel().value),\n validators: () => [spxValidatorRequired()],\n },\n ]\n }\n ]\n });\n\n constructor(\n private readonly store: Store,\n private readonly formBuilder: FormBuilder\n ) {\n this.formGroup.set(this.formBuilder.group({\n [spxSectionWelcome]: SpxFormViewComponent.createForm(this.form())\n }));\n }\n\n ngOnDestroy(): void {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n ngOnInit(): void {\n this.suggestions()[spxCtrlChannel] = this.allBrands();\n\n this.subscriptions.channel = this.ctrlChannel().valueChanges.subscribe(valuePair => {\n this.inputBrand.set(valuePairToValue(valuePair));\n this.suggestions()[spxCtrlChannelType] = this.channelTypeSuggestions();\n this.ctrlChannelType().setValue({\n value: SpxAppChannelTypeEnum.production,\n });\n });\n\n this.subscriptions.channelType = this.ctrlChannelType().valueChanges.subscribe(valuePair => {\n this.inputChannelType.set(valuePairToValue(this.ctrlChannelType().value));\n });\n }\n\n protected onSubmit(): void {\n if (!this.selectedBrand() || !this.inputChannelType()) {\n this.store.dispatch(spxToasterActions.createWarning({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: 'Please select a company',\n }))\n } else {\n this.store.dispatch(SpxChannelActions.choose({\n channel: this.selectedBrand()!,\n channelType: this.inputChannelType()!,\n }));\n }\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ textSelectYourCompany | translate | capitalize }}\n </ion-title>\n <ion-buttons slot=\"end\">\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content class=\"ion-padding\">\n <form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxForm]=\"form()\"\n [spxFormGroup]=\"formSection()\"\n [spxSuggestions]=\"suggestions()\">\n </spx-form-view>\n </form>\n</ion-content>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAmBO,MAAM,iBAAiB,GAAG;AAC1B,MAAM,cAAc,GAAG;AACvB,MAAM,kBAAkB,GAAG;MAoBrB,mBAAmB,CAAA;IAiE9B,WAAA,CACmB,KAAY,EACZ,WAAwB,EAAA;QADxB,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,WAAW,GAAX,WAAW;AAlE9B,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AACnF,QAAA,IAAA,CAAA,SAAS,G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wBACjB,oBAAoB;wBACpB,SAAS;wBACT,UAAU;wBACV,QAAQ;wBACR,UAAU;wBACV,UAAU;wBACV,aAAa;AACd,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,4hBAAA,EAAA;;;AEvClB;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softpak/components",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.12.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "20.x.x",
|
|
7
7
|
"@angular/core": "20.x.x",
|
|
8
8
|
"@capacitor/app": "7.x.x",
|
|
9
9
|
"@capacitor/device": "7.x.x",
|
|
10
|
-
"@capacitor
|
|
10
|
+
"@capawesome/capacitor-live-update": "7.2.x",
|
|
11
11
|
"@fortawesome/free-solid-svg-icons": "6.x.x",
|
|
12
12
|
"@ionic/angular": "8.x.x",
|
|
13
13
|
"@ngrx/effects": "19.x.x || 20.x.x || 20.0.0-rc.x",
|
|
@@ -32,37 +32,41 @@
|
|
|
32
32
|
"types": "./index.d.ts",
|
|
33
33
|
"default": "./fesm2022/softpak-components.mjs"
|
|
34
34
|
},
|
|
35
|
+
"./spx-404-page": {
|
|
36
|
+
"types": "./spx-404-page/index.d.ts",
|
|
37
|
+
"default": "./fesm2022/softpak-components-spx-404-page.mjs"
|
|
38
|
+
},
|
|
35
39
|
"./spx-alert": {
|
|
36
40
|
"types": "./spx-alert/index.d.ts",
|
|
37
41
|
"default": "./fesm2022/softpak-components-spx-alert.mjs"
|
|
38
42
|
},
|
|
39
|
-
"./spx-app-expiry": {
|
|
40
|
-
"types": "./spx-app-expiry/index.d.ts",
|
|
41
|
-
"default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
|
|
42
|
-
},
|
|
43
43
|
"./spx-app-configuration": {
|
|
44
44
|
"types": "./spx-app-configuration/index.d.ts",
|
|
45
45
|
"default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
|
|
46
46
|
},
|
|
47
|
+
"./spx-app-expiry": {
|
|
48
|
+
"types": "./spx-app-expiry/index.d.ts",
|
|
49
|
+
"default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
|
|
50
|
+
},
|
|
47
51
|
"./spx-button": {
|
|
48
52
|
"types": "./spx-button/index.d.ts",
|
|
49
53
|
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
50
54
|
},
|
|
51
|
-
"./spx-404-page": {
|
|
52
|
-
"types": "./spx-404-page/index.d.ts",
|
|
53
|
-
"default": "./fesm2022/softpak-components-spx-404-page.mjs"
|
|
54
|
-
},
|
|
55
55
|
"./spx-capitalize": {
|
|
56
56
|
"types": "./spx-capitalize/index.d.ts",
|
|
57
57
|
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
58
58
|
},
|
|
59
|
+
"./spx-change-details": {
|
|
60
|
+
"types": "./spx-change-details/index.d.ts",
|
|
61
|
+
"default": "./fesm2022/softpak-components-spx-change-details.mjs"
|
|
62
|
+
},
|
|
59
63
|
"./spx-card": {
|
|
60
64
|
"types": "./spx-card/index.d.ts",
|
|
61
65
|
"default": "./fesm2022/softpak-components-spx-card.mjs"
|
|
62
66
|
},
|
|
63
|
-
"./spx-
|
|
64
|
-
"types": "./spx-
|
|
65
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
67
|
+
"./spx-channel-selection": {
|
|
68
|
+
"types": "./spx-channel-selection/index.d.ts",
|
|
69
|
+
"default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
|
|
66
70
|
},
|
|
67
71
|
"./spx-check-digit": {
|
|
68
72
|
"types": "./spx-check-digit/index.d.ts",
|
|
@@ -76,10 +80,6 @@
|
|
|
76
80
|
"types": "./spx-form-section/index.d.ts",
|
|
77
81
|
"default": "./fesm2022/softpak-components-spx-form-section.mjs"
|
|
78
82
|
},
|
|
79
|
-
"./spx-channel-selection": {
|
|
80
|
-
"types": "./spx-channel-selection/index.d.ts",
|
|
81
|
-
"default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
|
|
82
|
-
},
|
|
83
83
|
"./spx-form-view": {
|
|
84
84
|
"types": "./spx-form-view/index.d.ts",
|
|
85
85
|
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"types": "./spx-helpers/index.d.ts",
|
|
89
89
|
"default": "./fesm2022/softpak-components-spx-helpers.mjs"
|
|
90
90
|
},
|
|
91
|
-
"./spx-inputs": {
|
|
92
|
-
"types": "./spx-inputs/index.d.ts",
|
|
93
|
-
"default": "./fesm2022/softpak-components-spx-inputs.mjs"
|
|
94
|
-
},
|
|
95
91
|
"./spx-navigation": {
|
|
96
92
|
"types": "./spx-navigation/index.d.ts",
|
|
97
93
|
"default": "./fesm2022/softpak-components-spx-navigation.mjs"
|
|
98
94
|
},
|
|
95
|
+
"./spx-inputs": {
|
|
96
|
+
"types": "./spx-inputs/index.d.ts",
|
|
97
|
+
"default": "./fesm2022/softpak-components-spx-inputs.mjs"
|
|
98
|
+
},
|
|
99
99
|
"./spx-number-check": {
|
|
100
100
|
"types": "./spx-number-check/index.d.ts",
|
|
101
101
|
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
@@ -112,6 +112,10 @@
|
|
|
112
112
|
"types": "./spx-pipes/index.d.ts",
|
|
113
113
|
"default": "./fesm2022/softpak-components-spx-pipes.mjs"
|
|
114
114
|
},
|
|
115
|
+
"./spx-redux": {
|
|
116
|
+
"types": "./spx-redux/index.d.ts",
|
|
117
|
+
"default": "./fesm2022/softpak-components-spx-redux.mjs"
|
|
118
|
+
},
|
|
115
119
|
"./spx-progress-bar": {
|
|
116
120
|
"types": "./spx-progress-bar/index.d.ts",
|
|
117
121
|
"default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
|
|
@@ -120,6 +124,10 @@
|
|
|
120
124
|
"types": "./spx-spinner/index.d.ts",
|
|
121
125
|
"default": "./fesm2022/softpak-components-spx-spinner.mjs"
|
|
122
126
|
},
|
|
127
|
+
"./spx-stock-info": {
|
|
128
|
+
"types": "./spx-stock-info/index.d.ts",
|
|
129
|
+
"default": "./fesm2022/softpak-components-spx-stock-info.mjs"
|
|
130
|
+
},
|
|
123
131
|
"./spx-storage": {
|
|
124
132
|
"types": "./spx-storage/index.d.ts",
|
|
125
133
|
"default": "./fesm2022/softpak-components-spx-storage.mjs"
|
|
@@ -128,14 +136,14 @@
|
|
|
128
136
|
"types": "./spx-suggestion/index.d.ts",
|
|
129
137
|
"default": "./fesm2022/softpak-components-spx-suggestion.mjs"
|
|
130
138
|
},
|
|
139
|
+
"./spx-toaster": {
|
|
140
|
+
"types": "./spx-toaster/index.d.ts",
|
|
141
|
+
"default": "./fesm2022/softpak-components-spx-toaster.mjs"
|
|
142
|
+
},
|
|
131
143
|
"./spx-tabs": {
|
|
132
144
|
"types": "./spx-tabs/index.d.ts",
|
|
133
145
|
"default": "./fesm2022/softpak-components-spx-tabs.mjs"
|
|
134
146
|
},
|
|
135
|
-
"./spx-stock-info": {
|
|
136
|
-
"types": "./spx-stock-info/index.d.ts",
|
|
137
|
-
"default": "./fesm2022/softpak-components-spx-stock-info.mjs"
|
|
138
|
-
},
|
|
139
147
|
"./spx-toggle": {
|
|
140
148
|
"types": "./spx-toggle/index.d.ts",
|
|
141
149
|
"default": "./fesm2022/softpak-components-spx-toggle.mjs"
|
|
@@ -144,9 +152,9 @@
|
|
|
144
152
|
"types": "./spx-translate/index.d.ts",
|
|
145
153
|
"default": "./fesm2022/softpak-components-spx-translate.mjs"
|
|
146
154
|
},
|
|
147
|
-
"./spx-
|
|
148
|
-
"types": "./spx-
|
|
149
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
155
|
+
"./spx-validation-messages": {
|
|
156
|
+
"types": "./spx-validation-messages/index.d.ts",
|
|
157
|
+
"default": "./fesm2022/softpak-components-spx-validation-messages.mjs"
|
|
150
158
|
},
|
|
151
159
|
"./spx-validation": {
|
|
152
160
|
"types": "./spx-validation/index.d.ts",
|
|
@@ -156,10 +164,6 @@
|
|
|
156
164
|
"types": "./spx-update/index.d.ts",
|
|
157
165
|
"default": "./fesm2022/softpak-components-spx-update.mjs"
|
|
158
166
|
},
|
|
159
|
-
"./spx-validation-messages": {
|
|
160
|
-
"types": "./spx-validation-messages/index.d.ts",
|
|
161
|
-
"default": "./fesm2022/softpak-components-spx-validation-messages.mjs"
|
|
162
|
-
},
|
|
163
167
|
"./spx-welcome": {
|
|
164
168
|
"types": "./spx-welcome/index.d.ts",
|
|
165
169
|
"default": "./fesm2022/softpak-components-spx-welcome.mjs"
|
|
@@ -2,11 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import * as _softpak_components_spx_app_configuration from '@softpak/components/spx-app-configuration';
|
|
3
3
|
import { SpxAppChannelI, SpxAppChannelTypeEnum, SpxChannelTypeI } from '@softpak/components/spx-app-configuration';
|
|
4
4
|
import * as _ngrx_store from '@ngrx/store';
|
|
5
|
-
import { Store } from '@ngrx/store';
|
|
6
5
|
import * as _ngrx_effects from '@ngrx/effects';
|
|
7
|
-
import { Actions as Actions$1 } from '@ngrx/effects';
|
|
8
6
|
import * as rxjs from 'rxjs';
|
|
9
|
-
import { Router } from '@angular/router';
|
|
10
7
|
import { SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';
|
|
11
8
|
|
|
12
9
|
declare class SpxChannelGuard {
|
|
@@ -20,7 +17,7 @@ declare const spxChannelSelectionUrl = "wlc";
|
|
|
20
17
|
declare class SpxChannelIndicatorComponent {
|
|
21
18
|
private readonly navController;
|
|
22
19
|
private readonly store;
|
|
23
|
-
protected readonly channel: i0.Signal<_softpak_components_spx_app_configuration.SpxAppChannelI | null
|
|
20
|
+
protected readonly channel: i0.Signal<_softpak_components_spx_app_configuration.SpxAppChannelI | null>;
|
|
24
21
|
protected readonly channelType: i0.Signal<_softpak_components_spx_app_configuration.SpxAppChannelTypeEnum | undefined>;
|
|
25
22
|
protected readonly spxTextChange = "spxTextChange";
|
|
26
23
|
protected onChange(): void;
|
|
@@ -29,45 +26,30 @@ declare class SpxChannelIndicatorComponent {
|
|
|
29
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<SpxChannelIndicatorComponent, "spx-channel-indicator", never, {}, {}, never, never, true, never>;
|
|
30
27
|
}
|
|
31
28
|
|
|
32
|
-
declare const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
channelType: SpxAppChannelTypeEnum;
|
|
47
|
-
} & _ngrx_store.Action<"[SPX / Channel] Select">) | ({
|
|
48
|
-
channels: SpxAppChannelI[];
|
|
49
|
-
} & _ngrx_store.Action<"[SPX / Channel] Initialize">);
|
|
50
|
-
type Actions = typeof all;
|
|
51
|
-
|
|
52
|
-
type spxChannel_actions_d_Actions = Actions;
|
|
53
|
-
declare const spxChannel_actions_d_choose: typeof choose;
|
|
54
|
-
declare const spxChannel_actions_d_initialize: typeof initialize;
|
|
55
|
-
declare namespace spxChannel_actions_d {
|
|
56
|
-
export { spxChannel_actions_d_choose as choose, spxChannel_actions_d_initialize as initialize };
|
|
57
|
-
export type { spxChannel_actions_d_Actions as Actions };
|
|
58
|
-
}
|
|
29
|
+
declare const SpxChannelActions: {
|
|
30
|
+
choose: _ngrx_store.ActionCreator<"[SpxChannel] Choose", (props: {
|
|
31
|
+
channel: SpxAppChannelI;
|
|
32
|
+
channelType: SpxAppChannelTypeEnum;
|
|
33
|
+
}) => {
|
|
34
|
+
channel: SpxAppChannelI;
|
|
35
|
+
channelType: SpxAppChannelTypeEnum;
|
|
36
|
+
} & _ngrx_store.Action<"[SpxChannel] Choose">>;
|
|
37
|
+
initialize: _ngrx_store.ActionCreator<"[SpxChannel] Initialize", (props: {
|
|
38
|
+
channels: SpxAppChannelI[];
|
|
39
|
+
}) => {
|
|
40
|
+
channels: SpxAppChannelI[];
|
|
41
|
+
} & _ngrx_store.Action<"[SpxChannel] Initialize">>;
|
|
42
|
+
};
|
|
59
43
|
|
|
60
44
|
declare class Effects {
|
|
61
45
|
private readonly actions$;
|
|
62
46
|
private readonly router;
|
|
63
|
-
store: Store<any>;
|
|
64
47
|
onChoose$: rxjs.Observable<{
|
|
65
48
|
autoClose?: number | SpxToasterAutoCloseSpeedEnum;
|
|
66
49
|
closeable?: boolean;
|
|
67
50
|
messageText: string;
|
|
68
51
|
title?: string;
|
|
69
52
|
} & _ngrx_store.Action<"[SPX / Toaster] Create success">> & _ngrx_effects.CreateEffectMetadata;
|
|
70
|
-
constructor(actions$: Actions$1, router: Router);
|
|
71
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<Effects, never>;
|
|
72
54
|
static ɵprov: i0.ɵɵInjectableDeclaration<Effects>;
|
|
73
55
|
}
|
|
@@ -104,4 +86,4 @@ declare namespace spxChannel_reducer_d {
|
|
|
104
86
|
export type { spxChannel_reducer_d_StateI as StateI };
|
|
105
87
|
}
|
|
106
88
|
|
|
107
|
-
export { SpxChannelGuard, SpxChannelIndicatorComponent,
|
|
89
|
+
export { SpxChannelActions, SpxChannelGuard, SpxChannelIndicatorComponent, spxChannel_effects_d as spxChannelEffects, spxChannel_reducer_d as spxChannelReducer, spxChannelSelectionUrl };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _ngrx_store from '@ngrx/store';
|
|
2
|
+
|
|
3
|
+
declare function spxCreateActionsForAPI<TQuery, TResult, TMsg = string>(): {
|
|
4
|
+
Error: _ngrx_store.ActionCreatorProps<{
|
|
5
|
+
error: TMsg;
|
|
6
|
+
}>;
|
|
7
|
+
Load: _ngrx_store.ActionCreatorProps<{
|
|
8
|
+
query: TQuery;
|
|
9
|
+
}>;
|
|
10
|
+
Received: _ngrx_store.ActionCreatorProps<{
|
|
11
|
+
result: TResult;
|
|
12
|
+
}>;
|
|
13
|
+
Reset: _ngrx_store.ActionCreatorProps<void>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { spxCreateActionsForAPI };
|
package/spx-storage/index.d.ts
CHANGED
package/spx-welcome/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { OnInit, OnDestroy } from '@angular/core';
|
|
|
3
3
|
import * as _softpak_components_spx_app_configuration from '@softpak/components/spx-app-configuration';
|
|
4
4
|
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
5
5
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
|
6
|
-
import { Store } from '@ngrx/store';
|
|
7
6
|
import { SpxFormI } from '@softpak/components/spx-form-view';
|
|
8
7
|
import { SpxValuePair } from '@softpak/components/spx-inputs';
|
|
8
|
+
import { Store } from '@ngrx/store';
|
|
9
9
|
|
|
10
10
|
declare const spxSectionWelcome = "welcome";
|
|
11
11
|
declare const spxCtrlChannel = "channel";
|