@veloceapps/sdk 3.1.2 → 3.1.4

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.
Files changed (43) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +34 -2
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-core.umd.js +7 -1
  4. package/bundles/veloce-sdk-core.umd.js.map +1 -1
  5. package/bundles/veloce-sdk.umd.js +174 -98
  6. package/bundles/veloce-sdk.umd.js.map +1 -1
  7. package/cms/cms.actions.d.ts +12 -0
  8. package/cms/index.d.ts +1 -0
  9. package/cms/services/integration.state.d.ts +1 -4
  10. package/cms/types/index.d.ts +1 -0
  11. package/cms/types/integration.types.d.ts +4 -0
  12. package/cms/vendor-map.d.ts +10 -1
  13. package/core/modules/configuration/services/configuration.service.d.ts +1 -0
  14. package/esm2015/cms/cms.actions.js +17 -0
  15. package/esm2015/cms/index.js +2 -1
  16. package/esm2015/cms/services/integration.state.js +1 -1
  17. package/esm2015/cms/types/index.js +2 -1
  18. package/esm2015/cms/types/integration.types.js +2 -0
  19. package/esm2015/cms/vendor-map.js +6 -4
  20. package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +2 -2
  21. package/esm2015/core/modules/configuration/services/configuration.service.js +7 -1
  22. package/esm2015/src/components/header/cart-overlay/cart-overlay.component.js +4 -4
  23. package/esm2015/src/components/header/header.component.js +3 -2
  24. package/esm2015/src/flow-routing.module.js +21 -3
  25. package/esm2015/src/guards/product-unload.guard.js +30 -0
  26. package/esm2015/src/pages/product/product.component.js +26 -38
  27. package/esm2015/src/services/flow-router.service.js +13 -5
  28. package/esm2015/src/services/flow.service.js +40 -12
  29. package/esm2015/src/services/fow-dialog.service.js +9 -1
  30. package/fesm2015/veloce-sdk-cms.js +30 -4
  31. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  32. package/fesm2015/veloce-sdk-core.js +7 -1
  33. package/fesm2015/veloce-sdk-core.js.map +1 -1
  34. package/fesm2015/veloce-sdk.js +144 -70
  35. package/fesm2015/veloce-sdk.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/components/header/cart-overlay/cart-overlay.component.d.ts +1 -1
  38. package/src/components/header/header.component.d.ts +1 -0
  39. package/src/guards/product-unload.guard.d.ts +13 -0
  40. package/src/pages/product/product.component.d.ts +3 -6
  41. package/src/services/flow-router.service.d.ts +3 -1
  42. package/src/services/flow.service.d.ts +5 -1
  43. package/src/services/fow-dialog.service.d.ts +1 -0
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/core'), require('primeng/button'), require('primeng/dynamicdialog'), require('primeng/overlaypanel'), require('primeng/tooltip'), require('@angular/forms'), require('primeng/inputnumber'), require('rxjs'), require('@veloce/core'), require('@angular/router'), require('primeng/api'), require('primeng/dropdown'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('@veloce/sdk/runtime'), require('ngx-bootstrap/tooltip'), require('@angular/common/http')) :
3
3
  typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/core', 'primeng/button', 'primeng/dynamicdialog', 'primeng/overlaypanel', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', 'rxjs', '@veloce/core', '@angular/router', 'primeng/api', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', '@veloce/sdk/runtime', 'ngx-bootstrap/tooltip', '@angular/common/http'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.core, global["primeng/button"], global["primeng/dynamicdialog"], global["primeng/overlaypanel"], global["primeng/tooltip"], global.ng.forms, global["primeng/inputnumber"], global.rxjs, global["@veloce/core"], global.ng.router, global["primeng/api"], global["primeng/dropdown"], global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global.veloce.sdk.runtime, global["ngx-bootstrap/tooltip"], global.ng.common.http));
5
- })(this, (function (exports, i9, i0, i1$3, i3$1, i1$4, i2, i5, i1, i4, i10, i7, i6, rxjs, i1$2, i1$1, i3, i4$1, i8, i6$1, operators, i4$2, i1$5, http) { 'use strict';
5
+ })(this, (function (exports, i9, i0, i1$3, i3, i4$1, i2, i5, i1, i4, i10, i7, i6, rxjs, i1$2, i1$1, i2$1, i4$2, i8, i6$1, operators, i4$3, i1$4, http) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -25,8 +25,8 @@
25
25
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
26
26
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
27
  var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
28
- var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
29
- var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
28
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
+ var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
30
30
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
31
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
32
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
@@ -36,12 +36,12 @@
36
36
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
37
37
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
38
38
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
39
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
40
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
39
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
40
+ var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
41
41
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
42
42
  var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
43
- var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
44
- var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
43
+ var i4__namespace$3 = /*#__PURE__*/_interopNamespace(i4$3);
44
+ var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
45
45
 
46
46
  var VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
47
47
 
@@ -412,6 +412,7 @@
412
412
  this.router = router;
413
413
  this.route = route;
414
414
  this.contextService = contextService;
415
+ this.urlHistory = [];
415
416
  this.getLastChildRoute = function (route) {
416
417
  return route.firstChild ? _this.getLastChildRoute(route.firstChild) : route;
417
418
  };
@@ -447,6 +448,9 @@
447
448
  e instanceof i1$1.NavigationCancel ||
448
449
  e instanceof i1$1.NavigationEnd ||
449
450
  e instanceof i1$1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1$1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
451
+ this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$1.NavigationEnd; })).subscribe(function () {
452
+ _this.urlHistory.push(_this.router.url);
453
+ });
450
454
  }
