@veloceapps/sdk 3.1.3 → 3.1.5

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 (62) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +108 -75
  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 +181 -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 +2 -0
  9. package/cms/modules/federated/default-options.d.ts +4 -0
  10. package/cms/modules/federated/export.d.ts +1 -0
  11. package/cms/{components → modules}/federated/federated.component.d.ts +12 -22
  12. package/cms/{components → modules}/federated/federated.module.d.ts +3 -1
  13. package/cms/modules/federated/federated.types.d.ts +30 -0
  14. package/cms/modules/federated/federated.utils.d.ts +1 -0
  15. package/cms/services/integration.state.d.ts +1 -4
  16. package/cms/types/index.d.ts +1 -0
  17. package/cms/types/integration.types.d.ts +4 -0
  18. package/cms/utils/index.d.ts +0 -1
  19. package/cms/vendor-map.d.ts +8 -0
  20. package/core/modules/configuration/services/configuration.service.d.ts +1 -0
  21. package/esm2015/cms/cms.actions.js +17 -0
  22. package/esm2015/cms/index.js +3 -1
  23. package/esm2015/cms/modules/federated/default-options.js +5 -0
  24. package/esm2015/cms/modules/federated/export.js +2 -0
  25. package/esm2015/cms/modules/federated/federated.component.js +82 -0
  26. package/esm2015/cms/modules/federated/federated.module.js +19 -0
  27. package/esm2015/cms/modules/federated/federated.types.js +2 -0
  28. package/esm2015/cms/modules/federated/federated.utils.js +37 -0
  29. package/esm2015/cms/services/integration.state.js +1 -1
  30. package/esm2015/cms/services/launcher.service.js +2 -2
  31. package/esm2015/cms/types/index.js +2 -1
  32. package/esm2015/cms/types/integration.types.js +2 -0
  33. package/esm2015/cms/utils/index.js +1 -2
  34. package/esm2015/cms/vendor-map.js +4 -3
  35. package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +2 -2
  36. package/esm2015/core/modules/configuration/services/configuration.service.js +7 -1
  37. package/esm2015/src/components/header/cart-overlay/cart-overlay.component.js +4 -4
  38. package/esm2015/src/components/header/header.component.js +3 -2
  39. package/esm2015/src/flow-routing.module.js +21 -3
  40. package/esm2015/src/guards/product-unload.guard.js +30 -0
  41. package/esm2015/src/pages/product/product.component.js +26 -38
  42. package/esm2015/src/services/flow-router.service.js +13 -5
  43. package/esm2015/src/services/flow.service.js +47 -12
  44. package/esm2015/src/services/fow-dialog.service.js +9 -1
  45. package/fesm2015/veloce-sdk-cms.js +96 -68
  46. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  47. package/fesm2015/veloce-sdk-core.js +7 -1
  48. package/fesm2015/veloce-sdk-core.js.map +1 -1
  49. package/fesm2015/veloce-sdk.js +151 -70
  50. package/fesm2015/veloce-sdk.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/components/header/cart-overlay/cart-overlay.component.d.ts +1 -1
  53. package/src/components/header/header.component.d.ts +1 -0
  54. package/src/guards/product-unload.guard.d.ts +13 -0
  55. package/src/pages/product/product.component.d.ts +3 -6
  56. package/src/services/flow-router.service.d.ts +3 -1
  57. package/src/services/flow.service.d.ts +5 -1
  58. package/src/services/fow-dialog.service.d.ts +1 -0
  59. package/cms/utils/federated.util.d.ts +0 -6
  60. package/esm2015/cms/components/federated/federated.component.js +0 -81
  61. package/esm2015/cms/components/federated/federated.module.js +0 -16
  62. package/esm2015/cms/utils/federated.util.js +0 -37
