@veloceapps/sdk 3.1.24 → 3.1.26

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 (38) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +13 -1
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-core.umd.js +6 -11
  4. package/bundles/veloce-sdk-core.umd.js.map +1 -1
  5. package/bundles/veloce-sdk.umd.js +356 -148
  6. package/bundles/veloce-sdk.umd.js.map +1 -1
  7. package/cms/cms.actions.d.ts +5 -1
  8. package/cms/vendor-map.d.ts +2 -0
  9. package/core/services/quote-draft.service.d.ts +4 -5
  10. package/esm2015/cms/cms.actions.js +9 -1
  11. package/esm2015/core/services/quote-draft.service.js +7 -12
  12. package/esm2015/src/components/doc-gen/doc-gen.component.js +109 -0
  13. package/esm2015/src/components/doc-gen/doc-gen.module.js +19 -0
  14. package/esm2015/src/components/header/cart-overlay/cart-preview.component.js +3 -4
  15. package/esm2015/src/components/header/header.component.js +59 -27
  16. package/esm2015/src/components/header/header.types.js +1 -1
  17. package/esm2015/src/flow.component.js +13 -9
  18. package/esm2015/src/flow.module.js +9 -4
  19. package/esm2015/src/resolvers/quote.resolver.js +3 -3
  20. package/esm2015/src/services/doc-gen.service.js +33 -0
  21. package/esm2015/src/services/flow-dialog.service.js +23 -1
  22. package/esm2015/src/services/flow.service.js +6 -6
  23. package/fesm2015/veloce-sdk-cms.js +12 -2
  24. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  25. package/fesm2015/veloce-sdk-core.js +6 -11
  26. package/fesm2015/veloce-sdk-core.js.map +1 -1
  27. package/fesm2015/veloce-sdk.js +285 -90
  28. package/fesm2015/veloce-sdk.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/components/doc-gen/doc-gen.component.d.ts +26 -0
  31. package/src/components/doc-gen/doc-gen.module.d.ts +9 -0
  32. package/src/components/header/cart-overlay/cart-preview.component.d.ts +1 -1
  33. package/src/components/header/header.component.d.ts +8 -1
  34. package/src/components/header/header.types.d.ts +2 -2
  35. package/src/flow.component.d.ts +3 -1
  36. package/src/flow.module.d.ts +2 -1
  37. package/src/services/doc-gen.service.d.ts +13 -0
  38. package/src/services/flow-dialog.service.d.ts +3 -0
@@ -1,40 +1,40 @@
1
- import * as i9 from '@angular/common';
1
+ import * as i8 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Component, ChangeDetectionStrategy, NgModule, Injectable, ViewChild, Input, InjectionToken, Optional, Inject } from '@angular/core';
5
- import * as i1$2 from '@veloce/api';
5
+ import * as i2$2 from '@veloce/api';
6
6
  import { ApiModule } from '@veloce/api';
7
- import * as i3$1 from '@veloce/components';
8
- import { LetDirectiveModule, ToastType, LoaderModule } from '@veloce/components';
9
- import * as i4 from '@veloce/sdk/cms';
10
- import { FlowAction, PreviewModule, LauncherModule } from '@veloce/sdk/cms';
7
+ import * as i3 from '@veloce/components';
8
+ import { ToastType, LetDirectiveModule, LoaderModule } from '@veloce/components';
9
+ import * as i1$1 from '@veloce/sdk/cms';
10
+ import { FlowAction, extractElementMetadata, extendElementMetadata, PreviewModule, OpenDocGenAction, LauncherModule } from '@veloce/sdk/cms';
11
11
  import * as i2$1 from '@veloce/sdk/core';
12
12
  import { RuntimeOperation, SdkCoreModule } from '@veloce/sdk/core';
13
13
  import * as i2 from 'primeng/button';
14
14
  import { ButtonModule } from 'primeng/button';
15
15
  import * as i1 from 'primeng/dynamicdialog';
16
- import * as i3 from 'primeng/overlaypanel';
16
+ import { UITemplateComponentType, UITemplateType, ConfigurationContextMode, EntityUtil } from '@veloce/core';
17
+ import { Subject, BehaviorSubject, tap, takeUntil, first, catchError, of, map, switchMap, filter, shareReplay, startWith, distinctUntilChanged, combineLatest, finalize, noop, from } from 'rxjs';
18
+ import * as i3$1 from 'primeng/overlaypanel';
17
19
  import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
18
- import * as i10 from 'primeng/tooltip';
20
+ import * as i11 from 'primeng/tooltip';
19
21
  import { TooltipModule } from 'primeng/tooltip';
20
22
  import * as i7 from '@angular/forms';
21
23
  import { FormGroup, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
22
24
  import * as i5 from 'primeng/inputnumber';
23
25
  import { InputNumberModule } from 'primeng/inputnumber';
24
- import { map, filter, shareReplay, startWith, distinctUntilChanged, BehaviorSubject, Subject, combineLatest, takeUntil, tap, finalize, of, switchMap, catchError, from, first as first$1 } from 'rxjs';
25
- import * as i1$1 from '@angular/router';
26
+ import * as i1$2 from '@angular/router';
26
27
  import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
27
- import * as i2$2 from 'primeng/api';
28
- import { ConfigurationContextMode, UITemplateComponentType, UITemplateType, EntityUtil } from '@veloce/core';
28
+ import * as i2$3 from 'primeng/api';
29
29
  import { HttpErrorResponse } from '@angular/common/http';
30
- import * as i4$1 from 'primeng/dropdown';
30
+ import * as i4 from 'primeng/dropdown';
31
31
  import { DropdownModule } from 'primeng/dropdown';
32
- import * as i8 from 'primeng/inputtext';
32
+ import * as i8$1 from 'primeng/inputtext';
33
33
  import { InputTextModule } from 'primeng/inputtext';
34
34
  import * as i6 from 'primeng/radiobutton';
35
35
  import { RadioButtonModule } from 'primeng/radiobutton';
36
- import { first, takeUntil as takeUntil$1, take, map as map$1, switchMap as switchMap$1 } from 'rxjs/operators';
37
- import * as i4$2 from '@veloce/sdk/runtime';
36
+ import { first as first$1, takeUntil as takeUntil$1, take, map as map$1, switchMap as switchMap$1 } from 'rxjs/operators';
37
+ import * as i4$1 from '@veloce/sdk/runtime';
38
38
  import { RuntimeModule } from '@veloce/sdk/runtime';
39
39
  import * as i1$3 from 'ngx-bootstrap/tooltip';
40
40
  import { TooltipModule as TooltipModule$1 } from 'ngx-bootstrap/tooltip';
@@ -55,7 +55,7 @@ class FlowDialogComponent {
55
55
  }
56
56
  }
