@veloceapps/sdk 8.0.0-19 → 8.0.0-191

Sign up to get free protection for your applications and to get access to all the features.
Files changed (312) hide show
  1. package/README.md +0 -1
  2. package/cms/README.md +0 -20
  3. package/cms/cms.actions.d.ts +15 -1
  4. package/cms/components/preview/preview.component.d.ts +2 -3
  5. package/cms/components/preview/preview.types.d.ts +4 -0
  6. package/cms/index.d.ts +1 -0
  7. package/cms/modules/runtime/services/runtime.service.d.ts +1 -1
  8. package/cms/services/index.d.ts +0 -1
  9. package/cms/services/resources.service.d.ts +2 -0
  10. package/cms/types/index.d.ts +0 -1
  11. package/cms/utils/element-metadata-worker.d.ts +11 -0
  12. package/cms/utils/elements-resolver.d.ts +0 -2
  13. package/cms/utils/index.d.ts +3 -0
  14. package/cms/utils/transpilation-worker.d.ts +13 -0
  15. package/cms/vendor-map.d.ts +29 -19
  16. package/core/README.md +20 -0
  17. package/core/modules/configuration/configuration.module.d.ts +2 -1
  18. package/core/modules/configuration/helpers.d.ts +4 -3
  19. package/core/modules/configuration/index.d.ts +1 -1
  20. package/core/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
  21. package/core/modules/configuration/services/configuration-state.service.d.ts +49 -0
  22. package/core/modules/configuration/services/configuration.service.d.ts +11 -6
  23. package/core/modules/configuration/types/configuration.types.d.ts +4 -0
  24. package/core/modules/flow-configuration/flow-configuration.module.d.ts +2 -1
  25. package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +5 -0
  26. package/core/pipes/action-code.pipe.d.ts +8 -0
  27. package/core/pipes/date.pipe.d.ts +2 -1
  28. package/core/pipes/index.d.ts +1 -0
  29. package/core/pipes/pipes.module.d.ts +2 -1
  30. package/core/services/context.service.d.ts +4 -0
  31. package/core/services/flow-info.service.d.ts +29 -0
  32. package/core/services/flow-state-configuration.service.d.ts +19 -0
  33. package/core/services/flow-state.service.d.ts +80 -0
  34. package/core/services/index.d.ts +4 -1
  35. package/core/services/quote-draft.service.d.ts +12 -28
  36. package/core/services/runtime-settings.service.d.ts +4 -1
  37. package/core/types/flow-customization.types.d.ts +22 -0
  38. package/core/types/flow-state.types.d.ts +11 -0
  39. package/core/types/formatting-settings.types.d.ts +2 -0
  40. package/core/types/index.d.ts +3 -0
  41. package/{cms → core}/types/integration.types.d.ts +1 -1
  42. package/core/types/pipe.types.d.ts +1 -0
  43. package/core/utils/line-item.utils.d.ts +1 -3
  44. package/esm2020/cms/cms.actions.mjs +25 -1
  45. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
  46. package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
  47. package/esm2020/cms/components/preview/preview.component.mjs +10 -10
  48. package/esm2020/cms/components/preview/preview.module.mjs +2 -2
  49. package/esm2020/cms/components/preview/preview.types.mjs +1 -1
  50. package/esm2020/cms/index.mjs +2 -1
  51. package/esm2020/cms/launcher.module.mjs +4 -4
  52. package/esm2020/cms/modules/migrations/migrations.mjs +2 -2
  53. package/esm2020/cms/modules/migrations/services/migrations.service.mjs +6 -2
  54. package/esm2020/cms/modules/runtime/services/compilation.service.mjs +11 -7
  55. package/esm2020/cms/modules/runtime/services/runtime.service.mjs +4 -4
  56. package/esm2020/cms/plugins/configuration.plugin.mjs +8 -4
  57. package/esm2020/cms/services/index.mjs +1 -2
  58. package/esm2020/cms/services/io-provider.service.mjs +10 -9
  59. package/esm2020/cms/services/resources.service.mjs +10 -6
  60. package/esm2020/cms/services/templates.service.mjs +10 -9
  61. package/esm2020/cms/types/index.mjs +1 -2
  62. package/esm2020/cms/utils/element-metadata-worker.mjs +31 -0
  63. package/esm2020/cms/utils/elements-resolver.mjs +14 -28
  64. package/esm2020/cms/utils/index.mjs +4 -1
  65. package/esm2020/cms/utils/path.utils.mjs +3 -3
  66. package/esm2020/cms/utils/script.utils.mjs +19 -15
  67. package/esm2020/cms/utils/transpilation-worker.mjs +52 -0
  68. package/esm2020/cms/vendor-map.mjs +18 -6
  69. package/esm2020/core/core.module.mjs +12 -5
  70. package/esm2020/core/modules/configuration/configuration.module.mjs +7 -23
  71. package/esm2020/core/modules/configuration/helpers.mjs +28 -3
  72. package/esm2020/core/modules/configuration/index.mjs +2 -2
  73. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +8 -11
  74. package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +311 -0
  75. package/esm2020/core/modules/configuration/services/configuration.service.mjs +77 -52
  76. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +6 -6
  77. package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
  78. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +6 -6
  79. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +12 -9
  80. package/esm2020/core/pipes/action-code.pipe.mjs +20 -0
  81. package/esm2020/core/pipes/date.pipe.mjs +10 -4
  82. package/esm2020/core/pipes/index.mjs +2 -1
  83. package/esm2020/core/pipes/pipes.module.mjs +5 -4
  84. package/esm2020/core/services/context.service.mjs +32 -5
  85. package/esm2020/core/services/flow-info.service.mjs +99 -0
  86. package/esm2020/core/services/flow-state-configuration.service.mjs +53 -0
  87. package/esm2020/core/services/flow-state.service.mjs +512 -0
  88. package/esm2020/core/services/index.mjs +5 -2
  89. package/esm2020/core/services/integration.state.mjs +36 -0
  90. package/esm2020/core/services/product-images.service.mjs +4 -5
  91. package/esm2020/core/services/quote-draft.service.mjs +41 -90
  92. package/esm2020/core/services/runtime-settings.service.mjs +19 -5
  93. package/esm2020/core/types/flow-customization.types.mjs +3 -0
  94. package/esm2020/core/types/flow-state.types.mjs +2 -0
  95. package/esm2020/core/types/formatting-settings.types.mjs +1 -1
  96. package/esm2020/core/types/index.mjs +4 -1
  97. package/esm2020/core/types/integration.types.mjs +2 -0
  98. package/esm2020/core/types/pipe.types.mjs +2 -0
  99. package/esm2020/core/utils/line-item.utils.mjs +33 -32
  100. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +49 -49
  101. package/esm2020/src/components/flow-header/flow-header.component.mjs +108 -0
  102. package/esm2020/src/components/flow-header/flow-header.module.mjs +19 -0
  103. package/esm2020/src/components/flow-header/index.mjs +2 -0
  104. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +37 -43
  105. package/esm2020/src/configure-primeng.mjs +33 -0
  106. package/esm2020/src/flow-routing.module.mjs +62 -71
  107. package/esm2020/src/flow.component.mjs +23 -32
  108. package/esm2020/src/flow.module.mjs +7 -5
  109. package/esm2020/src/guards/context.guard.mjs +6 -11
  110. package/esm2020/src/guards/flow.guard.mjs +37 -0
  111. package/esm2020/src/guards/product-unload.guard.mjs +4 -1
  112. package/esm2020/src/guards/root.guard.mjs +14 -10
  113. package/esm2020/src/pages/assets/assets.component.mjs +33 -37
  114. package/esm2020/src/pages/catalog/catalog.component.mjs +33 -37
  115. package/esm2020/src/pages/debug/debug.component.mjs +10 -14
  116. package/esm2020/src/pages/product/product.component.mjs +35 -22
  117. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +6 -3
  118. package/esm2020/src/pages/remote/remote.component.mjs +19 -19
  119. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +34 -38
  120. package/esm2020/src/resolvers/flow.resolver.mjs +37 -49
  121. package/esm2020/src/resolvers/quote.resolver.mjs +55 -63
  122. package/esm2020/src/services/doc-gen.service.mjs +4 -3
  123. package/esm2020/src/services/flow-dialog.service.mjs +21 -6
  124. package/esm2020/src/services/flow-router.service.mjs +57 -16
  125. package/esm2020/src/services/flow.service.mjs +82 -28
  126. package/esm2020/src/services/guided-selling.service.mjs +5 -4
  127. package/esm2020/src/services/index.mjs +3 -1
  128. package/esm2020/src/types/index.mjs +1 -2
  129. package/esm2020/src/utils/flow.utils.mjs +6 -2
  130. package/fesm2015/veloceapps-sdk-cms.mjs +296 -194
  131. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  132. package/fesm2015/veloceapps-sdk-core.mjs +1782 -984
  133. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  134. package/fesm2015/veloceapps-sdk.mjs +763 -1467
  135. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  136. package/fesm2020/veloceapps-sdk-cms.mjs +300 -208
  137. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  138. package/fesm2020/veloceapps-sdk-core.mjs +1570 -810
  139. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  140. package/fesm2020/veloceapps-sdk.mjs +825 -1526
  141. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  142. package/package.json +5 -12
  143. package/src/components/doc-gen/doc-gen.component.d.ts +8 -9
  144. package/src/components/flow-header/flow-header.component.d.ts +25 -0
  145. package/src/components/flow-header/flow-header.module.d.ts +9 -0
  146. package/src/components/flow-header/index.d.ts +1 -0
  147. package/src/components/guided-selling/guided-selling.component.d.ts +6 -8
  148. package/src/configure-primeng.d.ts +1 -0
  149. package/src/flow-routing.module.d.ts +6 -7
  150. package/src/flow.component.d.ts +7 -11
  151. package/src/flow.module.d.ts +2 -2
  152. package/src/guards/context.guard.d.ts +4 -5
  153. package/src/guards/flow.guard.d.ts +2 -0
  154. package/src/guards/product-unload.guard.d.ts +2 -2
  155. package/src/guards/root.guard.d.ts +0 -1
  156. package/src/pages/assets/assets.component.d.ts +5 -7
  157. package/src/pages/catalog/catalog.component.d.ts +5 -7
  158. package/src/pages/debug/debug.component.d.ts +5 -8
  159. package/src/pages/product/product.component.d.ts +8 -7
  160. package/src/pages/record-not-found/record-not-found.component.d.ts +2 -0
  161. package/src/pages/remote/remote.component.d.ts +2 -3
  162. package/src/pages/shopping-cart/shopping-cart.component.d.ts +5 -7
  163. package/src/resolvers/flow.resolver.d.ts +6 -7
  164. package/src/resolvers/quote.resolver.d.ts +7 -12
  165. package/src/services/doc-gen.service.d.ts +1 -1
  166. package/src/services/flow-dialog.service.d.ts +5 -2
  167. package/src/services/flow-router.service.d.ts +7 -3
  168. package/src/services/flow.service.d.ts +11 -4
  169. package/src/services/guided-selling.service.d.ts +1 -1
  170. package/src/services/index.d.ts +2 -0
  171. package/src/types/index.d.ts +0 -1
  172. package/core/modules/configuration/services/configuration.state.d.ts +0 -30
  173. package/core/services/metric-calculation/metric-calculation.service.d.ts +0 -25
  174. package/core/services/metric-calculation/metric-calculation.types.d.ts +0 -1
  175. package/core/services/metric-calculation/metric-calculation.utils.d.ts +0 -5
  176. package/esm2020/cms/services/integration.state.mjs +0 -37
  177. package/esm2020/cms/types/integration.types.mjs +0 -2
  178. package/esm2020/core/modules/configuration/services/configuration.state.mjs +0 -142
  179. package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +0 -85
  180. package/esm2020/core/services/metric-calculation/metric-calculation.types.mjs +0 -2
  181. package/esm2020/core/services/metric-calculation/metric-calculation.utils.mjs +0 -42
  182. package/esm2020/runtime/components/component-preview/component-preview.component.mjs +0 -125
  183. package/esm2020/runtime/components/index.mjs +0 -5
  184. package/esm2020/runtime/components/section-renderer/section-renderer.component.mjs +0 -67
  185. package/esm2020/runtime/components/ui-runtime/runtime.component.mjs +0 -440
  186. package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +0 -108
  187. package/esm2020/runtime/execution/components/children-placeholder/children-placeholder.component.mjs +0 -60
  188. package/esm2020/runtime/execution/components/context-provider/context-provider.component.mjs +0 -39
  189. package/esm2020/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.mjs +0 -67
  190. package/esm2020/runtime/execution/components/federated/federated.component.mjs +0 -74
  191. package/esm2020/runtime/execution/components/velo-attribute/velo-attribute.component.mjs +0 -60
  192. package/esm2020/runtime/execution/components/velo-multiselect/velo-multiselect.component.mjs +0 -130
  193. package/esm2020/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.mjs +0 -72
  194. package/esm2020/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.mjs +0 -97
  195. package/esm2020/runtime/execution/components/velo-port-radio/velo-port-radio.component.mjs +0 -142
  196. package/esm2020/runtime/execution/components/velo-type/velo-type.component.mjs +0 -119
  197. package/esm2020/runtime/execution/directives/section-script.directive.mjs +0 -247
  198. package/esm2020/runtime/execution/directives/sf-query.directive.mjs +0 -35
  199. package/esm2020/runtime/execution/directives/velo-attribute.directive.mjs +0 -88
  200. package/esm2020/runtime/execution/directives/velo-port.directive.mjs +0 -376
  201. package/esm2020/runtime/execution/directives/vl-approval.directive.mjs +0 -23
  202. package/esm2020/runtime/execution/directives/vl-document-attachments.directive.mjs +0 -36
  203. package/esm2020/runtime/execution/directives/vl-document-templates.directive.mjs +0 -60
  204. package/esm2020/runtime/execution/directives/vl-quote.directive.mjs +0 -42
  205. package/esm2020/runtime/execution/directives/vl-ramp.directive.mjs +0 -55
  206. package/esm2020/runtime/execution/runtime-execution.module.mjs +0 -133
  207. package/esm2020/runtime/execution/utils/federated.util.mjs +0 -32
  208. package/esm2020/runtime/index.mjs +0 -5
  209. package/esm2020/runtime/runtime.module.mjs +0 -74
  210. package/esm2020/runtime/services/cart.service.mjs +0 -29
  211. package/esm2020/runtime/services/collapsible-state.service.mjs +0 -34
  212. package/esm2020/runtime/services/configuration.service.mjs +0 -119
  213. package/esm2020/runtime/services/current-state.service.mjs +0 -17
  214. package/esm2020/runtime/services/form-scope.service.mjs +0 -30
  215. package/esm2020/runtime/services/index.mjs +0 -4
  216. package/esm2020/runtime/services/product-model-cache.service.mjs +0 -31
  217. package/esm2020/runtime/services/runtime-context.service.mjs +0 -60
  218. package/esm2020/runtime/services/runtime-form.service.mjs +0 -219
  219. package/esm2020/runtime/services/runtime.service.mjs +0 -115
  220. package/esm2020/runtime/services/section-helper.service.mjs +0 -27
  221. package/esm2020/runtime/services/section-scope.service.mjs +0 -36
  222. package/esm2020/runtime/services/section-store.service.mjs +0 -22
  223. package/esm2020/runtime/services/section.service.mjs +0 -117
  224. package/esm2020/runtime/types/bound-data.types.mjs +0 -7
  225. package/esm2020/runtime/types/index.mjs +0 -3
  226. package/esm2020/runtime/types/quote-states.types.mjs +0 -2
  227. package/esm2020/runtime/types/runtime.types.mjs +0 -2
  228. package/esm2020/runtime/types/script-registry.types.mjs +0 -51
  229. package/esm2020/runtime/utils/line-item.util.mjs +0 -270
  230. package/esm2020/runtime/utils/section.utils.mjs +0 -26
  231. package/esm2020/runtime/utils/sections-binder.helper.mjs +0 -105
  232. package/esm2020/runtime/veloceapps-sdk-runtime.mjs +0 -5
  233. package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +0 -119
  234. package/esm2020/src/components/header/cart-overlay/cart-preview.module.mjs +0 -47
  235. package/esm2020/src/components/header/header.component.mjs +0 -355
  236. package/esm2020/src/components/header/header.module.mjs +0 -52
  237. package/esm2020/src/components/header/header.types.mjs +0 -2
  238. package/esm2020/src/components/header/metrics/index.mjs +0 -2
  239. package/esm2020/src/components/header/metrics/metrics.component.mjs +0 -255
  240. package/esm2020/src/components/header/metrics/metrics.definitions.mjs +0 -2
  241. package/esm2020/src/components/header/metrics/metrics.module.mjs +0 -69
  242. package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +0 -137
  243. package/esm2020/src/pages/legacy-product/legacy-product.module.mjs +0 -19
  244. package/esm2020/src/types/flow-customization.types.mjs +0 -3
  245. package/fesm2015/veloceapps-sdk-runtime.mjs +0 -3770
  246. package/fesm2015/veloceapps-sdk-runtime.mjs.map +0 -1
  247. package/fesm2020/veloceapps-sdk-runtime.mjs +0 -3767
  248. package/fesm2020/veloceapps-sdk-runtime.mjs.map +0 -1
  249. package/runtime/README.md +0 -5
  250. package/runtime/components/component-preview/component-preview.component.d.ts +0 -27
  251. package/runtime/components/index.d.ts +0 -4
  252. package/runtime/components/section-renderer/section-renderer.component.d.ts +0 -25
  253. package/runtime/components/ui-runtime/runtime.component.d.ts +0 -53
  254. package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +0 -27
  255. package/runtime/execution/components/children-placeholder/children-placeholder.component.d.ts +0 -30
  256. package/runtime/execution/components/context-provider/context-provider.component.d.ts +0 -14
  257. package/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.d.ts +0 -25
  258. package/runtime/execution/components/federated/federated.component.d.ts +0 -36
  259. package/runtime/execution/components/velo-attribute/velo-attribute.component.d.ts +0 -19
  260. package/runtime/execution/components/velo-multiselect/velo-multiselect.component.d.ts +0 -35
  261. package/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.d.ts +0 -22
  262. package/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.d.ts +0 -22
  263. package/runtime/execution/components/velo-port-radio/velo-port-radio.component.d.ts +0 -28
  264. package/runtime/execution/components/velo-type/velo-type.component.d.ts +0 -31
  265. package/runtime/execution/directives/section-script.directive.d.ts +0 -59
  266. package/runtime/execution/directives/sf-query.directive.d.ts +0 -15
  267. package/runtime/execution/directives/velo-attribute.directive.d.ts +0 -26
  268. package/runtime/execution/directives/velo-port.directive.d.ts +0 -74
  269. package/runtime/execution/directives/vl-approval.directive.d.ts +0 -10
  270. package/runtime/execution/directives/vl-document-attachments.directive.d.ts +0 -15
  271. package/runtime/execution/directives/vl-document-templates.directive.d.ts +0 -33
  272. package/runtime/execution/directives/vl-quote.directive.d.ts +0 -14
  273. package/runtime/execution/directives/vl-ramp.directive.d.ts +0 -15
  274. package/runtime/execution/runtime-execution.module.d.ts +0 -25
  275. package/runtime/execution/utils/federated.util.d.ts +0 -6
  276. package/runtime/index.d.ts +0 -4
  277. package/runtime/runtime.module.d.ts +0 -16
  278. package/runtime/services/cart.service.d.ts +0 -15
  279. package/runtime/services/collapsible-state.service.d.ts +0 -15
  280. package/runtime/services/configuration.service.d.ts +0 -20
  281. package/runtime/services/current-state.service.d.ts +0 -8
  282. package/runtime/services/form-scope.service.d.ts +0 -20
  283. package/runtime/services/index.d.ts +0 -3
  284. package/runtime/services/product-model-cache.service.d.ts +0 -14
  285. package/runtime/services/runtime-context.service.d.ts +0 -16
  286. package/runtime/services/runtime-form.service.d.ts +0 -24
  287. package/runtime/services/runtime.service.d.ts +0 -44
  288. package/runtime/services/section-helper.service.d.ts +0 -8
  289. package/runtime/services/section-scope.service.d.ts +0 -14
  290. package/runtime/services/section-store.service.d.ts +0 -11
  291. package/runtime/services/section.service.d.ts +0 -30
  292. package/runtime/types/bound-data.types.d.ts +0 -13
  293. package/runtime/types/index.d.ts +0 -2
  294. package/runtime/types/quote-states.types.d.ts +0 -6
  295. package/runtime/types/runtime.types.d.ts +0 -19
  296. package/runtime/types/script-registry.types.d.ts +0 -13
  297. package/runtime/utils/line-item.util.d.ts +0 -34
  298. package/runtime/utils/section.utils.d.ts +0 -2
  299. package/runtime/utils/sections-binder.helper.d.ts +0 -16
  300. package/src/components/header/cart-overlay/cart-preview.component.d.ts +0 -36
  301. package/src/components/header/cart-overlay/cart-preview.module.d.ts +0 -14
  302. package/src/components/header/header.component.d.ts +0 -70
  303. package/src/components/header/header.module.d.ts +0 -16
  304. package/src/components/header/header.types.d.ts +0 -20
  305. package/src/components/header/metrics/index.d.ts +0 -1
  306. package/src/components/header/metrics/metrics.component.d.ts +0 -67
  307. package/src/components/header/metrics/metrics.definitions.d.ts +0 -1
  308. package/src/components/header/metrics/metrics.module.d.ts +0 -18
  309. package/src/pages/legacy-product/legacy-product.component.d.ts +0 -37
  310. package/src/pages/legacy-product/legacy-product.module.d.ts +0 -9
  311. package/src/types/flow-customization.types.d.ts +0 -12
  312. /package/{cms → core}/services/integration.state.d.ts +0 -0
@@ -1,51 +1,33 @@
1
1
  import * as i4 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy, NgModule, InjectionToken, Optional, Inject, Injectable, ViewChild, Input } from '@angular/core';
5
- import * as i2 from '@veloceapps/api';
4
+ import { Component, ChangeDetectionStrategy, NgModule, Optional, Inject, Injectable, inject } from '@angular/core';
5
+ import * as i1$1 from '@veloceapps/api';
6
6
  import { ApiModule } from '@veloceapps/api';
7
- import * as i3$1 from '@veloceapps/components';
8
- import { ToastType, LetDirectiveModule, QuantityControlModule, ErrorTooltipModule, HiddenTextTooltipModule, LoaderModule, EmptyStateModule } from '@veloceapps/components';
7
+ import * as i2$1 from '@veloceapps/components';
8
+ import { ToastType, LoaderModule, EmptyStateModule, LetDirectiveModule } from '@veloceapps/components';
9
9
  import * as i5 from '@veloceapps/sdk/cms';