451
455
  FlowRouterService.prototype.getFlowRootRoute = function (route) {
452
456
  var _a;
@@ -496,8 +500,14 @@
496
500
  FlowRouterService.prototype.isCatalogRoute$ = function () {
497
501
  return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('catalog'); }));
498
502
  };
499
- FlowRouterService.prototype.navigateToProductConfiguration = function (productId) {
500
- this.contextService.update({ properties: { productId: productId } });
503
+ FlowRouterService.prototype.navigateBack = function () {
504
+ var prevUrl = this.urlHistory[this.urlHistory.length - 2];
505
+ if (prevUrl) {
506
+ this.router.navigateByUrl(prevUrl);
507
+ }
508
+ };
509
+ FlowRouterService.prototype.navigateToProductConfiguration = function (productId, lineItemId) {
510
+ this.contextService.update({ properties: { productId: productId, lineItemId: lineItemId } });
501
511
  var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
502
512
  var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
503
513
  this.router.navigate([flowRouteUrl, 'product'], {
@@ -505,13 +515,11 @@
505
515
  });
506
516
  };
507
517
  FlowRouterService.prototype.navigateToShoppingCart = function () {
508
- this.contextService.update({ properties: { productId: undefined } });
509
518
  var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
510
519
  var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
511
520
  this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
512
521
  };
513
522
  FlowRouterService.prototype.navigateToCatalog = function () {
514
- this.contextService.update({ properties: { productId: undefined } });
515
523
  var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
516
524
  var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
517
525
  this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
@@ -571,9 +579,9 @@
571
579
  }
572
580
  return this.imagesMap$.pipe(rxjs.map(function (imagesMap) { return imagesMap[productId]; }), rxjs.distinctUntilChanged());
573
581
  };
574
- HeaderCartOverlayComponent.prototype.navigateToProductConfiguration = function (productId) {
582
+ HeaderCartOverlayComponent.prototype.navigateToProductConfiguration = function (productId, lineItemId) {
575
583
  this.overlayPanel.hide();
576
- this.routerService.navigateToProductConfiguration(productId);
584
+ this.routerService.navigateToProductConfiguration(productId, lineItemId);
577
585
  };
578
586
  HeaderCartOverlayComponent.prototype.controlBlurHandler = function (product) {
579
587
  var control = this.form.controls[product.id];
@@ -639,7 +647,7 @@
639
647
  return HeaderCartOverlayComponent;
640
648
  }());
641
649
  HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace$2.BaseHttpService }, { token: i2__namespace.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
642
- HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i4.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$0.00</span>\n <span class=\"text-right pt-3\">$0.00</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i3__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3__namespace$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
650
+ HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i4.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$0.00</span>\n <span class=\"text-right pt-3\">$0.00</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i2__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
643
651
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, decorators: [{
644
652
  type: i0.Component,
645
653
  args: [{
@@ -661,13 +669,13 @@
661
669
  return HeaderCartOverlayModule;
662
670
  }());
663
671
  HeaderCartOverlayModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
664
- HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i6.InputNumberModule], exports: [HeaderCartOverlayComponent] });
665
- HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i6.InputNumberModule]] });
672
+ HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3.LetDirectiveModule, i6.InputNumberModule], exports: [HeaderCartOverlayComponent] });
673
+ HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3.LetDirectiveModule, i6.InputNumberModule]] });
666
674
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, decorators: [{
667
675
  type: i0.NgModule,
668
676
  args: [{
669
677
  declarations: [HeaderCartOverlayComponent],
670
- imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i6.InputNumberModule],
678
+ imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3.LetDirectiveModule, i6.InputNumberModule],
671
679
  exports: [HeaderCartOverlayComponent],
672
680
  }]
673
681
  }] });
@@ -739,6 +747,14 @@
739
747
  primaryButton: 'OK',
740
748
  });
741
749
  };