57
57
  FlowDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogComponent, deps: [{ token: i1.DynamicDialogConfig }, { token: i1.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component });
58
- FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0, template: "<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .description{flex:1;padding:0 24px 24px;font-weight:400;font-size:12px;line-height:16px;color:var(--vl-text-color-deep-accent)}:host .form-actions{border-top:1px solid var(--vl-border-color);padding:1.5rem 2.2rem;display:flex;justify-content:flex-end;width:100%;grid-gap:10px;gap:10px}\n"], components: [{ type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
58
+ FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0, template: "<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .description{flex:1;padding:0 24px 24px;font-weight:400;font-size:12px;line-height:16px;color:var(--vl-text-color-deep-accent)}:host .form-actions{border-top:1px solid var(--vl-border-color);padding:1.5rem 2.2rem;display:flex;justify-content:flex-end;width:100%;grid-gap:10px;gap:10px}\n"], components: [{ type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
59
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogComponent, decorators: [{
60
60
  type: Component,
61
61
  args: [{
@@ -80,6 +80,145 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
80
80
  }]
81
81
  }] });
82
82
 
83
+ class FlowDocGenService {
84
+ constructor(integrationState) {
85
+ this.integrationState = integrationState;
86
+ this.cleanup$ = new Subject();
87
+ this.isVisibleSubj$ = new BehaviorSubject(false);
88
+ this.isVisible$ = this.isVisibleSubj$.asObservable();
89
+ this.initSubscriptions();
90
+ }
91
+ cleanup() {
92
+ this.cleanup$.next();
93
+ }
94
+ initSubscriptions() {
95
+ this.integrationState
96
+ .listen$(FlowAction.FLOW_OPEN_DOC_GEN)
97
+ .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
98
+ .subscribe();
99
+ this.integrationState
100
+ .listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
101
+ .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
102
+ .subscribe();
103
+ }
104
+ }
105
+ FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDocGenService, deps: [{ token: i1$1.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
106
+ FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDocGenService });
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDocGenService, decorators: [{
108
+ type: Injectable
109
+ }], ctorParameters: function () { return [{ type: i1$1.IntegrationState }]; } });
110
+
111
+ class DocGenComponent {
112
+ constructor(quoteDraftService, contextService, templatesApi, docGenService, toastService) {
113
+ this.quoteDraftService = quoteDraftService;
114
+ this.contextService = contextService;
115
+ this.templatesApi = templatesApi;
116
+ this.docGenService = docGenService;
117
+ this.toastService = toastService;
118
+ this.uiDefinition$ = new BehaviorSubject(null);
119
+ this.templateApiName = '';
120
+ this.destroy$ = new Subject();
121
+ this.isVisible$ = this.docGenService.isVisible$;
122
+ // initialize when quote draft requested
123
+ this.quoteDraftService.quoteDraft$
124
+ .pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
125
+ .subscribe();
126
+ }
127
+ ngOnDestroy() {
128
+ this.destroy$.next();
129
+ this.destroy$.complete();
130
+ }
131
+ initialize() {
132
+ var _a;
133
+ this.templateApiName = (_a = this.contextService.resolve().properties.docGenTemplateApiName) !== null && _a !== void 0 ? _a : '';
134
+ this.generateUIDefinition$()
135
+ .pipe(tap(uiDef => {
136
+ if (!uiDef) {
137
+ throw new Error(`Component with name '${this.templateApiName}' not found.`);
138
+ }
139
+ this.uiDefinition$.next(uiDef);
140
+ }), catchError(err => {
141
+ var _a;
142
+ const message = 'Failed to resolve DocGen component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
143
+ this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
144
+ return of();
145
+ }), takeUntil(this.destroy$))
146
+ .subscribe();
147
+ }
148
+ getTemplateRootComponent$(template) {
149
+ return this.templatesApi
150
+ .fetchComponents$(template.id)
151
+ .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
152
+ }
153
+ getDocGenComponentMeta$() {
154
+ return this.templatesApi.fetchTemplates$().pipe(map(templates => {
155
+ const template = templates.find(template => template.type === UITemplateType.DOCGEN && template.name === this.templateApiName);
156
+ return template !== null && template !== void 0 ? template : templates[0];
157
+ }), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
158
+ }
159
+ generateUIDefinition$() {
160
+ return of(undefined).pipe(tap(() => {
161
+ if (!this.templateApiName) {
162
+ throw new Error("Flow Query parameter 'docGenTemplateApiName' is missing.");
163
+ }
164
+ }), switchMap(meta => (meta ? of(meta) : this.getDocGenComponentMeta$())), map(meta => {
165
+ var _a;
166
+ if (!meta) {
167
+ return;
168
+ }
169
+ const headerId = (_a = this.contextService.resolve().properties.Id) !== null && _a !== void 0 ? _a : null;
170
+ let script = meta.js;
171
+ if (script) {
172
+ const metadata = extractElementMetadata(script);
173
+ script = extendElementMetadata(script, {
174
+ inputs: Object.assign(Object.assign({}, metadata.inputs), { Id: headerId ? `"${headerId}"` : null }),
175
+ });
176
+ }
177
+ const uiDef = {
178
+ name: '',
179
+ createdTimestamp: 0,
180
+ primary: true,
181
+ type: 'DEFAULT',
182
+ version: 2,
183
+ children: [
184
+ {
185
+ children: [],
186
+ template: meta.html && btoa(meta.html),
187
+ script: script && btoa(script),
188
+ styles: meta.css && btoa(meta.css),
189
+ },
190
+ ],
191
+ };
192
+ return uiDef;
193
+ }));
194
+ }
195
+ }
196
+ DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenComponent, deps: [{ token: i2$1.QuoteDraftService }, { token: i2$1.ContextService }, { token: i2$2.UITemplatesApiService }, { token: FlowDocGenService }, { token: i3.ToastService }], target: i0.ɵɵFactoryTarget.Component });
197
+ DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], components: [{ type: i1$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenComponent, decorators: [{
199
+ type: Component,
200
+ args: [{
201
+ selector: 'vl-flow-doc-gen',
202
+ templateUrl: './doc-gen.component.html',
203
+ styleUrls: ['./doc-gen.component.scss'],
204
+ changeDetection: ChangeDetectionStrategy.OnPush,
205
+ }]
206
+ }], ctorParameters: function () { return [{ type: i2$1.QuoteDraftService }, { type: i2$1.ContextService }, { type: i2$2.UITemplatesApiService }, { type: FlowDocGenService }, { type: i3.ToastService }]; } });
207
+
208
+ class DocGenModule {
209
+ }
210
+ DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
211
+ DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
212
+ DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenModule, imports: [[CommonModule, PreviewModule]] });
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenModule, decorators: [{
214
+ type: NgModule,
215
+ args: [{
216
+ declarations: [DocGenComponent],
217
+ imports: [CommonModule, PreviewModule],
218
+ exports: [DocGenComponent],
219
+ }]
220
+ }] });
221
+
83
222
  class FlowRouterService {
84
223
  constructor(router, route, contextService) {
85
224
  this.router = router;
@@ -190,12 +329,12 @@ class FlowRouterService {
190
329
  this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
191
330
  }
192
331
  }
193
- FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
332
+ FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
194
333
  FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
195
334
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, decorators: [{
196
335
  type: Injectable,
197
336
  args: [{ providedIn: 'root' }]
198
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.ContextService }]; } });
337
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2$1.ContextService }]; } });
199
338
 