10
- import { extractElementMetadata, extendElementMetadata, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
11
- import * as i1$1 from '@veloceapps/sdk/core';
12
- import { isLineItemModified, getOriginParent, SdkPipesModule, RuntimeOperation, generateModifiedAssetsMap, SdkCoreModule } from '@veloceapps/sdk/core';
10
+ import { extractElementMetadata, extendElementMetadata, btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
11
+ import * as i2 from '@veloceapps/sdk/core';
12
+ import { FLOW_CUSTOMIZATION, ContextService, FlowStateService, FlowInfoService, QuoteDraftService, ConfigurationService, IntegrationState, SdkCoreModule } from '@veloceapps/sdk/core';
13
13
  import * as i3 from 'primeng/button';
14
14
  import { ButtonModule } from 'primeng/button';
15
15
  import * as i1 from 'primeng/dynamicdialog';
16
- import { UITemplateComponentType, UITemplateType, SalesforceIdUtils, ConfigurationContextMode, EntityUtil, isLegacyUIDefinition, getUIDefinitionProperties, UUID } from '@veloceapps/core';
17
- import { BehaviorSubject, Subject, first, tap, takeUntil, catchError, of, map, switchMap, filter, shareReplay, startWith, distinctUntilChanged, combineLatest, finalize, noop, forkJoin, from, throwError } from 'rxjs';
18
- import * as i7 from 'primeng/overlaypanel';
19
- import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
20
- import * as i13 from 'primeng/splitbutton';
21
- import { SplitButtonModule } from 'primeng/splitbutton';
22
- import * as i10$1 from 'primeng/tooltip';
23
- import { TooltipModule } from 'primeng/tooltip';
24
- import * as i5$1 from '@angular/forms';
25
- import { FormGroup, FormControl, ReactiveFormsModule, Validators, FormsModule } from '@angular/forms';
26
- import { InputNumberModule } from 'primeng/inputnumber';
27
- import * as i9 from 'primeng/virtualscroller';
28
- import { VirtualScrollerModule } from 'primeng/virtualscroller';
16
+ import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
29
17
  import * as i1$2 from '@angular/router';
30
18
  import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
31
- import * as i8 from 'primeng/api';
32
- import * as i5$2 from '@angular/cdk/drag-drop';
33
- import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
34
- import { requiredValidator, invalidCharactersValidator, standardCharSetWithSpaceRegExp, reservedIdentifierValidator } from '@veloceapps/core/forms';
35
- import { cloneDeep, uniq } from 'lodash';
36
- import { withLatestFrom, tap as tap$1, takeUntil as takeUntil$1, first as first$1, take, map as map$1, switchMap as switchMap$1 } from 'rxjs/operators';
37
- import * as i9$1 from 'primeng/sidebar';
38
- import { SidebarModule } from 'primeng/sidebar';
39
- import * as i10 from 'primeng/inputtext';
40
- import { InputTextModule } from 'primeng/inputtext';
41
- import * as i11 from 'primeng/checkbox';
42
- import { CheckboxModule } from 'primeng/checkbox';
43
- import { HttpErrorResponse } from '@angular/common/http';
19
+ import { UITemplateType, SalesforceIdUtils, mapShoppingCartSettings, getMaxRenewalTermsValue, ConfigurationContextMode, isVeloceError, extractErrorDetails, UUID } from '@veloceapps/core';
20
+ import { HttpErrorResponse, HttpParams } from '@angular/common/http';
21
+ import * as i5$1 from '@angular/forms';
22
+ import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
44
23
  import { DropdownModule } from 'primeng/dropdown';
24
+ import * as i8 from 'primeng/inputtext';
25
+ import { InputTextModule } from 'primeng/inputtext';
45
26
  import * as i6 from 'primeng/radiobutton';
46
27
  import { RadioButtonModule } from 'primeng/radiobutton';
47
- import * as i4$1 from '@veloceapps/sdk/runtime';
48
- import { RuntimeModule } from '@veloceapps/sdk/runtime';
28
+ import * as i2$2 from 'primeng/api';
29
+ import { catchError as catchError$1 } from 'rxjs/operators';
30
+ import { DomHandler } from 'primeng/dom';
49
31
 
50
32
  const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
51
33
 
@@ -93,21 +75,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
93
75
  }]
94
76
  }] });
95
77
 
96
- const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
97
-
98
78
  class DocGenComponent {
99
- constructor(quoteDraftService, contextService, templatesApi, toastService, customizationService) {
100
- this.quoteDraftService = quoteDraftService;
101
- this.contextService = contextService;
79
+ constructor(templatesApi, contextService, flowStateService, flowInfo, toastService, customizationService) {
102
80
  this.templatesApi = templatesApi;
81
+ this.contextService = contextService;
82
+ this.flowStateService = flowStateService;
83
+ this.flowInfo = flowInfo;
103
84
  this.toastService = toastService;
104
85
  this.customizationService = customizationService;
105
86
  this.uiDefinition$ = new BehaviorSubject(null);
106
87
  this.templateApiName = '';
107
88
  this.destroy$ = new Subject();
108
- // initialize when quote draft requested
109
- this.quoteDraftService.quoteDraft$
110
- .pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
89
+ // wait until flow is initialized
90
+ this.flowStateService
91
+ .isInitialized$()
92
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
111
93
  .subscribe();
112
94
  }
113
95
  ngOnDestroy() {
@@ -115,8 +97,8 @@ class DocGenComponent {
115
97
  this.destroy$.complete();
116
98
  }
117
99
  initialize() {
118
- var _a;
119
- this.templateApiName = (_a = this.contextService.resolve().properties.docGenTemplateApiName) !== null && _a !== void 0 ? _a : '';
100
+ var _a, _b, _c;
101
+ this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.docGen) !== null && _c !== void 0 ? _c : '';
120
102
  this.generateUIDefinition$()
121
103
  .pipe(tap(uiDef => {
122
104
  if (!uiDef) {
@@ -131,78 +113,75 @@ class DocGenComponent {
131
113
  }), takeUntil(this.destroy$))
132
114
  .subscribe();
133
115
  }
134
- getTemplateRootComponent$(template) {
135
- return this.templatesApi
136
- .fetchComponents$(template.id)
137
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
138
- }
139
- getLocalTemplateComponentMeta$() {
116
+ getLocalMeta$() {
140
117
  var _a, _b;
141
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponent)) {
118
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
142
119
  return of(undefined);
143
120
  }
144
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponent(this.templateApiName).pipe(map(component => {
145
- if (!component) {
121
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
122
+ if (!components) {
146
123
  return;
147
124
  }
148
- return {
125
+ return components.map(component => ({
149
126
  html: component.html,
150
127
  css: component.css,
151
128
  js: component.js,
152
129
  json: component.json,
153
- };
130
+ }));
154
131
  }));
155
132
  }
156
- getDocGenComponentMeta$() {
157
- return this.templatesApi.fetchTemplates$().pipe(map(templates => {
158
- const template = templates.find(template => template.type === UITemplateType.DOCGEN && template.name === this.templateApiName);
159
- return template !== null && template !== void 0 ? template : templates[0];
160
- }), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
133
+ getOrgMeta$() {
134
+ const template = this.flowInfo.templates.DOCGEN;
135
+ if (!template) {
136
+ return of(undefined);
137
+ }
138
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
161
139
  }
162
140
  generateUIDefinition$() {
163
141
  return of(undefined).pipe(tap(() => {
164
142
  if (!this.templateApiName) {
165
- throw new Error("Flow Query parameter 'docGenTemplateApiName' is missing.");
143
+ throw new Error("Flow 'docGen' template is not defined.");
166
144
  }
167
- }), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getDocGenComponentMeta$())), map(meta => {
145
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
168
146
  var _a;
169
- if (!meta) {
147
+ if (!metaList) {
170
148
  return;
171
149
  }
172
150
  const headerId = (_a = this.contextService.resolve().properties.Id) !== null && _a !== void 0 ? _a : null;
173
- let script = meta.js;
174
- if (script) {
175
- const metadata = extractElementMetadata(script);
176
- script = extendElementMetadata(script, {
151
+ const patchedMetaList = metaList.map(component => {
152
+ if (!component.js) {
153
+ return component;
154
+ }
155
+ const metadata = extractElementMetadata(component.js);
156
+ const script = extendElementMetadata(component.js, {
177
157
  inputs: Object.assign(Object.assign({}, metadata.inputs), { Id: headerId ? `"${headerId}"` : null }),
178
158
  });
179
- }
159
+ return Object.assign(Object.assign({}, component), { js: script });
160
+ });
180
161
  const uiDef = {
181
162
  name: '',
182
163
  createdTimestamp: 0,
183
164
  primary: true,
184
165
  type: 'DEFAULT',
185
166
  version: 2,
186
- children: [
187
- {
188
- children: [],
189
- template: meta.html && btoa(meta.html),
190
- script: script && btoa(script),
191
- styles: meta.css && btoa(meta.css),
192
- },
193
- ],
167
+ children: patchedMetaList.map(child => ({
168
+ children: [],
169
+ template: child.html && btoaSafe(child.html),
170
+ script: child.js && btoaSafe(child.js),
171
+ styles: child.css && btoaSafe(child.css),
172
+ })),
194
173
  };
195
174
  return uiDef;
196
175
  }));
197
176
  }
198
177
  }
199
- DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
178
+ DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.ContextService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
200
179
  DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
201
180
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
202
181
  type: Component,
203
182
  args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
204
183
  }], ctorParameters: function () {
205
- return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
184
+ return [{ type: i1$1.UITemplatesApiService }, { type: i2.ContextService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
206
185
  type: Optional
207
186
  }, {
208
187
  type: Inject,
@@ -225,18 +204,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
225
204
  }] });
226
205
 
227
206
  class GuidedSellingComponent {
228
- constructor(quoteDraftService, contextService, templatesApi, toastService, customizationService) {
229
- this.quoteDraftService = quoteDraftService;
230
- this.contextService = contextService;
207
+ constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
231
208
  this.templatesApi = templatesApi;
209
+ this.flowStateService = flowStateService;
210
+ this.flowInfo = flowInfo;
232
211
  this.toastService = toastService;
233
212
  this.customizationService = customizationService;
234
213
  this.uiDefinition$ = new BehaviorSubject(null);
235
214
  this.templateApiName = '';
236
215
  this.destroy$ = new Subject();
237
- // initialize when quote draft requested
238
- this.quoteDraftService.quoteDraft$
239
- .pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
216
+ // wait until flow is initialized
217
+ this.flowStateService
218
+ .isInitialized$()
219
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
240
220
  .subscribe();
241
221
  }
242
222
  ngOnDestroy() {
@@ -244,8 +224,8 @@ class GuidedSellingComponent {
244
224
  this.destroy$.complete();
245
225
  }
246
226
  initialize() {
247
- var _a;
248
- this.templateApiName = (_a = this.contextService.resolve().properties.guidedSellingTemplateApiName) !== null && _a !== void 0 ? _a : '';
227
+ var _a, _b, _c;
228
+ this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.guidedSelling) !== null && _c !== void 0 ? _c : '';
249
229
  this.generateUIDefinition$()
250
230
  .pipe(tap(uiDef => {
251
231
  if (!uiDef) {
@@ -260,41 +240,37 @@ class GuidedSellingComponent {
260
240
  }), takeUntil(this.destroy$))
261
241
  .subscribe();
262
242
  }
263
- getTemplateRootComponent$(template) {
264
- return this.templatesApi
265
- .fetchComponents$(template.id)
266
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
267
- }
268
- getLocalTemplateComponentMeta$() {
243
+ getLocalMeta$() {
269
244
  var _a, _b;
270
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponent)) {
245
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
271
246
  return of(undefined);
272
247
  }
273
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponent(this.templateApiName).pipe(map(component => {
274
- if (!component) {
248
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
249
+ if (!components) {
275
250
  return;
276
251
  }
277
- return {
252
+ return components.map(component => ({
278
253
  html: component.html,
279
254
  css: component.css,
280
255
  js: component.js,
281
256
  json: component.json,
282
- };
257
+ }));
283
258
  }));
284
259
  }
285
- getGuidedSellingComponentMeta$() {
286
- return this.templatesApi.fetchTemplates$().pipe(map(templates => {
287
- const template = templates.find(template => template.type === UITemplateType.GUIDED_SELLING && template.name === this.templateApiName);
288
- return template !== null && template !== void 0 ? template : templates[0];
289
- }), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
260
+ getOrgMeta$() {
261
+ const template = this.flowInfo.templates.GUIDED_SELLING;
262
+ if (!template) {
263
+ return of(undefined);
264
+ }
265
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
290
266
  }
291
267
  generateUIDefinition$() {
292
268
  return of(undefined).pipe(tap(() => {
293
269
  if (!this.templateApiName) {
294
- throw new Error("Flow Query parameter 'guidedSellingTemplateApiName' is missing.");
270
+ throw new Error("Flow 'guidedSelling' template is not defined.");
295
271
  }
296
- }), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getGuidedSellingComponentMeta$())), map(meta => {
297
- if (!meta) {
272
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
273
+ if (!metaList) {
298
274
  return;
299
275
  }
300
276
  const uiDef = {
@@ -303,26 +279,24 @@ class GuidedSellingComponent {
303
279
  primary: true,
304
280
  type: 'DEFAULT',
305
281
  version: 2,
306
- children: [
307
- {
308
- children: [],
309
- template: meta.html && btoa(meta.html),
310
- script: meta.js && btoa(meta.js),
311
- styles: meta.css && btoa(meta.css),
312
- },
313
- ],
282
+ children: metaList.map(meta => ({
283
+ children: [],
284
+ template: meta.html && btoaSafe(meta.html),
285
+ script: meta.js && btoaSafe(meta.js),
286
+ styles: meta.css && btoaSafe(meta.css),
287
+ })),
314
288
  };
315
289
  return uiDef;
316
290
  }));
317
291
  }
318
292
  }
319
- GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
293
+ GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
320
294
  GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
321
295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
322
296
  type: Component,
323
297
  args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
324
298
  }], ctorParameters: function () {
325
- return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
299
+ return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
326
300
  type: Optional
327
301
  }, {
328
302
  type: Inject,
@@ -344,12 +318,129 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
344
318
  }]
345
319
  }] });
346
320
 
321
+ class FlowHeaderComponent {
322
+ constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
323
+ this.templatesApi = templatesApi;
324
+ this.flowStateService = flowStateService;
325
+ this.flowInfo = flowInfo;
326
+ this.toastService = toastService;
327
+ this.customizationService = customizationService;
328
+ this.uiDefinition$ = new BehaviorSubject(null);
329
+ this.templateApiName = '';
330
+ this.destroy$ = new Subject();
331
+ // wait until flow is initialized
332
+ this.flowStateService
333
+ .isInitialized$()
334
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
335
+ .subscribe();
336
+ }
337
+ ngOnDestroy() {
338
+ this.destroy$.next();
339
+ this.destroy$.complete();
340
+ }
341
+ initialize() {
342
+ var _a, _b, _c;
343
+ this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.flowHeader) !== null && _c !== void 0 ? _c : '';
344
+ this.generateUIDefinition$()
345
+ .pipe(tap(uiDef => {
346
+ if (!uiDef) {
347
+ throw new Error(`Component with name '${this.templateApiName}' not found.`);
348
+ }
349
+ this.uiDefinition$.next(uiDef);
350
+ }), catchError(err => {
351
+ var _a;
352
+ const message = 'Failed to resolve Flow Header component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
353
+ this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
354
+ return of();
355
+ }), takeUntil(this.destroy$))
356
+ .subscribe();
357
+ }
358
+ getLocalMeta$() {
359
+ var _a, _b;
360
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
361
+ return of(undefined);
362
+ }
363
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
364
+ if (!components) {
365
+ return;
366
+ }
367
+ return components.map(component => ({
368
+ html: component.html,
369
+ css: component.css,
370
+ js: component.js,
371
+ json: component.json,
372
+ }));
373
+ }));
374
+ }
375
+ getOrgMeta$() {
376
+ const template = this.flowInfo.templates.FLOW_HEADER;
377
+ if (!template) {
378
+ return of(undefined);
379
+ }
380
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
381
+ }
382
+ generateUIDefinition$() {
383
+ return of(undefined).pipe(tap(() => {
384
+ if (!this.templateApiName) {
385
+ throw new Error("Flow 'flowHeader' template is not defined.");
386
+ }
387
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
388
+ if (!metaList) {
389
+ return;
390
+ }
391
+ const uiDef = {
392
+ name: '',
393
+ createdTimestamp: 0,
394
+ primary: true,
395
+ type: 'DEFAULT',
396
+ version: 2,
397
+ children: metaList.map(meta => ({
398
+ children: [],
399
+ template: meta.html && btoaSafe(meta.html),
400
+ script: meta.js && btoaSafe(meta.js),
401
+ styles: meta.css && btoaSafe(meta.css),
402
+ })),
403
+ };
404
+ return uiDef;
405
+ }));
406
+ }
407
+ }
408
+ FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
409
+ FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowHeaderComponent, selector: "vl-flow-new-header", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
411
+ type: Component,
412
+ args: [{ selector: 'vl-flow-new-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
413
+ }], ctorParameters: function () {
414
+ return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
415
+ type: Optional
416
+ }, {
417
+ type: Inject,
418
+ args: [FLOW_CUSTOMIZATION]
419
+ }] }];
420
+ } });
421
+
422
+ class FlowNewHeaderModule {
423
+ }
424
+ FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
425
+ FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
426
+ FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
428
+ type: NgModule,
429
+ args: [{
430
+ declarations: [FlowHeaderComponent],
431
+ imports: [CommonModule, PreviewModule],
432
+ exports: [FlowHeaderComponent],
433
+ }]
434
+ }] });
435
+
347
436
  class FlowRouterService {
348
- constructor(router, route, contextService, integrationState) {
437
+ constructor(router, route, contextService, integrationState, flowInfoService, flowStateService) {
349
438
  this.router = router;
350
439
  this.route = route;
351
440
  this.contextService = contextService;
352
441
  this.integrationState = integrationState;
442
+ this.flowInfoService = flowInfoService;
443
+ this.flowStateService = flowStateService;
353
444
  this.urlHistory = [];
354
445
  this.getLastChildRoute = (route) => {
355
446
  return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;
@@ -412,7 +503,7 @@ class FlowRouterService {
412
503
  return '';
413
504
  }
414
505
  const path = rootRoute.pathFromRoot
415
- .map(r => { var _a; return (_a = r.routeConfig) === null || _a === void 0 ? void 0 : _a.path; })
506
+ .map(r => r.url[0])
416
507
  .filter(Boolean)
417
508
  .join('/');
418
509
  return '/' + path;
@@ -423,6 +514,9 @@ class FlowRouterService {
423
514
  get params$() {
424
515
  return this.lastChildParams$;
425
516
  }
517
+ get params() {
518
+ return this.getLastChildParams(this.route.snapshot);
519
+ }
426
520
  isConfigurationRoute$() {
427
521
  return this.getFlowSubpath$().pipe(map(url => url.startsWith('product')));
428
522
  }
@@ -441,13 +535,42 @@ class FlowRouterService {
441
535
  this.router.navigateByUrl(prevUrl);
442
536
  }
443
537
  }
538
+ navigateTo(path, productId, lineItemId) {
539
+ if (path === 'shopping-cart') {
540
+ this.navigateToShoppingCart();
541
+ }
542
+ else if (path === 'catalog') {
543
+ this.navigateToCatalog();
544
+ }
545
+ else if (path === 'assets') {
546
+ this.navigateToAssets();
547
+ }
548
+ else if (path === 'product' && productId) {
549
+ this.navigateToProductConfiguration(productId, lineItemId);
550
+ }
551
+ }
444
552
  navigateToProductConfiguration(productId, lineItemId) {
445
- this.contextService.update({ properties: { productId, lineItemId } });
446
- const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
447
- const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
448
- this.router.navigate([flowRouteUrl, 'product'], {
449
- queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), { productId }),
450
- });
553
+ let updateContext$;
554
+ if (this.flowInfoService.isLegacy) {
555
+ updateContext$ = of(undefined).pipe(tap(() => {
556
+ this.contextService.update({ properties: { productId, lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '' } });
557
+ }));
558
+ }
559
+ else {
560
+ updateContext$ = this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_CONTEXT_PROPERTIES', {
561
+ productId,
562
+ lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '',
563
+ });
564
+ }
565
+ updateContext$
566
+ .pipe(tap(() => {
567
+ const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
568
+ const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
569
+ this.router.navigate([flowRouteUrl, 'product'], {
570
+ queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), { productId }),
571
+ });
572
+ }))
573
+ .subscribe();
451
574
  }
452
575
  navigateToShoppingCart() {
453
576
  const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
@@ -464,6 +587,14 @@ class FlowRouterService {
464
587
  const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
465
588
  this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
466
589
  }
590
+ showErrorPage$(message, details) {
591
+ const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
592
+ const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
593
+ return from(this.router.navigate([flowRouteUrl, '404'], {
594
+ state: Object.assign({ message, type: 'error' }, (details && { details })),
595
+ replaceUrl: true,
596
+ })).pipe(map(() => false));
597
+ }
467
598
  switchObject(id) {
468
599
  const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
469
600
  const route = this.getLastChildRoute(this.route);
@@ -476,157 +607,18 @@ class FlowRouterService {
476
607
  this.router.navigate([], { relativeTo: route, queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), queryParams) });
477
608
  }
478
609
  }
479
- FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i1$1.ContextService }, { token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
610
+ FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.IntegrationState }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
480
611
  FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
481
612
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
482
613
  type: Injectable,
483
614
  args: [{ providedIn: 'root' }]
