@veloceapps/sdk 3.1.5 → 3.1.7

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 (48) hide show
  1. package/bundles/veloce-sdk-core.umd.js +41 -16
  2. package/bundles/veloce-sdk-core.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-runtime.umd.js +3 -13
  4. package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
  5. package/bundles/veloce-sdk.umd.js +145 -120
  6. package/bundles/veloce-sdk.umd.js.map +1 -1
  7. package/core/modules/configuration/services/configuration.service.d.ts +2 -2
  8. package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +2 -2
  9. package/core/services/context.service.d.ts +4 -4
  10. package/core/services/quote-draft.service.d.ts +3 -0
  11. package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +2 -5
  12. package/esm2015/core/modules/configuration/services/configuration.service.js +2 -2
  13. package/esm2015/core/modules/flow-configuration/services/flow-configuration.service.js +1 -1
  14. package/esm2015/core/services/context.service.js +13 -10
  15. package/esm2015/core/services/quote-draft.service.js +26 -5
  16. package/esm2015/runtime/components/ui-runtime/runtime.component.js +1 -4
  17. package/esm2015/runtime/execution/directives/vl-ramp.directive.js +1 -4
  18. package/esm2015/runtime/services/cart.service.js +1 -1
  19. package/esm2015/runtime/services/configuration.service.js +3 -3
  20. package/esm2015/runtime/services/runtime-context.service.js +2 -3
  21. package/esm2015/runtime/services/runtime.service.js +1 -4
  22. package/esm2015/src/components/header/header.component.js +36 -19
  23. package/esm2015/src/flow.component.js +6 -6
  24. package/esm2015/src/flow.module.js +2 -2
  25. package/esm2015/src/guards/product-unload.guard.js +7 -6
  26. package/esm2015/src/pages/catalog/catalog.component.js +3 -3
  27. package/esm2015/src/pages/legacy-product/legacy-product.component.js +1 -1
  28. package/esm2015/src/pages/product/product.component.js +2 -3
  29. package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +3 -3
  30. package/esm2015/src/resolvers/context.resolver.js +7 -5
  31. package/esm2015/src/resolvers/quote.resolver.js +2 -2
  32. package/esm2015/src/services/flow-dialog.service.js +80 -0
  33. package/esm2015/src/services/flow.service.js +2 -2
  34. package/esm2015/src/utils/flow.utils.js +1 -11
  35. package/fesm2015/veloce-sdk-core.js +38 -18
  36. package/fesm2015/veloce-sdk-core.js.map +1 -1
  37. package/fesm2015/veloce-sdk-runtime.js +3 -13
  38. package/fesm2015/veloce-sdk-runtime.js.map +1 -1
  39. package/fesm2015/veloce-sdk.js +117 -92
  40. package/fesm2015/veloce-sdk.js.map +1 -1
  41. package/package.json +1 -1
  42. package/runtime/services/cart.service.d.ts +1 -1
  43. package/src/components/header/header.component.d.ts +7 -4
  44. package/src/flow.component.d.ts +3 -3
  45. package/src/guards/product-unload.guard.d.ts +4 -3
  46. package/src/services/{fow-dialog.service.d.ts → flow-dialog.service.d.ts} +2 -0
  47. package/src/utils/flow.utils.d.ts +0 -2
  48. package/esm2015/src/services/fow-dialog.service.js +0 -66
@@ -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, 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';
5
+ })(this, (function (exports, i9, i0, i1$4, i3, i4$1, i1$2, i5, i1, i4, i10, i7, i6, rxjs, i1$3, i1$1, i2, i4$2, i8, i6$1, operators, i4$3, i1$5, http) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,24 +24,24 @@
24
24
 
25
25
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
26
26
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
- var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
27
+ var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
28
28
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
29
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
31
31
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
32
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
33
33
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
34
34
  var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
35
35
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
36
36
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
37
- var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
37
+ var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
38
38
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
39
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
39
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
40
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
43
  var i4__namespace$3 = /*#__PURE__*/_interopNamespace(i4$3);
44
- var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
44
+ var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
45
45
 
46
46
  var VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
47
47
 
@@ -526,12 +526,12 @@
526
526
  };
527
527
  return FlowRouterService;
528
528
  }());
529
- FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
529
+ FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$2.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
530
530
  FlowRouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, providedIn: 'root' });
531
531
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, decorators: [{
532
532
  type: i0.Injectable,
533
533
  args: [{ providedIn: 'root' }]
534
- }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace.ContextService }]; } });
534
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$2.ContextService }]; } });
535
535
 
536
536
  var HeaderCartOverlayComponent = /** @class */ (function () {
537
537
  function HeaderCartOverlayComponent(baseHttpService, flowConfiguration, routerService) {
@@ -646,8 +646,8 @@
646
646
  };
647
647
  return HeaderCartOverlayComponent;
648
648
  }());
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 });
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 });
649
+ HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace$3.BaseHttpService }, { token: i1__namespace$2.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
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.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 });
651
651
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, decorators: [{
652
652
  type: i0.Component,
653
653
  args: [{
@@ -656,7 +656,7 @@
656
656
  styleUrls: ['./cart-overlay.component.scss'],
657
657
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
658
658
  }]
659
- }], ctorParameters: function () { return [{ type: i1__namespace$2.BaseHttpService }, { type: i2__namespace.FlowConfigurationService }, { type: FlowRouterService }]; }, propDecorators: { overlayPanel: [{
659
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.BaseHttpService }, { type: i1__namespace$2.FlowConfigurationService }, { type: FlowRouterService }]; }, propDecorators: { overlayPanel: [{
660
660
  type: i0.ViewChild,
661
661
  args: [i4.OverlayPanel]
662
662
  }], products: [{
@@ -680,27 +680,6 @@
680
680
  }]
681
681
  }] });