200
339
  class CartPreviewComponent {
201
340
  constructor(flowConfiguration, routerService, productImagesService, quoteDraftService) {
@@ -206,7 +345,6 @@ class CartPreviewComponent {
206
345
  this.form = new FormGroup({});
207
346
  this.shouldUpdate$ = new BehaviorSubject(true);
208
347
  this.destroyed$ = new Subject();
209
- this.isEditMode = true;
210
348
  this.readonlyProductId$ = combineLatest([
211
349
  this.routerService.route$,
212
350
  this.routerService.isConfigurationRoute$(),
@@ -216,7 +354,7 @@ class CartPreviewComponent {
216
354
  }
217
355
  return route.queryParams.productId;
218
356
  }));
219
- this.isEditMode = this.quoteDraftService.isEditMode();
357
+ this.isEditMode$ = this.quoteDraftService.isEditMode$();
220
358
  }
221
359
  ngOnChanges(changes) {
222
360
  if (changes.products) {
@@ -286,7 +424,7 @@ class CartPreviewComponent {
286
424
  }
287
425
  }
288
426
  CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, deps: [{ token: i2$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i2$1.ProductImagesService }, { token: i2$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
289
- CartPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!isEditMode || !product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"!isEditMode || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n [disabled]=\"!isEditMode\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$0.00</span>\n <span class=\"text-right pt-3\">$0.00</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"!isEditMode || readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i3.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i9.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
427
+ CartPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!isEditMode || !product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"!isEditMode || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n [disabled]=\"!isEditMode\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">${{ product.mrr }}</span>\n <span class=\"text-right pt-3\">${{ product.nrr }}</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]=\"!isEditMode || readonlyProductId\"\n (onClick)=\"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: i3$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
290
428
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, decorators: [{
291
429
  type: Component,
292
430
  args: [{
@@ -384,6 +522,28 @@ class FlowDialogService {
384
522
  primaryButton: 'OK',
385
523
  });
386
524
  }
525
+ showDocgenAccountUnsavedChangesDialog() {
526
+ return this.show({
527
+ title: 'Save Quote',
528
+ description: 'To generate a document, save the quote first, and then generate the document from the Shopping Cart.',
529
+ primaryButton: 'OK',
530
+ });
531
+ }
532
+ showDocgenReadonlyDialog() {
533
+ return this.show({
534
+ title: 'Document Generation is not Available',
535
+ description: 'It is only possible to generate documents for quotes with the “Draft” status. Please create a new quote to generate a document.',
536
+ primaryButton: 'OK',
537
+ });
538
+ }
539
+ showDocgenUnsavedChangesDialog() {
540
+ return this.show({
541
+ title: 'Unsaved Changes',
542
+ description: 'To generate a document, save the quote first.',
543
+ primaryButton: 'Save and proceed',
544
+ secondaryButton: 'Cancel',
545
+ });
546
+ }
387
547
  }
388
548
  FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
389
549
  FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogService });
@@ -392,7 +552,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
392
552
  }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2$1.ContextService }]; } });
393
553
 
394
554
  class FlowHeaderComponent {
395
- constructor(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService) {
555
+ constructor(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService, integrationState) {
396
556
  this.contextService = contextService;
397
557
  this.quoteDraftService = quoteDraftService;
398
558
  this.quoteApiService = quoteApiService;
@@ -400,6 +560,7 @@ class FlowHeaderComponent {
400
560
  this.flowConfiguration = flowConfiguration;
401
561
  this.routerService = routerService;
402
562
  this.dialogService = dialogService;
563
+ this.integrationState = integrationState;
403
564
  this.disabledActionButtonTooltip = 'Available from the Shopping Cart';
404
565
  this.objectDetails$ = new BehaviorSubject({});
405
566
  this.isSaveInProgress$ = new BehaviorSubject(false);
@@ -417,6 +578,8 @@ class FlowHeaderComponent {
417
578
  this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
418
579
  this.isCartRoute$ = this.routerService.isCartRoute$();
419
580
  this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
581
+ this.totalMRR$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties.VDM_Total_MRR), distinctUntilChanged(), map(mrr => this.formatMetric(mrr)));
582
+ this.totalNRR$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties.VDM_Total_NRR), distinctUntilChanged(), map(nrr => this.formatMetric(nrr)));
420
583
  }
