@veloceapps/sdk 3.0.16 → 3.1.0

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 (192) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +74 -836
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-core.umd.js +1269 -0
  4. package/bundles/veloce-sdk-core.umd.js.map +1 -0
  5. package/bundles/veloce-sdk-runtime.umd.js +53 -166
  6. package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
  7. package/bundles/veloce-sdk.umd.js +322 -155
  8. package/bundles/veloce-sdk.umd.js.map +1 -1
  9. package/cms/cms.default.d.ts +1 -1
  10. package/cms/components/element-renderer/element-renderer.component.d.ts +1 -1
  11. package/cms/components/preview/preview.component.d.ts +1 -3
  12. package/cms/decorators/element.decorator.d.ts +2 -2
  13. package/cms/index.d.ts +1 -1
  14. package/cms/injection-tokens.d.ts +1 -1
  15. package/cms/launcher.module.d.ts +2 -3
  16. package/cms/plugins/script.plugin.d.ts +1 -0
  17. package/cms/services/launcher.service.d.ts +1 -1
  18. package/cms/types/common.types.d.ts +4 -9
  19. package/cms/types/configuration.types.d.ts +0 -5
  20. package/cms/types/index.d.ts +1 -2
  21. package/cms/types/path.types.d.ts +11 -0
  22. package/cms/utils/element.utils.d.ts +6 -5
  23. package/cms/utils/elements-resolver.d.ts +2 -1
  24. package/cms/utils/index.d.ts +3 -1
  25. package/cms/utils/path.utils.d.ts +2 -1
  26. package/cms/vendor-map.d.ts +677 -2
  27. package/core/core.module.d.ts +8 -0
  28. package/core/index.d.ts +6 -0
  29. package/{cms → core}/modules/configuration/configuration.module.d.ts +0 -0
  30. package/{cms → core}/modules/configuration/helpers.d.ts +1 -2
  31. package/{cms → core}/modules/configuration/index.d.ts +0 -1
  32. package/{cms → core}/modules/configuration/services/configuration-runtime.service.d.ts +2 -3
  33. package/{cms → core}/modules/configuration/services/configuration.service.d.ts +2 -2
  34. package/{cms → core}/modules/configuration/services/runtime-context.service.d.ts +1 -1
  35. package/{cms → core}/modules/configuration/types/configuration-runtime.types.d.ts +0 -0
  36. package/{cms → core}/modules/flow-configuration/flow-configuration.module.d.ts +0 -0
  37. package/{cms → core}/modules/flow-configuration/index.d.ts +0 -0
  38. package/{cms → core}/modules/flow-configuration/services/flow-configuration.service.d.ts +7 -4
  39. package/{cms → core}/modules/flow-configuration/services/flow-update.service.d.ts +0 -0
  40. package/{cms → core}/modules/flow-configuration/types/update.types.d.ts +0 -0
  41. package/{cms → core}/modules/index.d.ts +0 -0
  42. package/core/package.json +10 -0
  43. package/{runtime → core}/services/context.service.d.ts +0 -0
  44. package/core/services/index.d.ts +2 -0
  45. package/{runtime/services/quote.service.d.ts → core/services/quote-draft.service.d.ts} +11 -6
  46. package/core/types/index.d.ts +3 -0
  47. package/core/types/quote-states.types.d.ts +6 -0
  48. package/{runtime/types/runtime-context.types.d.ts → core/types/runtime.types.d.ts} +4 -5
  49. package/{cms → core}/types/ui-definition.types.d.ts +0 -4
  50. package/core/utils/index.d.ts +2 -0
  51. package/{cms → core}/utils/line-item.utils.d.ts +0 -2
  52. package/{cms/types/line-item.types.d.ts → core/utils/line-item.worker.d.ts} +0 -0
  53. package/core/veloce-sdk-core.d.ts +5 -0
  54. package/esm2015/cms/cms.default.js +1 -1
  55. package/esm2015/cms/components/element-renderer/element-renderer.component.js +3 -3
  56. package/esm2015/cms/components/preview/preview.component.js +9 -10
  57. package/esm2015/cms/decorators/element.decorator.js +1 -1
  58. package/esm2015/cms/index.js +1 -2
  59. package/esm2015/cms/injection-tokens.js +1 -1
  60. package/esm2015/cms/launcher.module.js +5 -6
  61. package/esm2015/cms/plugins/configuration.plugin.js +3 -4
  62. package/esm2015/cms/plugins/script.plugin.js +27 -14
  63. package/esm2015/cms/services/launcher.service.js +1 -1
  64. package/esm2015/cms/types/common.types.js +1 -1
  65. package/esm2015/cms/types/configuration.types.js +1 -1
  66. package/esm2015/cms/types/index.js +2 -3
  67. package/esm2015/cms/types/path.types.js +2 -0
  68. package/esm2015/cms/utils/element.utils.js +1 -1
  69. package/esm2015/cms/utils/elements-resolver.js +1 -1
  70. package/esm2015/cms/utils/index.js +4 -2
  71. package/esm2015/cms/utils/path.utils.js +11 -1
  72. package/esm2015/cms/vendor-map.js +6 -5
  73. package/esm2015/core/core.module.js +18 -0
  74. package/esm2015/core/index.js +7 -0
  75. package/esm2015/core/modules/configuration/configuration.module.js +34 -0
  76. package/esm2015/core/modules/configuration/helpers.js +10 -0
  77. package/esm2015/core/modules/configuration/index.js +5 -0
  78. package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +93 -0
  79. package/esm2015/core/modules/configuration/services/configuration.service.js +147 -0
  80. package/esm2015/core/modules/configuration/services/runtime-context.service.js +61 -0
  81. package/esm2015/core/modules/configuration/types/configuration-runtime.types.js +2 -0
  82. package/esm2015/core/modules/flow-configuration/flow-configuration.module.js +18 -0
  83. package/esm2015/core/modules/flow-configuration/index.js +5 -0
  84. package/esm2015/core/modules/flow-configuration/services/flow-configuration.service.js +90 -0
  85. package/esm2015/core/modules/flow-configuration/services/flow-update.service.js +114 -0
  86. package/esm2015/core/modules/flow-configuration/types/update.types.js +2 -0
  87. package/esm2015/core/modules/index.js +3 -0
  88. package/esm2015/core/services/context.service.js +41 -0
  89. package/esm2015/core/services/index.js +3 -0
  90. package/esm2015/core/services/quote-draft.service.js +67 -0
  91. package/esm2015/core/types/index.js +4 -0
  92. package/esm2015/core/types/quote-states.types.js +2 -0
  93. package/esm2015/core/types/runtime.types.js +16 -0
  94. package/esm2015/core/types/ui-definition.types.js +2 -0
  95. package/esm2015/core/utils/index.js +3 -0
  96. package/esm2015/core/utils/line-item.utils.js +98 -0
  97. package/esm2015/core/utils/line-item.worker.js +19 -0
  98. package/esm2015/core/veloce-sdk-core.js +5 -0
  99. package/esm2015/runtime/components/component-preview/component-preview.component.js +2 -2
  100. package/esm2015/runtime/components/ui-runtime/runtime.component.js +10 -9
  101. package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +3 -3
  102. package/esm2015/runtime/execution/directives/section-script.directive.js +19 -20
  103. package/esm2015/runtime/execution/directives/velo-port.directive.js +1 -1
  104. package/esm2015/runtime/execution/directives/vl-quote.directive.js +1 -1
  105. package/esm2015/runtime/execution/directives/vl-ramp.directive.js +2 -2
  106. package/esm2015/runtime/execution/runtime-execution.module.js +6 -8
  107. package/esm2015/runtime/runtime.module.js +7 -9
  108. package/esm2015/runtime/services/cart.service.js +5 -6
  109. package/esm2015/runtime/services/configuration.service.js +9 -9
  110. package/esm2015/runtime/services/index.js +1 -3
  111. package/esm2015/runtime/services/runtime-context.service.js +4 -4
  112. package/esm2015/runtime/services/runtime.service.js +3 -3
  113. package/esm2015/runtime/types/index.js +1 -2
  114. package/esm2015/runtime/types/runtime.types.js +1 -1
  115. package/esm2015/src/components/dialog/dialog.component.js +30 -0
  116. package/esm2015/src/components/dialog/dialog.module.js +19 -0
  117. package/esm2015/src/components/dialog/dialog.types.js +2 -0
  118. package/esm2015/src/components/header/cart-overlay/cart-overlay.component.js +2 -2
  119. package/esm2015/src/components/header/header.component.js +51 -11
  120. package/esm2015/src/flow.component.js +2 -2
  121. package/esm2015/src/flow.module.js +33 -6
  122. package/esm2015/src/pages/debug/debug.component.js +14 -16
  123. package/esm2015/src/pages/legacy-product/legacy-product.component.js +12 -11
  124. package/esm2015/src/pages/product/product.component.js +12 -12
  125. package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +1 -1
  126. package/esm2015/src/resolvers/context.resolver.js +2 -2
  127. package/esm2015/src/resolvers/quote.resolver.js +9 -16
  128. package/esm2015/src/services/flow-router.service.js +2 -2
  129. package/esm2015/src/services/fow-dialog.service.js +58 -0
  130. package/esm2015/src/types/flow-customization.types.js +1 -1
  131. package/esm2015/src/utils/flow.utils.js +11 -1
  132. package/fesm2015/veloce-sdk-cms.js +64 -714
  133. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  134. package/fesm2015/veloce-sdk-core.js +785 -0
  135. package/fesm2015/veloce-sdk-core.js.map +1 -0
  136. package/fesm2015/veloce-sdk-runtime.js +48 -144
  137. package/fesm2015/veloce-sdk-runtime.js.map +1 -1
  138. package/fesm2015/veloce-sdk.js +260 -99
  139. package/fesm2015/veloce-sdk.js.map +1 -1
  140. package/package.json +2 -2
  141. package/runtime/components/ui-runtime/runtime.component.d.ts +3 -3
  142. package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +1 -1
  143. package/runtime/execution/directives/section-script.directive.d.ts +2 -3
  144. package/runtime/execution/directives/velo-port.directive.d.ts +2 -2
  145. package/runtime/execution/directives/vl-ramp.directive.d.ts +1 -1
  146. package/runtime/execution/runtime-execution.module.d.ts +2 -1
  147. package/runtime/runtime.module.d.ts +2 -1
  148. package/runtime/services/cart.service.d.ts +2 -3
  149. package/runtime/services/configuration.service.d.ts +4 -5
  150. package/runtime/services/index.d.ts +0 -2
  151. package/runtime/services/runtime-context.service.d.ts +3 -3
  152. package/runtime/services/runtime.service.d.ts +5 -6
  153. package/runtime/types/index.d.ts +0 -1
  154. package/runtime/types/runtime.types.d.ts +5 -6
  155. package/src/components/dialog/dialog.component.d.ts +13 -0
  156. package/src/components/dialog/dialog.module.d.ts +9 -0
  157. package/src/components/dialog/dialog.types.d.ts +6 -0
  158. package/src/components/header/cart-overlay/cart-overlay.component.d.ts +1 -1
  159. package/src/components/header/header.component.d.ts +10 -5
  160. package/src/flow.component.d.ts +1 -1
  161. package/src/flow.module.d.ts +3 -1
  162. package/src/pages/debug/debug.component.d.ts +3 -4
  163. package/src/pages/legacy-product/legacy-product.component.d.ts +4 -3
  164. package/src/pages/product/product.component.d.ts +3 -4
  165. package/src/pages/shopping-cart/shopping-cart.component.d.ts +1 -1
  166. package/src/resolvers/context.resolver.d.ts +1 -1
  167. package/src/resolvers/quote.resolver.d.ts +3 -4
  168. package/src/services/flow-router.service.d.ts +1 -1
  169. package/src/services/fow-dialog.service.d.ts +17 -0
  170. package/src/types/flow-customization.types.d.ts +1 -1
  171. package/src/utils/flow.utils.d.ts +2 -0
  172. package/cms/modules/configuration/types/configuration.types.d.ts +0 -15
  173. package/esm2015/cms/modules/configuration/configuration.module.js +0 -37
  174. package/esm2015/cms/modules/configuration/helpers.js +0 -10
  175. package/esm2015/cms/modules/configuration/index.js +0 -6
  176. package/esm2015/cms/modules/configuration/services/configuration-runtime.service.js +0 -93
  177. package/esm2015/cms/modules/configuration/services/configuration.service.js +0 -147
  178. package/esm2015/cms/modules/configuration/services/runtime-context.service.js +0 -61
  179. package/esm2015/cms/modules/configuration/types/configuration-runtime.types.js +0 -2
  180. package/esm2015/cms/modules/configuration/types/configuration.types.js +0 -2
  181. package/esm2015/cms/modules/flow-configuration/flow-configuration.module.js +0 -18
  182. package/esm2015/cms/modules/flow-configuration/index.js +0 -5
  183. package/esm2015/cms/modules/flow-configuration/services/flow-configuration.service.js +0 -83
  184. package/esm2015/cms/modules/flow-configuration/services/flow-update.service.js +0 -114
  185. package/esm2015/cms/modules/flow-configuration/types/update.types.js +0 -2
  186. package/esm2015/cms/modules/index.js +0 -3
  187. package/esm2015/cms/types/line-item.types.js +0 -19
  188. package/esm2015/cms/types/ui-definition.types.js +0 -2
  189. package/esm2015/cms/utils/line-item.utils.js +0 -107
  190. package/esm2015/runtime/services/context.service.js +0 -41
  191. package/esm2015/runtime/services/quote.service.js +0 -53
  192. package/esm2015/runtime/types/runtime-context.types.js +0 -16
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/runtime'), require('primeng/button'), require('primeng/overlaypanel'), require('primeng/tooltip'), require('@angular/forms'), require('primeng/inputnumber'), require('rxjs'), require('@veloce/core'), require('@angular/router'), require('primeng/api'), require('primeng/dropdown'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('ngx-bootstrap/tooltip'), require('@angular/common/http')) :
3
- typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/runtime', 'primeng/button', 'primeng/overlaypanel', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', 'rxjs', '@veloce/core', '@angular/router', 'primeng/api', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', 'ngx-bootstrap/tooltip', '@angular/common/http'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.runtime, global["primeng/button"], global.i4, global.i10, global.ng.forms, global.i6, global.rxjs, global["@veloce/core"], global.ng.router, global["primeng/api"], global.i5$1, global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global["ngx-bootstrap/tooltip"], global.ng.common.http));
5
- })(this, (function (exports, i9, i0, i1$2, i2$2, i2$1, i2, i5, i4, i10, i8, i6, rxjs, i1$1, i1, i4$1, i5$1, i9$1, i7, operators, i1$3, http) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/core'), require('primeng/button'), require('primeng/dynamicdialog'), require('primeng/overlaypanel'), require('primeng/tooltip'), require('@angular/forms'), require('primeng/inputnumber'), require('rxjs'), require('@veloce/core'), require('@angular/router'), require('primeng/api'), require('primeng/dropdown'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('@veloce/sdk/runtime'), require('ngx-bootstrap/tooltip'), require('@angular/common/http')) :
3
+ typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/core', 'primeng/button', 'primeng/dynamicdialog', 'primeng/overlaypanel', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', 'rxjs', '@veloce/core', '@angular/router', 'primeng/api', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', '@veloce/sdk/runtime', 'ngx-bootstrap/tooltip', '@angular/common/http'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.core, global["primeng/button"], global["primeng/dynamicdialog"], global["primeng/overlaypanel"], global["primeng/tooltip"], global.ng.forms, global["primeng/inputnumber"], global.rxjs, global["@veloce/core"], global.ng.router, global["primeng/api"], global["primeng/dropdown"], global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global.veloce.sdk.runtime, global["ngx-bootstrap/tooltip"], global.ng.common.http));
5
+ })(this, (function (exports, i9, i0, i2$1, i2, i1$4, i1$2, i5, i1, i4, i10, i7, i6, rxjs, i1$3, i1$1, i3, i4$1, i8, i6$1, operators, i4$2, i1$5, http) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,25 +24,70 @@
24
24
 
25
25
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
26
26
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
- var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
28
- var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
29
27
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
30
28
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
+ var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
30
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
31
31
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
32
33
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
34
  var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
34
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
35
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
35
36
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
37
+ var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
36
38
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
37
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
39
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
38
40
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
39
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
40
- var i9__namespace$1 = /*#__PURE__*/_interopNamespace(i9$1);
41
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
42
- var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
41
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
42
+ var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
43
+ var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
44
+ var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
43
45
 
44
46
  var VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
45
47
 
48
+ var FlowDialogComponent = /** @class */ (function () {
49
+ function FlowDialogComponent(dialogConfig, ref) {
50
+ this.dialogConfig = dialogConfig;
51
+ this.ref = ref;
52
+ this.config = this.dialogConfig.data.config;
53
+ }
54
+ FlowDialogComponent.prototype.cancelHandler = function () {
55
+ this.ref.close();
56
+ };
57
+ FlowDialogComponent.prototype.confirmHandler = function () {
58
+ this.ref.close(true);
59
+ };
60
+ return FlowDialogComponent;
61
+ }());
62
+ FlowDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogComponent, deps: [{ token: i1__namespace.DynamicDialogConfig }, { token: i1__namespace.DynamicDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
63
+ FlowDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0__namespace, template: "<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .description{flex:1;padding:0 24px 24px;font-weight:400;font-size:12px;line-height:16px;color:var(--vl-text-color-deep-accent)}:host .form-actions{border-top:1px solid var(--vl-border-color);padding:1.5rem 2.2rem;display:flex;justify-content:flex-end;width:100%;grid-gap:10px;gap:10px}\n"], components: [{ type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
64
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogComponent, decorators: [{
65
+ type: i0.Component,
66
+ args: [{
67
+ selector: 'vl-flow-dialog',
68
+ templateUrl: './dialog.component.html',
69
+ styleUrls: ['./dialog.component.scss'],
70
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
71
+ }]
72
+ }], ctorParameters: function () { return [{ type: i1__namespace.DynamicDialogConfig }, { type: i1__namespace.DynamicDialogRef }]; } });
73
+
74
+ var FlowDialogModule = /** @class */ (function () {
75
+ function FlowDialogModule() {
76
+ }
77
+ return FlowDialogModule;
78
+ }());
79
+ FlowDialogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
80
+ FlowDialogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, declarations: [FlowDialogComponent], imports: [i9.CommonModule, i5.ButtonModule], exports: [FlowDialogComponent] });
81
+ FlowDialogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, imports: [[i9.CommonModule, i5.ButtonModule]] });
82
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, decorators: [{
83
+ type: i0.NgModule,
84
+ args: [{
85
+ declarations: [FlowDialogComponent],
86
+ imports: [i9.CommonModule, i5.ButtonModule],
87
+ exports: [FlowDialogComponent],
88
+ }]
89
+ }] });
90
+
46
91
  /*! *****************************************************************************
47
92
  Copyright (c) Microsoft Corporation.
48
93
 
@@ -395,13 +440,13 @@
395
440
  return url.replace(flowRootUrl, '');
396
441
  }));
397
442
  };
398
- this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationEnd; }), rxjs.shareReplay());
443
+ this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$1.NavigationEnd; }), rxjs.shareReplay());
399
444
  this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(rxjs.startWith(this.getLastChildParams(this.route.snapshot)), rxjs.shareReplay());
400
445
  this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(rxjs.startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), rxjs.shareReplay());
401
- this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationStart ||
402
- e instanceof i1.NavigationCancel ||
403
- e instanceof i1.NavigationEnd ||
404
- e instanceof i1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
446
+ this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$1.NavigationStart ||
447
+ e instanceof i1$1.NavigationCancel ||
448
+ e instanceof i1$1.NavigationEnd ||
449
+ e instanceof i1$1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1$1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
405
450
  }
406
451
  FlowRouterService.prototype.getFlowRootRoute = function (route) {
407
452
  var _a;
@@ -464,19 +509,19 @@
464
509
  };
465
510
  return FlowRouterService;
466
511
  }());
467
- FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
512
+ FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$2.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
468
513
  FlowRouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, providedIn: 'root' });
469
514
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, decorators: [{
470
515
  type: i0.Injectable,
471
516
  args: [{ providedIn: 'root' }]
472
- }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }, { type: i2__namespace.ContextService }]; } });
517
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$2.ContextService }]; } });
473
518
 
474
519
  var HeaderCartOverlayComponent = /** @class */ (function () {
475
520
  function HeaderCartOverlayComponent(baseHttpService, flowConfiguration, routerService) {
476
521
  this.baseHttpService = baseHttpService;
477
522
  this.flowConfiguration = flowConfiguration;
478
523
  this.routerService = routerService;
479
- this.form = new i8.FormGroup({});
524
+ this.form = new i7.FormGroup({});
480
525
  this.shouldUpdate$ = new rxjs.BehaviorSubject(true);
481
526
  this.imagesMap$ = new rxjs.BehaviorSubject({});
482
527
  this.destroyed$ = new rxjs.Subject();
@@ -567,7 +612,7 @@
567
612
  }
568
613
  ids.push(item.id);
569
614
  if (!_this.form.controls[item.id]) {
570
- _this.form.addControl(item.id, new i8.FormControl(item.qty, []));
615
+ _this.form.addControl(item.id, new i7.FormControl(item.qty, []));
571
616
  }
572
617
  else {
573
618
  (_a = _this.form.controls[item.id]) === null || _a === void 0 ? void 0 : _a.setValue(item.qty);
@@ -584,8 +629,8 @@
584
629
  };
585
630
  return HeaderCartOverlayComponent;
586
631
  }());
