@veloceapps/sdk 11.0.0-8 → 11.0.0-81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/cms/cms.actions.d.ts +92 -29
  2. package/cms/components/element-renderer/element-renderer.component.d.ts +3 -10
  3. package/cms/components/preview/preview.component.d.ts +5 -6
  4. package/cms/components/preview/preview.types.d.ts +0 -4
  5. package/cms/services/element-context.service.d.ts +0 -1
  6. package/cms/types/common.types.d.ts +2 -0
  7. package/cms/types/index.d.ts +0 -1
  8. package/cms/utils/path.utils.d.ts +1 -2
  9. package/cms/vendor-map.d.ts +17 -40
  10. package/core/index.d.ts +1 -1
  11. package/core/modules/configuration/index.d.ts +3 -4
  12. package/core/modules/configuration/services/configuration-runtime.service.d.ts +8 -19
  13. package/core/modules/configuration/services/configuration-state.service.d.ts +8 -8
  14. package/core/modules/configuration/services/configuration.service.d.ts +23 -47
  15. package/core/modules/configuration/services/test-mode-configuration.service.d.ts +23 -0
  16. package/core/modules/configuration/types/configuration-runtime.types.d.ts +0 -5
  17. package/core/modules/configuration/types/configuration.types.d.ts +4 -2
  18. package/core/modules/configuration/types/index.d.ts +2 -0
  19. package/core/modules/flow-configuration/index.d.ts +0 -3
  20. package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +11 -38
  21. package/core/operators/filter-successful-execute.operator.d.ts +3 -0
  22. package/core/operators/index.d.ts +1 -0
  23. package/core/services/catalog-products.service.d.ts +11 -0
  24. package/core/services/flow-info.service.d.ts +27 -12
  25. package/core/services/flow-state-configuration.service.d.ts +2 -8
  26. package/core/services/flow-state.service.d.ts +12 -24
  27. package/core/services/index.d.ts +3 -3
  28. package/core/services/integration.state.d.ts +1 -1
  29. package/core/services/product-images.service.d.ts +3 -3
  30. package/core/services/runtime-settings.service.d.ts +1 -1
  31. package/core/services/sales-transaction.service.d.ts +27 -0
  32. package/core/types/flow-customization.types.d.ts +2 -2
  33. package/core/types/flow-state.types.d.ts +2 -2
  34. package/core/types/index.d.ts +0 -1
  35. package/core/utils/index.d.ts +2 -2
  36. package/core/utils/transaction-item.utils.d.ts +7 -0
  37. package/core/utils/transaction-item.worker.d.ts +8 -0
  38. package/esm2020/cms/cms.actions.mjs +93 -71
  39. package/esm2020/cms/cms.default.mjs +2 -3
  40. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +7 -64
  41. package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
  42. package/esm2020/cms/components/preview/preview.component.mjs +19 -28
  43. package/esm2020/cms/components/preview/preview.types.mjs +1 -1
  44. package/esm2020/cms/services/element-context.service.mjs +1 -1
  45. package/esm2020/cms/types/common.types.mjs +1 -1
  46. package/esm2020/cms/types/index.mjs +1 -2
  47. package/esm2020/cms/utils/element.utils.mjs +3 -3
  48. package/esm2020/cms/utils/elements-resolver.mjs +16 -5
  49. package/esm2020/cms/utils/path.utils.mjs +1 -10
  50. package/esm2020/cms/vendor-map.mjs +17 -18
  51. package/esm2020/core/core.module.mjs +7 -7
  52. package/esm2020/core/index.mjs +2 -2
  53. package/esm2020/core/modules/configuration/configuration.module.mjs +14 -4
  54. package/esm2020/core/modules/configuration/index.mjs +4 -5
  55. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +16 -101
  56. package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +69 -77
  57. package/esm2020/core/modules/configuration/services/configuration.service.mjs +109 -223
  58. package/esm2020/core/modules/configuration/services/test-mode-configuration.service.mjs +74 -0
  59. package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +1 -1
  60. package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
  61. package/esm2020/core/modules/configuration/types/index.mjs +3 -0
  62. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +3 -4
  63. package/esm2020/core/modules/flow-configuration/index.mjs +1 -4
  64. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +44 -128
  65. package/esm2020/core/operators/filter-successful-execute.operator.mjs +5 -0
  66. package/esm2020/core/operators/index.mjs +2 -0
  67. package/esm2020/core/services/catalog-products.service.mjs +25 -0
  68. package/esm2020/core/services/flow-info.service.mjs +82 -31
  69. package/esm2020/core/services/flow-state-configuration.service.mjs +10 -25
  70. package/esm2020/core/services/flow-state.service.mjs +58 -180
  71. package/esm2020/core/services/index.mjs +4 -4
  72. package/esm2020/core/services/integration.state.mjs +2 -2
  73. package/esm2020/core/services/product-images.service.mjs +8 -8
  74. package/esm2020/core/services/runtime-settings.service.mjs +3 -3
  75. package/esm2020/core/services/sales-transaction.service.mjs +62 -0
  76. package/esm2020/core/types/flow-customization.types.mjs +1 -1
  77. package/esm2020/core/types/flow-state.types.mjs +1 -1
  78. package/esm2020/core/types/index.mjs +1 -2
  79. package/esm2020/core/utils/index.mjs +3 -3
  80. package/esm2020/core/utils/transaction-item.utils.mjs +60 -0
  81. package/esm2020/core/utils/transaction-item.worker.mjs +16 -0
  82. package/esm2020/src/components/flow-header/flow-header.component.mjs +8 -12
  83. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +8 -12
  84. package/esm2020/src/flow-routing.module.mjs +12 -41
  85. package/esm2020/src/flow.component.mjs +5 -5
  86. package/esm2020/src/guards/flow.guard.mjs +13 -14
  87. package/esm2020/src/guards/product-unload.guard.mjs +7 -9
  88. package/esm2020/src/index.mjs +1 -3
  89. package/esm2020/src/pages/assets/assets.component.mjs +8 -9
  90. package/esm2020/src/pages/catalog/catalog.component.mjs +8 -9
  91. package/esm2020/src/pages/debug/debug.component.mjs +14 -23
  92. package/esm2020/src/pages/product/product.component.mjs +12 -89
  93. package/esm2020/src/pages/product/product.module.mjs +5 -5
  94. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +5 -6
  95. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +8 -9
  96. package/esm2020/src/resolvers/flow.resolver.mjs +10 -18
  97. package/esm2020/src/resolvers/pcm-model.resolver.mjs +12 -0
  98. package/esm2020/src/resolvers/sales-transaction.resolver.mjs +64 -0
  99. package/esm2020/src/resolvers/ui-definition.resolver.mjs +42 -0
  100. package/esm2020/src/services/flow-dialog.service.mjs +8 -8
  101. package/esm2020/src/services/flow-router.service.mjs +16 -33
  102. package/esm2020/src/services/flow.service.mjs +13 -54
  103. package/esm2020/src/types/index.mjs +2 -3
  104. package/esm2020/src/types/route.types.mjs +1 -1
  105. package/fesm2015/veloceapps-sdk-cms.mjs +162 -309
  106. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  107. package/fesm2015/veloceapps-sdk-core.mjs +812 -1663
  108. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  109. package/fesm2015/veloceapps-sdk.mjs +188 -801
  110. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  111. package/fesm2020/veloceapps-sdk-cms.mjs +158 -300
  112. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  113. package/fesm2020/veloceapps-sdk-core.mjs +860 -1732
  114. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  115. package/fesm2020/veloceapps-sdk.mjs +188 -795
  116. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  117. package/package.json +1 -1
  118. package/src/components/flow-header/flow-header.component.d.ts +3 -3
  119. package/src/components/guided-selling/guided-selling.component.d.ts +3 -3
  120. package/src/flow-routing.module.d.ts +1 -2
  121. package/src/flow.component.d.ts +2 -2
  122. package/src/guards/product-unload.guard.d.ts +5 -6
  123. package/src/index.d.ts +0 -2
  124. package/src/pages/assets/assets.component.d.ts +3 -3
  125. package/src/pages/catalog/catalog.component.d.ts +3 -3
  126. package/src/pages/debug/debug.component.d.ts +2 -5
  127. package/src/pages/product/product.component.d.ts +5 -14
  128. package/src/pages/product/product.module.d.ts +1 -1
  129. package/src/pages/record-not-found/record-not-found.component.d.ts +2 -3
  130. package/src/pages/shopping-cart/shopping-cart.component.d.ts +3 -3
  131. package/src/resolvers/flow.resolver.d.ts +5 -6
  132. package/src/resolvers/pcm-model.resolver.d.ts +3 -0
  133. package/src/resolvers/sales-transaction.resolver.d.ts +18 -0
  134. package/src/resolvers/ui-definition.resolver.d.ts +3 -0
  135. package/src/services/flow-dialog.service.d.ts +5 -4
  136. package/src/services/flow-router.service.d.ts +4 -6
  137. package/src/services/flow.service.d.ts +2 -7
  138. package/src/types/index.d.ts +1 -2
  139. package/src/types/route.types.d.ts +0 -5
  140. package/cms/plugins/configuration.plugin.d.ts +0 -23
  141. package/cms/types/configuration.types.d.ts +0 -21
  142. package/core/modules/configuration/helpers.d.ts +0 -6
  143. package/core/modules/configuration/services/runtime-context.service.d.ts +0 -12
  144. package/core/modules/flow-configuration/services/flow-update.service.d.ts +0 -13
  145. package/core/modules/flow-configuration/types/update.types.d.ts +0 -12
  146. package/core/services/context.service.d.ts +0 -23
  147. package/core/services/quote-draft.service.d.ts +0 -50
  148. package/core/types/runtime.types.d.ts +0 -30
  149. package/core/utils/line-item.utils.d.ts +0 -25
  150. package/core/utils/line-item.worker.d.ts +0 -9
  151. package/esm2020/cms/plugins/configuration.plugin.mjs +0 -109
  152. package/esm2020/cms/types/configuration.types.mjs +0 -2
  153. package/esm2020/core/modules/configuration/helpers.mjs +0 -73
  154. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +0 -45
  155. package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +0 -138
  156. package/esm2020/core/modules/flow-configuration/types/update.types.mjs +0 -2
  157. package/esm2020/core/services/context.service.mjs +0 -91
  158. package/esm2020/core/services/quote-draft.service.mjs +0 -192
  159. package/esm2020/core/types/runtime.types.mjs +0 -16
  160. package/esm2020/core/utils/line-item.utils.mjs +0 -187
  161. package/esm2020/core/utils/line-item.worker.mjs +0 -19
  162. package/esm2020/src/guards/context.guard.mjs +0 -91
  163. package/esm2020/src/guards/index.mjs +0 -2
  164. package/esm2020/src/pages/remote/remote.component.mjs +0 -342
  165. package/esm2020/src/pages/remote/remote.module.mjs +0 -20
  166. package/esm2020/src/pages/remote/remote.types.mjs +0 -2
  167. package/esm2020/src/resolvers/quote.resolver.mjs +0 -82
  168. package/esm2020/src/types/context-route.types.mjs +0 -2
  169. package/esm2020/src/types/metrics.types.mjs +0 -2
  170. package/esm2020/src/utils/flow.utils.mjs +0 -25
  171. package/esm2020/src/utils/index.mjs +0 -2
  172. package/src/guards/context.guard.d.ts +0 -19
  173. package/src/guards/index.d.ts +0 -1
  174. package/src/pages/remote/remote.component.d.ts +0 -46
  175. package/src/pages/remote/remote.module.d.ts +0 -10
  176. package/src/pages/remote/remote.types.d.ts +0 -4
  177. package/src/resolvers/quote.resolver.d.ts +0 -19
  178. package/src/types/context-route.types.d.ts +0 -5
  179. package/src/types/metrics.types.d.ts +0 -5
  180. package/src/utils/flow.utils.d.ts +0 -8
  181. package/src/utils/index.d.ts +0 -1
