@veloceapps/sdk 3.0.7 → 3.0.9

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 (44) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +6 -0
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk.umd.js +455 -327
  4. package/bundles/veloce-sdk.umd.js.map +1 -1
  5. package/cms/modules/flow-configuration/services/flow-configuration.service.d.ts +2 -0
  6. package/cms/services/integration.state.d.ts +1 -1
  7. package/esm2015/cms/modules/flow-configuration/services/flow-configuration.service.js +7 -1
  8. package/esm2015/cms/services/integration.state.js +1 -1
  9. package/esm2015/src/components/header/cart-overlay/cart-overlay.component.js +78 -12
  10. package/esm2015/src/components/header/cart-overlay/cart-overlay.module.js +6 -4
  11. package/esm2015/src/components/header/header.component.js +23 -14
  12. package/esm2015/src/components/header/header.types.js +1 -1
  13. package/esm2015/src/flow-routing.module.js +4 -4
  14. package/esm2015/src/flow.component.js +16 -10
  15. package/esm2015/src/guards/context.guard.js +4 -4
  16. package/esm2015/src/guards/root.guard.js +4 -4
  17. package/esm2015/src/pages/debug/debug.component.js +7 -7
  18. package/esm2015/src/pages/product/product.component.js +22 -9
  19. package/esm2015/src/pages/record-not-found/record-not-found.component.js +3 -2
  20. package/esm2015/src/resolvers/context.resolver.js +4 -4
  21. package/esm2015/src/resolvers/flow.resolver.js +8 -8
  22. package/esm2015/src/resolvers/quote.resolver.js +4 -4
  23. package/esm2015/src/services/flow-router.service.js +107 -0
  24. package/esm2015/src/services/flow.service.js +22 -14
  25. package/fesm2015/veloce-sdk-cms.js +6 -0
  26. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  27. package/fesm2015/veloce-sdk.js +289 -163
  28. package/fesm2015/veloce-sdk.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/components/header/cart-overlay/cart-overlay.component.d.ts +15 -4
  31. package/src/components/header/cart-overlay/cart-overlay.module.d.ts +6 -4
  32. package/src/components/header/header.component.d.ts +6 -1
  33. package/src/components/header/header.types.d.ts +1 -0
  34. package/src/flow.component.d.ts +7 -3
  35. package/src/guards/context.guard.d.ts +2 -2
  36. package/src/guards/root.guard.d.ts +2 -2
  37. package/src/pages/debug/debug.component.d.ts +3 -3
  38. package/src/pages/product/product.component.d.ts +6 -4
  39. package/src/resolvers/context.resolver.d.ts +2 -2
  40. package/src/resolvers/flow.resolver.d.ts +4 -4
  41. package/src/resolvers/quote.resolver.d.ts +2 -2
  42. package/src/services/{router.service.d.ts → flow-router.service.d.ts} +11 -4
  43. package/src/services/flow.service.d.ts +8 -8
  44. package/esm2015/src/services/router.service.js +0 -78
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
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/runtime'), require('primeng/button'), require('primeng/overlaypanel'), require('primeng/tooltip'), require('rxjs'), require('@veloce/core'), require('primeng/api'), require('@angular/router'), require('@angular/forms'), require('primeng/dropdown'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('ngx-bootstrap/tooltip'), require('@angular/common/http')) :
3
- typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/runtime', 'primeng/button', 'primeng/overlaypanel', 'primeng/tooltip', 'rxjs', '@veloce/core', 'primeng/api', '@angular/router', '@angular/forms', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', 'ngx-bootstrap/tooltip', '@angular/common/http'], factory) :
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.runtime, global["primeng/button"], global.i3, global.i8, global.rxjs, global["@veloce/core"], global["primeng/api"], global.ng.router, global.ng.forms, global.i5, global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global["ngx-bootstrap/tooltip"], global.ng.common.http));
5
- })(this, (function (exports, i7, i0, i1$2, i2, i1$1, i2$1, i6, i3, i8, rxjs, i1, i4, i1$3, i8$1, i5, i9, i7$1, operators, i1$4, http) { 'use strict';
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/runtime'), require('primeng/button'), 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('ngx-bootstrap/tooltip'), require('@angular/common/http')) :
3
+ typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/runtime', 'primeng/button', 'primeng/overlaypanel', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', 'rxjs', '@veloce/core', '@angular/router', 'primeng/api', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', 'ngx-bootstrap/tooltip', '@angular/common/http'], factory) :
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.runtime, global["primeng/button"], global.i4, global.i10, global.ng.forms, global.i6, global.rxjs, global["@veloce/core"], global.ng.router, global["primeng/api"], global.i5$1, global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global["ngx-bootstrap/tooltip"], global.ng.common.http));
5
+ })(this, (function (exports, i9, i0, i1$2, i2$2, i2$1, i2, i5, i4, i10, i8, i6, rxjs, i1$1, i1, i4$1, i5$1, i9$1, i7, operators, i1$3, http) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -22,201 +22,27 @@
22
22
  return Object.freeze(n);
23
23
  }
24
24
 
25
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
25
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
26
26
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
27
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
28
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
28
+ var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
30
29
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
31
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
32
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
33
34
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
35
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
36
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
34
37
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
35
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
38
+ var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
39
+ var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
40
+ var i9__namespace$1 = /*#__PURE__*/_interopNamespace(i9$1);
41
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
36
42
  var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
37
- var i8__namespace$1 = /*#__PURE__*/_interopNamespace(i8$1);
38
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
39
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
40
- var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
41
- var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
42
43
 
43
44
  var VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
44
45
 
45
- var HeaderCartOverlayComponent = /** @class */ (function () {
46
- function HeaderCartOverlayComponent(baseHttpService, flowConfiguration) {
47
- this.baseHttpService = baseHttpService;
48
- this.flowConfiguration = flowConfiguration;
49
- this.imagesMap$ = new rxjs.BehaviorSubject({});
50
- this.destroyed$ = new rxjs.Subject();
51
- this.products$ = this.flowConfiguration.get();
52
- }
53
- HeaderCartOverlayComponent.prototype.ngOnDestroy = function () {
54
- this.destroyed$.next();
55
- this.destroyed$.complete();
56
- };
57
- HeaderCartOverlayComponent.prototype.getImageUrl = function (productId) {
58
- var _a;
59
- if (this.imagesMap$.value[productId] == null) {
60
- this.imagesMap$.next(Object.assign(Object.assign({}, this.imagesMap$.value), (_a = {}, _a[productId] = '', _a)));
61
- this.fetchProductImage(productId);
62
- }
63
- return this.imagesMap$.pipe(rxjs.map(function (imagesMap) { return imagesMap[productId]; }), rxjs.distinctUntilChanged());
64
- };
65
- HeaderCartOverlayComponent.prototype.isConfigurable = function (lineItem) {
66
- return lineItem.properties['#configurable'] === 'true';
67
- };
68
- HeaderCartOverlayComponent.prototype.fetchProductImage = function (productId) {
69
- var _this = this;
70
- this.baseHttpService
71
- .api({
72
- url: "/products/" + productId + "/image",
73
- method: 'get',
74
- responseType: 'blob',
75
- errorHandler: rxjs.noop,
76
- })
77
- .pipe(rxjs.map(function (file) { return URL.createObjectURL(file); }), rxjs.catchError(function () { return rxjs.of(''); }), rxjs.tap(function (url) {
78
- var _a;
79
- return _this.imagesMap$.next(Object.assign(Object.assign({}, _this.imagesMap$.value), (_a = {}, _a[productId] = url, _a)));
80
- }), rxjs.takeUntil(this.destroyed$))
81
- .subscribe();
82
- };
83
- return HeaderCartOverlayComponent;
84
- }());
85
- HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace.BaseHttpService }, { token: i1__namespace$1.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Component });
86
- HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i3.OverlayPanel, descendants: 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=\"products$ | async as products\">\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 [disabled]=\"!isConfigurable(product)\"\n label=\"Configure\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n ></p-button>\n <p-button label=\"Delete\" styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"></p-button>\n </div>\n </div>\n </div>\n\n <span class=\"text-right pt-3\">{{ product.qty }}</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 label=\"Clear cart\" styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"></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)}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i3__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i6__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i4__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i2__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
87
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, decorators: [{
88
- type: i0.Component,
89
- args: [{
90
- selector: 'vl-header-cart-overlay',
91
- templateUrl: './cart-overlay.component.html',
92
- styleUrls: ['./cart-overlay.component.scss'],
93
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
94
- }]
95
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }, { type: i1__namespace$1.FlowConfigurationService }]; }, propDecorators: { overlayPanel: [{
96
- type: i0.ViewChild,
97
- args: [i3.OverlayPanel]
98
- }] } });
99
-
100
- var HeaderCartOverlayModule = /** @class */ (function () {
101
- function HeaderCartOverlayModule() {
102
- }
103
- return HeaderCartOverlayModule;
104
- }());
105
- HeaderCartOverlayModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
106
- HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i7.CommonModule, i6.ButtonModule, i3.OverlayPanelModule, i2.LetDirectiveModule], exports: [HeaderCartOverlayComponent] });
107
- HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i7.CommonModule, i6.ButtonModule, i3.OverlayPanelModule, i2.LetDirectiveModule]] });
108
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, decorators: [{
109
- type: i0.NgModule,
110
- args: [{
111
- declarations: [HeaderCartOverlayComponent],
112
- imports: [i7.CommonModule, i6.ButtonModule, i3.OverlayPanelModule, i2.LetDirectiveModule],
113
- exports: [HeaderCartOverlayComponent],
114
- }]
115
- }] });
116
-
117
- var FlowHeaderComponent = /** @class */ (function () {
118
- function FlowHeaderComponent(context, quoteService, sfApiService, flowConfiguration) {
119
- var _a, _b, _c;
120
- this.context = context;
121
- this.quoteService = quoteService;
122
- this.sfApiService = sfApiService;
123
- this.flowConfiguration = flowConfiguration;
124
- this.objectDetails$ = new rxjs.BehaviorSubject({});
125
- this.destroyed$ = new rxjs.Subject();
126
- var ctx = this.context.resolve();
127
- this.mode = ctx === null || ctx === void 0 ? void 0 : ctx.mode;
128
- 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 : '';
129
- this.contextProperties = (_c = ctx === null || ctx === void 0 ? void 0 : ctx.properties) !== null && _c !== void 0 ? _c : {};
130
- this.selectedProductsNumber$ = this.flowConfiguration.get().pipe(rxjs.map(function (lineItems) { return lineItems.length; }));
131
- }
132
- FlowHeaderComponent.prototype.ngOnInit = function () {
133
- this.populateObjectDetails();
134
- };
135
- FlowHeaderComponent.prototype.ngOnDestroy = function () {
136
- this.destroyed$.next();
137
- this.destroyed$.complete();
138
- };
139
- Object.defineProperty(FlowHeaderComponent.prototype, "isAccountMode", {
140
- get: function () {
141
- return this.mode === i1.ConfigurationContextMode.ACCOUNT;
142
- },
143
- enumerable: false,
144
- configurable: true
145
- });
146
- Object.defineProperty(FlowHeaderComponent.prototype, "isQuoteMode", {
147
- get: function () {
148
- return this.mode === i1.ConfigurationContextMode.QUOTE;
149
- },
150
- enumerable: false,
151
- configurable: true
152
- });
153
- FlowHeaderComponent.prototype.back = function () {
154
- var _a;
155
- var objectId = (_a = this.context.resolve()) === null || _a === void 0 ? void 0 : _a.headerId;
156
- if (objectId) {
157
- window.VELO_BACK_FN.apply(null, [objectId]);
158
- }
159
- };
160
- FlowHeaderComponent.prototype.getSalesforceObjectLink = function (objectId) {
161
- if (!objectId) {
162
- return '';
163
- }
164
- return window.location.origin + "/" + objectId;
165
- };
166
- FlowHeaderComponent.prototype.queryName$ = function (objectName, id) {
167
- if (!id) {
168
- return rxjs.of('');
169
- }
170
- var searchRequest = {
171
- count: 1,
172
- rawCondition: "Id = '" + id + "'",
173
- fields: ['Name'],
174
- };
175
- return this.sfApiService.query(searchRequest, objectName).pipe(rxjs.map(function (result) { var _a, _b; return (_b = (_a = result[0]) === null || _a === void 0 ? void 0 : _a.Name) !== null && _b !== void 0 ? _b : ''; }), rxjs.takeUntil(this.destroyed$));
176
- };
177
- FlowHeaderComponent.prototype.populateObjectDetails = function () {
178
- var _this = this;
179
- var _a;
180
- var accountId = this.isAccountMode ? this.contextProperties.Id : this.contextProperties.AccountId;
181
- var opportunityId = this.contextProperties.OpportunityId;
182
- var quoteId = this.isQuoteMode ? this.contextProperties.Id : undefined;
183
- var quoteName = this.isQuoteMode ? this.contextProperties.Name : undefined;
184
- var priceListName = (_a = this.quoteService.quotePriceList) === null || _a === void 0 ? void 0 : _a.name;
185
- this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { accountId: accountId, opportunityId: opportunityId, quoteId: quoteId, quoteName: quoteName, priceListName: priceListName }));
186
- this.queryName$('Account', accountId).subscribe(function (accountName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { accountName: accountName })); });
187
- this.queryName$('Opportunity', opportunityId).subscribe(function (opportunityName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { opportunityName: opportunityName })); });
188
- };
189
- return FlowHeaderComponent;
190
- }());
191
- FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i2__namespace$1.ContextService }, { token: i2__namespace$1.QuoteService }, { token: i1__namespace$2.SalesforceApiService }, { token: i1__namespace$1.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Component });
192
- 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\">\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 #{{ contextProperties.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\" *vlLet=\"objectDetails$ | async as details\">\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 disabled\">Catalog</nav>\n <nav class=\"nav-item disabled\">Configurator</nav>\n <ng-container *vlLet=\"selectedProductsNumber$ | async as selectedProductsNumber\">\n <nav class=\"nav-item active\">Shopping Cart ({{ selectedProductsNumber }})</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></vl-header-cart-overlay>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <span *ngIf=\"details.priceListName\">{{ details.priceListName }}</span>\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <p-button label=\"Generate Doc\" styleClass=\"p-button-outlined\"></p-button>\n <p-button label=\"Save\" styleClass=\"p-button-outlined\"></p-button>\n <p-button label=\"Submit For Approval\" styleClass=\"p-button\"></p-button>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}.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: i3__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" }, { type: i6__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i4__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i2__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }], pipes: { "async": i7__namespace.AsyncPipe, "date": i7__namespace.DatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
193
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
194
- type: i0.Component,
195
- args: [{
196
- selector: 'vl-flow-header',
197
- templateUrl: './header.component.html',
198
- styleUrls: ['./header.component.scss'],
199
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
200
- }]
201
- }], ctorParameters: function () { return [{ type: i2__namespace$1.ContextService }, { type: i2__namespace$1.QuoteService }, { type: i1__namespace$2.SalesforceApiService }, { type: i1__namespace$1.FlowConfigurationService }]; } });
202
-
203
- var FlowHeaderModule = /** @class */ (function () {
204
- function FlowHeaderModule() {
205
- }
206
- return FlowHeaderModule;
207
- }());
208
- FlowHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
209
- FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i7.CommonModule, i3.OverlayPanelModule, i2.LetDirectiveModule, i8.TooltipModule, i6.ButtonModule, HeaderCartOverlayModule], exports: [FlowHeaderComponent] });
210
- FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i7.CommonModule, i3.OverlayPanelModule, i2.LetDirectiveModule, i8.TooltipModule, i6.ButtonModule, HeaderCartOverlayModule]] });
211
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, decorators: [{
212
- type: i0.NgModule,
213
- args: [{
214
- declarations: [FlowHeaderComponent],
215
- imports: [i7.CommonModule, i3.OverlayPanelModule, i2.LetDirectiveModule, i8.TooltipModule, i6.ButtonModule, HeaderCartOverlayModule],
216
- exports: [FlowHeaderComponent],
217
- }]
218
- }] });
219
-
220
46
  /*! *****************************************************************************
221
47
  Copyright (c) Microsoft Corporation.
222
48
 
@@ -535,11 +361,12 @@
535
361
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
536
362
  }
537
363
 
538
- var RouterService = /** @class */ (function () {
539
- function RouterService(router, route) {
364
+ var FlowRouterService = /** @class */ (function () {
365
+ function FlowRouterService(router, route, contextService) {
540
366
  var _this = this;
541
367
  this.router = router;
542
368
  this.route = route;
369
+ this.contextService = contextService;
543
370
  this.getLastChildRoute = function (route) {
544
371
  return route.firstChild ? _this.getLastChildRoute(route.firstChild) : route;
545
372
  };
@@ -561,15 +388,22 @@
561
388
  this.watchLastChildParams$ = function (route) {
562
389
  return _this.routeChange$.pipe(rxjs.map(function () { return _this.getLastChildParams(route.snapshot); }));
563
390
  };
564
- this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$3.NavigationEnd; }), rxjs.shareReplay());
391
+ this.getFlowSubpath$ = function () {
392
+ return _this.route$.pipe(rxjs.map(function (route) {
393
+ var url = route.url.join('/');
394
+ var flowRootUrl = _this.getFlowRootPath(route);
395
+ return url.replace(flowRootUrl, '');
396
+ }));
397
+ };
398
+ this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationEnd; }), rxjs.shareReplay());
565
399
  this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(rxjs.startWith(this.getLastChildParams(this.route.snapshot)), rxjs.shareReplay());