421
584
  ngOnInit() {
422
585
  this.populateObjectDetails();
@@ -449,6 +612,28 @@ class FlowHeaderComponent {
449
612
  navigateToCatalog() {
450
613
  this.routerService.navigateToCatalog();
451
614
  }
615
+ docGenButtonClickHandler() {
616
+ if (this.mode === ConfigurationContextMode.ACCOUNT) {
617
+ if (!this.quoteDraftService.hasUnsavedChanges) {
618
+ this.dialogService.showAccountNoChangesDialog().subscribe();
619
+ }
620
+ else {
621
+ this.dialogService.showDocgenAccountUnsavedChangesDialog().subscribe();
622
+ }
623
+ return;
624
+ }
625
+ if (!this.quoteDraftService.isEditMode()) {
626
+ this.dialogService.showDocgenReadonlyDialog().subscribe();
627
+ return;
628
+ }
629
+ let observable = of(true);
630
+ if (this.quoteDraftService.hasUnsavedChanges) {
631
+ observable = this.dialogService.showDocgenUnsavedChangesDialog().pipe(switchMap(confirmed => (confirmed ? this.saveQuote$(true) : of(true))), map(() => true));
632
+ }
633
+ observable
634
+ .pipe(first(), tap(() => this.integrationState.dispatch(OpenDocGenAction())))
635
+ .subscribe();
636
+ }
452
637
  saveButtonClickHandler() {
453
638
  if (!this.quoteDraftService.isEditMode()) {
454
639
  if (this.mode === ConfigurationContextMode.QUOTE) {
@@ -468,18 +653,7 @@ class FlowHeaderComponent {
468
653
  this.dialogService.showEmptyCartDialog().subscribe();
469
654
  return;
470
655
  }
471
- const quoteDraft = this.quoteDraftService.quoteDraft;
472
- if (!quoteDraft) {
473
- return;
474
- }
475
- this.isSaveInProgress$.next(true);
476
- this.quoteApiService
477
- .upsertQuote(quoteDraft)
478
- .pipe(tap(({ quoteId }) => {
479
- this.quoteDraftService.hasUnsavedChanges = false;
480
- this.back(quoteId);
481
- }), finalize(() => this.isSaveInProgress$.next(false)), takeUntil(this.destroyed$))
482
- .subscribe();
656
+ this.saveQuote$().subscribe();
483
657
  }
484
658
  submitButtonClickHandler() {
485
659
  if (this.mode === ConfigurationContextMode.QUOTE && !this.quoteDraftService.isEditMode()) {
@@ -506,6 +680,19 @@ class FlowHeaderComponent {
506
680
  selectPriceList(priceListId) {
507
681
  this.quoteDraftService.updateActivePriceList(priceListId);
508
682
  }
683
+ saveQuote$(stayOnPage = false) {
684
+ const quoteDraft = this.quoteDraftService.quoteDraft;
685
+ if (!quoteDraft) {
686
+ return of(undefined);
687
+ }
688
+ this.isSaveInProgress$.next(true);
689
+ return this.quoteApiService.upsertQuote(quoteDraft).pipe(tap(({ quoteId }) => {
690
+ this.quoteDraftService.hasUnsavedChanges = false;
691
+ if (!stayOnPage) {
692
+ this.back(quoteId);
693
+ }
694
+ }), finalize(() => this.isSaveInProgress$.next(false)), map(noop), takeUntil(this.destroyed$));
695
+ }
509
696
  queryName$(objectName, id) {
510
697
  if (!id) {
511
698
  return of('');
@@ -532,6 +719,9 @@ class FlowHeaderComponent {
532
719
  this.queryName$('Account', accountId).subscribe(accountName => this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { accountName })));
533
720
  this.queryName$('Opportunity', opportunityId).subscribe(opportunityName => this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { opportunityName })));
534
721
  }
722
+ formatMetric(value) {
723
+ return (value ? Number(value) : 0).toFixed(2);
724
+ }
535
725
  generateProducts(lineItems) {
536
726
  const date = new Date();
537
727
  date.setHours(0, 0, 0, 0);
@@ -555,8 +745,8 @@ class FlowHeaderComponent {
555
745
  name: target.name,
556
746
  configurable: target.properties['#configurable'] === 'true',
557
747
  qty: target.qty,
558
- mrr: 0,
559
- nrr: 0,
748
+ mrr: this.formatMetric(target.properties.VDM_Total_MRR),
749
+ nrr: this.formatMetric(target.properties.VDM_Total_NRR),
560
750
  },
561
751
  ];
562
752
  }
@@ -564,8 +754,8 @@ class FlowHeaderComponent {
564
754
  }, []);
565
755
  }
566
756
  }
567
- FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i2$1.ContextService }, { token: i2$1.QuoteDraftService }, { token: i1$2.QuoteApiService }, { token: i1$2.SalesforceApiService }, { token: i2$1.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Component });
568
- FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\">&nbsp;To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n <span>{{ details.accountName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n <span>{{ details.opportunityName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n <span>{{ details.quoteName }}</span>\n </a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCatalogRoute$ | async }\" (click)=\"navigateToCatalog()\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products\"></vl-cart-preview>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <ng-container *ngIf=\"isAccountMode ?? assetPriceLists.length > 1\">\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >{{ option.name }}</span\n >\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span>{{ priceList.name }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <p-button\n styleClass=\"p-button-outlined\"\n label=\"Generate Doc\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button-outlined\"\n [label]=\"isSaveInProgress ? 'Saving' : 'Save to Quote'\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"isSaveInProgress\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n [label]=\"isSubmitInProgress ? 'Submitting' : 'Submit For Approval'\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"submitButtonClickHandler()\"\n [loading]=\"isSubmitInProgress\"\n ></p-button>\n </ng-container>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}::ng-deep .p-overlaypanel.price-list-overlay .p-overlaypanel-content{border-radius:5px;border-color:var(--vl-border-color);padding:0;display:flex;flex-direction:column;max-height:140px;overflow:auto}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button .p-button-label{white-space:nowrap}:host ::ng-deep .save-button .p-button{width:120px}:host ::ng-deep .submit-button .p-button{width:160px}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__wrapper .info-list__row a{text-align:right}.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}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i3.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: CartPreviewComponent, selector: "vl-cart-preview", inputs: ["products"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i9.AsyncPipe, "date": i9.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
757
+ FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i2$1.ContextService }, { token: i2$1.QuoteDraftService }, { token: i2$2.QuoteApiService }, { token: i2$2.SalesforceApiService }, { token: i2$1.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }, { token: i1$1.IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
758
+ FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\">&nbsp;To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n <span>{{ details.accountName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n <span>{{ details.opportunityName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n <span>{{ details.quoteName }}</span>\n </a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCatalogRoute$ | async }\" (click)=\"navigateToCatalog()\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products\"></vl-cart-preview>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <ng-container *ngIf=\"isAccountMode && assetPriceLists.length > 1\">\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList?.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >{{ option.name }}</span\n >\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span>{{ priceList?.name }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span class=\"metrics\">\n <div class=\"metrics__row\">\n MRR: <span class=\"font-semibold\">${{ totalMRR$ | async }}</span>\n </div>\n <div class=\"metrics__row\">\n NRR: <span class=\"font-semibold\">${{ totalNRR$ | async }}</span>\n </div>\n </span>\n </ng-container>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <p-button\n styleClass=\"p-button-outlined\"\n label=\"Generate Doc\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"docGenButtonClickHandler()\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button-outlined\"\n [label]=\"isSaveInProgress ? 'Saving' : 'Save to Quote'\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"isSaveInProgress\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n [label]=\"isSubmitInProgress ? 'Submitting' : 'Submit For Approval'\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"submitButtonClickHandler()\"\n [loading]=\"isSubmitInProgress\"\n ></p-button>\n </ng-container>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}::ng-deep .p-overlaypanel.price-list-overlay .p-overlaypanel-content{border-radius:5px;border-color:var(--vl-border-color);padding:0;display:flex;flex-direction:column;max-height:140px;overflow:auto}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button .p-button-label{white-space:nowrap}:host ::ng-deep .save-button .p-button{width:120px}:host ::ng-deep .submit-button .p-button{width:160px}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__wrapper .info-list__row a{text-align:right}.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}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i3$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: CartPreviewComponent, selector: "vl-cart-preview", inputs: ["products"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i8.AsyncPipe, "date": i8.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
569
759
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, decorators: [{
570
760
  type: Component,
571
761
  args: [{
@@ -574,7 +764,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
574
764
  styleUrls: ['./header.component.scss'],
575
765
  changeDetection: ChangeDetectionStrategy.OnPush,
576
766
  }]
577
- }], ctorParameters: function () { return [{ type: i2$1.ContextService }, { type: i2$1.QuoteDraftService }, { type: i1$2.QuoteApiService }, { type: i1$2.SalesforceApiService }, { type: i2$1.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }]; } });
767
+ }], ctorParameters: function () { return [{ type: i2$1.ContextService }, { type: i2$1.QuoteDraftService }, { type: i2$2.QuoteApiService }, { type: i2$2.SalesforceApiService }, { type: i2$1.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }, { type: i1$1.IntegrationState }]; } });
578
768
 