587
- HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace$1.BaseHttpService }, { token: i2__namespace$1.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
588
- HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i4.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$0.00</span>\n <span class=\"text-right pt-3\">$0.00</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i4__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i2__namespace$2.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
632
+ HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace$3.BaseHttpService }, { token: i1__namespace$2.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
633
+ HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i4.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$0.00</span>\n <span class=\"text-right pt-3\">$0.00</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i3__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i2__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
589
634
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, decorators: [{
590
635
  type: i0.Component,
591
636
  args: [{
@@ -594,7 +639,7 @@
594
639
  styleUrls: ['./cart-overlay.component.scss'],
595
640
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
596
641
  }]
597
- }], ctorParameters: function () { return [{ type: i1__namespace$1.BaseHttpService }, { type: i2__namespace$1.FlowConfigurationService }, { type: FlowRouterService }]; }, propDecorators: { overlayPanel: [{
642
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.BaseHttpService }, { type: i1__namespace$2.FlowConfigurationService }, { type: FlowRouterService }]; }, propDecorators: { overlayPanel: [{
598
643
  type: i0.ViewChild,
599
644
  args: [i4.OverlayPanel]
600
645
  }], products: [{
@@ -607,32 +652,111 @@
607
652
  return HeaderCartOverlayModule;
608
653
  }());
609
654
  HeaderCartOverlayModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
610
- HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i9.CommonModule, i8.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i6.InputNumberModule], exports: [HeaderCartOverlayComponent] });
611
- HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i9.CommonModule, i8.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i6.InputNumberModule]] });
655
+ HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2.LetDirectiveModule, i6.InputNumberModule], exports: [HeaderCartOverlayComponent] });
656
+ HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2.LetDirectiveModule, i6.InputNumberModule]] });
612
657
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, decorators: [{
613
658
  type: i0.NgModule,
614
659
  args: [{
615
660
  declarations: [HeaderCartOverlayComponent],
616
- imports: [i9.CommonModule, i8.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i6.InputNumberModule],
661
+ imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i2.LetDirectiveModule, i6.InputNumberModule],
617
662
  exports: [HeaderCartOverlayComponent],
618
663
  }]
619
664
  }] });