@@ -2,31 +2,31 @@ import * as i4 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Component, ChangeDetectionStrategy, NgModule, Optional, Inject, Injectable, inject } from '@angular/core';
5
- import * as i1$1 from '@veloceapps/api';
6
5
  import { ApiModule } from '@veloceapps/api';
7
- import * as i2$1 from '@veloceapps/components';
6
+ import * as i2 from '@veloceapps/components';
8
7
  import { ToastType, LoaderModule, LetDirectiveModule } from '@veloceapps/components';
9
8
  import * as i5 from '@veloceapps/sdk/cms';
10
9
  import { 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';
10
+ import * as i3$1 from '@veloceapps/sdk/core';
11
+ import { FLOW_CUSTOMIZATION, RuntimeSettingsService, FlowStateService, FlowInfoService, SalesTransactionService, ConfigurationService, IntegrationState, ConfigurationRuntimeService, SdkCoreModule } from '@veloceapps/sdk/core';
13
12
  import * as i3 from 'primeng/button';
14
13
  import { ButtonModule } from 'primeng/button';
15
14
  import * as i1 from 'primeng/dynamicdialog';
16
- import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
15
+ import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest } from 'rxjs';
16
+ import * as i1$1 from '@veloceapps/api/v2';
17
+ import { UIDefinitionsAdminApiService } from '@veloceapps/api/v2';
17
18
  import { DomHandler } from 'primeng/dom';
18
19
  import * as i1$2 from '@angular/router';
19
20
  import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
20
- import { UITemplateType, SalesforceIdUtils, mapShoppingCartSettings, getMaxRenewalTermsValue, ConfigurationContextMode, isVeloceError, extractErrorDetails, UUID } from '@veloceapps/core';
21
+ import { SalesforceIdUtils, mapShoppingCartSettings, getMaxRenewalTermsValue, UITemplateType, isVeloceError, extractErrorDetails } from '@veloceapps/core';
21
22
  import { HttpErrorResponse, HttpParams } from '@angular/common/http';
22
- import * as i5$1 from '@angular/forms';
23
+ import * as i4$1 from '@angular/forms';
23
24
  import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
24
25
  import { DropdownModule } from 'primeng/dropdown';
25
- import * as i8 from 'primeng/inputtext';
26
+ import * as i7 from 'primeng/inputtext';
26
27
  import { InputTextModule } from 'primeng/inputtext';
27
- import * as i6 from 'primeng/radiobutton';
28
+ import * as i5$1 from 'primeng/radiobutton';
28
29
  import { RadioButtonModule } from 'primeng/radiobutton';
29
- import * as i2$2 from 'primeng/api';
30
30
  import { catchError as catchError$1 } from 'rxjs/operators';
31
31
 
32
32
  const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
@@ -76,8 +76,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
76
76
  }] });
77
77
 