682
682
 
683
- var getFlowObjectIdPropertyName = function (objectName) {
684
- switch (objectName) {
685
- case 'Account':
686
- return 'accountId';
687
- case 'Order':
688
- return 'orderId';
689
- case 'Quote':
690
- default:
691
- return 'quoteId';
692
- }
693
- };
694
- var getIsEditMode = function (context) {
695
- if (context.mode === i1$2.ConfigurationContextMode.QUOTE) {
696
- return context.properties.Status === 'Draft';
697
- }
698
- else if (context.mode === i1$2.ConfigurationContextMode.ACCOUNT) {
699
- return true;
700
- }
701
- return false;
702
- };
703
-
704
683
  var FlowDialogService = /** @class */ (function () {
705
684
  function FlowDialogService(dialogService, contextService) {
706
685
  this.dialogService = dialogService;
@@ -726,7 +705,7 @@
726
705
  };
727
706
  FlowDialogService.prototype.showReadonlyModeDialog = function () {
728
707
  var ctx = this.contextService.resolve();
729
- var objectName = (ctx === null || ctx === void 0 ? void 0 : ctx.mode) ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
708
+ var objectName = ctx.mode ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
730
709
  return this.show({
731
710
  title: 'Error',
732
711
  description: objectName + " Cannot be Saved",
@@ -755,19 +734,32 @@
755
734
  secondaryButton: 'Discard Changes',
756
735
  });
757
736
  };
737
+ FlowDialogService.prototype.showReadonlyQuoteSubmitFailureDialog = function () {
738
+ return this.show({
739
+ title: 'Cannot Submit for Approval',
740
+ description: 'It is only possible to submit for approval quotes with the “Draft“ status. Please create a new quote to proceed.',
741
+ primaryButton: 'OK',
742
+ });
743
+ };
744
+ FlowDialogService.prototype.showAccountSubmitFailureDialog = function () {
745
+ return this.show({
746
+ title: 'Save Changes',
747
+ description: 'To submit for approval, save the quote first, and then submit it for approval from the Shopping Cart.',
748
+ primaryButton: 'OK',
749
+ });
750
+ };
758
751
  return FlowDialogService;
759
752
  }());
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 });
753
+ FlowDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService, deps: [{ token: i1__namespace.DialogService }, { token: i1__namespace$2.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
761
754
  FlowDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService });
762
755
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService, decorators: [{
763
756
  type: i0.Injectable
764
- }], ctorParameters: function () { return [{ type: i1__namespace.DialogService }, { type: i2__namespace.ContextService }]; } });
757
+ }], ctorParameters: function () { return [{ type: i1__namespace.DialogService }, { type: i1__namespace$2.ContextService }]; } });
765
758
 