750
+ FlowDialogService.prototype.showUnsavedChangesDialog = function () {
751
+ return this.show({
752
+ title: 'Unsaved Changes',
753
+ description: 'Are you sure you want to leave this page and discard your unsaved changes?',
754
+ primaryButton: 'Keep Editing',
755
+ secondaryButton: 'Discard Changes',
756
+ });
757
+ };
742
758
  return FlowDialogService;
743
759
  }());
744
760
  FlowDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService, deps: [{ token: i1__namespace.DialogService }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
@@ -758,6 +774,7 @@
758
774
  this.flowConfiguration = flowConfiguration;
759
775
  this.routerService = routerService;
760
776
  this.dialogService = dialogService;
777
+ this.disabledActionButtonTooltip = 'Available from the Shopping Cart';
761
778
  this.objectDetails$ = new rxjs.BehaviorSubject({});
762
779
  this.isSaveInProgress$ = new rxjs.BehaviorSubject(false);
763
780
  this.destroyed$ = new rxjs.Subject();
@@ -904,7 +921,7 @@
904
921
  return FlowHeaderComponent;
905
922
  }());
906
923
  FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.QuoteDraftService }, { token: i1__namespace$3.QuoteApiService }, { token: i1__namespace$3.SalesforceApiService }, { token: i2__namespace.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
907
- FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\">&nbsp;To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ contextProperties.Status }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">{{ details.accountName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">{{\n details.opportunityName\n }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">{{ details.quoteName }}</a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCatalogRoute$ | async }\" (click)=\"navigateToCatalog()\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-header-cart-overlay #cart [products]=\"products\"></vl-header-cart-overlay>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"details.priceListName\">{{ details.priceListName }}</span>\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <p-button label=\"Generate Doc\" styleClass=\"p-button-outlined\"></p-button>\n <p-button\n label=\"Save\"\n styleClass=\"p-button-outlined\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"(isSaveInProgress$ | async) === true\"\n ></p-button>\n <p-button label=\"Submit For Approval\" styleClass=\"p-button\"></p-button>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-loading .p-button-loading-icon{position:absolute;left:calc(50% - 5px)}:host ::ng-deep .p-button.p-button-loading .p-button-label{opacity:0;margin:0}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: ["products"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3__namespace$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i3__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i9__namespace.AsyncPipe, "date": i9__namespace.DatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
924
+ FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\">&nbsp;To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ contextProperties.Status }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">{{ details.accountName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">{{\n details.opportunityName\n }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">{{ details.quoteName }}</a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCatalogRoute$ | async }\" (click)=\"navigateToCatalog()\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-header-cart-overlay #cart [products]=\"products\"></vl-header-cart-overlay>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"details.priceListName\">{{ details.priceListName }}</span>\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <p-button\n label=\"Generate Doc\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n styleClass=\"p-button-outlined\"\n ></p-button>\n <p-button\n label=\"Save\"\n styleClass=\"p-button-outlined\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"(isSaveInProgress$ | async) === true\"\n ></p-button>\n <p-button\n label=\"Submit For Approval\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n styleClass=\"p-button\"\n ></p-button>\n </ng-container>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-loading .p-button-loading-icon{position:absolute;left:calc(50% - 5px)}:host ::ng-deep .p-button.p-button-loading .p-button-label{opacity:0;margin:0}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: ["products"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i2__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i9__namespace.AsyncPipe, "date": i9__namespace.DatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
908
925
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
909
926
  type: i0.Component,
910
927
  args: [{
@@ -921,45 +938,71 @@
921
938
  return FlowHeaderModule;
922
939
  }());
923
940
  FlowHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
924
- FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i9.CommonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule], exports: [FlowHeaderComponent] });
925
- FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i9.CommonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule]] });
941
+ FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i9.CommonModule, i4.OverlayPanelModule, i3.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule], exports: [FlowHeaderComponent] });
942
+ FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i9.CommonModule, i4.OverlayPanelModule, i3.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule]] });
926
943
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, decorators: [{
927
944
  type: i0.NgModule,
928
945
  args: [{
929
946
  declarations: [FlowHeaderComponent],
930
- imports: [i9.CommonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule],
947
+ imports: [i9.CommonModule, i4.OverlayPanelModule, i3.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule],
931
948
  exports: [FlowHeaderComponent],
932
949
  }]
933
950
  }] });
934
951
 
