@veloceapps/sdk 8.0.0-99 → 9.0.0-0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/cms/README.md +0 -20
  2. package/cms/cms.actions.d.ts +9 -1
  3. package/cms/components/preview/preview.component.d.ts +2 -3
  4. package/cms/components/preview/preview.types.d.ts +4 -0
  5. package/cms/index.d.ts +1 -0
  6. package/cms/modules/runtime/services/runtime.service.d.ts +1 -1
  7. package/cms/services/index.d.ts +0 -1
  8. package/cms/services/resources.service.d.ts +2 -0
  9. package/cms/types/index.d.ts +0 -1
  10. package/cms/utils/element-metadata-worker.d.ts +11 -0
  11. package/cms/utils/elements-resolver.d.ts +0 -2
  12. package/cms/utils/index.d.ts +3 -0
  13. package/cms/utils/transpilation-worker.d.ts +13 -0
  14. package/cms/vendor-map.d.ts +21 -18
  15. package/core/README.md +20 -0
  16. package/core/modules/configuration/configuration.module.d.ts +2 -1
  17. package/core/modules/configuration/helpers.d.ts +2 -1
  18. package/core/modules/configuration/index.d.ts +1 -1
  19. package/core/modules/configuration/services/configuration-state.service.d.ts +54 -0
  20. package/core/modules/configuration/services/configuration.service.d.ts +6 -6
  21. package/core/modules/configuration/types/configuration.types.d.ts +4 -0
  22. package/core/modules/flow-configuration/flow-configuration.module.d.ts +2 -1
  23. package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +5 -0
  24. package/core/services/context.service.d.ts +2 -0
  25. package/core/services/flow-info.service.d.ts +29 -0
  26. package/core/services/flow-state-configuration.service.d.ts +19 -0
  27. package/core/services/flow-state.service.d.ts +80 -0
  28. package/core/services/index.d.ts +4 -1
  29. package/core/services/quote-draft.service.d.ts +12 -28
  30. package/core/types/flow-customization.types.d.ts +22 -0
  31. package/core/types/flow-state.types.d.ts +11 -0
  32. package/core/types/index.d.ts +3 -1
  33. package/{cms → core}/types/integration.types.d.ts +0 -1
  34. package/core/utils/line-item.utils.d.ts +1 -3
  35. package/esm2020/cms/cms.actions.mjs +11 -1
  36. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
  37. package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
  38. package/esm2020/cms/components/preview/preview.component.mjs +10 -10
  39. package/esm2020/cms/components/preview/preview.module.mjs +2 -2
  40. package/esm2020/cms/components/preview/preview.types.mjs +1 -1
  41. package/esm2020/cms/index.mjs +2 -1
  42. package/esm2020/cms/launcher.module.mjs +4 -4
  43. package/esm2020/cms/modules/migrations/migrations.mjs +2 -2
  44. package/esm2020/cms/modules/migrations/services/migrations.service.mjs +6 -2
  45. package/esm2020/cms/modules/runtime/services/compilation.service.mjs +8 -8
  46. package/esm2020/cms/modules/runtime/services/runtime.service.mjs +4 -4
  47. package/esm2020/cms/plugins/configuration.plugin.mjs +8 -4
  48. package/esm2020/cms/services/index.mjs +1 -2
  49. package/esm2020/cms/services/io-provider.service.mjs +10 -9
  50. package/esm2020/cms/services/resources.service.mjs +10 -6
  51. package/esm2020/cms/services/templates.service.mjs +10 -9
  52. package/esm2020/cms/types/index.mjs +1 -2
  53. package/esm2020/cms/utils/element-metadata-worker.mjs +31 -0
  54. package/esm2020/cms/utils/elements-resolver.mjs +13 -27
  55. package/esm2020/cms/utils/encoding.utils.mjs +3 -2
  56. package/esm2020/cms/utils/index.mjs +4 -1
  57. package/esm2020/cms/utils/path.utils.mjs +3 -3
  58. package/esm2020/cms/utils/script.utils.mjs +19 -15
  59. package/esm2020/cms/utils/transpilation-worker.mjs +52 -0
  60. package/esm2020/cms/vendor-map.mjs +10 -5
  61. package/esm2020/core/core.module.mjs +19 -3
  62. package/esm2020/core/modules/configuration/configuration.module.mjs +7 -23
  63. package/esm2020/core/modules/configuration/helpers.mjs +21 -1
  64. package/esm2020/core/modules/configuration/index.mjs +2 -2
  65. package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +335 -0
  66. package/esm2020/core/modules/configuration/services/configuration.service.mjs +56 -50
  67. package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
  68. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +6 -6
  69. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +12 -9
  70. package/esm2020/core/services/context.service.mjs +17 -5
  71. package/esm2020/core/services/flow-info.service.mjs +99 -0
  72. package/esm2020/core/services/flow-state-configuration.service.mjs +53 -0
  73. package/esm2020/core/services/flow-state.service.mjs +512 -0
  74. package/esm2020/core/services/index.mjs +5 -2
  75. package/esm2020/core/services/integration.state.mjs +36 -0
  76. package/esm2020/core/services/product-images.service.mjs +4 -5
  77. package/esm2020/core/services/quote-draft.service.mjs +39 -91
  78. package/esm2020/core/services/runtime-settings.service.mjs +7 -5
  79. package/esm2020/core/types/flow-customization.types.mjs +3 -0
  80. package/esm2020/core/types/flow-state.types.mjs +2 -0
  81. package/esm2020/core/types/index.mjs +4 -2
  82. package/esm2020/core/types/integration.types.mjs +2 -0
  83. package/esm2020/core/utils/line-item.utils.mjs +33 -32
  84. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +44 -51
  85. package/esm2020/src/components/flow-header/flow-header.component.mjs +36 -47
  86. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +35 -46
  87. package/esm2020/src/flow-routing.module.mjs +5 -18
  88. package/esm2020/src/flow.component.mjs +22 -37
  89. package/esm2020/src/guards/context.guard.mjs +6 -11
  90. package/esm2020/src/guards/flow.guard.mjs +23 -9
  91. package/esm2020/src/pages/assets/assets.component.mjs +30 -34
  92. package/esm2020/src/pages/catalog/catalog.component.mjs +30 -34
  93. package/esm2020/src/pages/debug/debug.component.mjs +2 -2
  94. package/esm2020/src/pages/product/product.component.mjs +34 -20
  95. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +6 -3
  96. package/esm2020/src/pages/remote/remote.component.mjs +15 -14
  97. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +31 -35
  98. package/esm2020/src/resolvers/flow.resolver.mjs +37 -55
  99. package/esm2020/src/resolvers/quote.resolver.mjs +55 -67
  100. package/esm2020/src/services/doc-gen.service.mjs +4 -3
  101. package/esm2020/src/services/flow-dialog.service.mjs +17 -6
  102. package/esm2020/src/services/flow-router.service.mjs +42 -15
  103. package/esm2020/src/services/flow.service.mjs +67 -52
  104. package/esm2020/src/services/guided-selling.service.mjs +5 -4
  105. package/esm2020/src/types/index.mjs +1 -2
  106. package/fesm2015/veloceapps-sdk-cms.mjs +270 -191
  107. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  108. package/fesm2015/veloceapps-sdk-core.mjs +1195 -427
  109. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  110. package/fesm2015/veloceapps-sdk.mjs +776 -826
  111. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  112. package/fesm2020/veloceapps-sdk-cms.mjs +275 -206
  113. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  114. package/fesm2020/veloceapps-sdk-core.mjs +1176 -454
  115. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  116. package/fesm2020/veloceapps-sdk.mjs +899 -945
  117. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  118. package/package.json +8 -7
  119. package/src/components/doc-gen/doc-gen.component.d.ts +7 -10
  120. package/src/components/flow-header/flow-header.component.d.ts +6 -9
  121. package/src/components/guided-selling/guided-selling.component.d.ts +6 -9
  122. package/src/flow-routing.module.d.ts +1 -2
  123. package/src/flow.component.d.ts +7 -12
  124. package/src/guards/context.guard.d.ts +0 -1
  125. package/src/guards/flow.guard.d.ts +1 -1
  126. package/src/pages/assets/assets.component.d.ts +5 -7
  127. package/src/pages/catalog/catalog.component.d.ts +5 -7
  128. package/src/pages/product/product.component.d.ts +8 -7
  129. package/src/pages/record-not-found/record-not-found.component.d.ts +2 -0
  130. package/src/pages/remote/remote.component.d.ts +2 -3
  131. package/src/pages/shopping-cart/shopping-cart.component.d.ts +5 -7
  132. package/src/resolvers/flow.resolver.d.ts +6 -9
  133. package/src/resolvers/quote.resolver.d.ts +7 -14
  134. package/src/services/doc-gen.service.d.ts +1 -1
  135. package/src/services/flow-dialog.service.d.ts +4 -2
  136. package/src/services/flow-router.service.d.ts +6 -3
  137. package/src/services/flow.service.d.ts +10 -14
  138. package/src/services/guided-selling.service.d.ts +1 -1
  139. package/src/types/index.d.ts +0 -1
  140. package/core/modules/configuration/services/configuration.state.d.ts +0 -30
  141. package/core/services/metric-calculation/metric-calculation.service.d.ts +0 -25
  142. package/core/services/metric-calculation/metric-calculation.types.d.ts +0 -1
  143. package/core/services/metric-calculation/metric-calculation.utils.d.ts +0 -5
  144. package/esm2020/cms/services/integration.state.mjs +0 -37
  145. package/esm2020/cms/types/integration.types.mjs +0 -2
  146. package/esm2020/core/modules/configuration/services/configuration.state.mjs +0 -142
  147. package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +0 -85
  148. package/esm2020/core/services/metric-calculation/metric-calculation.types.mjs +0 -2
  149. package/esm2020/core/services/metric-calculation/metric-calculation.utils.mjs +0 -42
  150. package/esm2020/src/pages/empty-account/empty-account.component.mjs +0 -12
  151. package/esm2020/src/pages/empty-account/empty-account.module.mjs +0 -20
  152. package/esm2020/src/types/flow-customization.types.mjs +0 -3
  153. package/src/pages/empty-account/empty-account.component.d.ts +0 -5
  154. package/src/pages/empty-account/empty-account.module.d.ts +0 -10
  155. package/src/types/flow-customization.types.d.ts +0 -12
  156. /package/{cms → core}/services/integration.state.d.ts +0 -0
@@ -1,32 +1,32 @@
1
1
  import * as i4 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy, NgModule, Injectable, InjectionToken, Optional, Inject, inject } from '@angular/core';
5
- import * as i1$4 from '@veloceapps/api';
4
+ import { Component, ChangeDetectionStrategy, NgModule, Optional, Inject, Injectable, inject } from '@angular/core';
5
+ import * as i1$1 from '@veloceapps/api';
6
6
  import { ApiModule } from '@veloceapps/api';
7
- import * as i2 from '@veloceapps/components';
8
- import { ToastType, LoaderModule, EmptyStateModule, LetDirectiveModule } from '@veloceapps/components';
9
- import * as i1$3 from '@veloceapps/sdk/cms';
10
- import { FlowAction, extractElementMetadata, extendElementMetadata, PreviewModule, LauncherModule } from '@veloceapps/sdk/cms';
11
- import * as i1$2 from '@veloceapps/sdk/core';
12
- import { ContextService, QuoteDraftService, ConfigurationService, generateModifiedAssetsMap, SdkCoreModule } from '@veloceapps/sdk/core';
7
+ import * as i2$1 from '@veloceapps/components';
8
+ import { ToastType, LoaderModule, LetDirectiveModule } from '@veloceapps/components';
9
+ import * as i5 from '@veloceapps/sdk/cms';
10
+ import { extractElementMetadata, extendElementMetadata, btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
11
+ import * as i2 from '@veloceapps/sdk/core';
12
+ import { FLOW_CUSTOMIZATION, ContextService, FlowStateService, FlowInfoService, QuoteDraftService, ConfigurationService, IntegrationState, SdkCoreModule } from '@veloceapps/sdk/core';
13
13
  import * as i3 from 'primeng/button';
14
14
  import { ButtonModule } from 'primeng/button';
15
15
  import * as i1 from 'primeng/dynamicdialog';
16
- import { SalesforceIdUtils, UITemplateType, ConfigurationContextMode, UITemplateComponentType, UUID } from '@veloceapps/core';
17
- import { map, filter, shareReplay, startWith, distinctUntilChanged, BehaviorSubject, Subject, tap, takeUntil, switchMap, take, of, first, catchError, forkJoin, combineLatest, from, throwError } from 'rxjs';
18
- import * as i1$1 from '@angular/router';
16
+ import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
17
+ import * as i1$2 from '@angular/router';
19
18
  import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
19
+ import { mapShoppingCartSettings, getMaxRenewalTermsValue, UITemplateType, SalesforceIdUtils, ConfigurationContextMode, isVeloceError, extractErrorDetails, UUID } from '@veloceapps/core';
20
20
  import { HttpErrorResponse, HttpParams } from '@angular/common/http';
21
- import * as i5 from '@angular/forms';
21
+ import * as i5$1 from '@angular/forms';
22
22
  import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
23
23
  import { DropdownModule } from 'primeng/dropdown';
24
24
  import * as i8 from 'primeng/inputtext';
25
25
  import { InputTextModule } from 'primeng/inputtext';
26
26
  import * as i6 from 'primeng/radiobutton';
27
27
  import { RadioButtonModule } from 'primeng/radiobutton';
28
- import * as i2$1 from 'primeng/api';
29
- import { map as map$1 } from 'rxjs/operators';
28
+ import * as i2$2 from 'primeng/api';
29
+ import { catchError as catchError$1 } from 'rxjs/operators';
30
30
  import { DomHandler } from 'primeng/dom';
31
31
 
32
32
  const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
@@ -75,12 +75,495 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
75
75
  }]