620
665
 
666
+ var getFlowObjectIdPropertyName = function (objectName) {
667
+ switch (objectName) {
668
+ case 'Account':
669
+ return 'accountId';
670
+ case 'Order':
671
+ return 'orderId';
672
+ case 'Quote':
673
+ default:
674
+ return 'quoteId';
675
+ }
676
+ };
677
+ var getIsEditMode = function (context) {
678
+ if (context.mode === i1$3.ConfigurationContextMode.QUOTE) {
679
+ return context.properties.Status === 'Draft';
680
+ }
681
+ else if (context.mode === i1$3.ConfigurationContextMode.ACCOUNT) {
682
+ return true;
683
+ }
684
+ return false;
685
+ };
686
+
687
+ var FlowDialogService = /** @class */ (function () {
688
+ function FlowDialogService(dialogService, contextService) {
689
+ this.dialogService = dialogService;
690
+ this.contextService = contextService;
691
+ }
692
+ FlowDialogService.prototype.show = function (config) {
693
+ return this.dialogService.open(FlowDialogComponent, {
694
+ dismissableMask: true,
695
+ closeOnEscape: true,
696
+ closable: true,
697
+ showHeader: true,
698
+ header: config.title,
699
+ width: '440px',
700
+ data: { config: config },
701
+ }).onClose;
702
+ };
703
+ FlowDialogService.prototype.showEmptyCartDialog = function () {
704
+ return this.show({
705
+ title: 'No Products in Quote',
706
+ description: 'There are no products in your Quote. To save a Quote, add at least one product.',
707
+ primaryButton: 'OK',
708
+ });
709
+ };
710
+ FlowDialogService.prototype.showReadonlyModeDialog = function () {
711
+ var ctx = this.contextService.resolve();
712
+ var objectName = (ctx === null || ctx === void 0 ? void 0 : ctx.mode) ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
713
+ return this.show({
714
+ title: 'Error',
715
+ description: objectName + " Cannot be Saved",
716
+ primaryButton: 'OK',
717
+ });
718
+ };
719
+ FlowDialogService.prototype.showQuoteReadonlyModeDialog = function () {
720
+ return this.show({
721
+ title: 'Quote Cannot be Saved',
722
+ description: 'It is only possible to save quotes with the “Draft” status. Please create a new quote to make and save changes.',
723
+ primaryButton: 'OK',
724
+ });
725
+ };
726
+ FlowDialogService.prototype.showAccountNoChangesDialog = function () {
727
+ return this.show({
728
+ title: 'No Changes to Save',
729
+ description: 'There are no changes since the last update. Please make changes to proceed.',
730
+ primaryButton: 'OK',
731
+ });
732
+ };
733
+ return FlowDialogService;
734
+ }());
735
+ FlowDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService, deps: [{ token: i1__namespace.DialogService }, { token: i1__namespace$2.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
736
+ FlowDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService });
737
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService, decorators: [{
738
+ type: i0.Injectable
739
+ }], ctorParameters: function () { return [{ type: i1__namespace.DialogService }, { type: i1__namespace$2.ContextService }]; } });
740
+
621
741
  var FlowHeaderComponent = /** @class */ (function () {
622
- function FlowHeaderComponent(context, quoteService, sfApiService, flowConfiguration, routerService) {
742
+ function FlowHeaderComponent(context, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService) {
623
743
  var _this = this;
624
744
  var _a, _b, _c;
625
745
  this.context = context;
626
- this.quoteService = quoteService;
746
+ this.quoteDraftService = quoteDraftService;
747
+ this.quoteApiService = quoteApiService;
627
748
  this.sfApiService = sfApiService;
628
749
  this.flowConfiguration = flowConfiguration;
629
750
  this.routerService = routerService;
751
+ this.dialogService = dialogService;
630
752
  this.objectDetails$ = new rxjs.BehaviorSubject({});
753
+ this.isSaveInProgress$ = new rxjs.BehaviorSubject(false);
631
754
  this.destroyed$ = new rxjs.Subject();
632
755
  var ctx = this.context.resolve();
633
756
  this.mode = ctx === null || ctx === void 0 ? void 0 : ctx.mode;
634
757
  this.objectName = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.mode) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';
635
758
  this.contextProperties = (_c = ctx === null || ctx === void 0 ? void 0 : ctx.properties) !== null && _c !== void 0 ? _c : {};
759
+ this.isEditMode = ctx ? getIsEditMode(ctx) : false;
636
760
  this.products$ = this.flowConfiguration.get().pipe(rxjs.map(function (lineItems) { return _this.generateProducts(lineItems); }));
637
761
  this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
638
762
  this.isCartRoute$ = this.routerService.isCartRoute$();
@@ -646,14 +770,14 @@
646
770
  };
647
771
  Object.defineProperty(FlowHeaderComponent.prototype, "isAccountMode", {
648
772
  get: function () {
649
- return this.mode === i1$1.ConfigurationContextMode.ACCOUNT;
773
+ return this.mode === i1$3.ConfigurationContextMode.ACCOUNT;
650
774
  },
651
775
  enumerable: false,
652
776
  configurable: true
653
777
  });
654
778
  Object.defineProperty(FlowHeaderComponent.prototype, "isQuoteMode", {
655
779
  get: function () {
656
- return this.mode === i1$1.ConfigurationContextMode.QUOTE;
780
+ return this.mode === i1$3.ConfigurationContextMode.QUOTE;
657
781
  },
658
782
  enumerable: false,
659
783
  configurable: true
@@ -674,6 +798,42 @@
674
798
  FlowHeaderComponent.prototype.navigateToShoppingCart = function () {
675
799
  this.routerService.navigateToShoppingCart();
676
800
  };
801
+ FlowHeaderComponent.prototype.saveButtonClickHandler = function () {
802
+ var _this = this;
803
+ if (!this.isEditMode) {
804
+ if (this.mode === i1$3.ConfigurationContextMode.QUOTE) {
805
+ this.dialogService.showQuoteReadonlyModeDialog().subscribe();
806
+ }
807
+ else {
808
+ this.dialogService.showReadonlyModeDialog().subscribe();
809
+ }
810
+ return;
811
+ }
812
+ if (this.mode === i1$3.ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasUnsavedChanges) {
813
+ this.dialogService.showAccountNoChangesDialog().subscribe();
814
+ return;
815
+ }
816
+ var lineItems = this.flowConfiguration.getSnapshot();
817
+ if (!lineItems.length) {
818
+ this.dialogService.showEmptyCartDialog().subscribe();
819
+ return;
820
+ }
821
+ var quoteDraft = this.quoteDraftService.quoteSnapshot;
822
+ var context = this.context.resolve();
823
+ if (!quoteDraft || !context) {
824
+ return;
825
+ }
826
+ this.isSaveInProgress$.next(true);
827
+ this.quoteApiService
828
+ .upsertQuote(Object.assign(Object.assign({}, quoteDraft), { context: context, currentState: lineItems }))
829
+ .pipe(rxjs.tap(function () {
830
+ // navigate back to quote on successful save
831
+ if (_this.mode === i1$3.ConfigurationContextMode.QUOTE) {
832
+ _this.back();
833
+ }
834
+ }), rxjs.finalize(function () { return _this.isSaveInProgress$.next(false); }))
835
+ .subscribe();
836
+ };
677
837
  FlowHeaderComponent.prototype.queryName$ = function (objectName, id) {
678
838
  if (!id) {
679
839
  return rxjs.of('');
@@ -693,7 +853,7 @@
693
853
  var quoteId = this.isQuoteMode ? this.contextProperties.Id : undefined;
694
854
  var quoteName = this.isQuoteMode ? this.contextProperties.Name : undefined;
695
855
  var quoteNumber = this.isQuoteMode ? (_a = this.contextProperties.QuoteNumber) === null || _a === void 0 ? void 0 : _a.replace(/^0+/, '') : undefined;
696
- var priceListName = (_b = this.quoteService.quotePriceList) === null || _b === void 0 ? void 0 : _b.name;
856
+ var priceListName = (_b = this.quoteDraftService.quotePriceList) === null || _b === void 0 ? void 0 : _b.name;
697
857
  this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { accountId: accountId, opportunityId: opportunityId, quoteId: quoteId, quoteName: quoteName, quoteNumber: quoteNumber, priceListName: priceListName }));
698
858
  this.queryName$('Account', accountId).subscribe(function (accountName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { accountName: accountName })); });
699
859
  this.queryName$('Opportunity', opportunityId).subscribe(function (opportunityName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { opportunityName: opportunityName })); });