566
400
  this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(rxjs.startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), rxjs.shareReplay());
567
- this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$3.NavigationStart ||
568
- e instanceof i1$3.NavigationCancel ||
569
- e instanceof i1$3.NavigationEnd ||
570
- e instanceof i1$3.NavigationError; }), rxjs.map(function (e) { return e instanceof i1$3.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
401
+ this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationStart ||
402
+ e instanceof i1.NavigationCancel ||
403
+ e instanceof i1.NavigationEnd ||
404
+ e instanceof i1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
571
405
  }
572
- RouterService.prototype.getFlowRootRoute = function (route) {
406
+ FlowRouterService.prototype.getFlowRootRoute = function (route) {
573
407
  var _a;
574
408
  var path = __spreadArray([], __read(route.pathFromRoot));
575
409
  while (path.length) {
@@ -583,7 +417,7 @@
583
417
  }
584
418
  return;
585
419
  };
586
- RouterService.prototype.getFlowRootPath = function (route) {
420
+ FlowRouterService.prototype.getFlowRootPath = function (route) {
587
421
  var rootRoute = this.getFlowRootRoute(route);
588
422
  if (!rootRoute) {
589
423
  return '';
@@ -594,41 +428,345 @@
594
428
  .join('/');
595
429
  return '/' + path;
596
430
  };
597
- Object.defineProperty(RouterService.prototype, "route$", {
431
+ Object.defineProperty(FlowRouterService.prototype, "route$", {
598
432
  get: function () {
599
433
  return this.lastChildRoute$;
600
434
  },
601
435
  enumerable: false,
602
436
  configurable: true
603
437
  });
604
- Object.defineProperty(RouterService.prototype, "params$", {
438
+ Object.defineProperty(FlowRouterService.prototype, "params$", {
605
439
  get: function () {
606
440
  return this.lastChildParams$;
607
441
  },
608
442
  enumerable: false,
609
443
  configurable: true
610
444
  });
611
- return RouterService;
445
+ FlowRouterService.prototype.isConfigurationRoute$ = function () {
446
+ return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('product'); }));
447
+ };
448
+ FlowRouterService.prototype.isCartRoute$ = function () {
449
+ return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('cart'); }));
450
+ };
451
+ FlowRouterService.prototype.navigateToProductConfiguration = function (productId) {
452
+ this.contextService.update({ properties: { productId: productId } });
453
+ var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
454
+ var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
455
+ this.router.navigate([flowRouteUrl, 'product'], {
456
+ queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), { productId: productId }),
457
+ });
458
+ };
459
+ FlowRouterService.prototype.navigateToShoppingCart = function () {
460
+ this.contextService.update({ properties: { productId: undefined } });
461
+ var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
462
+ var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
463
+ this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
464
+ };
465
+ return FlowRouterService;
612
466
  }());