76
76
  }] });
77
77
 
78
+ class DocGenComponent {
79
+ constructor(templatesApi, contextService, flowStateService, flowInfo, toastService, customizationService) {
80
+ this.templatesApi = templatesApi;
81
+ this.contextService = contextService;
82
+ this.flowStateService = flowStateService;
83
+ this.flowInfo = flowInfo;
84
+ this.toastService = toastService;
85
+ this.customizationService = customizationService;
86
+ this.uiDefinition$ = new BehaviorSubject(null);
87
+ this.templateApiName = '';
88
+ this.destroy$ = new Subject();
89
+ // wait until flow is initialized
90
+ this.flowStateService
91
+ .isInitialized$()
92
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
93
+ .subscribe();
94
+ }
95
+ ngOnDestroy() {
96
+ this.destroy$.next();
97
+ this.destroy$.complete();
98
+ }
99
+ initialize() {
100
+ this.templateApiName = this.flowInfo.flow?.properties.templates?.docGen ?? '';
101
+ this.generateUIDefinition$()
102
+ .pipe(tap(uiDef => {
103
+ if (!uiDef) {
104
+ throw new Error(`Component with name '${this.templateApiName}' not found.`);
105
+ }
106
+ this.uiDefinition$.next(uiDef);
107
+ }), catchError(err => {
108
+ const message = 'Failed to resolve DocGen component. ' + (err.message ?? '');
109
+ this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
110
+ return of();
111
+ }), takeUntil(this.destroy$))
112
+ .subscribe();
113
+ }
114
+ getLocalMeta$() {
115
+ if (!this.customizationService?.getTemplateComponents) {
116
+ return of(undefined);
117
+ }
118
+ return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
119
+ if (!components) {
120
+ return;
121
+ }
122
+ return components.map(component => ({
123
+ html: component.html,
124
+ css: component.css,
125
+ js: component.js,
126
+ json: component.json,
127
+ }));
128
+ }));
129
+ }
130
+ getOrgMeta$() {
131
+ const template = this.flowInfo.templates.DOCGEN;
132
+ if (!template) {
133
+ return of(undefined);
134
+ }
135
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
136
+ }
137
+ generateUIDefinition$() {
138
+ return of(undefined).pipe(tap(() => {
139
+ if (!this.templateApiName) {
140
+ throw new Error("Flow 'docGen' template is not defined.");
141
+ }
142
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
143
+ if (!metaList) {
144
+ return;
145
+ }
146
+ const headerId = this.contextService.resolve().properties.Id ?? null;
147
+ const patchedMetaList = metaList.map(component => {
148
+ if (!component.js) {
149
+ return component;
150
+ }
151
+ const metadata = extractElementMetadata(component.js);
152
+ const script = extendElementMetadata(component.js, {
153
+ inputs: {
154
+ ...metadata.inputs,
155
+ Id: headerId ? `"${headerId}"` : null,
156
+ },
157
+ });
158
+ return {
159
+ ...component,
160
+ js: script,
161
+ };
162
+ });
163
+ const uiDef = {
164
+ name: '',
165
+ createdTimestamp: 0,
166
+ primary: true,
167
+ type: 'DEFAULT',
168
+ version: 2,
169
+ children: patchedMetaList.map(child => ({
170
+ children: [],
171
+ template: child.html && btoaSafe(child.html),
172
+ script: child.js && btoaSafe(child.js),
173
+ styles: child.css && btoaSafe(child.css),
174
+ })),
175
+ };
176
+ return uiDef;
177
+ }));
178
+ }
179
+ }
180
+ DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.ContextService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
181
+ DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
183
+ type: Component,
184
+ args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
185
+ }], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.ContextService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
186
+ type: Optional
187
+ }, {
188
+ type: Inject,
189
+ args: [FLOW_CUSTOMIZATION]
190
+ }] }]; } });
191
+
192
+ class DocGenModule {
193
+ }
194
+ DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
195
+ DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
196
+ DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
198
+ type: NgModule,
199
+ args: [{
200
+ declarations: [DocGenComponent],
201
+ imports: [CommonModule, PreviewModule],
202
+ exports: [DocGenComponent],
203
+ }]
204
+ }] });
205
+
206
+ class GuidedSellingComponent {
207
+ constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
208
+ this.templatesApi = templatesApi;
209
+ this.flowStateService = flowStateService;
210
+ this.flowInfo = flowInfo;
211
+ this.toastService = toastService;
212
+ this.customizationService = customizationService;
213
+ this.uiDefinition$ = new BehaviorSubject(null);
214
+ this.templateApiName = '';
215
+ this.destroy$ = new Subject();
216
+ // wait until flow is initialized
217
+ this.flowStateService
218
+ .isInitialized$()
219
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
220
+ .subscribe();
221
+ }
222
+ ngOnDestroy() {
223
+ this.destroy$.next();
224
+ this.destroy$.complete();
225
+ }
226
+ initialize() {
227
+ this.templateApiName = this.flowInfo.flow?.properties.templates?.guidedSelling ?? '';
228
+ this.generateUIDefinition$()
229
+ .pipe(tap(uiDef => {
230
+ if (!uiDef) {
231
+ throw new Error(`Component with name '${this.templateApiName}' not found.`);
232
+ }
233
+ this.uiDefinition$.next(uiDef);
234
+ }), catchError(err => {
235
+ const message = 'Failed to resolve Guided Selling component. ' + (err.message ?? '');
236
+ this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
237
+ return of();
238
+ }), takeUntil(this.destroy$))
239
+ .subscribe();
240
+ }
241
+ getLocalMeta$() {
242
+ if (!this.customizationService?.getTemplateComponents) {
243
+ return of(undefined);
244
+ }
245
+ return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
246
+ if (!components) {
247
+ return;
248
+ }
249
+ return components.map(component => ({
250
+ html: component.html,
251
+ css: component.css,
252
+ js: component.js,
253
+ json: component.json,
254
+ }));
255
+ }));
256
+ }
257
+ getOrgMeta$() {
258
+ const template = this.flowInfo.templates.GUIDED_SELLING;
259
+ if (!template) {
260
+ return of(undefined);
261
+ }
262
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
263
+ }
264
+ generateUIDefinition$() {
265
+ return of(undefined).pipe(tap(() => {
266
+ if (!this.templateApiName) {
267
+ throw new Error("Flow 'guidedSelling' template is not defined.");
268
+ }
269
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
270
+ if (!metaList) {
271
+ return;
272
+ }
273
+ const uiDef = {
274
+ name: '',
275
+ createdTimestamp: 0,
276
+ primary: true,
277
+ type: 'DEFAULT',
278
+ version: 2,
279
+ children: metaList.map(meta => ({
280
+ children: [],
281
+ template: meta.html && btoaSafe(meta.html),
282
+ script: meta.js && btoaSafe(meta.js),
283
+ styles: meta.css && btoaSafe(meta.css),
284
+ })),
285
+ };
286
+ return uiDef;
287
+ }));
288
+ }
289
+ }
290
+ GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
291
+ GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
293
+ type: Component,
294
+ args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
295
+ }], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
296
+ type: Optional
297
+ }, {
298
+ type: Inject,
299
+ args: [FLOW_CUSTOMIZATION]
300
+ }] }]; } });
301
+
302
+ class GuidedSellingModule {
303
+ }
304
+ GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
305
+ GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
306
+ GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, decorators: [{
308
+ type: NgModule,
309
+ args: [{
310
+ declarations: [GuidedSellingComponent],
311
+ imports: [CommonModule, PreviewModule],
312
+ exports: [GuidedSellingComponent],
313
+ }]
314
+ }] });
315
+
316
+ class FlowHeaderComponent {
317
+ constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
318
+ this.templatesApi = templatesApi;
319
+ this.flowStateService = flowStateService;
320
+ this.flowInfo = flowInfo;
321
+ this.toastService = toastService;
322
+ this.customizationService = customizationService;
323
+ this.uiDefinition$ = new BehaviorSubject(null);
324
+ this.templateApiName = '';
325
+ this.destroy$ = new Subject();
326
+ // wait until flow is initialized
327
+ this.flowStateService
328
+ .isInitialized$()
329
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
330
+ .subscribe();
331
+ }
332
+ ngOnDestroy() {
333
+ this.destroy$.next();
334
+ this.destroy$.complete();
335
+ }
336
+ initialize() {
337
+ this.templateApiName = this.flowInfo.flow?.properties.templates?.flowHeader ?? '';
338
+ this.generateUIDefinition$()
339
+ .pipe(tap(uiDef => {
340
+ if (!uiDef) {
341
+ throw new Error(`Component with name '${this.templateApiName}' not found.`);
342
+ }
343
+ this.uiDefinition$.next(uiDef);
344
+ }), catchError(err => {
345
+ const message = 'Failed to resolve Flow Header component. ' + (err.message ?? '');
346
+ this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
347
+ return of();
348
+ }), takeUntil(this.destroy$))
349
+ .subscribe();
350
+ }
351
+ getLocalMeta$() {
352
+ if (!this.customizationService?.getTemplateComponents) {
353
+ return of(undefined);
354
+ }
355
+ return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
356
+ if (!components) {
357
+ return;
358
+ }
359
+ return components.map(component => ({
360
+ html: component.html,
361
+ css: component.css,
362
+ js: component.js,
363
+ json: component.json,
364
+ }));
365
+ }));
366
+ }
367
+ getOrgMeta$() {
368
+ const template = this.flowInfo.templates.FLOW_HEADER;
369
+ if (!template) {
370
+ return of(undefined);
371
+ }
372
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
373
+ }
374
+ generateUIDefinition$() {
375
+ return of(undefined).pipe(tap(() => {
376
+ if (!this.templateApiName) {
377
+ throw new Error("Flow 'flowHeader' template is not defined.");
378
+ }
379
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
380
+ if (!metaList) {
381
+ return;
382
+ }
383
+ const uiDef = {
384
+ name: '',
385
+ createdTimestamp: 0,
386
+ primary: true,
387
+ type: 'DEFAULT',
388
+ version: 2,
389
+ children: metaList.map(meta => ({
390
+ children: [],
391
+ template: meta.html && btoaSafe(meta.html),
392
+ script: meta.js && btoaSafe(meta.js),
393
+ styles: meta.css && btoaSafe(meta.css),
394
+ })),
395
+ };
396
+ return uiDef;
397
+ }));
398
+ }
399
+ }
400
+ FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
401
+ FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowHeaderComponent, selector: "vl-flow-new-header", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
403
+ type: Component,
404
+ args: [{ selector: 'vl-flow-new-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
405
+ }], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
406
+ type: Optional
407
+ }, {
408
+ type: Inject,
409
+ args: [FLOW_CUSTOMIZATION]
410
+ }] }]; } });
411
+
412
+ class FlowNewHeaderModule {
413
+ }
414
+ FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
415
+ FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
416
+ FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
418
+ type: NgModule,
419
+ args: [{
420
+ declarations: [FlowHeaderComponent],
421
+ imports: [CommonModule, PreviewModule],
422
+ exports: [FlowHeaderComponent],
423
+ }]
424
+ }] });
425
+
426
+ class FlowDialogService {
427
+ constructor(dialogService, contextService, runtimeSettings) {
428
+ this.dialogService = dialogService;
429
+ this.contextService = contextService;
430
+ this.runtimeSettings = runtimeSettings;
431
+ }
432
+ show(config) {
433
+ return this.dialogService.open(FlowDialogComponent, {
434
+ dismissableMask: true,
435
+ closeOnEscape: true,
436
+ closable: true,
437
+ showHeader: false,
438
+ width: '320px',
439
+ data: { config },
440
+ styleClass: 'flow-dialog',
441
+ }).onClose;
442
+ }
443
+ showEmptyCartDialog() {
444
+ return this.show({
445
+ title: 'No Products in Quote',
446
+ description: 'There are no products in your Quote. To save a Quote, add at least one product.',
447
+ primaryButton: 'Ok',
448
+ });
449
+ }
450
+ showReadonlyModeDialog() {
451
+ const ctx = this.contextService.resolve();
452
+ const objectName = ctx.mode ? ctx.mode[0]?.toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
453
+ return this.show({
454
+ title: 'Error',
455
+ description: `${objectName} Cannot be Saved`,
456
+ primaryButton: 'Ok',
457
+ });
458
+ }
459
+ showQuoteReadonlyModeDialog() {
460
+ return this.show({
461
+ title: 'Quote Cannot be Saved',
462
+ description: 'It is only possible to save quotes with the “Draft” status. Please create a new quote to make and save changes.',
463
+ primaryButton: 'Ok',
464
+ });
465
+ }
466
+ showQuoteOutsideShoppingCartDialog() {
467
+ return this.show({
468
+ title: 'Quote Cannot be Saved',
469
+ description: 'It is only possible to save quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
470
+ primaryButton: 'Ok',
471
+ });
472
+ }
473
+ showAccountNoChangesDialog() {
474
+ return this.show({
475
+ title: 'No Changes to Save',
476
+ description: 'There are no changes since the last update. Please make changes to proceed.',
477
+ primaryButton: 'Ok',
478
+ });
479
+ }
480
+ showUnsavedChangesDialog() {
481
+ return this.show({
482
+ title: 'Unsaved Changes',
483
+ description: 'Are you sure you want to leave this page and discard your unsaved changes?',
484
+ primaryButton: 'Keep Editing',
485
+ secondaryButton: 'Discard Changes',
486
+ oppositeButtonActions: true,
487
+ });
488
+ }
489
+ showReadonlyQuoteSubmitFailureDialog() {
490
+ return this.show({
491
+ title: 'Cannot Submit for Approval',
492
+ description: 'It is only possible to submit for approval quotes with the “Draft“ status. Please create a new quote to proceed.',
493
+ primaryButton: 'Ok',
494
+ });
495
+ }
496
+ showOutsideShoppingCartQuoteSubmitFailureDialog() {
497
+ return this.show({
498
+ title: 'Cannot Submit for Approval',
499
+ description: 'It is only possible to submit quotes for approval from the Shopping Cart. To proceed, go to the Shopping Cart.',
500
+ primaryButton: 'Ok',
501
+ });
502
+ }
503
+ showAccountSubmitFailureDialog() {
504
+ return this.show({
505
+ title: 'Save Changes',
506
+ description: 'To submit for approval, save the quote first, and then submit it for approval from the Shopping Cart.',
507
+ primaryButton: 'Ok',
508
+ });
509
+ }
510
+ showDocgenAccountUnsavedChangesDialog() {
511
+ return this.show({
512
+ title: 'Save Quote',
513
+ description: 'To generate a document, save the quote first, and then generate the document from the Shopping Cart.',
514
+ primaryButton: 'Ok',
515
+ });
516
+ }
517
+ showDocgenReadonlyDialog() {
518
+ return this.show({
519
+ title: 'Document Generation is not Available',
520
+ description: 'It is only possible to generate documents for quotes with the “Draft” status. Please create a new quote to generate a document.',
521
+ primaryButton: 'Ok',
522
+ });
523
+ }
524
+ showDocgenOutsideShoppingCartDialog() {
525
+ return this.show({
526
+ title: 'Document Generation is not Available',
527
+ description: 'It is only possible to generate documents for quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
528
+ primaryButton: 'Ok',
529
+ });
530
+ }
531
+ showDocgenUnsavedChangesDialog() {
532
+ return this.show({
533
+ title: 'Unsaved Changes',
534
+ description: 'To generate a document, save the quote first.',
535
+ primaryButton: 'Save and proceed',
536
+ secondaryButton: 'Cancel',
537
+ });
538
+ }
539
+ showTermsLimitReachedDialog() {
540
+ const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
541
+ const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
542
+ return this.show({
543
+ title: 'Terms Limit Reached',
544
+ description: `You have reached the term quantity limit: ${maxRenewalTerms}. You can increase the limit in the Shopping Cart Settings.`,
545
+ primaryButton: 'Ok',
546
+ });
547
+ }
548
+ showDialog(dialog) {
549
+ const dialogFunction = this[dialog].bind(this);
550
+ return dialogFunction(dialog);
551
+ }
552
+ }
553
+ FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
554
+ FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
556
+ type: Injectable
557
+ }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
558
+
78
559
  class FlowRouterService {
79
- constructor(router, route, contextService, integrationState) {
560
+ constructor(router, route, contextService, integrationState, flowInfoService, flowStateService) {
80
561
  this.router = router;
81
562
  this.route = route;
82
563
  this.contextService = contextService;
83
564
  this.integrationState = integrationState;
565
+ this.flowInfoService = flowInfoService;
566
+ this.flowStateService = flowStateService;
84
567
  this.urlHistory = [];
85
568
  this.getLastChildRoute = (route) => {
86
569
  return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;
@@ -153,6 +636,9 @@ class FlowRouterService {
153
636
  get params$() {
154
637
  return this.lastChildParams$;
155
638
  }
639
+ get params() {
640
+ return this.getLastChildParams(this.route.snapshot);
641
+ }
156
642
  isConfigurationRoute$() {
157
643
  return this.getFlowSubpath$().pipe(map(url => url.startsWith('product')));
158
644
  }
@@ -186,12 +672,27 @@ class FlowRouterService {
186
672
  }
187
673
  }
188
674
  navigateToProductConfiguration(productId, lineItemId) {
189
- this.contextService.update({ properties: { productId, lineItemId } });
190
- const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
191
- const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
192
- this.router.navigate([flowRouteUrl, 'product'], {
193
- queryParams: { ...routeSnapshot.queryParams, productId },
194
- });
675
+ let updateContext$;
676
+ if (this.flowInfoService.isLegacy) {
677
+ updateContext$ = of(undefined).pipe(tap(() => {
678
+ this.contextService.update({ properties: { productId, lineItemId: lineItemId ?? '' } });
679
+ }));
680
+ }
681
+ else {
682
+ updateContext$ = this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_CONTEXT_PROPERTIES', {
683
+ productId,
684
+ lineItemId: lineItemId ?? '',
685
+ });
686
+ }
687
+ updateContext$
688
+ .pipe(tap(() => {
689
+ const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
690
+ const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
691
+ this.router.navigate([flowRouteUrl, 'product'], {
692
+ queryParams: { ...routeSnapshot.queryParams, productId },
693
+ });
694
+ }))
695
+ .subscribe();
195
696
  }
196
697
  navigateToShoppingCart() {
197
698
  const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
@@ -208,6 +709,14 @@ class FlowRouterService {
208
709
  const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
209
710
  this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
210
711
  }
712
+ showErrorPage$(message, details) {
713
+ const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
714
+ const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
715
+ return from(this.router.navigate([flowRouteUrl, '404'], {
716
+ state: { message, type: 'error', ...(details && { details }) },
717
+ replaceUrl: true,
718
+ })).pipe(map(() => false));
719
+ }
211
720
  switchObject(id) {
212
721
  const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
213
722
  const route = this.getLastChildRoute(this.route);
@@ -220,170 +729,42 @@ class FlowRouterService {
220
729
  this.router.navigate([], { relativeTo: route, queryParams: { ...routeSnapshot.queryParams, ...queryParams } });
221
730
  }
222
731
  }
223
- FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i1$2.ContextService }, { token: i1$3.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
732
+ FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.IntegrationState }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
224
733
  FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
225
734
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
226
735
  type: Injectable,
227
736
  args: [{ providedIn: 'root' }]
228
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i1$2.ContextService }, { type: i1$3.IntegrationState }]; } });
229
-
230
- class FlowDialogService {
231
- constructor(dialogService, contextService) {
232
- this.dialogService = dialogService;
233
- this.contextService = contextService;
234
- }
235
- show(config) {
236
- return this.dialogService.open(FlowDialogComponent, {
237
- dismissableMask: true,
238
- closeOnEscape: true,
239
- closable: true,
240
- showHeader: false,
241
- width: '320px',
242
- data: { config },
243
- styleClass: 'flow-dialog',
244
- }).onClose;
245
- }
246
- showEmptyCartDialog() {
247
- return this.show({
248
- title: 'No Products in Quote',
249
- description: 'There are no products in your Quote. To save a Quote, add at least one product.',
250
- primaryButton: 'Ok',
251
- });
252
- }
253
- showReadonlyModeDialog() {
254
- const ctx = this.contextService.resolve();
255
- const objectName = ctx.mode ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
256
- return this.show({
257
- title: 'Error',
258
- description: `${objectName} Cannot be Saved`,
259
- primaryButton: 'Ok',
260
- });
261
- }
262
- showQuoteReadonlyModeDialog() {
263
- return this.show({
264
- title: 'Quote Cannot be Saved',
265
- description: 'It is only possible to save quotes with the “Draft” status. Please create a new quote to make and save changes.',
266
- primaryButton: 'Ok',
267
- });
268
- }
269
- showQuoteOutsideShoppingCartDialog() {
270
- return this.show({
271
- title: 'Quote Cannot be Saved',
272
- description: 'It is only possible to save quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
273
- primaryButton: 'Ok',
274
- });
275
- }
276
- showAccountNoChangesDialog() {
277
- return this.show({
278
- title: 'No Changes to Save',
279
- description: 'There are no changes since the last update. Please make changes to proceed.',
280
- primaryButton: 'Ok',
281
- });
282
- }
283
- showUnsavedChangesDialog() {
284
- return this.show({
285
- title: 'Unsaved Changes',
286
- description: 'Are you sure you want to leave this page and discard your unsaved changes?',
287
- primaryButton: 'Keep Editing',
288
- secondaryButton: 'Discard Changes',
289
- oppositeButtonActions: true,
290
- });
291
- }
292
- showReadonlyQuoteSubmitFailureDialog() {
293
- return this.show({
294
- title: 'Cannot Submit for Approval',
295
- description: 'It is only possible to submit for approval quotes with the “Draft“ status. Please create a new quote to proceed.',
296
- primaryButton: 'Ok',
297
- });
298
- }
299
- showOutsideShoppingCartQuoteSubmitFailureDialog() {
300
- return this.show({
301
- title: 'Cannot Submit for Approval',
302
- description: 'It is only possible to submit quotes for approval from the Shopping Cart. To proceed, go to the Shopping Cart.',
303
- primaryButton: 'Ok',
304
- });
305
- }
306
- showAccountSubmitFailureDialog() {
307
- return this.show({
308
- title: 'Save Changes',
309
- description: 'To submit for approval, save the quote first, and then submit it for approval from the Shopping Cart.',
310
- primaryButton: 'Ok',
311
- });
312
- }
313
- showDocgenAccountUnsavedChangesDialog() {
314
- return this.show({
315
- title: 'Save Quote',
316
- description: 'To generate a document, save the quote first, and then generate the document from the Shopping Cart.',
317
- primaryButton: 'Ok',
318
- });
319
- }
320
- showDocgenReadonlyDialog() {
321
- return this.show({
322
- title: 'Document Generation is not Available',
323
- description: 'It is only possible to generate documents for quotes with the “Draft” status. Please create a new quote to generate a document.',
324
- primaryButton: 'Ok',
325
- });
326
- }
327
- showDocgenOutsideShoppingCartDialog() {
328
- return this.show({
329
- title: 'Document Generation is not Available',
330
- description: 'It is only possible to generate documents for quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
331
- primaryButton: 'Ok',
332
- });
333
- }
334
- showDocgenUnsavedChangesDialog() {
335
- return this.show({
336
- title: 'Unsaved Changes',
337
- description: 'To generate a document, save the quote first.',
338
- primaryButton: 'Save and proceed',
339
- secondaryButton: 'Cancel',
340
- });
341
- }
342
- showDialog(dialog) {
343
- const dialogFunction = this[dialog].bind(this);
344
- return dialogFunction(dialog);
345
- }
346
- }
347
- FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i1$2.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
348
- FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
350
- type: Injectable
351
- }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i1$2.ContextService }]; } });
737
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
352
738
 