935
952
  var FlowService = /** @class */ (function () {
936
- function FlowService(integrationState, flowRouterService) {
953
+ function FlowService(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService) {
937
954
  this.integrationState = integrationState;
938
955
  this.flowRouterService = flowRouterService;
956
+ this.quoteDraftService = quoteDraftService;
957
+ this.configurationService = configurationService;
958
+ this.flowConfigurationService = flowConfigurationService;
939
959
  this.cleanup$ = new rxjs.Subject();
940
960
  }
941
961
  FlowService.prototype.initSubscriptions = function () {
942
962
  var _this = this;
943
963
  this.integrationState
944
- .listen$('FLOW_CONFIGURE_PRODUCT')
945
- .pipe(rxjs.takeUntil(this.cleanup$))
946
- .subscribe(function (payload) {
947
- if (!(payload === null || payload === void 0 ? void 0 : payload.productId)) {
948
- return;
964
+ .listen$(i4$1.FlowAction.FLOW_CONFIGURE_PRODUCT)
965
+ .pipe(rxjs.takeUntil(this.cleanup$), rxjs.tap(function (payload) {
966
+ var _a, _b, _c;
967
+ var productId = (_a = payload.productId) !== null && _a !== void 0 ? _a : (_c = (_b = _this.quoteDraftService.quoteSnapshot) === null || _b === void 0 ? void 0 : _b.currentState.find(function (li) { return li.id === payload.lineItemId; })) === null || _c === void 0 ? void 0 : _c.productId;
968
+ if (productId) {
969
+ _this.flowRouterService.navigateToProductConfiguration(productId, payload.lineItemId);
949
970
  }
950
- _this.flowRouterService.navigateToProductConfiguration(payload.productId);
951
- });
971
+ else {
972
+ console.warn("Parameter 'productId' is needed to start configuration");
973
+ }
974
+ }))
975
+ .subscribe();
976
+ this.integrationState
977
+ .listen$(i4$1.FlowAction.FLOW_NAVIGATE_BACK)
978
+ .pipe(rxjs.takeUntil(this.cleanup$), rxjs.tap(function () { return _this.flowRouterService.navigateBack(); }))
979
+ .subscribe();
980
+ this.integrationState
981
+ .listen$(i4$1.FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
982
+ .pipe(rxjs.takeUntil(this.cleanup$), rxjs.switchMap(function () {
983
+ var lineItem = _this.configurationService.getSnapshot();
984
+ if (!lineItem) {
985
+ return rxjs.of(undefined);
986
+ }
987
+ var currentState = _this.flowConfigurationService.getSnapshot();
988
+ var updatedState = currentState.map(function (li) { return (li.id === lineItem.id ? lineItem : li); });
989
+ return _this.flowConfigurationService.calculate$(updatedState);
990
+ }), rxjs.tap(function () {
991
+ _this.configurationService.hasUnsavedChanges = false;
992
+ _this.flowRouterService.navigateToShoppingCart();
993
+ }))
994
+ .subscribe();
952
995
  };
953
996
  FlowService.prototype.cleanup = function () {
954
997
  this.cleanup$.next();
955
998
  };
956
999
  return FlowService;
957
1000
  }());
958
- FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i1__namespace$4.IntegrationState }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1001
+ FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i4__namespace$1.IntegrationState }, { token: FlowRouterService }, { token: i2__namespace.QuoteDraftService }, { token: i2__namespace.ConfigurationService }, { token: i2__namespace.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
959
1002
  FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
960
1003
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
961
1004
  type: i0.Injectable
962
- }], ctorParameters: function () { return [{ type: i1__namespace$4.IntegrationState }, { type: FlowRouterService }]; } });
1005
+ }], ctorParameters: function () { return [{ type: i4__namespace$1.IntegrationState }, { type: FlowRouterService }, { type: i2__namespace.QuoteDraftService }, { type: i2__namespace.ConfigurationService }, { type: i2__namespace.FlowConfigurationService }]; } });
963
1006
 
964
1007
  var FlowComponent = /** @class */ (function () {
965
1008
  function FlowComponent(routerService, context, flowService) {
@@ -977,7 +1020,7 @@
977
1020
  return FlowComponent;
978
1021
  }());
979
1022
  FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i2__namespace.ContextService }, { token: FlowService }], target: i0__namespace.ɵɵFactoryTarget.Component });
980
- FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-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</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1023
+ FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-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</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
981
1024
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
982
1025
  type: i0.Component,