579
769
  class FlowHeaderModule {
580
770
  }
@@ -602,7 +792,7 @@ class FlowService {
602
792
  initSubscriptions() {
603
793
  this.integrationState
604
794
  .listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
605
- .pipe(takeUntil(this.cleanup$), tap(payload => {
795
+ .pipe(tap(payload => {
606
796
  var _a, _b;
607
797
  const productId = (_a = payload.productId) !== null && _a !== void 0 ? _a : (_b = this.quoteDraftService.currentState.find(li => li.id === payload.lineItemId)) === null || _b === void 0 ? void 0 : _b.productId;
608
798
  if (productId) {
@@ -611,15 +801,15 @@ class FlowService {
611
801
  else {
612
802
  console.warn("Parameter 'productId' is needed to start configuration");
613
803
  }
614
- }))
804
+ }), takeUntil(this.cleanup$))
615
805
  .subscribe();
616
806
  this.integrationState
617
807
  .listen$(FlowAction.FLOW_NAVIGATE_BACK)
618
- .pipe(takeUntil(this.cleanup$), tap(() => this.flowRouterService.navigateBack()))
808
+ .pipe(tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
619
809
  .subscribe();
620
810
  this.integrationState
621
811
  .listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
622
- .pipe(takeUntil(this.cleanup$), switchMap(() => {
812
+ .pipe(switchMap(() => {
623
813
  const lineItem = this.configurationService.getSnapshot();
624
814
  if (!lineItem) {
625
815
  return of(undefined);
@@ -638,34 +828,36 @@ class FlowService {
638
828
  }), tap(() => {
639
829
  this.configurationService.hasUnsavedChanges = false;
640
830
  this.flowRouterService.navigateToShoppingCart();
641
- }))
831
+ }), takeUntil(this.cleanup$))
642
832
  .subscribe();
643
833
  }
644
834
  cleanup() {
645
835
  this.cleanup$.next();
646
836
  }
647
837
  }
648
- FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService, deps: [{ token: i4.IntegrationState }, { token: FlowRouterService }, { token: i2$1.QuoteDraftService }, { token: i2$1.ConfigurationService }, { token: i2$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
838
+ FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService, deps: [{ token: i1$1.IntegrationState }, { token: FlowRouterService }, { token: i2$1.QuoteDraftService }, { token: i2$1.ConfigurationService }, { token: i2$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
649
839
  FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService });
650
840
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService, decorators: [{
651
841
  type: Injectable
652
- }], ctorParameters: function () { return [{ type: i4.IntegrationState }, { type: FlowRouterService }, { type: i2$1.QuoteDraftService }, { type: i2$1.ConfigurationService }, { type: i2$1.FlowConfigurationService }]; } });
842
+ }], ctorParameters: function () { return [{ type: i1$1.IntegrationState }, { type: FlowRouterService }, { type: i2$1.QuoteDraftService }, { type: i2$1.ConfigurationService }, { type: i2$1.FlowConfigurationService }]; } });
653
843
 
654
844
  class FlowComponent {
655
- constructor(routerService, quoteDraftService, flowService) {
845
+ constructor(routerService, quoteDraftService, flowService, docGenService) {
656
846
  this.routerService = routerService;
657
847
  this.quoteDraftService = quoteDraftService;
658
848
  this.flowService = flowService;
849
+ this.docGenService = docGenService;
659
850
  this.isLoading$ = this.routerService.loading$;
660
851
  this.showHeader$ = this.routerService.route$.pipe(map(route => route.data.showHeader && !this.quoteDraftService.isStandalone));
661
852
  this.flowService.initSubscriptions();
662
853
  }
663
854
  ngOnDestroy() {
664
855
  this.flowService.cleanup();
856
+ this.docGenService.cleanup();
665
857
  }
666
858
  }
667
- FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i2$1.QuoteDraftService }, { token: FlowService }], target: i0.ɵɵFactoryTarget.Component });
668
- FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i9.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
859
+ FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i2$1.QuoteDraftService }, { token: FlowService }, { token: FlowDocGenService }], target: i0.ɵɵFactoryTarget.Component });
860
+ FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0, 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\n<vl-flow-doc-gen></vl-flow-doc-gen>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: DocGenComponent, selector: "vl-flow-doc-gen" }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
669
861
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowComponent, decorators: [{
670
862
  type: Component,
671
863
  args: [{
@@ -674,7 +866,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
674
866
  styleUrls: ['./flow.component.scss'],
675
867
  changeDetection: ChangeDetectionStrategy.OnPush,
676
868
  }]
677
- }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i2$1.QuoteDraftService }, { type: FlowService }]; } });
869
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i2$1.QuoteDraftService }, { type: FlowService }, { type: FlowDocGenService }]; } });
678
870
 