78
78
  class FlowHeaderComponent {
79
- constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
80
- this.templatesApi = templatesApi;
79
+ constructor(templatesAdminApiService, flowStateService, flowInfo, toastService, customizationService) {
80
+ this.templatesAdminApiService = templatesAdminApiService;
81
81
  this.flowStateService = flowStateService;
82
82
  this.flowInfo = flowInfo;
83
83
  this.toastService = toastService;
@@ -98,9 +98,6 @@ class FlowHeaderComponent {
98
98
  initialize() {
99
99
  var _a, _b, _c;
100
100
  this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.flowHeader) !== null && _c !== void 0 ? _c : '';
101
- if (this.flowInfo.isLegacy && !this.templateApiName) {
102
- return;
103
- }
104
101
  this.generateUIDefinition$()
105
102
  .pipe(tap(uiDef => {
106
103
  if (!uiDef) {
@@ -137,7 +134,7 @@ class FlowHeaderComponent {
137
134
  if (!template) {
138
135
  return of(undefined);
139
136
  }
140
- return this.templatesApi.fetchComponentsAttachments$(template.id);
137
+ return this.templatesAdminApiService.fetchComponentsAttachments$(template.id);
141
138
  }
142
139
  generateUIDefinition$() {
143
140
  return of(undefined).pipe(tap(() => {
@@ -151,7 +148,6 @@ class FlowHeaderComponent {
151
148
  const uiDef = {
152
149
  name: '',
153
150
  createdTimestamp: 0,
154
- primary: true,
155
151
  type: 'DEFAULT',
156
152
  version: 2,
157
153
  children: metaList.map(meta => ({
@@ -165,13 +161,13 @@ class FlowHeaderComponent {
165
161
  }));
166
162
  }
167
163
  }
168
- 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 });
164
+ FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.UITemplatesAdminApiService }, { token: i3$1.FlowStateService }, { token: i3$1.FlowInfoService }, { token: i2.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
169
165
  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 });
170
166
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
171
167
  type: Component,
172
168
  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"] }]
173
169
  }], ctorParameters: function () {
174
- return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
170
+ return [{ type: i1$1.UITemplatesAdminApiService }, { type: i3$1.FlowStateService }, { type: i3$1.FlowInfoService }, { type: i2.ToastService }, { type: undefined, decorators: [{
175
171
  type: Optional
176
172
  }, {
177
173
  type: Inject,
@@ -194,8 +190,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
194
190
  }] });
195
191
 
196
192
  class GuidedSellingComponent {
197
- constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
198
- this.templatesApi = templatesApi;
193
+ constructor(templatesAdminApiService, flowStateService, flowInfo, toastService, customizationService) {
194
+ this.templatesAdminApiService = templatesAdminApiService;
199
195
  this.flowStateService = flowStateService;
200
196
  this.flowInfo = flowInfo;
201
197
  this.toastService = toastService;
@@ -216,9 +212,6 @@ class GuidedSellingComponent {
216
212
  initialize() {
217
213
  var _a, _b, _c;
218
214
  this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.guidedSelling) !== null && _c !== void 0 ? _c : '';
219
- if (this.flowInfo.isLegacy && !this.templateApiName) {
220
- return;
221
- }
222
215
  this.generateUIDefinition$()
223
216
  .pipe(tap(uiDef => {
224
217
  if (!uiDef) {
@@ -255,7 +248,7 @@ class GuidedSellingComponent {
255
248
  if (!template) {
256
249
  return of(undefined);
257
250
  }
258
- return this.templatesApi.fetchComponentsAttachments$(template.id);
251
+ return this.templatesAdminApiService.fetchComponentsAttachments$(template.id);
259
252
  }
260
253
  generateUIDefinition$() {
261
254
  return of(undefined).pipe(tap(() => {
@@ -269,7 +262,6 @@ class GuidedSellingComponent {
269
262
  const uiDef = {
270
263
  name: '',
271
264
  createdTimestamp: 0,
272
- primary: true,
273
265
  type: 'DEFAULT',
274
266
  version: 2,
275
267
  children: metaList.map(meta => ({
@@ -283,13 +275,13 @@ class GuidedSellingComponent {
283
275
  }));
284
276
  }
285
277
  }
286
- 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 });
278
+ GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.UITemplatesAdminApiService }, { token: i3$1.FlowStateService }, { token: i3$1.FlowInfoService }, { token: i2.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
287
279
  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 });
288
280
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
289
281
  type: Component,
290
282
  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"] }]
291
283
  }], ctorParameters: function () {
292
- return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
284
+ return [{ type: i1$1.UITemplatesAdminApiService }, { type: i3$1.FlowStateService }, { type: i3$1.FlowInfoService }, { type: i2.ToastService }, { type: undefined, decorators: [{
293
285
  type: Optional
294
286
  }, {
295
287
  type: Inject,
@@ -344,13 +336,11 @@ const configurePrimengShadowDOM = () => {
344
336
  };
345
337
 
346
338
  class FlowRouterService {
347
- constructor(router, route, contextService, integrationState, flowInfoService, flowStateService) {
339
+ constructor(router, route, integrationState, flowInfoService) {
348
340
  this.router = router;
349
341
  this.route = route;
350
- this.contextService = contextService;
351
342
  this.integrationState = integrationState;
352
343
  this.flowInfoService = flowInfoService;
353
- this.flowStateService = flowStateService;
354
344
  this.urlHistory = [];
355
345
  this.getLastChildRoute = (route) => {
356
346
  return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;
@@ -445,7 +435,7 @@ class FlowRouterService {
445
435
  this.router.navigateByUrl(prevUrl);
446
436
  }
447
437
  }
448
- navigateTo(path, productId, lineItemId) {
438
+ navigateTo(path, productId, transactionItemId) {
449
439
  if (path === 'shopping-cart') {
450
440
  this.navigateToShoppingCart();
451
441
  }
@@ -456,31 +446,16 @@ class FlowRouterService {
456
446
  this.navigateToAssets();
457
447
  }
458
448
  else if (path === 'product' && productId) {
459
- this.navigateToProductConfiguration(productId, lineItemId);
449
+ this.navigateToProductConfiguration(productId, transactionItemId);
460
450
  }
461
451
  }
462
- navigateToProductConfiguration(productId, lineItemId) {
463
- let updateContext$;
464
- if (this.flowInfoService.isLegacy) {
465
- updateContext$ = of(undefined).pipe(tap(() => {
466
- this.contextService.update({ properties: { productId, lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '' } });
467
- }));
468
- }
469
- else {
470
- updateContext$ = this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_CONTEXT_PROPERTIES', {
471
- productId,
472
- lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '',
473
- });
474
- }
475
- updateContext$
476
- .pipe(tap(() => {
477
- const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
478
- const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
479
- this.router.navigate([flowRouteUrl, 'product'], {
480
- queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), { productId }),
481
- });
482
- }))
483
- .subscribe();
452
+ navigateToProductConfiguration(productId, transactionItemId) {
453
+ this.flowInfoService.updateContext({ productId, transactionItemId });
454
+ const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
455
+ const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
456
+ this.router.navigate([flowRouteUrl, 'product'], {
457
+ queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), { productId, transactionItemId }),
458
+ });
484
459
  }
485
460
  navigateToShoppingCart() {
486
461
  const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
@@ -517,18 +492,18 @@ class FlowRouterService {
517
492
  this.router.navigate([], { relativeTo: route, queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), queryParams) });
518
493
  }
519
494
  }
520
- 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 });
495
+ 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: i3$1.IntegrationState }, { token: i3$1.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
521
496
  FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
522
497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
523
498
  type: Injectable,
524
499
  args: [{ providedIn: 'root' }]
525
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
500
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i3$1.IntegrationState }, { type: i3$1.FlowInfoService }]; } });
526
501
 
527
502
  class FlowDialogService {
528
- constructor(dialogService, contextService, runtimeSettings) {
503
+ constructor(dialogService, runtimeSettings, flowInfoService) {
529
504
  this.dialogService = dialogService;
530
- this.contextService = contextService;
531
505
  this.runtimeSettings = runtimeSettings;
506
+ this.flowInfoService = flowInfoService;
532
507
  }
533
508
  show(config) {
534
509
  return this.dialogService.open(FlowDialogComponent, {
@@ -550,8 +525,8 @@ class FlowDialogService {
550
525
  }
551
526
  showReadonlyModeDialog() {
552
527
  var _a;
553
- const ctx = this.contextService.resolve();
554
- const objectName = ctx.mode ? ((_a = ctx.mode[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + ctx.mode.substring(1).toLowerCase() : 'Object';
528
+ const mode = this.flowInfoService.context.mode;
529
+ const objectName = mode ? ((_a = mode[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + mode.substring(1).toLowerCase() : 'Object';
555
530
  return this.show({
556
531
  title: 'Error',
557
532
  description: `${objectName} Cannot be Saved`,
@@ -623,22 +598,19 @@ class FlowDialogService {
623
598
  return dialogFunction(dialog);
624
599
  }
625
600
  }
626
- 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 });
601
+ FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i3$1.RuntimeSettingsService }, { token: i3$1.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
627
602
  FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
628
603
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
629
604
  type: Injectable
630
- }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
605
+ }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i3$1.RuntimeSettingsService }, { type: i3$1.FlowInfoService }]; } });
631
606
 
632
607
  class FlowService {
633
- constructor(integrationState, flowRouterService, quoteDraftService, configurationService, configurationStateService, flowDialogService, flowConfigurationService, flowInfoService, flowStateService) {
608
+ constructor(integrationState, flowRouterService, configurationService, configurationStateService, flowDialogService, flowStateService) {
634
609
  this.integrationState = integrationState;
635
610
  this.flowRouterService = flowRouterService;
636
- this.quoteDraftService = quoteDraftService;
637
611
  this.configurationService = configurationService;
638
612
  this.configurationStateService = configurationStateService;
639
613
  this.flowDialogService = flowDialogService;
640
- this.flowConfigurationService = flowConfigurationService;
641
- this.flowInfoService = flowInfoService;
642
614
  this.flowStateService = flowStateService;
643
615
  this.cleanup$ = new Subject();
644
616
  }
@@ -648,16 +620,9 @@ class FlowService {
648
620
  initSubscriptions() {
649
621
  this.integrationState
650
622
  .listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
651
- .pipe(switchMap(payload => {
652
- var _a, _b;
653
- if (this.flowInfoService.isLegacy) {
654
- const productId = (_a = payload.productId) !== null && _a !== void 0 ? _a : (_b = this.quoteDraftService.currentState.find(li => li.id === payload.lineItemId)) === null || _b === void 0 ? void 0 : _b.productId;
655
- return of(Object.assign(Object.assign({}, payload), { productId }));
656
- }
657
- return this.prepareConfiguration$(payload.lineItemId).pipe(map(() => payload));
658
- }), tap(payload => {
623
+ .pipe(tap(payload => {
659
624
  if (payload.productId) {
660
- this.flowRouterService.navigateToProductConfiguration(payload.productId, payload.lineItemId);
625
+ this.flowRouterService.navigateToProductConfiguration(payload.productId, payload.transactionItemId);
661
626
  }
662
627
  else {
663
628
  console.warn("Parameter 'productId' is needed to start configuration");
@@ -681,7 +646,7 @@ class FlowService {
681
646
  this.integrationState.dispatch(FlowAction.ConfigureProductAction(payload));
682
647
  }
683
648
  else {
684
- this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId);
649
+ this.flowRouterService.navigateTo(payload.path, payload.productId, payload.transactionItemId);
685
650
  }
686
651
  }), takeUntil(this.cleanup$))
687
652
  .subscribe();
@@ -701,17 +666,10 @@ class FlowService {
701
666
  .subscribe();
702
667
  this.integrationState
703
668
  .listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
704
- .pipe(switchMap(() => {
705
- if (this.flowInfoService.isLegacy) {
706
- return this.legacyApplyConfiguration();
707
- }
708
- else {
709
- return this.configurationStateService.saveConfiguration(true).pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), switchMap(() => this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'MODIFY_ASSETS', {
710
- addConfiguringAssetId: true,
711
- enable: true,
712
- })));
713
- }
714
- }), tap(() => {
669
+ .pipe(switchMap(() => this.configurationStateService.saveConfiguration()), switchMap(() => this.configurationStateService.cancelConfiguration()), switchMap(() => this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'MODIFY_ASSETS', {
670
+ addConfiguringAssetId: true,
671
+ enable: true,
672
+ })), tap(() => {
715
673
  this.configurationService.hasUnsavedChanges = false;
716
674
  this.flowRouterService.navigateToShoppingCart();
717
675
  }), takeUntil(this.cleanup$))
@@ -727,36 +685,12 @@ class FlowService {
727
685
  .pipe(map(path => path.queryParams['productId']), takeUntil(this.cleanup$))
728
686
  .subscribe(productId => this.integrationState.patchState({ productId }));
729
687
  }
730
- prepareConfiguration$(lineItemId) {
731
- if (!lineItemId) {
732
- return of(undefined);
733
- }
734
- return this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_PRICE_LIST', {
735
- lineItemId,
736
- });
737
- }
738
- legacyApplyConfiguration() {
739
- const quoteDraft = this.quoteDraftService.quoteDraft;
740
- const lineItem = this.configurationService.getSnapshot();
741
- if (!quoteDraft || !lineItem) {
742
- return of(undefined);
743
- }
744
- const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
745
- let updatedState;
746
- if (isNewLineItem) {
747
- updatedState = [...quoteDraft.currentState, lineItem];
748
- }
749
- else {
750
- updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
751
- }
752
- return this.flowConfigurationService.calculate$(Object.assign(Object.assign({}, quoteDraft), { currentState: updatedState }));
753
- }
754
688
  }
755
- 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 });
689
+ FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token: i3$1.ConfigurationService }, { token: i3$1.ConfigurationStateService }, { token: FlowDialogService }, { token: i3$1.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
756
690
  FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
757
691
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
758
692
  type: Injectable
759
- }], 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 }]; } });
693
+ }], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i3$1.ConfigurationService }, { type: i3$1.ConfigurationStateService }, { type: FlowDialogService }, { type: i3$1.FlowStateService }]; } });
760
694
 
761
695
  class FlowGuidedSellingService {
762
696
  constructor(integrationState) {
@@ -780,21 +714,21 @@ class FlowGuidedSellingService {
780
714
  .subscribe();
781
715
  }
782
716
  }
783
- FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
717
+ FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i3$1.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
784
718
  FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
785
719
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
786
720
  type: Injectable
787
- }], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
721
+ }], ctorParameters: function () { return [{ type: i3$1.IntegrationState }]; } });
788
722
 
