@veloceapps/sdk 8.0.0-135 → 8.0.0-137

Sign up to get free protection for your applications and to get access to all the features.
@@ -551,13 +551,13 @@ class FlowRouterService {
551
551
  let updateContext$;
552
552
  if (this.flowInfoService.isLegacy) {
553
553
  updateContext$ = of(undefined).pipe(tap(() => {
554
- this.contextService.update({ properties: { productId, lineItemId } });
554
+ this.contextService.update({ properties: { productId, lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '' } });
555
555
  }));
556
556
  }
557
557
  else {
558
558
  updateContext$ = this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_CONTEXT_PROPERTIES', {
559
559
  productId,
560
- lineItemId,
560
+ lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '',
561
561
  });
562
562
  }
563
563
  updateContext$
@@ -814,22 +814,23 @@ class FlowService {
814
814
  return this.legacyApplyConfiguration();
815
815
  }
816
816
  else {
817
- return this.configurationStateService
818
- .saveConfiguration('', true)
819
- .pipe(switchMap(() => this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_ASSET_IDS')));
817
+ return this.configurationStateService.saveConfiguration('', true).pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), switchMap(() => this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_ASSET_IDS')));
820
818
  }
821
819
  }), tap(() => {
822
820
  this.configurationService.hasUnsavedChanges = false;
823
821
  this.flowRouterService.navigateToShoppingCart();
824
822
  }), takeUntil(this.cleanup$))
825
823
  .subscribe();
826
- this.updateFlowPath();
824
+ this.updateFlowParams();
827
825
  }
828
- updateFlowPath() {
826
+ updateFlowParams() {
829
827
  this.flowRouterService
830
828
  .getFlowSubpath$()
831
829
  .pipe(map(path => { var _a; return (_a = path.split('/')) === null || _a === void 0 ? void 0 : _a[0]; }), takeUntil(this.cleanup$))
832
830
  .subscribe(flowPath => this.integrationState.patchState({ flowPath }));
831
+ this.flowRouterService.route$
832
+ .pipe(map(path => path.queryParams['productId']), takeUntil(this.cleanup$))
833
+ .subscribe(productId => this.integrationState.patchState({ productId }));
833
834
  }
834
835
  legacyApplyConfiguration() {
835
836
  const quoteDraft = this.quoteDraftService.quoteDraft;
@@ -1468,7 +1469,7 @@ class ProductComponent {
1468
1469
  }
1469
1470
  init$() {
1470
1471
  let quoteDraft$;
1471
- if (this.flowInfoService.isLegacy) {
1472
+ if (this.flowInfoService.isLegacy || !this.flowInfoService.isStateful) {
1472
1473
  quoteDraft$ = this.quoteDraftService.quoteDraft$;
1473
1474
  }
1474
1475
  else {