@veloceapps/sdk 9.0.0-8 → 10.0.0-0

Sign up to get free protection for your applications and to get access to all the features.
@@ -926,6 +926,9 @@ class FlowComponent {
926
926
  this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
927
927
  this.flowService.initSubscriptions();
928
928
  }
929
+ ngOnDestroy() {
930
+ this.flowService.cleanup();
931
+ }
929
932
  }
930
933
  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 });
931
934
  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 });
@@ -1055,8 +1058,7 @@ const keepFlowInitialized = (route) => {
1055
1058
  if (!flowId) {
1056
1059
  return true;
1057
1060
  }
1058
- const params = Object.assign(Object.assign({}, route.queryParams), flow === null || flow === void 0 ? void 0 : flow.properties.queryParams);
1059
- return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => {
1061
+ return flowInfoService.init$(flowId, route.queryParams).pipe(map(() => true), catchError(e => {
1060
1062
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
1061
1063
  const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
1062
1064
  return routerService.showErrorPage$(message, errorDetails);
@@ -1480,8 +1482,9 @@ class ProductComponent {
1480
1482
  quoteDraft$ = of(undefined);
1481
1483
  }
1482
1484
  return quoteDraft$.pipe(first(), switchMap(quote => {
1485
+ var _a, _b;
1483
1486
  const contextProperties = this.contextService.resolve().properties;
1484
- const productId = contextProperties.productId;
1487
+ const productId = (_a = contextProperties.productId) !== null && _a !== void 0 ? _a : (_b = this.flowInfoService.flow) === null || _b === void 0 ? void 0 : _b.properties.queryParams['productId'];
1485
1488
  if (!productId) {
1486
1489
  throw new Error(`Unable to start configuration for 'productId == null'`);
1487
1490
  }