789
723
  class FlowComponent {
790
- constructor(routerService, flowService, flowInfo, guidedSellingService) {
724
+ constructor(routerService, flowService, flowInfoService, guidedSellingService) {
791
725
  this.routerService = routerService;
792
726
  this.flowService = flowService;
793
- this.flowInfo = flowInfo;
727
+ this.flowInfoService = flowInfoService;
794
728
  this.guidedSellingService = guidedSellingService;
795
729
  this.isLoading$ = this.routerService.loading$;
796
- this.showHeader$ = combineLatest([this.routerService.route$, this.flowInfo.flow$]).pipe(map(([route, flow]) => route.data['showHeader'] && !(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
797
- this.isStandalone$ = this.flowInfo.flow$.pipe(map(flow => Boolean(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
730
+ this.showHeader$ = combineLatest([this.routerService.route$, this.flowInfoService.flow$]).pipe(map(([route, flow]) => route.data['showHeader'] && !(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
731
+ this.isStandalone$ = this.flowInfoService.flow$.pipe(map(flow => Boolean(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
798
732
  this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
799
733
  this.flowService.initSubscriptions();
800
734
  }
@@ -802,135 +736,36 @@ class FlowComponent {
802
736
  this.flowService.cleanup();
803
737
  }
804
738
  }
805
- 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 });
806
- 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", 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: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
739
+ FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i3$1.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
740
+ 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", 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.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
807
741
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
808
742
  type: Component,
809
743
  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", 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"] }]
810
- }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
811
-
812
- const getFlowObjectIdPropertyName = (id) => {
813
- const objectName = SalesforceIdUtils.getSfObjectNameById(id);
814
- switch (objectName) {
815
- case 'Account':
816
- return 'accountId';
817
- case 'Order':
818
- return 'orderId';
819
- case 'Quote':
820
- default:
821
- return 'quoteId';
822
- }
823
- };
824
- const getDefaultProperties = (params) => {
825
- var _a, _b;
826
- const properties = {};
827
- let standalone = (_a = params.flowParams) === null || _a === void 0 ? void 0 : _a.standalone;
828
- if (((_b = params.flowParams) === null || _b === void 0 ? void 0 : _b.entryPath.includes('/product')) || params.mode === ConfigurationContextMode.REMOTE) {
829
- standalone = standalone !== null && standalone !== void 0 ? standalone : true;
830
- }
831
- if (standalone != null) {
832
- properties.standalone = standalone ? 'true' : 'false';
833
- }
834
- return properties;
835
- };
836
-
837
- class ContextGuard {
838
- constructor(router, routerService, contextService, runtimeSettingsService) {
839
- this.router = router;
840
- this.routerService = routerService;
841
- this.contextService = contextService;
842
- this.runtimeSettingsService = runtimeSettingsService;
843
- }
844
- checkActivation(route) {
845
- const { queryParams } = route;
846
- const { accountId, quoteId, orderId } = queryParams;
847
- const rpcMessage = window.RPC_MESSAGE;
848
- const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
849
- // Restrict if mode is not defined
850
- if (mode == null) {
851
- return this.routerService.showErrorPage$('Mode is undefined');
852
- }
853
- const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
854
- // Allow if context is already initialized with the same headerId
855
- if (this.contextService.isInitialized) {
856
- const currentContext = this.contextService.resolve();
857
- if (headerId && currentContext.headerId === headerId) {
858
- return of(true);
859
- }
860
- }
861
- // Initialize context and runtime settings
862
- return forkJoin([this.contextService.create(headerId, mode), this.runtimeSettingsService.create()]).pipe(tap(([context]) => {
863
- this.contextService.update(Object.assign(Object.assign({}, context), { properties: Object.assign(Object.assign(Object.assign({}, context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})), getDefaultProperties({ mode })) }));
864
- // Init currency settings
865
- this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
866
- }), map(() => true), catchError(e => {
867
- const message = e instanceof HttpErrorResponse ? e.error.message : e;
868
- const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
869
- return this.routerService.showErrorPage$(message, errorDetails);
870
- }));
871
- }
872
- canActivate(route) {
873
- return this.checkActivation(route);
874
- }
875
- canActivateChild(childRoute) {
876
- return this.checkActivation(childRoute);
877
- }
878
- get rpcMessageId() {
879
- var _a, _b;
880
- if (!window.RPC_MESSAGE) {
881
- return;
882
- }
883
- const rpcMessage = JSON.parse(window.RPC_MESSAGE);
884
- const veloceReferenceId = (_a = rpcMessage.configuration) === null || _a === void 0 ? void 0 : _a.VeloceReferenceId;
885
- const quoteId = (_b = rpcMessage.quote) === null || _b === void 0 ? void 0 : _b.Id;
886
- return veloceReferenceId || quoteId;
887
- }
888
- getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage) {
889
- if (accountId) {
890
- return ConfigurationContextMode.ACCOUNT;
891
- }
892
- if (quoteId) {
893
- return ConfigurationContextMode.QUOTE;
894
- }
895
- if (orderId) {
896
- return ConfigurationContextMode.ORDER;
897
- }
898
- if (rpcMessage) {
899
- return ConfigurationContextMode.REMOTE;
900
- }
901
- return;
902
- }
903
- }
904
- 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 });
905
- ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard });
906
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, decorators: [{
907
- type: Injectable
908
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
744
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i3$1.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
909
745
 
910
746
  const keepFlowInitialized = (route) => {
911
- const contextService = inject(ContextService);
747
+ const routerService = inject(FlowRouterService);
748
+ const runtimeSettingsService = inject(RuntimeSettingsService);
912
749
  const flowState = inject(FlowStateService);
913
750
  const flowInfoService = inject(FlowInfoService);
914
- const routerService = inject(FlowRouterService);
915
- const quoteDraft = inject(QuoteDraftService);
751
+ const salesTrasnsactionService = inject(SalesTransactionService);
916
752
  const configurationService = inject(ConfigurationService);
917
753
  const integrationState = inject(IntegrationState);
918
754
  const { flowId } = route.queryParams;
919
- const flow = flowInfoService.flow;
920
- if (flow && (flow === null || flow === void 0 ? void 0 : flow.id) === flowId) {
755
+ if (flowInfoService.isFlowInitialized && flowInfoService.flow.id === flowId) {
921
756
  return true;
922
757
  }
923
758
  // Cleanup
924
- flowState.cleanup();
925
- quoteDraft.reset();
759
+ flowState.reset();
760
+ salesTrasnsactionService.reset();
926
761
  configurationService.reset();
927
- integrationState.clear();
928
- flowInfoService.cleanup();
929
- contextService.delete();
762
+ integrationState.reset();
763
+ flowInfoService.reset();
930
764
  if (!flowId) {
931
765
  return true;
932
766
  }
933
- return flowInfoService.init$(flowId, route.queryParams).pipe(map(() => true), catchError(e => {
767
+ return runtimeSettingsService.create().pipe(tap(() => runtimeSettingsService.initCurrency('USD')), switchMap(() => flowInfoService.init$(flowId, route.queryParams)), map(() => true), catchError(e => {
768
+ console.error(e);
934
769
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
935
770
  const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
936
771
  return routerService.showErrorPage$(message, errorDetails);
@@ -938,22 +773,20 @@ const keepFlowInitialized = (route) => {
938
773
  };
939
774
 
940
775
  class ProductUnloadGuard {
941
- constructor(router, contextService, quoteDraftService, configurationService, flowDialogService) {
776
+ constructor(router, flowInfoService, configurationService, flowDialogService) {
942
777
  this.router = router;
943
- this.contextService = contextService;
944
- this.quoteDraftService = quoteDraftService;
778
+ this.flowInfoService = flowInfoService;
945
779
  this.configurationService = configurationService;
946
780
  this.flowDialogService = flowDialogService;
947
781
  }
948
782
  canDeactivate(_, route, currentState, nextState) {
949
783
  let observable = of(true);
950
- if (!this.quoteDraftService.isStandalone && this.configurationService.hasUnsavedChanges) {
784
+ if (!this.flowInfoService.flow.properties.standalone && this.configurationService.hasUnsavedChanges) {
951
785
  observable = this.flowDialogService.showUnsavedChangesDialog();
952
786
  }
953
787
  return observable.pipe(map(unload => {
954
788
  if (unload) {
955
789
  this.configurationService.reset();
956
- this.contextService.update({ properties: { productId: undefined, lineItemId: undefined } });
957
790
  if (!nextState || currentState.url === nextState.url) {
958
791
  return true;
959
792
  }
@@ -971,11 +804,11 @@ class ProductUnloadGuard {
971
804
  }));
972
805
  }
973
806
  }
974
- 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 });
807
+ ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i3$1.FlowInfoService }, { token: i3$1.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
975
808
  ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
976
809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
977
810
  type: Injectable
978
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: FlowDialogService }]; } });
811
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i3$1.FlowInfoService }, { type: i3$1.ConfigurationService }, { type: FlowDialogService }]; } });
979
812
 
980
813
  class RootGuard {
981
814
  constructor(router, routerService) {
@@ -1018,9 +851,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1018
851
  }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
1019
852
 
1020
853
  class AssetsComponent {
1021
- constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
854
+ constructor(templatesAdminApiService, cdr, toastService, flowInfo, customizationService) {
1022
855
  var _a, _b, _c;
1023
- this.templatesApi = templatesApi;
856
+ this.templatesAdminApiService = templatesAdminApiService;
1024
857
  this.cdr = cdr;
1025
858
  this.toastService = toastService;
1026
859
  this.flowInfo = flowInfo;
@@ -1075,7 +908,7 @@ class AssetsComponent {
1075
908
  if (!template) {
1076
909
  return of(undefined);
1077
910
  }
1078
- return this.templatesApi.fetchComponentsAttachments$(template.id);
911
+ return this.templatesAdminApiService.fetchComponentsAttachments$(template.id);
1079
912
  }
1080
913
  generateUIDefinition$() {
1081
914
  return of(undefined).pipe(tap(() => {
@@ -1089,7 +922,6 @@ class AssetsComponent {
1089
922
  const uiDef = {
1090
923
  name: '',
1091
924
  createdTimestamp: 0,
1092
- primary: true,
1093
925
  type: 'DEFAULT',
1094
926
  version: 2,
1095
927
  children: metaList.map(meta => ({
@@ -1103,13 +935,13 @@ class AssetsComponent {
1103
935
  }));
1104
936
  }
1105
937
  }
1106
- 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 });
1107
- 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 });
938
+ AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$1.UITemplatesAdminApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: i3$1.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
939
+ 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.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1108
940
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
1109
941
  type: Component,
1110
942
  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" }]
1111
943
  }], ctorParameters: function () {
1112
- return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
944
+ return [{ type: i1$1.UITemplatesAdminApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: i3$1.FlowInfoService }, { type: undefined, decorators: [{
1113
945
  type: Optional
1114
946
  }, {
1115
947
  type: Inject,
@@ -1132,9 +964,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1132
964
  }] });
1133
965
 
1134
966
  class CatalogComponent {
1135
- constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
967
+ constructor(templatesAdminApiService, cdr, toastService, flowInfo, customizationService) {
1136
968
  var _a, _b, _c;
1137
- this.templatesApi = templatesApi;
969
+ this.templatesAdminApiService = templatesAdminApiService;
1138
970
  this.cdr = cdr;
1139
971
  this.toastService = toastService;
1140
972
  this.flowInfo = flowInfo;
@@ -1189,7 +1021,7 @@ class CatalogComponent {
1189
1021
  if (!template) {
1190
1022
  return of(undefined);
1191
1023
  }
1192
- return this.templatesApi.fetchComponentsAttachments$(template.id);
1024
+ return this.templatesAdminApiService.fetchComponentsAttachments$(template.id);
1193
1025
  }
1194
1026
  generateUIDefinition$() {
1195
1027
  return of(undefined).pipe(tap(() => {
@@ -1203,7 +1035,6 @@ class CatalogComponent {
1203
1035
  const uiDef = {
1204
1036
  name: '',
1205
1037
  createdTimestamp: 0,
1206
- primary: true,
1207
1038
  type: 'DEFAULT',
1208
1039
  version: 2,
1209
1040
  children: metaList.map(meta => ({
@@ -1217,13 +1048,13 @@ class CatalogComponent {
1217
1048
  }));
1218
1049
  }
1219
1050
  }
1220
- 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 });
1221
- 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 });
1051
+ CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$1.UITemplatesAdminApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: i3$1.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1052
+ 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.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1222
1053
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
1223
1054
  type: Component,
1224
1055
  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" }]
1225
1056
  }], ctorParameters: function () {
1226
- return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1057
+ return [{ type: i1$1.UITemplatesAdminApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: i3$1.FlowInfoService }, { type: undefined, decorators: [{
1227
1058
  type: Optional
1228
1059
  }, {
1229
1060
  type: Inject,
@@ -1246,12 +1077,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1246
1077
  }] });
1247
1078
 
1248
1079
  class DebugComponent {
1249
- constructor(flowsApiService, router, activatedRoute, context, quoteDraftService) {
1080
+ constructor(flowsApiService, router, activatedRoute) {
1250
1081
  this.flowsApiService = flowsApiService;
1251
1082
  this.router = router;
1252
1083
  this.activatedRoute = activatedRoute;
1253
- this.context = context;
1254
- this.quoteDraftService = quoteDraftService;
1255
1084
  this.form = new FormGroup({
1256
1085
  id: new FormControl(''),
1257
1086
  });
@@ -1259,15 +1088,11 @@ class DebugComponent {
1259
1088
  }
1260
1089
  runFlow() {
1261
1090
  const { id } = this.form.value;
1262
- const objectPropertyName = id && getFlowObjectIdPropertyName(id);
1263
- if (!id || !objectPropertyName || !this.selectedFlow) {
1091
+ if (!id || !this.selectedFlow) {
1264
1092
  return;
1265
1093
  }
1266
- // Delete context before starting a new flow
1267
- this.context.delete();
1268
- this.quoteDraftService.reset();
1269
1094
  this.router.navigate(['..', 'flows'], {
1270
- queryParams: Object.assign({ flowId: this.selectedFlow.id, [objectPropertyName]: id }, this.selectedFlow.properties.queryParams),
1095
+ queryParams: Object.assign({ flowId: this.selectedFlow.id, headerId: id }, this.selectedFlow.properties.queryParams),
1271
1096
  relativeTo: this.activatedRoute,
1272
1097
  });
1273
1098
  }
@@ -1275,12 +1100,12 @@ class DebugComponent {
1275
1100
  return new HttpParams({ fromObject: params }).toString();
1276
1101
  }
1277
1102
  }
1278
- 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 });
1279
- 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 });
1103
+ 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 }], target: i0.ɵɵFactoryTarget.Component });
1104
+ 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: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$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: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.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: i7.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1280
1105
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
1281
1106
  type: Component,
1282
1107
  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"] }]
1283
- }], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
1108
+ }], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
1284
1109
 