613
- RouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, deps: [{ token: i1__namespace$3.Router }, { token: i1__namespace$3.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
614
- RouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, providedIn: 'root' });
615
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, decorators: [{
467
+ FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
468
+ FlowRouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, providedIn: 'root' });
469
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, decorators: [{
616
470
  type: i0.Injectable,
617
471
  args: [{ providedIn: 'root' }]
618
- }], ctorParameters: function () { return [{ type: i1__namespace$3.Router }, { type: i1__namespace$3.ActivatedRoute }]; } });
472
+ }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }, { type: i2__namespace.ContextService }]; } });
473
+
474
+ var HeaderCartOverlayComponent = /** @class */ (function () {
475
+ function HeaderCartOverlayComponent(baseHttpService, flowConfiguration, routerService) {
476
+ this.baseHttpService = baseHttpService;
477
+ this.flowConfiguration = flowConfiguration;
478
+ this.routerService = routerService;
479
+ this.imagesMap$ = new rxjs.BehaviorSubject({});
480
+ this.destroyed$ = new rxjs.Subject();
481
+ this.form = new i8.FormGroup({});
482
+ this.lineItems$ = this.flowConfiguration.get();
483
+ this.readonlyProductId$ = rxjs.combineLatest([
484
+ this.routerService.route$,
485
+ this.routerService.isConfigurationRoute$(),
486
+ ]).pipe(rxjs.map(function (_b) {
487
+ var _c = __read(_b, 2), route = _c[0], isConfigurationRoute = _c[1];
488
+ if (!isConfigurationRoute) {
489
+ return null;
490
+ }
491
+ return route.queryParams.productId;
492
+ }));
493
+ }
494
+ HeaderCartOverlayComponent.prototype.ngAfterViewInit = function () {
495
+ var _this = this;
496
+ rxjs.combineLatest([this.lineItems$, this.readonlyProductId$, this.overlayPanel.onShow])
497
+ .pipe(rxjs.filter(function () { return _this.overlayPanel.overlayVisible; }), rxjs.takeUntil(this.destroyed$))
498
+ .subscribe(function (_b) {
499
+ var _c = __read(_b, 2), lineItems = _c[0], readonlyProductId = _c[1];
500
+ return _this.updateControls(lineItems, readonlyProductId);
501
+ });
502
+ };
503
+ HeaderCartOverlayComponent.prototype.ngOnDestroy = function () {
504
+ this.destroyed$.next();
505
+ this.destroyed$.complete();
506
+ };
507
+ HeaderCartOverlayComponent.prototype.getImageUrl = function (productId) {
508
+ var _b;
509
+ if (this.imagesMap$.value[productId] == null) {
510
+ this.imagesMap$.next(Object.assign(Object.assign({}, this.imagesMap$.value), (_b = {}, _b[productId] = '', _b)));
511
+ this.fetchProductImage(productId);
512
+ }
513
+ return this.imagesMap$.pipe(rxjs.map(function (imagesMap) { return imagesMap[productId]; }), rxjs.distinctUntilChanged());
514
+ };
515
+ HeaderCartOverlayComponent.prototype.isConfigurable = function (lineItem) {
516
+ return lineItem.properties['#configurable'] === 'true';
517
+ };
518
+ HeaderCartOverlayComponent.prototype.navigateToProductConfiguration = function (productId) {
519
+ this.overlayPanel.hide();
520
+ this.routerService.navigateToProductConfiguration(productId);
521
+ };
522
+ HeaderCartOverlayComponent.prototype.controlBlurHandler = function (lineItem) {
523
+ var control = this.form.controls[lineItem.id];
524
+ if (control.invalid) {
525
+ return;
526
+ }
527
+ this.flowConfiguration.update({
528
+ dataType: 'LINEITEM',
529
+ attributeType: 'QTY',
530
+ id: lineItem.id,
531
+ newValue: control.value,
532
+ });
533
+ };
534
+ HeaderCartOverlayComponent.prototype.deleteHandler = function (lineItem) {
535
+ this.flowConfiguration.delete(lineItem.id);
536
+ };
537
+ HeaderCartOverlayComponent.prototype.deleteAllHandler = function () {
538
+ this.flowConfiguration.deleteAll();
539
+ };
540
+ HeaderCartOverlayComponent.prototype.fetchProductImage = function (productId) {
541
+ var _this = this;
542
+ this.baseHttpService
543
+ .api({
544
+ url: "/products/" + productId + "/image",
545
+ method: 'get',
546
+ responseType: 'blob',
547
+ errorHandler: rxjs.noop,
548
+ })
549
+ .pipe(rxjs.map(function (file) { return URL.createObjectURL(file); }), rxjs.catchError(function () { return rxjs.of(''); }), rxjs.tap(function (url) {
550
+ var _b;
551
+ return _this.imagesMap$.next(Object.assign(Object.assign({}, _this.imagesMap$.value), (_b = {}, _b[productId] = url, _b)));
552
+ }), rxjs.takeUntil(this.destroyed$))
553
+ .subscribe();
554
+ };
555
+ HeaderCartOverlayComponent.prototype.updateControls = function (lineItems, readonlyProductId) {
556
+ var _this = this;
557
+ var ids = [];
558
+ lineItems.forEach(function (li) {
559
+ var _a;
560
+ if (!li.id) {
561
+ return;
562
+ }
563
+ ids.push(li.id);
564
+ if (!_this.form.controls[li.id]) {
565
+ _this.form.addControl(li.id, new i8.FormControl(li.qty, []));
566
+ }
567
+ else {
568
+ (_a = _this.form.controls[li.id]) === null || _a === void 0 ? void 0 : _a.setValue(li.qty);
569
+ }
570
+ if (li.productId === readonlyProductId) {
571
+ _this.form.controls[li.id].disable();
572
+ }
573
+ else {
574
+ _this.form.controls[li.id].enable();
575
+ }
576
+ });
577
+ var removedIds = Object.keys(this.form.controls).filter(function (id) { return !ids.includes(id); });
578
+ removedIds.forEach(function (id) { return _this.form.removeControl(id); });
579
+ };
580
+ return HeaderCartOverlayComponent;
581
+ }());
582
+ HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace$1.BaseHttpService }, { token: i2__namespace$1.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
583
+ HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i4.OverlayPanel, descendants: 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=\"lineItems$ | async as lineItems\">\n <ng-container *ngIf=\"lineItems.length > 0; else empty\">\n <ng-container *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ lineItems.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 lineItem of lineItems\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(lineItem.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\">{{ lineItem.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!isConfigurable(lineItem) || readonlyProductId === lineItem.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (click)=\"navigateToProductConfiguration(lineItem.productId)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"readonlyProductId === lineItem.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (click)=\"deleteHandler(lineItem)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <p-inputNumber\n *ngIf=\"form.controls[lineItem.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(lineItem)\"\n ></p-inputNumber>\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 (click)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\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: i4__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i2__namespace$2.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: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i8__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 });
584
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, decorators: [{
585
+ type: i0.Component,
586
+ args: [{
587
+ selector: 'vl-header-cart-overlay',
588
+ templateUrl: './cart-overlay.component.html',
589
+ styleUrls: ['./cart-overlay.component.scss'],
590
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
591
+ }]
592
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.BaseHttpService }, { type: i2__namespace$1.FlowConfigurationService }, { type: FlowRouterService }]; }, propDecorators: { overlayPanel: [{
593
+ type: i0.ViewChild,
594
+ args: [i4.OverlayPanel]
595
+ }] } });
596
+
597
+ var HeaderCartOverlayModule = /** @class */ (function () {
598
+ function HeaderCartOverlayModule() {
599
+ }
600
+ return HeaderCartOverlayModule;
601
+ }());
602
+ HeaderCartOverlayModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
603
+ HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i9.CommonModule, i8.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i6.InputNumberModule], exports: [HeaderCartOverlayComponent] });
604
+ HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i9.CommonModule, i8.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i6.InputNumberModule]] });
605
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, decorators: [{
606
+ type: i0.NgModule,
607
+ args: [{
608
+ declarations: [HeaderCartOverlayComponent],
609
+ imports: [i9.CommonModule, i8.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i6.InputNumberModule],
610
+ exports: [HeaderCartOverlayComponent],
611
+ }]
612
+ }] });
613
+
614
+ var FlowHeaderComponent = /** @class */ (function () {
615
+ function FlowHeaderComponent(context, quoteService, sfApiService, flowConfiguration, routerService) {
616
+ var _a, _b, _c;
617
+ this.context = context;
618
+ this.quoteService = quoteService;
619
+ this.sfApiService = sfApiService;
620
+ this.flowConfiguration = flowConfiguration;
621
+ this.routerService = routerService;
622
+ this.objectDetails$ = new rxjs.BehaviorSubject({});
623
+ this.destroyed$ = new rxjs.Subject();
624
+ var ctx = this.context.resolve();
625
+ this.mode = ctx === null || ctx === void 0 ? void 0 : ctx.mode;
626
+ 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 : '';
627
+ this.contextProperties = (_c = ctx === null || ctx === void 0 ? void 0 : ctx.properties) !== null && _c !== void 0 ? _c : {};
628
+ this.selectedProductsNumber$ = this.flowConfiguration.get().pipe(rxjs.map(function (lineItems) { return lineItems.length; }));
629
+ this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
630
+ this.isCartRoute$ = this.routerService.isCartRoute$();
631
+ }
632
+ FlowHeaderComponent.prototype.ngOnInit = function () {
633
+ this.populateObjectDetails();
634
+ };
635
+ FlowHeaderComponent.prototype.ngOnDestroy = function () {
636
+ this.destroyed$.next();
637
+ this.destroyed$.complete();
638
+ };
639
+ Object.defineProperty(FlowHeaderComponent.prototype, "isAccountMode", {
640
+ get: function () {
641
+ return this.mode === i1$1.ConfigurationContextMode.ACCOUNT;
642
+ },
643
+ enumerable: false,
644
+ configurable: true
645
+ });
646
+ Object.defineProperty(FlowHeaderComponent.prototype, "isQuoteMode", {
647
+ get: function () {
648
+ return this.mode === i1$1.ConfigurationContextMode.QUOTE;
649
+ },
650
+ enumerable: false,
651
+ configurable: true
652
+ });
653
+ FlowHeaderComponent.prototype.back = function () {
654
+ var _a;
655
+ var objectId = (_a = this.context.resolve()) === null || _a === void 0 ? void 0 : _a.headerId;
656
+ if (objectId) {
657
+ window.VELO_BACK_FN.apply(null, [objectId]);
658
+ }
659
+ };
660
+ FlowHeaderComponent.prototype.getSalesforceObjectLink = function (objectId) {
661
+ if (!objectId) {
662
+ return '';
663
+ }
664
+ return window.location.origin + "/" + objectId;
665
+ };
666
+ FlowHeaderComponent.prototype.navigateToShoppingCart = function () {
667
+ this.routerService.navigateToShoppingCart();
668
+ };
669
+ FlowHeaderComponent.prototype.queryName$ = function (objectName, id) {
670
+ if (!id) {
671
+ return rxjs.of('');
672
+ }
673
+ var searchRequest = {
674
+ count: 1,
675
+ rawCondition: "Id = '" + id + "'",
676
+ fields: ['Name'],
677
+ };
678
+ return this.sfApiService.query(searchRequest, objectName).pipe(rxjs.map(function (result) { var _a, _b; return (_b = (_a = result[0]) === null || _a === void 0 ? void 0 : _a.Name) !== null && _b !== void 0 ? _b : ''; }), rxjs.takeUntil(this.destroyed$));
679
+ };
680
+ FlowHeaderComponent.prototype.populateObjectDetails = function () {
681
+ var _this = this;
682
+ var _a, _b;
683
+ var accountId = this.isAccountMode ? this.contextProperties.Id : this.contextProperties.AccountId;
684
+ var opportunityId = this.contextProperties.OpportunityId;
685
+ var quoteId = this.isQuoteMode ? this.contextProperties.Id : undefined;
686
+ var quoteName = this.isQuoteMode ? this.contextProperties.Name : undefined;
687
+ var quoteNumber = this.isQuoteMode ? (_a = this.contextProperties.QuoteNumber) === null || _a === void 0 ? void 0 : _a.replace(/^0+/, '') : undefined;
688
+ var priceListName = (_b = this.quoteService.quotePriceList) === null || _b === void 0 ? void 0 : _b.name;
689
+ this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { accountId: accountId, opportunityId: opportunityId, quoteId: quoteId, quoteName: quoteName, quoteNumber: quoteNumber, priceListName: priceListName }));
690
+ this.queryName$('Account', accountId).subscribe(function (accountName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { accountName: accountName })); });
691
+ this.queryName$('Opportunity', opportunityId).subscribe(function (opportunityName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { opportunityName: opportunityName })); });
692
+ };
693
+ return FlowHeaderComponent;
694
+ }());
695
+ 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.QuoteService }, { token: i1__namespace$2.SalesforceApiService }, { token: i2__namespace$1.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
696
+ 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 disabled\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"selectedProductsNumber$ | async as selectedProductsNumber\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ selectedProductsNumber }})\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></vl-header-cart-overlay>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"details.priceListName\">{{ details.priceListName }}</span>\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <p-button label=\"Generate Doc\" styleClass=\"p-button-outlined\"></p-button>\n <p-button label=\"Save\" styleClass=\"p-button-outlined\"></p-button>\n <p-button label=\"Submit For Approval\" styleClass=\"p-button\"></p-button>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}.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" }, { 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: i2__namespace$2.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: i4__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 });
697
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
698
+ type: i0.Component,
699
+ args: [{
700
+ selector: 'vl-flow-header',
701
+ templateUrl: './header.component.html',
702
+ styleUrls: ['./header.component.scss'],
703
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
704
+ }]
705
+ }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.QuoteService }, { type: i1__namespace$2.SalesforceApiService }, { type: i2__namespace$1.FlowConfigurationService }, { type: FlowRouterService }]; } });
706
+
707
+ var FlowHeaderModule = /** @class */ (function () {
708
+ function FlowHeaderModule() {
709
+ }
710
+ return FlowHeaderModule;
711
+ }());
712
+ FlowHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
713
+ FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i9.CommonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule], exports: [FlowHeaderComponent] });
714
+ FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i9.CommonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule]] });
715
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, decorators: [{
716
+ type: i0.NgModule,
717
+ args: [{
718
+ declarations: [FlowHeaderComponent],
719
+ imports: [i9.CommonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule],
720
+ exports: [FlowHeaderComponent],
721
+ }]
722
+ }] });
723
+
724
+ var FlowService = /** @class */ (function () {
725
+ function FlowService(integrationState, flowRouterService) {
726
+ this.integrationState = integrationState;
727
+ this.flowRouterService = flowRouterService;
728
+ this.cleanup$ = new rxjs.Subject();
729
+ }
730
+ FlowService.prototype.initSubscriptions = function () {
731
+ var _this = this;
732
+ this.integrationState
733
+ .listen$('FLOW_CONFIGURE_PRODUCT')
734
+ .pipe(rxjs.takeUntil(this.cleanup$))
735
+ .subscribe(function (payload) {
736
+ if (!(payload === null || payload === void 0 ? void 0 : payload.productId)) {
737
+ return;
738
+ }
739
+ _this.flowRouterService.navigateToProductConfiguration(payload.productId);
740
+ });
741
+ };
742
+ FlowService.prototype.cleanup = function () {
743
+ this.cleanup$.next();
744
+ };
745
+ return FlowService;
746
+ }());
747
+ FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i2__namespace$1.IntegrationState }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
748
+ FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
749
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
750
+ type: i0.Injectable
751
+ }], ctorParameters: function () { return [{ type: i2__namespace$1.IntegrationState }, { type: FlowRouterService }]; } });
619
752
 