@@ -730,8 +890,8 @@
730
890
  };
731
891
  return FlowHeaderComponent;
732
892
  }());
733
- FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.QuoteService }, { token: i1__namespace$2.SalesforceApiService }, { token: i2__namespace$1.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
734
- FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\">&nbsp;To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ contextProperties.Status }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">{{ details.accountName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">{{\n details.opportunityName\n }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">{{ details.quoteName }}</a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item disabled\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-header-cart-overlay #cart [products]=\"products\"></vl-header-cart-overlay>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"details.priceListName\">{{ details.priceListName }}</span>\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <p-button label=\"Generate Doc\" styleClass=\"p-button-outlined\"></p-button>\n <p-button label=\"Save\" styleClass=\"p-button-outlined\"></p-button>\n <p-button label=\"Submit For Approval\" styleClass=\"p-button\"></p-button>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: ["products"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i2__namespace$2.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i4__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i9__namespace.AsyncPipe, "date": i9__namespace.DatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
893
+ FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i1__namespace$2.ContextService }, { token: i1__namespace$2.QuoteDraftService }, { token: i2__namespace$1.QuoteApiService }, { token: i2__namespace$1.SalesforceApiService }, { token: i1__namespace$2.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
894
+ FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\">&nbsp;To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ contextProperties.Status }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">{{ details.accountName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">{{\n details.opportunityName\n }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">{{ details.quoteName }}</a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item disabled\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-header-cart-overlay #cart [products]=\"products\"></vl-header-cart-overlay>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"details.priceListName\">{{ details.priceListName }}</span>\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <p-button label=\"Generate Doc\" styleClass=\"p-button-outlined\"></p-button>\n <p-button\n label=\"Save\"\n styleClass=\"p-button-outlined\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"(isSaveInProgress$ | async) === true\"\n ></p-button>\n <p-button label=\"Submit For Approval\" styleClass=\"p-button\"></p-button>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-loading .p-button-loading-icon{position:absolute;left:calc(50% - 5px)}:host ::ng-deep .p-button.p-button-loading .p-button-label{opacity:0;margin:0}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: ["products"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i2__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i3__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i9__namespace.AsyncPipe, "date": i9__namespace.DatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
735
895
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
736
896
  type: i0.Component,
737
897
  args: [{
@@ -740,7 +900,7 @@
740
900
  styleUrls: ['./header.component.scss'],
741
901
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
742
902
  }]
743
- }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.QuoteService }, { type: i1__namespace$2.SalesforceApiService }, { type: i2__namespace$1.FlowConfigurationService }, { type: FlowRouterService }]; } });
903
+ }], ctorParameters: function () { return [{ type: i1__namespace$2.ContextService }, { type: i1__namespace$2.QuoteDraftService }, { type: i2__namespace$1.QuoteApiService }, { type: i2__namespace$1.SalesforceApiService }, { type: i1__namespace$2.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }]; } });
744
904
 