766
759
  var FlowHeaderComponent = /** @class */ (function () {
767
- function FlowHeaderComponent(context, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService) {
760
+ function FlowHeaderComponent(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService) {
768
761
  var _this = this;
769
- var _a, _b, _c;
770
- this.context = context;
762
+ this.contextService = contextService;
771
763
  this.quoteDraftService = quoteDraftService;
772
764
  this.quoteApiService = quoteApiService;
773
765
  this.sfApiService = sfApiService;
@@ -777,12 +769,14 @@
777
769
  this.disabledActionButtonTooltip = 'Available from the Shopping Cart';
778
770
  this.objectDetails$ = new rxjs.BehaviorSubject({});
779
771
  this.isSaveInProgress$ = new rxjs.BehaviorSubject(false);
772
+ this.isSubmitInProgress$ = new rxjs.BehaviorSubject(false);
780
773
  this.destroyed$ = new rxjs.Subject();
781
- var ctx = this.context.resolve();
782
- this.mode = ctx === null || ctx === void 0 ? void 0 : ctx.mode;
783
- this.objectName = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.mode) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';
784
- this.contextProperties = (_c = ctx === null || ctx === void 0 ? void 0 : ctx.properties) !== null && _c !== void 0 ? _c : {};
785
- this.isEditMode = ctx ? getIsEditMode(ctx) : false;
774
+ var ctx = this.contextService.resolve();
775
+ this.mode = ctx.mode;
776
+ this.objectName = ctx.mode.toLowerCase();
777
+ this.contextProperties = ctx.properties;
778
+ this.status$ = this.contextService.resolve$().pipe(rxjs.map(function (context) { var _a; return (_a = context.properties.Status) !== null && _a !== void 0 ? _a : ''; }));
779
+ this.isEditMode$ = this.quoteDraftService.isEditMode$();
786
780
  this.products$ = this.flowConfiguration.get().pipe(rxjs.map(function (lineItems) { return _this.generateProducts(lineItems); }));
787
781
  this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
788
782
  this.isCartRoute$ = this.routerService.isCartRoute$();
@@ -797,21 +791,20 @@
797
791
  };
798
792
  Object.defineProperty(FlowHeaderComponent.prototype, "isAccountMode", {
799
793
  get: function () {
800
- return this.mode === i1$2.ConfigurationContextMode.ACCOUNT;
794
+ return this.mode === i1$3.ConfigurationContextMode.ACCOUNT;
801
795
  },
802
796
  enumerable: false,
803
797
  configurable: true
804
798
  });
805
799
  Object.defineProperty(FlowHeaderComponent.prototype, "isQuoteMode", {
806
800
  get: function () {
807
- return this.mode === i1$2.ConfigurationContextMode.QUOTE;
801
+ return this.mode === i1$3.ConfigurationContextMode.QUOTE;
808
802
  },
809
803
  enumerable: false,
810
804
  configurable: true
811
805
  });
812
806
  FlowHeaderComponent.prototype.back = function () {
813
- var _a;
814
- var objectId = (_a = this.context.resolve()) === null || _a === void 0 ? void 0 : _a.headerId;
807
+ var objectId = this.contextService.resolve().headerId;
815
808
  if (objectId) {
816
809
  window.VELO_BACK_FN.apply(null, [objectId]);
817
810
  }
@@ -830,8 +823,8 @@
830
823
  };
831
824
  FlowHeaderComponent.prototype.saveButtonClickHandler = function () {
832
825
  var _this = this;
833
- if (!this.isEditMode) {
834
- if (this.mode === i1$2.ConfigurationContextMode.QUOTE) {
826
+ if (!this.quoteDraftService.isEditMode()) {
827
+ if (this.mode === i1$3.ConfigurationContextMode.QUOTE) {
835
828
  this.dialogService.showQuoteReadonlyModeDialog().subscribe();
836
829
  }
837
830
  else {
@@ -839,7 +832,7 @@
839
832
  }
840
833
  return;
841
834
  }
842
- if (this.mode === i1$2.ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasUnsavedChanges) {
835
+ if (this.mode === i1$3.ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasUnsavedChanges) {
843
836
  this.dialogService.showAccountNoChangesDialog().subscribe();
844
837
  return;
845
838
  }
@@ -849,21 +842,40 @@
849
842
  return;
850
843
  }
851
844
  var quoteDraft = this.quoteDraftService.quoteSnapshot;
852
- var context = this.context.resolve();
853
- if (!quoteDraft || !context) {
845
+ if (!quoteDraft) {
854
846
  return;
855
847
  }
856
848
  this.isSaveInProgress$.next(true);
857
849
  this.quoteApiService
858
- .upsertQuote(Object.assign(Object.assign({}, quoteDraft), { context: context, currentState: lineItems }))
850
+ .upsertQuote(quoteDraft)
859
851
  .pipe(rxjs.tap(function () {
860
852
  // navigate back to quote on successful save
861
- if (_this.mode === i1$2.ConfigurationContextMode.QUOTE) {
853
+ if (_this.mode === i1$3.ConfigurationContextMode.QUOTE) {
862
854
  _this.back();
863
855
  }
864
856
  }), rxjs.finalize(function () { return _this.isSaveInProgress$.next(false); }))
865
857
  .subscribe();
866
858
  };
859
+ FlowHeaderComponent.prototype.submitButtonClickHandler = function () {
860
+ var _this = this;
861
+ if (this.mode === i1$3.ConfigurationContextMode.QUOTE && !this.quoteDraftService.isEditMode()) {
862
+ this.dialogService.showReadonlyQuoteSubmitFailureDialog();
863
+ return;
864
+ }
865
+ if (this.mode === i1$3.ConfigurationContextMode.ACCOUNT) {
866
+ this.dialogService.showAccountSubmitFailureDialog();
867
+ return;
868
+ }
869
+ var quoteDraft = this.quoteDraftService.quoteSnapshot;
870
+ if (!quoteDraft) {
871
+ return;
872
+ }
873
+ this.isSubmitInProgress$.next(true);
874
+ this.quoteApiService
875
+ .submitQuote(quoteDraft)
876
+ .pipe(rxjs.switchMap(function () { return _this.quoteApiService.getQuoteDraft(quoteDraft.quoteId); }), rxjs.tap(function (updatedQuoteDraft) { return _this.contextService.update({ properties: updatedQuoteDraft.context.properties }); }), rxjs.finalize(function () { return _this.isSubmitInProgress$.next(false); }), rxjs.takeUntil(this.destroyed$))
877
+ .subscribe();
878
+ };
867
879
  FlowHeaderComponent.prototype.queryName$ = function (objectName, id) {
868
880
  if (!id) {
869
881
  return rxjs.of('');
@@ -920,8 +932,8 @@
920
932
  };
921
933
  return FlowHeaderComponent;
922
934
  }());
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 });
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 });
935
+ FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i1__namespace$2.ContextService }, { token: i1__namespace$2.QuoteDraftService }, { token: i1__namespace$4.QuoteApiService }, { token: i1__namespace$4.SalesforceApiService }, { token: i1__namespace$2.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
936
+ 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>{{ status$ | async }}</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 styleClass=\"p-button-outlined\"\n label=\"Generate Doc\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button-outlined\"\n [label]=\"isSaveInProgress ? 'Saving' : 'Save to Quote'\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"isSaveInProgress\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n [label]=\"isSubmitInProgress ? 'Submitting' : 'Submit For Approval'\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"submitButtonClickHandler()\"\n [loading]=\"isSubmitInProgress\"\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-label{white-space:nowrap}:host ::ng-deep .save-button .p-button{width:120px}:host ::ng-deep .submit-button .p-button{width:160px}.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.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 });
925
937
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
926
938
  type: i0.Component,
927
939
  args: [{
@@ -930,7 +942,7 @@
930
942
  styleUrls: ['./header.component.scss'],
931
943
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
932
944
  }]
933
- }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.QuoteDraftService }, { type: i1__namespace$3.QuoteApiService }, { type: i1__namespace$3.SalesforceApiService }, { type: i2__namespace.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }]; } });
945
+ }], ctorParameters: function () { return [{ type: i1__namespace$2.ContextService }, { type: i1__namespace$2.QuoteDraftService }, { type: i1__namespace$4.QuoteApiService }, { type: i1__namespace$4.SalesforceApiService }, { type: i1__namespace$2.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }]; } });
934
946
 