484
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }, { type: i5.IntegrationState }]; } });
485
-
486
- class CartPreviewComponent {
487
- constructor(flowConfiguration, routerService, productImagesService, quoteDraftService) {
488
- this.flowConfiguration = flowConfiguration;
489
- this.routerService = routerService;
490
- this.productImagesService = productImagesService;
491
- this.quoteDraftService = quoteDraftService;
492
- this.productRowHeight = 65;
493
- this.form = new FormGroup({});
494
- this.hasTermInProducts = false;
495
- this.scrollHeight = 0;
496
- this.shouldUpdate$ = new BehaviorSubject(true);
497
- this.destroyed$ = new Subject();
498
- this.lockedProductId$ = combineLatest([this.routerService.route$, this.routerService.isConfigurationRoute$()]).pipe(map(([route, isConfigurationRoute]) => {
499
- if (!isConfigurationRoute) {
500
- return null;
501
- }
502
- return route.queryParams['productId'];
503
- }));
504
- this.isEditMode$ = this.quoteDraftService.isEditMode$();
505
- }
506
- ngOnChanges(changes) {
507
- const { products } = changes;
508
- if (products) {
509
- this.shouldUpdate$.next(true);
510
- this.scrollHeight = Math.min(this.products.length * this.productRowHeight, 460);
511
- }
512
- }
513
- ngAfterViewInit() {
514
- combineLatest([this.lockedProductId$, this.isEditMode$, this.shouldUpdate$, this.overlayPanel.onShow])
515
- .pipe(filter(() => this.overlayPanel.overlayVisible), takeUntil(this.destroyed$))
516
- .subscribe(([lockedProductId, isEditMode]) => this.updateControls(this.products, isEditMode, lockedProductId));
517
- }
518
- ngOnDestroy() {
519
- this.destroyed$.next();
520
- this.destroyed$.complete();
521
- }
522
- getImageUrl(productId) {
523
- return this.productImagesService.getImageUrl$(productId);
524
- }
525
- navigateToProductConfiguration(productId, lineItemId) {
526
- this.overlayPanel.hide();
527
- this.routerService.navigateToProductConfiguration(productId, lineItemId);
528
- }
529
- controlBlurHandler(product) {
530
- const control = this.form.get(product.id);
531
- if (!control || control.invalid) {
532
- return;
533
- }
534
- this.flowConfiguration.update([
535
- {
536
- dataType: 'LINEITEM',
537
- attributeType: 'QTY',
538
- id: product.id,
539
- newValue: control.value,
540
- },
541
- ]);
542
- }
543
- deleteHandler(product) {
544
- this.flowConfiguration.delete([product.id]);
545
- }
546
- deleteAllHandler() {
547
- const productIds = this.products.map(product => product.id);
548
- this.flowConfiguration.delete(productIds);
549
- }
550
- updateControls(products, isEditMode, lockedProductId) {
551
- const ids = [];
552
- products.forEach(item => {
553
- if (!item.id) {
554
- return;
555
- }
556
- ids.push(item.id);
557
- let control = this.form.get(item.id);
558
- if (!control) {
559
- control = new FormControl(item.qty, []);
560
- this.form.addControl(item.id, control);
561
- }
562
- else {
563
- control.setValue(item.qty);
564
- }
565
- if (!isEditMode || item.deleted || item.productId === lockedProductId) {
566
- control.disable();
567
- }
568
- else {
569
- control.enable();
570
- }
571
- });
572
- const removedIds = Object.keys(this.form.controls).filter(id => !ids.includes(id));
573
- removedIds.forEach(id => this.form.removeControl(id));
574
- this.hasTermInProducts = products.some((item) => item.hasTerm);
575
- }
576
- }
577
- CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CartPreviewComponent, deps: [{ token: i1$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i1$1.ProductImagesService }, { token: i1$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
578
- CartPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-overlayPanel\n styleClass=\"catalog-overlay flow-header-overlay center no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"lockedProductId$ | async as lockedProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <p-virtualScroller [value]=\"products\" scrollHeight=\"{{ scrollHeight }}px\" [itemSize]=\"productRowHeight\">\n <ng-template pTemplate=\"item\" let-product>\n <div\n class=\"product item\"\n *vlLet=\"!isEditMode || product.deleted as isReadonlyProduct\"\n [class.readonly]=\"isReadonlyProduct\"\n [class.deleted]=\"product.deleted\"\n >\n <ng-container *vlLet=\"lockedProductId === product.productId as isLockedProduct\">\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\" [class.line-through]=\"product.deleted\">\n {{ product.name }}\n </div>\n <div class=\"actions\" *ngIf=\"!isReadonlyProduct\">\n <p-button\n label=\"Configure\"\n [disabled]=\"isLockedProduct || !product.configurable || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"isLockedProduct || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-button-secondary\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"form.get(product.id) as control\">\n <div class=\"qty\" *ngIf=\"!isReadonlyProduct; else readonlyQty\">\n <vl-quantity-control\n [formControl]=\"$any(control)\"\n (valueChange)=\"controlBlurHandler(product)\"\n ></vl-quantity-control>\n </div>\n <ng-template #readonlyQty\n ><span class=\"text-right\">{{ control.value }}</span></ng-template\n >\n </ng-container>\n </ng-container>\n </div>\n </ng-template>\n </p-virtualScroller>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-no-image no-image-icon\"></i>\n </ng-template>\n\n <div class=\"flex footer\">\n <p-button\n label=\"Clear Cart\"\n styleClass=\"p-button-link p-button-sm pl-0 pr-0\"\n [disabled]=\"!isEditMode || !!lockedProductId || hasTermInProducts\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">\n <i class=\"vl-icon vl-bag\"></i>\n There are no products added to the Shopping Cart yet.\n </span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: ["p-virtualscroller ::ng-deep .p-virtualscroller-header{background:none;padding:0;border:none;font-weight:unset}.flow-header-overlay *{font-family:var(--cg-font-family)}.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 8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.empty-state{background:var(--cg-bg-color);padding:16px;display:flex;gap:8px;justify-content:center;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.product{display:grid;grid-template-columns:auto 100px;padding:8px 0;border-bottom:1px solid var(--cg-border-color)}.product.readonly{align-items:center}.product.deleted{opacity:.5}.product.item{height:65px;overflow:hidden}.product__info{display:flex;gap:16px}.product__image-wrapper{flex-shrink:0;height:48px;width:48px;display:flex;justify-content:center;align-items:center;background:var(--cg-bg-color-hover);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .product-name{margin-bottom:4px;font-size:14px;font-weight:500;line-height:20px}.product .actions{display:flex;gap:16px}.footer{padding-top:8px}.word-break{word-break:break-word}.no-image-icon{height:24px;width:24px}.qty{display:flex;align-items:center}.flow-header-overlay__wrapper ::ng-deep .p-button-link{padding:0;font-size:12px;font-weight:400;line-height:18px;letter-spacing:.3px;color:var(--cg-primary-color)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled .p-button-label{text-decoration:none}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary:hover:enabled{color:var(--cg-primary-color)}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i7.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { kind: "component", type: i9.VirtualScroller, selector: "p-virtualScroller", inputs: ["value", "itemSize", "style", "styleClass", "scrollHeight", "lazy", "rows", "minBufferPx", "maxBufferPx", "delay", "trackBy", "totalRecords", "first", "cache"], outputs: ["onLazyLoad"] }, { kind: "component", type: i3$1.QuantityControlComponent, selector: "vl-quantity-control", outputs: ["valueChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
579
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CartPreviewComponent, decorators: [{
580
- type: Component,
581
- args: [{ selector: 'vl-cart-preview', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-overlayPanel\n styleClass=\"catalog-overlay flow-header-overlay center no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"lockedProductId$ | async as lockedProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <p-virtualScroller [value]=\"products\" scrollHeight=\"{{ scrollHeight }}px\" [itemSize]=\"productRowHeight\">\n <ng-template pTemplate=\"item\" let-product>\n <div\n class=\"product item\"\n *vlLet=\"!isEditMode || product.deleted as isReadonlyProduct\"\n [class.readonly]=\"isReadonlyProduct\"\n [class.deleted]=\"product.deleted\"\n >\n <ng-container *vlLet=\"lockedProductId === product.productId as isLockedProduct\">\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\" [class.line-through]=\"product.deleted\">\n {{ product.name }}\n </div>\n <div class=\"actions\" *ngIf=\"!isReadonlyProduct\">\n <p-button\n label=\"Configure\"\n [disabled]=\"isLockedProduct || !product.configurable || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"isLockedProduct || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-button-secondary\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"form.get(product.id) as control\">\n <div class=\"qty\" *ngIf=\"!isReadonlyProduct; else readonlyQty\">\n <vl-quantity-control\n [formControl]=\"$any(control)\"\n (valueChange)=\"controlBlurHandler(product)\"\n ></vl-quantity-control>\n </div>\n <ng-template #readonlyQty\n ><span class=\"text-right\">{{ control.value }}</span></ng-template\n >\n </ng-container>\n </ng-container>\n </div>\n </ng-template>\n </p-virtualScroller>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-no-image no-image-icon\"></i>\n </ng-template>\n\n <div class=\"flex footer\">\n <p-button\n label=\"Clear Cart\"\n styleClass=\"p-button-link p-button-sm pl-0 pr-0\"\n [disabled]=\"!isEditMode || !!lockedProductId || hasTermInProducts\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">\n <i class=\"vl-icon vl-bag\"></i>\n There are no products added to the Shopping Cart yet.\n </span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: ["p-virtualscroller ::ng-deep .p-virtualscroller-header{background:none;padding:0;border:none;font-weight:unset}.flow-header-overlay *{font-family:var(--cg-font-family)}.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 8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.empty-state{background:var(--cg-bg-color);padding:16px;display:flex;gap:8px;justify-content:center;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.product{display:grid;grid-template-columns:auto 100px;padding:8px 0;border-bottom:1px solid var(--cg-border-color)}.product.readonly{align-items:center}.product.deleted{opacity:.5}.product.item{height:65px;overflow:hidden}.product__info{display:flex;gap:16px}.product__image-wrapper{flex-shrink:0;height:48px;width:48px;display:flex;justify-content:center;align-items:center;background:var(--cg-bg-color-hover);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .product-name{margin-bottom:4px;font-size:14px;font-weight:500;line-height:20px}.product .actions{display:flex;gap:16px}.footer{padding-top:8px}.word-break{word-break:break-word}.no-image-icon{height:24px;width:24px}.qty{display:flex;align-items:center}.flow-header-overlay__wrapper ::ng-deep .p-button-link{padding:0;font-size:12px;font-weight:400;line-height:18px;letter-spacing:.3px;color:var(--cg-primary-color)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled .p-button-label{text-decoration:none}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary:hover:enabled{color:var(--cg-primary-color)}\n"] }]
582
- }], ctorParameters: function () { return [{ type: i1$1.FlowConfigurationService }, { type: FlowRouterService }, { type: i1$1.ProductImagesService }, { type: i1$1.QuoteDraftService }]; }, propDecorators: { overlayPanel: [{
583
- type: ViewChild,
584
- args: [OverlayPanel]
585
- }], products: [{
586
- type: Input
587
- }] } });
588
-
589
- class CartPreviewModule {
590
- }
591
- CartPreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CartPreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
592
- CartPreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [CommonModule,
593
- ReactiveFormsModule,
594
- ButtonModule,
595
- OverlayPanelModule,
596
- LetDirectiveModule,
597
- InputNumberModule,
598
- VirtualScrollerModule,
599
- QuantityControlModule], exports: [CartPreviewComponent] });
600
- CartPreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CartPreviewModule, imports: [CommonModule,
601
- ReactiveFormsModule,
602
- ButtonModule,
603
- OverlayPanelModule,
604
- LetDirectiveModule,
605
- InputNumberModule,
606
- VirtualScrollerModule,
607
- QuantityControlModule] });
608
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CartPreviewModule, decorators: [{
609
- type: NgModule,
610
- args: [{
611
- declarations: [CartPreviewComponent],
612
- imports: [
613
- CommonModule,
614
- ReactiveFormsModule,
615
- ButtonModule,
616
- OverlayPanelModule,
617
- LetDirectiveModule,
618
- InputNumberModule,
619
- VirtualScrollerModule,
620
- QuantityControlModule,
621
- ],
622
- exports: [CartPreviewComponent],
623
- }]
624
- }] });
615
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
625
616
 
626
617
  class FlowDialogService {
627
- constructor(dialogService, contextService) {
618
+ constructor(dialogService, contextService, runtimeSettings) {
628
619
  this.dialogService = dialogService;
629
620
  this.contextService = contextService;
621
+ this.runtimeSettings = runtimeSettings;
630
622
  }
631
623
  show(config) {
632
624
  return this.dialogService.open(FlowDialogComponent, {
@@ -647,8 +639,9 @@ class FlowDialogService {
647
639
  });
648
640
  }
649
641
  showReadonlyModeDialog() {
642
+ var _a;
650
643
  const ctx = this.contextService.resolve();
651
- const objectName = ctx.mode ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
644
+ const objectName = ctx.mode ? ((_a = ctx.mode[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + ctx.mode.substring(1).toLowerCase() : 'Object';
652
645
  return this.show({
653
646
  title: 'Error',
654
647
  description: `${objectName} Cannot be Saved`,
@@ -735,695 +728,55 @@ class FlowDialogService {
735
728
  secondaryButton: 'Cancel',
736
729
  });
737
730
  }
738
- }
739
- FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
740
- FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
741
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
742
- type: Injectable
743
- }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i1$1.ContextService }]; } });
744
-
745
- const METRICS_STORAGE_KEY = 'vl-metrics';
746
-
747
- class MetricsComponent {
748
- constructor(contextService, quoteDraftService, cdr, metricsCalculationService, flowConfiguration, shoppingCartSettingsApiService, runtimeSettings) {
749
- this.contextService = contextService;
750
- this.quoteDraftService = quoteDraftService;
751
- this.cdr = cdr;
752
- this.metricsCalculationService = metricsCalculationService;
753
- this.flowConfiguration = flowConfiguration;
754
- this.shoppingCartSettingsApiService = shoppingCartSettingsApiService;
755
- this.runtimeSettings = runtimeSettings;
756
- this.emptyStateMetrics = [
757
- { name: 'MRR', value: 0 },
758
- { name: 'E.MRR', value: 0 },
759
- { name: 'NRR', value: 0 },
760
- { name: 'E.NRR', value: 0 },
761
- ];
762
- this.visibleSelectedMetrics = [];
763
- this.restSelectedMetrics = [];
764
- this.metrics = [];
765
- this.filteredMetrics = [];
766
- this.sidebarVisible = false;
767
- this.searchControl = new FormControl('');
768
- this.isFocused = false;
769
- this.nameControl = new FormControl('', [
770
- requiredValidator,
771
- invalidCharactersValidator(standardCharSetWithSpaceRegExp),
772
- reservedIdentifierValidator,
773
- Validators.maxLength(80),
774
- ]);
775
- this.activeMetricRules = [];
776
- this.activeMetricRuleNames = [];
777
- this.defaultMetricRuleNames = [];
778
- this.metricKeys = [];
779
- this.lastSavedMetrics = [];
780
- this.destroyed$ = new Subject();
781
- this.currencySymbol = this.runtimeSettings.getCurrencySettings().symbol;
782
- }
783
- ngOnInit() {
784
- this.activeMetricRules = this.flowConfiguration.activeMetricsSnapshot.filter(metricRule => metricRule.metrics.some(metric => !!metric.totalName));
785
- const activeMetricRuleNames = this.activeMetricRules.map(metricRule => metricRule.title);
786
- this.shoppingCartSettingsApiService
787
- .getSettingsMap()
788
- .pipe(withLatestFrom(this.quoteDraftService.currentState$), tap$1(([settings, lineItems]) => {
789
- this.defaultMetricRuleNames = ((settings === null || settings === void 0 ? void 0 : settings.DEFAULT_HEADER_METRICS) || []).filter(ruleName => activeMetricRuleNames.includes(ruleName));
790
- this.metricKeys = this.collectMetricKeys(lineItems);
791
- this.activeMetricRuleNames = this.getActiveMetricRuleNames();
792
- }), takeUntil$1(this.destroyed$))
793
- .subscribe(() => {
794
- this.collectAvailableMetrics();
795
- });
796
- this.searchControl.valueChanges.pipe(takeUntil$1(this.destroyed$), startWith('')).subscribe(query => {
797
- this.filteredMetrics = this.metrics.filter(({ name }) => {
798
- return (name || '').toLowerCase().includes(query === null || query === void 0 ? void 0 : query.toLowerCase());
799
- });
800
- });
801
- this.metricsCalculationService.onMetricsUpdate$
802
- .pipe(takeUntil$1(this.destroyed$))
803
- .subscribe(() => this.cdr.detectChanges());
804
- }
805
- ngOnDestroy() {
806
- this.destroyed$.next();
807
- this.destroyed$.complete();
808
- }
809
- toggleOverlay(event, overlay, target) {
810
- event.stopPropagation();
811
- if (this.restSelectedMetrics.length) {
812
- if (!overlay.overlayVisible) {
813
- document.dispatchEvent(new Event('click'));
814
- }
815
- overlay.toggle(event, target);
816
- }
817
- else {
818
- this.openSidebar();
819
- }
820
- }
821
- openSidebar() {
822
- this.overlayPanel.hide();
823
- this.sidebarVisible = true;
824
- }
825
- closeSidebar() {
826
- this.sidebarVisible = false;
827
- this.metrics = cloneDeep(this.lastSavedMetrics);
828
- this.editingMetric = undefined;
829
- this.searchControl.setValue('');
830
- }
831
- getMetricValue(key) {
832
- const context = this.contextService.resolve();
833
- if (key.startsWith('Effective_')) {
834
- const correctKey = key.replace('Effective_', '');
835
- return this.toNumber(context.properties[correctKey]) - this.toNumber(context.properties[`Previous${correctKey}`]);
836
- }
837
- else {
838
- return this.metricsCalculationService.getMetricValue(key);
839
- }
840
- }
841
- save() {
842
- localStorage.setItem(METRICS_STORAGE_KEY, JSON.stringify(this.metrics));
843
- this.setMetrics();
844
- this.lastSavedMetrics = cloneDeep(this.metrics);
845
- this.closeSidebar();
846
- }
847
- changeMetricOrder(event) {
848
- moveItemInArray(this.metrics, event.previousIndex, event.currentIndex);
849
- this.filteredMetrics = this.metrics;
850
- }
851
- editMetric(metric) {
852
- if (this.editingMetric && this.nameControl.invalid) {
853
- return;
854
- }
855
- this.editingMetric = metric;
856
- this.nameControl.setValue(metric.name);
857
- }
858
- saveMetric() {
859
- var _a;
860
- if (this.nameControl.invalid) {
861
- return;
862
- }
863
- if (this.editingMetric) {
864
- this.editingMetric.name = (_a = this.nameControl.value) === null || _a === void 0 ? void 0 : _a.trim();
865
- }
866
- this.editingMetric = undefined;
867
- }
868
- cancelMetric() {
869
- this.editingMetric = undefined;
870
- }
871
- resetToDefault() {
872
- this.collectAvailableMetrics(true);
873
- }
874
- onFocus() {
875
- this.isFocused = true;
876
- }
877
- onBlur() {
878
- this.isFocused = false;
879
- }
880
- clearSearch(event) {
881
- event.stopPropagation();
882
- this.searchControl.setValue('');
883
- }
884
- collectMetricKeys(lineItems) {
885
- const keys = [];
886
- lineItems.forEach(lineItem => {
887
- keys.push(...Object.keys(lineItem.totalMetrics || {}));
888
- keys.push(...this.collectMetricKeys(lineItem.lineItems));
889
- });
890
- return uniq(keys);
891
- }
892
- setMetrics() {
893
- const metrics = cloneDeep(this.metrics.filter(({ visible }) => visible));
894
- this.visibleSelectedMetrics = metrics.slice(0, 4);
895
- this.restSelectedMetrics = metrics.slice(4);
896
- }
897
- collectAvailableMetrics(resetToDefault = false) {
898
- const storedMetrics = JSON.parse(localStorage.getItem(METRICS_STORAGE_KEY) || '[]');
899
- const metricKeys = this.metricKeys.slice();
900
- const isDefaultConfiguration = !storedMetrics.length || resetToDefault;
901
- this.metrics = (isDefaultConfiguration ? this.activeMetricRuleNames : storedMetrics).reduce((result, metric) => {
902
- const metricKeyIndex = metricKeys.findIndex(key => key === metric.key);
903
- if (metricKeyIndex >= 0) {
904
- metricKeys.splice(metricKeyIndex, 1);
905
- }
906
- if (isDefaultConfiguration && this.defaultMetricRuleNames.includes(metric.name)) {
907
- metric.visible = true;
908
- }
909
- return [...result, metric];
910
- }, []);
911
- this.metrics = [
912
- ...this.metrics,
913
- ...metricKeys.map(metricKey => {
914
- return { key: metricKey, name: this.getMetricName(metricKey), visible: false };
915
- }),
916
- ];
917
- // sort the metrics by the order of default metric rule names from the shopping cart settings
918
- this.metrics = this.sortMetrics();
919
- this.metrics = cloneDeep(this.metrics);
920
- this.searchControl.setValue('');
921
- if (!resetToDefault) {
922
- this.lastSavedMetrics = cloneDeep(this.metrics);
923
- this.setMetrics();
924
- }
925
- this.cdr.markForCheck();
926
- }
927
- getMetricName(key) {
928
- var _a;
929
- return (((_a = this.activeMetricRules.find(metricRule => metricRule.metrics.find(metric => metric.totalName === key))) === null || _a === void 0 ? void 0 : _a.title) ||
930
- key);
931
- }
932
- toNumber(value) {
933
- return +(value || 0);
934
- }
935
- getActiveMetricRuleNames() {
936
- return this.activeMetricRules.reduce((result, metricRule) => {
937
- const name = metricRule.title;
938
- const visible = this.defaultMetricRuleNames.includes(name);
939
- metricRule.metrics.forEach(metric => {
940
- result.push({
941
- key: metric.totalName || metric.name,
942
- name,
943
- visible,
944
- });
945
- });
946
- return result;
947
- }, []);
948
- }
949
- /**
950
- * Sorts the Metrics array by the order of the default metric rule names from the shopping cart settings.
951
- * If a metric is included in the list of default metrics, it raises the metric to the top of the metrics array.
952
- */
953
- sortMetrics() {
954
- return this.metrics.slice().sort((a, b) => {
955
- const indexA = this.defaultMetricRuleNames.indexOf(a.name);
956
- const indexB = this.defaultMetricRuleNames.indexOf(b.name);
957
- if (indexA === -1 && indexB === -1) {
958
- return 0;
959
- }
960
- if (indexA === -1) {
961
- return 1;
962
- }
963
- if (indexB === -1) {
964
- return -1;
965
- }
966
- return indexA - indexB;
731
+ showTermsLimitReachedDialog() {
732
+ const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
733
+ const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
734
+ return this.show({
735
+ title: 'Terms Limit Reached',
736
+ description: `You have reached the term quantity limit: ${maxRenewalTerms}. You can increase the limit in the Shopping Cart Settings.`,
737
+ primaryButton: 'Ok',
967
738
  });
968
739
  }
969
- }
970
- MetricsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i0.ChangeDetectorRef }, { token: i1$1.MetricsCalculationService }, { token: i1$1.FlowConfigurationService }, { token: i2.ShoppingCartSettingsApiService }, { token: i1$1.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Component });
971
- MetricsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: MetricsComponent, selector: "vl-metrics", viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], ngImport: i0, template: "<div class=\"header-metrics\" (click)=\"toggleOverlay($event, overlayPanel, metricsTarget)\">\n <div class=\"metrics\">\n <div *ngFor=\"let metric of visibleSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n\n <ng-container *ngIf=\"!visibleSelectedMetrics.length\">\n <div *ngFor=\"let metric of emptyStateMetrics\" class=\"metric empty-state-metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ metric.value | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.value | vlPrice }}\n </span>\n </div>\n </ng-container>\n </div>\n\n <div #metricsTarget class=\"metrics-overlay-target\" [class.expanded]=\"overlayPanel?.overlayVisible\">\n <i class=\"vl-icon vl-arrow-down\"></i>\n </div>\n</div>\n\n<p-overlayPanel\n styleClass=\"catalog-overlay metrics-overlay-container right no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"overlay-metrics\">\n <div *ngFor=\"let metric of restSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n </div>\n <button class=\"config\" (click)=\"openSidebar()\">\n Metrics Config\n <i class=\"vl-icon vl-arrow-right\"></i>\n </button>\n </ng-template>\n</p-overlayPanel>\n\n<p-sidebar\n [visible]=\"sidebarVisible\"\n (visibleChange)=\"closeSidebar()\"\n position=\"right\"\n [baseZIndex]=\"1000\"\n [style]=\"{ width: '300px' }\"\n>\n <div class=\"container\">\n <div class=\"header\">\n Quote Metrics Config\n <i class=\"vl-icon vl-cross\" (click)=\"closeSidebar()\"></i>\n </div>\n\n <label class=\"search-container\" [class.active]=\"searchControl.value || isFocused\">\n <i class=\"vl-icon vl-search\"></i>\n <input\n data-test-id=\"search\"\n [formControl]=\"searchControl\"\n pInputText\n placeholder=\"Search for metric\u2026\"\n class=\"w-full search-input\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <i *ngIf=\"searchControl.value\" class=\"vl-icon vl-cross\" (click)=\"clearSearch($event)\"></i>\n </label>\n\n <div class=\"content\">\n <div class=\"sidebar-metrics\" cdkDropList (cdkDropListDropped)=\"changeMetricOrder($event)\">\n <div\n *ngFor=\"let metric of filteredMetrics\"\n class=\"sidebar-metric\"\n [class.edit]=\"metric.key === editingMetric?.key\"\n cdkDrag\n [cdkDragDisabled]=\"!!searchControl.value\"\n >\n <div class=\"drag-icon\">\n <i class=\"vl-icon vl-drag\" cdkDragHandle></i>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"metricTemplate\"\n [ngTemplateOutletContext]=\"{ metric: metric }\"\n ></ng-container>\n </div>\n </div>\n\n <div class=\"empty-state\" *ngIf=\"!filteredMetrics.length\">There are no items matching your search criteria</div>\n </div>\n <div class=\"footer\">\n <p-button\n label=\"Reset to Default\"\n styleClass=\"p-button-outlined p-button-sm\"\n (onClick)=\"resetToDefault()\"\n ></p-button>\n <p-button label=\"Save\" styleClass=\"p-button p-button-filled p-button-sm\" (onClick)=\"save()\"></p-button>\n </div>\n </div>\n</p-sidebar>\n\n<ng-template #metricTemplate let-metric=\"metric\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" class=\"preview-state\">\n <p-checkbox\n [ngModel]=\"metric.visible\"\n (ngModelChange)=\"metric.visible = !metric.visible\"\n [binary]=\"true\"\n checkboxIcon=\"vl-icon vl-check\"\n ></p-checkbox>\n <div class=\"title\">{{ metric.name }}</div>\n </div>\n\n <div *ngIf=\"editingMetric?.key === metric.key\" class=\"edit-state\">\n <input data-test-id=\"name\" [formControl]=\"nameControl\" pInputText placeholder=\"Metric name\" class=\"w-full\" />\n <vl-error-tooltip [tooltip]=\"nameControl | error : 'name'\" [visible]=\"!!nameControl.errors\"></vl-error-tooltip>\n </div>\n <div class=\"actions\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" (click)=\"editMetric(metric)\" class=\"action edit\">\n <i class=\"vl-icon vl-edit\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"cancelMetric()\" class=\"action cancel\">\n <i class=\"vl-icon vl-cross\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"saveMetric()\" class=\"action save\">\n <i class=\"vl-icon vl-check\"></i>\n </div>\n </div>\n</ng-template>\n", styles: [":host .header-metrics{display:flex;gap:8px;cursor:pointer}:host .header-metrics *{font-family:var(--cg-font-family)}:host .header-metrics .metrics{min-width:130px;max-width:260px;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:0 8px;height:32px;align-items:flex-start}:host .header-metrics .metric{flex:1;flex-basis:114px;max-width:122px;display:flex;justify-content:space-between;align-items:flex-end;font-size:12px;line-height:16px;letter-spacing:.3px}:host .header-metrics .metric .name{color:#ffffffb3;max-width:55px;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .header-metrics .metric .value{overflow:hidden;text-overflow:ellipsis}:host .header-metrics .metric.empty-state-metric{filter:blur(1.5px)}:host .metrics-overlay-target{display:flex;align-items:center;width:16px;border-radius:4px;background:rgba(255,255,255,.1)}:host .metrics-overlay-target .vl-icon{color:var(--cg-white)}:host .metrics-overlay-target.expanded .vl-icon:before{transform:rotate(180deg)}:host ::ng-deep .p-sidebar-header{display:none}:host ::ng-deep .p-sidebar-content{padding:0;height:100%}::ng-deep .p-overlaypanel.metrics-overlay-container{max-width:300px;min-width:152px}::ng-deep .p-overlaypanel.metrics-overlay-container *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.metrics-overlay-container .p-overlaypanel-content{padding:0;margin-top:0}::ng-deep .p-overlaypanel.metrics-overlay-container .overlay-metrics{padding:16px;max-height:112px;overflow:auto}::ng-deep .p-overlaypanel.metrics-overlay-container .metric{display:flex;font-size:12px;line-height:16px;letter-spacing:.3px;align-items:flex-end}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .name{color:var(--cg-text-color-secondary);max-width:50%;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .value{overflow:hidden;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .filler:before{background-image:radial-gradient(circle at 1px 1px,var(--cg-text-color-secondary) 1px,transparent 0)}::ng-deep .p-overlaypanel.metrics-overlay-container .config{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 8px 8px 16px;cursor:pointer;background:var(--cg-white);outline:none;border:none;border-top:1px solid var(--cg-border-color);width:100%;height:32px;font-size:12px;line-height:16px;letter-spacing:.3px}::ng-deep .p-overlaypanel.metrics-overlay-container .config .vl-icon-chevron-down{color:var(--cg-primary-color)}.filler{flex:1;margin:0 4px 7px;min-width:7px}.filler:before{display:block;width:100%;height:2px;content:\"\";background-image:radial-gradient(circle at 1px 1px,rgba(255,255,255,.7) 1px,transparent 0);background-size:5px 2px}.container{display:flex;flex-direction:column;height:100%}.container .header{box-sizing:content-box;padding:24px 24px 0;margin-bottom:16px;height:32px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;font-family:var(--vl-font-family);font-size:20px;font-style:normal;font-weight:500;line-height:24px;letter-spacing:-.6px;color:var(--vl-accent-color)}.container .header i{cursor:pointer}.container .search-container{cursor:pointer;display:flex;height:32px;margin:0 24px 8px;padding:8px;background:var(--cg-bg-color);border:1px solid transparent;border-radius:32px}.container .search-container:hover,.container .search-container.active{background:var(--cg-white);border-color:var(--cg-primary-color)}.container .search-container .vl-icon{flex:0 0 auto}.container .search-container .search-input{width:100%;height:16px;padding:0 8px;border:none;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-black-color);background:none}.container .search-container .search-input::placeholder{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-text-color-secondary)}.container .content{padding:0 24px;display:flex;flex-direction:column;flex:1;overflow:hidden}.container .footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-top:1px solid var(--cg-border-color)}.container .footer p-button{flex:1}.container .footer p-button ::ng-deep button{border-radius:24px;width:100%;font-size:12px;font-family:var(--cg-font-family);font-weight:300;line-height:16px;letter-spacing:.3px;white-space:nowrap}.container .footer p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}.container .footer p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}.container app-empty-state::ng-deep{margin-bottom:12px}.container app-empty-state::ng-deep .container{width:100%;padding-bottom:0}.sidebar-metrics{width:100%;overflow:auto;padding:1px 0}.empty-state{display:flex;align-items:center;justify-content:center;padding:16px;color:var(--cg-text-color-secondary);font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.sidebar-metric{display:flex;align-items:center;height:32px;position:relative;border-bottom:1px solid var(--cg-border-color)}.sidebar-metric.edit{border-bottom-color:var(--cg-primary-color)}.sidebar-metric.edit .drag-icon{display:none}.sidebar-metric:hover:not(.edit){background:var(--cg-bg-color)}.sidebar-metric:hover:not(.edit) .edit{visibility:visible}.sidebar-metric p-checkbox{margin-right:8px}.sidebar-metric .drag-icon{width:16px;height:16px;margin-right:8px}.sidebar-metric .drag-icon i{cursor:pointer;color:var(--cg-text-color-disabled)}.sidebar-metric.cdk-drag-disabled .drag-icon i{cursor:default}.sidebar-metric .title{font-weight:400;font-size:12px;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:text;user-select:text;cursor:text;color:var(--cg-black)}.sidebar-metric .preview-state,.sidebar-metric .edit-state{position:relative;margin-right:8px;min-width:0;display:flex;align-items:center;flex:1}.sidebar-metric .preview-state input,.sidebar-metric .edit-state input{padding-left:48px;border:none;background:transparent;width:100%}.sidebar-metric .actions{display:flex;gap:4px}.sidebar-metric .action{cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:4px}.sidebar-metric .action:hover{background:var(--cg-primary-color);color:var(--cg-white)}.sidebar-metric .edit{visibility:hidden}.sidebar-metric .save{border-color:var(--cg-primary-color);border-radius:4px}.sidebar-metric ::ng-deep .p-checkbox{width:16px;height:16px}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box{width:16px;height:16px;border-width:1px;border-color:var(--cg-border-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box:hover{border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{background:var(--cg-primary-color);border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{flex:0 0 auto;width:12px;height:12px}.cdk-drag-preview{z-index:10001!important;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .metric-tooltip .p-tooltip-text{font-size:11px;line-height:14px;letter-spacing:.3px;background:var(--vl-text-color-accent)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i5$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i7.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i10.InputText, selector: "[pInputText]" }, { kind: "component", type: i11.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }, { kind: "component", type: i3$1.ErrorTooltipComponent, selector: "vl-error-tooltip", inputs: ["tooltip", "visible", "top"] }, { kind: "directive", type: i3$1.AppHiddenTextTooltipDirective, selector: "[vlHiddenTextTooltip]", inputs: ["vlHiddenTextTooltip"] }, { kind: "pipe", type: i3$1.ErrorPipe, name: "error" }, { kind: "pipe", type: i1$1.PricePipe, name: "vlPrice" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsComponent, decorators: [{
973
- type: Component,
974
- args: [{ selector: 'vl-metrics', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"header-metrics\" (click)=\"toggleOverlay($event, overlayPanel, metricsTarget)\">\n <div class=\"metrics\">\n <div *ngFor=\"let metric of visibleSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n\n <ng-container *ngIf=\"!visibleSelectedMetrics.length\">\n <div *ngFor=\"let metric of emptyStateMetrics\" class=\"metric empty-state-metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ metric.value | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.value | vlPrice }}\n </span>\n </div>\n </ng-container>\n </div>\n\n <div #metricsTarget class=\"metrics-overlay-target\" [class.expanded]=\"overlayPanel?.overlayVisible\">\n <i class=\"vl-icon vl-arrow-down\"></i>\n </div>\n</div>\n\n<p-overlayPanel\n styleClass=\"catalog-overlay metrics-overlay-container right no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"overlay-metrics\">\n <div *ngFor=\"let metric of restSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n </div>\n <button class=\"config\" (click)=\"openSidebar()\">\n Metrics Config\n <i class=\"vl-icon vl-arrow-right\"></i>\n </button>\n </ng-template>\n</p-overlayPanel>\n\n<p-sidebar\n [visible]=\"sidebarVisible\"\n (visibleChange)=\"closeSidebar()\"\n position=\"right\"\n [baseZIndex]=\"1000\"\n [style]=\"{ width: '300px' }\"\n>\n <div class=\"container\">\n <div class=\"header\">\n Quote Metrics Config\n <i class=\"vl-icon vl-cross\" (click)=\"closeSidebar()\"></i>\n </div>\n\n <label class=\"search-container\" [class.active]=\"searchControl.value || isFocused\">\n <i class=\"vl-icon vl-search\"></i>\n <input\n data-test-id=\"search\"\n [formControl]=\"searchControl\"\n pInputText\n placeholder=\"Search for metric\u2026\"\n class=\"w-full search-input\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <i *ngIf=\"searchControl.value\" class=\"vl-icon vl-cross\" (click)=\"clearSearch($event)\"></i>\n </label>\n\n <div class=\"content\">\n <div class=\"sidebar-metrics\" cdkDropList (cdkDropListDropped)=\"changeMetricOrder($event)\">\n <div\n *ngFor=\"let metric of filteredMetrics\"\n class=\"sidebar-metric\"\n [class.edit]=\"metric.key === editingMetric?.key\"\n cdkDrag\n [cdkDragDisabled]=\"!!searchControl.value\"\n >\n <div class=\"drag-icon\">\n <i class=\"vl-icon vl-drag\" cdkDragHandle></i>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"metricTemplate\"\n [ngTemplateOutletContext]=\"{ metric: metric }\"\n ></ng-container>\n </div>\n </div>\n\n <div class=\"empty-state\" *ngIf=\"!filteredMetrics.length\">There are no items matching your search criteria</div>\n </div>\n <div class=\"footer\">\n <p-button\n label=\"Reset to Default\"\n styleClass=\"p-button-outlined p-button-sm\"\n (onClick)=\"resetToDefault()\"\n ></p-button>\n <p-button label=\"Save\" styleClass=\"p-button p-button-filled p-button-sm\" (onClick)=\"save()\"></p-button>\n </div>\n </div>\n</p-sidebar>\n\n<ng-template #metricTemplate let-metric=\"metric\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" class=\"preview-state\">\n <p-checkbox\n [ngModel]=\"metric.visible\"\n (ngModelChange)=\"metric.visible = !metric.visible\"\n [binary]=\"true\"\n checkboxIcon=\"vl-icon vl-check\"\n ></p-checkbox>\n <div class=\"title\">{{ metric.name }}</div>\n </div>\n\n <div *ngIf=\"editingMetric?.key === metric.key\" class=\"edit-state\">\n <input data-test-id=\"name\" [formControl]=\"nameControl\" pInputText placeholder=\"Metric name\" class=\"w-full\" />\n <vl-error-tooltip [tooltip]=\"nameControl | error : 'name'\" [visible]=\"!!nameControl.errors\"></vl-error-tooltip>\n </div>\n <div class=\"actions\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" (click)=\"editMetric(metric)\" class=\"action edit\">\n <i class=\"vl-icon vl-edit\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"cancelMetric()\" class=\"action cancel\">\n <i class=\"vl-icon vl-cross\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"saveMetric()\" class=\"action save\">\n <i class=\"vl-icon vl-check\"></i>\n </div>\n </div>\n</ng-template>\n", styles: [":host .header-metrics{display:flex;gap:8px;cursor:pointer}:host .header-metrics *{font-family:var(--cg-font-family)}:host .header-metrics .metrics{min-width:130px;max-width:260px;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:0 8px;height:32px;align-items:flex-start}:host .header-metrics .metric{flex:1;flex-basis:114px;max-width:122px;display:flex;justify-content:space-between;align-items:flex-end;font-size:12px;line-height:16px;letter-spacing:.3px}:host .header-metrics .metric .name{color:#ffffffb3;max-width:55px;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .header-metrics .metric .value{overflow:hidden;text-overflow:ellipsis}:host .header-metrics .metric.empty-state-metric{filter:blur(1.5px)}:host .metrics-overlay-target{display:flex;align-items:center;width:16px;border-radius:4px;background:rgba(255,255,255,.1)}:host .metrics-overlay-target .vl-icon{color:var(--cg-white)}:host .metrics-overlay-target.expanded .vl-icon:before{transform:rotate(180deg)}:host ::ng-deep .p-sidebar-header{display:none}:host ::ng-deep .p-sidebar-content{padding:0;height:100%}::ng-deep .p-overlaypanel.metrics-overlay-container{max-width:300px;min-width:152px}::ng-deep .p-overlaypanel.metrics-overlay-container *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.metrics-overlay-container .p-overlaypanel-content{padding:0;margin-top:0}::ng-deep .p-overlaypanel.metrics-overlay-container .overlay-metrics{padding:16px;max-height:112px;overflow:auto}::ng-deep .p-overlaypanel.metrics-overlay-container .metric{display:flex;font-size:12px;line-height:16px;letter-spacing:.3px;align-items:flex-end}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .name{color:var(--cg-text-color-secondary);max-width:50%;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .value{overflow:hidden;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .filler:before{background-image:radial-gradient(circle at 1px 1px,var(--cg-text-color-secondary) 1px,transparent 0)}::ng-deep .p-overlaypanel.metrics-overlay-container .config{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 8px 8px 16px;cursor:pointer;background:var(--cg-white);outline:none;border:none;border-top:1px solid var(--cg-border-color);width:100%;height:32px;font-size:12px;line-height:16px;letter-spacing:.3px}::ng-deep .p-overlaypanel.metrics-overlay-container .config .vl-icon-chevron-down{color:var(--cg-primary-color)}.filler{flex:1;margin:0 4px 7px;min-width:7px}.filler:before{display:block;width:100%;height:2px;content:\"\";background-image:radial-gradient(circle at 1px 1px,rgba(255,255,255,.7) 1px,transparent 0);background-size:5px 2px}.container{display:flex;flex-direction:column;height:100%}.container .header{box-sizing:content-box;padding:24px 24px 0;margin-bottom:16px;height:32px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;font-family:var(--vl-font-family);font-size:20px;font-style:normal;font-weight:500;line-height:24px;letter-spacing:-.6px;color:var(--vl-accent-color)}.container .header i{cursor:pointer}.container .search-container{cursor:pointer;display:flex;height:32px;margin:0 24px 8px;padding:8px;background:var(--cg-bg-color);border:1px solid transparent;border-radius:32px}.container .search-container:hover,.container .search-container.active{background:var(--cg-white);border-color:var(--cg-primary-color)}.container .search-container .vl-icon{flex:0 0 auto}.container .search-container .search-input{width:100%;height:16px;padding:0 8px;border:none;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-black-color);background:none}.container .search-container .search-input::placeholder{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-text-color-secondary)}.container .content{padding:0 24px;display:flex;flex-direction:column;flex:1;overflow:hidden}.container .footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-top:1px solid var(--cg-border-color)}.container .footer p-button{flex:1}.container .footer p-button ::ng-deep button{border-radius:24px;width:100%;font-size:12px;font-family:var(--cg-font-family);font-weight:300;line-height:16px;letter-spacing:.3px;white-space:nowrap}.container .footer p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}.container .footer p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}.container app-empty-state::ng-deep{margin-bottom:12px}.container app-empty-state::ng-deep .container{width:100%;padding-bottom:0}.sidebar-metrics{width:100%;overflow:auto;padding:1px 0}.empty-state{display:flex;align-items:center;justify-content:center;padding:16px;color:var(--cg-text-color-secondary);font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.sidebar-metric{display:flex;align-items:center;height:32px;position:relative;border-bottom:1px solid var(--cg-border-color)}.sidebar-metric.edit{border-bottom-color:var(--cg-primary-color)}.sidebar-metric.edit .drag-icon{display:none}.sidebar-metric:hover:not(.edit){background:var(--cg-bg-color)}.sidebar-metric:hover:not(.edit) .edit{visibility:visible}.sidebar-metric p-checkbox{margin-right:8px}.sidebar-metric .drag-icon{width:16px;height:16px;margin-right:8px}.sidebar-metric .drag-icon i{cursor:pointer;color:var(--cg-text-color-disabled)}.sidebar-metric.cdk-drag-disabled .drag-icon i{cursor:default}.sidebar-metric .title{font-weight:400;font-size:12px;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:text;user-select:text;cursor:text;color:var(--cg-black)}.sidebar-metric .preview-state,.sidebar-metric .edit-state{position:relative;margin-right:8px;min-width:0;display:flex;align-items:center;flex:1}.sidebar-metric .preview-state input,.sidebar-metric .edit-state input{padding-left:48px;border:none;background:transparent;width:100%}.sidebar-metric .actions{display:flex;gap:4px}.sidebar-metric .action{cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:4px}.sidebar-metric .action:hover{background:var(--cg-primary-color);color:var(--cg-white)}.sidebar-metric .edit{visibility:hidden}.sidebar-metric .save{border-color:var(--cg-primary-color);border-radius:4px}.sidebar-metric ::ng-deep .p-checkbox{width:16px;height:16px}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box{width:16px;height:16px;border-width:1px;border-color:var(--cg-border-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box:hover{border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{background:var(--cg-primary-color);border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{flex:0 0 auto;width:12px;height:12px}.cdk-drag-preview{z-index:10001!important;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .metric-tooltip .p-tooltip-text{font-size:11px;line-height:14px;letter-spacing:.3px;background:var(--vl-text-color-accent)}\n"] }]
975
- }], ctorParameters: function () { return [{ type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i0.ChangeDetectorRef }, { type: i1$1.MetricsCalculationService }, { type: i1$1.FlowConfigurationService }, { type: i2.ShoppingCartSettingsApiService }, { type: i1$1.RuntimeSettingsService }]; }, propDecorators: { overlayPanel: [{
976
- type: ViewChild,
977
- args: [OverlayPanel]
978
- }] } });
979
-
980
- class FlowHeaderComponent {
981
- constructor(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService, integrationState) {
982
- this.contextService = contextService;
983
- this.quoteDraftService = quoteDraftService;
984
- this.quoteApiService = quoteApiService;
985
- this.sfApiService = sfApiService;
986
- this.flowConfiguration = flowConfiguration;
987
- this.routerService = routerService;
988
- this.dialogService = dialogService;
989
- this.integrationState = integrationState;
990
- this.isSaveInProgress$ = new BehaviorSubject(false);
991
- this.isSubmitInProgress$ = new BehaviorSubject(false);
992
- this.dateFormat = 'MM.dd.yyyy';
993
- this.assetPriceLists$ = new BehaviorSubject([]);
994
- this.mode$ = new BehaviorSubject(ConfigurationContextMode.TEST);
995
- this.destroyed$ = new Subject();
996
- this.contextProperties$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties));
997
- this.objectName$ = this.mode$.pipe(map(mode => { var _a; return (_a = mode === null || mode === void 0 ? void 0 : mode.toLocaleLowerCase()) !== null && _a !== void 0 ? _a : ''; }));
998
- this.activePriceList$ = this.quoteDraftService.activePriceList$;
999
- this.isReadonlyMode$ = this.quoteDraftService.hasProducts$.pipe(map(() => this.isReadonlyMode()));
1000
- this.status$ = this.contextService.resolve$().pipe(map(context => { var _a; return (_a = context.properties.Status) !== null && _a !== void 0 ? _a : ''; }));
1001
- this.isEditMode$ = this.quoteDraftService.isEditMode$();
1002
- this.assetsCount$ = this.getAssets$().pipe(map(lineItems => lineItems.length));
1003
- this.products$ = this.getDraftItems$().pipe(map(lineItems => this.generateProducts(lineItems)));
1004
- this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
1005
- this.isCartRoute$ = this.routerService.isCartRoute$();
1006
- this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
1007
- this.isAssetsRoute$ = this.routerService.isAssetsRoute$();
1008
- this.objectDetails$ = this.getObjectDetails$();
1009
- }
1010
- ngOnInit() {
1011
- this.contextService
1012
- .resolve$()
1013
- .pipe(takeUntil(this.destroyed$))
1014
- .subscribe(ctx => this.mode$.next(ctx.mode));
1015
- // update assetPriceLists on quoteDraft change in ACCOUNT mode
1016
- this.quoteDraftService.quoteDraft$
1017
- .pipe(takeUntil(this.destroyed$), filter(() => this.isAccountMode))
1018
- .subscribe(() => this.assetPriceLists$.next(this.quoteDraftService.assetPriceLists));
740
+ showDialog(dialog) {
741
+ const dialogFunction = this[dialog].bind(this);
742
+ return dialogFunction(dialog);
1019
743
  }
1020
- ngOnDestroy() {
1021
- this.destroyed$.next();
1022
- this.destroyed$.complete();
1023
- }
1024
- get isAccountMode() {
1025
- return this.mode$.value === ConfigurationContextMode.ACCOUNT;
1026
- }
1027
- get isQuoteMode() {
1028
- return this.mode$.value === ConfigurationContextMode.QUOTE;
1029
- }
1030
- get isAccountMode$() {
1031
- return this.mode$.pipe(map(mode => mode === ConfigurationContextMode.ACCOUNT));
1032
- }
1033
- get isQuoteMode$() {
1034
- return this.mode$.pipe(map(mode => mode === ConfigurationContextMode.QUOTE));
1035
- }
1036
- getSplitButtonActions(isCartRoute) {
1037
- return [
1038
- {
1039
- label: 'Save to Quote',
1040
- command: () => {
1041
- this.saveButtonClickHandler(isCartRoute);
1042
- },
1043
- },
1044
- {
1045
- label: 'Quick Save',
1046
- command: () => {
1047
- this.saveButtonClickHandler(isCartRoute, true);
1048
- },
1049
- },
1050
- {
1051
- label: 'Generate Document',
1052
- command: () => {
1053
- this.docGenButtonClickHandler(isCartRoute);
1054
- },
1055
- },
1056
- {
1057
- label: 'Submit For Approval',
1058
- command: () => {
1059
- this.submitButtonClickHandler(isCartRoute);
1060
- },
1061
- },
1062
- ];
1063
- }
1064
- back(objectId) {
1065
- const targetId = objectId !== null && objectId !== void 0 ? objectId : this.contextService.resolve().properties.Id;
1066
- if (targetId) {
1067
- window.VELO_BACK_FN.apply(null, [targetId]);
1068
- }
1069
- }
1070
- getSalesforceObjectLink(objectId) {
1071
- if (!objectId) {
1072
- return '';
1073
- }
1074
- return `${window.location.origin}/${objectId}`;
1075
- }
1076
- navigateToShoppingCart() {
1077
- if (!this.isReadonlyMode()) {
1078
- this.routerService.navigateToShoppingCart();
1079
- }
1080
- }
1081
- navigateToCatalog() {
1082
- if (!this.isReadonlyMode()) {
1083
- this.routerService.navigateToCatalog();
1084
- }
1085
- }
1086
- navigateToAssets() {
1087
- if (!this.isReadonlyMode()) {
1088
- this.routerService.navigateToAssets();
1089
- }
1090
- }
1091
- docGenButtonClickHandler(isCartRoute) {
1092
- if (this.isAccountMode) {
1093
- if (!this.quoteDraftService.hasUnsavedChanges) {
1094
- this.dialogService.showAccountNoChangesDialog().subscribe();
1095
- }
1096
- else {
1097
- this.dialogService.showDocgenAccountUnsavedChangesDialog().subscribe();
1098
- }
1099
- return;
1100
- }
1101
- if (!this.quoteDraftService.isEditMode()) {
1102
- this.dialogService.showDocgenReadonlyDialog().subscribe();
1103
- return;
1104
- }
1105
- if (!isCartRoute) {
1106
- this.dialogService.showDocgenOutsideShoppingCartDialog().subscribe();
1107
- return;
1108
- }
1109
- let shouldOpen$ = of(true);
1110
- if (this.quoteDraftService.hasUnsavedChanges) {
1111
- shouldOpen$ = this.dialogService.showDocgenUnsavedChangesDialog().pipe(switchMap(confirmed => {
1112
- if (!confirmed) {
1113
- return of(false);
1114
- }
1115
- return this.saveQuote$(true).pipe(map(() => true));
1116
- }));
1117
- }
1118
- shouldOpen$
1119
- .pipe(first(), tap(shouldOpen => shouldOpen && this.integrationState.dispatch(FlowAction.OpenDocGenAction())))
1120
- .subscribe();
1121
- }
1122
- saveButtonClickHandler(isCartRoute, stayOnPage = false) {
1123
- if (!this.quoteDraftService.isEditMode()) {
1124
- if (this.isQuoteMode) {
1125
- this.dialogService.showQuoteReadonlyModeDialog().subscribe();
1126
- }
1127
- else {
1128
- this.dialogService.showReadonlyModeDialog().subscribe();
1129
- }
1130
- return;
1131
- }
1132
- if (this.isUpsellQuoteWithoutChanges()) {
1133
- this.dialogService.showAccountNoChangesDialog().subscribe();
1134
- return;
1135
- }
1136
- if (this.isAccountMode && !this.quoteDraftService.hasUnsavedChanges) {
1137
- this.dialogService.showAccountNoChangesDialog().subscribe();
1138
- return;
1139
- }
1140
- if (!isCartRoute) {
1141
- this.dialogService.showQuoteOutsideShoppingCartDialog().subscribe();
1142
- return;
1143
- }
1144
- const lineItems = this.flowConfiguration.getSnapshot();
1145
- if (!lineItems.length) {
1146
- this.dialogService.showEmptyCartDialog().subscribe();
1147
- return;
1148
- }
1149
- this.saveQuote$(stayOnPage).subscribe();
1150
- }
1151
- submitButtonClickHandler(isCartRoute) {
1152
- if (this.isQuoteMode && !this.quoteDraftService.isEditMode()) {
1153
- this.dialogService.showReadonlyQuoteSubmitFailureDialog();
1154
- return;
1155
- }
1156
- if (this.isUpsellQuoteWithoutChanges()) {
1157
- this.dialogService.showAccountNoChangesDialog().subscribe();
1158
- return;
1159
- }
1160
- if (this.isAccountMode) {
1161
- this.dialogService.showAccountSubmitFailureDialog();
1162
- return;
1163
- }
1164
- if (!isCartRoute) {
1165
- this.dialogService.showOutsideShoppingCartQuoteSubmitFailureDialog().subscribe();
1166
- return;
1167
- }
1168
- const quoteDraft = this.quoteDraftService.quoteDraft;
1169
- if (!quoteDraft) {
1170
- return;
1171
- }
1172
- this.isSubmitInProgress$.next(true);
1173
- this.quoteApiService
1174
- .submitQuote(quoteDraft)
1175
- .pipe(tap(({ quoteId }) => {
1176
- this.quoteDraftService.hasUnsavedChanges = false;
1177
- this.back(quoteId);
1178
- }), finalize(() => this.isSubmitInProgress$.next(false)), takeUntil(this.destroyed$))
1179
- .subscribe();
1180
- }
1181
- selectPriceList(priceListId) {
1182
- this.quoteDraftService.updateActivePriceList(priceListId);
1183
- }
1184
- toggleCartOverlay(cart, event) {
1185
- event.stopPropagation();
1186
- if (!this.isReadonlyMode()) {
1187
- if (!cart.overlayPanel.overlayVisible) {
1188
- document.dispatchEvent(new Event('click'));
1189
- }
1190
- cart === null || cart === void 0 ? void 0 : cart.overlayPanel.toggle(event);
1191
- }
1192
- }
1193
- saveQuote$(stayOnPage = false) {
1194
- const quoteDraft = this.quoteDraftService.quoteDraftForActivePriceList;
1195
- if (!quoteDraft) {
1196
- return of(undefined);
1197
- }
1198
- this.isSaveInProgress$.next(true);
1199
- return this.quoteApiService.upsertQuote(quoteDraft).pipe(tap(({ quoteId }) => {
1200
- this.quoteDraftService.hasUnsavedChanges = false;
1201
- if (!stayOnPage) {
1202
- this.back(quoteId);
1203
- }
1204
- }), finalize(() => this.isSaveInProgress$.next(false)), map(noop), takeUntil(this.destroyed$));
1205
- }
1206
- queryName$(objectName, id) {
1207
- if (!id) {
1208
- return of('');
1209
- }
1210
- const searchRequest = {
1211
- count: 1,
1212
- rawCondition: `Id = '${id}'`,
1213
- fields: ['Name'],
1214
- };
1215
- return this.sfApiService.query(searchRequest, objectName).pipe(map(result => { var _a, _b; return (_b = (_a = result[0]) === null || _a === void 0 ? void 0 : _a.Name) !== null && _b !== void 0 ? _b : ''; }), takeUntil(this.destroyed$));
1216
- }
1217
- getObjectDetails$() {
1218
- return this.contextService.resolve$().pipe(distinctUntilChanged((prevCtx, currCtx) => prevCtx.properties.Id === currCtx.properties.Id), map(ctx => {
1219
- const isAccountMode = ctx.mode === ConfigurationContextMode.ACCOUNT;
1220
- const isQuoteMode = ctx.mode === ConfigurationContextMode.QUOTE;
1221
- return {
1222
- accountId: isAccountMode ? ctx.properties.Id : ctx.properties.AccountId,
1223
- opportunityId: ctx.properties.OpportunityId,
1224
- quoteId: isQuoteMode ? ctx.properties.Id : undefined,
1225
- quoteName: isQuoteMode ? ctx.properties.Name : undefined,
1226
- quoteNumber: isQuoteMode ? ctx.properties.QuoteNumber : undefined,
1227
- };
1228
- }), switchMap(details => combineLatest([
1229
- of(details),
1230
- this.queryName$('Account', details.accountId),
1231
- this.queryName$('Opportunity', details.opportunityId),
1232
- ])), map(([details, accountName, opportunityName]) => (Object.assign(Object.assign({}, details), { accountName, opportunityName }))));
1233
- }
1234
- formatMetric(value) {
1235
- return (value ? Number(value) : 0).toFixed(2);
1236
- }
1237
- getDraftItems$() {
1238
- return combineLatest([
1239
- this.flowConfiguration.get(),
1240
- this.integrationState.state$.pipe(map(state => state.modifiedAssets), distinctUntilChanged()),
1241
- ]).pipe(map(([lineItems, modifiedAssets]) => {
1242
- const currentTerms = lineItems.reduce((acc, li) => {
1243
- var _a;
1244
- const assetId = li.assetId || li.openOrderLineItemId;
1245
- const isModified = isLineItemModified(li);
1246
- const currentTerm = (_a = getOriginParent(lineItems, li)) !== null && _a !== void 0 ? _a : li;
1247
- if (isModified || (assetId && (modifiedAssets === null || modifiedAssets === void 0 ? void 0 : modifiedAssets[assetId]))) {
1248
- acc.push(currentTerm);
1249
- }
1250
- return acc;
1251
- }, []);
1252
- const uniqCurrentTerms = currentTerms.filter((value, index, array) => array.indexOf(value) === index);
1253
- return uniqCurrentTerms;
1254
- }));
1255
- }
1256
- getAssets$() {
1257
- return this.flowConfiguration
1258
- .get()
1259
- .pipe(map(lineItems => lineItems.filter(li => (!!li.assetId || !!li.openOrderLineItemId) && !li.rampInstanceId)));
1260
- }
1261
- generateProducts(lineItems) {
1262
- const date = new Date();
1263
- date.setHours(0, 0, 0, 0);
1264
- const now = date.getTime();
1265
- const termParentIds = lineItems.map(li => li.rampInstanceId).filter(Boolean);
1266
- const lineItemsRampInstanceIdMap = lineItems.reduce((acc, li) => {
1267
- var _a;
1268
- acc[(_a = li.rampInstanceId) !== null && _a !== void 0 ? _a : ''] = li;
1269
- return acc;
1270
- }, {});
1271
- return lineItems.reduce((result, li) => {
1272
- // find main term line item
1273
- if (li.rampInstanceId) {
1274
- return result;
1275
- }
1276
- // find current term line item
1277
- let target = li;
1278
- while (target && target.endDate && new Date(target.endDate).getTime() <= now) {
1279
- target = lineItemsRampInstanceIdMap[li.id];
1280
- }
1281
- if (target && target.productId) {
1282
- result.push({
1283
- id: target.id,
1284
- productId: target.productId,
1285
- name: target.name,
1286
- configurable: target.properties['#configurable'] === 'true',
1287
- deleted: target.actionCode === 'DELETE',
1288
- hasTerm: termParentIds.includes(target.id),
1289
- qty: target.qty,
1290
- mrr: this.formatMetric(target.properties.VDM_Total_MRR),
1291
- nrr: this.formatMetric(target.properties.VDM_Total_NRR),
1292
- });
1293
- }
1294
- return result;
1295
- }, []);
1296
- }
1297
- isReadonlyMode() {
1298
- var _a;
1299
- return (((_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.context.properties.mode) === ConfigurationContextMode.ACCOUNT &&
1300
- !this.quoteDraftService.hasProducts);
1301
- }
1302
- isUpsellQuoteWithoutChanges() {
1303
- const noUpdates = this.quoteDraftService.activeCurrentState.every(lineItem => lineItem.actionCode === 'EXIST');
1304
- const sameNumberOfProducts = this.quoteDraftService.getInitialCurrentState().length === this.quoteDraftService.activeCurrentState.length;
1305
- return noUpdates && sameNumberOfProducts;
1306
- }
1307
- }
1308
- FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i2.QuoteApiService }, { token: i2.SalesforceApiService }, { token: i1$1.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }, { token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
1309
- FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0, template: "<ng-container *ngIf=\"contextProperties$ | async as contextProperties\">\n <ng-container *ngIf=\"objectDetails$ | async as details\">\n <div class=\"flow-info\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-back\"></i>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode$ | async\">\n <nav\n class=\"account-name nav-item\"\n [pTooltip]=\"contextProperties.Name ?? ''\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"1000\"\n >\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode$ | async\">\n <span class=\"nav-item\">Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"catalog-overlay quote-info-overlay\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"quote-info\">\n <div class=\"title\">\n <span>Quote Information</span>\n <span class=\"close-action\" (click)=\"quoteDetails.hide()\">\n <i class=\"vl-icon vl-cross\"></i>\n </span>\n </div>\n\n <div class=\"details\">\n <div class=\"details-row\">\n <div class=\"label\">Account Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n {{ details.accountName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Opportunity Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n {{ details.opportunityName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Number</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteNumber }}\n </a>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </div>\n\n <div class=\"flow-navigation\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <nav\n class=\"nav-item\"\n *vlLet=\"assetsCount$ | async as assetsCount\"\n [ngClass]=\"{ active: (isAssetsRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToAssets()\"\n >\n Assets\n <div *ngIf=\"assetsCount\" class=\"counter\">{{ assetsCount }}</div>\n </nav>\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCatalogRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToCatalog()\"\n >\n Catalog\n </nav>\n <nav\n *vlLet=\"isConfigurationRoute$ | async as isConfigurationRoute\"\n class=\"nav-item\"\n [ngClass]=\"{ active: isConfigurationRoute, disabled: !isConfigurationRoute }\"\n >\n Configurator\n </nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToShoppingCart()\"\n >\n Shopping Cart\n <div *ngIf=\"products?.length\" class=\"counter\">{{ products?.length }}</div>\n\n <nav\n class=\"nav-popover-toggle\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"toggleCartOverlay(cart, $event)\"\n >\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products ?? []\"></vl-cart-preview>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"flow-controls\">\n <ng-container *ngIf=\"(isReadonlyMode$ | async) === false\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <div class=\"price-plan\">\n <ng-container *vlLet=\"assetPriceLists$ | async as assetPriceLists\">\n <ng-container\n *ngIf=\"(isAccountMode$ | async) && assetPriceLists && assetPriceLists.length > 1; else singlePriceList\"\n >\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList?.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >\n {{ option.name }}\n </span>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </ng-container>\n\n <ng-template #singlePriceList>\n <div>{{ priceList?.name }}</div>\n </ng-template>\n\n <div *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date : dateFormat }}</div>\n </div>\n </ng-container>\n </ng-container>\n\n <vl-metrics></vl-metrics>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <ng-container *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\">\n <ng-container *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\">\n <p-splitButton\n *ngIf=\"!isSaveInProgress && !isSubmitInProgress\"\n #splitButton\n label=\"Save to Quote\"\n (onClick)=\"saveButtonClickHandler(isCartRoute === true)\"\n [model]=\"getSplitButtonActions(isCartRoute === true)\"\n [disabled]=\"isReadonlyMode === true\"\n styleClass=\"catalog-split-button p-button-outlined\"\n [class.opened]=\"splitButton?.menu?.visible\"\n icon=\"vl-icon vl-arrow-down\"\n [menuStyle]=\"{ width: '144px' }\"\n >\n </p-splitButton>\n\n <p-button\n *ngIf=\"isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button\"\n label=\"Saving\"\n [loading]=\"true\"\n ></p-button>\n\n <p-button\n *ngIf=\"isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n label=\"Submitting\"\n [loading]=\"true\"\n ></p-button>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{font-family:var(--cg-font-family);display:flex;align-items:center;height:48px;width:100%;background-color:var(--cg-primary-color);color:#fff;padding:0 16px;flex-shrink:0}:host *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.quote-info-overlay{margin-left:-16px}.quote-info{width:348px}.quote-info .title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.quote-info .title .close-action{padding:4px}.quote-info .title .vl-icon{cursor:pointer}.quote-info .details .details-row{display:flex;align-items:center}.quote-info .details .details-row .label,.quote-info .details .details-row .value{flex:1;padding:8px;color:var(--cg-black)}.quote-info .details .details-row .label{font-size:12px;font-weight:500;line-height:16px;letter-spacing:.2px}.quote-info .details .details-row .value{text-align:right}.quote-info .details .details-row a{color:var(--cg-black);text-decoration:none;font-size:12px;line-height:18px;letter-spacing:.3px;border-bottom:1px solid var(--cg-black)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton{padding:8px 0 8px 16px;border-top-left-radius:24px;border-bottom-left-radius:24px;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton .p-button-icon{display:none}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton{width:16px;box-sizing:content-box;padding:8px;border-top-right-radius:24px;border-bottom-right-radius:24px;border-left:none;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton:hover:enabled{border-left:none}:host ::ng-deep .catalog-split-button .p-button{line-height:16px}:host ::ng-deep .catalog-split-button .p-button-label{font-size:12px;font-weight:300}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton:hover,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton:hover{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay{overflow:hidden;margin-top:4px;padding:0;border-radius:8px;box-shadow:0 8px 32px #0000001a}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem:not(:last-child){border-bottom:1px solid var(--cg-border-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link{padding:8px;color:var(--cg-primary-color);white-space:nowrap;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link .p-menuitem-text{color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link:hover{background:var(--cg-bg-color)}:host ::ng-deep p-splitButton.opened .p-button-icon{transform:rotate(180deg)}:host ::ng-deep p-splitButton.opened .p-splitbutton-defaultbutton,:host ::ng-deep p-splitButton.opened .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .save-button,:host ::ng-deep .submit-button{height:32px;width:136px;display:flex}:host ::ng-deep .save-button .p-button,:host ::ng-deep .submit-button .p-button{border-radius:24px;width:100%;height:100%;background:rgba(255,255,255,.3);opacity:1;border:none}:host ::ng-deep .save-button .p-button .p-button-label,:host ::ng-deep .submit-button .p-button .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;gap:8px;align-items:center}.flow-info .nav-item{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px}.flow-info .nav-popover-toggle{margin-left:-8px}.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;height:32px}nav.disabled{opacity:.6;cursor:default}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:16px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.metrics__row{display:flex;justify-content:space-between;gap:2px}.dot-separator:after{content:\"\";display:block;width:2px;height:2px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-navigation{margin-left:16px;margin-right:auto;display:flex;gap:8px;justify-content:center}.flow-navigation .nav-item{padding:8px 16px;border-radius:32px;color:#ffffff80;font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.flow-navigation .nav-item:not(.disabled):hover:not(.active){color:var(--cg-white);background:rgba(255,255,255,.1)}.flow-navigation .nav-item:not(.disabled).active{color:var(--cg-white)}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:8px}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px}.flow-controls .price-plan{color:#ffffffb3}.counter{margin-left:8px;height:16px;min-width:16px;text-align:center;background:rgba(255,255,255,.2);border-radius:16px;padding:0 4px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { kind: "directive", type: i10$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: ["products"] }, { kind: "component", type: i13.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onClick", "onDropdownClick"] }, { kind: "component", type: MetricsComponent, selector: "vl-metrics" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
1311
- type: Component,
1312
- args: [{ selector: 'vl-flow-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"contextProperties$ | async as contextProperties\">\n <ng-container *ngIf=\"objectDetails$ | async as details\">\n <div class=\"flow-info\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-back\"></i>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode$ | async\">\n <nav\n class=\"account-name nav-item\"\n [pTooltip]=\"contextProperties.Name ?? ''\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"1000\"\n >\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode$ | async\">\n <span class=\"nav-item\">Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"catalog-overlay quote-info-overlay\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"quote-info\">\n <div class=\"title\">\n <span>Quote Information</span>\n <span class=\"close-action\" (click)=\"quoteDetails.hide()\">\n <i class=\"vl-icon vl-cross\"></i>\n </span>\n </div>\n\n <div class=\"details\">\n <div class=\"details-row\">\n <div class=\"label\">Account Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n {{ details.accountName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Opportunity Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n {{ details.opportunityName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Number</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteNumber }}\n </a>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </div>\n\n <div class=\"flow-navigation\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <nav\n class=\"nav-item\"\n *vlLet=\"assetsCount$ | async as assetsCount\"\n [ngClass]=\"{ active: (isAssetsRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToAssets()\"\n >\n Assets\n <div *ngIf=\"assetsCount\" class=\"counter\">{{ assetsCount }}</div>\n </nav>\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCatalogRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToCatalog()\"\n >\n Catalog\n </nav>\n <nav\n *vlLet=\"isConfigurationRoute$ | async as isConfigurationRoute\"\n class=\"nav-item\"\n [ngClass]=\"{ active: isConfigurationRoute, disabled: !isConfigurationRoute }\"\n >\n Configurator\n </nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToShoppingCart()\"\n >\n Shopping Cart\n <div *ngIf=\"products?.length\" class=\"counter\">{{ products?.length }}</div>\n\n <nav\n class=\"nav-popover-toggle\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"toggleCartOverlay(cart, $event)\"\n >\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products ?? []\"></vl-cart-preview>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"flow-controls\">\n <ng-container *ngIf=\"(isReadonlyMode$ | async) === false\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <div class=\"price-plan\">\n <ng-container *vlLet=\"assetPriceLists$ | async as assetPriceLists\">\n <ng-container\n *ngIf=\"(isAccountMode$ | async) && assetPriceLists && assetPriceLists.length > 1; else singlePriceList\"\n >\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList?.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >\n {{ option.name }}\n </span>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </ng-container>\n\n <ng-template #singlePriceList>\n <div>{{ priceList?.name }}</div>\n </ng-template>\n\n <div *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date : dateFormat }}</div>\n </div>\n </ng-container>\n </ng-container>\n\n <vl-metrics></vl-metrics>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <ng-container *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\">\n <ng-container *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\">\n <p-splitButton\n *ngIf=\"!isSaveInProgress && !isSubmitInProgress\"\n #splitButton\n label=\"Save to Quote\"\n (onClick)=\"saveButtonClickHandler(isCartRoute === true)\"\n [model]=\"getSplitButtonActions(isCartRoute === true)\"\n [disabled]=\"isReadonlyMode === true\"\n styleClass=\"catalog-split-button p-button-outlined\"\n [class.opened]=\"splitButton?.menu?.visible\"\n icon=\"vl-icon vl-arrow-down\"\n [menuStyle]=\"{ width: '144px' }\"\n >\n </p-splitButton>\n\n <p-button\n *ngIf=\"isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button\"\n label=\"Saving\"\n [loading]=\"true\"\n ></p-button>\n\n <p-button\n *ngIf=\"isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n label=\"Submitting\"\n [loading]=\"true\"\n ></p-button>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{font-family:var(--cg-font-family);display:flex;align-items:center;height:48px;width:100%;background-color:var(--cg-primary-color);color:#fff;padding:0 16px;flex-shrink:0}:host *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.quote-info-overlay{margin-left:-16px}.quote-info{width:348px}.quote-info .title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.quote-info .title .close-action{padding:4px}.quote-info .title .vl-icon{cursor:pointer}.quote-info .details .details-row{display:flex;align-items:center}.quote-info .details .details-row .label,.quote-info .details .details-row .value{flex:1;padding:8px;color:var(--cg-black)}.quote-info .details .details-row .label{font-size:12px;font-weight:500;line-height:16px;letter-spacing:.2px}.quote-info .details .details-row .value{text-align:right}.quote-info .details .details-row a{color:var(--cg-black);text-decoration:none;font-size:12px;line-height:18px;letter-spacing:.3px;border-bottom:1px solid var(--cg-black)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton{padding:8px 0 8px 16px;border-top-left-radius:24px;border-bottom-left-radius:24px;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton .p-button-icon{display:none}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton{width:16px;box-sizing:content-box;padding:8px;border-top-right-radius:24px;border-bottom-right-radius:24px;border-left:none;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton:hover:enabled{border-left:none}:host ::ng-deep .catalog-split-button .p-button{line-height:16px}:host ::ng-deep .catalog-split-button .p-button-label{font-size:12px;font-weight:300}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton:hover,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton:hover{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay{overflow:hidden;margin-top:4px;padding:0;border-radius:8px;box-shadow:0 8px 32px #0000001a}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem:not(:last-child){border-bottom:1px solid var(--cg-border-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link{padding:8px;color:var(--cg-primary-color);white-space:nowrap;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link .p-menuitem-text{color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link:hover{background:var(--cg-bg-color)}:host ::ng-deep p-splitButton.opened .p-button-icon{transform:rotate(180deg)}:host ::ng-deep p-splitButton.opened .p-splitbutton-defaultbutton,:host ::ng-deep p-splitButton.opened .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .save-button,:host ::ng-deep .submit-button{height:32px;width:136px;display:flex}:host ::ng-deep .save-button .p-button,:host ::ng-deep .submit-button .p-button{border-radius:24px;width:100%;height:100%;background:rgba(255,255,255,.3);opacity:1;border:none}:host ::ng-deep .save-button .p-button .p-button-label,:host ::ng-deep .submit-button .p-button .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;gap:8px;align-items:center}.flow-info .nav-item{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px}.flow-info .nav-popover-toggle{margin-left:-8px}.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;height:32px}nav.disabled{opacity:.6;cursor:default}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:16px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.metrics__row{display:flex;justify-content:space-between;gap:2px}.dot-separator:after{content:\"\";display:block;width:2px;height:2px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-navigation{margin-left:16px;margin-right:auto;display:flex;gap:8px;justify-content:center}.flow-navigation .nav-item{padding:8px 16px;border-radius:32px;color:#ffffff80;font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.flow-navigation .nav-item:not(.disabled):hover:not(.active){color:var(--cg-white);background:rgba(255,255,255,.1)}.flow-navigation .nav-item:not(.disabled).active{color:var(--cg-white)}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:8px}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px}.flow-controls .price-plan{color:#ffffffb3}.counter{margin-left:8px;height:16px;min-width:16px;text-align:center;background:rgba(255,255,255,.2);border-radius:16px;padding:0 4px}\n"] }]
1313
- }], ctorParameters: function () { return [{ type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i2.QuoteApiService }, { type: i2.SalesforceApiService }, { type: i1$1.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }, { type: i5.IntegrationState }]; } });
1314
-
1315
- class MetricsModule {
1316
- }
1317
- MetricsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1318
- MetricsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: MetricsModule, declarations: [MetricsComponent], imports: [CommonModule,
1319
- FormsModule,
1320
- ReactiveFormsModule,
1321
- DragDropModule,
1322
- ButtonModule,
1323
- OverlayPanelModule,
1324
- SidebarModule,
1325
- InputTextModule,
1326
- CheckboxModule,
1327
- LetDirectiveModule,
1328
- VirtualScrollerModule,
1329
- ErrorTooltipModule,
1330
- HiddenTextTooltipModule,
1331
- SdkPipesModule], exports: [MetricsComponent] });
1332
- MetricsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsModule, imports: [CommonModule,
1333
- FormsModule,
1334
- ReactiveFormsModule,
1335
- DragDropModule,
1336
- ButtonModule,
1337
- OverlayPanelModule,
1338
- SidebarModule,
1339
- InputTextModule,
1340
- CheckboxModule,
1341
- LetDirectiveModule,
1342
- VirtualScrollerModule,
1343
- ErrorTooltipModule,
1344
- HiddenTextTooltipModule,
1345
- SdkPipesModule] });
1346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsModule, decorators: [{
1347
- type: NgModule,
1348
- args: [{
1349
- declarations: [MetricsComponent],
1350
- imports: [
1351
- CommonModule,
1352
- FormsModule,
1353
- ReactiveFormsModule,
1354
- DragDropModule,
1355
- ButtonModule,
1356
- OverlayPanelModule,
1357
- SidebarModule,
1358
- InputTextModule,
1359
- CheckboxModule,
1360
- LetDirectiveModule,
1361
- VirtualScrollerModule,
1362
- ErrorTooltipModule,
1363
- HiddenTextTooltipModule,
1364
- SdkPipesModule,
1365
- ],
1366
- exports: [MetricsComponent],
1367
- }]
1368
- }] });
1369
-
1370
- class FlowHeaderModule {
1371
744
  }