745
905
  var FlowHeaderModule = /** @class */ (function () {
746
906
  function FlowHeaderModule() {
@@ -748,13 +908,13 @@
748
908
  return FlowHeaderModule;
749
909
  }());
750
910
  FlowHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
751
- FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i9.CommonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule], exports: [FlowHeaderComponent] });
752
- FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i9.CommonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule]] });
911
+ FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i9.CommonModule, i4.OverlayPanelModule, i2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule], exports: [FlowHeaderComponent] });
912
+ FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i9.CommonModule, i4.OverlayPanelModule, i2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule]] });
753
913
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, decorators: [{
754
914
  type: i0.NgModule,
755
915
  args: [{
756
916
  declarations: [FlowHeaderComponent],
757
- imports: [i9.CommonModule, i4.OverlayPanelModule, i2$2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule],
917
+ imports: [i9.CommonModule, i4.OverlayPanelModule, i2.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule],
758
918
  exports: [FlowHeaderComponent],
759
919
  }]
760
920
  }] });
@@ -782,11 +942,11 @@
782
942
  };
783
943
  return FlowService;
784
944
  }());
785
- FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i2__namespace$1.IntegrationState }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
945
+ FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i1__namespace$4.IntegrationState }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
786
946
  FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
787
947
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
788
948
  type: i0.Injectable
789
- }], ctorParameters: function () { return [{ type: i2__namespace$1.IntegrationState }, { type: FlowRouterService }]; } });
949
+ }], ctorParameters: function () { return [{ type: i1__namespace$4.IntegrationState }, { type: FlowRouterService }]; } });
790
950
 
791
951
  var FlowComponent = /** @class */ (function () {
792
952
  function FlowComponent(routerService, context, flowService) {
@@ -803,8 +963,8 @@
803
963
  };
804
964
  return FlowComponent;
805
965
  }());
806
- FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i2__namespace.ContextService }, { token: FlowService }], target: i0__namespace.ɵɵFactoryTarget.Component });
807
- FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i2__namespace$2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
966
+ FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i1__namespace$2.ContextService }, { token: FlowService }], target: i0__namespace.ɵɵFactoryTarget.Component });
967
+ FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i2__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
808
968
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
809
969
  type: i0.Component,
810
970
  args: [{
@@ -813,7 +973,7 @@
813
973
  styleUrls: ['./flow.component.scss'],
814
974
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
815
975
  }]
816
- }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i2__namespace.ContextService }, { type: FlowService }]; } });
976
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i1__namespace$2.ContextService }, { type: FlowService }]; } });
817
977
 
818
978
  var ContextGuard = /** @class */ (function () {
819
979
  function ContextGuard(router, routerService) {
@@ -822,16 +982,16 @@
822
982
  }
823
983
  ContextGuard.prototype.getConfigurationContextMode = function (accountId, quoteId, orderId, rpcMessage) {
824
984
  if (accountId) {
825
- return i1$1.ConfigurationContextMode.ACCOUNT;
985
+ return i1$3.ConfigurationContextMode.ACCOUNT;
826
986
  }
827
987
  if (quoteId) {
828
- return i1$1.ConfigurationContextMode.QUOTE;
988
+ return i1$3.ConfigurationContextMode.QUOTE;
829
989
  }
830
990
  if (orderId) {
831
- return i1$1.ConfigurationContextMode.ORDER;
991
+ return i1$3.ConfigurationContextMode.ORDER;
832
992
  }
833
993
  if (rpcMessage) {
834
- return i1$1.ConfigurationContextMode.REMOTE;
994
+ return i1$3.ConfigurationContextMode.REMOTE;
835
995
  }
836
996
  return;
837
997
  };
@@ -868,11 +1028,11 @@
868
1028
  };
869
1029
  return ContextGuard;
870
1030
  }());
871
- ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1031
+ ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
872
1032
  ContextGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard });
873
1033
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, decorators: [{
874
1034
  type: i0.Injectable
875
- }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: FlowRouterService }]; } });
1035
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
876
1036
 
877
1037
  var RootGuard = /** @class */ (function () {
878
1038
  function RootGuard(router, routerService) {
@@ -906,37 +1066,25 @@
906
1066
  };
907
1067
  return RootGuard;
908
1068
  }());
909
- RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1069
+ RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
910
1070
  RootGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, providedIn: 'root' });
911
1071
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, decorators: [{
912
1072
  type: i0.Injectable,
913
1073
  args: [{ providedIn: 'root' }]
914
- }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: FlowRouterService }]; } });
915
-
916
- var getFlowObjectIdPropertyName = function (objectName) {
917
- switch (objectName) {
918
- case 'Account':
919
- return 'accountId';
920
- case 'Order':
921
- return 'orderId';
922
- case 'Quote':
923
- default:
924
- return 'quoteId';
925
- }
926
- };
1074
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
927
1075
 
928
1076
  var DebugComponent = /** @class */ (function () {
929
- function DebugComponent(flowsApiService, router, activatedRoute, context, flowConfiguration, quoteService) {
1077
+ function DebugComponent(flowsApiService, router, activatedRoute, context, flowConfiguration, quoteDraftService) {
930
1078
  this.flowsApiService = flowsApiService;
931
1079
  this.router = router;
932
1080
  this.activatedRoute = activatedRoute;
933
1081
  this.context = context;
934
1082
  this.flowConfiguration = flowConfiguration;
935
- this.quoteService = quoteService;
1083
+ this.quoteDraftService = quoteDraftService;
936
1084
  this.objectNames = ['Account', 'Quote', 'Order'];
937
- this.form = new i8.FormGroup({
938
- id: new i8.FormControl(''),
939
- name: new i8.FormControl('Quote'),
1085
+ this.form = new i7.FormGroup({
1086
+ id: new i7.FormControl(''),
1087
+ name: new i7.FormControl('Quote'),
940
1088
  });
941
1089
  this.flows$ = this.flowsApiService.fetchFlows().pipe(rxjs.map(function (flows) { return flows.map(function (flow) {
942
1090
  var _a, _b, _c;
@@ -958,8 +1106,7 @@
958
1106
  }
959
1107
  // Delete context before starting a new flow
960
1108
  this.context.delete();
961
- this.flowConfiguration.reset();
962
- this.quoteService.reset();
1109
+ this.quoteDraftService.reset();
963
1110
  this.router.navigate(['..', 'flows'], {
964
1111
  queryParams: Object.assign((_d = { flowId: this.selectedFlow.id }, _d[objectPropertyName] = id, _d), this.selectedFlow.queryParams),
965
1112
  relativeTo: this.activatedRoute,
@@ -967,8 +1114,8 @@
967
1114
  };
968
1115
  return DebugComponent;
969
1116
  }());
970
- DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i1__namespace$2.FlowsApiService }, { token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }, { token: i2__namespace.ContextService }, { token: i2__namespace$1.FlowConfigurationService }, { token: i2__namespace.QuoteService }], target: i0__namespace.ɵɵFactoryTarget.Component });
971
- DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i5__namespace$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i7__namespace.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i9__namespace$1.InputText, selector: "[pInputText]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1117
+ DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i2__namespace$1.FlowsApiService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$2.ContextService }, { token: i1__namespace$2.FlowConfigurationService }, { token: i1__namespace$2.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1118
+ DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i4__namespace$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8__namespace.InputText, selector: "[pInputText]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
972
1119
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
973
1120
  type: i0.Component,
974
1121
  args: [{
@@ -977,7 +1124,7 @@
977
1124
  styleUrls: ['./debug.component.scss'],
978
1125
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
979
1126
  }]
980
- }], ctorParameters: function () { return [{ type: i1__namespace$2.FlowsApiService }, { type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }, { type: i2__namespace.ContextService }, { type: i2__namespace$1.FlowConfigurationService }, { type: i2__namespace.QuoteService }]; } });
1127
+ }], ctorParameters: function () { return [{ type: i2__namespace$1.FlowsApiService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$2.ContextService }, { type: i1__namespace$2.FlowConfigurationService }, { type: i1__namespace$2.QuoteDraftService }]; } });
981
1128
 
982
1129
  var routes$1 = [{ path: '', component: DebugComponent }];
983
1130
  var DebugModule = /** @class */ (function () {
@@ -987,20 +1134,20 @@
987
1134
  }());
988
1135
  DebugModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
989
1136
  DebugModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, declarations: [DebugComponent], imports: [i9.CommonModule,
990
- i8.FormsModule,
991
- i8.ReactiveFormsModule, i1__namespace.RouterModule, i7.RadioButtonModule,
1137
+ i7.FormsModule,
1138
+ i7.ReactiveFormsModule, i1__namespace$1.RouterModule, i6$1.RadioButtonModule,
992
1139
  i5.ButtonModule,
993
- i9$1.InputTextModule,
994
- i5$1.DropdownModule] });
1140
+ i8.InputTextModule,
1141
+ i4$1.DropdownModule] });
995
1142
  DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, imports: [[
996
1143
  i9.CommonModule,
997
- i8.FormsModule,
998
- i8.ReactiveFormsModule,
999
- i1.RouterModule.forChild(routes$1),
1000
- i7.RadioButtonModule,
1144
+ i7.FormsModule,
1145
+ i7.ReactiveFormsModule,
1146
+ i1$1.RouterModule.forChild(routes$1),
1147
+ i6$1.RadioButtonModule,
1001
1148
  i5.ButtonModule,
1002
- i9$1.InputTextModule,
1003
- i5$1.DropdownModule,
1149
+ i8.InputTextModule,
1150
+ i4$1.DropdownModule,
1004
1151
  ]] });