935
947
  var FlowHeaderModule = /** @class */ (function () {
936
948
  function FlowHeaderModule() {
@@ -985,7 +997,7 @@
985
997
  return rxjs.of(undefined);
986
998
  }
987
999
  var currentState = _this.flowConfigurationService.getSnapshot();
988
- var isNewLineItem = currentState.some(function (li) { return li.id === lineItem.id; });
1000
+ var isNewLineItem = currentState.every(function (li) { return li.id !== lineItem.id; });
989
1001
  var updatedState;
990
1002
  if (isNewLineItem) {
991
1003
  updatedState = __spreadArray(__spreadArray([], __read(currentState)), [lineItem]);
@@ -1005,20 +1017,20 @@
1005
1017
  };
1006
1018
  return FlowService;
1007
1019
  }());
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 });
1020
+ 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: i1__namespace$2.QuoteDraftService }, { token: i1__namespace$2.ConfigurationService }, { token: i1__namespace$2.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1009
1021
  FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
1010
1022
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
1011
1023
  type: i0.Injectable
1012
- }], ctorParameters: function () { return [{ type: i4__namespace$1.IntegrationState }, { type: FlowRouterService }, { type: i2__namespace.QuoteDraftService }, { type: i2__namespace.ConfigurationService }, { type: i2__namespace.FlowConfigurationService }]; } });
1024
+ }], ctorParameters: function () { return [{ type: i4__namespace$1.IntegrationState }, { type: FlowRouterService }, { type: i1__namespace$2.QuoteDraftService }, { type: i1__namespace$2.ConfigurationService }, { type: i1__namespace$2.FlowConfigurationService }]; } });
1013
1025
 
1014
1026
  var FlowComponent = /** @class */ (function () {
1015
- function FlowComponent(routerService, context, flowService) {
1027
+ function FlowComponent(routerService, quoteDraftService, flowService) {
1016
1028
  var _this = this;
1017
1029
  this.routerService = routerService;
1018
- this.context = context;
1030
+ this.quoteDraftService = quoteDraftService;
1019
1031
  this.flowService = flowService;
1020
1032
  this.isLoading$ = this.routerService.loading$;
1021
- this.showHeader$ = this.routerService.route$.pipe(rxjs.map(function (route) { return route.data.showHeader && !_this.context.isStandalone; }));
1033
+ this.showHeader$ = this.routerService.route$.pipe(rxjs.map(function (route) { return route.data.showHeader && !_this.quoteDraftService.isStandalone; }));
1022
1034
  this.flowService.initSubscriptions();
1023
1035
  }
1024
1036
  FlowComponent.prototype.ngOnDestroy = function () {
@@ -1026,7 +1038,7 @@
1026
1038
  };
1027
1039
  return FlowComponent;
1028
1040
  }());
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 });
1041
+ FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i1__namespace$2.QuoteDraftService }, { token: FlowService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1030
1042
  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 });
1031
1043
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
1032
1044
  type: i0.Component,
@@ -1036,7 +1048,7 @@
1036
1048
  styleUrls: ['./flow.component.scss'],
1037
1049
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1038
1050
  }]
1039
- }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i2__namespace.ContextService }, { type: FlowService }]; } });
1051
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i1__namespace$2.QuoteDraftService }, { type: FlowService }]; } });
1040
1052
 