1285
1110
  const routes$1 = [{ path: '', component: DebugComponent }];
1286
1111
  class DebugModule {
@@ -1318,127 +1143,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1318
1143
  }] });
1319
1144
 
1320
1145
  class ProductComponent {
1321
- constructor(contextService, configurationRuntimeService, configurationService, configurationStateService, quoteDraftService, flowInfoService, flowStateService, integrationState, customizationService) {
1322
- this.contextService = contextService;
1146
+ constructor(configurationRuntimeService, configurationStateService) {
1323
1147
  this.configurationRuntimeService = configurationRuntimeService;
1324
- this.configurationService = configurationService;
1325
1148
  this.configurationStateService = configurationStateService;
1326
- this.quoteDraftService = quoteDraftService;
1327
- this.flowInfoService = flowInfoService;
1328
- this.flowStateService = flowStateService;
1329
- this.integrationState = integrationState;
1330
- this.customizationService = customizationService;
1331
- this.uiDefinition$ = new BehaviorSubject(undefined);
1149
+ this.uiDefinitionContainer$ = new BehaviorSubject(null);
1150
+ this.uiDefinitionContainer$.next(this.configurationRuntimeService.uiDefinitionContainer);
1332
1151
  this.config = {
1333
1152
  init$: () => this.init$(),
1334
1153
  };
1335
1154
  }
1336
- customizeUI$() {
1337
- var _a, _b;
1338
- const { productId } = (_a = this.configurationRuntimeService.runtimeContext) !== null && _a !== void 0 ? _a : {};
1339
- if (!productId || !((_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getUiDefinition)) {
1340
- return of(undefined);
1341
- }
1342
- return this.customizationService.getUiDefinition(productId).pipe(map(uiDefinitionContainer => {
1343
- if (uiDefinitionContainer) {
1344
- this.configurationRuntimeService.overrideUIDefinition(uiDefinitionContainer);
1345
- }
1346
- }));
1347
- }
1348
1155
  init$() {
1349
- let quoteDraft$;
1350
- if (this.flowInfoService.isLegacy || !this.flowInfoService.isStateful) {
1351
- quoteDraft$ = this.quoteDraftService.quoteDraft$;
1352
- }
1353
- else {
1354
- quoteDraft$ = of(undefined);
1355
- }
1356
- return quoteDraft$.pipe(first(), switchMap(quote => {
1357
- var _a, _b, _c, _d;
1358
- const contextProperties = this.contextService.resolve().properties;
1359
- const productId = (_a = contextProperties.productId) !== null && _a !== void 0 ? _a : (_b = this.flowInfoService.flow) === null || _b === void 0 ? void 0 : _b.properties.queryParams['productId'];
1360
- const defaultUIDefinitionId = (_c = this.flowInfoService.flow) === null || _c === void 0 ? void 0 : _c.properties.queryParams['defaultUIDefinitionId'];
1361
- const requiredUIDefinitionId = (_d = this.flowInfoService.flow) === null || _d === void 0 ? void 0 : _d.properties.queryParams['requiredUIDefinitionId'];
1362
- if (!productId) {
1363
- throw new Error(`Unable to start configuration for 'productId == null'`);
1364
- }
1365
- if (!quote) {
1366
- const offeringId = contextProperties.offeringId;
1367
- return this.configurationRuntimeService.init({ productId, offeringId });
1368
- }
1369
- const lineItem = this.getLineItem(quote, productId, contextProperties.lineItemId);
1370
- if (lineItem) {
1371
- this.configurationService.setConfigurableRamp(lineItem);
1372
- }
1373
- const { offeringId } = lineItem !== null && lineItem !== void 0 ? lineItem : {};
1374
- return this.configurationRuntimeService.init({
1375
- productId,
1376
- offeringId,
1377
- defaultUIDefinitionId,
1378
- requiredUIDefinitionId,
1379
- });
1380
- }), switchMap(() => this.customizeUI$()), tap(() => {
1381
- var _a, _b;
1382
- const uiDefinition = (_b = (_a = this.configurationRuntimeService.runtimeContext) === null || _a === void 0 ? void 0 : _a.uiDefinitionContainer) === null || _b === void 0 ? void 0 : _b.source;
1383
- if (uiDefinition) {
1384
- this.uiDefinition$.next(uiDefinition);
1385
- }
1386
- else {
1387
- throw new Error('Product does not have Configuration UI');
1388
- }
1389
- }), tap(() => {
1390
- if (this.configurationRuntimeService.initializationProps) {
1391
- this.configurationRuntimeService.initializationProps.attributesMap =
1392
- this.integrationState.state.guidedSelling;
1393
- }
1394
- }), switchMap(() => this.configurationStateService.init$()));
1395
- }
1396
- getLineItem(quote, productId, lineItemId) {
1397
- var _a;
1398
- // search by lineItemId first
1399
- let li = quote.currentState.find(li => li.id === lineItemId);
1400
- if (!li && this.quoteDraftService.isStandalone) {
1401
- li = quote.currentState.find(li => li.productId === productId);
1402
- }
1403
- // If still not found, is could be an asset
1404
- if (!li) {
1405
- li = (_a = this.quoteDraftService.assetsState) === null || _a === void 0 ? void 0 : _a.currentState.find(li => li.id === lineItemId);
1406
- }
1407
- return li;
1156
+ return this.configurationStateService.init$();
1408
1157
  }
1409
1158
  }
1410
- 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 });
1411
- 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 });
1159
+ ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i3$1.ConfigurationRuntimeService }, { token: i3$1.ConfigurationStateService }], target: i0.ɵɵFactoryTarget.Component });
1160
+ 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]=\"(uiDefinitionContainer$ | async)?.source\" [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 });
1412
1161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
1413
1162
  type: Component,
1414
- args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n" }]
1415
- }], ctorParameters: function () {
1416
- 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: [{
1417
- type: Optional
1418
- }, {
1419
- type: Inject,
1420
- args: [FLOW_CUSTOMIZATION]
1421
- }] }];
1422
- } });
1163
+ args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"(uiDefinitionContainer$ | async)?.source\" [config]=\"config\"></vl-cms-preview>\n" }]
1164
+ }], ctorParameters: function () { return [{ type: i3$1.ConfigurationRuntimeService }, { type: i3$1.ConfigurationStateService }]; } });
1423
1165
 
1424
1166
  class ProductModule {
1425
1167
  }
1426
1168
  ProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1427
- ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, declarations: [ProductComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ProductComponent] });
1428
- ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1169
+ ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, declarations: [ProductComponent], imports: [CommonModule, PreviewModule, LoaderModule, LetDirectiveModule], exports: [ProductComponent] });
1170
+ ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, imports: [CommonModule, PreviewModule, LoaderModule, LetDirectiveModule] });
1429
1171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, decorators: [{
1430
1172
  type: NgModule,
1431
1173
  args: [{
1432
1174
  declarations: [ProductComponent],
1433
- imports: [CommonModule, PreviewModule, LoaderModule],
1175
+ imports: [CommonModule, PreviewModule, LoaderModule, LetDirectiveModule],
1434
1176
  exports: [ProductComponent],
1435
1177
  }]
1436
1178
  }] });
1437
1179
 
1438
1180
  class RecordNotFoundComponent {
1439
- constructor(router, route) {
1181
+ constructor(router) {
1440
1182
  this.router = router;
1441
- this.route = route;
1442
1183
  this.subMessage = '';
1443
1184
  this.type = '';
1444
1185
  const navigation = this.router.getCurrentNavigation();
@@ -1451,12 +1192,12 @@ class RecordNotFoundComponent {
1451
1192
  }
1452
1193
  }
1453
1194
  }
1454
- 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 });
1195
+ RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component });
1455
1196
  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 });
1456
1197
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
1457
1198
  type: Component,
1458
1199
  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"] }]
1459
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
1200
+ }], ctorParameters: function () { return [{ type: i1$2.Router }]; } });
1460
1201
 
1461
1202
  const routes = [{ path: '', component: RecordNotFoundComponent }];
1462
1203
  class RecordNotFoundModule {
@@ -1472,361 +1213,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1472
1213
  }]
1473
1214
  }] });
1474
1215
 