1372
- FlowHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1373
- FlowHeaderModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule,
1374
- OverlayPanelModule,
1375
- LetDirectiveModule,
1376
- TooltipModule,
1377
- ButtonModule,
1378
- CartPreviewModule,
1379
- SplitButtonModule,
1380
- MetricsModule,
1381
- SdkPipesModule], exports: [FlowHeaderComponent] });
1382
- FlowHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderModule, imports: [CommonModule,
1383
- OverlayPanelModule,
1384
- LetDirectiveModule,
1385
- TooltipModule,
1386
- ButtonModule,
1387
- CartPreviewModule,
1388
- SplitButtonModule,
1389
- MetricsModule,
1390
- SdkPipesModule] });
1391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderModule, decorators: [{
1392
- type: NgModule,
1393
- args: [{
1394
- declarations: [FlowHeaderComponent],
1395
- imports: [
1396
- CommonModule,
1397
- OverlayPanelModule,
1398
- LetDirectiveModule,
1399
- TooltipModule,
1400
- ButtonModule,
1401
- CartPreviewModule,
1402
- SplitButtonModule,
1403
- MetricsModule,
1404
- SdkPipesModule,
1405
- ],
1406
- exports: [FlowHeaderComponent],
1407
- }]
1408
- }] });
745
+ FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
746
+ FlowDialogServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
747
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
748
+ type: Injectable
749
+ }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
1409
750
 