353
739
  class FlowService {
354
- get flow() {
355
- return this.flowSubj$.value;
356
- }
357
- constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService, flowsApiService, flowDialogService) {
740
+ constructor(integrationState, flowRouterService, quoteDraftService, configurationService, configurationStateService, flowDialogService, flowConfigurationService, flowInfoService, flowStateService) {
358
741
  this.integrationState = integrationState;
359
742
  this.flowRouterService = flowRouterService;
360
743
  this.quoteDraftService = quoteDraftService;
361
744
  this.configurationService = configurationService;
362
- this.flowConfigurationService = flowConfigurationService;
363
- this.flowsApiService = flowsApiService;
745
+ this.configurationStateService = configurationStateService;
364
746
  this.flowDialogService = flowDialogService;
365
- this.flowSubj$ = new BehaviorSubject(null);
366
- this.flow$ = this.flowSubj$.asObservable();
747
+ this.flowConfigurationService = flowConfigurationService;
748
+ this.flowInfoService = flowInfoService;
749
+ this.flowStateService = flowStateService;
367
750
  this.cleanup$ = new Subject();
368
751
  }
369
752
  cleanup() {
370
753
  this.cleanup$.next();
371
- this.flowSubj$.next(null);
372
- }
373
- setFlow(flow) {
374
- this.flowSubj$.next(flow ?? null);
375
- }
376
- setFlowById$(flowId) {
377
- return this.flowsApiService.getFlow(flowId).pipe(tap(flow => this.flowSubj$.next(flow ?? null)), map(flow => Boolean(flow)));
378
754
  }
379
755
  initSubscriptions() {
380
756
  this.integrationState
381
757
  .listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
382
- .pipe(tap(payload => {
383
- const productId = payload.productId ??
384
- this.quoteDraftService.currentState.find(li => li.id === payload.lineItemId)?.productId;
385
- if (productId) {
386
- this.flowRouterService.navigateToProductConfiguration(productId, payload.lineItemId);
758
+ .pipe(switchMap(payload => {
759
+ if (this.flowInfoService.isLegacy) {
760
+ const productId = payload.productId ??
761
+ this.quoteDraftService.currentState.find(li => li.id === payload.lineItemId)?.productId;
762
+ return of({ ...payload, productId });
763
+ }
764
+ return this.prepareConfiguration$(payload.lineItemId).pipe(map(() => payload));
765
+ }), tap(payload => {
766
+ if (payload.productId) {
767
+ this.flowRouterService.navigateToProductConfiguration(payload.productId, payload.lineItemId);
387
768
  }
388
769
  else {
389
770
  console.warn("Parameter 'productId' is needed to start configuration");
@@ -396,468 +777,95 @@ class FlowService {
396
777
  this.flowRouterService.switchObject(payload.id);
397
778
  }), takeUntil(this.cleanup$))
398
779
  .subscribe();
399
- this.integrationState
400
- .listen$(FlowAction.FLOW_NAVIGATE_BACK)
401
- .pipe(tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
402
- .subscribe();
403
- this.integrationState
404
- .listen$(FlowAction.FLOW_NAVIGATE_TO)
405
- .pipe(tap(payload => this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId)), takeUntil(this.cleanup$))
406
- .subscribe();
407
- this.integrationState
408
- .listen$(FlowAction.OPEN_DIALOG)
409
- .pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
410
- .subscribe(dialogResult => {
411
- this.integrationState.patchState({ dialogResult });
412
- });
413
- this.integrationState
414
- .listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
415
- .pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
416
- .subscribe();
417
- this.integrationState
418
- .listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
419
- .pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
420
- .subscribe();
421
- this.integrationState
422
- .listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
423
- .pipe(switchMap(() => {
424
- const quoteDraft = this.quoteDraftService.quoteDraft;
425
- const lineItem = this.configurationService.getSnapshot();
426
- if (!quoteDraft || !lineItem) {
427
- return of(undefined);
428
- }
429
- const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
430
- const assetId = lineItem.assetId || lineItem.openOrderLineItemId;
431
- let updatedState;
432
- if (isNewLineItem) {
433
- updatedState = [...quoteDraft.currentState, lineItem];
434
- }
435
- else {
436
- updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
437
- }
438
- return this.flowConfigurationService.calculate$({ ...quoteDraft, currentState: updatedState }).pipe(tap(() => {
439
- if (assetId) {
440
- const modifiedAssets = this.integrationState.state.modifiedAssets ?? {};
441
- this.integrationState.patchState({
442
- modifiedAssets: { ...modifiedAssets, [assetId]: true },
443
- });
444
- }
445
- }));
446
- }), tap(() => {
447
- this.configurationService.hasUnsavedChanges = false;
448
- this.flowRouterService.navigateToShoppingCart();
449
- }), takeUntil(this.cleanup$))
450
- .subscribe();
451
- this.updateFlowPath();
452
- }
453
- updateFlowPath() {
454
- this.flowRouterService
455
- .getFlowSubpath$()
456
- .pipe(map(path => path.split('/')?.[0]), takeUntil(this.cleanup$))
457
- .subscribe(flowPath => this.integrationState.patchState({ flowPath }));
458
- }
459
- }
460
- FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i1$3.IntegrationState }, { token: FlowRouterService }, { token: i1$2.QuoteDraftService }, { token: i1$2.ConfigurationService }, { token: i1$2.FlowConfigurationService }, { token: i1$4.FlowsApiService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
461
- FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
463
- type: Injectable
464
- }], ctorParameters: function () { return [{ type: i1$3.IntegrationState }, { type: FlowRouterService }, { type: i1$2.QuoteDraftService }, { type: i1$2.ConfigurationService }, { type: i1$2.FlowConfigurationService }, { type: i1$4.FlowsApiService }, { type: FlowDialogService }]; } });
465
-
466
- const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
467
-
468
- function btoaSafe(str) {
469
- if (!str) {
470
- return '';
471
- }
472
- try {
473
- const encoder = new TextEncoder();
474
- const charCodes = encoder.encode(str);
475
- return window.btoa(String.fromCharCode(...charCodes)) || '';
476
- }
477
- catch (e) {
478
- return '';
479
- }
480
- }
481
- function atobSafe(str) {
482
- if (!str) {
483
- return '';
484
- }
485
- try {
486
- const binary = window.atob(str);
487
- const bytes = Uint8Array.from({ length: binary.length }, (_, index) => binary.charCodeAt(index));
488
- const decoder = new TextDecoder('utf-8');
489
- return decoder.decode(bytes);
490
- }
491
- catch (e) {
492
- return '';
493
- }
494
- }
495
-
496
- class DocGenComponent {
497
- constructor(quoteDraftService, contextService, templatesApi, toastService, flowService, customizationService) {
498
- this.quoteDraftService = quoteDraftService;
499
- this.contextService = contextService;
500
- this.templatesApi = templatesApi;
501
- this.toastService = toastService;
502
- this.flowService = flowService;
503
- this.customizationService = customizationService;
504
- this.uiDefinition$ = new BehaviorSubject(null);
505
- this.templateApiName = '';
506
- this.destroy$ = new Subject();
507
- // initialize when quote draft requested
508
- this.quoteDraftService.quoteDraft$
509
- .pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
510
- .subscribe();
511
- }
512
- ngOnDestroy() {
513
- this.destroy$.next();
514
- this.destroy$.complete();
515
- }
516
- initialize() {
517
- this.templateApiName = this.flowService.flow?.properties.templates.docGen ?? '';
518
- this.generateUIDefinition$()
519
- .pipe(tap(uiDef => {
520
- if (!uiDef) {
521
- throw new Error(`Component with name '${this.templateApiName}' not found.`);
522
- }
523
- this.uiDefinition$.next(uiDef);
524
- }), catchError(err => {
525
- const message = 'Failed to resolve DocGen component. ' + (err.message ?? '');
526
- this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
527
- return of();
528
- }), takeUntil(this.destroy$))
529
- .subscribe();
530
- }
531
- getTemplateRootComponent$(template) {
532
- return this.templatesApi.fetchComponents$(template.id);
533
- }
534
- getLocalTemplateComponentMeta$() {
535
- if (!this.customizationService?.getTemplateComponent) {
536
- return of(undefined);
537
- }
538
- return this.customizationService?.getTemplateComponent(this.templateApiName).pipe(map(components => {
539
- if (!components) {
540
- return;
541
- }
542
- return components.map(component => ({
543
- html: component.html,
544
- css: component.css,
545
- js: component.js,
546
- json: component.json,
547
- }));
548
- }));
549
- }
550
- getDocGenComponentMeta$() {
551
- return this.templatesApi.fetchTemplates$().pipe(map(templates => {
552
- const template = templates.find(template => template.type === UITemplateType.DOCGEN && template.name === this.templateApiName);
553
- return template ?? templates[0];
554
- }), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(components => components
555
- ? forkJoin([
556
- ...components.map(component => {
557
- return this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component);
558
- }),
559
- ])
560
- : of(undefined)));
561
- }
562
- generateUIDefinition$() {
563
- return of(undefined).pipe(tap(() => {
564
- if (!this.templateApiName) {
565
- throw new Error("Flow Query parameter 'docGenTemplateApiName' is missing.");
566
- }
567
- }), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(children => (children ? of(children) : this.getDocGenComponentMeta$())), map(children => {
568
- if (!children) {
569
- return;
570
- }
571
- const meta = children?.[0] ?? children;
572
- const headerId = this.contextService.resolve().properties.Id ?? null;
573
- let script = meta.js;
574
- if (script) {
575
- const metadata = extractElementMetadata(script);
576
- script = extendElementMetadata(script, {
577
- inputs: {
578
- ...metadata.inputs,
579
- Id: headerId ? `"${headerId}"` : null,
580
- },
581
- });
582
- }
583
- const uiDef = {
584
- name: '',
585
- createdTimestamp: 0,
586
- primary: true,
587
- type: 'DEFAULT',
588
- version: 2,
589
- children: children.map(child => ({
590
- children: [],
591
- template: child.html && btoaSafe(child.html),
592
- script: child.js && btoaSafe(child.js),
593
- styles: child.css && btoaSafe(child.css),
594
- })),
595
- };
596
- return uiDef;
597
- }));
598
- }
599
- }
600
- DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$2.QuoteDraftService }, { token: i1$2.ContextService }, { token: i1$4.UITemplatesApiService }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
601
- DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
603
- type: Component,
604
- args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
605
- }], ctorParameters: function () { return [{ type: i1$2.QuoteDraftService }, { type: i1$2.ContextService }, { type: i1$4.UITemplatesApiService }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
606
- type: Optional
607
- }, {
608
- type: Inject,
609
- args: [FLOW_CUSTOMIZATION]
610
- }] }]; } });
611
-
612
- class DocGenModule {
613
- }
614
- DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
615
- DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
616
- DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
617
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
618
- type: NgModule,
619
- args: [{
620
- declarations: [DocGenComponent],
621
- imports: [CommonModule, PreviewModule],
622
- exports: [DocGenComponent],
623
- }]
624
- }] });
625
-
626
- class GuidedSellingComponent {
627
- constructor(quoteDraftService, templatesApi, toastService, flowService, customizationService) {
628
- this.quoteDraftService = quoteDraftService;
629
- this.templatesApi = templatesApi;
630
- this.toastService = toastService;
631
- this.flowService = flowService;
632
- this.customizationService = customizationService;
633
- this.uiDefinition$ = new BehaviorSubject(null);
634
- this.templateApiName = '';
635
- this.destroy$ = new Subject();
636
- // initialize when quote draft requested
637
- this.quoteDraftService.quoteDraft$
638
- .pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
639
- .subscribe();
640
- }
641
- ngOnDestroy() {
642
- this.destroy$.next();
643
- this.destroy$.complete();
644
- }
645
- initialize() {
646
- this.templateApiName = this.flowService.flow?.properties.templates.guidedSelling ?? '';
647
- this.generateUIDefinition$()
648
- .pipe(tap(uiDef => {
649
- if (!uiDef) {
650
- throw new Error(`Component with name '${this.templateApiName}' not found.`);
651
- }
652
- this.uiDefinition$.next(uiDef);
653
- }), catchError(err => {
654
- const message = 'Failed to resolve Guided Selling component. ' + (err.message ?? '');
655
- this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
656
- return of();
657
- }), takeUntil(this.destroy$))
658
- .subscribe();
659
- }
660
- getTemplateRootComponent$(template) {
661
- return this.templatesApi.fetchComponents$(template.id);
662
- }
663
- getLocalTemplateComponentMeta$() {
664
- if (!this.customizationService?.getTemplateComponent) {
665
- return of(undefined);
666
- }
667
- return this.customizationService?.getTemplateComponent(this.templateApiName).pipe(map(components => {
668
- if (!components) {
669
- return;
670
- }
671
- return components.map(component => ({
672
- html: component.html,
673
- css: component.css,
674
- js: component.js,
675
- json: component.json,
676
- }));
677
- }));
678
- }
679
- getGuidedSellingComponentMeta$() {
680
- return this.templatesApi.fetchTemplates$().pipe(map(templates => {
681
- const template = templates.find(template => template.type === UITemplateType.GUIDED_SELLING && template.name === this.templateApiName);
682
- return template ?? templates[0];
683
- }), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(components => components
684
- ? forkJoin([
685
- ...components.map(component => {
686
- return this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component);
687
- }),
688
- ])
689
- : of(undefined)));
690
- }
691
- generateUIDefinition$() {
692
- return of(undefined).pipe(tap(() => {
693
- if (!this.templateApiName) {
694
- throw new Error("Flow Query parameter 'guidedSellingTemplateApiName' is missing.");
695
- }
696
- }), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(children => (children ? of(children) : this.getGuidedSellingComponentMeta$())), map(children => {
697
- if (!children) {
698
- return;
699
- }
700
- const uiDef = {
701
- name: '',
702
- createdTimestamp: 0,
703
- primary: true,
704
- type: 'DEFAULT',
705
- version: 2,
706
- children: children.map(child => ({
707
- children: [],
708
- template: child.html && btoaSafe(child.html),
709
- script: child.js && btoaSafe(child.js),
710
- styles: child.css && btoaSafe(child.css),
711
- })),
712
- };
713
- return uiDef;
714
- }));
715
- }
716
- }
717
- GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$2.QuoteDraftService }, { token: i1$4.UITemplatesApiService }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
718
- GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
719
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
720
- type: Component,
721
- args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
722
- }], ctorParameters: function () { return [{ type: i1$2.QuoteDraftService }, { type: i1$4.UITemplatesApiService }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
723
- type: Optional
724
- }, {
725
- type: Inject,
726
- args: [FLOW_CUSTOMIZATION]
727
- }] }]; } });
728
-
729
- class GuidedSellingModule {
730
- }
731
- GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
732
- GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
733
- GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
734
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, decorators: [{
735
- type: NgModule,
736
- args: [{
737
- declarations: [GuidedSellingComponent],
738
- imports: [CommonModule, PreviewModule],
739
- exports: [GuidedSellingComponent],
740
- }]
741
- }] });
742
-
743
- class FlowHeaderComponent {
744
- constructor(quoteDraftService, templatesApi, toastService, flowService, customizationService) {
745
- this.quoteDraftService = quoteDraftService;
746
- this.templatesApi = templatesApi;
747
- this.toastService = toastService;
748
- this.flowService = flowService;
749
- this.customizationService = customizationService;
750
- this.uiDefinition$ = new BehaviorSubject(null);
751
- this.templateApiName = '';
752
- this.destroy$ = new Subject();
753
- // initialize when quote draft requested
754
- this.quoteDraftService.quoteDraft$
755
- .pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
780
+ this.integrationState
781
+ .listen$(FlowAction.FLOW_NAVIGATE_BACK)
782
+ .pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
756
783
  .subscribe();
757
- }
758
- ngOnDestroy() {
759
- this.destroy$.next();
760
- this.destroy$.complete();
761
- }
762
- initialize() {
763
- this.templateApiName = this.flowService.flow?.properties.templates.flowHeader ?? '';
764
- this.generateUIDefinition$()
765
- .pipe(tap(uiDef => {
766
- if (!uiDef) {
767
- throw new Error(`Component with name '${this.templateApiName}' not found.`);
784
+ this.integrationState
785
+ .listen$(FlowAction.FLOW_NAVIGATE_TO)
786
+ .pipe(switchMap(payload => this.configurationStateService.cancelConfiguration().pipe(map(() => payload))), tap(payload => {
787
+ if (payload.path === 'product') {
788
+ this.integrationState.dispatch(FlowAction.ConfigureProductAction(payload));
768
789
  }
769
- this.uiDefinition$.next(uiDef);
770
- }), catchError(err => {
771
- const message = 'Failed to resolve Guided Selling component. ' + (err.message ?? '');
772
- this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
773
- return of();
774
- }), takeUntil(this.destroy$))
790
+ else {
791
+ this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId);
792
+ }
793
+ }), takeUntil(this.cleanup$))
794
+ .subscribe();
795
+ this.integrationState
796
+ .listen$(FlowAction.OPEN_DIALOG)
797
+ .pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
798
+ .subscribe(dialogResult => {
799
+ this.integrationState.patchState({ dialogResult });
800
+ });
801
+ this.integrationState
802
+ .listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
803
+ .pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
804
+ .subscribe();
805
+ this.integrationState
806
+ .listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
807
+ .pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
808
+ .subscribe();
809
+ this.integrationState
810
+ .listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
811
+ .pipe(switchMap(() => {
812
+ if (this.flowInfoService.isLegacy) {
813
+ return this.legacyApplyConfiguration();
814
+ }
815
+ else {
816
+ return this.configurationStateService.saveConfiguration('', true).pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), switchMap(() => this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'MODIFY_ASSETS', {
817
+ addConfiguringAssetId: true,
818
+ enable: true,
819
+ })));
820
+ }
821
+ }), tap(() => {
822
+ this.configurationService.hasUnsavedChanges = false;
823
+ this.flowRouterService.navigateToShoppingCart();
824
+ }), takeUntil(this.cleanup$))
775
825
  .subscribe();