679
871
  class ContextGuard {
680
872
  constructor(router, routerService, contextService) {
@@ -737,11 +929,11 @@ class ContextGuard {
737
929
  return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
738
930
  }
739
931
  }
740
- ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard, deps: [{ token: i1$1.Router }, { token: FlowRouterService }, { token: i2$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
932
+ ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
741
933
  ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard });
742
934
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard, decorators: [{
743
935
  type: Injectable
744
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: FlowRouterService }, { type: i2$1.ContextService }]; } });
936
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2$1.ContextService }]; } });
745
937
 
746
938
  class ProductUnloadGuard {
747
939
  constructor(router, contextService, quoteDraftService, configurationService, flowDialogService) {
@@ -774,11 +966,11 @@ class ProductUnloadGuard {
774
966
  }));
775
967
  }
776
968
  }
777
- ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$1.Router }, { token: i2$1.ContextService }, { token: i2$1.QuoteDraftService }, { token: i2$1.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
969
+ ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i2$1.ContextService }, { token: i2$1.QuoteDraftService }, { token: i2$1.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
778
970
  ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard });
779
971
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard, decorators: [{
780
972
  type: Injectable
781
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i2$1.ContextService }, { type: i2$1.QuoteDraftService }, { type: i2$1.ConfigurationService }, { type: FlowDialogService }]; } });
973
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2$1.ContextService }, { type: i2$1.QuoteDraftService }, { type: i2$1.ConfigurationService }, { type: FlowDialogService }]; } });
782
974
 
783
975
  class RootGuard {
784
976
  constructor(router, routerService) {
@@ -810,12 +1002,12 @@ class RootGuard {
810
1002
  return true;
811
1003
  }
812
1004
  }
813
- RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, deps: [{ token: i1$1.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
1005
+ RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
814
1006
  RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, providedIn: 'root' });
815
1007
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, decorators: [{
816
1008
  type: Injectable,
817
1009
  args: [{ providedIn: 'root' }]
818
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: FlowRouterService }]; } });
1010
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
819
1011
 
820
1012
  const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
821
1013
 
@@ -908,8 +1100,8 @@ class CatalogComponent {
908
1100
  }));
909
1101
  }
910
1102
  }
