@veloceapps/sdk 11.0.0-43 → 11.0.0-45
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/modules/configuration/services/test-mode-configuration.service.d.ts +3 -1
- package/core/modules/configuration/types/configuration.types.d.ts +3 -0
- package/esm2020/core/modules/configuration/services/test-mode-configuration.service.mjs +13 -4
- package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +12 -3
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +12 -3
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/package.json +1 -1
@@ -507,7 +507,7 @@ class TestModeConfigurationService {
|
|
507
507
|
this.salesTransactionService = salesTransactionService;
|
508
508
|
this.isInitialized = false;
|
509
509
|
}
|
510
|
-
initTestMode$(uiDefinitionContainer) {
|
510
|
+
initTestMode$(uiDefinitionContainer, options) {
|
511
511
|
this.configurationRuntimeService.uiDefinitionContainer = uiDefinitionContainer;
|
512
512
|
if (this.checkInitialized(uiDefinitionContainer)) {
|
513
513
|
this.configurationRuntimeService.pcmModel = this.pcmModel;
|
@@ -521,9 +521,18 @@ class TestModeConfigurationService {
|
|
521
521
|
if (!quoteId) {
|
522
522
|
return throwError(() => `Unable to start the Configuration Preview: Quote is missing.`);
|
523
523
|
}
|
524
|
-
return this.flowInfoService.initTestFlow$(productId).pipe(switchMap(() => this.configurationRuntimeService.init$({ productId })), tap(pcmModel => (this.pcmModel = pcmModel)),
|
524
|
+
return this.flowInfoService.initTestFlow$(productId).pipe(switchMap(() => this.configurationRuntimeService.init$({ productId })), tap(pcmModel => (this.pcmModel = pcmModel)), switchMap(() => {
|
525
|
+
if (options?.customizationMode) {
|
526
|
+
return of(undefined);
|
527
|
+
}
|
528
|
+
return this.initConfiguration$(quoteId);
|
529
|
+
}), tap(() => (this.isInitialized = true)), map(noop));
|
530
|
+
}
|
531
|
+
initConfiguration$(quoteId) {
|
532
|
+
this.salesTransactionService.setState(this.getTestSalesTransaction(quoteId));
|
533
|
+
return this.configurationService.init$().pipe(switchMap(() => this.configurationService.state
|
525
534
|
? this.configurationService.configureRequest$(this.configurationService.state)
|
526
|
-
: of(undefined)),
|
535
|
+
: of(undefined)), map(noop));
|
527
536
|
}
|
528
537
|
getTestSalesTransaction(quoteId) {
|
529
538
|
const testTransaction = {
|