983
1026
  args: [{
@@ -1047,6 +1090,33 @@
1047
1090
  type: i0.Injectable
1048
1091
  }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
1049
1092
 
1093
+ var ProductUnloadGuard = /** @class */ (function () {
1094
+ function ProductUnloadGuard(contextService, configurationService, flowDialogService) {
1095
+ this.contextService = contextService;
1096
+ this.configurationService = configurationService;
1097
+ this.flowDialogService = flowDialogService;
1098
+ }
1099
+ ProductUnloadGuard.prototype.canDeactivate = function () {
1100
+ var _this = this;
1101
+ var observable = rxjs.of(true);
1102
+ if (!this.contextService.isStandalone && this.configurationService.hasUnsavedChanges) {
1103
+ observable = this.flowDialogService.showUnsavedChangesDialog().pipe(rxjs.map(function (confirmed) { return !confirmed; }));
1104
+ }
1105
+ return observable.pipe(rxjs.tap(function (unload) {
1106
+ if (unload) {
1107
+ _this.contextService.update({ properties: { productId: undefined, lineItemId: undefined } });
1108
+ _this.configurationService.reset();
1109
+ }
1110
+ }));
1111
+ };
1112
+ return ProductUnloadGuard;
1113
+ }());
1114
+ ProductUnloadGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.ConfigurationService }, { token: FlowDialogService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1115
+ ProductUnloadGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard });
1116
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard, decorators: [{
1117
+ type: i0.Injectable
1118
+ }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.ConfigurationService }, { type: FlowDialogService }]; } });
1119
+
1050
1120
  var RootGuard = /** @class */ (function () {
1051
1121
  function RootGuard(router, routerService) {
1052
1122
  this.router = router;
@@ -1114,7 +1184,7 @@
1114
1184
  }), rxjs.catchError(function (err) {
1115
1185
  var _a;
1116
1186
  var message = 'Failed to resolve Catalog component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
1117
- _this.toastService.add({ severity: i3$1.ToastType.error, summary: message, sticky: true });
1187
+ _this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
1118
1188
  _this.uiDefinition = undefined;
1119
1189
  _this.state$.next({ loading: false, failure: true });
1120
1190
  return rxjs.of();
@@ -1181,8 +1251,8 @@
1181
1251
  };
1182
1252
  return CatalogComponent;
1183
1253
  }());
1184
- CatalogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, deps: [{ token: i1__namespace$3.UITemplatesApiService }, { token: i2__namespace.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1185
- CatalogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1254
+ CatalogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, deps: [{ token: i1__namespace$3.UITemplatesApiService }, { token: i2__namespace.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1255
+ CatalogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1186
1256
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, decorators: [{
1187
1257
  type: i0.Component,
1188
1258
  args: [{
@@ -1192,7 +1262,7 @@
1192
1262
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1193
1263
  }]
1194
1264
  }], ctorParameters: function () {
1195
- return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$1.ToastService }, { type: undefined, decorators: [{
1265
+ return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1196
1266
  type: i0.Optional
1197
1267
  }, {
1198
1268
  type: i0.Inject,
@@ -1206,13 +1276,13 @@
1206
1276
  return CatalogModule;
1207
1277
  }());
1208
1278
  CatalogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1209
- CatalogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, declarations: [CatalogComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule], exports: [CatalogComponent] });
1210
- CatalogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule]] });
1279
+ CatalogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, declarations: [CatalogComponent], imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule], exports: [CatalogComponent] });
1280
+ CatalogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, imports: [[i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule]] });
1211
1281
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, decorators: [{
1212
1282
  type: i0.NgModule,
1213
1283
  args: [{
1214
1284
  declarations: [CatalogComponent],
1215
- imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
1285
+ imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule],
1216
1286
  exports: [CatalogComponent],
1217
1287
  }]
1218
1288
  }] });
@@ -1259,7 +1329,7 @@
1259
1329
  return DebugComponent;
1260
1330
  }());
1261
1331
  DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i1__namespace$3.FlowsApiService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace.ContextService }, { token: i2__namespace.FlowConfigurationService }, { token: i2__namespace.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1262
- DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i4__namespace$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8__namespace.InputText, selector: "[pInputText]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1332
+ DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i4__namespace$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8__namespace.InputText, selector: "[pInputText]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1263
1333
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
1264
1334
  type: i0.Component,
1265
1335
  args: [{
@@ -1282,7 +1352,7 @@
1282
1352
  i7.ReactiveFormsModule, i1__namespace$1.RouterModule, i6$1.RadioButtonModule,
1283
1353
  i5.ButtonModule,
1284
1354
  i8.InputTextModule,
1285
- i4$1.DropdownModule] });
1355
+ i4$2.DropdownModule] });
1286
1356
  DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, imports: [[
1287
1357
  i9.CommonModule,
1288
1358
  i7.FormsModule,
@@ -1291,7 +1361,7 @@
1291
1361
  i6$1.RadioButtonModule,
1292
1362
  i5.ButtonModule,
1293
1363
  i8.InputTextModule,
1294
- i4$1.DropdownModule,
1364
+ i4$2.DropdownModule,
1295
1365
  ]] });
1296
1366
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, decorators: [{
1297
1367
  type: i0.NgModule,
@@ -1305,7 +1375,7 @@
1305
1375
  i6$1.RadioButtonModule,
1306
1376
  i5.ButtonModule,
1307
1377
  i8.InputTextModule,
1308
- i4$1.DropdownModule,
1378
+ i4$2.DropdownModule,
1309
1379
  ],
1310
1380
  }]
1311
1381
  }] });
@@ -1421,8 +1491,8 @@
1421
1491
  };
1422
1492
  return LegacyProductComponent;