911
- CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$2.UITemplatesApiService }, { token: i2$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
912
- CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1103
+ CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CatalogComponent, deps: [{ token: i2$2.UITemplatesApiService }, { token: i2$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1104
+ CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
913
1105
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CatalogComponent, decorators: [{
914
1106
  type: Component,
915
1107
  args: [{
@@ -918,7 +1110,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
918
1110
  styleUrls: ['./catalog.component.scss'],
919
1111
  changeDetection: ChangeDetectionStrategy.OnPush,
920
1112
  }]
921
- }], ctorParameters: function () { return [{ type: i1$2.UITemplatesApiService }, { type: i2$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
1113
+ }], ctorParameters: function () { return [{ type: i2$2.UITemplatesApiService }, { type: i2$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3.ToastService }, { type: undefined, decorators: [{
922
1114
  type: Optional
923
1115
  }, {
924
1116
  type: Inject,
@@ -990,8 +1182,8 @@ class DebugComponent {
990
1182
  });
991
1183
  }
992
1184
  }
993
- DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, deps: [{ token: i1$2.FlowsApiService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.ContextService }, { token: i2$1.FlowConfigurationService }, { token: i2$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
994
- DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i4$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: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8.InputText, selector: "[pInputText]" }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i9.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1185
+ DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, deps: [{ token: i2$2.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2$1.ContextService }, { token: i2$1.FlowConfigurationService }, { token: i2$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
1186
+ DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i4.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: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8$1.InputText, selector: "[pInputText]" }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
995
1187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, decorators: [{
996
1188
  type: Component,
997
1189
  args: [{
@@ -1000,7 +1192,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1000
1192
  styleUrls: ['./debug.component.scss'],
1001
1193
  changeDetection: ChangeDetectionStrategy.OnPush,
1002
1194
  }]
1003
- }], ctorParameters: function () { return [{ type: i1$2.FlowsApiService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.ContextService }, { type: i2$1.FlowConfigurationService }, { type: i2$1.QuoteDraftService }]; } });
1195
+ }], ctorParameters: function () { return [{ type: i2$2.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2$1.ContextService }, { type: i2$1.FlowConfigurationService }, { type: i2$1.QuoteDraftService }]; } });
1004
1196
 
1005
1197
  const routes$1 = [{ path: '', component: DebugComponent }];
1006
1198
  class DebugModule {
@@ -1008,7 +1200,7 @@ class DebugModule {
1008
1200
  DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1009
1201
  DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
1010
1202
  FormsModule,
1011
- ReactiveFormsModule, i1$1.RouterModule, RadioButtonModule,
1203
+ ReactiveFormsModule, i1$2.RouterModule, RadioButtonModule,
1012
1204
  ButtonModule,
1013
1205
  InputTextModule,
1014
1206
  DropdownModule] });
@@ -1053,7 +1245,7 @@ class LegacyProductComponent {
1053
1245
  }
1054
1246
  ngOnInit() {
1055
1247
  this.quoteDraftService.quoteDraft$
1056
- .pipe(first(), takeUntil$1(this.destroyed$))
1248
+ .pipe(first$1(), takeUntil$1(this.destroyed$))
1057
1249
  .subscribe(quote => this.init(quote, this.route.snapshot.queryParams));
1058
1250
  this.runtimeService.onSolutionStopEvent.pipe(take(1)).subscribe(lineItem => this.onSolutionStop(lineItem));
1059
1251
  this.runtimeService.onSolutionReadyEvent.pipe(take(1)).subscribe(event => this.onSolutionReady(event));
@@ -1068,7 +1260,7 @@ class LegacyProductComponent {
1068
1260
  lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
1069
1261
  }
1070
1262
  onSolutionCancel() {
1071
- this.quoteDraftService.quoteDraft$.pipe(first(), takeUntil$1(this.destroyed$)).subscribe(quote => {
1263
+ this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
1072
1264
  window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
1073
1265
  });
1074
1266
  }
@@ -1081,7 +1273,7 @@ class LegacyProductComponent {
1081
1273
  this.runtimeService.updateRuntime(states);
1082
1274
  }
1083
1275
  onSolutionStop(lineItem) {
1084
- this.quoteDraftService.quoteDraft$.pipe(first(), takeUntil$1(this.destroyed$)).subscribe(quote => {
1276
+ this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
1085
1277
  const quoteToUpsert = Object.assign(Object.assign({}, quote), { context: this.contextService.resolve(), currentState: [...(this.currentStateService.currentState || []).filter(li => li.id !== lineItem.id), lineItem] });
1086
1278
  this.quoteApiService
1087
1279
  .upsertQuote(quoteToUpsert)
@@ -1145,15 +1337,15 @@ class LegacyProductComponent {
1145
1337
  }), switchMap$1(runtimeContext => this.customizeContext(productId, runtimeContext)));
1146
1338
  }
1147
1339
  }
1148
- LegacyProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i2$1.QuoteDraftService }, { token: i1$2.QuoteApiService }, { token: i2$1.ContextService }, { token: i4$2.RuntimeContextService }, { token: i4$2.RuntimeService }, { token: i4$2.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1149
- LegacyProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4$2.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
1340
+ LegacyProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i2$1.QuoteDraftService }, { token: i2$2.QuoteApiService }, { token: i2$1.ContextService }, { token: i4$1.RuntimeContextService }, { token: i4$1.RuntimeService }, { token: i4$1.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1341
+ LegacyProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4$1.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
1150
1342
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductComponent, decorators: [{
1151
1343
  type: Component,
1152
1344
  args: [{
1153
1345
  templateUrl: './legacy-product.component.html',
1154
1346
  styleUrls: ['./legacy-product.component.scss'],
1155
1347
  }]
1156
- }], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i2$1.QuoteDraftService }, { type: i1$2.QuoteApiService }, { type: i2$1.ContextService }, { type: i4$2.RuntimeContextService }, { type: i4$2.RuntimeService }, { type: i4$2.CurrentStateService }, { type: undefined, decorators: [{
1348
+ }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i2$1.QuoteDraftService }, { type: i2$2.QuoteApiService }, { type: i2$1.ContextService }, { type: i4$1.RuntimeContextService }, { type: i4$1.RuntimeService }, { type: i4$1.CurrentStateService }, { type: undefined, decorators: [{
1157
1349
  type: Optional
1158
1350
  }, {
1159
1351
  type: Inject,
@@ -1186,7 +1378,7 @@ class ProductComponent {
1186
1378
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1187
1379
  }
1188
1380
  ngOnInit() {
1189
- this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil(this.destroy$)).subscribe(quote => this.init(quote));
1381
+ this.quoteDraftService.quoteDraft$.pipe(first(), takeUntil(this.destroy$)).subscribe(quote => this.init(quote));
1190
1382
  }
1191
1383
  ngOnDestroy() {
1192
1384
  this.destroy$.next();
@@ -1241,8 +1433,8 @@ class ProductComponent {
1241
1433
  return quote.initialState.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
1242
1434
  }
1243
1435
  }
1244
- ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductComponent, deps: [{ token: i2$1.ContextService }, { token: i2$1.ConfigurationRuntimeService }, { token: i2$1.ConfigurationService }, { token: i2$1.QuoteDraftService }, { token: i2$2.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1245
- ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1436
+ ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductComponent, deps: [{ token: i2$1.ContextService }, { token: i2$1.ConfigurationRuntimeService }, { token: i2$1.ConfigurationService }, { token: i2$1.QuoteDraftService }, { token: i2$3.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1437
+ ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1246
1438
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductComponent, decorators: [{
1247
1439
  type: Component,
1248
1440
  args: [{
@@ -1251,7 +1443,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1251
1443
  styleUrls: ['./product.component.scss'],
1252
1444
  changeDetection: ChangeDetectionStrategy.OnPush,
1253
1445
  }]
1254
- }], ctorParameters: function () { return [{ type: i2$1.ContextService }, { type: i2$1.ConfigurationRuntimeService }, { type: i2$1.ConfigurationService }, { type: i2$1.QuoteDraftService }, { type: i2$2.MessageService }, { type: undefined, decorators: [{
1446
+ }], ctorParameters: function () { return [{ type: i2$1.ContextService }, { type: i2$1.ConfigurationRuntimeService }, { type: i2$1.ConfigurationService }, { type: i2$1.QuoteDraftService }, { type: i2$3.MessageService }, { type: undefined, decorators: [{
1255
1447
  type: Optional
1256
1448
  }, {
1257
1449
  type: Inject,
@@ -1285,8 +1477,8 @@ class RecordNotFoundComponent {
1285
1477
  }
1286
1478
  }
1287
1479
  }
1288
- RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1289
- RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1480
+ RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1481
+ RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, 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: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1290
1482
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
1291
1483
  type: Component,
1292
1484
  args: [{
@@ -1295,13 +1487,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1295
1487
  styleUrls: ['./record-not-found.component.scss'],
1296
1488
  changeDetection: ChangeDetectionStrategy.OnPush,
1297
1489
  }]
1298
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }]; } });
1490
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
1299
1491
 
1300
1492
  const routes = [{ path: '', component: RecordNotFoundComponent }];
1301
1493
  class RecordNotFoundModule {
1302
1494
  }
1303
1495
  RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1304
- RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$1.RouterModule] });
1496
+ RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
1305
1497
  RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, imports: [[CommonModule, RouterModule.forChild(routes)]] });
1306
1498
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, decorators: [{
1307
1499
  type: NgModule,
@@ -1400,8 +1592,8 @@ class ShoppingCartComponent {
1400
1592
  }));
1401
1593
  }
1402
1594
  }
1403
- ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$2.UITemplatesApiService }, { token: i2$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1404
- ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1595
+ ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i2$2.UITemplatesApiService }, { token: i2$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1596
+ ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1405
1597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ShoppingCartComponent, decorators: [{
1406
1598
  type: Component,
1407
1599
  args: [{
@@ -1410,7 +1602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1410
1602
  styleUrls: ['./shopping-cart.component.scss'],
1411
1603
  changeDetection: ChangeDetectionStrategy.OnPush,
1412
1604
  }]
1413
- }], ctorParameters: function () { return [{ type: i1$2.UITemplatesApiService }, { type: i2$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
1605
+ }], ctorParameters: function () { return [{ type: i2$2.UITemplatesApiService }, { type: i2$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3.ToastService }, { type: undefined, decorators: [{
1414
1606
  type: Optional
1415
1607
  }, {
1416
1608
  type: Inject,
@@ -1479,11 +1671,11 @@ class FlowResolver {
1479
1671
  }));
1480
1672
  }
1481
1673
  }
1482
- FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver, deps: [{ token: i1$1.Router }, { token: i1$2.FlowsApiService }, { token: FlowRouterService }, { token: i2$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
1674
+ FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: i2$2.FlowsApiService }, { token: FlowRouterService }, { token: i2$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
1483
1675
  FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver });
1484
1676
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver, decorators: [{
1485
1677
  type: Injectable
1486
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$2.FlowsApiService }, { type: FlowRouterService }, { type: i2$1.ContextService }]; } });
1678
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2$2.FlowsApiService }, { type: FlowRouterService }, { type: i2$1.ContextService }]; } });
1487
1679
 