1475
- class RemoteComponent {
1476
- constructor(contextService, quoteDraftService, runtimeService, configurationService, configurationState, messageService, integrationState, location) {
1477
- this.contextService = contextService;
1478
- this.quoteDraftService = quoteDraftService;
1479
- this.runtimeService = runtimeService;
1480
- this.configurationService = configurationService;
1481
- this.configurationState = configurationState;
1482
- this.messageService = messageService;
1483
- this.integrationState = integrationState;
1484
- this.location = location;
1485
- this.state$ = new BehaviorSubject({ loading: true, failure: false });
1486
- this.DYNAMIC_OPTION_PRODUCTS_KEY = 'Dynamic';
1487
- this.destroyed$ = new Subject();
1488
- this.rpcMessage = JSON.parse(window.RPC_MESSAGE);
1489
- this.rpcMessage.options.sort((a, b) => { var _a, _b; return ((_a = a.featureNumber) !== null && _a !== void 0 ? _a : 99999) - ((_b = b.featureNumber) !== null && _b !== void 0 ? _b : 99999); });
1490
- this.updateHasChildrenFlag(this.rpcMessage.product.configuredProductId);
1491
- // update context properties
1492
- if (this.rpcMessage.quote) {
1493
- const properties = {};
1494
- if (this.rpcMessage.quote['SBQQ__Opportunity2__c']) {
1495
- properties.OpportunityId = this.rpcMessage.quote['SBQQ__Opportunity2__c'];
1496
- }
1497
- Object.entries(this.rpcMessage.quote).forEach(([key, value]) => {
1498
- if (value !== undefined && !(value instanceof Object)) {
1499
- properties[key] = value;
1500
- }
1501
- });
1502
- this.contextService.update({ properties });
1503
- }
1504
- this.initSubscriptions();
1505
- this.initConfiguration();
1506
- }
1507
- ngOnDestroy() {
1508
- this.destroyed$.next();
1509
- this.destroyed$.complete();
1510
- }
1511
- initConfiguration() {
1512
- const productId = this.rpcMessage.product.configuredProductId;
1513
- const quote = this.quoteDraftService.quoteDraft;
1514
- if (!productId || !quote) {
1515
- return;
1516
- }
1517
- this.runtimeService
1518
- .init({ productId })
1519
- .pipe(first(), tap(context => {
1520
- var _a, _b, _c, _d;
1521
- const uiDefinitionProperties = (_b = (_a = context.uiDefinitionContainer) === null || _a === void 0 ? void 0 : _a.source.properties) !== null && _b !== void 0 ? _b : {};
1522
- this.uiDefinition = (_c = context.uiDefinitionContainer) === null || _c === void 0 ? void 0 : _c.source;
1523
- const pricingEnabled = uiDefinitionProperties.pricingEnabled ? 'true' : 'false';
1524
- const priceListId = uiDefinitionProperties.priceList;
1525
- const runtimeContextProperties = (_d = this.runtimeService.runtimeContext) === null || _d === void 0 ? void 0 : _d.properties;
1526
- if (runtimeContextProperties) {
1527
- runtimeContextProperties.PriceListId = priceListId;
1528
- runtimeContextProperties.PricingEnabled = pricingEnabled;
1529
- }
1530
- this.contextService.update({
1531
- properties: {
1532
- ModelId: context.modelId,
1533
- RuntimeMode: 'TEST',
1534
- PricingEnabled: pricingEnabled,
1535
- PriceListId: priceListId,
1536
- },
1537
- });
1538
- this.configurationService.setConfigurableRamp(this.createLineItem());
1539
- }), this.throwIfNoUIDefinition(), switchMap(() => this.configurationState.init$()), tap(() => this.state$.next({ loading: false, failure: false })), catchError(error => {
1540
- var _a, _b;
1541
- if (!((_b = (_a = this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
1542
- this.messageService.add({ severity: 'error', summary: error });
1543
- }
1544
- this.state$.next({ loading: false, failure: true });
1545
- return of();
1546
- }), takeUntil(this.destroyed$))
1547
- .subscribe();
1548
- }
1549
- throwIfNoUIDefinition() {
1550
- return (source$) => {
1551
- return source$.pipe(switchMap(() => {
1552
- if (!this.uiDefinition) {
1553
- return throwError(() => 'Product does not have Configuration UI');
1554
- }
1555
- return source$;
1556
- }));
1557
- };
1558
- }
1559
- initSubscriptions() {
1560
- this.integrationState
1561
- .listen$(FlowAction.REMOTE_CANCEL)
1562
- .pipe(tap(() => this.location.back()), takeUntil(this.destroyed$))
1563
- .subscribe();
1564
- this.integrationState
1565
- .listen$(FlowAction.REMOTE_APPLY)
1566
- .pipe(tap(() => this.saveRpcMessage()), takeUntil(this.destroyed$))
1567
- .subscribe();
1568
- }
1569
- createLineItem() {
1570
- var _a, _b;
1571
- const [quoteDraftLineItem] = (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState) !== null && _b !== void 0 ? _b : [];
1572
- if (quoteDraftLineItem && (quoteDraftLineItem.attributes.length > 0 || quoteDraftLineItem.lineItems.length > 0)) {
1573
- return quoteDraftLineItem;
1574
- }
1575
- const lineItem = this.createRootLineItem();
1576
- const dynamicOptionProducts = this.rpcMessage.product.optionConfigurations[this.DYNAMIC_OPTION_PRODUCTS_KEY];
1577
- if (dynamicOptionProducts) {
1578
- const options = this.toParentChildMap(dynamicOptionProducts);
1579
- let items = [lineItem];
1580
- for (let i = 0; i < items.length; i++) {
1581
- const item = items[i];
1582
- const children = item && options.get(item.id);
1583
- if (children) {
1584
- item.lineItems = children;
1585
- items = items.concat(children);
1586
- }
1587
- }
1588
- }
1589
- return lineItem;
1590
- }
1591
- createRootLineItem() {
1592
- var _a, _b, _c, _d;
1593
- const product = this.rpcMessage.product;
1594
- const runtimeContext = this.runtimeService.runtimeContext;
1595
- const veloceInstanceId = product.configurationAttributes['VeloceInstanceId__c'];
1596
- const quoteId = (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState[0]) === null || _b === void 0 ? void 0 : _b.id;
1597
- return {
1598
- id: quoteId || veloceInstanceId || UUID.UUID(),
1599
- type: (_c = runtimeContext.productType) !== null && _c !== void 0 ? _c : '',
1600
- name: ((_d = runtimeContext.properties) === null || _d === void 0 ? void 0 : _d['displayName']) || runtimeContext.productName,
1601
- productName: runtimeContext.productName,
1602
- productId: runtimeContext.productId,
1603
- cfgStatus: 'Default',
1604
- actionCode: 'ADD',
1605
- qty: 1,
1606
- };
1607
- }
1608
- toParentChildMap(remoteOptionProducts) {
1609
- var _a;
1610
- const result = new Map();
1611
- for (const option of remoteOptionProducts) {
1612
- const configurationData = (_a = option === null || option === void 0 ? void 0 : option.readOnly) === null || _a === void 0 ? void 0 : _a.line;
1613
- const id = configurationData === null || configurationData === void 0 ? void 0 : configurationData.VeloceInstanceId__c;
1614
- const parentId = configurationData === null || configurationData === void 0 ? void 0 : configurationData.VeloceParentInstanceId__c;
1615
- if (!option.selected || !configurationData || !id || !parentId) {
1616
- continue;
1617
- }
1618
- const productId = option.productId;
1619
- const lineItem = {
1620
- id,
1621
- productId,
1622
- parentId,
1623
- type: configurationData.ModelType__c,
1624
- port: configurationData.ModelPort__c,
1625
- cfgStatus: configurationData.ConfigurationStatus__c,
1626
- actionCode: configurationData.ActionCode__c,
1627
- qty: option.Quantity,
1628
- };
1629
- let siblings = result.get(productId);
1630
- if (!siblings) {
1631
- result.set(parentId, (siblings = []));
1632
- }
1633
- siblings.push(lineItem);
1634
- }
1635
- return result;
1636
- }
1637
- saveRpcMessage() {
1638
- var _a;
1639
- const quote = this.quoteDraftService.quoteDraft;
1640
- const lineItem = this.configurationService.getSnapshot();
1641
- if (!quote || !lineItem) {
1642
- return;
1643
- }
1644
- this.rpcMessage.VeloceReferenceId = quote.quoteId;
1645
- this.rpcMessage.product.configurationData.VeloceInstanceId__c = lineItem.id;
1646
- const childItems = this.flattenChildLineItems(lineItem);
1647
- const savingMode = window.SavingMode;
1648
- this.updateContentData(this.rpcMessage.product, lineItem);
1649
- this.rpcMessage.quote = this.mapAttributesTo('Quote', lineItem);
1650
- if (savingMode === 'ALL') {
1651
- const optionConfigurations = this.getOptionConfigurations(this.rpcMessage.product);
1652
- const rootProductOptions = this.rpcMessage.options.filter(po => po.configuredProductId === lineItem.productId);
1653
- childItems.forEach(lineItem => {
1654
- var _a, _b, _c, _d;
1655
- const rootOption = rootProductOptions.find(po => po.optionalProductId === lineItem.productId);
1656
- if (rootOption) {
1657
- const featureOptions = (_a = optionConfigurations[rootOption.featureName]) !== null && _a !== void 0 ? _a : (optionConfigurations[rootOption.featureName] = []);
1658
- const originOption = !rootOption.hasChildren
1659
- ? (_b = optionConfigurations[rootOption.featureName]) === null || _b === void 0 ? void 0 : _b.find(({ optionId }) => optionId === rootOption.optionId)
1660
- : undefined;
1661
- const option = originOption !== null && originOption !== void 0 ? originOption : {};
1662
- option.optionId = (_c = option.optionId) !== null && _c !== void 0 ? _c : rootOption.optionId;
1663
- this.updateContentData(option, lineItem);
1664
- option.index = (_d = option.index) !== null && _d !== void 0 ? _d : featureOptions.length;
1665
- option.selected = true;
1666
- if (!originOption) {
1667
- featureOptions.push(option);
1668
- }
1669
- if (lineItem.parentLineItem) {
1670
- const nestedProductOption = this.rpcMessage.options.find(po => {
1671
- var _a;
1672
- return po.configuredProductId === ((_a = lineItem.parentLineItem) === null || _a === void 0 ? void 0 : _a.productId) &&
1673
- po.optionalProductId === lineItem.productId;
1674
- });
1675
- if (nestedProductOption) {
1676
- option.configurationData = Object.assign(Object.assign({}, option.configurationData), { VeloceParentInstanceId__c: lineItem.parentLineItem.id, VeloceNestedOptionId__c: nestedProductOption.optionId, VeloceNestedFeatureId__c: nestedProductOption.featureId });
1677
- }
1678
- }
1679
- }
1680
- else {
1681
- this.rpcMessage.dynamicFeatures.forEach(feature => {
1682
- var _a, _b;
1683
- const featureOptions = (_a = optionConfigurations[feature.name]) !== null && _a !== void 0 ? _a : (optionConfigurations[feature.name] = []);
1684
- const originOption = featureOptions.find(({ productId }) => productId === lineItem.productId);
1685
- const option = originOption !== null && originOption !== void 0 ? originOption : {};
1686
- this.updateContentData(option, lineItem);
1687
- option.index = (_b = option.index) !== null && _b !== void 0 ? _b : featureOptions.length;
1688
- option.selected = true;
1689
- if (!originOption) {
1690
- featureOptions.push(option);
1691
- }
1692
- });
1693
- }
1694
- });
1695
- this.rpcMessage.product = Object.assign(Object.assign({}, this.rpcMessage.product), { optionConfigurations });
1696
- }
1697
- (_a = window.RPC_BROADCAST) === null || _a === void 0 ? void 0 : _a.apply(null, [this.rpcMessage]);
1698
- }
1699
- updateHasChildrenFlag(bundleProductId) {
1700
- const bundleOptionsByOptionId = {};
1701
- const notBundleOptions = [];
1702
- for (const productOption of this.rpcMessage.options) {
1703
- if (productOption.configuredProductId === bundleProductId) {
1704
- bundleOptionsByOptionId[productOption.optionalProductId] = productOption;
1705
- }
1706
- else {
1707
- notBundleOptions.push(productOption);
1708
- }
1709
- }
1710
- for (const option of notBundleOptions) {
1711
- const bundleOption = bundleOptionsByOptionId[option.configuredProductId];
1712
- if (bundleOption) {
1713
- bundleOption.hasChildren = true;
1714
- }
1715
- }
1716
- }
1717
- flattenChildLineItems(lineItem) {
1718
- var _a;
1719
- let items = (_a = lineItem.lineItems) !== null && _a !== void 0 ? _a : [];
1720
- for (let i = 0; i < items.length; i++) {
1721
- const item = items[i];
1722
- if (item === null || item === void 0 ? void 0 : item.lineItems) {
1723
- items = items.concat(item.lineItems.map(li => (Object.assign(Object.assign({}, li), { parentLineItem: item }))));
1724
- }
1725
- }
1726
- return items;
1727
- }
1728
- updateContentData(entity, lineItem) {
1729
- var _a, _b;
1730
- if (lineItem.productId) {
1731
- entity.productId = lineItem.productId;
1732
- }
1733
- const quantityAttribute = lineItem.properties['quantityAttribute'];
1734
- entity.Quantity = quantityAttribute
1735
- ? (_b = (_a = lineItem.attributes.find(attribute => attribute.name === quantityAttribute)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 1
1736
- : lineItem.qty;
1737
- const totalPrice = this.computeNetPrice(lineItem);
1738
- const targetTotalPriceField = lineItem.properties['TargetTotalPriceField'] || 'TotalPrice__c';
1739
- entity.configurationData[targetTotalPriceField] = entity.configurationData[targetTotalPriceField]
1740
- ? entity.configurationData[targetTotalPriceField] + totalPrice
1741
- : totalPrice;
1742
- const targetPriceField = lineItem.properties['TargetPriceField'] || 'SBQQ__ListPrice__c';
1743
- const price = entity.Quantity != null ? entity.configurationData[targetTotalPriceField] / entity.Quantity || 0 : 0;
1744
- const targetPriceValue = Number(entity.configurationData[targetPriceField]) || 0;
1745
- entity.configurationData[targetPriceField] = targetPriceValue
1746
- ? (targetPriceValue + price).toFixed(2)
1747
- : price.toFixed(2);
1748
- entity.configurationAttributes = this.mapAttributesTo('Attribute', lineItem);
1749
- entity.configurationData = Object.assign(Object.assign(Object.assign(Object.assign({}, entity.configurationData), this.mapAttributesTo('Field', lineItem)), this.mapAttributesTo('', lineItem)), { VeloceInstanceId__c: lineItem.id });
1750
- }
1751
- computeNetPrice(lineItem) {
1752
- if (lineItem.properties['GroupCharges']) {
1753
- return this.sumNetPrice(lineItem.chargeGroupItems, this.getChargeNameSet(lineItem.properties['GroupCharges']));
1754
- }
1755
- return this.sumNetPrice(lineItem.chargeItems, this.getChargeNameSet(lineItem.properties['Charges']));
1756
- }
1757
- getChargeNameSet(property) {
1758
- if (property && property.length > 0) {
1759
- return new Set(property.split(','));
1760
- }
1761
- return new Set();
1762
- }
1763
- sumNetPrice(chargeItems, charges) {
1764
- var _a;
1765
- let netPrice = 0;
1766
- for (const chargeItem of chargeItems) {
1767
- if (!charges || charges.has(chargeItem.chargeType)) {
1768
- netPrice += (_a = chargeItem.netPrice) !== null && _a !== void 0 ? _a : 0;
1769
- }
1770
- }
1771
- return netPrice;
1772
- }
1773
- mapAttributesTo(target, lineItem) {
1774
- var _a;
1775
- const result = {};
1776
- const component = (_a = this.runtimeService.runtimeModel) === null || _a === void 0 ? void 0 : _a.components.get(lineItem.type);
1777
- if (!component) {
1778
- return result;
1779
- }
1780
- const propertyName = 'mapTo' + target;
1781
- component.attributes
1782
- .filter(a => a.properties && a.properties[propertyName])
1783
- .forEach(mapping => {
1784
- var _a;
1785
- const attribute = lineItem.attributes.find(a => a.name === mapping.name);
1786
- if (attribute) {
1787
- new Set((_a = mapping.properties[propertyName]) === null || _a === void 0 ? void 0 : _a.split(',')).forEach(k => (result[k] = attribute.value));
1788
- }
1789
- });
1790
- return result;
1791
- }
1792
- getOptionConfigurations(product) {
1793
- var _a;
1794
- const optionConfigurations = {};
1795
- const requestOptionConfigurations = (_a = product.optionConfigurations) !== null && _a !== void 0 ? _a : {};
1796
- Object.keys(requestOptionConfigurations).forEach(k => {
1797
- var _a;
1798
- optionConfigurations[k] = ((_a = requestOptionConfigurations[k]) !== null && _a !== void 0 ? _a : []).map(opt => {
1799
- return Object.assign(Object.assign({}, opt), { selected: false });
1800
- });
1801
- });
1802
- return optionConfigurations;
1803
- }
1804
- }
1805
- 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 });
1806
- 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 });
1807
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, decorators: [{
1808
- type: Component,
1809
- 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" }]
1810
- }], 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 }]; } });
1811
-
1812
- class RemoteModule {
1813
- }
1814
- RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1815
- RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, declarations: [RemoteComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [RemoteComponent] });
1816
- RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1817
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, decorators: [{
1818
- type: NgModule,
1819
- args: [{
1820
- declarations: [RemoteComponent],
1821
- imports: [CommonModule, PreviewModule, LoaderModule],
1822
- exports: [RemoteComponent],
1823
- }]
1824
- }] });
1825
-
1826
1216
  class ShoppingCartComponent {
1827
- constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1217
+ constructor(templatesAdminApiService, cdr, toastService, flowInfo, customizationService) {
1828
1218
  var _a, _b, _c;
1829
- this.templatesApi = templatesApi;
1219
+ this.templatesAdminApiService = templatesAdminApiService;
1830
1220
  this.cdr = cdr;
1831
1221
  this.toastService = toastService;
1832
1222
  this.flowInfo = flowInfo;
@@ -1881,7 +1271,7 @@ class ShoppingCartComponent {
1881
1271
  if (!template) {
1882
1272
  return of(undefined);
1883
1273
  }
1884
- return this.templatesApi.fetchComponentsAttachments$(template.id);
1274
+ return this.templatesAdminApiService.fetchComponentsAttachments$(template.id);
1885
1275
  }
1886
1276
  generateUIDefinition$() {
1887
1277
  return of(undefined).pipe(tap(() => {
@@ -1895,7 +1285,6 @@ class ShoppingCartComponent {
1895
1285
  const uiDef = {
1896
1286
  name: '',
1897
1287
  createdTimestamp: 0,
1898
- primary: true,
1899
1288
  type: 'DEFAULT',
1900
1289
  version: 2,
1901
1290
  children: metaList.map(meta => ({
@@ -1909,13 +1298,13 @@ class ShoppingCartComponent {
1909
1298
  }));
1910
1299
  }
1911
1300
  }
1912
- 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 });
1913
- 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 });
1301
+ ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$1.UITemplatesAdminApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: i3$1.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1302
+ 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.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1914
1303
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
1915
1304
  type: Component,
1916
1305
  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" }]
1917
1306
  }], ctorParameters: function () {
1918
- return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1307
+ return [{ type: i1$1.UITemplatesAdminApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: i3$1.FlowInfoService }, { type: undefined, decorators: [{
1919
1308
  type: Optional
1920
1309
  }, {
1921
1310
  type: Inject,
@@ -1938,24 +1327,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1938
1327
  }] });
1939
1328
 
1940
1329
  class FlowResolver {
1941
- constructor(router, routerService, contextService, flowInfo) {
1330
+ constructor(router, routerService, flowInfoService) {
1942
1331
  this.router = router;
1943
1332
  this.routerService = routerService;
1944
- this.contextService = contextService;
1945
- this.flowInfo = flowInfo;
1333
+ this.flowInfoService = flowInfoService;
1946
1334
  }
1947
1335
  resolve(route) {
1948
- const { queryParams } = route;
1949
- const flow = this.flowInfo.flow;
1950
- if (!flow) {
1336
+ if (!this.flowInfoService.isFlowInitialized) {
1951
1337
  return of(false);
1952
1338
  }
1953
- const { properties } = flow;
1339
+ const { queryParams } = route;
1340
+ const { properties } = this.flowInfoService.flow;
1954
1341
  const { queryParams: flowQueryParams, entryPath } = properties;
1955
1342
  const mergedQueryParams = Object.assign(Object.assign({}, queryParams), flowQueryParams);
1956
- const contextProperties = Object.entries(Object.assign(Object.assign({}, mergedQueryParams), getDefaultProperties({ flowParams: properties }))).reduce((trunk, [key, value]) => (Object.assign(Object.assign({}, trunk), { [key]: String(value) })), {});
1957
- this.contextService.update({ properties: contextProperties });
1958
- this.flowInfo.flow = flow;
1959
1343
  const parentUrl = this.routerService.getFlowRootPath(route);
1960
1344
  const entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
1961
1345
  .split('/')
@@ -1964,29 +1348,39 @@ class FlowResolver {
1964
1348
  queryParams: mergedQueryParams,
1965
1349
  replaceUrl: true,
1966
1350
  })).pipe(catchError$1(e => {
1351
+ console.error(e);
1967
1352
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
1968
1353
  const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
1969
1354
  return this.routerService.showErrorPage$(message, errorDetails);
1970
1355
  }));
1971
1356
  }
1972
1357
  }
1973
- 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 });
1358
+ FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i3$1.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
1974
1359
  FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