1410
751
  class FlowService {
1411
- constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService) {
752
+ constructor(integrationState, flowRouterService, quoteDraftService, configurationService, configurationStateService, flowDialogService, flowConfigurationService, flowInfoService, flowStateService) {
1412
753
  this.integrationState = integrationState;
1413
754
  this.flowRouterService = flowRouterService;
1414
755
  this.quoteDraftService = quoteDraftService;
1415
756
  this.configurationService = configurationService;
757
+ this.configurationStateService = configurationStateService;
758
+ this.flowDialogService = flowDialogService;
1416
759
  this.flowConfigurationService = flowConfigurationService;
760
+ this.flowInfoService = flowInfoService;
761
+ this.flowStateService = flowStateService;
1417
762
  this.cleanup$ = new Subject();
1418
763
  }
764
+ cleanup() {
765
+ this.cleanup$.next();
766
+ }
1419
767
  initSubscriptions() {
1420
768
  this.integrationState
1421
769
  .listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
1422
- .pipe(tap(payload => {
770
+ .pipe(switchMap(payload => {
1423
771
  var _a, _b;
1424
- const productId = (_a = payload.productId) !== null && _a !== void 0 ? _a : (_b = this.quoteDraftService.currentState.find(li => li.id === payload.lineItemId)) === null || _b === void 0 ? void 0 : _b.productId;
1425
- if (productId) {
1426
- this.flowRouterService.navigateToProductConfiguration(productId, payload.lineItemId);
772
+ if (this.flowInfoService.isLegacy) {
773
+ const productId = (_a = payload.productId) !== null && _a !== void 0 ? _a : (_b = this.quoteDraftService.currentState.find(li => li.id === payload.lineItemId)) === null || _b === void 0 ? void 0 : _b.productId;
774
+ return of(Object.assign(Object.assign({}, payload), { productId }));
775
+ }
776
+ return this.prepareConfiguration$(payload.lineItemId).pipe(map(() => payload));
777
+ }), tap(payload => {
778
+ if (payload.productId) {
779
+ this.flowRouterService.navigateToProductConfiguration(payload.productId, payload.lineItemId);
1427
780
  }
1428
781
  else {
1429
782
  console.warn("Parameter 'productId' is needed to start configuration");
@@ -1437,54 +790,93 @@ class FlowService {
1437
790
  }), takeUntil(this.cleanup$))
1438
791
  .subscribe();
1439
792
  this.integrationState
1440
- .listen$(FlowAction.FLOW_NAVIGATE_BACK)
1441
- .pipe(tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
793
+ .listen$(FlowAction.FLOW_NAVIGATE_BACK)
794
+ .pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
795
+ .subscribe();
796
+ this.integrationState
797
+ .listen$(FlowAction.FLOW_NAVIGATE_TO)
798
+ .pipe(switchMap(payload => this.configurationStateService.cancelConfiguration().pipe(map(() => payload))), tap(payload => {
799
+ if (payload.path === 'product') {
800
+ this.integrationState.dispatch(FlowAction.ConfigureProductAction(payload));
801
+ }
802
+ else {
803
+ this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId);
804
+ }
805
+ }), takeUntil(this.cleanup$))
1442
806
  .subscribe();
807
+ this.integrationState
808
+ .listen$(FlowAction.OPEN_DIALOG)
809
+ .pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
810
+ .subscribe(dialogResult => {
811
+ this.integrationState.patchState({ dialogResult });
812
+ });
1443
813
  this.integrationState
1444
814
  .listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
1445
815
  .pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
1446
816
  .subscribe();
817
+ this.integrationState
818
+ .listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
819
+ .pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
820
+ .subscribe();
1447
821
  this.integrationState
1448
822
  .listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
1449
823
  .pipe(switchMap(() => {
1450
- const quoteDraft = this.quoteDraftService.quoteDraft;
1451
- const lineItem = this.configurationService.getSnapshot();
1452
- if (!quoteDraft || !lineItem) {
1453
- return of(undefined);
1454
- }
1455
- const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
1456
- let updatedState;
1457
- if (isNewLineItem) {
1458
- updatedState = [...quoteDraft.currentState, lineItem];
824
+ if (this.flowInfoService.isLegacy) {
825
+ return this.legacyApplyConfiguration();
1459
826
  }
1460
827
  else {
1461
- updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
828
+ return this.configurationStateService
829
+ .saveConfiguration('', true)
830
+ .pipe(switchMap(() => this.configurationStateService.cancelConfiguration()));
1462
831
  }
1463
- return this.flowConfigurationService.calculate$(Object.assign(Object.assign({}, quoteDraft), { currentState: updatedState }));
1464
832
  }), tap(() => {
1465
833
  this.configurationService.hasUnsavedChanges = false;
1466
834
  this.flowRouterService.navigateToShoppingCart();
1467
835
  }), takeUntil(this.cleanup$))
1468
836
  .subscribe();
1469
- this.updateFlowPath();
1470
- }
1471
- cleanup() {
1472
- this.cleanup$.next();
837
+ this.updateFlowParams();
1473
838
  }
1474
- updateFlowPath() {
839
+ updateFlowParams() {
1475
840
  this.flowRouterService
1476
841
  .getFlowSubpath$()
1477
842
  .pipe(map(path => { var _a; return (_a = path.split('/')) === null || _a === void 0 ? void 0 : _a[0]; }), takeUntil(this.cleanup$))
1478
843
  .subscribe(flowPath => this.integrationState.patchState({ flowPath }));
844
+ this.flowRouterService.route$
845
+ .pipe(map(path => path.queryParams['productId']), takeUntil(this.cleanup$))
846
+ .subscribe(productId => this.integrationState.patchState({ productId }));
847
+ }
848
+ prepareConfiguration$(lineItemId) {
849
+ if (!lineItemId) {
850
+ return of(undefined);
851
+ }
852
+ return this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_PRICE_LIST', {
853
+ lineItemId,
854
+ });
855
+ }
856
+ legacyApplyConfiguration() {
857
+ const quoteDraft = this.quoteDraftService.quoteDraft;
858
+ const lineItem = this.configurationService.getSnapshot();
859
+ if (!quoteDraft || !lineItem) {
860
+ return of(undefined);
861
+ }
862
+ const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
863
+ let updatedState;
864
+ if (isNewLineItem) {
865
+ updatedState = [...quoteDraft.currentState, lineItem];
866
+ }
867
+ else {
868
+ updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
869
+ }
870
+ return this.flowConfigurationService.calculate$(Object.assign(Object.assign({}, quoteDraft), { currentState: updatedState }));
1479
871
  }
1480
872
  }
1481
- FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token: i1$1.QuoteDraftService }, { token: i1$1.ConfigurationService }, { token: i1$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
873
+ FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: FlowDialogService }, { token: i2.FlowConfigurationService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
1482
874
  FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
1483
875
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
1484
876
  type: Injectable
1485
- }], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationService }, { type: i1$1.FlowConfigurationService }]; } });
877
+ }], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: FlowDialogService }, { type: i2.FlowConfigurationService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
1486
878
 
1487
- class FlowDocGenService {
879
+ class FlowGuidedSellingService {
1488
880
  constructor(integrationState) {
1489
881
  this.integrationState = integrationState;
1490
882
  this.cleanup$ = new Subject();
@@ -1497,47 +889,40 @@ class FlowDocGenService {
1497
889
  }
1498
890
  initSubscriptions() {
1499
891
  this.integrationState
1500
- .listen$(FlowAction.FLOW_OPEN_DOC_GEN)
892
+ .listen$(FlowAction.OPEN_GUIDED_SELLING)
1501
893
  .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
1502
894
  .subscribe();
1503
895
  this.integrationState
1504
- .listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
896
+ .listen$(FlowAction.CLOSE_GUIDED_SELLING)
1505
897
  .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
1506
898
  .subscribe();
1507
899
  }
1508
900
  }
1509
- FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
1510
- FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
1511
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
901
+ FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
902
+ FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
1512
904
  type: Injectable
1513
- }], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
905
+ }], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
1514
906
 