826
+ this.updateFlowParams();
776
827
  }
777
- getTemplateRootComponent$(template) {
778
- return this.templatesApi.fetchComponents$(template.id);
828
+ updateFlowParams() {
829
+ this.flowRouterService
830
+ .getFlowSubpath$()
831
+ .pipe(map(path => path.split('/')?.[0]), takeUntil(this.cleanup$))
832
+ .subscribe(flowPath => this.integrationState.patchState({ flowPath }));
833
+ this.flowRouterService.route$
834
+ .pipe(map(path => path.queryParams['productId']), takeUntil(this.cleanup$))
835
+ .subscribe(productId => this.integrationState.patchState({ productId }));
779
836
  }
780
- getLocalTemplateComponentMeta$() {
781
- if (!this.customizationService?.getTemplateComponent) {
837
+ prepareConfiguration$(lineItemId) {
838
+ if (!lineItemId) {
782
839
  return of(undefined);
783
840
  }
784
- return this.customizationService?.getTemplateComponent(this.templateApiName).pipe(map(components => {
785
- if (!components) {
786
- return;
787
- }
788
- return components.map(component => ({
789
- html: component.html,
790
- css: component.css,
791
- js: component.js,
792
- json: component.json,
793
- }));
794
- }));
795
- }
796
- getFlowHeaderComponentMeta$() {
797
- return this.templatesApi.fetchTemplates$().pipe(map(templates => {
798
- const template = templates.find(template => template.type === UITemplateType.FLOW_HEADER && template.name === this.templateApiName);
799
- return template ?? templates[0];
800
- }), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(components => components
801
- ? forkJoin([
802
- ...components.map(component => {
803
- return this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component);
804
- }),
805
- ])
806
- : of(undefined)));
841
+ return this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_PRICE_LIST', {
842
+ lineItemId,
843
+ });
807
844
  }