1423
1493
  }());
1424
- LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace.QuoteDraftService }, { token: i1__namespace$3.QuoteApiService }, { token: i2__namespace.ContextService }, { token: i4__namespace$2.RuntimeContextService }, { token: i4__namespace$2.RuntimeService }, { token: i4__namespace$2.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1425
- LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4__namespace$2.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
1494
+ LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace.QuoteDraftService }, { token: i1__namespace$3.QuoteApiService }, { token: i2__namespace.ContextService }, { token: i4__namespace$3.RuntimeContextService }, { token: i4__namespace$3.RuntimeService }, { token: i4__namespace$3.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1495
+ LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4__namespace$3.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
1426
1496
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
1427
1497
  type: i0.Component,
1428
1498
  args: [{
@@ -1430,7 +1500,7 @@
1430
1500
  styleUrls: ['./legacy-product.component.scss'],
1431
1501
  }]
1432
1502
  }], ctorParameters: function () {
1433
- return [{ type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace.QuoteDraftService }, { type: i1__namespace$3.QuoteApiService }, { type: i2__namespace.ContextService }, { type: i4__namespace$2.RuntimeContextService }, { type: i4__namespace$2.RuntimeService }, { type: i4__namespace$2.CurrentStateService }, { type: undefined, decorators: [{
1503
+ return [{ type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace.QuoteDraftService }, { type: i1__namespace$3.QuoteApiService }, { type: i2__namespace.ContextService }, { type: i4__namespace$3.RuntimeContextService }, { type: i4__namespace$3.RuntimeService }, { type: i4__namespace$3.CurrentStateService }, { type: undefined, decorators: [{
1434
1504
  type: i0.Optional
1435
1505
  }, {
1436
1506
  type: i0.Inject,
@@ -1444,25 +1514,23 @@
1444
1514
  return LegacyProductModule;
1445
1515
  }());
1446
1516
  LegacyProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1447
- LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i9.CommonModule, i4$2.RuntimeModule, i1__namespace$5.TooltipModule], exports: [LegacyProductComponent] });
1448
- LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i9.CommonModule, i4$2.RuntimeModule, i1$5.TooltipModule.forRoot()]] });
1517
+ LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i9.CommonModule, i4$3.RuntimeModule, i1__namespace$4.TooltipModule], exports: [LegacyProductComponent] });
1518
+ LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i9.CommonModule, i4$3.RuntimeModule, i1$4.TooltipModule.forRoot()]] });
1449
1519
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
1450
1520
  type: i0.NgModule,
1451
1521
  args: [{
1452
1522
  declarations: [LegacyProductComponent],
1453
- imports: [i9.CommonModule, i4$2.RuntimeModule, i1$5.TooltipModule.forRoot()],
1523
+ imports: [i9.CommonModule, i4$3.RuntimeModule, i1$4.TooltipModule.forRoot()],
1454
1524
  exports: [LegacyProductComponent],
1455
1525
  }]
1456
1526
  }] });
1457
1527
 