1515
907
  class FlowComponent {
1516
- constructor(routerService, quoteDraftService, flowService, docGenService, integrationState) {
908
+ constructor(routerService, flowService, flowInfo, guidedSellingService) {
1517
909
  this.routerService = routerService;
1518
- this.quoteDraftService = quoteDraftService;
1519
910
  this.flowService = flowService;
1520
- this.docGenService = docGenService;
1521
- this.integrationState = integrationState;
911
+ this.flowInfo = flowInfo;
912
+ this.guidedSellingService = guidedSellingService;
1522
913
  this.isLoading$ = this.routerService.loading$;
1523
- this.showHeader$ = this.routerService.route$.pipe(map(route => route.data['showHeader'] && !this.quoteDraftService.isStandalone));
1524
- this.isStandalone$ = this.quoteDraftService.isStandalone$;
914
+ this.showHeader$ = combineLatest([this.routerService.route$, this.flowInfo.flow$]).pipe(map(([route, flow]) => route.data['showHeader'] && !(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
915
+ this.isStandalone$ = this.flowInfo.flow$.pipe(map(flow => Boolean(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
916
+ this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
1525
917
  this.flowService.initSubscriptions();
1526
918
  }
1527
- ngOnInit() {
1528
- this.integrationState.clear();
1529
- }
1530
- ngOnDestroy() {
1531
- this.flowService.cleanup();
1532
- this.docGenService.cleanup();
1533
- }
1534
919
  }
1535
- FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i1$1.QuoteDraftService }, { token: FlowService }, { token: FlowDocGenService }, { token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
1536
- FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#ffffff80;z-index:4}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
920
+ FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
921
+ FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1537
922
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
1538
923
  type: Component,
1539
- args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, 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\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#ffffff80;z-index:4}\n"] }]
1540
- }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i1$1.QuoteDraftService }, { type: FlowService }, { type: FlowDocGenService }, { type: i5.IntegrationState }]; } });
924
+ args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"] }]
925
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
1541
926
 
1542
927
  const getFlowObjectIdPropertyName = (id) => {
1543
928
  const objectName = SalesforceIdUtils.getSfObjectNameById(id);
@@ -1552,10 +937,14 @@ const getFlowObjectIdPropertyName = (id) => {
1552
937
  }
1553
938
  };
1554
939
  const getDefaultProperties = (params) => {
1555
- var _a, _b, _c, _d;
940
+ var _a, _b;
1556
941
  const properties = {};
1557
- if (((_a = params.flowParams) === null || _a === void 0 ? void 0 : _a.entryPath.includes('/product')) || params.mode === ConfigurationContextMode.REMOTE) {
1558
- properties.standalone = (_d = (_c = (_b = params.flowParams) === null || _b === void 0 ? void 0 : _b.queryParams) === null || _c === void 0 ? void 0 : _c['standalone']) !== null && _d !== void 0 ? _d : 'true';
942
+ let standalone = (_a = params.flowParams) === null || _a === void 0 ? void 0 : _a.standalone;
943
+ if (((_b = params.flowParams) === null || _b === void 0 ? void 0 : _b.entryPath.includes('/product')) || params.mode === ConfigurationContextMode.REMOTE) {
944
+ standalone = standalone !== null && standalone !== void 0 ? standalone : true;
945
+ }
946
+ if (standalone != null) {
947
+ properties.standalone = standalone ? 'true' : 'false';
1559
948
  }
1560
949
  return properties;
1561
950
  };
@@ -1574,7 +963,7 @@ class ContextGuard {
1574
963
  const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
1575
964
  // Restrict if mode is not defined
1576
965
  if (mode == null) {
1577
- return this.handleError(route, 'Mode is undefined');
966
+ return this.routerService.showErrorPage$('Mode is undefined');
1578
967
  }
1579
968
  const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
1580
969
  // Allow if context is already initialized with the same headerId
@@ -1586,13 +975,13 @@ class ContextGuard {
1586
975
  }
1587
976
  // Initialize context and runtime settings
1588
977
  return forkJoin([this.contextService.create(headerId, mode), this.runtimeSettingsService.create()]).pipe(tap(([context]) => {
1589
- // Update context with queryParams
1590
978
  this.contextService.update(Object.assign(Object.assign({}, context), { properties: Object.assign(Object.assign(Object.assign({}, context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})), getDefaultProperties({ mode })) }));
1591
979
  // Init currency settings
1592
980
  this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
1593
981
  }), map(() => true), catchError(e => {
1594
982
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
1595
- return this.handleError(route, message);
983
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
984
+ return this.routerService.showErrorPage$(message, errorDetails);
1596
985
  }));
1597
986
  }
1598
987
  canActivate(route) {
@@ -1626,17 +1015,43 @@ class ContextGuard {
1626
1015
  }
1627
1016
  return;
1628
1017
  }
1629
- handleError(route, message) {
1630
- this.contextService.delete();
1631
- const parentUrl = this.routerService.getFlowRootPath(route);
1632
- return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
1633
- }
1634
1018
  }
1635
- ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i1$1.ContextService }, { token: i1$1.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
1019
+ ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
1636
1020
  ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard });
1637
1021
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, decorators: [{
1638
1022
  type: Injectable
1639
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i1$1.ContextService }, { type: i1$1.RuntimeSettingsService }]; } });
1023
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
1024
+
1025
+ const keepFlowInitialized = (route) => {
1026
+ const contextService = inject(ContextService);
1027
+ const flowState = inject(FlowStateService);
1028
+ const flowInfoService = inject(FlowInfoService);
1029
+ const routerService = inject(FlowRouterService);
1030
+ const quoteDraft = inject(QuoteDraftService);
1031
+ const configurationService = inject(ConfigurationService);
1032
+ const integrationState = inject(IntegrationState);
1033
+ const { flowId } = route.queryParams;
1034
+ const flow = flowInfoService.flow;
1035
+ if (flow && (flow === null || flow === void 0 ? void 0 : flow.id) === flowId) {
1036
+ return true;
1037
+ }
1038
+ // Cleanup
1039
+ flowState.cleanup();
1040
+ quoteDraft.reset();
1041
+ configurationService.reset();
1042
+ integrationState.clear();
1043
+ flowInfoService.cleanup();
1044
+ contextService.delete();
1045
+ if (!flowId) {
1046
+ return true;
1047
+ }
1048
+ const params = Object.assign(Object.assign({}, route.queryParams), flow === null || flow === void 0 ? void 0 : flow.properties.queryParams);
1049
+ return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => {
1050
+ const message = e instanceof HttpErrorResponse ? e.error.message : e;
1051
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
1052
+ return routerService.showErrorPage$(message, errorDetails);
1053
+ }));
1054
+ };
1640
1055
 
1641
1056
  class ProductUnloadGuard {
1642
1057
  constructor(router, contextService, quoteDraftService, configurationService, flowDialogService) {
@@ -1660,6 +1075,9 @@ class ProductUnloadGuard {
1660
1075
  }
1661
1076
  // clear obsolete queryParams
1662
1077
  const urlTree = this.router.parseUrl(nextState.url);
1078
+ if (!urlTree.queryParams['productId']) {
1079
+ return true;
1080
+ }
1663
1081
  delete urlTree.queryParams['productId'];
1664
1082
  // replace url after deactivation has finished
1665
1083
  setTimeout(() => this.router.navigateByUrl(urlTree.toString(), { replaceUrl: true }));
@@ -1669,33 +1087,36 @@ class ProductUnloadGuard {
1669
1087
  }));
1670
1088
  }
1671
1089
  }
1672
- ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i1$1.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
1090
+ ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
1673
1091
  ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
1674
1092
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
1675
1093
  type: Injectable
1676
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationService }, { type: FlowDialogService }]; } });
1094
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: FlowDialogService }]; } });
1677
1095
 