808
- generateUIDefinition$() {
809
- return of(undefined).pipe(tap(() => {
810
- if (!this.templateApiName) {
811
- throw new Error("Flow Query parameter 'flowHeaderTemplateApiName' is missing.");
812
- }
813
- }), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(children => (children ? of(children) : this.getFlowHeaderComponentMeta$())), map(children => {
814
- if (!children) {
815
- return;
816
- }
817
- const uiDef = {
818
- name: '',
819
- createdTimestamp: 0,
820
- primary: true,
821
- type: 'DEFAULT',
822
- version: 2,
823
- children: children.map(child => ({
824
- children: [],
825
- template: child.html && btoaSafe(child.html),
826
- script: child.js && btoaSafe(child.js),
827
- styles: child.css && btoaSafe(child.css),
828
- })),
829
- };
830
- return uiDef;
831
- }));
845
+ legacyApplyConfiguration() {
846
+ const quoteDraft = this.quoteDraftService.quoteDraft;
847
+ const lineItem = this.configurationService.getSnapshot();
848
+ if (!quoteDraft || !lineItem) {
849
+ return of(undefined);
850
+ }
851
+ const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
852
+ let updatedState;
853
+ if (isNewLineItem) {
854
+ updatedState = [...quoteDraft.currentState, lineItem];
855
+ }
856
+ else {
857
+ updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
858
+ }
859
+ return this.flowConfigurationService.calculate$({ ...quoteDraft, currentState: updatedState });
832
860
  }
833
861
  }
834
- FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$2.QuoteDraftService }, { token: i1$4.UITemplatesApiService }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
835
- FlowHeaderComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowHeaderComponent, selector: "vl-flow-new-header", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
836
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
837
- type: Component,
838
- args: [{ selector: 'vl-flow-new-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
839
- }], ctorParameters: function () { return [{ type: i1$2.QuoteDraftService }, { type: i1$4.UITemplatesApiService }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
840
- type: Optional
841
- }, {
842
- type: Inject,
843
- args: [FLOW_CUSTOMIZATION]
844
- }] }]; } });
845
-
846
- class FlowNewHeaderModule {
847
- }
848
- FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
849
- FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
850
- FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
851
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
852
- type: NgModule,
853
- args: [{
854
- declarations: [FlowHeaderComponent],
855
- imports: [CommonModule, PreviewModule],
856
- exports: [FlowHeaderComponent],
857
- }]
858
- }] });
862
+ FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: FlowDialogService }, { token: i2.FlowConfigurationService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
863
+ FlowServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
865
+ type: Injectable
866
+ }], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: FlowDialogService }, { type: i2.FlowConfigurationService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
859
867
 
860
- class FlowDocGenService {
868
+ class FlowGuidedSellingService {
861
869
  constructor(integrationState) {
862
870
  this.integrationState = integrationState;
863
871
  this.cleanup$ = new Subject();
@@ -870,53 +878,40 @@ class FlowDocGenService {
870
878
  }
871
879
  initSubscriptions() {
872
880
  this.integrationState
873
- .listen$(FlowAction.FLOW_OPEN_DOC_GEN)
881
+ .listen$(FlowAction.OPEN_GUIDED_SELLING)
874
882
  .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
875
883
  .subscribe();
876
884
  this.integrationState
877
- .listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
885
+ .listen$(FlowAction.CLOSE_GUIDED_SELLING)
878
886
  .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
879
887
  .subscribe();
880
888
  }
881
889
  }
882
- FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i1$3.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
883
- FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
890
+ FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
891
+ FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
892
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
885
893
  type: Injectable
886
- }], ctorParameters: function () { return [{ type: i1$3.IntegrationState }]; } });
894
+ }], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
887
895
 
888
896
  class FlowComponent {
889
- constructor(routerService, quoteDraftService, flowService, docGenService, integrationState, contextService) {
897
+ constructor(routerService, flowService, flowInfo, guidedSellingService) {
890
898
  this.routerService = routerService;
891
- this.quoteDraftService = quoteDraftService;
892
899
  this.flowService = flowService;
893
- this.docGenService = docGenService;
894
- this.integrationState = integrationState;
895
- this.contextService = contextService;
900
+ this.flowInfo = flowInfo;
901
+ this.guidedSellingService = guidedSellingService;
896
902
  this.isLoading$ = this.routerService.loading$;
897
- this.showHeader$ = combineLatest([
898
- this.routerService.route$,
899
- this.quoteDraftService.isStandalone$,
900
- this.contextService.isInitialized$,
901
- ]).pipe(map(([route, isStandalone, isContextInited]) => !!isContextInited && this.quoteDraftService.isInitialized && route.data['showHeader'] && !isStandalone));
902
- this.isStandalone$ = this.quoteDraftService.isStandalone$;
903
+ this.showHeader$ = combineLatest([this.routerService.route$, this.flowInfo.flow$]).pipe(map(([route, flow]) => route.data['showHeader'] && !flow?.properties.standalone));
904
+ this.isStandalone$ = this.flowInfo.flow$.pipe(map(flow => Boolean(flow?.properties.standalone)));
905
+ this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
903
906
  this.flowService.initSubscriptions();
904
907
  }
905
- ngOnInit() {
906
- this.integrationState.clear();
907
- }
908
- ngOnDestroy() {
909
- this.flowService.cleanup();
910
- this.docGenService.cleanup();
911
- this.contextService.delete();
912
- }
913
908
  }
914
- FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i1$2.QuoteDraftService }, { token: FlowService }, { token: FlowDocGenService }, { token: i1$3.IntegrationState }, { token: i1$2.ContextService }], target: i0.ɵɵFactoryTarget.Component });
915
- FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-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\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
909
+ FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
910
+ FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-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\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
916
911
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
917
912
  type: Component,
918
- args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-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\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}\n"] }]
919
- }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i1$2.QuoteDraftService }, { type: FlowService }, { type: FlowDocGenService }, { type: i1$3.IntegrationState }, { type: i1$2.ContextService }]; } });
913
+ args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-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\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"] }]
914
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
920
915
 
921
916
  const getFlowObjectIdPropertyName = (id) => {
922
917
  const objectName = SalesforceIdUtils.getSfObjectNameById(id);
@@ -956,7 +951,7 @@ class ContextGuard {
956
951
  const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
957
952
  // Restrict if mode is not defined
958
953
  if (mode == null) {
959
- return this.handleError(route, 'Mode is undefined');
954
+ return this.routerService.showErrorPage$('Mode is undefined');
960
955
  }
961
956
  const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
962
957
  // Allow if context is already initialized with the same headerId
@@ -968,7 +963,6 @@ class ContextGuard {
968
963
  }
969
964
  // Initialize context and runtime settings
970
965
  return forkJoin([this.contextService.create(headerId, mode), this.runtimeSettingsService.create()]).pipe(tap(([context]) => {
971
- // Update context with queryParams
972
966
  this.contextService.update({
973
967
  ...context,
974
968
  properties: {
@@ -981,7 +975,8 @@ class ContextGuard {
981
975
  this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
982
976
  }), map(() => true), catchError(e => {
983
977
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
984
- return this.handleError(route, message);
978
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
979
+ return this.routerService.showErrorPage$(message, errorDetails);
985
980
  }));
986
981
  }
987
982
  canActivate(route) {
@@ -1014,36 +1009,42 @@ class ContextGuard {
1014
1009
  }
1015
1010
  return;
1016
1011
  }
1017
- handleError(route, message) {
1018
- this.contextService.delete();
1019
- const parentUrl = this.routerService.getFlowRootPath(route);
1020
- return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
1021
- }
1022
1012
  }
1023
- ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, deps: [{ token: i1$1.Router }, { token: FlowRouterService }, { token: i1$2.ContextService }, { token: i1$2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
1013
+ ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
1024
1014
  ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard });
1025
1015
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, decorators: [{
1026
1016
  type: Injectable
1027
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: FlowRouterService }, { type: i1$2.ContextService }, { type: i1$2.RuntimeSettingsService }]; } });
1017
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
1028
1018
 
1029
- const initFlow = (route) => {
1019
+ const keepFlowInitialized = (route) => {
1030
1020
  const contextService = inject(ContextService);
1031
- const flowService = inject(FlowService);
1021
+ const flowState = inject(FlowStateService);
1022
+ const flowInfoService = inject(FlowInfoService);
1023
+ const routerService = inject(FlowRouterService);
1032
1024
  const quoteDraft = inject(QuoteDraftService);
1033
1025
  const configurationService = inject(ConfigurationService);
1026
+ const integrationState = inject(IntegrationState);
1034
1027
  const { flowId } = route.queryParams;
1035
- const flow = flowService.flow;
1028
+ const flow = flowInfoService.flow;
1036
1029
  if (flow && flow?.id === flowId) {
1037
1030
  return true;
1038
1031
  }
1039
1032
  // Cleanup
1040
- contextService.delete();
1041
- configurationService.reset();
1033
+ flowState.cleanup();
1042
1034
  quoteDraft.reset();
1035
+ configurationService.reset();
1036
+ integrationState.clear();
1037
+ flowInfoService.cleanup();
1038
+ contextService.delete();
1043
1039
  if (!flowId) {
1044
1040
  return true;
1045
1041
  }
1046
- return flowService.setFlowById$(flowId);
1042
+ const params = { ...route.queryParams, ...flow?.properties.queryParams };
1043
+ return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => {
1044
+ const message = e instanceof HttpErrorResponse ? e.error.message : e;
1045
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
1046
+ return routerService.showErrorPage$(message, errorDetails);
1047
+ }));
1047
1048
  };
1048
1049
 
1049
1050
  class ProductUnloadGuard {
@@ -1080,11 +1081,11 @@ class ProductUnloadGuard {
1080
1081
  }));
1081
1082
  }
1082
1083
  }
1083
- ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$1.Router }, { token: i1$2.ContextService }, { token: i1$2.QuoteDraftService }, { token: i1$2.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
1084
+ ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
1084
1085
  ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
1085
1086
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
1086
1087
  type: Injectable
1087
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$2.ContextService }, { type: i1$2.QuoteDraftService }, { type: i1$2.ConfigurationService }, { type: FlowDialogService }]; } });
1088
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: FlowDialogService }]; } });
1088
1089
 
1089
1090
  class RootGuard {
1090
1091
  constructor(router, routerService) {
@@ -1119,25 +1120,25 @@ class RootGuard {
1119
1120
  return true;
1120
1121
  }
1121
1122
  }
1122
- RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, deps: [{ token: i1$1.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
1123
+ RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
1123
1124
  RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, providedIn: 'root' });
1124
1125
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, decorators: [{
1125
1126
  type: Injectable,
1126
1127
  args: [{ providedIn: 'root' }]
1127
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: FlowRouterService }]; } });
1128
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
1128
1129
 