1458
1528
  var ProductComponent = /** @class */ (function () {
1459
- function ProductComponent(contextService, runtimeService, conigurationService, flowConfigurationService, quoteDraftService, route, messageService, customizationService) {
1529
+ function ProductComponent(contextService, runtimeService, conigurationService, quoteDraftService, messageService, customizationService) {
1460
1530
  this.contextService = contextService;
1461
1531
  this.runtimeService = runtimeService;
1462
1532
  this.conigurationService = conigurationService;
1463
- this.flowConfigurationService = flowConfigurationService;
1464
1533
  this.quoteDraftService = quoteDraftService;
1465
- this.route = route;
1466
1534
  this.messageService = messageService;
1467
1535
  this.customizationService = customizationService;
1468
1536
  this.destroy$ = new rxjs.Subject();
@@ -1470,20 +1538,7 @@
1470
1538
  }
1471
1539
  ProductComponent.prototype.ngOnInit = function () {
1472
1540
  var _this = this;
1473
- this.quoteDraftService.quote$
1474
- .pipe(rxjs.first(), rxjs.map(function (quote) {
1475
- var _a, _b;
1476
- var contextProperties = (_b = (_a = _this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
1477
- if (contextProperties.standalone === 'true') {
1478
- return quote;
1479
- }
1480
- var productLineItem = _this.flowConfigurationService
1481
- .getSnapshot()
1482
- .find(function (li) { return li.productId === contextProperties.productId; });
1483
- var state = productLineItem ? [productLineItem] : [];
1484
- return Object.assign(Object.assign({}, quote), { initialState: state, currentState: state });
1485
- }), rxjs.takeUntil(this.destroy$))
1486
- .subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
1541
+ this.quoteDraftService.quote$.pipe(rxjs.first(), rxjs.takeUntil(this.destroy$)).subscribe(function (quote) { return _this.init(quote); });
1487
1542
  };
1488
1543
  ProductComponent.prototype.ngOnDestroy = function () {
1489
1544
  this.destroy$.next();
@@ -1503,12 +1558,16 @@
1503
1558
  }
1504
1559
  }));
1505
1560
  };
1506
- ProductComponent.prototype.init = function (quote, queryParams) {
1561
+ ProductComponent.prototype.init = function (quote) {
1507
1562
  var _this = this;
1508
- var _a;
1509
- var lineItemId = this.getLineItemId(quote, queryParams);
1563
+ var _a, _b;
1564
+ var contextProperties = (_b = (_a = this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
1565
+ var productId = contextProperties.productId;
1566
+ if (!productId) {
1567
+ return;
1568
+ }
1569
+ var lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
1510
1570
  var currentStateItem = i1$2.EntityUtil.findById(lineItemId, quote.currentState);
1511
- var productId = (_a = currentStateItem === null || currentStateItem === void 0 ? void 0 : currentStateItem.productId) !== null && _a !== void 0 ? _a : queryParams['productId'];
1512
1571
  var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
1513
1572
  if (currentStateItem) {
1514
1573
  this.conigurationService.updateCurrentStates({
@@ -1528,19 +1587,19 @@
1528
1587
  }), rxjs.takeUntil(this.destroy$))
1529
1588
  .subscribe();
1530
1589
  };
1531
- ProductComponent.prototype.getLineItemId = function (quote, queryParams) {
1532
- if (i1$2.EntityUtil.isPresent(queryParams['lineItemId'])) {
1533
- return queryParams['lineItemId'];
1590
+ ProductComponent.prototype.getLineItemId = function (quote, productId, lineItemId) {
1591
+ var _a, _b;
1592
+ // search by lineItemId first
1593
+ var id = (_a = quote.currentState.find(function (li) { return li.id === lineItemId; })) === null || _a === void 0 ? void 0 : _a.id;
1594
+ if (!id) {
1595
+ id = (_b = quote.currentState.find(function (li) { return li.productId === productId; })) === null || _b === void 0 ? void 0 : _b.id;
1534
1596
  }
1535
- return quote.currentState
1536
- .filter(function (lineItem) { return lineItem.productId === queryParams['productId']; })
1537
- .map(function (lineItem) { return lineItem.id; })
1538
- .find(function (id) { return id; });
1597
+ return id;
1539
1598
  };
1540
1599
  return ProductComponent;
1541
1600
  }());
1542
- ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.ConfigurationRuntimeService }, { token: i2__namespace.ConfigurationService }, { token: i2__namespace.FlowConfigurationService }, { token: i2__namespace.QuoteDraftService }, { token: i1__namespace$1.ActivatedRoute }, { token: i3__namespace.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1543
- ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1601
+ ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.ConfigurationRuntimeService }, { token: i2__namespace.ConfigurationService }, { token: i2__namespace.QuoteDraftService }, { token: i2__namespace$1.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1602
+ ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1544
1603
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, decorators: [{
1545
1604
  type: i0.Component,
1546
1605
  args: [{
@@ -1550,7 +1609,7 @@
1550
1609
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1551
1610
  }]
1552
1611
  }], ctorParameters: function () {
1553
- return [{ type: i2__namespace.ContextService }, { type: i2__namespace.ConfigurationRuntimeService }, { type: i2__namespace.ConfigurationService }, { type: i2__namespace.FlowConfigurationService }, { type: i2__namespace.QuoteDraftService }, { type: i1__namespace$1.ActivatedRoute }, { type: i3__namespace.MessageService }, { type: undefined, decorators: [{
1612
+ return [{ type: i2__namespace.ContextService }, { type: i2__namespace.ConfigurationRuntimeService }, { type: i2__namespace.ConfigurationService }, { type: i2__namespace.QuoteDraftService }, { type: i2__namespace$1.MessageService }, { type: undefined, decorators: [{
1554
1613
  type: i0.Optional
1555
1614
  }, {
1556
1615
  type: i0.Inject,
@@ -1564,13 +1623,13 @@
1564
1623
  return ProductModule;
1565
1624
  }());
1566
1625
  ProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1567
- ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule], exports: [ProductComponent] });
1568
- ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule]] });
1626
+ ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule], exports: [ProductComponent] });
1627
+ ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule]] });
1569
1628
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, decorators: [{
1570
1629
  type: i0.NgModule,
1571
1630
  args: [{
1572
1631
  declarations: [ProductComponent],
1573
- imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
1632
+ imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule],
1574
1633
  exports: [ProductComponent],
1575
1634
  }]
1576
1635
  }] });