1005
1152
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, decorators: [{
1006
1153
  type: i0.NgModule,
@@ -1008,13 +1155,13 @@
1008
1155
  declarations: [DebugComponent],
1009
1156
  imports: [
1010
1157
  i9.CommonModule,
1011
- i8.FormsModule,
1012
- i8.ReactiveFormsModule,
1013
- i1.RouterModule.forChild(routes$1),
1014
- i7.RadioButtonModule,
1158
+ i7.FormsModule,
1159
+ i7.ReactiveFormsModule,
1160
+ i1$1.RouterModule.forChild(routes$1),
1161
+ i6$1.RadioButtonModule,
1015
1162
  i5.ButtonModule,
1016
- i9$1.InputTextModule,
1017
- i5$1.DropdownModule,
1163
+ i8.InputTextModule,
1164
+ i4$1.DropdownModule,
1018
1165
  ],
1019
1166
  }]
1020
1167
  }] });
@@ -1022,9 +1169,9 @@
1022
1169
  var FLOW_CUSTOMIZATION = new i0.InjectionToken('FLOW_CUSTOMIZATION');
1023
1170
 
1024
1171
  var LegacyProductComponent = /** @class */ (function () {
1025
- function LegacyProductComponent(route, quoteService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
1172
+ function LegacyProductComponent(route, quoteDraftService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
1026
1173
  this.route = route;
1027
- this.quoteService = quoteService;
1174
+ this.quoteDraftService = quoteDraftService;
1028
1175
  this.quoteApiService = quoteApiService;
1029
1176
  this.contextService = contextService;
1030
1177
  this.runtimeContextService = runtimeContextService;
@@ -1035,7 +1182,7 @@
1035
1182
  }
1036
1183
  LegacyProductComponent.prototype.ngOnInit = function () {
1037
1184
  var _this = this;
1038
- this.quoteService.quote$
1185
+ this.quoteDraftService.quote$
1039
1186
  .pipe(operators.first(), operators.takeUntil(this.destroyed$))
1040
1187
  .subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
1041
1188
  this.runtimeService.onSolutionStopEvent.pipe(operators.take(1)).subscribe(function (lineItem) { return _this.onSolutionStop(lineItem); });
@@ -1051,7 +1198,7 @@
1051
1198
  lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
1052
1199
  };
1053
1200
  LegacyProductComponent.prototype.onSolutionCancel = function () {
1054
- this.quoteService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
1201
+ this.quoteDraftService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
1055
1202
  window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
1056
1203
  });
1057
1204
  };
@@ -1065,7 +1212,7 @@
1065
1212
  };
1066
1213
  LegacyProductComponent.prototype.onSolutionStop = function (lineItem) {
1067
1214
  var _this = this;
1068
- this.quoteService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
1215
+ this.quoteDraftService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
1069
1216
  var quoteToUpsert = Object.assign(Object.assign({}, quote), { context: _this.contextService.resolve(), currentState: __spreadArray(__spreadArray([], __read((_this.currentStateService.currentState || []).filter(function (li) { return li.id !== lineItem.id; }))), [lineItem]) });
1070
1217
  _this.quoteApiService
1071
1218
  .upsertQuote(quoteToUpsert)
@@ -1082,7 +1229,7 @@
1082
1229
  lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
1083
1230
  };
1084
1231
  LegacyProductComponent.prototype.getLineItemId = function (quote, queryParams) {
1085
- if (i1$1.EntityUtil.isPresent(queryParams['lineItemId'])) {
1232
+ if (i1$3.EntityUtil.isPresent(queryParams['lineItemId'])) {
1086
1233
  return queryParams['lineItemId'];
1087
1234
  }
1088
1235
  return quote.currentState
@@ -1091,12 +1238,12 @@
1091
1238
  .find(function (id) { return id; });
1092
1239
  };
1093
1240
  LegacyProductComponent.prototype.configure = function (productId) {
1094
- var runtimeContext = this.getRuntimeContext(productId, '', i2.RuntimeOperation.INIT);
1241
+ var runtimeContext = this.getRuntimeContext(productId, '', i1$2.RuntimeOperation.INIT);
1095
1242
  this.startRuntime({}, runtimeContext);
1096
1243
  };
1097
1244
  LegacyProductComponent.prototype.reConfigure = function (lineItemId, currentState) {
1098
- var currentStateItem = i1$1.EntityUtil.findById(lineItemId, currentState);
1099
- var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i2.RuntimeOperation.UPDATE);
1245
+ var currentStateItem = i1$3.EntityUtil.findById(lineItemId, currentState);
1246
+ var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i1$2.RuntimeOperation.UPDATE);
1100
1247
  var states = {
1101
1248
  configurableRamp: currentStateItem,
1102
1249
  currentState: currentState,
@@ -1126,14 +1273,14 @@
1126
1273
  LegacyProductComponent.prototype.getRuntimeContext = function (productId, offeringId, runtimeOperation) {
1127
1274
  var _this = this;
1128
1275
  return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(operators.map(function (runtimeContext) {
1129
- runtimeContext.invocationContext = { runtimeOperation: i2.RuntimeOperation[runtimeOperation] };
1276
+ runtimeContext.invocationContext = { runtimeOperation: i1$2.RuntimeOperation[runtimeOperation] };
1130
1277
  return runtimeContext;
1131
1278
  }), operators.switchMap(function (runtimeContext) { return _this.customizeContext(productId, runtimeContext); }));
1132
1279
  };
1133
1280
  return LegacyProductComponent;
1134
1281
  }());
1135
- LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace.ActivatedRoute }, { token: i2__namespace.QuoteService }, { token: i1__namespace$2.QuoteApiService }, { token: i2__namespace.ContextService }, { token: i2__namespace.RuntimeContextService }, { token: i2__namespace.RuntimeService }, { token: i2__namespace.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1136
- LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i2__namespace.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
1282
+ LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$2.QuoteDraftService }, { token: i2__namespace$1.QuoteApiService }, { token: i1__namespace$2.ContextService }, { token: i4__namespace$2.RuntimeContextService }, { token: i4__namespace$2.RuntimeService }, { token: i4__namespace$2.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1283
+ LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4__namespace$2.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
1137
1284
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
1138
1285
  type: i0.Component,
1139
1286
  args: [{
@@ -1141,7 +1288,7 @@
1141
1288
  styleUrls: ['./legacy-product.component.scss'],
1142
1289
  }]
1143
1290
  }], ctorParameters: function () {
1144
- return [{ type: i1__namespace.ActivatedRoute }, { type: i2__namespace.QuoteService }, { type: i1__namespace$2.QuoteApiService }, { type: i2__namespace.ContextService }, { type: i2__namespace.RuntimeContextService }, { type: i2__namespace.RuntimeService }, { type: i2__namespace.CurrentStateService }, { type: undefined, decorators: [{
1291
+ return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$2.QuoteDraftService }, { type: i2__namespace$1.QuoteApiService }, { type: i1__namespace$2.ContextService }, { type: i4__namespace$2.RuntimeContextService }, { type: i4__namespace$2.RuntimeService }, { type: i4__namespace$2.CurrentStateService }, { type: undefined, decorators: [{
1145
1292
  type: i0.Optional
1146
1293
  }, {
1147
1294
  type: i0.Inject,
@@ -1155,24 +1302,24 @@
1155
1302
  return LegacyProductModule;
1156
1303
  }());
1157
1304
  LegacyProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1158
- LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i9.CommonModule, i2.RuntimeModule, i1__namespace$3.TooltipModule], exports: [LegacyProductComponent] });
1159
- LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i9.CommonModule, i2.RuntimeModule, i1$3.TooltipModule.forRoot()]] });
1305
+ LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i9.CommonModule, i4$2.RuntimeModule, i1__namespace$5.TooltipModule], exports: [LegacyProductComponent] });
1306
+ LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i9.CommonModule, i4$2.RuntimeModule, i1$5.TooltipModule.forRoot()]] });
1160
1307
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
1161
1308
  type: i0.NgModule,
1162
1309
  args: [{
1163
1310
  declarations: [LegacyProductComponent],
1164
- imports: [i9.CommonModule, i2.RuntimeModule, i1$3.TooltipModule.forRoot()],
1311
+ imports: [i9.CommonModule, i4$2.RuntimeModule, i1$5.TooltipModule.forRoot()],
1165
1312
  exports: [LegacyProductComponent],
1166
1313
  }]
1167
1314
  }] });
1168
1315
 