1975
1360
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
1976
1361
  type: Injectable
1977
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }]; } });
1362
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i3$1.FlowInfoService }]; } });
1363
+
1364
+ const resolvePCMModel = () => {
1365
+ const flowInfoService = inject(FlowInfoService);
1366
+ const configurationRuntimeService = inject(ConfigurationRuntimeService);
1367
+ const { productId } = flowInfoService.context;
1368
+ if (!productId) {
1369
+ throw new Error(`Unable to start configuration for 'productId == null'`);
1370
+ }
1371
+ return configurationRuntimeService.init$({ productId });
1372
+ };
1978
1373
 
1979
- class QuoteResolver {
1980
- constructor(router, quoteDraftService, routerService, contextService, flowInfo, flowStateService) {
1374
+ class SalesTransactionResolver {
1375
+ constructor(router, routerService, flowInfoService, flowStateService, salesTransactionService) {
1981
1376
  this.router = router;
1982
- this.quoteDraftService = quoteDraftService;
1983
1377
  this.routerService = routerService;
1984
- this.contextService = contextService;
1985
- this.flowInfo = flowInfo;
1378
+ this.flowInfoService = flowInfoService;
1986
1379
  this.flowStateService = flowStateService;
1380
+ this.salesTransactionService = salesTransactionService;
1987
1381
  }
1988
1382
  resolve(route) {
1989
- const flow = this.flowInfo.flow;
1383
+ const flow = this.flowInfoService.flow;
1990
1384
  if (!flow) {
1991
1385
  return of(false);
1992
1386
  }
@@ -1994,13 +1388,14 @@ class QuoteResolver {
1994
1388
  return of(true);
1995
1389
  }
1996
1390
  return this.flowStateService.init$().pipe(switchMap(() => this.checkDynamicNavigation$(route)), catchError(e => {
1391
+ console.error(e);
1997
1392
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
1998
1393
  const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
1999
1394
  return this.routerService.showErrorPage$(message, errorDetails);
2000
1395
  }));
2001
1396
  }
2002
1397
  checkDynamicNavigation$(route) {
2003
- const flow = this.flowInfo.flow;
1398
+ const flow = this.flowInfoService.flow;
2004
1399
  if (!flow) {
2005
1400
  return of(true);
2006
1401
  }
@@ -2019,33 +1414,53 @@ class QuoteResolver {
2019
1414
  }));
2020
1415
  }
2021
1416
  getNavigateTo() {
2022
- const flow = this.flowInfo.flow;
2023
- let navigateTo;
2024
- if (flow === null || flow === void 0 ? void 0 : flow.properties.stateful) {
2025
- return this.flowStateService.select$(UITemplateType.FLOW_ENGINE, 'NAVIGATE_TO').pipe(map(r => {
2026
- if (r.success) {
2027
- return r.result;
2028
- }
2029
- return '';
2030
- }));
2031
- }
2032
- else {
2033
- const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
2034
- if (isAccountMode || this.quoteDraftService.hasAssets) {
2035
- navigateTo = '/assets';
2036
- }
2037
- else if (this.quoteDraftService.hasProducts) {
2038
- navigateTo = '/cart';
2039
- }
2040
- }
2041
- return of(navigateTo);
1417
+ // Implement when needed
1418
+ return of('');
2042
1419
  }
2043
1420
  }
