@veloceapps/sdk 10.0.0-43 → 10.0.0-44
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/core/services/context.service.d.ts +1 -3
- package/core/services/flow-info.service.d.ts +2 -4
- package/core/services/quote-draft.service.d.ts +1 -3
- package/core/services/runtime-settings.service.d.ts +1 -1
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +2 -2
- package/esm2020/core/services/context.service.mjs +6 -15
- package/esm2020/core/services/flow-info.service.mjs +6 -19
- package/esm2020/core/services/flow-state.service.mjs +2 -15
- package/esm2020/core/services/quote-draft.service.mjs +9 -21
- package/esm2020/core/services/runtime-settings.service.mjs +3 -3
- package/esm2020/src/guards/context.guard.mjs +6 -4
- package/esm2020/src/guards/flow.guard.mjs +4 -5
- package/fesm2015/veloceapps-sdk-core.mjs +227 -269
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +7 -6
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +225 -266
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +7 -6
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
@@ -9,11 +9,11 @@ import { ToastType, LoaderModule, LetDirectiveModule } from '@veloceapps/compone
|
|
9
9
|
import * as i5 from '@veloceapps/sdk/cms';
|
10
10
|
import { extractElementMetadata, extendElementMetadata, btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
|
11
11
|
import * as i2 from '@veloceapps/sdk/core';
|
12
|
-
import { FLOW_CUSTOMIZATION, ContextService, FlowStateService, FlowInfoService, QuoteDraftService, ConfigurationService, IntegrationState,
|
12
|
+
import { FLOW_CUSTOMIZATION, ContextService, FlowStateService, FlowInfoService, QuoteDraftService, ConfigurationService, IntegrationState, SdkCoreModule } from '@veloceapps/sdk/core';
|
13
13
|
import * as i3 from 'primeng/button';
|
14
14
|
import { ButtonModule } from 'primeng/button';
|
15
15
|
import * as i1 from 'primeng/dynamicdialog';
|
16
|
-
import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, throwError } from 'rxjs';
|
16
|
+
import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
|
17
17
|
import * as i1$2 from '@angular/router';
|
18
18
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
19
19
|
import { mapShoppingCartSettings, getMaxRenewalTermsValue, UITemplateType, SalesforceIdUtils, ConfigurationContextMode, isVeloceError, extractErrorDetails, UUID } from '@veloceapps/core';
|
@@ -973,8 +973,8 @@ class ContextGuard {
|
|
973
973
|
return of(true);
|
974
974
|
}
|
975
975
|
}
|
976
|
-
// Initialize runtime settings
|
977
|
-
return this.contextService.create(headerId, mode).pipe(tap(context => {
|
976
|
+
// Initialize context and runtime settings
|
977
|
+
return forkJoin([this.contextService.create(headerId, mode), this.runtimeSettingsService.create()]).pipe(tap(([context]) => {
|
978
978
|
this.contextService.update({
|
979
979
|
...context,
|
980
980
|
properties: {
|
@@ -983,6 +983,8 @@ class ContextGuard {
|
|
983
983
|
...getDefaultProperties({ mode }),
|
984
984
|
},
|
985
985
|
});
|
986
|
+
// Init currency settings
|
987
|
+
this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
|
986
988
|
}), map(() => true), catchError(e => {
|
987
989
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
988
990
|
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
@@ -1034,7 +1036,6 @@ const keepFlowInitialized = (route) => {
|
|
1034
1036
|
const quoteDraft = inject(QuoteDraftService);
|
1035
1037
|
const configurationService = inject(ConfigurationService);
|
1036
1038
|
const integrationState = inject(IntegrationState);
|
1037
|
-
const runtimeSettingsService = inject(RuntimeSettingsService);
|
1038
1039
|
const { flowId } = route.queryParams;
|
1039
1040
|
const flow = flowInfoService.flow;
|
1040
1041
|
if (flow && flow?.id === flowId) {
|
@@ -1050,7 +1051,7 @@ const keepFlowInitialized = (route) => {
|
|
1050
1051
|
if (!flowId) {
|
1051
1052
|
return true;
|
1052
1053
|
}
|
1053
|
-
return
|
1054
|
+
return flowInfoService.init$(flowId, route.queryParams).pipe(map(() => true), catchError(e => {
|
1054
1055
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1055
1056
|
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
1056
1057
|
return routerService.showErrorPage$(message, errorDetails);
|