@@ -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,78 @@
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 isNewLineItem = currentState.some(function (li) { return li.id === lineItem.id; });
989
+ var updatedState;
990
+ if (isNewLineItem) {
991
+ updatedState = __spreadArray(__spreadArray([], __read(currentState)), [lineItem]);
992
+ }
993
+ else {
994
+ updatedState = currentState.map(function (li) { return (li.id === lineItem.id ? lineItem : li); });
995
+ }
996
+ return _this.flowConfigurationService.calculate$(updatedState);
997
+ }), rxjs.tap(function () {
998
+ _this.configurationService.hasUnsavedChanges = false;
999
+ _this.flowRouterService.navigateToShoppingCart();
1000
+ }))
1001
+ .subscribe();
952
1002
  };
953
1003
  FlowService.prototype.cleanup = function () {
954
1004
  this.cleanup$.next();
955
1005
  };
956
1006
  return FlowService;
957
1007
  }());
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 });
1008
+ 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
1009
  FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
960
1010
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
961
1011
  type: i0.Injectable
962
- }], ctorParameters: function () { return [{ type: i1__namespace$4.IntegrationState }, { type: FlowRouterService }]; } });
1012
+ }], ctorParameters: function () { return [{ type: i4__namespace$1.IntegrationState }, { type: FlowRouterService }, { type: i2__namespace.QuoteDraftService }, { type: i2__namespace.ConfigurationService }, { type: i2__namespace.FlowConfigurationService }]; } });
963
1013
 
964
1014
  var FlowComponent = /** @class */ (function () {
965
1015
  function FlowComponent(routerService, context, flowService) {
@@ -977,7 +1027,7 @@
977
1027
  return FlowComponent;
978
1028
  }());
979
1029
  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 });
1030
+ 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
1031
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
982
1032
  type: i0.Component,
983
1033
  args: [{
@@ -1047,6 +1097,33 @@
1047
1097
  type: i0.Injectable
1048
1098
  }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
1049
1099
 
1100
+ var ProductUnloadGuard = /** @class */ (function () {
1101
+ function ProductUnloadGuard(contextService, configurationService, flowDialogService) {
1102
+ this.contextService = contextService;
1103
+ this.configurationService = configurationService;
1104
+ this.flowDialogService = flowDialogService;
1105
+ }
1106
+ ProductUnloadGuard.prototype.canDeactivate = function () {
1107
+ var _this = this;
1108
+ var observable = rxjs.of(true);
1109
+ if (!this.contextService.isStandalone && this.configurationService.hasUnsavedChanges) {
1110
+ observable = this.flowDialogService.showUnsavedChangesDialog().pipe(rxjs.map(function (confirmed) { return !confirmed; }));
1111
+ }
1112
+ return observable.pipe(rxjs.tap(function (unload) {
1113
+ if (unload) {
1114
+ _this.contextService.update({ properties: { productId: undefined, lineItemId: undefined } });
1115
+ _this.configurationService.reset();
1116
+ }
1117
+ }));
1118
+ };
1119
+ return ProductUnloadGuard;
1120
+ }());
1121
+ 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 });
1122
+ ProductUnloadGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard });
1123
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard, decorators: [{
1124
+ type: i0.Injectable
1125
+ }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.ConfigurationService }, { type: FlowDialogService }]; } });
1126
+
1050
1127
  var RootGuard = /** @class */ (function () {
1051
1128
  function RootGuard(router, routerService) {
1052
1129
  this.router = router;
@@ -1114,7 +1191,7 @@
1114
1191
  }), rxjs.catchError(function (err) {
1115
1192
  var _a;
1116
1193
  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 });
1194
+ _this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
1118
1195
  _this.uiDefinition = undefined;
1119
1196
  _this.state$.next({ loading: false, failure: true });
1120
1197
  return rxjs.of();
@@ -1181,8 +1258,8 @@
1181
1258
  };
1182
1259
  return CatalogComponent;