1129
1130
  class AssetsComponent {
1130
- constructor(templatesApi, cdr, toastService, flowService, customizationService) {
1131
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1131
1132
  this.templatesApi = templatesApi;
1132
1133
  this.cdr = cdr;
1133
1134
  this.toastService = toastService;
1134
- this.flowService = flowService;
1135
+ this.flowInfo = flowInfo;
1135
1136
  this.customizationService = customizationService;
1136
1137
  this.uiDefinition = undefined;
1137
1138
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1138
1139
  this.templateApiName = '';
1139
1140
  this.destroyed$ = new Subject();
1140
- this.templateApiName = this.flowService.flow?.properties.templates.assets ?? '';
1141
+ this.templateApiName = this.flowInfo.flow?.properties.templates?.assets ?? '';
1141
1142
  }
1142
1143
  ngOnInit() {
1143
1144
  this.generateUIDefinition$()
@@ -1160,37 +1161,36 @@ class AssetsComponent {
1160
1161
  this.destroyed$.next();
1161
1162
  this.destroyed$.complete();
1162
1163
  }
1163
- getTemplateRootComponent$(template) {
1164
- return this.templatesApi
1165
- .fetchComponents$(template.id)
1166
- .pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
1167
- }
1168
- getLocalAssetsComponentMeta$() {
1169
- if (!this.customizationService?.getAssetsComponent) {
1164
+ getLocalMeta$() {
1165
+ if (!this.customizationService?.getTemplateComponents) {
1170
1166
  return of(undefined);
1171
1167
  }
1172
- return this.customizationService?.getAssetsComponent(this.templateApiName).pipe(map(component => {
1173
- if (!component) {
1168
+ return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
1169
+ if (!components) {
1174
1170
  return;
1175
1171
  }
1176
- return {
1172
+ return components.map(component => ({
1177
1173
  html: component.html,
1178
1174
  css: component.css,
1179
1175
  js: component.js,
1180
1176
  json: component.json,
1181
- };
1177
+ }));
1182
1178
  }));
1183
1179
  }
1184
- getAssetsComponentMeta$() {
1185
- return this.templatesApi.fetchTemplates$().pipe(map(templates => templates.find(template => template.name === this.templateApiName)), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
1180
+ getOrgMeta$() {
1181
+ const template = this.flowInfo.templates.SHOPPING_CART;
1182
+ if (!template) {
1183
+ return of(undefined);
1184
+ }
1185
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
1186
1186
  }
1187
1187
  generateUIDefinition$() {
1188
1188
  return of(undefined).pipe(tap(() => {
1189
1189
  if (!this.templateApiName) {
1190
- throw new Error("Flow Query parameter 'assetsTemplateApiName' is missing.");
1190
+ throw new Error("Flow 'assets' template is not defined.");
1191
1191
  }
1192
- }), switchMap(() => this.getLocalAssetsComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getAssetsComponentMeta$())), map(meta => {
1193
- if (!meta) {
1192
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1193
+ if (!metaList) {
1194
1194
  return;
1195
1195
  }
1196
1196
  const uiDef = {
@@ -1199,25 +1199,23 @@ class AssetsComponent {
1199
1199
  primary: true,
1200
1200
  type: 'DEFAULT',
1201
1201
  version: 2,
1202
- children: [
1203
- {
1204
- children: [],
1205
- template: meta.html && btoa(meta.html),
1206
- script: meta.js && btoa(meta.js),
1207
- styles: meta.css && btoa(meta.css),
1208
- },
1209
- ],
1202
+ children: metaList.map(meta => ({
1203
+ children: [],
1204
+ template: meta.html && btoaSafe(meta.html),
1205
+ script: meta.js && btoaSafe(meta.js),
1206
+ styles: meta.css && btoaSafe(meta.css),
1207
+ })),
1210
1208
  };
1211
1209
  return uiDef;
1212
1210
  }));
1213
1211
  }
1214
1212
  }
1215
- AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$4.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1216
- AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1213
+ AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1214
+ AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1217
1215
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
1218
1216
  type: Component,
1219
1217
  args: [{ selector: 'vl-flow-assets', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
1220
- }], ctorParameters: function () { return [{ type: i1$4.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
1218
+ }], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1221
1219
  type: Optional
1222
1220
  }, {
1223
1221
  type: Inject,
@@ -1239,17 +1237,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1239
1237
  }] });
1240
1238
 
1241
1239
  class CatalogComponent {
1242
- constructor(templatesApi, cdr, toastService, flowService, customizationService) {
1240
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1243
1241
  this.templatesApi = templatesApi;
1244
1242
  this.cdr = cdr;
1245
1243
  this.toastService = toastService;
1246
- this.flowService = flowService;
1244
+ this.flowInfo = flowInfo;
1247
1245
  this.customizationService = customizationService;
1248
1246
  this.uiDefinition = undefined;
1249
1247
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1250
1248
  this.templateApiName = '';
1251
1249
  this.destroyed$ = new Subject();
1252
- this.templateApiName = this.flowService.flow?.properties.templates.catalog ?? '';
1250
+ this.templateApiName = this.flowInfo.flow?.properties.templates?.catalog ?? '';
1253
1251
  }
1254
1252
  ngOnInit() {
1255
1253
  this.generateUIDefinition$()
@@ -1272,37 +1270,36 @@ class CatalogComponent {
1272
1270
  this.destroyed$.next();
1273
1271
  this.destroyed$.complete();
1274
1272
  }
1275
- getTemplateRootComponent$(template) {
1276
- return this.templatesApi
1277
- .fetchComponents$(template.id)
1278
- .pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
1279
- }
1280
- getLocalCatalogComponentMeta$() {
1281
- if (!this.customizationService?.getCatalogComponent) {
1273
+ getLocalMeta$() {
1274
+ if (!this.customizationService?.getTemplateComponents) {
1282
1275
  return of(undefined);
1283
1276
  }
1284
- return this.customizationService?.getCatalogComponent(this.templateApiName).pipe(map(component => {
1285
- if (!component) {
1277
+ return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
1278
+ if (!components) {
1286
1279
  return;
1287
1280
  }
1288
- return {
1281
+ return components.map(component => ({
1289
1282
  html: component.html,
1290
1283
  css: component.css,
1291
1284
  js: component.js,
1292
1285
  json: component.json,
1293
- };
1286
+ }));
1294
1287
  }));
1295
1288
  }
1296
- getCatalogComponentMeta$() {
1297
- return this.templatesApi.fetchTemplates$().pipe(map(templates => templates.find(template => template.name === this.templateApiName)), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
1289
+ getOrgMeta$() {
1290
+ const template = this.flowInfo.templates.CATALOG;
1291
+ if (!template) {
1292
+ return of(undefined);
1293
+ }
1294
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
1298
1295
  }
1299
1296
  generateUIDefinition$() {
1300
1297
  return of(undefined).pipe(tap(() => {
1301
1298
  if (!this.templateApiName) {
1302
- throw new Error("Flow Query parameter 'catalogTemplateApiName' is missing.");
1299
+ throw new Error("Flow 'catalog' template is not defined.");
1303
1300
  }
1304
- }), switchMap(() => this.getLocalCatalogComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getCatalogComponentMeta$())), map(meta => {
1305
- if (!meta) {
1301
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1302
+ if (!metaList) {
1306
1303
  return;
1307
1304
  }
1308
1305
  const uiDef = {
@@ -1311,25 +1308,23 @@ class CatalogComponent {
1311
1308
  primary: true,
1312
1309
  type: 'DEFAULT',
1313
1310
  version: 2,
1314
- children: [
1315
- {
1316
- children: [],
1317
- template: meta.html && btoa(meta.html),
1318
- script: meta.js && btoa(meta.js),
1319
- styles: meta.css && btoa(meta.css),
1320
- },
1321
- ],
1311
+ children: metaList.map(meta => ({
1312
+ children: [],
1313
+ template: meta.html && btoaSafe(meta.html),
1314
+ script: meta.js && btoaSafe(meta.js),
1315
+ styles: meta.css && btoaSafe(meta.css),
1316
+ })),
1322
1317
  };
1323
1318
  return uiDef;
1324
1319
  }));
1325
1320
  }
1326
1321
  }
1327
- CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$4.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1328
- CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1322
+ CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1323
+ CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1329
1324
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
1330
1325
  type: Component,
1331
1326
  args: [{ selector: 'vl-flow-catalog', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
1332
- }], ctorParameters: function () { return [{ type: i1$4.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
1327
+ }], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1333
1328
  type: Optional
1334
1329
  }, {
1335
1330
  type: Inject,
@@ -1384,12 +1379,12 @@ class DebugComponent {
1384
1379
  return new HttpParams({ fromObject: params }).toString();
1385
1380
  }
1386
1381
  }
1387
- DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$4.FlowsApiService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i1$2.ContextService }, { token: i1$2.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
1388
- DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 </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 <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</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.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</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;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;table-layout:fixed}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;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1382
+ DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$1.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
1383
+ DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 </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 <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</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.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</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;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;table-layout:fixed}tbody>tr{cursor:pointer}tbody>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;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1389
1384
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
1390
1385
  type: Component,
1391
- args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, 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 </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 <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</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.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</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;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;table-layout:fixed}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;line-height:18px}.cell-query-params{word-break:break-all}\n"] }]
1392
- }], ctorParameters: function () { return [{ type: i1$4.FlowsApiService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i1$2.ContextService }, { type: i1$2.QuoteDraftService }]; } });
1386
+ args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, 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 </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 <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</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.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</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;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;table-layout:fixed}tbody>tr{cursor:pointer}tbody>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;line-height:18px}.cell-query-params{word-break:break-all}\n"] }]
1387
+ }], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
1393
1388
 
1394
1389
  const routes$1 = [{ path: '', component: DebugComponent }];
1395
1390
  class DebugModule {
@@ -1397,7 +1392,7 @@ class DebugModule {
1397
1392
  DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1398
1393
  DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
1399
1394
  FormsModule,
1400
- ReactiveFormsModule, i1$1.RouterModule, RadioButtonModule,
1395
+ ReactiveFormsModule, i1$2.RouterModule, RadioButtonModule,
1401
1396
  ButtonModule,
1402
1397
  InputTextModule,
1403
1398
  DropdownModule] });
@@ -1426,36 +1421,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1426
1421
  }]
1427
1422
  }] });
1428
1423
 
1429
- class EmptyAccountComponent {
1430
- }
1431
- EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1432
- EmptyAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EmptyAccountComponent, selector: "vl-empty-account", ngImport: i0, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"], dependencies: [{ kind: "component", type: i2.EmptyStateComponent, selector: "vl-empty-state", inputs: ["primaryText", "secondaryText", "buttonLabel", "icon", "disabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1433
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, decorators: [{
1434
- type: Component,
1435
- args: [{ selector: 'vl-empty-account', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"] }]
1436
- }] });
1437
-
1438
- class EmptyAccountModule {
1439
- }
1440
- EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1441
- EmptyAccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, declarations: [EmptyAccountComponent], imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule], exports: [EmptyAccountComponent] });
1442
- EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule] });
1443
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, decorators: [{
1444
- type: NgModule,
1445
- args: [{
1446
- declarations: [EmptyAccountComponent],
1447
- imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule],
1448
- exports: [EmptyAccountComponent],
1449
- }]
1450
- }] });
1451
-
1452
1424
  class ProductComponent {
1453
- constructor(contextService, configurationRuntimeService, configurationService, configurationState, quoteDraftService, integrationState, customizationService) {
1425
+ constructor(contextService, configurationRuntimeService, configurationService, configurationStateService, quoteDraftService, flowInfoService, flowStateService, integrationState, customizationService) {
1454
1426
  this.contextService = contextService;
1455
1427
  this.configurationRuntimeService = configurationRuntimeService;
1456
1428
  this.configurationService = configurationService;
1457
- this.configurationState = configurationState;
1429
+ this.configurationStateService = configurationStateService;
1458
1430
  this.quoteDraftService = quoteDraftService;
1431
+ this.flowInfoService = flowInfoService;
1432
+ this.flowStateService = flowStateService;
1459
1433
  this.integrationState = integrationState;
1460
1434
  this.customizationService = customizationService;
1461
1435
  this.uiDefinition$ = new BehaviorSubject(undefined);
@@ -1475,18 +1449,28 @@ class ProductComponent {
1475
1449
  }));
1476
1450
  }