1678
1096
  class RootGuard {
1679
1097
  constructor(router, routerService) {
1680
1098
  this.router = router;
1681
1099
  this.routerService = routerService;
1682
1100
  this.initialized = false;
1683
- this.navToRestore = null;
1684
1101
  }
1685
1102
  canActivate(route) {
1686
- var _a;
1687
1103
  // We always need to initialize root component first, and only then start checking guards/resolvers
1688
1104
  if (!this.initialized) {
1689
1105
  this.initialized = true;
1690
- this.navToRestore = this.router.getCurrentNavigation();
1106
+ const navToRestore = this.router.getCurrentNavigation();
1691
1107
  const rootUrl = this.routerService.getFlowRootPath(route);
1692
- this.router.navigate([rootUrl], { replaceUrl: !((_a = this.navToRestore) === null || _a === void 0 ? void 0 : _a.previousNavigation) });
1693
- }
1694
- else if (this.navToRestore) {
1695
- const nav = this.navToRestore;
1696
- setTimeout(() => {
1697
- this.router.navigateByUrl(nav.extractedUrl, nav.extras);
1698
- this.navToRestore = null;
1108
+ this.router
1109
+ .navigate([rootUrl], {
1110
+ replaceUrl: !(navToRestore === null || navToRestore === void 0 ? void 0 : navToRestore.previousNavigation),
1111
+ skipLocationChange: true,
1112
+ })
1113
+ .then(success => {
1114
+ if (!success || !navToRestore) {
1115
+ return;
1116
+ }
1117
+ setTimeout(() => {
1118
+ this.router.navigateByUrl(navToRestore.extractedUrl, navToRestore.extras);
1119
+ });
1699
1120
  });
1700
1121
  }
1701
1122
  return true;
@@ -1713,18 +1134,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1713
1134
  }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
1714
1135
 
1715
1136
  class AssetsComponent {
1716
- constructor(templatesApi, contextService, cdr, toastService, customizationService) {
1717
- var _a;
1137
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1138
+ var _a, _b, _c;
1718
1139
  this.templatesApi = templatesApi;
1719
- this.contextService = contextService;
1720
1140
  this.cdr = cdr;
1721
1141
  this.toastService = toastService;
1142
+ this.flowInfo = flowInfo;
1722
1143
  this.customizationService = customizationService;
1723
1144
  this.uiDefinition = undefined;
1724
1145
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1725
1146
  this.templateApiName = '';
1726
1147
  this.destroyed$ = new Subject();
1727
- this.templateApiName = (_a = this.contextService.resolve().properties['assetsTemplateApiName']) !== null && _a !== void 0 ? _a : '';
1148
+ this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.assets) !== null && _c !== void 0 ? _c : '';
1728
1149
  }
1729
1150
  ngOnInit() {
1730
1151
  this.generateUIDefinition$()
@@ -1748,38 +1169,37 @@ class AssetsComponent {
1748
1169
  this.destroyed$.next();
1749
1170
  this.destroyed$.complete();
1750
1171
  }
1751
- getTemplateRootComponent$(template) {
1752
- return this.templatesApi
1753
- .fetchComponents$(template.id)
1754
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
1755
- }
1756
- getLocalAssetsComponentMeta$() {
1172
+ getLocalMeta$() {
1757
1173
  var _a, _b;
1758
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getAssetsComponent)) {
1174
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
1759
1175
  return of(undefined);
1760
1176
  }
1761
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getAssetsComponent(this.templateApiName).pipe(map(component => {
1762
- if (!component) {
1177
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
1178
+ if (!components) {
1763
1179
  return;
1764
1180
  }
1765
- return {
1181
+ return components.map(component => ({
1766
1182
  html: component.html,
1767
1183
  css: component.css,
1768
1184
  js: component.js,
1769
1185
  json: component.json,
1770
- };
1186
+ }));
1771
1187
  }));
1772
1188
  }
1773
- getAssetsComponentMeta$() {
1774
- return this.templatesApi.fetchTemplates$().pipe(map(templates => templates.find(template => template.name === this.templateApiName)), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
1189
+ getOrgMeta$() {
1190
+ const template = this.flowInfo.templates.SHOPPING_CART;
1191
+ if (!template) {
1192
+ return of(undefined);
1193
+ }
1194
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
1775
1195
  }
1776
1196
  generateUIDefinition$() {
1777
1197
  return of(undefined).pipe(tap(() => {
1778
1198
  if (!this.templateApiName) {
1779
- throw new Error("Flow Query parameter 'assetsTemplateApiName' is missing.");
1199
+ throw new Error("Flow 'assets' template is not defined.");
1780
1200
  }
1781
- }), switchMap(() => this.getLocalAssetsComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getAssetsComponentMeta$())), map(meta => {
1782
- if (!meta) {
1201
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1202
+ if (!metaList) {
1783
1203
  return;
1784
1204
  }
1785
1205
  const uiDef = {
@@ -1788,26 +1208,24 @@ class AssetsComponent {
1788
1208
  primary: true,
1789
1209
  type: 'DEFAULT',
1790
1210
  version: 2,
1791
- children: [
1792
- {
1793
- children: [],
1794
- template: meta.html && btoa(meta.html),
1795
- script: meta.js && btoa(meta.js),
1796
- styles: meta.css && btoa(meta.css),
1797
- },
1798
- ],
1211
+ children: metaList.map(meta => ({
1212
+ children: [],
1213
+ template: meta.html && btoaSafe(meta.html),
1214
+ script: meta.js && btoaSafe(meta.js),
1215
+ styles: meta.css && btoaSafe(meta.css),
1216
+ })),
1799
1217
  };
1800
1218
  return uiDef;
1801
1219
  }));
1802
1220
  }
1803
1221
  }
1804
- AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i2.UITemplatesApiService }, { token: i1$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1805
- AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1222
+ AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1223
+ AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1806
1224
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
1807
1225
  type: Component,
1808
1226
  args: [{ selector: 'vl-flow-assets', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
1809
1227
  }], ctorParameters: function () {
1810
- return [{ type: i2.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
1228
+ return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1811
1229
  type: Optional
1812
1230
  }, {
1813
1231
  type: Inject,
@@ -1830,18 +1248,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1830
1248
  }] });
1831
1249
 
1832
1250
  class CatalogComponent {
1833
- constructor(templatesApi, contextService, cdr, toastService, customizationService) {
1834
- var _a;
1251
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1252
+ var _a, _b, _c;
1835
1253
  this.templatesApi = templatesApi;
1836
- this.contextService = contextService;
1837
1254
  this.cdr = cdr;
1838
1255
  this.toastService = toastService;
1256
+ this.flowInfo = flowInfo;
1839
1257
  this.customizationService = customizationService;
1840
1258
  this.uiDefinition = undefined;
1841
1259
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1842
1260
  this.templateApiName = '';
1843
1261
  this.destroyed$ = new Subject();
1844
- this.templateApiName = (_a = this.contextService.resolve().properties.catalogTemplateApiName) !== null && _a !== void 0 ? _a : '';
1262
+ this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.catalog) !== null && _c !== void 0 ? _c : '';
1845
1263
  }
1846
1264
  ngOnInit() {
1847
1265
  this.generateUIDefinition$()
@@ -1865,38 +1283,37 @@ class CatalogComponent {
1865
1283
  this.destroyed$.next();
1866
1284
  this.destroyed$.complete();
1867
1285
  }
1868
- getTemplateRootComponent$(template) {
1869
- return this.templatesApi
1870
- .fetchComponents$(template.id)
1871
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
1872
- }
1873
- getLocalCatalogComponentMeta$() {
1286
+ getLocalMeta$() {
1874
1287
  var _a, _b;
1875
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getCatalogComponent)) {
1288
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
1876
1289
  return of(undefined);
1877
1290
  }
1878
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getCatalogComponent(this.templateApiName).pipe(map(component => {
1879
- if (!component) {
1291
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
1292
+ if (!components) {
1880
1293
  return;
1881
1294
  }
1882
- return {
1295
+ return components.map(component => ({
1883
1296
  html: component.html,
1884
1297
  css: component.css,
1885
1298
  js: component.js,
1886
1299
  json: component.json,
1887
- };
1300
+ }));
1888
1301
  }));
1889
1302
  }
1890
- getCatalogComponentMeta$() {
1891
- return this.templatesApi.fetchTemplates$().pipe(map(templates => templates.find(template => template.name === this.templateApiName)), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
1303
+ getOrgMeta$() {
1304
+ const template = this.flowInfo.templates.CATALOG;
1305
+ if (!template) {
1306
+ return of(undefined);
1307
+ }
1308
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
1892
1309
  }
1893
1310
  generateUIDefinition$() {
1894
1311
  return of(undefined).pipe(tap(() => {
1895
1312
  if (!this.templateApiName) {
1896
- throw new Error("Flow Query parameter 'catalogTemplateApiName' is missing.");
1313
+ throw new Error("Flow 'catalog' template is not defined.");
1897
1314
  }
1898
- }), switchMap(() => this.getLocalCatalogComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getCatalogComponentMeta$())), map(meta => {
1899
- if (!meta) {
1315
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1316
+ if (!metaList) {
1900
1317
  return;
1901
1318
  }
1902
1319
  const uiDef = {
@@ -1905,26 +1322,24 @@ class CatalogComponent {
1905
1322
  primary: true,
1906
1323
  type: 'DEFAULT',
1907
1324
  version: 2,
1908
- children: [
1909
- {
1910
- children: [],
1911
- template: meta.html && btoa(meta.html),
1912
- script: meta.js && btoa(meta.js),
1913
- styles: meta.css && btoa(meta.css),
1914
- },
1915
- ],
1325
+ children: metaList.map(meta => ({
1326
+ children: [],
1327
+ template: meta.html && btoaSafe(meta.html),
1328
+ script: meta.js && btoaSafe(meta.js),
1329
+ styles: meta.css && btoaSafe(meta.css),
1330
+ })),
1916
1331
  };
1917
1332
  return uiDef;
1918
1333
  }));
1919
1334
  }
1920
1335
  }
1921
- CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i2.UITemplatesApiService }, { token: i1$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1922
- CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1336
+ CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1337
+ CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1923
1338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
1924
1339
  type: Component,
1925
1340
  args: [{ selector: 'vl-flow-catalog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
1926
1341
  }], ctorParameters: function () {
1927
- return [{ type: i2.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
1342
+ return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1928
1343
  type: Optional
1929
1344
  }, {
1930
1345
  type: Inject,
@@ -1956,16 +1371,7 @@ class DebugComponent {
1956
1371
  this.form = new FormGroup({
1957
1372
  id: new FormControl(''),
1958
1373
  });
1959
- this.flows$ = this.flowsApiService.fetchFlows().pipe(map(flows => flows.map(flow => {
1960
- var _a, _b, _c;
1961
- const queryParams = (_b = (_a = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _a === void 0 ? void 0 : _a.queryParams) !== null && _b !== void 0 ? _b : {};
1962
- return {
1963
- id: flow.id,
1964
- entryPath: (_c = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _c === void 0 ? void 0 : _c.entryPath,
1965
- queryParams,
1966
- queryParamsStr: JSON.stringify(queryParams),
1967
- };
1968
- })), shareReplay());
1374
+ this.flows$ = this.flowsApiService.fetchFlows().pipe(shareReplay());
1969
1375
  }
1970
1376
  runFlow() {
1971
1377
  const { id } = this.form.value;
@@ -1977,17 +1383,20 @@ class DebugComponent {
1977
1383
  this.context.delete();
1978
1384
  this.quoteDraftService.reset();
1979
1385
  this.router.navigate(['..', 'flows'], {
1980
- queryParams: Object.assign({ flowId: this.selectedFlow.id, [objectPropertyName]: id }, this.selectedFlow.queryParams),
1386
+ queryParams: Object.assign({ flowId: this.selectedFlow.id, [objectPropertyName]: id }, this.selectedFlow.properties.queryParams),
1981
1387
  relativeTo: this.activatedRoute,
1982
1388
  });
1983
1389
  }
1390
+ getQueryParamsString(params) {
1391
+ return new HttpParams({ fromObject: params }).toString();
1392
+ }
1984
1393
  }
1985
- DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i2.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
1986
- DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </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;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"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i10.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1394
+ DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$1.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
1395
+ DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}tbody>tr{cursor:pointer}tbody>tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1987
1396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
1988
1397
  type: Component,
1989
- args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </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;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"] }]
1990
- }], ctorParameters: function () { return [{ type: i2.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }]; } });
1398
+ args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}tbody>tr{cursor:pointer}tbody>tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px;line-height:18px}.cell-query-params{word-break:break-all}\n"] }]
1399
+ }], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
1991
1400
 
1992
1401
  const routes$1 = [{ path: '', component: DebugComponent }];
1993
1402
  class DebugModule {
@@ -2027,7 +1436,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2027
1436
  class EmptyAccountComponent {
2028
1437
  }
2029
1438
  EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2030
- EmptyAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EmptyAccountComponent, selector: "vl-empty-account", ngImport: i0, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"], dependencies: [{ kind: "component", type: i3$1.EmptyStateComponent, selector: "vl-empty-state", inputs: ["primaryText", "secondaryText", "buttonLabel", "icon", "disabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1439
+ EmptyAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EmptyAccountComponent, selector: "vl-empty-account", ngImport: i0, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"], dependencies: [{ kind: "component", type: i2$1.EmptyStateComponent, selector: "vl-empty-state", inputs: ["primaryText", "secondaryText", "buttonLabel", "icon", "disabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2031
1440
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, decorators: [{
2032
1441
  type: Component,
2033
1442
  args: [{ selector: 'vl-empty-account', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"] }]
@@ -2047,147 +1456,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2047
1456
  }]
2048
1457
  }] });
2049
1458
 
2050
- class LegacyProductComponent {
2051
- constructor(route, quoteDraftService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
2052
- this.route = route;
2053
- this.quoteDraftService = quoteDraftService;
2054
- this.quoteApiService = quoteApiService;
2055
- this.contextService = contextService;
2056
- this.runtimeContextService = runtimeContextService;
2057
- this.runtimeService = runtimeService;
2058
- this.currentStateService = currentStateService;
2059
- this.customizationService = customizationService;
2060
- this.destroyed$ = new Subject();
2061
- }
2062
- ngOnInit() {
2063
- this.quoteDraftService.quoteDraft$
2064
- .pipe(first$1(), takeUntil$1(this.destroyed$))
2065
- .subscribe(quote => this.init(quote, this.route.snapshot.queryParams));
2066
- this.runtimeService.onSolutionStopEvent.pipe(take(1)).subscribe(lineItem => this.onSolutionStop(lineItem));
2067
- this.runtimeService.onSolutionReadyEvent.pipe(take(1)).subscribe(event => this.onSolutionReady(event));
2068
- this.runtimeService.onSolutionCancelEvent.pipe(take(1)).subscribe(() => this.onSolutionCancel());
2069
- }
2070
- ngOnDestroy() {
2071
- this.destroyed$.next();
2072
- this.destroyed$.complete();
2073
- }
2074
- onSolutionReady(lineItem) {
2075
- var _a;
2076
- lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
2077
- }
2078
- onSolutionCancel() {
2079
- this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
2080
- window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
2081
- });
2082
- }
2083
- onSolutionUpdated(lineItem) {
2084
- const states = {
2085
- configurableRamp: lineItem,
2086
- currentState: this.currentStateService.currentState,
2087
- asset: this.getAsset(lineItem),
2088
- };
2089
- this.runtimeService.updateRuntime(states);
2090
- }
2091
- onSolutionStop(lineItem) {
2092
- this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
2093
- const quoteToUpsert = Object.assign(Object.assign({}, quote), { context: this.contextService.resolve(), currentState: [...(this.currentStateService.currentState || []).filter(li => li.id !== lineItem.id), lineItem] });
2094
- this.quoteApiService
2095
- .upsertQuote(quoteToUpsert)
2096
- .pipe(take(1))
2097
- .subscribe(quote => {
2098
- window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
2099
- });
2100
- });
2101
- }
2102
- init(quote, queryParams) {
2103
- const productId = queryParams['productId'];
2104
- const lineItemId = this.getLineItemId(quote, queryParams);
2105
- this.assets = quote.initialState;
2106
- lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
2107
- }
2108
- getLineItemId(quote, queryParams) {
2109
- if (EntityUtil.isPresent(queryParams['lineItemId'])) {
2110
- return queryParams['lineItemId'];
2111
- }
2112
- return quote.currentState
2113
- .filter(lineItem => lineItem.productId === queryParams['productId'])
2114
- .map(lineItem => lineItem.id)
2115
- .find(id => id);
2116
- }
2117
- configure(productId) {
2118
- const runtimeContext = this.getRuntimeContext(productId, '', RuntimeOperation.INIT);
2119
- this.startRuntime({}, runtimeContext);
2120
- }
2121
- reConfigure(lineItemId, currentState) {
2122
- const currentStateItem = EntityUtil.findById(lineItemId, currentState);
2123
- const runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, RuntimeOperation.UPDATE);
2124
- const states = {
2125
- configurableRamp: currentStateItem,
2126
- currentState,
2127
- asset: this.getAsset(currentStateItem),
2128
- };
2129
- this.currentStateService.update(currentState);
2130
- this.startRuntime(states, runtimeContext);
2131
- }
2132
- getAsset(lineItem) {
2133
- return this.assets && this.assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
2134
- }
2135
- startRuntime(states, runtimeContext$) {
2136
- runtimeContext$
2137
- .pipe(take(1), map$1(runtimeContext => {
2138
- this.runtimeService.startRuntime(runtimeContext, states);
2139
- }))
2140
- .subscribe();
2141
- }
2142
- customizeContext(productId, context) {
2143
- var _a;
2144
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getLegacyUiDefinition)) {
2145
- return of(context);
2146
- }
2147
- return this.customizationService.getLegacyUiDefinition(productId).pipe(map$1(uiDefinitionContainer => (Object.assign(Object.assign({}, context), { uiDefinitionContainer: uiDefinitionContainer !== null && uiDefinitionContainer !== void 0 ? uiDefinitionContainer : undefined }))));
2148
- }
2149
- getRuntimeContext(productId, offeringId, runtimeOperation) {
2150
- return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(map$1(runtimeContext => {
2151
- runtimeContext.invocationContext = { runtimeOperation: RuntimeOperation[runtimeOperation] };
2152
- return runtimeContext;
2153
- }), switchMap$1(runtimeContext => this.customizeContext(productId, runtimeContext)));
2154
- }
2155
- }
2156
- LegacyProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LegacyProductComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1$1.QuoteDraftService }, { token: i2.QuoteApiService }, { token: i1$1.ContextService }, { token: i4$1.RuntimeContextService }, { token: i4$1.RuntimeService }, { token: i4$1.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2157
- LegacyProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: LegacyProductComponent, selector: "ng-component", ngImport: i0, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], dependencies: [{ kind: "component", type: i4$1.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
2158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LegacyProductComponent, decorators: [{
2159
- type: Component,
2160
- args: [{ template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"] }]
2161
- }], ctorParameters: function () {
2162
- return [{ type: i1$2.ActivatedRoute }, { type: i1$1.QuoteDraftService }, { type: i2.QuoteApiService }, { type: i1$1.ContextService }, { type: i4$1.RuntimeContextService }, { type: i4$1.RuntimeService }, { type: i4$1.CurrentStateService }, { type: undefined, decorators: [{
2163
- type: Optional
2164
- }, {
2165
- type: Inject,
2166
- args: [FLOW_CUSTOMIZATION]
2167
- }] }];
2168
- } });
2169
-
2170
- class LegacyProductModule {
2171
- }
2172
- LegacyProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LegacyProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2173
- LegacyProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [CommonModule, RuntimeModule], exports: [LegacyProductComponent] });
2174
- LegacyProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LegacyProductModule, imports: [CommonModule, RuntimeModule] });
2175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LegacyProductModule, decorators: [{
2176
- type: NgModule,
2177
- args: [{
2178
- declarations: [LegacyProductComponent],
2179
- imports: [CommonModule, RuntimeModule],
2180
- exports: [LegacyProductComponent],
2181
- }]
2182
- }] });
2183
-
2184
1459
  class ProductComponent {
2185
- constructor(contextService, configurationRuntimeService, configurationService, configurationState, quoteDraftService, integrationState, customizationService) {
1460
+ constructor(contextService, configurationRuntimeService, configurationService, configurationStateService, quoteDraftService, flowInfoService, flowStateService, integrationState, customizationService) {
2186
1461
  this.contextService = contextService;
2187
1462
  this.configurationRuntimeService = configurationRuntimeService;
2188
1463
  this.configurationService = configurationService;
2189
- this.configurationState = configurationState;
1464
+ this.configurationStateService = configurationStateService;
2190
1465
  this.quoteDraftService = quoteDraftService;
1466
+ this.flowInfoService = flowInfoService;
1467
+ this.flowStateService = flowStateService;
2191
1468
  this.integrationState = integrationState;
2192
1469
  this.customizationService = customizationService;
2193
1470
  this.uiDefinition$ = new BehaviorSubject(undefined);
@@ -2208,23 +1485,33 @@ class ProductComponent {
2208
1485
  }));
2209
1486
  }