1183
1260
  }());
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 });
1261
+ 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 });
1262
+ 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
1263
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, decorators: [{
1187
1264
  type: i0.Component,
1188
1265
  args: [{
@@ -1192,7 +1269,7 @@
1192
1269
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1193
1270
  }]
1194
1271
  }], 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: [{
1272
+ return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1196
1273
  type: i0.Optional
1197
1274
  }, {
1198
1275
  type: i0.Inject,
@@ -1206,13 +1283,13 @@
1206
1283
  return CatalogModule;
1207
1284
  }());
1208
1285
  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]] });
1286
+ 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] });
1287
+ 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
1288
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, decorators: [{
1212
1289
  type: i0.NgModule,
1213
1290
  args: [{
1214
1291
  declarations: [CatalogComponent],
1215
- imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
1292
+ imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule],
1216
1293
  exports: [CatalogComponent],
1217
1294
  }]
1218
1295
  }] });
@@ -1259,7 +1336,7 @@
1259
1336
  return DebugComponent;
1260
1337
  }());
1261
1338
  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 });
1339
+ 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
1340
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
1264
1341
  type: i0.Component,
1265
1342
  args: [{
@@ -1282,7 +1359,7 @@
1282
1359
  i7.ReactiveFormsModule, i1__namespace$1.RouterModule, i6$1.RadioButtonModule,
1283
1360
  i5.ButtonModule,
1284
1361
  i8.InputTextModule,
1285
- i4$1.DropdownModule] });
1362
+ i4$2.DropdownModule] });
1286
1363
  DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, imports: [[
1287
1364
  i9.CommonModule,
1288
1365
  i7.FormsModule,
@@ -1291,7 +1368,7 @@
1291
1368
  i6$1.RadioButtonModule,
1292
1369
  i5.ButtonModule,
1293
1370
  i8.InputTextModule,
1294
- i4$1.DropdownModule,
1371
+ i4$2.DropdownModule,
1295
1372
  ]] });
1296
1373
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, decorators: [{
1297
1374
  type: i0.NgModule,
@@ -1305,7 +1382,7 @@
1305
1382
  i6$1.RadioButtonModule,
1306
1383
  i5.ButtonModule,
1307
1384
  i8.InputTextModule,
1308
- i4$1.DropdownModule,
1385
+ i4$2.DropdownModule,
1309
1386
  ],
1310
1387
  }]
1311
1388
  }] });
@@ -1421,8 +1498,8 @@
1421
1498
  };
1422
1499
  return LegacyProductComponent;
1423
1500
  }());
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"] }] });
1501
+ 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 });
1502
+ 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
1503
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
1427
1504
  type: i0.Component,
1428
1505
  args: [{
@@ -1430,7 +1507,7 @@
1430
1507
  styleUrls: ['./legacy-product.component.scss'],
1431
1508
  }]
1432
1509
  }], 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: [{
1510
+ 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
1511
  type: i0.Optional
1435
1512
  }, {
1436
1513
  type: i0.Inject,
@@ -1444,25 +1521,23 @@
1444
1521
  return LegacyProductModule;
1445
1522
  }());
1446
1523
  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()]] });
1524
+ 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] });
1525
+ 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
1526
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
1450
1527
  type: i0.NgModule,
1451
1528
  args: [{
1452
1529
  declarations: [LegacyProductComponent],
1453
- imports: [i9.CommonModule, i4$2.RuntimeModule, i1$5.TooltipModule.forRoot()],
1530
+ imports: [i9.CommonModule, i4$3.RuntimeModule, i1$4.TooltipModule.forRoot()],
1454
1531
  exports: [LegacyProductComponent],
1455
1532
  }]
1456
1533
  }] });
1457
1534
 