1477
1451
  init$() {
1478
- return this.quoteDraftService.quoteDraft$.pipe(first(), switchMap(quote => {
1452
+ let quoteDraft$;
1453
+ if (this.flowInfoService.isLegacy || !this.flowInfoService.isStateful) {
1454
+ quoteDraft$ = this.quoteDraftService.quoteDraft$;
1455
+ }
1456
+ else {
1457
+ quoteDraft$ = of(undefined);
1458
+ }
1459
+ return quoteDraft$.pipe(first(), switchMap(quote => {
1479
1460
  const contextProperties = this.contextService.resolve().properties;
1480
1461
  const productId = contextProperties.productId;
1481
1462
  if (!productId) {
1482
1463
  throw new Error(`Unable to start configuration for 'productId == null'`);
1483
1464
  }
1484
- const lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
1485
- const currentStateItem = quote.currentState.find(({ id }) => id === lineItemId);
1486
- if (currentStateItem) {
1487
- this.configurationService.setConfigurableRamp(currentStateItem);
1465
+ if (!quote) {
1466
+ const offeringId = contextProperties.offeringId;
1467
+ return this.configurationRuntimeService.init({ productId, offeringId });
1468
+ }
1469
+ const lineItem = this.getLineItem(quote, productId, contextProperties.lineItemId);
1470
+ if (lineItem) {
1471
+ this.configurationService.setConfigurableRamp(lineItem);
1488
1472
  }
1489
- const { offeringId } = currentStateItem ?? {};
1473
+ const { offeringId } = lineItem ?? {};
1490
1474
  return this.configurationRuntimeService.init({ productId, offeringId });
1491
1475
  }), switchMap(() => this.customizeUI$()), tap(() => {
1492
1476
  const uiDefinition = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer?.source;
@@ -1501,23 +1485,27 @@ class ProductComponent {
1501
1485
  this.configurationRuntimeService.initializationProps.attributesMap =
1502
1486
  this.integrationState.state.guidedSelling;
1503
1487
  }
1504
- }), switchMap(() => this.configurationState.init$()));
1488
+ }), switchMap(() => this.configurationStateService.init$()));
1505
1489
  }
1506
- getLineItemId(quote, productId, lineItemId) {
1490
+ getLineItem(quote, productId, lineItemId) {
1507
1491
  // search by lineItemId first
1508
- let id = quote.currentState.find(li => li.id === lineItemId)?.id;
1509
- if (!id && this.quoteDraftService.isStandalone) {
1510
- id = quote.currentState.find(li => li.productId === productId)?.id;
1492
+ let li = quote.currentState.find(li => li.id === lineItemId);
1493
+ if (!li && this.quoteDraftService.isStandalone) {
1494
+ li = quote.currentState.find(li => li.productId === productId);
1511
1495
  }
1512
- return id;
1496
+ // If still not found, is could be an asset
1497
+ if (!li) {
1498
+ li = this.quoteDraftService.assetsState?.currentState.find(li => li.id === lineItemId);
1499
+ }
1500
+ return li;
1513
1501
  }
1514
1502
  }
1515
- ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i1$2.ContextService }, { token: i1$2.ConfigurationRuntimeService }, { token: i1$2.ConfigurationService }, { token: i1$2.ConfigurationState }, { token: i1$2.QuoteDraftService }, { token: i1$3.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1516
- ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n", styles: [""], dependencies: [{ kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1503
+ ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i2.ContextService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: i2.QuoteDraftService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }, { token: i2.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1504
+ ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n", styles: [""], dependencies: [{ kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1517
1505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
1518
1506
  type: Component,
1519
1507
  args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n" }]
1520
- }], ctorParameters: function () { return [{ type: i1$2.ContextService }, { type: i1$2.ConfigurationRuntimeService }, { type: i1$2.ConfigurationService }, { type: i1$2.ConfigurationState }, { type: i1$2.QuoteDraftService }, { type: i1$3.IntegrationState }, { type: undefined, decorators: [{
1508
+ }], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2.QuoteDraftService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }, { type: i2.IntegrationState }, { type: undefined, decorators: [{
1521
1509
  type: Optional
1522
1510
  }, {
1523
1511
  type: Inject,
@@ -1543,26 +1531,29 @@ class RecordNotFoundComponent {
1543
1531
  this.router = router;
1544
1532
  this.route = route;
1545
1533
  this.subMessage = '';
1534
+ this.type = '';
1546
1535
  const navigation = this.router.getCurrentNavigation();
1547
1536
  const { state } = navigation?.extras || {};
1548
1537
  this.message = state?.['message'];
1538
+ this.type = state?.['type'] || '';
1539
+ this.details = state?.['details'];
1549
1540
  if (typeof this.message === 'string') {
1550
1541
  this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';
1551
1542
  }
1552
1543
  }
1553
1544
  }
1554
- RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1555
- RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1545
+ RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1546
+ RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1556
1547
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
1557
1548
  type: Component,
1558
- args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
1559
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }]; } });
1549
+ args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"] }]
1550
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
1560
1551
 
1561
1552
  const routes = [{ path: '', component: RecordNotFoundComponent }];
1562
1553
  class RecordNotFoundModule {
1563
1554
  }
1564
1555
  RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1565
- RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$1.RouterModule] });
1556
+ RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
1566
1557
  RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, imports: [CommonModule, RouterModule.forChild(routes)] });
1567
1558
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, decorators: [{
1568
1559
  type: NgModule,
@@ -1676,7 +1667,7 @@ class RemoteComponent {
1676
1667
  let items = [lineItem];
1677
1668
  for (let i = 0; i < items.length; i++) {
1678
1669
  const item = items[i];
1679
- const children = options.get(item.id);
1670
+ const children = item && options.get(item.id);
1680
1671
  if (children) {
1681
1672
  item.lineItems = children;
1682
1673
  items = items.concat(children);
@@ -1749,7 +1740,7 @@ class RemoteComponent {
1749
1740
  if (rootOption) {
1750
1741
  const featureOptions = optionConfigurations[rootOption.featureName] ?? (optionConfigurations[rootOption.featureName] = []);
1751
1742
  const originOption = !rootOption.hasChildren
1752
- ? optionConfigurations[rootOption.featureName].find(({ optionId }) => optionId === rootOption.optionId)
1743
+ ? optionConfigurations[rootOption.featureName]?.find(({ optionId }) => optionId === rootOption.optionId)
1753
1744
  : undefined;
1754
1745
  const option = originOption ?? {};
1755
1746
  option.optionId = option.optionId ?? rootOption.optionId;
@@ -1802,8 +1793,9 @@ class RemoteComponent {
1802
1793
  }
1803
1794
  }
1804
1795
  for (const option of notBundleOptions) {
1805
- if (bundleOptionsByOptionId[option.configuredProductId]) {
1806
- bundleOptionsByOptionId[option.configuredProductId].hasChildren = true;
1796
+ const bundleOption = bundleOptionsByOptionId[option.configuredProductId];
1797
+ if (bundleOption) {
1798
+ bundleOption.hasChildren = true;
1807
1799
  }
1808
1800
  }
1809
1801
  }
@@ -1811,7 +1803,7 @@ class RemoteComponent {
1811
1803
  let items = lineItem.lineItems ?? [];
1812
1804
  for (let i = 0; i < items.length; i++) {
1813
1805
  const item = items[i];
1814
- if (item.lineItems) {
1806
+ if (item?.lineItems) {
1815
1807
  items = items.concat(item.lineItems.map(li => ({ ...li, parentLineItem: item })));
1816
1808
  }
1817
1809
  }
@@ -1877,7 +1869,7 @@ class RemoteComponent {
1877
1869
  .forEach(mapping => {
1878
1870
  const attribute = lineItem.attributes.find(a => a.name === mapping.name);
1879
1871
  if (attribute) {
1880
- new Set(mapping.properties[propertyName].split(',')).forEach(k => (result[k] = attribute.value));
1872
+ new Set(mapping.properties[propertyName]?.split(',')).forEach(k => (result[k] = attribute.value));
1881
1873
  }
1882
1874
  });
1883
1875
  return result;
@@ -1893,12 +1885,12 @@ class RemoteComponent {
1893
1885
  return optionConfigurations;
1894
1886
  }
1895
1887
  }
1896
- RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, deps: [{ token: i1$2.ContextService }, { token: i1$2.QuoteDraftService }, { token: i1$2.ConfigurationRuntimeService }, { token: i1$2.ConfigurationService }, { token: i1$2.ConfigurationState }, { token: i2$1.MessageService }, { token: i1$3.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
1897
- RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RemoteComponent, selector: "vl-flow-remote", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1888
+ RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, deps: [{ token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: i2$2.MessageService }, { token: i2.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
1889
+ RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RemoteComponent, selector: "vl-flow-remote", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1898
1890
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, decorators: [{
1899
1891
  type: Component,
1900
1892
  args: [{ selector: 'vl-flow-remote', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
1901
- }], ctorParameters: function () { return [{ type: i1$2.ContextService }, { type: i1$2.QuoteDraftService }, { type: i1$2.ConfigurationRuntimeService }, { type: i1$2.ConfigurationService }, { type: i1$2.ConfigurationState }, { type: i2$1.MessageService }, { type: i1$3.IntegrationState }, { type: i4.Location }]; } });
1893
+ }], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2$2.MessageService }, { type: i2.IntegrationState }, { type: i4.Location }]; } });
1902
1894
 
1903
1895
  class RemoteModule {
1904
1896
  }
@@ -1915,17 +1907,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1915
1907
  }] });
1916
1908
 
1917
1909
  class ShoppingCartComponent {
1918
- constructor(templatesApi, cdr, toastService, flowService, customizationService) {
1910
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1919
1911
  this.templatesApi = templatesApi;
1920
1912
  this.cdr = cdr;
1921
1913
  this.toastService = toastService;
1922
- this.flowService = flowService;
1914
+ this.flowInfo = flowInfo;
1923
1915
  this.customizationService = customizationService;
1924
1916
  this.uiDefinition = undefined;
1925
1917
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1926
1918
  this.templateApiName = '';
1927
1919
  this.destroyed$ = new Subject();
1928
- this.templateApiName = this.flowService.flow?.properties.templates.shoppingCart ?? '';
1920
+ this.templateApiName = this.flowInfo.flow?.properties.templates?.shoppingCart ?? '';
1929
1921
  }
1930
1922
  ngOnInit() {
1931
1923
  this.generateUIDefinition$()
@@ -1936,7 +1928,7 @@ class ShoppingCartComponent {
1936
1928
  this.uiDefinition = uiDef;
1937
1929
  this.state$.next({ loading: false, failure: false });
1938
1930
  }), catchError(err => {
1939
- const message = 'Failed to resolve Shopping cart component. ' + (err.message ?? '');
1931
+ const message = 'Failed to resolve Shopping Cart component. ' + (err.message ?? '');
1940
1932
  this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
1941
1933
  this.uiDefinition = undefined;
1942
1934
  this.state$.next({ loading: false, failure: true });
@@ -1948,37 +1940,36 @@ class ShoppingCartComponent {
1948
1940
  this.destroyed$.next();
1949
1941
  this.destroyed$.complete();
1950
1942
  }
1951
- getTemplateRootComponent$(template) {
1952
- return this.templatesApi
1953
- .fetchComponents$(template.id)
1954
- .pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
1955
- }
1956
- getLocalShoppingCartComponentMeta$() {
1957
- if (!this.customizationService?.getShoppingCartComponent) {
1943
+ getLocalMeta$() {
1944
+ if (!this.customizationService?.getTemplateComponents) {
1958
1945
  return of(undefined);
1959
1946
  }
1960
- return this.customizationService?.getShoppingCartComponent(this.templateApiName).pipe(map(component => {
1961
- if (!component) {
1947
+ return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
1948
+ if (!components) {
1962
1949
  return;
1963
1950
  }
1964
- return {
1951
+ return components.map(component => ({
1965
1952
  html: component.html,
1966
1953
  css: component.css,
1967
1954
  js: component.js,
1968
1955
  json: component.json,
1969
- };
1956
+ }));
1970
1957
  }));
1971
1958
  }
1972
- getShoppingCartComponentMeta$() {
1973
- return this.templatesApi.fetchTemplates$().pipe(map(templates => templates.find(template => template.name === this.templateApiName)), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
1959
+ getOrgMeta$() {
1960
+ const template = this.flowInfo.templates.SHOPPING_CART;
1961
+ if (!template) {
1962
+ return of(undefined);
1963
+ }
1964
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
1974
1965
  }
1975
1966
  generateUIDefinition$() {
1976
1967
  return of(undefined).pipe(tap(() => {
1977
1968
  if (!this.templateApiName) {
1978
- throw new Error("Flow Query parameter 'cartTemplateApiName' is missing.");
1969
+ throw new Error("Flow 'shoppingCart' template is not defined.");
1979
1970
  }
1980
- }), switchMap(() => this.getLocalShoppingCartComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getShoppingCartComponentMeta$())), map(meta => {
1981
- if (!meta) {
1971
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1972
+ if (!metaList) {
1982
1973
  return;
1983
1974
  }
1984
1975
  const uiDef = {
@@ -1987,25 +1978,23 @@ class ShoppingCartComponent {
1987
1978
  primary: true,
1988
1979
  type: 'DEFAULT',
1989
1980
  version: 2,
1990
- children: [
1991
- {
1992
- children: [],
1993
- template: meta.html && btoa(meta.html),
1994
- script: meta.js && btoa(meta.js),
1995
- styles: meta.css && btoa(meta.css),
1996
- },
1997
- ],
1981
+ children: metaList.map(meta => ({
1982
+ children: [],
1983
+ template: meta.html && btoaSafe(meta.html),
1984
+ script: meta.js && btoaSafe(meta.js),
1985
+ styles: meta.css && btoaSafe(meta.css),
1986
+ })),
1998
1987
  };
1999
1988
  return uiDef;
2000
1989
  }));
2001
1990
  }
2002
1991
  }
2003
- ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$4.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2004
- ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1992
+ ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1993
+ ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2005
1994
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
2006
1995
  type: Component,
2007
1996
  args: [{ selector: 'vl-flow-shopping-cart', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
2008
- }], ctorParameters: function () { return [{ type: i1$4.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
1997
+ }], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
2009
1998
  type: Optional
2010
1999
  }, {
2011
2000
  type: Inject,
@@ -2027,144 +2016,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2027
2016
  }] });
2028
2017
 
2029
2018
  class FlowResolver {
2030
- constructor(router, flowsApiService, routerService, contextService, flowService) {
2019
+ constructor(router, routerService, contextService, flowInfo) {
2031
2020
  this.router = router;
2032
- this.flowsApiService = flowsApiService;
2033
2021
  this.routerService = routerService;
2034
2022
  this.contextService = contextService;
2035
- this.flowService = flowService;
2036
- }
2037
- handleError(route, message, queryParams) {
2038
- const parentUrl = this.routerService.getFlowRootPath(route);
2039
- return this.router.navigate([parentUrl, '404'], {
2040
- queryParams,
2041
- state: {
2042
- message: message,
2043
- },
2044
- });
2023
+ this.flowInfo = flowInfo;
2045
2024
  }
2046
2025
  resolve(route) {
2047
2026
  const { queryParams } = route;
2048
- const { flowId } = queryParams;
2049
- if (!flowId) {
2050
- return this.handleError(route);
2027
+ const flow = this.flowInfo.flow;
2028
+ if (!flow) {
2029
+ return of(false);
2051
2030
  }
2052
- return this.flowsApiService.getFlow(flowId).pipe(map$1(flow => {
2053
- if (!flow) {
2054
- return this.handleError(route, `Flow with flowId=${flowId} is not defined`);
2055
- }
2056
- const { properties } = flow;
2057
- const { queryParams: flowQueryParams, entryPath } = properties;
2058
- const mergedQueryParams = {
2059
- ...queryParams,
2060
- ...flowQueryParams,
2061
- };
2062
- const contextProperties = Object.entries({
2063
- ...mergedQueryParams,
2064
- ...getDefaultProperties({ flowParams: properties }),
2065
- }).reduce((trunk, [key, value]) => ({ ...trunk, [key]: String(value) }), {});
2066
- this.contextService.update({ properties: contextProperties });
2067
- this.flowService.setFlow(flow);
2068
- const parentUrl = this.routerService.getFlowRootPath(route);
2069
- const entryUrl = String(entryPath ?? '')
2070
- .split('/')
2071
- .filter(Boolean);
2072
- return this.router
2073
- .navigate([parentUrl, ...entryUrl], {
2074
- queryParams: mergedQueryParams,
2075
- replaceUrl: true,
2076
- })
2077
- .catch(e => {
2078
- const message = e instanceof HttpErrorResponse ? e.error.message : e;
2079
- return this.handleError(route, message, mergedQueryParams);
2080
- });
2031
+ const { properties } = flow;
2032
+ const { queryParams: flowQueryParams, entryPath } = properties;
2033
+ const mergedQueryParams = {
2034
+ ...queryParams,
2035
+ ...flowQueryParams,
2036
+ };
2037
+ const contextProperties = Object.entries({
2038
+ ...mergedQueryParams,
2039
+ ...getDefaultProperties({ flowParams: properties }),
2040
+ }).reduce((trunk, [key, value]) => ({ ...trunk, [key]: String(value) }), {});
2041
+ this.contextService.update({ properties: contextProperties });
2042
+ this.flowInfo.flow = flow;
2043
+ const parentUrl = this.routerService.getFlowRootPath(route);
2044
+ const entryUrl = String(entryPath ?? '')
2045
+ .split('/')
2046
+ .filter(Boolean);
2047
+ return from(this.router.navigate([parentUrl, ...entryUrl], {
2048
+ queryParams: mergedQueryParams,
2049
+ replaceUrl: true,
2050
+ })).pipe(catchError$1(e => {
2051
+ const message = e instanceof HttpErrorResponse ? e.error.message : e;
2052
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
2053
+ return this.routerService.showErrorPage$(message, errorDetails);
2081
2054
  }));
2082
2055
  }
2083
2056
  }
2084
- FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$1.Router }, { token: i1$4.FlowsApiService }, { token: FlowRouterService }, { token: i1$2.ContextService }, { token: FlowService }], target: i0.ɵɵFactoryTarget.Injectable });
2057
+ FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
2085
2058
  FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
2086
2059
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
2087
2060
  type: Injectable
2088
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$4.FlowsApiService }, { type: FlowRouterService }, { type: i1$2.ContextService }, { type: FlowService }]; } });
2061
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }]; } });
2089
2062
 