620
753
  var FlowComponent = /** @class */ (function () {
621
- function FlowComponent(routerService, context) {
754
+ function FlowComponent(routerService, context, flowService) {
622
755
  var _this = this;
623
756
  this.routerService = routerService;
624
757
  this.context = context;
758
+ this.flowService = flowService;
625
759
  this.isLoading$ = this.routerService.loading$;
626
760
  this.showHeader$ = this.routerService.route$.pipe(rxjs.map(function (route) { return route.data.showHeader && !_this.context.isStandalone; }));
761
+ this.flowService.initSubscriptions();
627
762
  }
763
+ FlowComponent.prototype.ngOnDestroy = function () {
764
+ this.flowService.cleanup();
765
+ };
628
766
  return FlowComponent;
629
767
  }());
630
- FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: RouterService }, { token: i2__namespace$1.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
631
- 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:auto}.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: i2__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$3.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
768
+ 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 });
769
+ 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: i2__namespace$2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
632
770
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
633
771
  type: i0.Component,
634
772
  args: [{
@@ -637,7 +775,7 @@
637
775
  styleUrls: ['./flow.component.scss'],
638
776
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
639
777
  }]
640
- }], ctorParameters: function () { return [{ type: RouterService }, { type: i2__namespace$1.ContextService }]; } });
778
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i2__namespace.ContextService }, { type: FlowService }]; } });
641
779
 