1041
1053
  var ContextGuard = /** @class */ (function () {
1042
1054
  function ContextGuard(router, routerService) {
@@ -1045,16 +1057,16 @@
1045
1057
  }
1046
1058
  ContextGuard.prototype.getConfigurationContextMode = function (accountId, quoteId, orderId, rpcMessage) {
1047
1059
  if (accountId) {
1048
- return i1$2.ConfigurationContextMode.ACCOUNT;
1060
+ return i1$3.ConfigurationContextMode.ACCOUNT;
1049
1061
  }
1050
1062
  if (quoteId) {
1051
- return i1$2.ConfigurationContextMode.QUOTE;
1063
+ return i1$3.ConfigurationContextMode.QUOTE;
1052
1064
  }
1053
1065
  if (orderId) {
1054
- return i1$2.ConfigurationContextMode.ORDER;
1066
+ return i1$3.ConfigurationContextMode.ORDER;
1055
1067
  }
1056
1068
  if (rpcMessage) {
1057
- return i1$2.ConfigurationContextMode.REMOTE;
1069
+ return i1$3.ConfigurationContextMode.REMOTE;
1058
1070
  }
1059
1071
  return;
1060
1072
  };
@@ -1098,15 +1110,16 @@
1098
1110
  }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
1099
1111
 
1100
1112
  var ProductUnloadGuard = /** @class */ (function () {
1101
- function ProductUnloadGuard(contextService, configurationService, flowDialogService) {
1113
+ function ProductUnloadGuard(contextService, quoteDraftService, configurationService, flowDialogService) {
1102
1114
  this.contextService = contextService;
1115
+ this.quoteDraftService = quoteDraftService;
1103
1116
  this.configurationService = configurationService;
1104
1117
  this.flowDialogService = flowDialogService;
1105
1118
  }
1106
1119
  ProductUnloadGuard.prototype.canDeactivate = function () {
1107
1120
  var _this = this;
1108
1121
  var observable = rxjs.of(true);
1109
- if (!this.contextService.isStandalone && this.configurationService.hasUnsavedChanges) {
1122
+ if (!this.quoteDraftService.isStandalone && this.configurationService.hasUnsavedChanges) {
1110
1123
  observable = this.flowDialogService.showUnsavedChangesDialog().pipe(rxjs.map(function (confirmed) { return !confirmed; }));
1111
1124
  }
1112
1125
  return observable.pipe(rxjs.tap(function (unload) {
@@ -1118,11 +1131,11 @@
1118
1131
  };
1119
1132
  return ProductUnloadGuard;
1120
1133
  }());
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 });
1134
+ ProductUnloadGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard, deps: [{ token: i1__namespace$2.ContextService }, { token: i1__namespace$2.QuoteDraftService }, { token: i1__namespace$2.ConfigurationService }, { token: FlowDialogService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1122
1135
  ProductUnloadGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard });
1123
1136
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductUnloadGuard, decorators: [{
1124
1137
  type: i0.Injectable
1125
- }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.ConfigurationService }, { type: FlowDialogService }]; } });
1138
+ }], ctorParameters: function () { return [{ type: i1__namespace$2.ContextService }, { type: i1__namespace$2.QuoteDraftService }, { type: i1__namespace$2.ConfigurationService }, { type: FlowDialogService }]; } });
1126
1139
 
1127
1140
  var RootGuard = /** @class */ (function () {
1128
1141
  function RootGuard(router, routerService) {
@@ -1167,7 +1180,7 @@
1167
1180
 
1168
1181
  var CatalogComponent = /** @class */ (function () {
1169
1182
  function CatalogComponent(templatesApi, contextService, cdr, toastService, customizationService) {
1170
- var _a, _b, _c;
1183
+ var _a;
1171
1184
  this.templatesApi = templatesApi;
1172
1185
  this.contextService = contextService;
1173
1186
  this.cdr = cdr;
@@ -1177,7 +1190,7 @@
1177
1190
  this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
1178
1191
  this.templateApiName = '';
1179
1192
  this.destroyed$ = new rxjs.Subject();
1180
- this.templateApiName = (_c = (_b = (_a = this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.catalogTemplateApiName) !== null && _c !== void 0 ? _c : '';
1193
+ this.templateApiName = (_a = this.contextService.resolve().properties.catalogTemplateApiName) !== null && _a !== void 0 ? _a : '';
1181
1194
  }
1182
1195
  CatalogComponent.prototype.ngOnInit = function () {
1183
1196
  var _this = this;
@@ -1205,7 +1218,7 @@
1205
1218
  CatalogComponent.prototype.getTemplateRootComponent$ = function (template) {
1206
1219
  return this.templatesApi
1207
1220
  .fetchComponents$(template.id)
1208
- .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$2.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1221
+ .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$3.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1209
1222
  };
1210
1223
  CatalogComponent.prototype.getLocalCatalogComponentMeta$ = function () {
1211
1224
  var _a, _b;
@@ -1226,7 +1239,7 @@
1226
1239
  };
1227
1240
  CatalogComponent.prototype.getCatalogComponentMeta$ = function () {
1228
1241
  var _this = this;
1229
- return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.type === i1$2.UITemplateType.CATALOG && template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
1242
+ return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.type === i1$3.UITemplateType.CATALOG && template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
1230
1243
  };
1231
1244
  CatalogComponent.prototype.generateUIDefinition$ = function () {
1232
1245
  var _this = this;
@@ -1258,7 +1271,7 @@
1258
1271
  };
1259
1272
  return CatalogComponent;
1260
1273
  }());
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 });
1274
+ CatalogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, deps: [{ token: i1__namespace$4.UITemplatesApiService }, { token: i1__namespace$2.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1262
1275
  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 });
1263
1276
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, decorators: [{
1264
1277
  type: i0.Component,
@@ -1269,7 +1282,7 @@
1269
1282
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1270
1283
  }]
1271
1284
  }], ctorParameters: function () {
1272
- return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1285
+ return [{ type: i1__namespace$4.UITemplatesApiService }, { type: i1__namespace$2.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1273
1286
  type: i0.Optional
1274
1287
  }, {
1275
1288
  type: i0.Inject,
@@ -1294,6 +1307,18 @@
1294
1307
  }]
1295
1308
  }] });
1296
1309
 
1310
+ var getFlowObjectIdPropertyName = function (objectName) {
1311
+ switch (objectName) {
1312
+ case 'Account':
1313
+ return 'accountId';
1314
+ case 'Order':
1315
+ return 'orderId';
1316
+ case 'Quote':
1317
+ default:
1318
+ return 'quoteId';
1319
+ }
1320
+ };
1321
+
1297
1322
  var DebugComponent = /** @class */ (function () {
1298
1323
  function DebugComponent(flowsApiService, router, activatedRoute, context, flowConfiguration, quoteDraftService) {
1299
1324
  this.flowsApiService = flowsApiService;
@@ -1335,7 +1360,7 @@
1335
1360
  };
1336
1361
  return DebugComponent;
1337
1362
  }());
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 });
1363
+ DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i1__namespace$4.FlowsApiService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$2.ContextService }, { token: i1__namespace$2.FlowConfigurationService }, { token: i1__namespace$2.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1339
1364
  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 });