2090
2063
  class QuoteResolver {
2091
- constructor(router, quoteDraftService, routerService, contextService, flowConfiguration, integrationState, flowService) {
2064
+ constructor(router, quoteDraftService, routerService, contextService, flowInfo, flowStateService) {
2092
2065
  this.router = router;
2093
2066
  this.quoteDraftService = quoteDraftService;
2094
2067
  this.routerService = routerService;
2095
2068
  this.contextService = contextService;
2096
- this.flowConfiguration = flowConfiguration;
2097
- this.integrationState = integrationState;
2098
- this.flowService = flowService;
2099
- }
2100
- handleError(route, message) {
2101
- const parentUrl = this.routerService.getFlowRootPath(route);
2102
- return from(this.router.navigate([parentUrl, '404'], { state: { message } }));
2103
- }
2104
- calculate$() {
2105
- const quoteDraft = this.quoteDraftService.quoteDraft;
2106
- if (!this.quoteDraftService.isStandalone && quoteDraft && !this.accountHasNotAssets()) {
2107
- return this.flowConfiguration.calculate$(quoteDraft);
2108
- }
2109
- return of(undefined);
2069
+ this.flowInfo = flowInfo;
2070
+ this.flowStateService = flowStateService;
2110
2071
  }
2111
2072
  resolve(route) {
2112
- const { headerId } = this.contextService.resolve();
2113
- const quote = this.quoteDraftService.quoteDraft;
2114
- if (quote && quote.quoteId === headerId) {
2073
+ const flow = this.flowInfo.flow;
2074
+ if (!flow) {
2075
+ return of(false);
2076
+ }
2077
+ if (this.flowStateService.isInitialized()) {
2115
2078
  return of(true);
2116
2079
  }
2117
- const queryParams = route.queryParams;
2118
- return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.calculate$()), tap(() => {
2119
- const canNavigate = !this.flowService.flow?.properties.suppressInitialNavigation;
2120
- if (!this.quoteDraftService.isStandalone && canNavigate) {
2121
- if (this.shouldNavigateToAssets()) {
2122
- this.changeNavigation('/assets', route);
2123
- }
2124
- else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.hasProducts) {
2125
- this.changeNavigation('/cart', route);
2126
- }
2127
- }
2128
- this.initializeModifiedAssetsMap();
2129
- this.quoteDraftService.isInitialized = true;
2130
- this.quoteDraftService.hasUnsavedChanges = false;
2131
- }), catchError(e => {
2080
+ return this.flowStateService.init$().pipe(switchMap(() => this.checkDynamicNavigation$(route)), catchError(e => {
2132
2081
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
2133
- return this.handleError(route, message);
2082
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
2083
+ return this.routerService.showErrorPage$(message, errorDetails);
2134
2084
  }));
2135
2085
  }
2136
- changeNavigation(path, route) {
2137
- const parentUrl = this.routerService.getFlowRootPath(route);
2138
- this.router
2139
- .navigate([parentUrl + path], {
2140
- queryParams: route.queryParams,
2141
- replaceUrl: true,
2142
- })
2143
- .catch(e => {
2144
- const message = e instanceof HttpErrorResponse ? e.error.message : e;
2145
- return this.handleError(route, message);
2146
- });
2147
- }
2148
- shouldNavigateToAssets() {
2149
- if (this.contextService.mode === ConfigurationContextMode.ACCOUNT) {
2150
- return true;
2086
+ checkDynamicNavigation$(route) {
2087
+ const flow = this.flowInfo.flow;
2088
+ if (!flow) {
2089
+ return of(true);
2151
2090
  }
2152
- return this.quoteDraftService.quoteDraft?.currentState.some(li => !!li.assetId) ?? false;
2153
- }
2154
- accountHasNotAssets() {
2155
- return this.contextService.mode === ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasProducts;
2091
+ if (flow.properties.suppressInitialNavigation || flow.properties.standalone) {
2092
+ return of(true);
2093
+ }
2094
+ return this.getNavigateTo().pipe(switchMap(navigateTo => {
2095
+ if (!navigateTo) {
2096
+ return of(true);
2097
+ }
2098
+ const parentUrl = this.routerService.getFlowRootPath(route);
2099
+ return from(this.router.navigate([parentUrl + navigateTo], {
2100
+ queryParams: route.queryParams,
2101
+ replaceUrl: true,
2102
+ }));
2103
+ }));
2156
2104
  }
2157
- initializeModifiedAssetsMap() {
2158
- this.integrationState.patchState({
2159
- modifiedAssets: generateModifiedAssetsMap(this.quoteDraftService.currentState),
2160
- });
2105
+ getNavigateTo() {
2106
+ const flow = this.flowInfo.flow;
2107
+ let navigateTo;
2108
+ if (flow?.properties.stateful) {
2109
+ return this.flowStateService.select$(UITemplateType.FLOW_ENGINE, 'NAVIGATE_TO').pipe(map(r => {
2110
+ if (r.success) {
2111
+ return r.result;
2112
+ }
2113
+ return '';
2114
+ }));
2115
+ }
2116
+ else {
2117
+ const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
2118
+ if (isAccountMode || this.quoteDraftService.hasAssets) {
2119
+ navigateTo = '/assets';
2120
+ }
2121
+ else if (this.quoteDraftService.hasProducts) {
2122
+ navigateTo = '/cart';
2123
+ }
2124
+ }
2125
+ return of(navigateTo);
2161
2126
  }
2162
2127
  }
2163
- QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$1.Router }, { token: i1$2.QuoteDraftService }, { token: FlowRouterService }, { token: i1$2.ContextService }, { token: i1$2.FlowConfigurationService }, { token: i1$3.IntegrationState }, { token: FlowService }], target: i0.ɵɵFactoryTarget.Injectable });
2128
+ QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i2.QuoteDraftService }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
2164
2129
  QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver });
2165
2130
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, decorators: [{
2166
2131
  type: Injectable
2167
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$2.QuoteDraftService }, { type: FlowRouterService }, { type: i1$2.ContextService }, { type: i1$2.FlowConfigurationService }, { type: i1$3.IntegrationState }, { type: FlowService }]; } });
2132
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.QuoteDraftService }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
2168
2133
 
2169
2134
  const rootRoute = {
2170
2135
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -2175,7 +2140,7 @@ const rootRoute = {
2175
2140
  children: [
2176
2141
  {
2177
2142
  path: '',
2178
- canActivate: [initFlow],
2143
+ canActivate: [keepFlowInitialized],
2179
2144
  runGuardsAndResolvers: 'always',
2180
2145
  children: [
2181
2146
  {
@@ -2218,14 +2183,6 @@ const rootRoute = {
2218
2183
  canActivate: [ContextGuard],
2219
2184
  data: { showHeader: true },
2220
2185
  },
2221
- {
2222
- path: 'empty',
2223
- component: EmptyAccountComponent,
2224
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2225
- resolve: { quote: QuoteResolver },
2226
- canActivate: [ContextGuard],
2227
- data: { showHeader: true },
2228
- },
2229
2186
  {
2230
2187
  path: 'remote',
2231
2188
  component: RemoteComponent,
@@ -2248,19 +2205,17 @@ const rootRoute = {
2248
2205
  class FlowRoutingModule {
2249
2206
  }
2250
2207
  FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2251
- FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$1.RouterModule, ProductModule,
2208
+ FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
2252
2209
  ShoppingCartModule,
2253
2210
  CatalogModule,
2254
2211
  AssetsModule,
2255
- RemoteModule,
2256
- EmptyAccountModule], exports: [RouterModule] });
2212
+ RemoteModule], exports: [RouterModule] });
2257
2213
  FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [RouterModule.forChild([rootRoute]),
2258
2214
  ProductModule,
2259
2215
  ShoppingCartModule,
2260
2216
  CatalogModule,
2261
2217
  AssetsModule,
2262
- RemoteModule,
2263
- EmptyAccountModule, RouterModule] });
2218
+ RemoteModule, RouterModule] });
2264
2219
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, decorators: [{
2265
2220
  type: NgModule,
2266
2221
  args: [{
@@ -2271,18 +2226,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2271
2226
  CatalogModule,
2272
2227
  AssetsModule,
2273
2228
  RemoteModule,
2274
- EmptyAccountModule,
2275
2229
  ],
2276
2230
  exports: [RouterModule],
2277
2231
  providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver],
2278
2232
  }]
2279
2233
  }] });
2280
2234
 
2281
- class FlowGuidedSellingService {
2235
+ class FlowDocGenService {
2282
2236
  constructor(integrationState) {
2283
2237
  this.integrationState = integrationState;
2284
2238
  this.cleanup$ = new Subject();
2285
- this.isVisibleSubj$ = new BehaviorSubject(true);
2239
+ this.isVisibleSubj$ = new BehaviorSubject(false);
2286
2240
  this.isVisible$ = this.isVisibleSubj$.asObservable();
2287
2241
  this.initSubscriptions();
2288
2242
  }
@@ -2291,20 +2245,20 @@ class FlowGuidedSellingService {
2291
2245
  }
2292
2246
  initSubscriptions() {
2293
2247
  this.integrationState
2294
- .listen$(FlowAction.OPEN_GUIDED_SELLING)
2248
+ .listen$(FlowAction.FLOW_OPEN_DOC_GEN)
2295
2249
  .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
2296
2250
  .subscribe();
2297
2251
  this.integrationState
2298
- .listen$(FlowAction.CLOSE_GUIDED_SELLING)
2252
+ .listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
2299
2253
  .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
2300
2254
  .subscribe();
2301
2255
  }
2302
2256
  }
2303
- FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i1$3.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
2304
- FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
2305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
2257
+ FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
2258
+ FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
2259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
2306
2260
  type: Injectable
2307
- }], ctorParameters: function () { return [{ type: i1$3.IntegrationState }]; } });
2261
+ }], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
2308
2262
 
2309
2263
  const configurePrimengShadowDOM = () => {
2310
2264
  DomHandler.getScrollableParents = (element) => {
@@ -2389,5 +2343,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2389
2343
  * Generated bundle index. Do not edit.
2390
2344
  */
2391
2345
 
2392
- export { ContextGuard, FLOW_CUSTOMIZATION, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
2346
+ export { ContextGuard, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
2393
2347
  //# sourceMappingURL=veloceapps-sdk.mjs.map