642
780
  var ContextGuard = /** @class */ (function () {
643
781
  function ContextGuard(router, routerService) {
@@ -646,16 +784,16 @@
646
784
  }
647
785
  ContextGuard.prototype.getConfigurationContextMode = function (accountId, quoteId, orderId, rpcMessage) {
648
786
  if (accountId) {
649
- return i1.ConfigurationContextMode.ACCOUNT;
787
+ return i1$1.ConfigurationContextMode.ACCOUNT;
650
788
  }
651
789
  if (quoteId) {
652
- return i1.ConfigurationContextMode.QUOTE;
790
+ return i1$1.ConfigurationContextMode.QUOTE;
653
791
  }
654
792
  if (orderId) {
655
- return i1.ConfigurationContextMode.ORDER;
793
+ return i1$1.ConfigurationContextMode.ORDER;
656
794
  }
657
795
  if (rpcMessage) {
658
- return i1.ConfigurationContextMode.REMOTE;
796
+ return i1$1.ConfigurationContextMode.REMOTE;
659
797
  }
660
798
  return;
661
799
  };
@@ -692,11 +830,11 @@
692
830
  };
693
831
  return ContextGuard;
694
832
  }());
695
- ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace$3.Router }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
833
+ ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
696
834
  ContextGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard });
697
835
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, decorators: [{
698
836
  type: i0.Injectable
699
- }], ctorParameters: function () { return [{ type: i1__namespace$3.Router }, { type: RouterService }]; } });
837
+ }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: FlowRouterService }]; } });
700
838
 
701
839
  var RootGuard = /** @class */ (function () {
702
840
  function RootGuard(router, routerService) {
@@ -730,12 +868,12 @@
730
868
  };
731
869
  return RootGuard;
732
870
  }());
733
- RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace$3.Router }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
871
+ RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
734
872
  RootGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, providedIn: 'root' });
735
873
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, decorators: [{
736
874
  type: i0.Injectable,
737
875
  args: [{ providedIn: 'root' }]
738
- }], ctorParameters: function () { return [{ type: i1__namespace$3.Router }, { type: RouterService }]; } });
876
+ }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: FlowRouterService }]; } });
739
877
 
740
878
  var getFlowObjectIdPropertyName = function (objectName) {
741
879
  switch (objectName) {
@@ -749,44 +887,20 @@
749
887
  }
750
888
  };
751
889
 
752
- var FlowService = /** @class */ (function () {
753
- function FlowService(configurationSettingsApiService) {
754
- this.configurationSettingsApiService = configurationSettingsApiService;
755
- this.flowsKey = 'flows';
756
- }
757
- FlowService.prototype.getFlow = function (id) {
758
- return this.fetchFlows().pipe(operators.map(function (flows) { return flows.find(function (flow) { return flow.id == id; }); }));
759
- };
760
- FlowService.prototype.fetchFlows = function () {
761
- return this.configurationSettingsApiService
762
- .fetchSetting(this.flowsKey)
763
- .pipe(operators.map(function (_a) {
764
- var value = _a.value;
765
- return (value ? JSON.parse(value) : []);
766
- }));
767
- };
768
- return FlowService;
769
- }());
770
- FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i1__namespace$2.ConfigurationSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
771
- FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
772
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
773
- type: i0.Injectable
774
- }], ctorParameters: function () { return [{ type: i1__namespace$2.ConfigurationSettingsApiService }]; } });
775
-
776
890
  var DebugComponent = /** @class */ (function () {
777
- function DebugComponent(flowService, router, activatedRoute, context, flowConfiguration, quoteService) {
778
- this.flowService = flowService;
891
+ function DebugComponent(flowsApiService, router, activatedRoute, context, flowConfiguration, quoteService) {
892
+ this.flowsApiService = flowsApiService;
779
893
  this.router = router;
780
894
  this.activatedRoute = activatedRoute;
781
895
  this.context = context;
782
896
  this.flowConfiguration = flowConfiguration;
783
897
  this.quoteService = quoteService;
784
898
  this.objectNames = ['Account', 'Quote', 'Order'];
785
- this.form = new i8$1.FormGroup({
786
- id: new i8$1.FormControl(''),
787
- name: new i8$1.FormControl('Quote'),
899
+ this.form = new i8.FormGroup({
900
+ id: new i8.FormControl(''),
901
+ name: new i8.FormControl('Quote'),
788
902
  });
789
- this.flows$ = this.flowService.fetchFlows().pipe(rxjs.map(function (flows) { return flows.map(function (flow) {
903
+ this.flows$ = this.flowsApiService.fetchFlows().pipe(rxjs.map(function (flows) { return flows.map(function (flow) {
790
904
  var _a, _b, _c;
791
905
  var queryParams = (_b = (_a = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _a === void 0 ? void 0 : _a.queryParams) !== null && _b !== void 0 ? _b : {};
792
906
  return {
@@ -815,8 +929,8 @@
815
929
  };
816
930
  return DebugComponent;
817
931
  }());
818
- DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: FlowService }, { token: i1__namespace$3.Router }, { token: i1__namespace$3.ActivatedRoute }, { token: i2__namespace$1.ContextService }, { token: i1__namespace$1.FlowConfigurationService }, { token: i2__namespace$1.QuoteService }], target: i0__namespace.ɵɵFactoryTarget.Component });
819
- 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: i5__namespace.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: i6__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i7__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: i8__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__namespace$1.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: i8__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i9__namespace.InputText, selector: "[pInputText]" }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
932
+ DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i1__namespace$2.FlowsApiService }, { token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }, { token: i2__namespace.ContextService }, { token: i2__namespace$1.FlowConfigurationService }, { token: i2__namespace.QuoteService }], target: i0__namespace.ɵɵFactoryTarget.Component });
933
+ 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: i5__namespace$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i7__namespace.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__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: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i9__namespace$1.InputText, selector: "[pInputText]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__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 });
820
934
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
821
935
  type: i0.Component,
822
936
  args: [{
@@ -825,7 +939,7 @@
825
939
  styleUrls: ['./debug.component.scss'],
826
940
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
827
941
  }]
828
- }], ctorParameters: function () { return [{ type: FlowService }, { type: i1__namespace$3.Router }, { type: i1__namespace$3.ActivatedRoute }, { type: i2__namespace$1.ContextService }, { type: i1__namespace$1.FlowConfigurationService }, { type: i2__namespace$1.QuoteService }]; } });
942
+ }], ctorParameters: function () { return [{ type: i1__namespace$2.FlowsApiService }, { type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }, { type: i2__namespace.ContextService }, { type: i2__namespace$1.FlowConfigurationService }, { type: i2__namespace.QuoteService }]; } });
829
943
 