1340
1365
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
1341
1366
  type: i0.Component,
@@ -1345,7 +1370,7 @@
1345
1370
  styleUrls: ['./debug.component.scss'],
1346
1371
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1347
1372
  }]
1348
- }], ctorParameters: function () { return [{ type: i1__namespace$3.FlowsApiService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace.ContextService }, { type: i2__namespace.FlowConfigurationService }, { type: i2__namespace.QuoteDraftService }]; } });
1373
+ }], ctorParameters: function () { return [{ type: i1__namespace$4.FlowsApiService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$2.ContextService }, { type: i1__namespace$2.FlowConfigurationService }, { type: i1__namespace$2.QuoteDraftService }]; } });
1349
1374
 
1350
1375
  var routes$1 = [{ path: '', component: DebugComponent }];
1351
1376
  var DebugModule = /** @class */ (function () {
@@ -1448,7 +1473,7 @@
1448
1473
  lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
1449
1474
  };
1450
1475
  LegacyProductComponent.prototype.getLineItemId = function (quote, queryParams) {
1451
- if (i1$2.EntityUtil.isPresent(queryParams['lineItemId'])) {
1476
+ if (i1$3.EntityUtil.isPresent(queryParams['lineItemId'])) {
1452
1477
  return queryParams['lineItemId'];
1453
1478
  }
1454
1479
  return quote.currentState
@@ -1457,12 +1482,12 @@
1457
1482
  .find(function (id) { return id; });
1458
1483
  };
1459
1484
  LegacyProductComponent.prototype.configure = function (productId) {
1460
- var runtimeContext = this.getRuntimeContext(productId, '', i2.RuntimeOperation.INIT);
1485
+ var runtimeContext = this.getRuntimeContext(productId, '', i1$2.RuntimeOperation.INIT);
1461
1486
  this.startRuntime({}, runtimeContext);
1462
1487
  };
1463
1488
  LegacyProductComponent.prototype.reConfigure = function (lineItemId, currentState) {
1464
- var currentStateItem = i1$2.EntityUtil.findById(lineItemId, currentState);
1465
- var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i2.RuntimeOperation.UPDATE);
1489
+ var currentStateItem = i1$3.EntityUtil.findById(lineItemId, currentState);
1490
+ var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i1$2.RuntimeOperation.UPDATE);
1466
1491
  var states = {
1467
1492
  configurableRamp: currentStateItem,
1468
1493
  currentState: currentState,
@@ -1492,13 +1517,13 @@
1492
1517
  LegacyProductComponent.prototype.getRuntimeContext = function (productId, offeringId, runtimeOperation) {
1493
1518
  var _this = this;
1494
1519
  return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(operators.map(function (runtimeContext) {
1495
- runtimeContext.invocationContext = { runtimeOperation: i2.RuntimeOperation[runtimeOperation] };
1520
+ runtimeContext.invocationContext = { runtimeOperation: i1$2.RuntimeOperation[runtimeOperation] };
1496
1521
  return runtimeContext;
1497
1522
  }), operators.switchMap(function (runtimeContext) { return _this.customizeContext(productId, runtimeContext); }));
1498
1523
  };
1499
1524
  return LegacyProductComponent;
1500
1525
  }());
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 });
1526
+ 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: i1__namespace$2.QuoteDraftService }, { token: i1__namespace$4.QuoteApiService }, { token: i1__namespace$2.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
1527
  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"] }] });
1503
1528
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
1504
1529
  type: i0.Component,
@@ -1507,7 +1532,7 @@
1507
1532
  styleUrls: ['./legacy-product.component.scss'],
1508
1533
  }]
1509
1534
  }], ctorParameters: function () {
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: [{
1535
+ return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$2.QuoteDraftService }, { type: i1__namespace$4.QuoteApiService }, { type: i1__namespace$2.ContextService }, { type: i4__namespace$3.RuntimeContextService }, { type: i4__namespace$3.RuntimeService }, { type: i4__namespace$3.CurrentStateService }, { type: undefined, decorators: [{
1511
1536
  type: i0.Optional
1512
1537
  }, {
1513
1538
  type: i0.Inject,
@@ -1521,13 +1546,13 @@
1521
1546
  return LegacyProductModule;
1522
1547
  }());
1523
1548
  LegacyProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
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()]] });
1549
+ 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$5.TooltipModule], exports: [LegacyProductComponent] });
1550
+ 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$5.TooltipModule.forRoot()]] });
1526
1551
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
1527
1552
  type: i0.NgModule,
1528
1553
  args: [{
1529
1554
  declarations: [LegacyProductComponent],
1530
- imports: [i9.CommonModule, i4$3.RuntimeModule, i1$4.TooltipModule.forRoot()],
1555
+ imports: [i9.CommonModule, i4$3.RuntimeModule, i1$5.TooltipModule.forRoot()],
1531
1556
  exports: [LegacyProductComponent],
1532
1557
  }]
1533
1558
  }] });
@@ -1567,14 +1592,13 @@
1567
1592
  };