2210
1487
  init$() {
2211
- return this.quoteDraftService.quoteDraft$.pipe(first(), switchMap(quote => {
1488
+ let quoteDraft$;
1489
+ if (this.flowInfoService.isLegacy || !this.flowInfoService.isStateful) {
1490
+ quoteDraft$ = this.quoteDraftService.quoteDraft$;
1491
+ }
1492
+ else {
1493
+ quoteDraft$ = of(undefined);
1494
+ }
1495
+ return quoteDraft$.pipe(first(), switchMap(quote => {
2212
1496
  const contextProperties = this.contextService.resolve().properties;
2213
1497
  const productId = contextProperties.productId;
2214
1498
  if (!productId) {
2215
1499
  throw new Error(`Unable to start configuration for 'productId == null'`);
2216
1500
  }
2217
- const lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
2218
- const currentStateItem = quote.currentState.find(({ id }) => id === lineItemId);
2219
- if (currentStateItem) {
2220
- this.configurationService.setConfigurableRamp(currentStateItem);
1501
+ if (!quote) {
1502
+ const offeringId = contextProperties.offeringId;
1503
+ return this.configurationRuntimeService.init({ productId, offeringId });
2221
1504
  }
2222
- const { offeringId } = currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {};
1505
+ const lineItem = this.getLineItem(quote, productId, contextProperties.lineItemId);
1506
+ if (lineItem) {
1507
+ this.configurationService.setConfigurableRamp(lineItem);
1508
+ }
1509
+ const { offeringId } = lineItem !== null && lineItem !== void 0 ? lineItem : {};
2223
1510
  return this.configurationRuntimeService.init({ productId, offeringId });
2224
1511
  }), switchMap(() => this.customizeUI$()), tap(() => {
2225
1512
  var _a, _b;
2226
1513
  const uiDefinition = (_b = (_a = this.configurationRuntimeService.runtimeContext) === null || _a === void 0 ? void 0 : _a.uiDefinitionContainer) === null || _b === void 0 ? void 0 : _b.source;
2227
- if (uiDefinition && !isLegacyUIDefinition(uiDefinition)) {
1514
+ if (uiDefinition) {
2228
1515
  this.uiDefinition$.next(uiDefinition);
2229
1516
  }
2230
1517
  else {
@@ -2235,25 +1522,29 @@ class ProductComponent {
2235
1522
  this.configurationRuntimeService.initializationProps.attributesMap =
2236
1523
  this.integrationState.state.guidedSelling;
2237
1524
  }
2238
- }), switchMap(() => this.configurationState.init$()));
1525
+ }), switchMap(() => this.configurationStateService.init$()));
2239
1526
  }
2240
- getLineItemId(quote, productId, lineItemId) {
2241
- var _a, _b;
1527
+ getLineItem(quote, productId, lineItemId) {
1528
+ var _a;
2242
1529
  // search by lineItemId first
2243
- let id = (_a = quote.currentState.find(li => li.id === lineItemId)) === null || _a === void 0 ? void 0 : _a.id;
2244
- if (!id && this.quoteDraftService.isStandalone) {
2245
- id = (_b = quote.currentState.find(li => li.productId === productId)) === null || _b === void 0 ? void 0 : _b.id;
1530
+ let li = quote.currentState.find(li => li.id === lineItemId);
1531
+ if (!li && this.quoteDraftService.isStandalone) {
1532
+ li = quote.currentState.find(li => li.productId === productId);
1533
+ }
1534
+ // If still not found, is could be an asset
1535
+ if (!li) {
1536
+ li = (_a = this.quoteDraftService.assetsState) === null || _a === void 0 ? void 0 : _a.currentState.find(li => li.id === lineItemId);
2246
1537
  }
2247
- return id;
1538
+ return li;
2248
1539
  }
2249
1540
  }
2250
- ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.ConfigurationRuntimeService }, { token: i1$1.ConfigurationService }, { token: i1$1.ConfigurationState }, { token: i1$1.QuoteDraftService }, { token: i5.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1541
+ ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i2.ContextService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: i2.QuoteDraftService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }, { token: i2.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2251
1542
  ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n", styles: [""], dependencies: [{ kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2252
1543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
2253
1544
  type: Component,
2254
1545
  args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n" }]
2255
1546
  }], ctorParameters: function () {
2256
- return [{ type: i1$1.ContextService }, { type: i1$1.ConfigurationRuntimeService }, { type: i1$1.ConfigurationService }, { type: i1$1.ConfigurationState }, { type: i1$1.QuoteDraftService }, { type: i5.IntegrationState }, { type: undefined, decorators: [{
1547
+ return [{ type: i2.ContextService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2.QuoteDraftService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }, { type: i2.IntegrationState }, { type: undefined, decorators: [{
2257
1548
  type: Optional
2258
1549
  }, {
2259
1550
  type: Inject,
@@ -2280,19 +1571,22 @@ class RecordNotFoundComponent {
2280
1571
  this.router = router;
2281
1572
  this.route = route;
2282
1573
  this.subMessage = '';
1574
+ this.type = '';
2283
1575
  const navigation = this.router.getCurrentNavigation();
2284
1576
  const { state } = (navigation === null || navigation === void 0 ? void 0 : navigation.extras) || {};
2285
1577
  this.message = state === null || state === void 0 ? void 0 : state['message'];
1578
+ this.type = (state === null || state === void 0 ? void 0 : state['type']) || '';
1579
+ this.details = state === null || state === void 0 ? void 0 : state['details'];
2286
1580
  if (typeof this.message === 'string') {
2287
1581
  this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';
2288
1582
  }
2289
1583
  }
2290
1584
  }
2291
1585
  RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
2292
- RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1586
+ RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2293
1587
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
2294
1588
  type: Component,
2295
- args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"] }]
1589
+ args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"] }]
2296
1590
  }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
2297
1591
 
2298
1592
  const routes = [{ path: '', component: RecordNotFoundComponent }];
@@ -2354,13 +1648,12 @@ class RemoteComponent {
2354
1648
  this.runtimeService
2355
1649
  .init({ productId })
2356
1650
  .pipe(first(), tap(context => {
2357
- var _a, _b;
2358
- const uiDefinitionProperties = getUIDefinitionProperties(context.uiDefinitionContainer);
2359
- const uiDefinition = (_a = context.uiDefinitionContainer) === null || _a === void 0 ? void 0 : _a.source;
2360
- this.uiDefinition = uiDefinition && !isLegacyUIDefinition(uiDefinition) ? uiDefinition : undefined;
1651
+ var _a, _b, _c, _d;
1652
+ const uiDefinitionProperties = (_b = (_a = context.uiDefinitionContainer) === null || _a === void 0 ? void 0 : _a.source.properties) !== null && _b !== void 0 ? _b : {};
1653
+ this.uiDefinition = (_c = context.uiDefinitionContainer) === null || _c === void 0 ? void 0 : _c.source;
2361
1654
  const pricingEnabled = uiDefinitionProperties.pricingEnabled ? 'true' : 'false';
2362
1655
  const priceListId = uiDefinitionProperties.priceList;
2363
- const runtimeContextProperties = (_b = this.runtimeService.runtimeContext) === null || _b === void 0 ? void 0 : _b.properties;
1656
+ const runtimeContextProperties = (_d = this.runtimeService.runtimeContext) === null || _d === void 0 ? void 0 : _d.properties;
2364
1657
  if (runtimeContextProperties) {
2365
1658
  runtimeContextProperties.PriceListId = priceListId;
2366
1659
  runtimeContextProperties.PricingEnabled = pricingEnabled;
@@ -2417,7 +1710,7 @@ class RemoteComponent {
2417
1710
  let items = [lineItem];
2418
1711
  for (let i = 0; i < items.length; i++) {
2419
1712
  const item = items[i];
2420
- const children = options.get(item.id);
1713
+ const children = item && options.get(item.id);
2421
1714
  if (children) {
2422
1715
  item.lineItems = children;
2423
1716
  items = items.concat(children);
@@ -2489,17 +1782,17 @@ class RemoteComponent {
2489
1782
  const optionConfigurations = this.getOptionConfigurations(this.rpcMessage.product);
2490
1783
  const rootProductOptions = this.rpcMessage.options.filter(po => po.configuredProductId === lineItem.productId);
2491
1784
  childItems.forEach(lineItem => {
2492
- var _a, _b, _c;
1785
+ var _a, _b, _c, _d;
2493
1786
  const rootOption = rootProductOptions.find(po => po.optionalProductId === lineItem.productId);
2494
1787
  if (rootOption) {
2495
1788
  const featureOptions = (_a = optionConfigurations[rootOption.featureName]) !== null && _a !== void 0 ? _a : (optionConfigurations[rootOption.featureName] = []);
2496
1789
  const originOption = !rootOption.hasChildren
2497
- ? optionConfigurations[rootOption.featureName].find(({ optionId }) => optionId === rootOption.optionId)
1790
+ ? (_b = optionConfigurations[rootOption.featureName]) === null || _b === void 0 ? void 0 : _b.find(({ optionId }) => optionId === rootOption.optionId)
2498
1791
  : undefined;
2499
1792
  const option = originOption !== null && originOption !== void 0 ? originOption : {};
2500
- option.optionId = (_b = option.optionId) !== null && _b !== void 0 ? _b : rootOption.optionId;
1793
+ option.optionId = (_c = option.optionId) !== null && _c !== void 0 ? _c : rootOption.optionId;
2501
1794
  this.updateContentData(option, lineItem);
2502
- option.index = (_c = option.index) !== null && _c !== void 0 ? _c : featureOptions.length;
1795
+ option.index = (_d = option.index) !== null && _d !== void 0 ? _d : featureOptions.length;
2503
1796
  option.selected = true;
2504
1797
  if (!originOption) {
2505
1798
  featureOptions.push(option);
@@ -2546,8 +1839,9 @@ class RemoteComponent {
2546
1839
  }
2547
1840
  }
2548
1841
  for (const option of notBundleOptions) {
2549
- if (bundleOptionsByOptionId[option.configuredProductId]) {
2550
- bundleOptionsByOptionId[option.configuredProductId].hasChildren = true;
1842
+ const bundleOption = bundleOptionsByOptionId[option.configuredProductId];
1843
+ if (bundleOption) {
1844
+ bundleOption.hasChildren = true;
2551
1845
  }
2552
1846
  }
2553
1847
  }
@@ -2556,7 +1850,7 @@ class RemoteComponent {
2556
1850
  let items = (_a = lineItem.lineItems) !== null && _a !== void 0 ? _a : [];
2557
1851
  for (let i = 0; i < items.length; i++) {
2558
1852
  const item = items[i];
2559
- if (item.lineItems) {
1853
+ if (item === null || item === void 0 ? void 0 : item.lineItems) {
2560
1854
  items = items.concat(item.lineItems.map(li => (Object.assign(Object.assign({}, li), { parentLineItem: item }))));
2561
1855
  }
2562
1856
  }
@@ -2618,9 +1912,10 @@ class RemoteComponent {
2618
1912
  component.attributes
2619
1913
  .filter(a => a.properties && a.properties[propertyName])
2620
1914
  .forEach(mapping => {
1915
+ var _a;
2621
1916
  const attribute = lineItem.attributes.find(a => a.name === mapping.name);
2622
1917
  if (attribute) {
2623
- new Set(mapping.properties[propertyName].split(',')).forEach(k => (result[k] = attribute.value));
1918
+ new Set((_a = mapping.properties[propertyName]) === null || _a === void 0 ? void 0 : _a.split(',')).forEach(k => (result[k] = attribute.value));
2624
1919
  }
2625
1920
  });
2626
1921
  return result;
@@ -2638,12 +1933,12 @@ class RemoteComponent {
2638
1933
  return optionConfigurations;
2639
1934
  }
2640
1935
  }
2641
- RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i1$1.ConfigurationRuntimeService }, { token: i1$1.ConfigurationService }, { token: i1$1.ConfigurationState }, { token: i8.MessageService }, { token: i5.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
2642
- RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RemoteComponent, selector: "vl-flow-remote", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1936
+ RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, deps: [{ token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: i2$2.MessageService }, { token: i2.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
1937
+ RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RemoteComponent, selector: "vl-flow-remote", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2643
1938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, decorators: [{
2644
1939
  type: Component,
2645
1940
  args: [{ selector: 'vl-flow-remote', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
2646
- }], ctorParameters: function () { return [{ type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationRuntimeService }, { type: i1$1.ConfigurationService }, { type: i1$1.ConfigurationState }, { type: i8.MessageService }, { type: i5.IntegrationState }, { type: i4.Location }]; } });
1941
+ }], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2$2.MessageService }, { type: i2.IntegrationState }, { type: i4.Location }]; } });
2647
1942
 
2648
1943
  class RemoteModule {
2649
1944
  }
@@ -2660,18 +1955,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2660
1955
  }] });
2661
1956
 
2662
1957
  class ShoppingCartComponent {
2663
- constructor(templatesApi, contextService, cdr, toastService, customizationService) {
2664
- var _a;
1958
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1959
+ var _a, _b, _c;
2665
1960
  this.templatesApi = templatesApi;
2666
- this.contextService = contextService;
2667
1961
  this.cdr = cdr;
2668
1962
  this.toastService = toastService;
1963
+ this.flowInfo = flowInfo;
2669
1964
  this.customizationService = customizationService;
2670
1965
  this.uiDefinition = undefined;
2671
1966
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
2672
1967
  this.templateApiName = '';
2673
1968
  this.destroyed$ = new Subject();
2674
- this.templateApiName = (_a = this.contextService.resolve().properties.cartTemplateApiName) !== null && _a !== void 0 ? _a : '';
1969
+ this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.shoppingCart) !== null && _c !== void 0 ? _c : '';
2675
1970
  }
2676
1971
  ngOnInit() {
2677
1972
  this.generateUIDefinition$()
@@ -2683,7 +1978,7 @@ class ShoppingCartComponent {
2683
1978
  this.state$.next({ loading: false, failure: false });
2684
1979
  }), catchError(err => {
2685
1980
  var _a;
2686
- const message = 'Failed to resolve Shopping cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
1981
+ const message = 'Failed to resolve Shopping Cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
2687
1982
  this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
2688
1983
  this.uiDefinition = undefined;
2689
1984
  this.state$.next({ loading: false, failure: true });
@@ -2695,38 +1990,37 @@ class ShoppingCartComponent {
2695
1990
  this.destroyed$.next();
2696
1991
  this.destroyed$.complete();
2697
1992
  }
2698
- getTemplateRootComponent$(template) {
2699
- return this.templatesApi
2700
- .fetchComponents$(template.id)
2701
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
2702
- }
2703
- getLocalShoppingCartComponentMeta$() {
1993
+ getLocalMeta$() {
2704
1994
  var _a, _b;
2705
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getShoppingCartComponent)) {
1995
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
2706
1996
  return of(undefined);
2707
1997
  }
2708
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getShoppingCartComponent(this.templateApiName).pipe(map(component => {
2709
- if (!component) {
1998
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
1999
+ if (!components) {
2710
2000
  return;
2711
2001
  }
2712
- return {
2002
+ return components.map(component => ({
2713
2003
  html: component.html,
2714
2004
  css: component.css,
2715
2005
  js: component.js,
2716
2006
  json: component.json,
2717
- };
2007
+ }));
2718
2008
  }));
2719
2009
  }
2720
- getShoppingCartComponentMeta$() {
2721
- return this.templatesApi.fetchTemplates$().pipe(map(templates => templates.find(template => template.name === this.templateApiName)), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
2010
+ getOrgMeta$() {
2011
+ const template = this.flowInfo.templates.SHOPPING_CART;
2012
+ if (!template) {
2013
+ return of(undefined);
2014
+ }
2015
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
2722
2016
  }
2723
2017
  generateUIDefinition$() {
2724
2018
  return of(undefined).pipe(tap(() => {
2725
2019
  if (!this.templateApiName) {
2726
- throw new Error("Flow Query parameter 'cartTemplateApiName' is missing.");
2020
+ throw new Error("Flow 'shoppingCart' template is not defined.");
2727
2021
  }
2728
- }), switchMap(() => this.getLocalShoppingCartComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getShoppingCartComponentMeta$())), map(meta => {
2729
- if (!meta) {
2022
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
2023
+ if (!metaList) {
2730
2024
  return;
2731
2025
  }
2732
2026
  const uiDef = {
@@ -2735,26 +2029,24 @@ class ShoppingCartComponent {
2735
2029
  primary: true,
2736
2030
  type: 'DEFAULT',
2737
2031
  version: 2,
2738
- children: [
2739
- {
2740
- children: [],
2741
- template: meta.html && btoa(meta.html),
2742
- script: meta.js && btoa(meta.js),
2743
- styles: meta.css && btoa(meta.css),
2744
- },
2745
- ],
2032
+ children: metaList.map(meta => ({
2033
+ children: [],
2034
+ template: meta.html && btoaSafe(meta.html),
2035
+ script: meta.js && btoaSafe(meta.js),
2036
+ styles: meta.css && btoaSafe(meta.css),
2037
+ })),
2746
2038
  };
2747
2039
  return uiDef;
2748
2040
  }));
2749
2041
  }
2750
2042
  }
2751
- ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i2.UITemplatesApiService }, { token: i1$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2752
- ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i3$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2043
+ ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2044
+ ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2753
2045
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
2754
2046
  type: Component,
2755
2047
  args: [{ selector: 'vl-flow-shopping-cart', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
2756
2048
  }], ctorParameters: function () {
2757
- return [{ type: i2.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
2049
+ return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
2758
2050
  type: Optional
2759
2051
  }, {
2760
2052
  type: Inject,
@@ -2777,135 +2069,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2777
2069
  }] });
2778
2070
 
2779
2071
  class FlowResolver {
2780
- constructor(router, flowsApiService, routerService, contextService) {
2072
+ constructor(router, routerService, contextService, flowInfo) {
2781
2073
  this.router = router;
2782
- this.flowsApiService = flowsApiService;
2783
2074
  this.routerService = routerService;
2784
2075
  this.contextService = contextService;
2785
- }
2786
- handleError(route, message, queryParams) {
2787
- const parentUrl = this.routerService.getFlowRootPath(route);
2788
- return this.router.navigate([parentUrl, '404'], {
2789
- queryParams,
2790
- state: {
2791
- message: message,
2792
- },
2793
- });
2076
+ this.flowInfo = flowInfo;
2794
2077
  }
2795
2078
  resolve(route) {
2796
2079
  const { queryParams } = route;
2797
- const { flowId } = queryParams;
2798
- if (!flowId) {
2799
- return this.handleError(route);
2800
- }
2801
- return this.flowsApiService.getFlow(flowId).pipe(map$1(flow => {
2802
- if (!flow) {
2803
- return this.handleError(route, `Flow with flowId=${flowId} is not defined`);
2804
- }
2805
- const { properties } = flow;
2806
- const { queryParams: flowQueryParams, entryPath } = properties;
2807
- const mergedParams = Object.assign(Object.assign(Object.assign({}, queryParams), flowQueryParams), getDefaultProperties({ flowParams: properties }));
2808
- const contextProperties = Object.entries(mergedParams).reduce((trunk, [key, value]) => (Object.assign(Object.assign({}, trunk), { [key]: String(value) })), {});
2809
- this.contextService.update({ properties: contextProperties });
2810
- const parentUrl = this.routerService.getFlowRootPath(route);
2811
- const entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
2812
- .split('/')
2813
- .filter(Boolean);
2814
- return this.router
2815
- .navigate([parentUrl, ...entryUrl], {
2816
- queryParams: mergedParams,
2817
- replaceUrl: true,
2818
- })
2819
- .catch(e => {
2820
- const message = e instanceof HttpErrorResponse ? e.error.message : e;
2821
- return this.handleError(route, message, mergedParams);
2822
- });
2080
+ const flow = this.flowInfo.flow;
2081
+ if (!flow) {
2082
+ return of(false);
2083
+ }
2084
+ const { properties } = flow;
2085
+ const { queryParams: flowQueryParams, entryPath } = properties;
2086
+ const mergedQueryParams = Object.assign(Object.assign({}, queryParams), flowQueryParams);
2087
+ const contextProperties = Object.entries(Object.assign(Object.assign({}, mergedQueryParams), getDefaultProperties({ flowParams: properties }))).reduce((trunk, [key, value]) => (Object.assign(Object.assign({}, trunk), { [key]: String(value) })), {});
2088
+ this.contextService.update({ properties: contextProperties });
2089
+ this.flowInfo.flow = flow;
2090
+ const parentUrl = this.routerService.getFlowRootPath(route);
2091
+ const entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
2092
+ .split('/')
2093
+ .filter(Boolean);
2094
+ return from(this.router.navigate([parentUrl, ...entryUrl], {
2095
+ queryParams: mergedQueryParams,
2096
+ replaceUrl: true,
2097
+ })).pipe(catchError$1(e => {
2098
+ const message = e instanceof HttpErrorResponse ? e.error.message : e;
2099
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
2100
+ return this.routerService.showErrorPage$(message, errorDetails);
2823
2101
  }));
2824
2102
  }
2825
2103
  }
2826
- FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: i2.FlowsApiService }, { token: FlowRouterService }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
2104
+ FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
2827
2105
  FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
2828
2106
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
2829
2107
  type: Injectable
2830
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.FlowsApiService }, { type: FlowRouterService }, { type: i1$1.ContextService }]; } });
2108
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }]; } });
2831
2109
 
2832
2110
  class QuoteResolver {
2833
- constructor(router, quoteDraftService, routerService, contextService, flowConfiguration, integrationState) {
2111
+ constructor(router, quoteDraftService, routerService, contextService, flowInfo, flowStateService) {
2834
2112
  this.router = router;
2835
2113
  this.quoteDraftService = quoteDraftService;
2836
2114
  this.routerService = routerService;
2837
2115
  this.contextService = contextService;
2838
- this.flowConfiguration = flowConfiguration;
2839
- this.integrationState = integrationState;
2840
- }
2841
- handleError(route, message) {
2842
- const parentUrl = this.routerService.getFlowRootPath(route);
2843
- return from(this.router.navigate([parentUrl, '404'], { state: { message } }));
2844
- }
2845
- calculate$() {
2846
- const quoteDraft = this.quoteDraftService.quoteDraft;
2847
- if (!this.quoteDraftService.isStandalone && quoteDraft && !this.accountHasNotAssets()) {
2848
- return this.flowConfiguration.calculate$(quoteDraft);
2849
- }
2850
- return of(undefined);
2116
+ this.flowInfo = flowInfo;
2117
+ this.flowStateService = flowStateService;
2851
2118
  }
2852
2119
  resolve(route) {
2853
- const { headerId } = this.contextService.resolve();
2854
- const quote = this.quoteDraftService.quoteDraft;
2855
- if (quote && quote.quoteId === headerId) {
2120
+ const flow = this.flowInfo.flow;
2121
+ if (!flow) {
2122
+ return of(false);
2123
+ }
2124
+ if (this.flowStateService.isInitialized()) {
2856
2125
  return of(true);
2857
2126
  }
2858
- const queryParams = route.queryParams;
2859
- return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.calculate$()), tap(() => {
2860
- if (!this.quoteDraftService.isStandalone && queryParams.suppressInitialNavigation !== 'true') {
2861
- if (this.shouldNavigateToAssets()) {
2862
- this.changeNavigation('/assets', route);
2863
- }
2864
- else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.hasProducts) {
2865
- this.changeNavigation('/cart', route);
2866
- }
2867
- }
2868
- this.initializeModifiedAssetsMap();
2869
- this.quoteDraftService.isInitialized = true;
2870
- this.quoteDraftService.hasUnsavedChanges = false;
2871
- }), catchError(e => {
2127
+ return this.flowStateService.init$().pipe(switchMap(() => this.checkDynamicNavigation$(route)), catchError(e => {
2872
2128
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
2873
- return this.handleError(route, message);
2129
+ const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
2130
+ return this.routerService.showErrorPage$(message, errorDetails);
2874
2131
  }));
2875
2132
  }
2876
- changeNavigation(path, route) {
2877
- const parentUrl = this.routerService.getFlowRootPath(route);
2878
- this.router
2879
- .navigate([parentUrl + path], {
2880
- queryParams: route.queryParams,
2881
- replaceUrl: true,
2882
- })
2883
- .catch(e => {
2884
- const message = e instanceof HttpErrorResponse ? e.error.message : e;
2885
- return this.handleError(route, message);
2886
- });
2887
- }
2888
- shouldNavigateToAssets() {
2889
- var _a, _b;
2890
- if (this.contextService.mode === ConfigurationContextMode.ACCOUNT) {
2891
- return true;
2133
+ checkDynamicNavigation$(route) {
2134
+ const flow = this.flowInfo.flow;
2135
+ if (!flow) {
2136
+ return of(true);
2892
2137
  }
2893
- return (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState.some(li => !!li.assetId)) !== null && _b !== void 0 ? _b : false;
2894
- }
2895
- accountHasNotAssets() {
2896
- return this.contextService.mode === ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasProducts;
2138
+ if (flow.properties.suppressInitialNavigation || flow.properties.standalone) {
2139
+ return of(true);
2140
+ }
2141
+ return this.getNavigateTo().pipe(switchMap(navigateTo => {
2142
+ if (!navigateTo) {
2143
+ return of(true);
2144
+ }
2145
+ const parentUrl = this.routerService.getFlowRootPath(route);
2146
+ return from(this.router.navigate([parentUrl + navigateTo], {
2147
+ queryParams: route.queryParams,
2148
+ replaceUrl: true,
2149
+ }));
2150
+ }));
2897
2151
  }
2898
- initializeModifiedAssetsMap() {
2899
- this.integrationState.patchState({
2900
- modifiedAssets: generateModifiedAssetsMap(this.quoteDraftService.currentState),
2901
- });
2152
+ getNavigateTo() {
2153
+ const flow = this.flowInfo.flow;
2154
+ let navigateTo;
2155
+ if (flow === null || flow === void 0 ? void 0 : flow.properties.stateful) {
2156
+ return this.flowStateService.select$(UITemplateType.FLOW_ENGINE, 'NAVIGATE_TO').pipe(map(r => {
2157
+ if (r.success) {
2158
+ return r.result;
2159
+ }
2160
+ return '';
2161
+ }));
2162
+ }
2163
+ else {
2164
+ const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
2165
+ if (isAccountMode || this.quoteDraftService.hasAssets) {
2166
+ navigateTo = '/assets';
2167
+ }
2168
+ else if (this.quoteDraftService.hasProducts) {
2169
+ navigateTo = '/cart';
2170
+ }
2171
+ }
2172
+ return of(navigateTo);
2902
2173
  }
2903
2174
  }
2904
- QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i1$1.QuoteDraftService }, { token: FlowRouterService }, { token: i1$1.ContextService }, { token: i1$1.FlowConfigurationService }, { token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
2175
+ QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i2.QuoteDraftService }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
2905
2176
  QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver });
2906
2177
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, decorators: [{
2907
2178
  type: Injectable
2908
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$1.QuoteDraftService }, { type: FlowRouterService }, { type: i1$1.ContextService }, { type: i1$1.FlowConfigurationService }, { type: i5.IntegrationState }]; } });
2179
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.QuoteDraftService }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
2909
2180
 
2910
2181
  const rootRoute = {
2911
2182
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -2915,87 +2186,81 @@ const rootRoute = {
2915
2186
  canDeactivate: [RootGuard],
2916
2187
  children: [
2917
2188
  {
2918
- path: 'flows',
2919
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2920
- resolve: { quote: FlowResolver },
2921
- canActivate: [ContextGuard],
2922
- children: [],
2923
- },
2924
- {
2925
- path: 'legacy',
2189
+ path: '',
2190
+ canActivate: [keepFlowInitialized],
2191
+ runGuardsAndResolvers: 'always',
2926
2192
  children: [
2193
+ {
2194
+ path: 'flows',
2195
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2196
+ resolve: { flow: FlowResolver },
2197
+ canActivate: [ContextGuard],
2198
+ children: [],
2199
+ },
2927
2200
  {
2928
2201
  path: 'product',
2929
- component: LegacyProductComponent,
2202
+ component: ProductComponent,
2203
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2204
+ resolve: { quote: QuoteResolver },
2205
+ canActivate: [ContextGuard],
2206
+ canDeactivate: [ProductUnloadGuard],
2207
+ data: { showHeader: true },
2208
+ },
2209
+ {
2210
+ path: 'cart',
2211
+ component: ShoppingCartComponent,
2212
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2213
+ resolve: { quote: QuoteResolver },
2214
+ canActivate: [ContextGuard],
2215
+ data: { showHeader: true },
2216
+ },
2217
+ {
2218
+ path: 'catalog',
2219
+ component: CatalogComponent,
2220
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2221
+ resolve: { quote: QuoteResolver },
2222
+ canActivate: [ContextGuard],
2223
+ data: { showHeader: true },
2224
+ },
2225
+ {
2226
+ path: 'assets',
2227
+ component: AssetsComponent,
2228
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2229
+ resolve: { quote: QuoteResolver },
2230
+ canActivate: [ContextGuard],
2231
+ data: { showHeader: true },
2232
+ },
2233
+ {
2234
+ path: 'empty',
2235
+ component: EmptyAccountComponent,
2236
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2237
+ resolve: { quote: QuoteResolver },
2238
+ canActivate: [ContextGuard],
2239
+ data: { showHeader: true },
2240
+ },
2241
+ {
2242
+ path: 'remote',
2243
+ component: RemoteComponent,
2930
2244
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2931
2245
  resolve: { quote: QuoteResolver },
2932
2246
  canActivate: [ContextGuard],
2933
2247
  },
2248
+ {
2249
+ path: 'debug',
2250
+ loadChildren: () => DebugModule,
2251
+ },
2252
+ {
2253
+ path: '404',
2254
+ loadChildren: () => RecordNotFoundModule,
2255
+ },
2934
2256
  ],
2935
2257
  },
2936
- {
2937
- path: 'product',
2938
- component: ProductComponent,
2939
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2940
- resolve: { quote: QuoteResolver },
2941
- canActivate: [ContextGuard],
2942
- canDeactivate: [ProductUnloadGuard],
2943
- data: { showHeader: true },
2944
- },
2945
- {
2946
- path: 'cart',
2947
- component: ShoppingCartComponent,
2948
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2949
- resolve: { quote: QuoteResolver },
2950
- canActivate: [ContextGuard],
2951
- data: { showHeader: true },
2952
- },
2953
- {
2954
- path: 'catalog',
2955
- component: CatalogComponent,
2956
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2957
- resolve: { quote: QuoteResolver },
2958
- canActivate: [ContextGuard],
2959
- data: { showHeader: true },
2960
- },
2961
- {
2962
- path: 'assets',
2963
- component: AssetsComponent,
2964
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2965
- resolve: { quote: QuoteResolver },
2966
- canActivate: [ContextGuard],
2967
- data: { showHeader: true },
2968
- },
2969
- {
2970
- path: 'empty',
2971
- component: EmptyAccountComponent,
2972
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2973
- resolve: { quote: QuoteResolver },
2974
- canActivate: [ContextGuard],
2975
- data: { showHeader: true },
2976
- },
2977
- {
2978
- path: 'remote',
2979
- component: RemoteComponent,
2980
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2981
- resolve: { quote: QuoteResolver },
2982
- canActivate: [ContextGuard],
2983
- },
2984
- {
2985
- path: 'debug',
2986
- loadChildren: () => DebugModule,
2987
- },
2988
- {
2989
- path: '404',
2990
- loadChildren: () => RecordNotFoundModule,
2991
- },
2992
2258
  ],
2993
2259
  };
2994
2260
  class FlowRoutingModule {
2995
2261
  }
2996
2262
  FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2997
2263
  FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
2998
- LegacyProductModule,
2999
2264
  ShoppingCartModule,
3000
2265
  CatalogModule,
3001
2266
  AssetsModule,
@@ -3003,7 +2268,6 @@ FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versi
3003
2268
  EmptyAccountModule], exports: [RouterModule] });
3004
2269
  FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [RouterModule.forChild([rootRoute]),
3005
2270
  ProductModule,
3006
- LegacyProductModule,
3007
2271
  ShoppingCartModule,
3008
2272
  CatalogModule,
3009
2273
  AssetsModule,
@@ -3015,7 +2279,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3015
2279
  imports: [
3016
2280
  RouterModule.forChild([rootRoute]),
3017
2281
  ProductModule,
3018
- LegacyProductModule,
3019
2282
  ShoppingCartModule,
3020
2283
  CatalogModule,
3021
2284
  AssetsModule,
@@ -3027,11 +2290,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3027
2290
  }]
3028
2291
  }] });
3029
2292
 
3030
- class FlowGuidedSellingService {
2293
+ class FlowDocGenService {
3031
2294
  constructor(integrationState) {
3032
2295
  this.integrationState = integrationState;
3033
2296
  this.cleanup$ = new Subject();
3034
- this.isVisibleSubj$ = new BehaviorSubject(true);
2297
+ this.isVisibleSubj$ = new BehaviorSubject(false);
3035
2298
  this.isVisible$ = this.isVisibleSubj$.asObservable();
3036
2299
  this.initSubscriptions();
3037
2300
  }
@@ -3040,21 +2303,54 @@ class FlowGuidedSellingService {
3040
2303
  }
3041
2304
  initSubscriptions() {
3042
2305
  this.integrationState
3043
- .listen$(FlowAction.OPEN_GUIDED_SELLING)
2306
+ .listen$(FlowAction.FLOW_OPEN_DOC_GEN)
3044
2307
  .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
3045
2308
  .subscribe();
3046
2309
  this.integrationState
3047
- .listen$(FlowAction.CLOSE_GUIDED_SELLING)
2310
+ .listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
3048
2311
  .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
3049
2312
  .subscribe();
3050
2313
  }
3051
2314
  }
3052
- FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
3053
- FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
3054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
2315
+ FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
2316
+ FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
2317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
3055
2318
  type: Injectable
3056
- }], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
2319
+ }], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
2320
+
2321
+ const configurePrimengShadowDOM = () => {
2322
+ DomHandler.getScrollableParents = (element) => {
2323
+ const scrollableParents = [];
2324
+ if (element) {
2325
+ const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
2326
+ const overflowRegex = /(auto|scroll)/;
2327
+ const overflowCheck = (node) => {
2328
+ const styleDeclaration = window['getComputedStyle'](node, null);
2329
+ return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
2330
+ overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
2331
+ overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
2332
+ };
2333
+ for (const parent of parents) {
2334
+ const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
2335
+ if (scrollSelectors) {
2336
+ const selectors = scrollSelectors.split(',');
2337
+ for (const selector of selectors) {
2338
+ const el = DomHandler.findSingle(parent, selector);
2339
+ if (el && overflowCheck(el)) {
2340
+ scrollableParents.push(el);
2341
+ }
2342
+ }
2343
+ }
2344
+ if (parent.nodeType !== 9 && overflowCheck(parent)) {
2345
+ scrollableParents.push(parent);
2346
+ }
2347
+ }
2348
+ }
2349
+ return scrollableParents;
2350
+ };
2351
+ };
3057
2352
 
2353
+ configurePrimengShadowDOM();
3058
2354
  class FlowModule {
3059
2355
  }
3060
2356
  FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -3064,7 +2360,7 @@ FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15
3064
2360
  ApiModule,
3065
2361
  LauncherModule,
3066
2362
  LoaderModule,
3067
- FlowHeaderModule,
2363
+ FlowNewHeaderModule,
3068
2364
  FlowDialogModule,
3069
2365
  SdkCoreModule,
3070
2366
  DocGenModule,
@@ -3075,7 +2371,7 @@ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15
3075
2371
  ApiModule,
3076
2372
  LauncherModule,
3077
2373
  LoaderModule,
3078
- FlowHeaderModule,
2374
+ FlowNewHeaderModule,
3079
2375
  FlowDialogModule,
3080
2376
  SdkCoreModule,
3081
2377
  DocGenModule,
@@ -3091,7 +2387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3091
2387
  ApiModule,
3092
2388
  LauncherModule,
3093
2389
  LoaderModule,
3094
- FlowHeaderModule,
2390
+ FlowNewHeaderModule,
3095
2391
  FlowDialogModule,
3096
2392
  SdkCoreModule,
3097
2393
  DocGenModule,
@@ -3105,5 +2401,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3105
2401
  * Generated bundle index. Do not edit.
3106
2402
  */
3107
2403
 
3108
- export { ContextGuard, FLOW_CUSTOMIZATION, FlowModule, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
2404
+ export { ContextGuard, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
3109
2405
  //# sourceMappingURL=veloceapps-sdk.mjs.map