1169
1316
  var ProductComponent = /** @class */ (function () {
1170
- function ProductComponent(contextService, runtimeService, conigurationService, flowConfigurationService, quoteService, route, messageService, customizationService) {
1317
+ function ProductComponent(contextService, runtimeService, conigurationService, flowConfigurationService, quoteDraftService, route, messageService, customizationService) {
1171
1318
  this.contextService = contextService;
1172
1319
  this.runtimeService = runtimeService;
1173
1320
  this.conigurationService = conigurationService;
1174
1321
  this.flowConfigurationService = flowConfigurationService;
1175
- this.quoteService = quoteService;
1322
+ this.quoteDraftService = quoteDraftService;
1176
1323
  this.route = route;
1177
1324
  this.messageService = messageService;
1178
1325
  this.customizationService = customizationService;
@@ -1181,7 +1328,7 @@
1181
1328
  }
1182
1329
  ProductComponent.prototype.ngOnInit = function () {
1183
1330
  var _this = this;
1184
- this.quoteService.quote$
1331
+ this.quoteDraftService.quote$
1185
1332
  .pipe(rxjs.first(), rxjs.map(function (quote) {
1186
1333
  var _a, _b;
1187
1334
  var contextProperties = (_b = (_a = _this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
@@ -1218,7 +1365,7 @@
1218
1365
  var _this = this;
1219
1366
  var _a;
1220
1367
  var lineItemId = this.getLineItemId(quote, queryParams);
1221
- var currentStateItem = i1$1.EntityUtil.findById(lineItemId, quote.currentState);
1368
+ var currentStateItem = i1$3.EntityUtil.findById(lineItemId, quote.currentState);
1222
1369
  var productId = (_a = currentStateItem === null || currentStateItem === void 0 ? void 0 : currentStateItem.productId) !== null && _a !== void 0 ? _a : queryParams['productId'];
1223
1370
  var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
1224
1371
  if (currentStateItem) {
@@ -1240,7 +1387,7 @@
1240
1387
  .subscribe();
1241
1388
  };
1242
1389
  ProductComponent.prototype.getLineItemId = function (quote, queryParams) {
1243
- if (i1$1.EntityUtil.isPresent(queryParams['lineItemId'])) {
1390
+ if (i1$3.EntityUtil.isPresent(queryParams['lineItemId'])) {
1244
1391
  return queryParams['lineItemId'];
1245
1392
  }
1246
1393
  return quote.currentState
@@ -1250,8 +1397,8 @@
1250
1397
  };
1251
1398
  return ProductComponent;
1252
1399
  }());
1253
- ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace$1.ConfigurationRuntimeService }, { token: i2__namespace$1.ConfigurationService }, { token: i2__namespace$1.FlowConfigurationService }, { token: i2__namespace.QuoteService }, { token: i1__namespace.ActivatedRoute }, { token: i4__namespace$1.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1254
- ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i2__namespace$2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i2__namespace$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1400
+ ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i1__namespace$2.ContextService }, { token: i1__namespace$2.ConfigurationRuntimeService }, { token: i1__namespace$2.ConfigurationService }, { token: i1__namespace$2.FlowConfigurationService }, { token: i1__namespace$2.QuoteDraftService }, { token: i1__namespace$1.ActivatedRoute }, { token: i3__namespace.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1401
+ ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i2__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1255
1402
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, decorators: [{
1256
1403
  type: i0.Component,
1257
1404
  args: [{
@@ -1261,7 +1408,7 @@
1261
1408
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1262
1409
  }]
1263
1410
  }], ctorParameters: function () {
1264
- return [{ type: i2__namespace.ContextService }, { type: i2__namespace$1.ConfigurationRuntimeService }, { type: i2__namespace$1.ConfigurationService }, { type: i2__namespace$1.FlowConfigurationService }, { type: i2__namespace.QuoteService }, { type: i1__namespace.ActivatedRoute }, { type: i4__namespace$1.MessageService }, { type: undefined, decorators: [{
1411
+ return [{ type: i1__namespace$2.ContextService }, { type: i1__namespace$2.ConfigurationRuntimeService }, { type: i1__namespace$2.ConfigurationService }, { type: i1__namespace$2.FlowConfigurationService }, { type: i1__namespace$2.QuoteDraftService }, { type: i1__namespace$1.ActivatedRoute }, { type: i3__namespace.MessageService }, { type: undefined, decorators: [{
1265
1412
  type: i0.Optional
1266
1413
  }, {
1267
1414
  type: i0.Inject,
@@ -1275,13 +1422,13 @@
1275
1422
  return ProductModule;
1276
1423
  }());
1277
1424
  ProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1278
- ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule], exports: [ProductComponent] });
1279
- ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule]] });
1425
+ ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i2.LoaderModule], exports: [ProductComponent] });
1426
+ ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i2.LoaderModule]] });
1280
1427
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, decorators: [{
1281
1428
  type: i0.NgModule,
1282
1429
  args: [{
1283
1430
  declarations: [ProductComponent],
1284
- imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule],
1431
+ imports: [i9.CommonModule, i1$4.PreviewModule, i2.LoaderModule],
1285
1432
  exports: [ProductComponent],
1286
1433
  }]
1287
1434
  }] });
@@ -1300,7 +1447,7 @@
1300
1447
  }
1301
1448
  return RecordNotFoundComponent;
1302
1449
  }());
1303
- RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
1450
+ RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
1304
1451
  RecordNotFoundComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0__namespace, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1305
1452
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, decorators: [{
1306
1453
  type: i0.Component,
@@ -1310,7 +1457,7 @@
1310
1457
  styleUrls: ['./record-not-found.component.scss'],
1311
1458
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1312
1459
  }]
1313
- }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }]; } });
1460
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }]; } });
1314
1461
 
1315
1462
  var routes = [{ path: '', component: RecordNotFoundComponent }];
1316
1463
  var RecordNotFoundModule = /** @class */ (function () {
@@ -1319,13 +1466,13 @@
1319
1466
  return RecordNotFoundModule;
1320
1467
  }());
1321
1468
  RecordNotFoundModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1322
- RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i9.CommonModule, i1__namespace.RouterModule] });
1323
- RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i9.CommonModule, i1.RouterModule.forChild(routes)]] });
1469
+ RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i9.CommonModule, i1__namespace$1.RouterModule] });
1470
+ RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i9.CommonModule, i1$1.RouterModule.forChild(routes)]] });
1324
1471
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, decorators: [{
1325
1472
  type: i0.NgModule,
1326
1473
  args: [{
1327
1474
  declarations: [RecordNotFoundComponent],
1328
- imports: [i9.CommonModule, i1.RouterModule.forChild(routes)],
1475
+ imports: [i9.CommonModule, i1$1.RouterModule.forChild(routes)],
1329
1476
  }]
1330
1477
  }] });
1331
1478
 
@@ -1350,7 +1497,7 @@
1350
1497
  _this.state$.next({ loading: false, failure: false });
1351
1498
  }), rxjs.catchError(function (err) {
1352
1499
  _this.uiDefinition = undefined;
1353
- _this.toastService.add({ severity: i2$2.ToastType.error, summary: 'Failed to resolve Shopping Cart component' });
1500
+ _this.toastService.add({ severity: i2.ToastType.error, summary: 'Failed to resolve Shopping Cart component' });
1354
1501
  _this.state$.next({ loading: false, failure: true });
1355
1502
  throw err;
1356
1503
  }), rxjs.takeUntil(this.destroyed$))
@@ -1363,7 +1510,7 @@
1363
1510
  ShoppingCartComponent.prototype.getTemplateRootComponent$ = function (template) {
1364
1511
  return this.templatesApi
1365
1512
  .fetchComponents$(template.id)
1366
- .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$1.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1513
+ .pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$3.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
1367
1514
  };
1368
1515
  ShoppingCartComponent.prototype.getShoppingCartComponentMeta$ = function () {
1369
1516
  var _this = this;
@@ -1376,7 +1523,7 @@
1376
1523
  json: component === null || component === void 0 ? void 0 : component.json,
1377
1524
  }); }));
1378
1525
  }
1379
- return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.filter(function (template) { return template.type === i1$1.UITemplateType.SHOPPING_CART; }).reverse()[0]; }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
1526
+ return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.filter(function (template) { return template.type === i1$3.UITemplateType.SHOPPING_CART; }).reverse()[0]; }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
1380
1527
  };