830
944
  var routes$1 = [{ path: '', component: DebugComponent }];
831
945
  var DebugModule = /** @class */ (function () {
@@ -834,35 +948,35 @@
834
948
  return DebugModule;
835
949
  }());
836
950
  DebugModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
837
- DebugModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, declarations: [DebugComponent], imports: [i7.CommonModule,
838
- i8$1.FormsModule,
839
- i8$1.ReactiveFormsModule, i1__namespace$3.RouterModule, i7$1.RadioButtonModule,
840
- i6.ButtonModule,
841
- i9.InputTextModule,
842
- i5.DropdownModule] });
951
+ DebugModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, declarations: [DebugComponent], imports: [i9.CommonModule,
952
+ i8.FormsModule,
953
+ i8.ReactiveFormsModule, i1__namespace.RouterModule, i7.RadioButtonModule,
954
+ i5.ButtonModule,
955
+ i9$1.InputTextModule,
956
+ i5$1.DropdownModule] });
843
957
  DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, imports: [[
844
- i7.CommonModule,
845
- i8$1.FormsModule,
846
- i8$1.ReactiveFormsModule,
847
- i1$3.RouterModule.forChild(routes$1),
848
- i7$1.RadioButtonModule,
849
- i6.ButtonModule,
850
- i9.InputTextModule,
851
- i5.DropdownModule,
958
+ i9.CommonModule,
959
+ i8.FormsModule,
960
+ i8.ReactiveFormsModule,
961
+ i1.RouterModule.forChild(routes$1),
962
+ i7.RadioButtonModule,
963
+ i5.ButtonModule,
964
+ i9$1.InputTextModule,
965
+ i5$1.DropdownModule,
852
966
  ]] });
853
967
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, decorators: [{
854
968
  type: i0.NgModule,
855
969
  args: [{
856
970
  declarations: [DebugComponent],
857
971
  imports: [
858
- i7.CommonModule,
859
- i8$1.FormsModule,
860
- i8$1.ReactiveFormsModule,
861
- i1$3.RouterModule.forChild(routes$1),
862
- i7$1.RadioButtonModule,
863
- i6.ButtonModule,
864
- i9.InputTextModule,
865
- i5.DropdownModule,
972
+ i9.CommonModule,
973
+ i8.FormsModule,
974
+ i8.ReactiveFormsModule,
975
+ i1.RouterModule.forChild(routes$1),
976
+ i7.RadioButtonModule,
977
+ i5.ButtonModule,
978
+ i9$1.InputTextModule,
979
+ i5$1.DropdownModule,
866
980
  ],
867
981
  }]
868
982
  }] });
@@ -930,7 +1044,7 @@
930
1044
  lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
931
1045
  };
932
1046
  LegacyProductComponent.prototype.getLineItemId = function (quote, queryParams) {
933
- if (i1.EntityUtil.isPresent(queryParams['lineItemId'])) {
1047
+ if (i1$1.EntityUtil.isPresent(queryParams['lineItemId'])) {
934
1048
  return queryParams['lineItemId'];
935
1049
  }
936
1050
  return quote.currentState
@@ -939,12 +1053,12 @@
939
1053
  .find(function (id) { return id; });
940
1054
  };
941
1055
  LegacyProductComponent.prototype.configure = function (productId) {
942
- var runtimeContext = this.getRuntimeContext(productId, '', i2$1.RuntimeOperation.INIT);
1056
+ var runtimeContext = this.getRuntimeContext(productId, '', i2.RuntimeOperation.INIT);
943
1057
  this.startRuntime({}, runtimeContext);
944
1058
  };
945
1059
  LegacyProductComponent.prototype.reConfigure = function (lineItemId, currentState) {
946
- var currentStateItem = i1.EntityUtil.findById(lineItemId, currentState);
947
- var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i2$1.RuntimeOperation.UPDATE);
1060
+ var currentStateItem = i1$1.EntityUtil.findById(lineItemId, currentState);
1061
+ var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i2.RuntimeOperation.UPDATE);
948
1062
  var states = {
949
1063
  configurableRamp: currentStateItem,
950
1064
  currentState: currentState,
@@ -974,14 +1088,14 @@
974
1088
  LegacyProductComponent.prototype.getRuntimeContext = function (productId, offeringId, runtimeOperation) {
975
1089
  var _this = this;
976
1090
  return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(operators.map(function (runtimeContext) {
977
- runtimeContext.invocationContext = { runtimeOperation: i2$1.RuntimeOperation[runtimeOperation] };
1091
+ runtimeContext.invocationContext = { runtimeOperation: i2.RuntimeOperation[runtimeOperation] };
978
1092
  return runtimeContext;
979
1093
  }), operators.switchMap(function (runtimeContext) { return _this.customizeContext(productId, runtimeContext); }));
980
1094
  };
981
1095
  return LegacyProductComponent;
982
1096
  }());
983
- LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace$3.ActivatedRoute }, { token: i2__namespace$1.QuoteService }, { token: i1__namespace$2.QuoteApiService }, { token: i2__namespace$1.ContextService }, { token: i2__namespace$1.RuntimeContextService }, { token: i2__namespace$1.RuntimeService }, { token: i2__namespace$1.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
984
- 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: i2__namespace$1.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
1097
+ LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace.ActivatedRoute }, { token: i2__namespace.QuoteService }, { token: i1__namespace$2.QuoteApiService }, { token: i2__namespace.ContextService }, { token: i2__namespace.RuntimeContextService }, { token: i2__namespace.RuntimeService }, { token: i2__namespace.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1098
+ 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: i2__namespace.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
985
1099
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
986
1100
  type: i0.Component,
987
1101
  args: [{
@@ -989,7 +1103,7 @@
989
1103
  styleUrls: ['./legacy-product.component.scss'],
990
1104
  }]
991
1105
  }], ctorParameters: function () {
992
- return [{ type: i1__namespace$3.ActivatedRoute }, { type: i2__namespace$1.QuoteService }, { type: i1__namespace$2.QuoteApiService }, { type: i2__namespace$1.ContextService }, { type: i2__namespace$1.RuntimeContextService }, { type: i2__namespace$1.RuntimeService }, { type: i2__namespace$1.CurrentStateService }, { type: undefined, decorators: [{
1106
+ return [{ type: i1__namespace.ActivatedRoute }, { type: i2__namespace.QuoteService }, { type: i1__namespace$2.QuoteApiService }, { type: i2__namespace.ContextService }, { type: i2__namespace.RuntimeContextService }, { type: i2__namespace.RuntimeService }, { type: i2__namespace.CurrentStateService }, { type: undefined, decorators: [{
993
1107
  type: i0.Optional
994
1108
  }, {
995
1109
  type: i0.Inject,
@@ -1003,21 +1117,23 @@
1003
1117
  return LegacyProductModule;
1004
1118
  }());
1005
1119
  LegacyProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1006
- LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i7.CommonModule, i2$1.RuntimeModule, i1__namespace$4.TooltipModule], exports: [LegacyProductComponent] });
1007
- LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i7.CommonModule, i2$1.RuntimeModule, i1$4.TooltipModule.forRoot()]] });
1120
+ LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i9.CommonModule, i2.RuntimeModule, i1__namespace$3.TooltipModule], exports: [LegacyProductComponent] });
1121
+ LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i9.CommonModule, i2.RuntimeModule, i1$3.TooltipModule.forRoot()]] });
1008
1122
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
1009
1123
  type: i0.NgModule,