1458
1535
  var ProductComponent = /** @class */ (function () {
1459
- function ProductComponent(contextService, runtimeService, conigurationService, flowConfigurationService, quoteDraftService, route, messageService, customizationService) {
1536
+ function ProductComponent(contextService, runtimeService, conigurationService, quoteDraftService, messageService, customizationService) {
1460
1537
  this.contextService = contextService;
1461
1538
  this.runtimeService = runtimeService;
1462
1539
  this.conigurationService = conigurationService;
1463
- this.flowConfigurationService = flowConfigurationService;
1464
1540
  this.quoteDraftService = quoteDraftService;
1465
- this.route = route;
1466
1541
  this.messageService = messageService;
1467
1542
  this.customizationService = customizationService;
1468
1543
  this.destroy$ = new rxjs.Subject();
@@ -1470,20 +1545,7 @@
1470
1545
  }
1471
1546
  ProductComponent.prototype.ngOnInit = function () {
1472
1547
  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); });
1548
+ this.quoteDraftService.quote$.pipe(rxjs.first(), rxjs.takeUntil(this.destroy$)).subscribe(function (quote) { return _this.init(quote); });
1487
1549
  };
1488
1550
  ProductComponent.prototype.ngOnDestroy = function () {
1489
1551
  this.destroy$.next();
@@ -1503,12 +1565,16 @@
1503
1565
  }
1504
1566
  }));
1505
1567
  };
1506
- ProductComponent.prototype.init = function (quote, queryParams) {
1568
+ ProductComponent.prototype.init = function (quote) {
1507
1569
  var _this = this;
1508
- var _a;
1509
- var lineItemId = this.getLineItemId(quote, queryParams);
1570
+ var _a, _b;
1571
+ var contextProperties = (_b = (_a = this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
1572
+ var productId = contextProperties.productId;
1573
+ if (!productId) {
1574
+ return;
1575
+ }
1576
+ var lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
1510
1577
  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
1578
  var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
1513
1579
  if (currentStateItem) {
1514
1580
  this.conigurationService.updateCurrentStates({
@@ -1528,19 +1594,19 @@
1528
1594
  }), rxjs.takeUntil(this.destroy$))
1529
1595
  .subscribe();
1530
1596
  };
1531
- ProductComponent.prototype.getLineItemId = function (quote, queryParams) {
1532
- if (i1$2.EntityUtil.isPresent(queryParams['lineItemId'])) {
1533
- return queryParams['lineItemId'];
1597
+ ProductComponent.prototype.getLineItemId = function (quote, productId, lineItemId) {
1598
+ var _a, _b;
1599
+ // search by lineItemId first
1600
+ var id = (_a = quote.currentState.find(function (li) { return li.id === lineItemId; })) === null || _a === void 0 ? void 0 : _a.id;
1601
+ if (!id) {
1602
+ id = (_b = quote.currentState.find(function (li) { return li.productId === productId; })) === null || _b === void 0 ? void 0 : _b.id;
1534
1603
  }
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; });
1604
+ return id;
1539
1605
  };
1540
1606
  return ProductComponent;
1541
1607
  }());
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 });
1608
+ 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 });
1609
+ 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
1610
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, decorators: [{
1545
1611
  type: i0.Component,
1546
1612
  args: [{
@@ -1550,7 +1616,7 @@
1550
1616
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1551
1617
  }]
1552
1618
  }], 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: [{
1619
+ 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
1620
  type: i0.Optional
1555
1621
  }, {
1556
1622
  type: i0.Inject,
@@ -1564,13 +1630,13 @@
1564
1630
  return ProductModule;
1565
1631
  }());
1566
1632
  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]] });
1633
+ 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] });
1634
+ 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
1635
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, decorators: [{
1570
1636
  type: i0.NgModule,
1571
1637
  args: [{
1572
1638
  declarations: [ProductComponent],
1573
- imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
1639
+ imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule],
1574
1640
  exports: [ProductComponent],
1575
1641
  }]
1576
1642
  }] });
@@ -1644,7 +1710,7 @@
1644
1710
  }), rxjs.catchError(function (err) {
1645
1711
  var _a;
1646
1712
  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 });
1713
+ _this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
1648
1714
  _this.uiDefinition = undefined;
1649
1715
  _this.state$.next({ loading: false, failure: true });
1650
1716
  return rxjs.of();
@@ -1711,8 +1777,8 @@
1711
1777
  };