2044
- 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 });
2045
- QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver });
2046
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, decorators: [{
1421
+ SalesTransactionResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i3$1.FlowInfoService }, { token: i3$1.FlowStateService }, { token: i3$1.SalesTransactionService }], target: i0.ɵɵFactoryTarget.Injectable });
1422
+ SalesTransactionResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionResolver });
1423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionResolver, decorators: [{
2047
1424
  type: Injectable
2048
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.QuoteDraftService }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
1425
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i3$1.FlowInfoService }, { type: i3$1.FlowStateService }, { type: i3$1.SalesTransactionService }]; } });
1426
+
1427
+ const resolveUIDefinition = () => {
1428
+ const customizationService = inject(FLOW_CUSTOMIZATION, { optional: true });
1429
+ const flowInfoService = inject(FlowInfoService);
1430
+ const uiDefinitionsAdminApiService = inject(UIDefinitionsAdminApiService);
1431
+ const configurationRuntimeService = inject(ConfigurationRuntimeService);
1432
+ const { productId } = flowInfoService.context;
1433
+ if (!productId) {
1434
+ throw new Error(`Unable to start configuration for 'productId == null'`);
1435
+ }
1436
+ return of(undefined).pipe(switchMap(() => {
1437
+ // Try resolving via customization service
1438
+ if (!productId || !(customizationService === null || customizationService === void 0 ? void 0 : customizationService.getUiDefinition)) {
1439
+ return of(undefined);
1440
+ }
1441
+ return customizationService.getUiDefinition(flowInfoService.context);
1442
+ }), switchMap(uiDefContainer => {
1443
+ // Resolve UIDefinition from the org
1444
+ if (uiDefContainer) {
1445
+ return of(uiDefContainer);
1446
+ }
1447
+ if (flowInfoService.context.requiredUIDefinitionId) {
1448
+ return uiDefinitionsAdminApiService.fetch$(flowInfoService.context.requiredUIDefinitionId);
1449
+ }
1450
+ return uiDefinitionsAdminApiService
1451
+ .fetchAll$({
1452
+ productId,
1453
+ defaultUIDefinitionId: flowInfoService.context.defaultUIDefinitionId,
1454
+ })
1455
+ .pipe(map((uiDefinitionContainers) => {
1456
+ const uiDefContainer = uiDefinitionContainers[0];
1457
+ if (!uiDefContainer) {
1458
+ throw new Error(`UI Definition for productId=${productId} is not resolved`);
1459
+ }
1460
+ return uiDefContainer;
1461
+ }));
1462
+ }), tap(uiDefContainer => (configurationRuntimeService.uiDefinitionContainer = uiDefContainer)));
1463
+ };
2049
1464
 
2050
1465
  const rootRoute = {
2051
1466
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -2063,15 +1478,13 @@ const rootRoute = {
2063
1478
  path: 'flows',
2064
1479
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2065
1480
  resolve: { flow: FlowResolver },
2066
- canActivate: [ContextGuard],
2067
1481
  children: [],
2068
1482
  },
2069
1483
  {
2070
1484
  path: 'product',
2071
1485
  component: ProductComponent,
2072
1486
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2073
- resolve: { quote: QuoteResolver },
2074
- canActivate: [ContextGuard],
1487
+ resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition, pcm: resolvePCMModel },
2075
1488
  canDeactivate: [ProductUnloadGuard],
2076
1489
  data: { showHeader: true },
2077
1490
  },
@@ -2079,33 +1492,23 @@ const rootRoute = {
2079
1492
  path: 'cart',
2080
1493
  component: ShoppingCartComponent,
2081
1494
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2082
- resolve: { quote: QuoteResolver },
2083
- canActivate: [ContextGuard],
1495
+ resolve: { salesTransaction: SalesTransactionResolver },
2084
1496
  data: { showHeader: true },
2085
1497
  },
2086
1498
  {
2087
1499
  path: 'catalog',
2088
1500
  component: CatalogComponent,
2089
1501
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2090
- resolve: { quote: QuoteResolver },
2091
- canActivate: [ContextGuard],
1502
+ resolve: { salesTransaction: SalesTransactionResolver },
2092
1503
  data: { showHeader: true },
2093
1504
  },
2094
1505
  {
2095
1506
  path: 'assets',
2096
1507
  component: AssetsComponent,
2097
1508
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2098
- resolve: { quote: QuoteResolver },
2099
- canActivate: [ContextGuard],
1509
+ resolve: { salesTransaction: SalesTransactionResolver },
2100
1510
  data: { showHeader: true },
2101
1511
  },
2102
- {
2103
- path: 'remote',
2104
- component: RemoteComponent,
2105
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2106
- resolve: { quote: QuoteResolver },
2107
- canActivate: [ContextGuard],
2108
- },
2109
1512
  {
2110
1513
  path: 'debug',
2111
1514
  loadChildren: () => DebugModule,
@@ -2121,30 +1524,14 @@ const rootRoute = {
2121
1524
  class FlowRoutingModule {
2122
1525
  }
2123
1526
  FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2124
- FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
2125
- ShoppingCartModule,
2126
- CatalogModule,
2127
- AssetsModule,
2128
- RemoteModule], exports: [RouterModule] });
2129
- 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]),
2130
- ProductModule,
2131
- ShoppingCartModule,
2132
- CatalogModule,
2133
- AssetsModule,
2134
- RemoteModule, RouterModule] });
1527
+ FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule, ShoppingCartModule, CatalogModule, AssetsModule], exports: [RouterModule] });
1528
+ FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ProductUnloadGuard, FlowResolver, SalesTransactionResolver], imports: [RouterModule.forChild([rootRoute]), ProductModule, ShoppingCartModule, CatalogModule, AssetsModule, RouterModule] });
2135
1529
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, decorators: [{
2136
1530
  type: NgModule,
2137
1531
  args: [{
2138
- imports: [
2139
- RouterModule.forChild([rootRoute]),
2140
- ProductModule,
2141
- ShoppingCartModule,
2142
- CatalogModule,
2143
- AssetsModule,
2144
- RemoteModule,
2145
- ],
1532
+ imports: [RouterModule.forChild([rootRoute]), ProductModule, ShoppingCartModule, CatalogModule, AssetsModule],
2146
1533
  exports: [RouterModule],
2147
- providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver],
1534
+ providers: [FlowRouterService, RootGuard, ProductUnloadGuard, FlowResolver, SalesTransactionResolver],
2148
1535
  }]
2149
1536
  }] });
2150
1537
 
@@ -2196,5 +1583,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2196
1583
  * Generated bundle index. Do not edit.
2197
1584
  */
2198
1585
 
2199
- export { ContextGuard, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
1586
+ export { FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE };
2200
1587
  //# sourceMappingURL=veloceapps-sdk.mjs.map