1568
1593
  ProductComponent.prototype.init = function (quote) {
1569
1594
  var _this = this;
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 : {};
1595
+ var contextProperties = this.contextService.resolve().properties;
1572
1596
  var productId = contextProperties.productId;
1573
1597
  if (!productId) {
1574
1598
  return;
1575
1599
  }
1576
1600
  var lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
1577
- var currentStateItem = i1$2.EntityUtil.findById(lineItemId, quote.currentState);
1601
+ var currentStateItem = i1$3.EntityUtil.findById(lineItemId, quote.currentState);
1578
1602
  var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
1579
1603
  if (currentStateItem) {
1580
1604
  this.conigurationService.updateCurrentStates({
@@ -1605,7 +1629,7 @@
1605
1629
  };
1606
1630
  return ProductComponent;
1607
1631
  }());
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 });
1632
+ ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i1__namespace$2.ContextService }, { token: i1__namespace$2.ConfigurationRuntimeService }, { token: i1__namespace$2.ConfigurationService }, { token: i1__namespace$2.QuoteDraftService }, { token: i2__namespace.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1609
1633
  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 });
1610
1634
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, decorators: [{
1611
1635
  type: i0.Component,
@@ -1616,7 +1640,7 @@
1616
1640
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1617
1641
  }]
1618
1642
  }], ctorParameters: function () {
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: [{
1643
+ return [{ type: i1__namespace$2.ContextService }, { type: i1__namespace$2.ConfigurationRuntimeService }, { type: i1__namespace$2.ConfigurationService }, { type: i1__namespace$2.QuoteDraftService }, { type: i2__namespace.MessageService }, { type: undefined, decorators: [{
1620
1644
  type: i0.Optional
1621
1645
  }, {
1622
1646
  type: i0.Inject,
@@ -1686,7 +1710,7 @@
1686
1710
 
1687
1711
  var ShoppingCartComponent = /** @class */ (function () {
1688
1712
  function ShoppingCartComponent(templatesApi, contextService, cdr, toastService, customizationService) {
1689
- var _a, _b;
1713
+ var _a;
1690
1714
  this.templatesApi = templatesApi;
1691
1715
  this.contextService = contextService;
1692
1716
  this.cdr = cdr;
@@ -1696,7 +1720,7 @@
1696
1720
  this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
1697
1721
  this.templateApiName = '';
1698
1722
  this.destroyed$ = new rxjs.Subject();
1699
- this.templateApiName = (_b = (_a = this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties.cartTemplateApiName) !== null && _b !== void 0 ? _b : '';
1723
+ this.templateApiName = (_a = this.contextService.resolve().properties.cartTemplateApiName) !== null && _a !== void 0 ? _a : '';
1700
1724
  }
1701
1725
  ShoppingCartComponent.prototype.ngOnInit = function () {
1702
1726
  var _this = this;
@@ -1724,7 +1748,7 @@
1724
1748
  ShoppingCartComponent.prototype.getTemplateRootComponent$ = function (template) {
1725
1749
  return this.templatesApi
1726
1750
  .fetchComponents$(template.id)
1727
- .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$2.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1751
+ .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$3.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1728
1752
  };
1729
1753
  ShoppingCartComponent.prototype.getLocalShoppingCartComponentMeta$ = function () {
1730
1754
  var _a, _b;
@@ -1745,7 +1769,7 @@
1745
1769
  };
1746
1770
  ShoppingCartComponent.prototype.getShoppingCartComponentMeta$ = function () {
1747
1771
  var _this = this;
1748
- return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.type === i1$2.UITemplateType.SHOPPING_CART && template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
1772
+ return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.type === i1$3.UITemplateType.SHOPPING_CART && template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
1749
1773
  };
1750
1774
  ShoppingCartComponent.prototype.generateUIDefinition$ = function () {
1751
1775
  var _this = this;
@@ -1777,7 +1801,7 @@
1777
1801
  };
1778
1802
  return ShoppingCartComponent;
1779
1803
  }());
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 });
1804
+ ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$4.UITemplatesApiService }, { token: i1__namespace$2.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1781
1805
  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 });
1782
1806
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
1783
1807
  type: i0.Component,
@@ -1788,7 +1812,7 @@
1788
1812
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1789
1813
  }]
1790
1814
  }], ctorParameters: function () {
1791
- return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1815
+ return [{ type: i1__namespace$4.UITemplatesApiService }, { type: i1__namespace$2.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
1792
1816
  type: i0.Optional
1793
1817
  }, {
1794
1818
  type: i0.Inject,
@@ -1829,12 +1853,14 @@
1829
1853
  var queryParams = route.queryParams, data = route.data;
1830
1854
  var uiDefinitionId = queryParams.uiDefinitionId;
1831
1855
  var _a = data !== null && data !== void 0 ? data : {}, headerId = _a.headerId, mode = _a.mode;
1832
- var currentContext = this.contextService.resolve();
1833
- if (headerId && (currentContext === null || currentContext === void 0 ? void 0 : currentContext.headerId) === headerId) {
1834
- return rxjs.of(currentContext);
1856
+ if (this.contextService.isInitialized) {
1857
+ var currentContext = this.contextService.resolve();
1858
+ if (headerId && currentContext.headerId === headerId) {
1859
+ return rxjs.of(currentContext);
1860
+ }
1835
1861
  }
1836
1862
  return this.contextService.create(headerId, mode).pipe(operators.tap(function (context) {
1837
- _this.contextService.update(Object.assign(Object.assign({}, context), { uiDefinitionId: uiDefinitionId, properties: Object.assign(Object.assign(Object.assign({}, currentContext === null || currentContext === void 0 ? void 0 : currentContext.properties), context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})) }));
1863
+ _this.contextService.update(Object.assign(Object.assign({}, context), { uiDefinitionId: uiDefinitionId, properties: Object.assign(Object.assign({}, context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})) }));
1838
1864
  }), operators.catchError(function (e) {
1839
1865
  var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
1840
1866
  _this.handleError(route, message);
@@ -1843,11 +1869,11 @@
1843
1869
  };
1844
1870
  return ContextResolver;
1845
1871
  }());
1846
- ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i2__namespace.ContextService }, { token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1872
+ ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i1__namespace$2.ContextService }, { token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1847
1873
  ContextResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver });
1848
1874
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, decorators: [{
1849
1875
  type: i0.Injectable
1850
- }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
1876
+ }], ctorParameters: function () { return [{ type: i1__namespace$2.ContextService }, { type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
1851
1877
 
1852
1878
  var FlowResolver = /** @class */ (function () {
1853
1879
  function FlowResolver(router, flowsApiService, routerService) {
@@ -1896,11 +1922,11 @@
1896
1922
  };
1897
1923
  return FlowResolver;
1898
1924
  }());
1899
- FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$3.FlowsApiService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1925
+ FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$4.FlowsApiService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1900
1926
  FlowResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver });
1901
1927
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, decorators: [{
1902
1928
  type: i0.Injectable
1903
- }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$3.FlowsApiService }, { type: FlowRouterService }]; } });
1929
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$4.FlowsApiService }, { type: FlowRouterService }]; } });
1904
1930
 