1712
1778
  return ShoppingCartComponent;
1713
1779
  }());
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 });
1780
+ 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 });
1781
+ 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
1782
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
1717
1783
  type: i0.Component,
1718
1784
  args: [{
@@ -1722,7 +1788,7 @@
1722
1788
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1723
1789
  }]
1724
1790
  }], 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: [{
1791
+ return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1726
1792
  type: i0.Optional
1727
1793
  }, {
1728
1794
  type: i0.Inject,
@@ -1736,13 +1802,13 @@
1736
1802
  return ShoppingCartModule;
1737
1803
  }());
1738
1804
  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]] });
1805
+ 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] });
1806
+ 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
1807
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, decorators: [{
1742
1808
  type: i0.NgModule,
1743
1809
  args: [{
1744
1810
  declarations: [ShoppingCartComponent],
1745
- imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
1811
+ imports: [i9.CommonModule, i4$1.PreviewModule, i3.LoaderModule],
1746
1812
  exports: [ShoppingCartComponent],
1747
1813
  }]
1748
1814
  }] });
@@ -1907,6 +1973,7 @@
1907
1973
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
1908
1974
  resolve: { context: ContextResolver, quote: QuoteResolver },
1909
1975
  canActivate: [ContextGuard],
1976
+ canDeactivate: [ProductUnloadGuard],
1910
1977
  data: { showHeader: true },
1911
1978
  },
1912
1979
  {
@@ -1942,13 +2009,29 @@
1942
2009
  }());
1943
2010
  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
2011
  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] });
2012
+ FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [
2013
+ FlowRouterService,
2014
+ RootGuard,
2015
+ ContextGuard,
2016
+ ProductUnloadGuard,
2017
+ ContextResolver,
2018
+ FlowResolver,
2019
+ QuoteResolver,
2020
+ ], imports: [[i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], i1$1.RouterModule] });
1946
2021
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, decorators: [{
1947
2022
  type: i0.NgModule,
1948
2023
  args: [{
1949
2024
  imports: [i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule],
1950
2025
  exports: [i1$1.RouterModule],
1951
- providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],
2026
+ providers: [
2027
+ FlowRouterService,
2028
+ RootGuard,
2029
+ ContextGuard,
2030
+ ProductUnloadGuard,
2031
+ ContextResolver,
2032
+ FlowResolver,
2033
+ QuoteResolver,
2034
+ ],
1952
2035
  }]
1953
2036
  }] });
1954
2037
 
@@ -1961,8 +2044,8 @@
1961
2044
  FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule,
1962
2045
  FlowRoutingModule,
1963
2046
  i1$3.ApiModule,
1964
- i1$4.LauncherModule,
1965
- i3$1.LoaderModule,
2047
+ i4$1.LauncherModule,
2048
+ i3.LoaderModule,
1966
2049
  FlowHeaderModule,
1967
2050
  FlowDialogModule,
1968
2051
  i2.SdkCoreModule] });
@@ -1970,8 +2053,8 @@
1970
2053
  i9.CommonModule,
1971
2054
  FlowRoutingModule,
1972
2055
  i1$3.ApiModule,
1973
- i1$4.LauncherModule,
1974
- i3$1.LoaderModule,
2056
+ i4$1.LauncherModule,
2057
+ i3.LoaderModule,
1975
2058
  FlowHeaderModule,
1976
2059
  FlowDialogModule,
1977
2060
  i2.SdkCoreModule,
@@ -1984,8 +2067,8 @@
1984
2067
  i9.CommonModule,
1985
2068
  FlowRoutingModule,
1986
2069
  i1$3.ApiModule,
1987
- i1$4.LauncherModule,
1988
- i3$1.LoaderModule,
2070
+ i4$1.LauncherModule,
2071
+ i3.LoaderModule,
1989
2072
  FlowHeaderModule,
1990
2073
  FlowDialogModule,
1991
2074
  i2.SdkCoreModule,