1010
1124
  args: [{
1011
1125
  declarations: [LegacyProductComponent],
1012
- imports: [i7.CommonModule, i2$1.RuntimeModule, i1$4.TooltipModule.forRoot()],
1126
+ imports: [i9.CommonModule, i2.RuntimeModule, i1$3.TooltipModule.forRoot()],
1013
1127
  exports: [LegacyProductComponent],
1014
1128
  }]
1015
1129
  }] });
1016
1130
 
1017
1131
  var ProductComponent = /** @class */ (function () {
1018
- function ProductComponent(runtimeService, conigurationService, quoteService, route, messageService, customizationService) {
1132
+ function ProductComponent(contextService, runtimeService, conigurationService, flowConfigurationService, quoteService, route, messageService, customizationService) {
1133
+ this.contextService = contextService;
1019
1134
  this.runtimeService = runtimeService;
1020
1135
  this.conigurationService = conigurationService;
1136
+ this.flowConfigurationService = flowConfigurationService;
1021
1137
  this.quoteService = quoteService;
1022
1138
  this.route = route;
1023
1139
  this.messageService = messageService;
@@ -1028,7 +1144,18 @@
1028
1144
  ProductComponent.prototype.ngOnInit = function () {
1029
1145
  var _this = this;
1030
1146
  this.quoteService.quote$
1031
- .pipe(rxjs.first(), rxjs.takeUntil(this.destroy$))
1147
+ .pipe(rxjs.first(), rxjs.map(function (quote) {
1148
+ var _a, _b;
1149
+ var contextProperties = (_b = (_a = _this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
1150
+ if (contextProperties.standalone === 'true') {
1151
+ return quote;
1152
+ }
1153
+ var productLineItem = _this.flowConfigurationService
1154
+ .getSnapshot()
1155
+ .find(function (li) { return li.productId === contextProperties.productId; });
1156
+ var state = productLineItem ? [productLineItem] : [];
1157
+ return Object.assign(Object.assign({}, quote), { initialState: state, currentState: state });
1158
+ }), rxjs.takeUntil(this.destroy$))
1032
1159
  .subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
1033
1160
  };
1034
1161
  ProductComponent.prototype.ngOnDestroy = function () {
@@ -1053,7 +1180,7 @@
1053
1180
  var _this = this;
1054
1181
  var _a;
1055
1182
  var lineItemId = this.getLineItemId(quote, queryParams);
1056
- var currentStateItem = i1.EntityUtil.findById(lineItemId, quote.currentState);
1183
+ var currentStateItem = i1$1.EntityUtil.findById(lineItemId, quote.currentState);
1057
1184
  var productId = (_a = currentStateItem === null || currentStateItem === void 0 ? void 0 : currentStateItem.productId) !== null && _a !== void 0 ? _a : queryParams['productId'];
1058
1185
  var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
1059
1186
  if (currentStateItem) {
@@ -1075,7 +1202,7 @@
1075
1202
  .subscribe();
1076
1203
  };
1077
1204
  ProductComponent.prototype.getLineItemId = function (quote, queryParams) {
1078
- if (i1.EntityUtil.isPresent(queryParams['lineItemId'])) {
1205
+ if (i1$1.EntityUtil.isPresent(queryParams['lineItemId'])) {
1079
1206
  return queryParams['lineItemId'];
1080
1207
  }
1081
1208
  return quote.currentState
@@ -1085,8 +1212,8 @@
1085
1212
  };
1086
1213
  return ProductComponent;
1087
1214
  }());
1088
- ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i1__namespace$1.ConfigurationRuntimeService }, { token: i1__namespace$1.ConfigurationService }, { token: i2__namespace$1.QuoteService }, { token: i1__namespace$3.ActivatedRoute }, { token: i4__namespace.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1089
- 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: i2__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1215
+ 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$1.ConfigurationRuntimeService }, { token: i2__namespace$1.ConfigurationService }, { token: i2__namespace$1.FlowConfigurationService }, { token: i2__namespace.QuoteService }, { token: i1__namespace.ActivatedRoute }, { token: i4__namespace$1.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1216
+ 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: i2__namespace$2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i2__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 });
1090
1217
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, decorators: [{
1091
1218
  type: i0.Component,
1092
1219
  args: [{
@@ -1096,7 +1223,7 @@
1096
1223
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1097
1224
  }]
1098
1225
  }], ctorParameters: function () {
1099
- return [{ type: i1__namespace$1.ConfigurationRuntimeService }, { type: i1__namespace$1.ConfigurationService }, { type: i2__namespace$1.QuoteService }, { type: i1__namespace$3.ActivatedRoute }, { type: i4__namespace.MessageService }, { type: undefined, decorators: [{
1226
+ return [{ type: i2__namespace.ContextService }, { type: i2__namespace$1.ConfigurationRuntimeService }, { type: i2__namespace$1.ConfigurationService }, { type: i2__namespace$1.FlowConfigurationService }, { type: i2__namespace.QuoteService }, { type: i1__namespace.ActivatedRoute }, { type: i4__namespace$1.MessageService }, { type: undefined, decorators: [{
1100
1227
  type: i0.Optional
1101
1228
  }, {
1102
1229
  type: i0.Inject,
@@ -1110,13 +1237,13 @@
1110
1237
  return ProductModule;
1111
1238
  }());
1112
1239
  ProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1113
- ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i7.CommonModule, i1$1.PreviewModule, i2.LoaderModule], exports: [ProductComponent] });
1114
- ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i7.CommonModule, i1$1.PreviewModule, i2.LoaderModule]] });
1240
+ ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule], exports: [ProductComponent] });
1241
+ ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule]] });
1115
1242
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, decorators: [{
1116
1243
  type: i0.NgModule,
1117
1244
  args: [{
1118
1245
  declarations: [ProductComponent],
1119
- imports: [i7.CommonModule, i1$1.PreviewModule, i2.LoaderModule],
1246
+ imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule],
1120
1247
  exports: [ProductComponent],
1121
1248
  }]
1122
1249
  }] });
@@ -1135,16 +1262,17 @@
1135
1262
  }
1136
1263
  return RecordNotFoundComponent;
1137
1264
  }());
1138
- RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace$3.Router }, { token: i1__namespace$3.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
1139
- RecordNotFoundComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0__namespace, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1265
+ RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
1266
+ RecordNotFoundComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0__namespace, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1140
1267
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, decorators: [{
1141
1268
  type: i0.Component,
1142
1269
  args: [{
1143
1270
  selector: 'vl-flow-record-not-found',
1144
1271
  templateUrl: './record-not-found.component.html',
1272
+ styleUrls: ['./record-not-found.component.scss'],
1145
1273
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1146
1274
  }]
1147
- }], ctorParameters: function () { return [{ type: i1__namespace$3.Router }, { type: i1__namespace$3.ActivatedRoute }]; } });
1275
+ }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }]; } });
1148
1276
 
1149
1277
  var routes = [{ path: '', component: RecordNotFoundComponent }];
1150
1278
  var RecordNotFoundModule = /** @class */ (function () {
@@ -1153,13 +1281,13 @@
1153
1281
  return RecordNotFoundModule;
1154
1282
  }());
1155
1283
  RecordNotFoundModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1156
- RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i7.CommonModule, i1__namespace$3.RouterModule] });
1157
- RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i7.CommonModule, i1$3.RouterModule.forChild(routes)]] });
1284
+ RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i9.CommonModule, i1__namespace.RouterModule] });
1285
+ RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i9.CommonModule, i1.RouterModule.forChild(routes)]] });
1158
1286
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, decorators: [{
1159
1287
  type: i0.NgModule,
1160
1288
  args: [{
1161
1289
  declarations: [RecordNotFoundComponent],
1162
- imports: [i7.CommonModule, i1$3.RouterModule.forChild(routes)],
1290
+ imports: [i9.CommonModule, i1.RouterModule.forChild(routes)],
1163
1291
  }]
1164
1292
  }] });
1165
1293
 
@@ -1184,7 +1312,7 @@
1184
1312
  _this.state$.next({ loading: false, failure: false });
1185
1313
  }), rxjs.catchError(function (err) {
1186
1314
  _this.uiDefinition = undefined;
1187
- _this.toastService.add({ severity: i2.ToastType.error, summary: 'Failed to resolve Shopping Cart component' });
1315
+ _this.toastService.add({ severity: i2$2.ToastType.error, summary: 'Failed to resolve Shopping Cart component' });
1188
1316
  _this.state$.next({ loading: false, failure: true });
1189
1317
  throw err;
1190
1318
  }), rxjs.takeUntil(this.destroyed$))
@@ -1197,7 +1325,7 @@
1197
1325
  ShoppingCartComponent.prototype.getTemplateRootComponent$ = function (template) {
1198
1326
  return this.templatesApi
1199
1327
  .fetchComponents$(template.id)
1200
- .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1328
+ .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$1.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1201
1329
  };