1905
1931
  var QuoteResolver = /** @class */ (function () {
1906
1932
  function QuoteResolver(router, quoteDraftService, routerService, contextService, flowConfiguration) {
@@ -1915,7 +1941,7 @@
1915
1941
  return rxjs.from(this.router.navigate([parentUrl, '404'], { state: { message: message } }));
1916
1942
  };
1917
1943
  QuoteResolver.prototype.initFlow$ = function () {
1918
- if (this.contextService.isStandalone) {
1944
+ if (this.quoteDraftService.isStandalone) {
1919
1945
  return rxjs.of(undefined);
1920
1946
  }
1921
1947
  return this.flowConfiguration.initialize$();
@@ -1935,11 +1961,11 @@
1935
1961
  };
1936
1962
  return QuoteResolver;
1937
1963
  }());
1938
- QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace$1.Router }, { token: i2__namespace.QuoteDraftService }, { token: FlowRouterService }, { token: i2__namespace.ContextService }, { token: i2__namespace.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1964
+ QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$2.QuoteDraftService }, { token: FlowRouterService }, { token: i1__namespace$2.ContextService }, { token: i1__namespace$2.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1939
1965
  QuoteResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver });
1940
1966
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, decorators: [{
1941
1967
  type: i0.Injectable
1942
- }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i2__namespace.QuoteDraftService }, { type: FlowRouterService }, { type: i2__namespace.ContextService }, { type: i2__namespace.FlowConfigurationService }]; } });
1968
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$2.QuoteDraftService }, { type: FlowRouterService }, { type: i1__namespace$2.ContextService }, { type: i1__namespace$2.FlowConfigurationService }]; } });
1943
1969
 
1944
1970
  var rootRoute = {
1945
1971
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -2043,21 +2069,21 @@
2043
2069
  FlowModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2044
2070
  FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule,
2045
2071
  FlowRoutingModule,
2046
- i1$3.ApiModule,
2072
+ i1$4.ApiModule,
2047
2073
  i4$1.LauncherModule,
2048
2074
  i3.LoaderModule,
2049
2075
  FlowHeaderModule,
2050
2076
  FlowDialogModule,
2051
- i2.SdkCoreModule] });
2077
+ i1$2.SdkCoreModule] });
2052
2078
  FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, FlowDialogService], imports: [[
2053
2079
  i9.CommonModule,
2054
2080
  FlowRoutingModule,
2055
- i1$3.ApiModule,
2081
+ i1$4.ApiModule,
2056
2082
  i4$1.LauncherModule,
2057
2083
  i3.LoaderModule,
2058
2084
  FlowHeaderModule,
2059
2085
  FlowDialogModule,
2060
- i2.SdkCoreModule,
2086
+ i1$2.SdkCoreModule,
2061
2087
  ]] });
2062
2088
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, decorators: [{
2063
2089
  type: i0.NgModule,
@@ -2066,12 +2092,12 @@
2066
2092
  imports: [
2067
2093
  i9.CommonModule,
2068
2094
  FlowRoutingModule,
2069
- i1$3.ApiModule,
2095
+ i1$4.ApiModule,
2070
2096
  i4$1.LauncherModule,
2071
2097
  i3.LoaderModule,
2072
2098
  FlowHeaderModule,
2073
2099
  FlowDialogModule,
2074
- i2.SdkCoreModule,
2100
+ i1$2.SdkCoreModule,
2075
2101
  ],
2076
2102
  providers: [FlowService, FlowDialogService],
2077
2103
  }]
@@ -2087,7 +2113,6 @@
2087
2113
  exports.FlowService = FlowService;
2088
2114
  exports.VELOCE_FLOW_ROOT_ROUTE = VELOCE_FLOW_ROOT_ROUTE;
2089
2115
  exports.getFlowObjectIdPropertyName = getFlowObjectIdPropertyName;
2090
- exports.getIsEditMode = getIsEditMode;
2091
2116
 
2092
2117
  Object.defineProperty(exports, '__esModule', { value: true });
2093
2118