1488
1680
  class QuoteResolver {
1489
1681
  constructor(router, quoteDraftService, routerService, contextService, flowConfiguration) {
@@ -1504,17 +1696,17 @@ class QuoteResolver {
1504
1696
  return of(true);
1505
1697
  }
1506
1698
  const { queryParams } = route;
1507
- return this.quoteDraftService.init(headerId, queryParams).pipe(catchError(e => {
1699
+ return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.flowConfiguration.calculate$()), tap(() => (this.quoteDraftService.isInitialized = true)), catchError(e => {
1508
1700
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
1509
1701
  return this.handleError(route, message);
1510
1702
  }));
1511
1703
  }
1512
1704
  }
1513
- QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$1.Router }, { token: i2$1.QuoteDraftService }, { token: FlowRouterService }, { token: i2$1.ContextService }, { token: i2$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
1705
+ QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i2$1.QuoteDraftService }, { token: FlowRouterService }, { token: i2$1.ContextService }, { token: i2$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
1514
1706
  QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver });
1515
1707
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver, decorators: [{
1516
1708
  type: Injectable
1517
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i2$1.QuoteDraftService }, { type: FlowRouterService }, { type: i2$1.ContextService }, { type: i2$1.FlowConfigurationService }]; } });
1709
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2$1.QuoteDraftService }, { type: FlowRouterService }, { type: i2$1.ContextService }, { type: i2$1.FlowConfigurationService }]; } });
1518
1710
 
1519
1711
  const rootRoute = {
1520
1712
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -1580,7 +1772,7 @@ const rootRoute = {
1580
1772
  class FlowRoutingModule {
1581
1773
  }
1582
1774
  FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1583
- FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, imports: [i1$1.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], exports: [RouterModule] });
1775
+ FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], exports: [RouterModule] });
1584
1776
  FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [[RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], RouterModule] });
1585
1777
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, decorators: [{
1586
1778
  type: NgModule,
@@ -1601,8 +1793,9 @@ FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12
1601
1793
  LoaderModule,
1602
1794
  FlowHeaderModule,
1603
1795
  FlowDialogModule,
1604
- SdkCoreModule] });
1605
- FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService], imports: [[
1796
+ SdkCoreModule,
1797
+ DocGenModule] });
1798
+ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowDocGenService], imports: [[
1606
1799
  CommonModule,
1607
1800
  FlowRoutingModule,
1608
1801
  ApiModule,
@@ -1611,6 +1804,7 @@ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12
1611
1804
  FlowHeaderModule,
1612
1805
  FlowDialogModule,
1613
1806
  SdkCoreModule,
1807
+ DocGenModule,
1614
1808
  ]] });
1615
1809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowModule, decorators: [{
1616
1810
  type: NgModule,
@@ -1625,8 +1819,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1625
1819
  FlowHeaderModule,
1626
1820
  FlowDialogModule,
1627
1821
  SdkCoreModule,
1822
+ DocGenModule,
1628
1823
  ],
1629
- providers: [FlowService, FlowDialogService],
1824
+ providers: [FlowService, FlowDialogService, FlowDocGenService],
1630
1825
  }]
1631
1826
  }] });
1632
1827