1202
1330
  ShoppingCartComponent.prototype.getShoppingCartComponentMeta$ = function () {
1203
1331
  var _this = this;
@@ -1210,7 +1338,7 @@
1210
1338
  json: component === null || component === void 0 ? void 0 : component.json,
1211
1339
  }); }));
1212
1340
  }
1213
- return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.filter(function (template) { return template.type === i1.UITemplateType.SHOPPING_CART; }).reverse()[0]; }), 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); }));
1341
+ return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.filter(function (template) { return template.type === i1$1.UITemplateType.SHOPPING_CART; }).reverse()[0]; }), 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); }));
1214
1342
  };
1215
1343
  ShoppingCartComponent.prototype.generateUIDefinition$ = function () {
1216
1344
  return this.getShoppingCartComponentMeta$().pipe(rxjs.map(function (meta) {
@@ -1237,8 +1365,8 @@
1237
1365
  };
1238
1366
  return ShoppingCartComponent;
1239
1367
  }());
1240
- ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$2.UITemplatesApiService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1241
- 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: i2__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1368
+ ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$2.UITemplatesApiService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$2.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1369
+ 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: i2__namespace$2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i2__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 });
1242
1370
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
1243
1371
  type: i0.Component,
1244
1372
  args: [{
@@ -1248,7 +1376,7 @@
1248
1376
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1249
1377
  }]
1250
1378
  }], ctorParameters: function () {
1251
- return [{ type: i1__namespace$2.UITemplatesApiService }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.ToastService }, { type: undefined, decorators: [{
1379
+ return [{ type: i1__namespace$2.UITemplatesApiService }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$2.ToastService }, { type: undefined, decorators: [{
1252
1380
  type: i0.Optional
1253
1381
  }, {
1254
1382
  type: i0.Inject,
@@ -1262,13 +1390,13 @@
1262
1390
  return ShoppingCartModule;
1263
1391
  }());
1264
1392
  ShoppingCartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1265
- ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i7.CommonModule, i1$1.PreviewModule, i2.LoaderModule], exports: [ShoppingCartComponent] });
1266
- ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i7.CommonModule, i1$1.PreviewModule, i2.LoaderModule]] });
1393
+ ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule], exports: [ShoppingCartComponent] });
1394
+ ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule]] });
1267
1395
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, decorators: [{
1268
1396
  type: i0.NgModule,
1269
1397
  args: [{
1270
1398
  declarations: [ShoppingCartComponent],
1271
- imports: [i7.CommonModule, i1$1.PreviewModule, i2.LoaderModule],
1399
+ imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule],
1272
1400
  exports: [ShoppingCartComponent],
1273
1401
  }]
1274
1402
  }] });
@@ -1303,16 +1431,16 @@
1303
1431
  };
1304
1432
  return ContextResolver;
1305
1433
  }());
1306
- ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i2__namespace$1.ContextService }, { token: i1__namespace$3.Router }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1434
+ 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.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1307
1435
  ContextResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver });
1308
1436
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, decorators: [{
1309
1437
  type: i0.Injectable
1310
- }], ctorParameters: function () { return [{ type: i2__namespace$1.ContextService }, { type: i1__namespace$3.Router }, { type: RouterService }]; } });
1438
+ }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i1__namespace.Router }, { type: FlowRouterService }]; } });
1311
1439
 
1312
1440
  var FlowResolver = /** @class */ (function () {
1313
- function FlowResolver(router, flowService, routerService) {
1441
+ function FlowResolver(router, flowsApiService, routerService) {
1314
1442
  this.router = router;
1315
- this.flowService = flowService;
1443
+ this.flowsApiService = flowsApiService;
1316
1444
  this.routerService = routerService;
1317
1445
  }
1318
1446
  FlowResolver.prototype.handleError = function (route, message, queryParams) {
@@ -1331,7 +1459,7 @@
1331
1459
  if (!flowId) {
1332
1460
  return this.handleError(route);
1333
1461
  }
1334
- return this.flowService.getFlow(flowId).pipe(operators.map(function (flow) {
1462
+ return this.flowsApiService.getFlow(flowId).pipe(operators.map(function (flow) {
1335
1463
  if (!flow) {
1336
1464
  return _this.handleError(route, "Flow with flowId=" + flowId + " is not defined");
1337
1465
  }
@@ -1356,11 +1484,11 @@
1356
1484
  };
1357
1485
  return FlowResolver;
1358
1486
  }());
1359
- FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace$3.Router }, { token: FlowService }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1487
+ FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace.Router }, { token: i1__namespace$2.FlowsApiService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1360
1488
  FlowResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver });
1361
1489
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, decorators: [{
1362
1490
  type: i0.Injectable
1363
- }], ctorParameters: function () { return [{ type: i1__namespace$3.Router }, { type: FlowService }, { type: RouterService }]; } });
1491
+ }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace$2.FlowsApiService }, { type: FlowRouterService }]; } });
1364
1492
 
1365
1493
  var QuoteResolver = /** @class */ (function () {
1366
1494
  function QuoteResolver(router, quoteService, routerService, contextService, flowConfiguration) {
@@ -1401,11 +1529,11 @@
1401
1529
  };
1402
1530
  return QuoteResolver;
1403
1531
  }());
1404
- QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace$3.Router }, { token: i2__namespace$1.QuoteService }, { token: RouterService }, { token: i2__namespace$1.ContextService }, { token: i1__namespace$1.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1532
+ QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace.Router }, { token: i2__namespace.QuoteService }, { token: FlowRouterService }, { token: i2__namespace.ContextService }, { token: i2__namespace$1.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1405
1533
  QuoteResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver });
1406
1534
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, decorators: [{
1407
1535
  type: i0.Injectable
1408
- }], ctorParameters: function () { return [{ type: i1__namespace$3.Router }, { type: i2__namespace$1.QuoteService }, { type: RouterService }, { type: i2__namespace$1.ContextService }, { type: i1__namespace$1.FlowConfigurationService }]; } });
1536
+ }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i2__namespace.QuoteService }, { type: FlowRouterService }, { type: i2__namespace.ContextService }, { type: i2__namespace$1.FlowConfigurationService }]; } });
1409
1537
 
1410
1538
  var rootRoute = {
1411
1539
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -1465,14 +1593,14 @@
1465
1593
  return FlowRoutingModule;
1466
1594
  }());
1467
1595
  FlowRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1468
- FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace$3.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule], exports: [i1$3.RouterModule] });
1469
- FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [RouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1$3.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule], i1$3.RouterModule] });
1596
+ FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule], exports: [i1.RouterModule] });
1597
+ FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule], i1.RouterModule] });
1470
1598
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, decorators: [{
1471
1599
  type: i0.NgModule,
1472
1600
  args: [{
1473
- imports: [i1$3.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],
1474
- exports: [i1$3.RouterModule],
1475
- providers: [RouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],
1601
+ imports: [i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],
1602
+ exports: [i1.RouterModule],
1603
+ providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],
1476
1604
  }]
1477
1605
  }] });
1478
1606
 
@@ -1482,14 +1610,14 @@
1482
1610
  return FlowModule;
1483
1611
  }());
1484
1612
  FlowModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1485
- FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i7.CommonModule, FlowRoutingModule, i1$2.ApiModule, i1$1.LauncherModule, i2.LoaderModule, FlowHeaderModule] });
1486
- FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, i2$1.ContextService], imports: [[i7.CommonModule, FlowRoutingModule, i1$2.ApiModule, i1$1.LauncherModule, i2.LoaderModule, FlowHeaderModule]] });
1613
+ FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule, FlowRoutingModule, i1$2.ApiModule, i2$1.LauncherModule, i2$2.LoaderModule, FlowHeaderModule] });
1614
+ FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, i2.ContextService], imports: [[i9.CommonModule, FlowRoutingModule, i1$2.ApiModule, i2$1.LauncherModule, i2$2.LoaderModule, FlowHeaderModule]] });
1487
1615
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, decorators: [{
1488
1616
  type: i0.NgModule,
1489
1617
  args: [{
1490
1618
  declarations: [FlowComponent],
1491
- imports: [i7.CommonModule, FlowRoutingModule, i1$2.ApiModule, i1$1.LauncherModule, i2.LoaderModule, FlowHeaderModule],
1492
- providers: [FlowService, i2$1.ContextService],
1619
+ imports: [i9.CommonModule, FlowRoutingModule, i1$2.ApiModule, i2$1.LauncherModule, i2$2.LoaderModule, FlowHeaderModule],
1620
+ providers: [FlowService, i2.ContextService],
1493
1621
  }]
1494
1622
  }] });
1495
1623