1381
1528
  ShoppingCartComponent.prototype.generateUIDefinition$ = function () {
1382
1529
  return this.getShoppingCartComponentMeta$().pipe(rxjs.map(function (meta) {
@@ -1403,8 +1550,8 @@
1403
1550
  };
1404
1551
  return ShoppingCartComponent;
1405
1552
  }());
1406
- ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$2.UITemplatesApiService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$2.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1407
- ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i2__namespace$2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i2__namespace$1.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1553
+ ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i2__namespace$1.UITemplatesApiService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
1554
+ ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i2__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1408
1555
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
1409
1556
  type: i0.Component,
1410
1557
  args: [{
@@ -1414,7 +1561,7 @@
1414
1561
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1415
1562
  }]
1416
1563
  }], ctorParameters: function () {
1417
- return [{ type: i1__namespace$2.UITemplatesApiService }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$2.ToastService }, { type: undefined, decorators: [{
1564
+ return [{ type: i2__namespace$1.UITemplatesApiService }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.ToastService }, { type: undefined, decorators: [{
1418
1565
  type: i0.Optional
1419
1566
  }, {
1420
1567
  type: i0.Inject,
@@ -1428,13 +1575,13 @@
1428
1575
  return ShoppingCartModule;
1429
1576
  }());
1430
1577
  ShoppingCartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1431
- ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule], exports: [ShoppingCartComponent] });
1432
- ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule]] });
1578
+ ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i2.LoaderModule], exports: [ShoppingCartComponent] });
1579
+ ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i2.LoaderModule]] });
1433
1580
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, decorators: [{
1434
1581
  type: i0.NgModule,
1435
1582
  args: [{
1436
1583
  declarations: [ShoppingCartComponent],
1437
- imports: [i9.CommonModule, i2$1.PreviewModule, i2$2.LoaderModule],
1584
+ imports: [i9.CommonModule, i1$4.PreviewModule, i2.LoaderModule],
1438
1585
  exports: [ShoppingCartComponent],
1439
1586
  }]
1440
1587
  }] });
@@ -1469,11 +1616,11 @@
1469
1616
  };
1470
1617
  return ContextResolver;
1471
1618
  }());
1472
- ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i2__namespace.ContextService }, { token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1619
+ ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i1__namespace$2.ContextService }, { token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1473
1620
  ContextResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver });
1474
1621
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, decorators: [{
1475
1622
  type: i0.Injectable
1476
- }], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i1__namespace.Router }, { type: FlowRouterService }]; } });
1623
+ }], ctorParameters: function () { return [{ type: i1__namespace$2.ContextService }, { type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
1477
1624
 
1478
1625
  var FlowResolver = /** @class */ (function () {
1479
1626
  function FlowResolver(router, flowsApiService, routerService) {
@@ -1522,16 +1669,16 @@
1522
1669
  };
1523
1670
  return FlowResolver;
1524
1671
  }());
1525
- FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace.Router }, { token: i1__namespace$2.FlowsApiService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1672
+ FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace$1.Router }, { token: i2__namespace$1.FlowsApiService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1526
1673
  FlowResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver });
1527
1674
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, decorators: [{
1528
1675
  type: i0.Injectable
1529
- }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace$2.FlowsApiService }, { type: FlowRouterService }]; } });
1676
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i2__namespace$1.FlowsApiService }, { type: FlowRouterService }]; } });
1530
1677
 
1531
1678
  var QuoteResolver = /** @class */ (function () {
1532
- function QuoteResolver(router, quoteService, routerService, contextService, flowConfiguration) {
1679
+ function QuoteResolver(router, quoteDraftService, routerService, contextService, flowConfiguration) {
1533
1680
  this.router = router;
1534
- this.quoteService = quoteService;
1681
+ this.quoteDraftService = quoteDraftService;
1535
1682
  this.routerService = routerService;
1536
1683
  this.contextService = contextService;
1537
1684
  this.flowConfiguration = flowConfiguration;
@@ -1544,34 +1691,28 @@
1544
1691
  if (this.contextService.isStandalone) {
1545
1692
  return rxjs.of(undefined);
1546
1693
  }
1547
- var quoteDraft = this.quoteService.getQuote();
1548
- if (quoteDraft) {
1549
- return this.flowConfiguration.calculate$(quoteDraft.currentState);
1550
- }
1551
- else {
1552
- return rxjs.of(undefined);
1553
- }
1694
+ return this.flowConfiguration.initialize$();
1554
1695
  };
1555
1696
  QuoteResolver.prototype.resolve = function (route) {
1556
1697
  var _this = this;
1557
1698
  var headerId = route.data.headerId;
1558
- var quote = this.quoteService.getQuote();
1699
+ var quote = this.quoteDraftService.quoteSnapshot;
1559
1700
  if (quote && quote.quoteId === headerId) {
1560
1701
  return rxjs.of(true);
1561
1702
  }
1562
1703
  var queryParams = route.queryParams;
1563
- return this.quoteService.init(headerId, queryParams).pipe(rxjs.switchMap(function () { return _this.initFlow$(); }), rxjs.catchError(function (e) {
1704
+ return this.quoteDraftService.init(headerId, queryParams).pipe(rxjs.switchMap(function () { return _this.initFlow$(); }), rxjs.catchError(function (e) {
1564
1705
  var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
1565
1706
  return _this.handleError(route, message);
1566
1707
  }));
1567
1708
  };
1568
1709
  return QuoteResolver;
1569
1710
  }());
1570
- QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace.Router }, { token: i2__namespace.QuoteService }, { token: FlowRouterService }, { token: i2__namespace.ContextService }, { token: i2__namespace$1.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1711
+ QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$2.QuoteDraftService }, { token: FlowRouterService }, { token: i1__namespace$2.ContextService }, { token: i1__namespace$2.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1571
1712
  QuoteResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver });
1572
1713
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, decorators: [{
1573
1714
  type: i0.Injectable
1574
- }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i2__namespace.QuoteService }, { type: FlowRouterService }, { type: i2__namespace.ContextService }, { type: i2__namespace$1.FlowConfigurationService }]; } });
1715
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$2.QuoteDraftService }, { type: FlowRouterService }, { type: i1__namespace$2.ContextService }, { type: i1__namespace$2.FlowConfigurationService }]; } });
1575
1716
 
1576
1717
  var rootRoute = {
1577
1718
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -1631,13 +1772,13 @@
1631
1772
  return FlowRoutingModule;
1632
1773
  }());
1633
1774
  FlowRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1634
- FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule], exports: [i1.RouterModule] });
1635
- FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule], i1.RouterModule] });
1775
+ FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace$1.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule], exports: [i1$1.RouterModule] });
1776
+ FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule], i1$1.RouterModule] });
1636
1777
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, decorators: [{
1637
1778
  type: i0.NgModule,
1638
1779
  args: [{
1639
- imports: [i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],
1640
- exports: [i1.RouterModule],
1780
+ imports: [i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],
1781
+ exports: [i1$1.RouterModule],
1641
1782
  providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],
1642
1783
  }]
1643
1784
  }] });
@@ -1648,14 +1789,39 @@
1648
1789
  return FlowModule;
1649
1790
  }());
1650
1791
  FlowModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1651
- FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule, FlowRoutingModule, i1$2.ApiModule, i2$1.LauncherModule, i2$2.LoaderModule, FlowHeaderModule] });
1652
- FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, i2.ContextService], imports: [[i9.CommonModule, FlowRoutingModule, i1$2.ApiModule, i2$1.LauncherModule, i2$2.LoaderModule, FlowHeaderModule]] });
1792
+ FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule,
1793
+ FlowRoutingModule,
1794
+ i2$1.ApiModule,
1795
+ i1$4.LauncherModule,
1796
+ i2.LoaderModule,
1797
+ FlowHeaderModule,
1798
+ FlowDialogModule,
1799
+ i1$2.SdkCoreModule] });
1800
+ FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, FlowDialogService], imports: [[
1801
+ i9.CommonModule,
1802
+ FlowRoutingModule,
1803
+ i2$1.ApiModule,
1804
+ i1$4.LauncherModule,
1805
+ i2.LoaderModule,
1806
+ FlowHeaderModule,
1807
+ FlowDialogModule,
1808
+ i1$2.SdkCoreModule,
1809
+ ]] });
1653
1810
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, decorators: [{
1654
1811
  type: i0.NgModule,
1655
1812
  args: [{
1656
1813
  declarations: [FlowComponent],
1657
- imports: [i9.CommonModule, FlowRoutingModule, i1$2.ApiModule, i2$1.LauncherModule, i2$2.LoaderModule, FlowHeaderModule],
1658
- providers: [FlowService, i2.ContextService],
1814
+ imports: [
1815
+ i9.CommonModule,
1816
+ FlowRoutingModule,
1817
+ i2$1.ApiModule,
1818
+ i1$4.LauncherModule,
1819
+ i2.LoaderModule,
1820
+ FlowHeaderModule,
1821
+ FlowDialogModule,
1822
+ i1$2.SdkCoreModule,
1823
+ ],
1824
+ providers: [FlowService, FlowDialogService],
1659
1825
  }]
1660
1826
  }] });
1661
1827
 
@@ -1669,6 +1835,7 @@
1669
1835
  exports.FlowService = FlowService;
1670
1836
  exports.VELOCE_FLOW_ROOT_ROUTE = VELOCE_FLOW_ROOT_ROUTE;
1671
1837
  exports.getFlowObjectIdPropertyName = getFlowObjectIdPropertyName;
1838
+ exports.getIsEditMode = getIsEditMode;
1672
1839
 
1673
1840
  Object.defineProperty(exports, '__esModule', { value: true });
1674
1841