@veloceapps/sdk 9.0.0-8 → 10.0.0-0

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.
@@ -914,6 +914,9 @@ class FlowComponent {
914
914
  this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
915
915
  this.flowService.initSubscriptions();
916
916
  }
917
+ ngOnDestroy() {
918
+ this.flowService.cleanup();
919
+ }
917
920
  }
918
921
  FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
919
922
  FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -1048,8 +1051,7 @@ const keepFlowInitialized = (route) => {
1048
1051
  if (!flowId) {
1049
1052
  return true;
1050
1053
  }
1051
- const params = { ...route.queryParams, ...flow?.properties.queryParams };
1052
- return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => {
1054
+ return flowInfoService.init$(flowId, route.queryParams).pipe(map(() => true), catchError(e => {
1053
1055
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
1054
1056
  const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
1055
1057
  return routerService.showErrorPage$(message, errorDetails);
@@ -1467,7 +1469,7 @@ class ProductComponent {
1467
1469
  }
1468
1470
  return quoteDraft$.pipe(first(), switchMap(quote => {
1469
1471
  const contextProperties = this.contextService.resolve().properties;
1470
- const productId = contextProperties.productId;
1472
+ const productId = contextProperties.productId ?? this.flowInfoService.flow?.properties.queryParams['productId'];
1471
1473
  if (!productId) {
1472
1474
  throw new Error(`Unable to start configuration for 'productId == null'`);
1473
1475
  }