@@ -1644,7 +1703,7 @@
1644
1703
  }), rxjs.catchError(function (err) {
1645
1704
  var _a;
1646
1705
  var message = 'Failed to resolve Shopping cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
1647
- _this.toastService.add({ severity: i3$1.ToastType.error, summary: message, sticky: true });
1706
+ _this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
1648
1707
  _this.uiDefinition = undefined;
1649
1708
  _this.state$.next({ loading: false, failure: true });
1650
1709
  return rxjs.of();
@@ -1711,8 +1770,8 @@
1711
1770
  };
1712
1771
  return ShoppingCartComponent;
1713
1772
  }());
1714
- ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$3.UITemplatesApiService }, { token: i2__namespace.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1715
- ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1773
+ ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$3.UITemplatesApiService }, { token: i2__namespace.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1774
+ ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1716
1775
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
1717
1776
  type: i0.Component,
1718
1777
  args: [{
@@ -1722,7 +1781,7 @@
1722
1781
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1723
1782
  }]
1724
1783
  }], ctorParameters: function () {
1725
- return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$1.ToastService }, { type: undefined, decorators: [{
1784
+ return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1726
1785
  type: i0.Optional
1727
1786
  }, {
1728
1787
  type: i0.Inject,
@@ -1736,13 +1795,13 @@
1736
1795
  return ShoppingCartModule;
1737
1796
  }());
1738
1797
  ShoppingCartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1739
- ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule], exports: [ShoppingCartComponent] });
1740
- ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule]] });
1798
+ ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule], exports: [ShoppingCartComponent] });
1799
+ ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule]] });
1741
1800
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, decorators: [{
1742
1801
  type: i0.NgModule,
1743
1802
  args: [{
1744
1803
  declarations: [ShoppingCartComponent],
1745
- imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
1804
+ imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule],
1746
1805
  exports: [ShoppingCartComponent],
1747
1806
  }]
1748
1807
  }] });
@@ -1907,6 +1966,7 @@
1907
1966
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
1908
1967
  resolve: { context: ContextResolver, quote: QuoteResolver },
1909
1968
  canActivate: [ContextGuard],
1969
+ canDeactivate: [ProductUnloadGuard],
1910
1970
  data: { showHeader: true },
1911
1971
  },
1912
1972
  {
@@ -1942,13 +2002,29 @@
1942
2002
  }());
1943
2003
  FlowRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1944
2004
  FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace$1.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], exports: [i1$1.RouterModule] });
1945
- FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], i1$1.RouterModule] });
2005
+ FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [
2006
+ FlowRouterService,
2007
+ RootGuard,
2008
+ ContextGuard,
2009
+ ProductUnloadGuard,
2010
+ ContextResolver,
2011
+ FlowResolver,
2012
+ QuoteResolver,
2013
+ ], imports: [[i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], i1$1.RouterModule] });
1946
2014
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, decorators: [{
1947
2015
  type: i0.NgModule,
1948
2016
  args: [{
1949
2017
  imports: [i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule],
1950
2018
  exports: [i1$1.RouterModule],
1951
- providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],
2019
+ providers: [
2020
+ FlowRouterService,
2021
+ RootGuard,
2022
+ ContextGuard,
2023
+ ProductUnloadGuard,
2024
+ ContextResolver,
2025
+ FlowResolver,
2026
+ QuoteResolver,
2027
+ ],
1952
2028
  }]
1953
2029
  }] });
1954
2030
 
@@ -1961,8 +2037,8 @@
1961
2037
  FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule,
1962
2038
  FlowRoutingModule,
1963
2039
  i1$3.ApiModule,
1964
- i1$4.LauncherModule,
1965
- i3$1.LoaderModule,
2040
+ i4$1.LauncherModule,
2041
+ i3.LoaderModule,
1966
2042
  FlowHeaderModule,
1967
2043
  FlowDialogModule,
1968
2044
  i2.SdkCoreModule] });
@@ -1970,8 +2046,8 @@
1970
2046
  i9.CommonModule,
1971
2047
  FlowRoutingModule,
1972
2048
  i1$3.ApiModule,
1973
- i1$4.LauncherModule,
1974
- i3$1.LoaderModule,
2049
+ i4$1.LauncherModule,
2050
+ i3.LoaderModule,
1975
2051
  FlowHeaderModule,
1976
2052
  FlowDialogModule,
1977
2053
  i2.SdkCoreModule,
@@ -1984,8 +2060,8 @@
1984
2060
  i9.CommonModule,
1985
2061
  FlowRoutingModule,
1986
2062
  i1$3.ApiModule,
1987
- i1$4.LauncherModule,
1988
- i3$1.LoaderModule,
2063
+ i4$1.LauncherModule,
2064
+ i3.LoaderModule,
1989
2065
  FlowHeaderModule,
1990
2066
  FlowDialogModule,
1991
2067
  i2.SdkCoreModule,