@veloceapps/sdk 8.0.0-12 → 8.0.0-120

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. package/README.md +0 -1
  2. package/cms/README.md +0 -20
  3. package/cms/cms.actions.d.ts +7 -1
  4. package/cms/components/preview/preview.component.d.ts +1 -2
  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/types/index.d.ts +0 -1
  10. package/cms/utils/element-metadata-worker.d.ts +11 -0
  11. package/cms/utils/element.utils.d.ts +1 -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 +26 -13
  16. package/core/README.md +20 -0
  17. package/core/modules/configuration/helpers.d.ts +4 -3
  18. package/core/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
  19. package/core/modules/configuration/services/configuration.service.d.ts +6 -1
  20. package/core/modules/configuration/types/configuration.types.d.ts +4 -0
  21. package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +5 -0
  22. package/core/pipes/action-code.pipe.d.ts +8 -0
  23. package/core/pipes/date.pipe.d.ts +2 -1
  24. package/core/pipes/index.d.ts +1 -0
  25. package/core/pipes/pipes.module.d.ts +2 -1
  26. package/core/services/context.service.d.ts +3 -0
  27. package/core/services/flow-info.service.d.ts +27 -0
  28. package/core/services/flow-state-configuration.service.d.ts +20 -0
  29. package/core/services/flow-state.service.d.ts +70 -0
  30. package/core/services/index.d.ts +4 -0
  31. package/core/services/quote-draft.service.d.ts +8 -1
  32. package/core/services/runtime-settings.service.d.ts +4 -1
  33. package/core/types/flow-customization.types.d.ts +22 -0
  34. package/core/types/flow-state.types.d.ts +6 -0
  35. package/core/types/formatting-settings.types.d.ts +2 -0
  36. package/core/types/index.d.ts +3 -0
  37. package/{cms → core}/types/integration.types.d.ts +1 -0
  38. package/core/types/pipe.types.d.ts +1 -0
  39. package/esm2020/cms/cms.actions.mjs +15 -1
  40. package/esm2020/cms/components/element-children/element-children.component.mjs +3 -3
  41. package/esm2020/cms/components/element-children/element-children.module.mjs +4 -4
  42. package/esm2020/cms/components/element-drop-handle/element-drop-handle.component.mjs +3 -3
  43. package/esm2020/cms/components/element-drop-handle/element-drop-handle.module.mjs +4 -4
  44. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
  45. package/esm2020/cms/components/element-renderer/element-renderer.module.mjs +4 -4
  46. package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +5 -5
  47. package/esm2020/cms/components/plugin.component.mjs +3 -3
  48. package/esm2020/cms/components/preview/preview.component.mjs +11 -11
  49. package/esm2020/cms/components/preview/preview.module.mjs +6 -6
  50. package/esm2020/cms/components/preview/preview.types.mjs +1 -1
  51. package/esm2020/cms/directives/custom-template.directive.mjs +7 -7
  52. package/esm2020/cms/index.mjs +2 -1
  53. package/esm2020/cms/launcher.module.mjs +7 -7
  54. package/esm2020/cms/modules/federated/federated-host.directive.mjs +3 -3
  55. package/esm2020/cms/modules/federated/federated.component.mjs +3 -3
  56. package/esm2020/cms/modules/federated/federated.module.mjs +4 -4
  57. package/esm2020/cms/modules/migrations/migrations.module.mjs +4 -4
  58. package/esm2020/cms/modules/migrations/services/migrations.service.mjs +3 -3
  59. package/esm2020/cms/modules/runtime/runtime.module.mjs +4 -4
  60. package/esm2020/cms/modules/runtime/services/compilation.service.mjs +12 -8
  61. package/esm2020/cms/modules/runtime/services/runtime-editor.service.mjs +3 -3
  62. package/esm2020/cms/modules/runtime/services/runtime.service.mjs +7 -7
  63. package/esm2020/cms/plugins/configuration.plugin.mjs +3 -3
  64. package/esm2020/cms/plugins/element-hover.plugin.mjs +3 -3
  65. package/esm2020/cms/plugins/io.plugin.mjs +8 -7
  66. package/esm2020/cms/plugins/page.plugin.mjs +3 -3
  67. package/esm2020/cms/plugins/region.plugin.mjs +3 -3
  68. package/esm2020/cms/plugins/script.plugin.mjs +3 -3
  69. package/esm2020/cms/services/element-context.service.mjs +3 -3
  70. package/esm2020/cms/services/index.mjs +1 -2
  71. package/esm2020/cms/services/io-provider.service.mjs +3 -3
  72. package/esm2020/cms/services/resources.service.mjs +3 -3
  73. package/esm2020/cms/services/templates.service.mjs +3 -3
  74. package/esm2020/cms/types/index.mjs +1 -2
  75. package/esm2020/cms/utils/element-metadata-worker.mjs +31 -0
  76. package/esm2020/cms/utils/element.utils.mjs +10 -3
  77. package/esm2020/cms/utils/elements-resolver.mjs +14 -28
  78. package/esm2020/cms/utils/index.mjs +4 -1
  79. package/esm2020/cms/utils/transpilation-worker.mjs +52 -0
  80. package/esm2020/cms/vendor-map.mjs +18 -5
  81. package/esm2020/core/core.module.mjs +12 -17
  82. package/esm2020/core/directives/directives.module.mjs +4 -4
  83. package/esm2020/core/directives/primeng-calendar.directive.mjs +3 -3
  84. package/esm2020/core/modules/configuration/configuration.module.mjs +4 -4
  85. package/esm2020/core/modules/configuration/helpers.mjs +28 -3
  86. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +11 -14
  87. package/esm2020/core/modules/configuration/services/configuration.service.mjs +29 -10
  88. package/esm2020/core/modules/configuration/services/configuration.state.mjs +5 -5
  89. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +9 -9
  90. package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
  91. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +4 -4
  92. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +15 -11
  93. package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +3 -3
  94. package/esm2020/core/pipes/action-code.pipe.mjs +20 -0
  95. package/esm2020/core/pipes/date.pipe.mjs +13 -7
  96. package/esm2020/core/pipes/index.mjs +2 -1
  97. package/esm2020/core/pipes/number.pipe.mjs +3 -3
  98. package/esm2020/core/pipes/pipes.module.mjs +8 -7
  99. package/esm2020/core/pipes/price.pipe.mjs +3 -3
  100. package/esm2020/core/services/context.service.mjs +32 -5
  101. package/esm2020/core/services/flow-info.service.mjs +94 -0
  102. package/esm2020/core/services/flow-state-configuration.service.mjs +52 -0
  103. package/esm2020/core/services/flow-state.service.mjs +435 -0
  104. package/esm2020/core/services/index.mjs +5 -1
  105. package/esm2020/core/services/integration.state.mjs +37 -0
  106. package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +3 -3
  107. package/esm2020/core/services/product-images.service.mjs +3 -3
  108. package/esm2020/core/services/quote-draft.service.mjs +31 -6
  109. package/esm2020/core/services/runtime-settings.service.mjs +20 -5
  110. package/esm2020/core/types/flow-customization.types.mjs +3 -0
  111. package/esm2020/core/types/flow-state.types.mjs +2 -0
  112. package/esm2020/core/types/formatting-settings.types.mjs +1 -1
  113. package/esm2020/core/types/index.mjs +4 -1
  114. package/esm2020/core/types/integration.types.mjs +2 -0
  115. package/esm2020/core/types/pipe.types.mjs +2 -0
  116. package/esm2020/src/components/dialog/dialog.component.mjs +3 -3
  117. package/esm2020/src/components/dialog/dialog.module.mjs +4 -4
  118. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +45 -54
  119. package/esm2020/src/components/doc-gen/doc-gen.module.mjs +4 -4
  120. package/esm2020/src/components/flow-header/flow-header.component.mjs +108 -0
  121. package/esm2020/src/components/flow-header/flow-header.module.mjs +19 -0
  122. package/esm2020/src/components/flow-header/index.mjs +2 -0
  123. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +42 -51
  124. package/esm2020/src/components/guided-selling/guided-selling.module.mjs +4 -4
  125. package/esm2020/src/configure-primeng.mjs +33 -0
  126. package/esm2020/src/flow-routing.module.mjs +66 -75
  127. package/esm2020/src/flow.component.mjs +21 -29
  128. package/esm2020/src/flow.module.mjs +11 -9
  129. package/esm2020/src/guards/context.guard.mjs +7 -12
  130. package/esm2020/src/guards/flow.guard.mjs +31 -0
  131. package/esm2020/src/guards/product-unload.guard.mjs +7 -4
  132. package/esm2020/src/guards/root.guard.mjs +17 -13
  133. package/esm2020/src/pages/assets/assets.component.mjs +34 -38
  134. package/esm2020/src/pages/assets/assets.module.mjs +4 -4
  135. package/esm2020/src/pages/catalog/catalog.component.mjs +34 -38
  136. package/esm2020/src/pages/catalog/catalog.module.mjs +4 -4
  137. package/esm2020/src/pages/debug/debug.component.mjs +12 -16
  138. package/esm2020/src/pages/debug/debug.module.mjs +4 -4
  139. package/esm2020/src/pages/empty-account/empty-account.component.mjs +3 -3
  140. package/esm2020/src/pages/empty-account/empty-account.module.mjs +4 -4
  141. package/esm2020/src/pages/product/product.component.mjs +7 -10
  142. package/esm2020/src/pages/product/product.module.mjs +4 -4
  143. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +3 -3
  144. package/esm2020/src/pages/record-not-found/record-not-found.module.mjs +4 -4
  145. package/esm2020/src/pages/remote/remote.component.mjs +13 -14
  146. package/esm2020/src/pages/remote/remote.module.mjs +4 -4
  147. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +35 -39
  148. package/esm2020/src/pages/shopping-cart/shopping-cart.module.mjs +4 -4
  149. package/esm2020/src/resolvers/flow.resolver.mjs +37 -51
  150. package/esm2020/src/resolvers/quote.resolver.mjs +40 -65
  151. package/esm2020/src/services/doc-gen.service.mjs +7 -6
  152. package/esm2020/src/services/flow-dialog.service.mjs +22 -7
  153. package/esm2020/src/services/flow-router.service.mjs +31 -10
  154. package/esm2020/src/services/flow.service.mjs +36 -11
  155. package/esm2020/src/services/guided-selling.service.mjs +8 -7
  156. package/esm2020/src/services/index.mjs +3 -1
  157. package/esm2020/src/types/index.mjs +1 -2
  158. package/esm2020/src/utils/flow.utils.mjs +6 -2
  159. package/fesm2015/veloceapps-sdk-cms.mjs +329 -248
  160. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  161. package/fesm2015/veloceapps-sdk-core.mjs +1545 -826
  162. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  163. package/fesm2015/veloceapps-sdk.mjs +743 -1542
  164. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  165. package/fesm2020/veloceapps-sdk-cms.mjs +343 -270
  166. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  167. package/fesm2020/veloceapps-sdk-core.mjs +1860 -1158
  168. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  169. package/fesm2020/veloceapps-sdk.mjs +855 -1653
  170. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  171. package/package.json +7 -13
  172. package/src/components/doc-gen/doc-gen.component.d.ts +8 -12
  173. package/src/components/flow-header/flow-header.component.d.ts +25 -0
  174. package/src/components/flow-header/flow-header.module.d.ts +9 -0
  175. package/src/components/flow-header/index.d.ts +1 -0
  176. package/src/components/guided-selling/guided-selling.component.d.ts +7 -11
  177. package/src/configure-primeng.d.ts +1 -0
  178. package/src/flow-routing.module.d.ts +6 -7
  179. package/src/flow.component.d.ts +7 -10
  180. package/src/flow.module.d.ts +2 -2
  181. package/src/guards/context.guard.d.ts +4 -5
  182. package/src/guards/flow.guard.d.ts +2 -0
  183. package/src/guards/product-unload.guard.d.ts +2 -2
  184. package/src/guards/root.guard.d.ts +0 -1
  185. package/src/pages/assets/assets.component.d.ts +5 -7
  186. package/src/pages/catalog/catalog.component.d.ts +5 -7
  187. package/src/pages/debug/debug.component.d.ts +5 -8
  188. package/src/pages/product/product.component.d.ts +2 -3
  189. package/src/pages/remote/remote.component.d.ts +1 -2
  190. package/src/pages/shopping-cart/shopping-cart.component.d.ts +5 -7
  191. package/src/resolvers/flow.resolver.d.ts +6 -7
  192. package/src/resolvers/quote.resolver.d.ts +6 -12
  193. package/src/services/doc-gen.service.d.ts +1 -1
  194. package/src/services/flow-dialog.service.d.ts +5 -2
  195. package/src/services/flow-router.service.d.ts +4 -2
  196. package/src/services/flow.service.d.ts +4 -2
  197. package/src/services/guided-selling.service.d.ts +1 -1
  198. package/src/services/index.d.ts +2 -0
  199. package/src/types/index.d.ts +0 -1
  200. package/esm2020/cms/services/integration.state.mjs +0 -37
  201. package/esm2020/cms/types/integration.types.mjs +0 -2
  202. package/esm2020/runtime/components/component-preview/component-preview.component.mjs +0 -125
  203. package/esm2020/runtime/components/index.mjs +0 -5
  204. package/esm2020/runtime/components/section-renderer/section-renderer.component.mjs +0 -67
  205. package/esm2020/runtime/components/ui-runtime/runtime.component.mjs +0 -440
  206. package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +0 -108
  207. package/esm2020/runtime/execution/components/children-placeholder/children-placeholder.component.mjs +0 -60
  208. package/esm2020/runtime/execution/components/context-provider/context-provider.component.mjs +0 -39
  209. package/esm2020/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.mjs +0 -67
  210. package/esm2020/runtime/execution/components/federated/federated.component.mjs +0 -74
  211. package/esm2020/runtime/execution/components/velo-attribute/velo-attribute.component.mjs +0 -60
  212. package/esm2020/runtime/execution/components/velo-multiselect/velo-multiselect.component.mjs +0 -130
  213. package/esm2020/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.mjs +0 -72
  214. package/esm2020/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.mjs +0 -97
  215. package/esm2020/runtime/execution/components/velo-port-radio/velo-port-radio.component.mjs +0 -142
  216. package/esm2020/runtime/execution/components/velo-type/velo-type.component.mjs +0 -119
  217. package/esm2020/runtime/execution/directives/section-script.directive.mjs +0 -247
  218. package/esm2020/runtime/execution/directives/sf-query.directive.mjs +0 -35
  219. package/esm2020/runtime/execution/directives/velo-attribute.directive.mjs +0 -88
  220. package/esm2020/runtime/execution/directives/velo-port.directive.mjs +0 -376
  221. package/esm2020/runtime/execution/directives/vl-approval.directive.mjs +0 -23
  222. package/esm2020/runtime/execution/directives/vl-document-attachments.directive.mjs +0 -36
  223. package/esm2020/runtime/execution/directives/vl-document-templates.directive.mjs +0 -60
  224. package/esm2020/runtime/execution/directives/vl-quote.directive.mjs +0 -42
  225. package/esm2020/runtime/execution/directives/vl-ramp.directive.mjs +0 -55
  226. package/esm2020/runtime/execution/runtime-execution.module.mjs +0 -133
  227. package/esm2020/runtime/execution/utils/federated.util.mjs +0 -32
  228. package/esm2020/runtime/index.mjs +0 -5
  229. package/esm2020/runtime/runtime.module.mjs +0 -74
  230. package/esm2020/runtime/services/cart.service.mjs +0 -29
  231. package/esm2020/runtime/services/collapsible-state.service.mjs +0 -34
  232. package/esm2020/runtime/services/configuration.service.mjs +0 -119
  233. package/esm2020/runtime/services/current-state.service.mjs +0 -17
  234. package/esm2020/runtime/services/form-scope.service.mjs +0 -30
  235. package/esm2020/runtime/services/index.mjs +0 -4
  236. package/esm2020/runtime/services/product-model-cache.service.mjs +0 -31
  237. package/esm2020/runtime/services/runtime-context.service.mjs +0 -60
  238. package/esm2020/runtime/services/runtime-form.service.mjs +0 -219
  239. package/esm2020/runtime/services/runtime.service.mjs +0 -115
  240. package/esm2020/runtime/services/section-helper.service.mjs +0 -27
  241. package/esm2020/runtime/services/section-scope.service.mjs +0 -36
  242. package/esm2020/runtime/services/section-store.service.mjs +0 -22
  243. package/esm2020/runtime/services/section.service.mjs +0 -117
  244. package/esm2020/runtime/types/bound-data.types.mjs +0 -7
  245. package/esm2020/runtime/types/index.mjs +0 -3
  246. package/esm2020/runtime/types/quote-states.types.mjs +0 -2
  247. package/esm2020/runtime/types/runtime.types.mjs +0 -2
  248. package/esm2020/runtime/types/script-registry.types.mjs +0 -51
  249. package/esm2020/runtime/utils/line-item.util.mjs +0 -270
  250. package/esm2020/runtime/utils/section.utils.mjs +0 -26
  251. package/esm2020/runtime/utils/sections-binder.helper.mjs +0 -105
  252. package/esm2020/runtime/veloceapps-sdk-runtime.mjs +0 -5
  253. package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +0 -119
  254. package/esm2020/src/components/header/cart-overlay/cart-preview.module.mjs +0 -47
  255. package/esm2020/src/components/header/header.component.mjs +0 -355
  256. package/esm2020/src/components/header/header.module.mjs +0 -52
  257. package/esm2020/src/components/header/header.types.mjs +0 -2
  258. package/esm2020/src/components/header/metrics/index.mjs +0 -2
  259. package/esm2020/src/components/header/metrics/metrics.component.mjs +0 -255
  260. package/esm2020/src/components/header/metrics/metrics.definitions.mjs +0 -2
  261. package/esm2020/src/components/header/metrics/metrics.module.mjs +0 -69
  262. package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +0 -137
  263. package/esm2020/src/pages/legacy-product/legacy-product.module.mjs +0 -19
  264. package/esm2020/src/types/flow-customization.types.mjs +0 -3
  265. package/fesm2015/veloceapps-sdk-runtime.mjs +0 -3770
  266. package/fesm2015/veloceapps-sdk-runtime.mjs.map +0 -1
  267. package/fesm2020/veloceapps-sdk-runtime.mjs +0 -3767
  268. package/fesm2020/veloceapps-sdk-runtime.mjs.map +0 -1
  269. package/runtime/README.md +0 -5
  270. package/runtime/components/component-preview/component-preview.component.d.ts +0 -27
  271. package/runtime/components/index.d.ts +0 -4
  272. package/runtime/components/section-renderer/section-renderer.component.d.ts +0 -25
  273. package/runtime/components/ui-runtime/runtime.component.d.ts +0 -53
  274. package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +0 -27
  275. package/runtime/execution/components/children-placeholder/children-placeholder.component.d.ts +0 -30
  276. package/runtime/execution/components/context-provider/context-provider.component.d.ts +0 -14
  277. package/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.d.ts +0 -25
  278. package/runtime/execution/components/federated/federated.component.d.ts +0 -36
  279. package/runtime/execution/components/velo-attribute/velo-attribute.component.d.ts +0 -19
  280. package/runtime/execution/components/velo-multiselect/velo-multiselect.component.d.ts +0 -35
  281. package/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.d.ts +0 -22
  282. package/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.d.ts +0 -22
  283. package/runtime/execution/components/velo-port-radio/velo-port-radio.component.d.ts +0 -28
  284. package/runtime/execution/components/velo-type/velo-type.component.d.ts +0 -31
  285. package/runtime/execution/directives/section-script.directive.d.ts +0 -59
  286. package/runtime/execution/directives/sf-query.directive.d.ts +0 -15
  287. package/runtime/execution/directives/velo-attribute.directive.d.ts +0 -26
  288. package/runtime/execution/directives/velo-port.directive.d.ts +0 -74
  289. package/runtime/execution/directives/vl-approval.directive.d.ts +0 -10
  290. package/runtime/execution/directives/vl-document-attachments.directive.d.ts +0 -15
  291. package/runtime/execution/directives/vl-document-templates.directive.d.ts +0 -33
  292. package/runtime/execution/directives/vl-quote.directive.d.ts +0 -14
  293. package/runtime/execution/directives/vl-ramp.directive.d.ts +0 -15
  294. package/runtime/execution/runtime-execution.module.d.ts +0 -25
  295. package/runtime/execution/utils/federated.util.d.ts +0 -6
  296. package/runtime/index.d.ts +0 -4
  297. package/runtime/runtime.module.d.ts +0 -16
  298. package/runtime/services/cart.service.d.ts +0 -15
  299. package/runtime/services/collapsible-state.service.d.ts +0 -15
  300. package/runtime/services/configuration.service.d.ts +0 -20
  301. package/runtime/services/current-state.service.d.ts +0 -8
  302. package/runtime/services/form-scope.service.d.ts +0 -20
  303. package/runtime/services/index.d.ts +0 -3
  304. package/runtime/services/product-model-cache.service.d.ts +0 -14
  305. package/runtime/services/runtime-context.service.d.ts +0 -16
  306. package/runtime/services/runtime-form.service.d.ts +0 -24
  307. package/runtime/services/runtime.service.d.ts +0 -44
  308. package/runtime/services/section-helper.service.d.ts +0 -8
  309. package/runtime/services/section-scope.service.d.ts +0 -14
  310. package/runtime/services/section-store.service.d.ts +0 -11
  311. package/runtime/services/section.service.d.ts +0 -30
  312. package/runtime/types/bound-data.types.d.ts +0 -13
  313. package/runtime/types/index.d.ts +0 -2
  314. package/runtime/types/quote-states.types.d.ts +0 -6
  315. package/runtime/types/runtime.types.d.ts +0 -19
  316. package/runtime/types/script-registry.types.d.ts +0 -13
  317. package/runtime/utils/line-item.util.d.ts +0 -34
  318. package/runtime/utils/section.utils.d.ts +0 -2
  319. package/runtime/utils/sections-binder.helper.d.ts +0 -16
  320. package/src/components/header/cart-overlay/cart-preview.component.d.ts +0 -36
  321. package/src/components/header/cart-overlay/cart-preview.module.d.ts +0 -14
  322. package/src/components/header/header.component.d.ts +0 -70
  323. package/src/components/header/header.module.d.ts +0 -16
  324. package/src/components/header/header.types.d.ts +0 -20
  325. package/src/components/header/metrics/index.d.ts +0 -1
  326. package/src/components/header/metrics/metrics.component.d.ts +0 -67
  327. package/src/components/header/metrics/metrics.definitions.d.ts +0 -1
  328. package/src/components/header/metrics/metrics.module.d.ts +0 -18
  329. package/src/pages/legacy-product/legacy-product.component.d.ts +0 -37
  330. package/src/pages/legacy-product/legacy-product.module.d.ts +0 -9
  331. package/src/types/flow-customization.types.d.ts +0 -12
  332. /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, Injectable, Optional, Inject, 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 { FlowAction, extractElementMetadata, extendElementMetadata, PreviewModule, 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 { Subject, BehaviorSubject, tap, takeUntil, first, 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 { SalesforceIdUtils, mapShoppingCartSettings, getMaxRenewalTermsValue, ConfigurationContextMode, 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
 
@@ -72,19 +54,19 @@ class FlowDialogComponent {
72
54
  }
73
55
  }
74
56
  }
75
- FlowDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogComponent, deps: [{ token: i1.DynamicDialogConfig }, { token: i1.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component });
76
- FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0, template: "<div class=\"header\">\n <div class=\"title\">\n {{ config.title }}\n </div>\n\n <i class=\"vl-icon vl-cross\" (click)=\"cancelHandler()\"></i>\n</div>\n\n<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host *{font-family:var(--cg-font-family)}:host .header{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 8px}:host .header .title{color:var(--cg-black);font-size:16px;font-style:normal;font-weight:500;line-height:20px}:host .header .vl-icon{cursor:pointer}:host .description{flex:1;padding:0 16px 16px;color:var(--cg-black);font-size:12px;font-style:normal;font-weight:300;line-height:16px;letter-spacing:.3px}:host .form-actions{background:var(--cg-bg-color);padding:12px 16px;display:flex;justify-content:flex-end;width:100%;gap:16px}:host 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}:host p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}:host p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}:host p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}:host p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}::ng-deep .p-dialog.flow-dialog{border-radius:8px;box-shadow:0 8px 32px #0000001a}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogComponent, decorators: [{
57
+ FlowDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogComponent, deps: [{ token: i1.DynamicDialogConfig }, { token: i1.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component });
58
+ FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0, template: "<div class=\"header\">\n <div class=\"title\">\n {{ config.title }}\n </div>\n\n <i class=\"vl-icon vl-cross\" (click)=\"cancelHandler()\"></i>\n</div>\n\n<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host *{font-family:var(--cg-font-family)}:host .header{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 8px}:host .header .title{color:var(--cg-black);font-size:16px;font-style:normal;font-weight:500;line-height:20px}:host .header .vl-icon{cursor:pointer}:host .description{flex:1;padding:0 16px 16px;color:var(--cg-black);font-size:12px;font-style:normal;font-weight:300;line-height:16px;letter-spacing:.3px}:host .form-actions{background:var(--cg-bg-color);padding:12px 16px;display:flex;justify-content:flex-end;width:100%;gap:16px}:host 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}:host p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}:host p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}:host p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}:host p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}::ng-deep .p-dialog.flow-dialog{border-radius:8px;box-shadow:0 8px 32px #0000001a}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogComponent, decorators: [{
78
60
  type: Component,
79
61
  args: [{ selector: 'vl-flow-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"header\">\n <div class=\"title\">\n {{ config.title }}\n </div>\n\n <i class=\"vl-icon vl-cross\" (click)=\"cancelHandler()\"></i>\n</div>\n\n<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host *{font-family:var(--cg-font-family)}:host .header{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 8px}:host .header .title{color:var(--cg-black);font-size:16px;font-style:normal;font-weight:500;line-height:20px}:host .header .vl-icon{cursor:pointer}:host .description{flex:1;padding:0 16px 16px;color:var(--cg-black);font-size:12px;font-style:normal;font-weight:300;line-height:16px;letter-spacing:.3px}:host .form-actions{background:var(--cg-bg-color);padding:12px 16px;display:flex;justify-content:flex-end;width:100%;gap:16px}:host 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}:host p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}:host p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}:host p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}:host p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}::ng-deep .p-dialog.flow-dialog{border-radius:8px;box-shadow:0 8px 32px #0000001a}\n"] }]
80
62
  }], ctorParameters: function () { return [{ type: i1.DynamicDialogConfig }, { type: i1.DynamicDialogRef }]; } });
81
63
 
82
64
  class FlowDialogModule {
83
65
  }
84
- FlowDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
85
- FlowDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogModule, declarations: [FlowDialogComponent], imports: [CommonModule, ButtonModule], exports: [FlowDialogComponent] });
86
- FlowDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogModule, imports: [CommonModule, ButtonModule] });
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogModule, decorators: [{
66
+ FlowDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
67
+ FlowDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, declarations: [FlowDialogComponent], imports: [CommonModule, ButtonModule], exports: [FlowDialogComponent] });
68
+ FlowDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, imports: [CommonModule, ButtonModule] });
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, decorators: [{
88
70
  type: NgModule,
89
71
  args: [{
90
72
  declarations: [FlowDialogComponent],
@@ -93,51 +75,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
93
75
  }]
94
76
  }] });
95
77
 
96
- const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
97
-
98
- class FlowDocGenService {
99
- constructor(integrationState) {
100
- this.integrationState = integrationState;
101
- this.cleanup$ = new Subject();
102
- this.isVisibleSubj$ = new BehaviorSubject(false);
103
- this.isVisible$ = this.isVisibleSubj$.asObservable();
104
- this.initSubscriptions();
105
- }
106
- cleanup() {
107
- this.cleanup$.next();
108
- }
109
- initSubscriptions() {
110
- this.integrationState
111
- .listen$(FlowAction.FLOW_OPEN_DOC_GEN)
112
- .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
113
- .subscribe();
114
- this.integrationState
115
- .listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
116
- .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
117
- .subscribe();
118
- }
119
- }
120
- FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
121
- FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService });
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, decorators: [{
123
- type: Injectable
124
- }], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
125
-
126
78
  class DocGenComponent {
127
- constructor(quoteDraftService, contextService, templatesApi, docGenService, toastService, customizationService) {
128
- this.quoteDraftService = quoteDraftService;
129
- this.contextService = contextService;
79
+ constructor(templatesApi, contextService, flowStateService, flowInfo, toastService, customizationService) {
130
80
  this.templatesApi = templatesApi;
131
- this.docGenService = docGenService;
81
+ this.contextService = contextService;
82
+ this.flowStateService = flowStateService;
83
+ this.flowInfo = flowInfo;
132
84
  this.toastService = toastService;
133
85
  this.customizationService = customizationService;
134
86
  this.uiDefinition$ = new BehaviorSubject(null);
135
87
  this.templateApiName = '';
136
88
  this.destroy$ = new Subject();
137
- this.isVisible$ = this.docGenService.isVisible$;
138
- // initialize when quote draft requested
139
- this.quoteDraftService.quoteDraft$
140
- .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$))
141
93
  .subscribe();
142
94
  }
143
95
  ngOnDestroy() {
@@ -145,8 +97,8 @@ class DocGenComponent {
145
97
  this.destroy$.complete();
146
98
  }
147
99
  initialize() {
148
- var _a;
149
- this.templateApiName = (_a = this.contextService.resolve().properties.docGenTemplateApiName) !== null && _a !== void 0 ? _a : '';
100
+ var _a, _b;
101
+ this.templateApiName = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.docGen) !== null && _b !== void 0 ? _b : '';
150
102
  this.generateUIDefinition$()
151
103
  .pipe(tap(uiDef => {
152
104
  if (!uiDef) {
@@ -161,45 +113,42 @@ class DocGenComponent {
161
113
  }), takeUntil(this.destroy$))
162
114
  .subscribe();
163
115
  }
164
- getTemplateRootComponent$(template) {
165
- return this.templatesApi
166
- .fetchComponents$(template.id)
167
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
168
- }
169
- getLocalTemplateComponentMeta$() {
116
+ getLocalMeta$() {
170
117
  var _a, _b;
171
- 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)) {
172
119
  return of(undefined);
173
120
  }
174
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponent(this.templateApiName).pipe(map(component => {
175
- if (!component) {
121
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
122
+ if (!components) {
176
123
  return;
177
124
  }
178
- return {
125
+ return components.map(component => ({
179
126
  html: component.html,
180
127
  css: component.css,
181
128
  js: component.js,
182
129
  json: component.json,
183
- };
130
+ }));
184
131
  }));
185
132
  }
186
- getDocGenComponentMeta$() {
187
- return this.templatesApi.fetchTemplates$().pipe(map(templates => {
188
- const template = templates.find(template => template.type === UITemplateType.DOCGEN && template.name === this.templateApiName);
189
- return template !== null && template !== void 0 ? template : templates[0];
190
- }), 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);
191
139
  }
192
140
  generateUIDefinition$() {
193
141
  return of(undefined).pipe(tap(() => {
194
142
  if (!this.templateApiName) {
195
- throw new Error("Flow Query parameter 'docGenTemplateApiName' is missing.");
143
+ throw new Error("Flow 'docGen' template is not defined.");
196
144
  }
197
- }), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getDocGenComponentMeta$())), map(meta => {
198
- var _a;
199
- if (!meta) {
145
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
146
+ var _a, _b;
147
+ if (!metaList) {
200
148
  return;
201
149
  }
202
- const headerId = (_a = this.contextService.resolve().properties.Id) !== null && _a !== void 0 ? _a : null;
150
+ const meta = (_a = metaList === null || metaList === void 0 ? void 0 : metaList[0]) !== null && _a !== void 0 ? _a : metaList;
151
+ const headerId = (_b = this.contextService.resolve().properties.Id) !== null && _b !== void 0 ? _b : null;
203
152
  let script = meta.js;
204
153
  if (script) {
205
154
  const metadata = extractElementMetadata(script);
@@ -213,26 +162,24 @@ class DocGenComponent {
213
162
  primary: true,
214
163
  type: 'DEFAULT',
215
164
  version: 2,
216
- children: [
217
- {
218
- children: [],
219
- template: meta.html && btoa(meta.html),
220
- script: script && btoa(script),
221
- styles: meta.css && btoa(meta.css),
222
- },
223
- ],
165
+ children: metaList.map(child => ({
166
+ children: [],
167
+ template: child.html && btoaSafe(child.html),
168
+ script: child.js && btoaSafe(child.js),
169
+ styles: child.css && btoaSafe(child.css),
170
+ })),
224
171
  };
225
172
  return uiDef;
226
173
  }));
227
174
  }
228
175
  }
229
- DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token: FlowDocGenService }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
230
- DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], 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 });
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenComponent, decorators: [{
176
+ 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 });
177
+ 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 });
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
232
179
  type: Component,
233
- args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
180
+ 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"] }]
234
181
  }], ctorParameters: function () {
235
- return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type: FlowDocGenService }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
182
+ return [{ type: i1$1.UITemplatesApiService }, { type: i2.ContextService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
236
183
  type: Optional
237
184
  }, {
238
185
  type: Inject,
@@ -242,10 +189,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
242
189
 
243
190
  class DocGenModule {
244
191
  }
245
- DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
246
- DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
247
- DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenModule, decorators: [{
192
+ DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
193
+ DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
194
+ DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
249
196
  type: NgModule,
250
197
  args: [{
251
198
  declarations: [DocGenComponent],
@@ -254,48 +201,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
254
201
  }]
255
202
  }] });
256
203
 
257
- class FlowGuidedSellingService {
258
- constructor(integrationState) {
259
- this.integrationState = integrationState;
260
- this.cleanup$ = new Subject();
261
- this.isVisibleSubj$ = new BehaviorSubject(true);
262
- this.isVisible$ = this.isVisibleSubj$.asObservable();
263
- this.initSubscriptions();
264
- }
265
- cleanup() {
266
- this.cleanup$.next();
267
- }
268
- initSubscriptions() {
269
- this.integrationState
270
- .listen$(FlowAction.OPEN_GUIDED_SELLING)
271
- .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
272
- .subscribe();
273
- this.integrationState
274
- .listen$(FlowAction.CLOSE_GUIDED_SELLING)
275
- .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
276
- .subscribe();
277
- }
278
- }
279
- FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
280
- FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService });
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
282
- type: Injectable
283
- }], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
284
-
285
204
  class GuidedSellingComponent {
286
- constructor(quoteDraftService, contextService, templatesApi, guidedSellingService, toastService, customizationService) {
287
- this.quoteDraftService = quoteDraftService;
288
- this.contextService = contextService;
205
+ constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
289
206
  this.templatesApi = templatesApi;
290
- this.guidedSellingService = guidedSellingService;
207
+ this.flowStateService = flowStateService;
208
+ this.flowInfo = flowInfo;
291
209
  this.toastService = toastService;
292
210
  this.customizationService = customizationService;
293
211
  this.uiDefinition$ = new BehaviorSubject(null);
294
212
  this.templateApiName = '';
295
213
  this.destroy$ = new Subject();
296
- // initialize when quote draft requested
297
- this.quoteDraftService.quoteDraft$
298
- .pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
214
+ // wait until flow is initialized
215
+ this.flowStateService
216
+ .isInitialized$()
217
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
299
218
  .subscribe();
300
219
  }
301
220
  ngOnDestroy() {
@@ -303,8 +222,8 @@ class GuidedSellingComponent {
303
222
  this.destroy$.complete();
304
223
  }
305
224
  initialize() {
306
- var _a;
307
- this.templateApiName = (_a = this.contextService.resolve().properties.guidedSellingTemplateApiName) !== null && _a !== void 0 ? _a : '';
225
+ var _a, _b;
226
+ this.templateApiName = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.guidedSelling) !== null && _b !== void 0 ? _b : '';
308
227
  this.generateUIDefinition$()
309
228
  .pipe(tap(uiDef => {
310
229
  if (!uiDef) {
@@ -319,41 +238,37 @@ class GuidedSellingComponent {
319
238
  }), takeUntil(this.destroy$))
320
239
  .subscribe();
321
240
  }
322
- getTemplateRootComponent$(template) {
323
- return this.templatesApi
324
- .fetchComponents$(template.id)
325
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
326
- }
327
- getLocalTemplateComponentMeta$() {
241
+ getLocalMeta$() {
328
242
  var _a, _b;
329
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponent)) {
243
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
330
244
  return of(undefined);
331
245
  }
332
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponent(this.templateApiName).pipe(map(component => {
333
- if (!component) {
246
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
247
+ if (!components) {
334
248
  return;
335
249
  }
336
- return {
250
+ return components.map(component => ({
337
251
  html: component.html,
338
252
  css: component.css,
339
253
  js: component.js,
340
254
  json: component.json,
341
- };
255
+ }));
342
256
  }));
343
257
  }
344
- getGuidedSellingComponentMeta$() {
345
- return this.templatesApi.fetchTemplates$().pipe(map(templates => {
346
- const template = templates.find(template => template.type === UITemplateType.GUIDED_SELLING && template.name === this.templateApiName);
347
- return template !== null && template !== void 0 ? template : templates[0];
348
- }), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(component => component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined)));
258
+ getOrgMeta$() {
259
+ const template = this.flowInfo.templates.GUIDED_SELLING;
260
+ if (!template) {
261
+ return of(undefined);
262
+ }
263
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
349
264
  }
350
265
  generateUIDefinition$() {
351
266
  return of(undefined).pipe(tap(() => {
352
267
  if (!this.templateApiName) {
353
- throw new Error("Flow Query parameter 'guidedSellingTemplateApiName' is missing.");
268
+ throw new Error("Flow 'guidedSelling' template is not defined.");
354
269
  }
355
- }), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getGuidedSellingComponentMeta$())), map(meta => {
356
- if (!meta) {
270
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
271
+ if (!metaList) {
357
272
  return;
358
273
  }
359
274
  const uiDef = {
@@ -362,26 +277,24 @@ class GuidedSellingComponent {
362
277
  primary: true,
363
278
  type: 'DEFAULT',
364
279
  version: 2,
365
- children: [
366
- {
367
- children: [],
368
- template: meta.html && btoa(meta.html),
369
- script: meta.js && btoa(meta.js),
370
- styles: meta.css && btoa(meta.css),
371
- },
372
- ],
280
+ children: metaList.map(meta => ({
281
+ children: [],
282
+ template: meta.html && btoaSafe(meta.html),
283
+ script: meta.js && btoaSafe(meta.js),
284
+ styles: meta.css && btoaSafe(meta.css),
285
+ })),
373
286
  };
374
287
  return uiDef;
375
288
  }));
376
289
  }
377
290
  }
378
- GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token: FlowGuidedSellingService }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
379
- GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingComponent, decorators: [{
291
+ 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 });
292
+ 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 });
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
381
294
  type: Component,
382
295
  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"] }]
383
296
  }], ctorParameters: function () {
384
- return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type: FlowGuidedSellingService }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
297
+ return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
385
298
  type: Optional
386
299
  }, {
387
300
  type: Inject,
@@ -391,10 +304,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
391
304
 
392
305
  class GuidedSellingModule {
393
306
  }
394
- GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
395
- GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
396
- GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
397
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingModule, decorators: [{
307
+ GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
308
+ GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
309
+ GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, decorators: [{
398
311
  type: NgModule,
399
312
  args: [{
400
313
  declarations: [GuidedSellingComponent],
@@ -403,6 +316,121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
403
316
  }]
404
317
  }] });
405
318
 
319
+ class FlowHeaderComponent {
320
+ constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
321
+ this.templatesApi = templatesApi;
322
+ this.flowStateService = flowStateService;
323
+ this.flowInfo = flowInfo;
324
+ this.toastService = toastService;
325
+ this.customizationService = customizationService;
326
+ this.uiDefinition$ = new BehaviorSubject(null);
327
+ this.templateApiName = '';
328
+ this.destroy$ = new Subject();
329
+ // wait until flow is initialized
330
+ this.flowStateService
331
+ .isInitialized$()
332
+ .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
333
+ .subscribe();
334
+ }
335
+ ngOnDestroy() {
336
+ this.destroy$.next();
337
+ this.destroy$.complete();
338
+ }
339
+ initialize() {
340
+ var _a, _b;
341
+ this.templateApiName = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.flowHeader) !== null && _b !== void 0 ? _b : '';
342
+ this.generateUIDefinition$()
343
+ .pipe(tap(uiDef => {
344
+ if (!uiDef) {
345
+ throw new Error(`Component with name '${this.templateApiName}' not found.`);
346
+ }
347
+ this.uiDefinition$.next(uiDef);
348
+ }), catchError(err => {
349
+ var _a;
350
+ const message = 'Failed to resolve Flow Header component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
351
+ this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
352
+ return of();
353
+ }), takeUntil(this.destroy$))
354
+ .subscribe();
355
+ }
356
+ getLocalMeta$() {
357
+ var _a, _b;
358
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
359
+ return of(undefined);
360
+ }
361
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
362
+ if (!components) {
363
+ return;
364
+ }
365
+ return components.map(component => ({
366
+ html: component.html,
367
+ css: component.css,
368
+ js: component.js,
369
+ json: component.json,
370
+ }));
371
+ }));
372
+ }
373
+ getOrgMeta$() {
374
+ const template = this.flowInfo.templates.FLOW_HEADER;
375
+ if (!template) {
376
+ return of(undefined);
377
+ }
378
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
379
+ }
380
+ generateUIDefinition$() {
381
+ return of(undefined).pipe(tap(() => {
382
+ if (!this.templateApiName) {
383
+ throw new Error("Flow 'flowHeader' template is not defined.");
384
+ }
385
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
386
+ if (!metaList) {
387
+ return;
388
+ }
389
+ const uiDef = {
390
+ name: '',
391
+ createdTimestamp: 0,
392
+ primary: true,
393
+ type: 'DEFAULT',
394
+ version: 2,
395
+ children: metaList.map(meta => ({
396
+ children: [],
397
+ template: meta.html && btoaSafe(meta.html),
398
+ script: meta.js && btoaSafe(meta.js),
399
+ styles: meta.css && btoaSafe(meta.css),
400
+ })),
401
+ };
402
+ return uiDef;
403
+ }));
404
+ }
405
+ }
406
+ 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 });
407
+ 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 });
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
409
+ type: Component,
410
+ 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"] }]
411
+ }], ctorParameters: function () {
412
+ return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
413
+ type: Optional
414
+ }, {
415
+ type: Inject,
416
+ args: [FLOW_CUSTOMIZATION]
417
+ }] }];
418
+ } });
419
+
420
+ class FlowNewHeaderModule {
421
+ }
422
+ FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
423
+ FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
424
+ FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
426
+ type: NgModule,
427
+ args: [{
428
+ declarations: [FlowHeaderComponent],
429
+ imports: [CommonModule, PreviewModule],
430
+ exports: [FlowHeaderComponent],
431
+ }]
432
+ }] });
433
+
406
434
  class FlowRouterService {
407
435
  constructor(router, route, contextService, integrationState) {
408
436
  this.router = router;
@@ -471,7 +499,7 @@ class FlowRouterService {
471
499
  return '';
472
500
  }
473
501
  const path = rootRoute.pathFromRoot
474
- .map(r => { var _a; return (_a = r.routeConfig) === null || _a === void 0 ? void 0 : _a.path; })
502
+ .map(r => r.url[0])
475
503
  .filter(Boolean)
476
504
  .join('/');
477
505
  return '/' + path;
@@ -482,6 +510,9 @@ class FlowRouterService {
482
510
  get params$() {
483
511
  return this.lastChildParams$;
484
512
  }
513
+ get params() {
514
+ return this.getLastChildParams(this.route.snapshot);
515
+ }
485
516
  isConfigurationRoute$() {
486
517
  return this.getFlowSubpath$().pipe(map(url => url.startsWith('product')));
487
518
  }
@@ -500,6 +531,20 @@ class FlowRouterService {
500
531
  this.router.navigateByUrl(prevUrl);
501
532
  }
502
533
  }
534
+ navigateTo(path, productId, lineItemId) {
535
+ if (path === 'shopping-cart') {
536
+ this.navigateToShoppingCart();
537
+ }
538
+ else if (path === 'catalog') {
539
+ this.navigateToCatalog();
540
+ }
541
+ else if (path === 'assets') {
542
+ this.navigateToAssets();
543
+ }
544
+ else if (path === 'product' && productId) {
545
+ this.navigateToProductConfiguration(productId, lineItemId);
546
+ }
547
+ }
503
548
  navigateToProductConfiguration(productId, lineItemId) {
504
549
  this.contextService.update({ properties: { productId, lineItemId } });
505
550
  const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
@@ -523,6 +568,11 @@ class FlowRouterService {
523
568
  const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
524
569
  this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
525
570
  }
571
+ showErrorPage$(message) {
572
+ const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
573
+ const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
574
+ return from(this.router.navigate([flowRouteUrl, '404'], { state: { message }, replaceUrl: true })).pipe(map(() => false));
575
+ }
526
576
  switchObject(id) {
527
577
  const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
528
578
  const route = this.getLastChildRoute(this.route);
@@ -535,157 +585,18 @@ class FlowRouterService {
535
585
  this.router.navigate([], { relativeTo: route, queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), queryParams) });
536
586
  }
537
587
  }
538
- FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i1$1.ContextService }, { token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
539
- FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, decorators: [{
588
+ 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 }], target: i0.ɵɵFactoryTarget.Injectable });
589
+ FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
590
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
541
591
  type: Injectable,
542
592
  args: [{ providedIn: 'root' }]
543
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }, { type: i5.IntegrationState }]; } });
544
-
545
- class CartPreviewComponent {
546
- constructor(flowConfiguration, routerService, productImagesService, quoteDraftService) {
547
- this.flowConfiguration = flowConfiguration;
548
- this.routerService = routerService;
549
- this.productImagesService = productImagesService;
550
- this.quoteDraftService = quoteDraftService;
551
- this.productRowHeight = 65;
552
- this.form = new FormGroup({});
553
- this.hasTermInProducts = false;
554
- this.scrollHeight = 0;
555
- this.shouldUpdate$ = new BehaviorSubject(true);
556
- this.destroyed$ = new Subject();
557
- this.lockedProductId$ = combineLatest([this.routerService.route$, this.routerService.isConfigurationRoute$()]).pipe(map(([route, isConfigurationRoute]) => {
558
- if (!isConfigurationRoute) {
559
- return null;
560
- }
561
- return route.queryParams['productId'];
562
- }));
563
- this.isEditMode$ = this.quoteDraftService.isEditMode$();
564
- }
565
- ngOnChanges(changes) {
566
- const { products } = changes;
567
- if (products) {
568
- this.shouldUpdate$.next(true);
569
- this.scrollHeight = Math.min(this.products.length * this.productRowHeight, 460);
570
- }
571
- }
572
- ngAfterViewInit() {
573
- combineLatest([this.lockedProductId$, this.isEditMode$, this.shouldUpdate$, this.overlayPanel.onShow])
574
- .pipe(filter(() => this.overlayPanel.overlayVisible), takeUntil(this.destroyed$))
575
- .subscribe(([lockedProductId, isEditMode]) => this.updateControls(this.products, isEditMode, lockedProductId));
576
- }
577
- ngOnDestroy() {
578
- this.destroyed$.next();
579
- this.destroyed$.complete();
580
- }
581
- getImageUrl(productId) {
582
- return this.productImagesService.getImageUrl$(productId);
583
- }
584
- navigateToProductConfiguration(productId, lineItemId) {
585
- this.overlayPanel.hide();
586
- this.routerService.navigateToProductConfiguration(productId, lineItemId);
587
- }
588
- controlBlurHandler(product) {
589
- const control = this.form.get(product.id);
590
- if (!control || control.invalid) {
591
- return;
592
- }
593
- this.flowConfiguration.update([
594
- {
595
- dataType: 'LINEITEM',
596
- attributeType: 'QTY',
597
- id: product.id,
598
- newValue: control.value,
599
- },
600
- ]);
601
- }
602
- deleteHandler(product) {
603
- this.flowConfiguration.delete([product.id]);
604
- }
605
- deleteAllHandler() {
606
- const productIds = this.products.map(product => product.id);
607
- this.flowConfiguration.delete(productIds);
608
- }
609
- updateControls(products, isEditMode, lockedProductId) {
610
- const ids = [];
611
- products.forEach(item => {
612
- if (!item.id) {
613
- return;
614
- }
615
- ids.push(item.id);
616
- let control = this.form.get(item.id);
617
- if (!control) {
618
- control = new FormControl(item.qty, []);
619
- this.form.addControl(item.id, control);
620
- }
621
- else {
622
- control.setValue(item.qty);
623
- }
624
- if (!isEditMode || item.deleted || item.productId === lockedProductId) {
625
- control.disable();
626
- }
627
- else {
628
- control.enable();
629
- }
630
- });
631
- const removedIds = Object.keys(this.form.controls).filter(id => !ids.includes(id));
632
- removedIds.forEach(id => this.form.removeControl(id));
633
- this.hasTermInProducts = products.some((item) => item.hasTerm);
634
- }
635
- }
636
- CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewComponent, deps: [{ token: i1$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i1$1.ProductImagesService }, { token: i1$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
637
- CartPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewComponent, decorators: [{
639
- type: Component,
640
- 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"] }]
641
- }], ctorParameters: function () { return [{ type: i1$1.FlowConfigurationService }, { type: FlowRouterService }, { type: i1$1.ProductImagesService }, { type: i1$1.QuoteDraftService }]; }, propDecorators: { overlayPanel: [{
642
- type: ViewChild,
643
- args: [OverlayPanel]
644
- }], products: [{
645
- type: Input
646
- }] } });
647
-
648
- class CartPreviewModule {
649
- }
650
- CartPreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
651
- CartPreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [CommonModule,
652
- ReactiveFormsModule,
653
- ButtonModule,
654
- OverlayPanelModule,
655
- LetDirectiveModule,
656
- InputNumberModule,
657
- VirtualScrollerModule,
658
- QuantityControlModule], exports: [CartPreviewComponent] });
659
- CartPreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, imports: [CommonModule,
660
- ReactiveFormsModule,
661
- ButtonModule,
662
- OverlayPanelModule,
663
- LetDirectiveModule,
664
- InputNumberModule,
665
- VirtualScrollerModule,
666
- QuantityControlModule] });
667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, decorators: [{
668
- type: NgModule,
669
- args: [{
670
- declarations: [CartPreviewComponent],
671
- imports: [
672
- CommonModule,
673
- ReactiveFormsModule,
674
- ButtonModule,
675
- OverlayPanelModule,
676
- LetDirectiveModule,
677
- InputNumberModule,
678
- VirtualScrollerModule,
679
- QuantityControlModule,
680
- ],
681
- exports: [CartPreviewComponent],
682
- }]
683
- }] });
593
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }]; } });
684
594
 
685
595
  class FlowDialogService {
686
- constructor(dialogService, contextService) {
596
+ constructor(dialogService, contextService, runtimeSettings) {
687
597
  this.dialogService = dialogService;
688
598
  this.contextService = contextService;
599
+ this.runtimeSettings = runtimeSettings;
689
600
  }
690
601
  show(config) {
691
602
  return this.dialogService.open(FlowDialogComponent, {
@@ -794,687 +705,39 @@ class FlowDialogService {
794
705
  secondaryButton: 'Cancel',
795
706
  });
796
707
  }
797
- }
798
- FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
799
- FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogService });
800
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDialogService, decorators: [{
801
- type: Injectable
802
- }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i1$1.ContextService }]; } });
803
-
804
- const METRICS_STORAGE_KEY = 'vl-metrics';
805
-
806
- class MetricsComponent {
807
- constructor(contextService, quoteDraftService, cdr, metricsCalculationService, flowConfiguration, shoppingCartSettingsApiService, runtimeSettings) {
808
- this.contextService = contextService;
809
- this.quoteDraftService = quoteDraftService;
810
- this.cdr = cdr;
811
- this.metricsCalculationService = metricsCalculationService;
812
- this.flowConfiguration = flowConfiguration;
813
- this.shoppingCartSettingsApiService = shoppingCartSettingsApiService;
814
- this.runtimeSettings = runtimeSettings;
815
- this.emptyStateMetrics = [
816
- { name: 'MRR', value: 0 },
817
- { name: 'E.MRR', value: 0 },
818
- { name: 'NRR', value: 0 },
819
- { name: 'E.NRR', value: 0 },
820
- ];
821
- this.visibleSelectedMetrics = [];
822
- this.restSelectedMetrics = [];
823
- this.metrics = [];
824
- this.filteredMetrics = [];
825
- this.sidebarVisible = false;
826
- this.searchControl = new FormControl('');
827
- this.isFocused = false;
828
- this.nameControl = new FormControl('', [
829
- requiredValidator,
830
- invalidCharactersValidator(standardCharSetWithSpaceRegExp),
831
- reservedIdentifierValidator,
832
- Validators.maxLength(80),
833
- ]);
834
- this.activeMetricRules = [];
835
- this.activeMetricRuleNames = [];
836
- this.defaultMetricRuleNames = [];
837
- this.metricKeys = [];
838
- this.lastSavedMetrics = [];
839
- this.destroyed$ = new Subject();
840
- this.currencySymbol = this.runtimeSettings.getCurrencySettings().symbol;
841
- }
842
- ngOnInit() {
843
- this.activeMetricRules = this.flowConfiguration.activeMetricsSnapshot.filter(metricRule => metricRule.metrics.some(metric => !!metric.totalName));
844
- const activeMetricRuleNames = this.activeMetricRules.map(metricRule => metricRule.title);
845
- this.shoppingCartSettingsApiService
846
- .getSettingsMap()
847
- .pipe(withLatestFrom(this.quoteDraftService.currentState$), tap$1(([settings, lineItems]) => {
848
- this.defaultMetricRuleNames = ((settings === null || settings === void 0 ? void 0 : settings.DEFAULT_HEADER_METRICS) || []).filter(ruleName => activeMetricRuleNames.includes(ruleName));
849
- this.metricKeys = this.collectMetricKeys(lineItems);
850
- this.activeMetricRuleNames = this.getActiveMetricRuleNames();
851
- }), takeUntil$1(this.destroyed$))
852
- .subscribe(() => {
853
- this.collectAvailableMetrics();
854
- });
855
- this.searchControl.valueChanges.pipe(takeUntil$1(this.destroyed$), startWith('')).subscribe(query => {
856
- this.filteredMetrics = this.metrics.filter(({ name }) => {
857
- return (name || '').toLowerCase().includes(query === null || query === void 0 ? void 0 : query.toLowerCase());
858
- });
859
- });
860
- this.metricsCalculationService.onMetricsUpdate$
861
- .pipe(takeUntil$1(this.destroyed$))
862
- .subscribe(() => this.cdr.detectChanges());
863
- }
864
- ngOnDestroy() {
865
- this.destroyed$.next();
866
- this.destroyed$.complete();
867
- }
868
- toggleOverlay(event, overlay, target) {
869
- event.stopPropagation();
870
- if (this.restSelectedMetrics.length) {
871
- if (!overlay.overlayVisible) {
872
- document.dispatchEvent(new Event('click'));
873
- }
874
- overlay.toggle(event, target);
875
- }
876
- else {
877
- this.openSidebar();
878
- }
879
- }
880
- openSidebar() {
881
- this.overlayPanel.hide();
882
- this.sidebarVisible = true;
883
- }
884
- closeSidebar() {
885
- this.sidebarVisible = false;
886
- this.metrics = cloneDeep(this.lastSavedMetrics);
887
- this.editingMetric = undefined;
888
- this.searchControl.setValue('');
889
- }
890
- getMetricValue(key) {
891
- const context = this.contextService.resolve();
892
- if (key.startsWith('Effective_')) {
893
- const correctKey = key.replace('Effective_', '');
894
- return this.toNumber(context.properties[correctKey]) - this.toNumber(context.properties[`Previous${correctKey}`]);
895
- }
896
- else {
897
- return this.metricsCalculationService.getMetricValue(key);
898
- }
899
- }
900
- save() {
901
- localStorage.setItem(METRICS_STORAGE_KEY, JSON.stringify(this.metrics));
902
- this.setMetrics();
903
- this.lastSavedMetrics = cloneDeep(this.metrics);
904
- this.closeSidebar();
905
- }
906
- changeMetricOrder(event) {
907
- moveItemInArray(this.metrics, event.previousIndex, event.currentIndex);
908
- this.filteredMetrics = this.metrics;
909
- }
910
- editMetric(metric) {
911
- if (this.editingMetric && this.nameControl.invalid) {
912
- return;
913
- }
914
- this.editingMetric = metric;
915
- this.nameControl.setValue(metric.name);
916
- }
917
- saveMetric() {
918
- var _a;
919
- if (this.nameControl.invalid) {
920
- return;
921
- }
922
- if (this.editingMetric) {
923
- this.editingMetric.name = (_a = this.nameControl.value) === null || _a === void 0 ? void 0 : _a.trim();
924
- }
925
- this.editingMetric = undefined;
926
- }
927
- cancelMetric() {
928
- this.editingMetric = undefined;
929
- }
930
- resetToDefault() {
931
- this.collectAvailableMetrics(true);
932
- }
933
- onFocus() {
934
- this.isFocused = true;
935
- }
936
- onBlur() {
937
- this.isFocused = false;
938
- }
939
- clearSearch(event) {
940
- event.stopPropagation();
941
- this.searchControl.setValue('');
942
- }
943
- collectMetricKeys(lineItems) {
944
- const keys = [];
945
- lineItems.forEach(lineItem => {
946
- keys.push(...Object.keys(lineItem.totalMetrics || {}));
947
- keys.push(...this.collectMetricKeys(lineItem.lineItems));
708
+ showTermsLimitReachedDialog() {
709
+ const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
710
+ const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
711
+ return this.show({
712
+ title: 'Terms Limit Reached',
713
+ description: `You have reached the term quantity limit: ${maxRenewalTerms}. You can increase the limit in the Shopping Cart Settings.`,
714
+ primaryButton: 'Ok',
948
715
  });
949
- return uniq(keys);
950
- }
951
- setMetrics() {
952
- const metrics = cloneDeep(this.metrics.filter(({ visible }) => visible));
953
- this.visibleSelectedMetrics = metrics.slice(0, 4);
954
- this.restSelectedMetrics = metrics.slice(4);
955
- }
956
- collectAvailableMetrics(resetToDefault = false) {
957
- const storedMetrics = JSON.parse(localStorage.getItem(METRICS_STORAGE_KEY) || '[]');
958
- const metricKeys = this.metricKeys.slice();
959
- const isDefaultConfiguration = !storedMetrics.length || resetToDefault;
960
- this.metrics = (isDefaultConfiguration ? this.activeMetricRuleNames : storedMetrics).reduce((result, metric) => {
961
- const metricKeyIndex = metricKeys.findIndex(key => key === metric.key);
962
- if (metricKeyIndex >= 0) {
963
- metricKeys.splice(metricKeyIndex, 1);
964
- }
965
- if (isDefaultConfiguration && this.defaultMetricRuleNames.includes(metric.name)) {
966
- metric.visible = true;
967
- }
968
- return [...result, metric];
969
- }, []);
970
- this.metrics = [
971
- ...this.metrics,
972
- ...metricKeys.map(metricKey => {
973
- return { key: metricKey, name: this.getMetricName(metricKey), visible: false };
974
- }),
975
- ];
976
- // sort the metrics by the order of default metric rule names from the shopping cart settings
977
- this.metrics = this.sortMetrics();
978
- this.metrics = cloneDeep(this.metrics);
979
- this.searchControl.setValue('');
980
- if (!resetToDefault) {
981
- this.lastSavedMetrics = cloneDeep(this.metrics);
982
- this.setMetrics();
983
- }
984
- this.cdr.markForCheck();
985
716
  }
986
- getMetricName(key) {
987
- var _a;
988
- return (((_a = this.activeMetricRules.find(metricRule => metricRule.metrics.find(metric => metric.totalName === key))) === null || _a === void 0 ? void 0 : _a.title) ||
989
- key);
990
- }
991
- toNumber(value) {
992
- return +(value || 0);
993
- }
994
- getActiveMetricRuleNames() {
995
- return this.activeMetricRules.reduce((result, metricRule) => {
996
- const name = metricRule.title;
997
- const visible = this.defaultMetricRuleNames.includes(name);
998
- metricRule.metrics.forEach(metric => {
999
- result.push({
1000
- key: metric.totalName || metric.name,
1001
- name,
1002
- visible,
1003
- });
1004
- });
1005
- return result;
1006
- }, []);
1007
- }
1008
- /**
1009
- * Sorts the Metrics array by the order of the default metric rule names from the shopping cart settings.
1010
- * If a metric is included in the list of default metrics, it raises the metric to the top of the metrics array.
1011
- */
1012
- sortMetrics() {
1013
- return this.metrics.slice().sort((a, b) => {
1014
- const indexA = this.defaultMetricRuleNames.indexOf(a.name);
1015
- const indexB = this.defaultMetricRuleNames.indexOf(b.name);
1016
- if (indexA === -1 && indexB === -1) {
1017
- return 0;
1018
- }
1019
- if (indexA === -1) {
1020
- return 1;
1021
- }
1022
- if (indexB === -1) {
1023
- return -1;
1024
- }
1025
- return indexA - indexB;
1026
- });
717
+ showDialog(dialog) {
718
+ const dialogFunction = this[dialog].bind(this);
719
+ return dialogFunction(dialog);
1027
720
  }
1028
721
  }
1029
- MetricsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
1030
- MetricsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
1031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsComponent, decorators: [{
1032
- type: Component,
1033
- 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"] }]
1034
- }], 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: [{
1035
- type: ViewChild,
1036
- args: [OverlayPanel]
1037
- }] } });
1038
-
1039
- class FlowHeaderComponent {
1040
- constructor(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService, integrationState) {
1041
- this.contextService = contextService;
1042
- this.quoteDraftService = quoteDraftService;
1043
- this.quoteApiService = quoteApiService;
1044
- this.sfApiService = sfApiService;
1045
- this.flowConfiguration = flowConfiguration;
1046
- this.routerService = routerService;
1047
- this.dialogService = dialogService;
1048
- this.integrationState = integrationState;
1049
- this.isSaveInProgress$ = new BehaviorSubject(false);
1050
- this.isSubmitInProgress$ = new BehaviorSubject(false);
1051
- this.dateFormat = 'MM.dd.yyyy';
1052
- this.assetPriceLists$ = new BehaviorSubject([]);
1053
- this.mode$ = new BehaviorSubject(ConfigurationContextMode.TEST);
1054
- this.destroyed$ = new Subject();
1055
- this.contextProperties$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties));
1056
- 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 : ''; }));
1057
- this.activePriceList$ = this.quoteDraftService.activePriceList$;
1058
- this.isReadonlyMode$ = this.quoteDraftService.hasProducts$.pipe(map(() => this.isReadonlyMode()));
1059
- this.status$ = this.contextService.resolve$().pipe(map(context => { var _a; return (_a = context.properties.Status) !== null && _a !== void 0 ? _a : ''; }));
1060
- this.isEditMode$ = this.quoteDraftService.isEditMode$();
1061
- this.assetsCount$ = this.getAssets$().pipe(map(lineItems => lineItems.length));
1062
- this.products$ = this.getDraftItems$().pipe(map(lineItems => this.generateProducts(lineItems)));
1063
- this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
1064
- this.isCartRoute$ = this.routerService.isCartRoute$();
1065
- this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
1066
- this.isAssetsRoute$ = this.routerService.isAssetsRoute$();
1067
- this.objectDetails$ = this.getObjectDetails$();
1068
- }
1069
- ngOnInit() {
1070
- this.contextService
1071
- .resolve$()
1072
- .pipe(takeUntil(this.destroyed$))
1073
- .subscribe(ctx => this.mode$.next(ctx.mode));
1074
- // update assetPriceLists on quoteDraft change in ACCOUNT mode
1075
- this.quoteDraftService.quoteDraft$
1076
- .pipe(takeUntil(this.destroyed$), filter(() => this.isAccountMode))
1077
- .subscribe(() => this.assetPriceLists$.next(this.quoteDraftService.assetPriceLists));
1078
- }
1079
- ngOnDestroy() {
1080
- this.destroyed$.next();
1081
- this.destroyed$.complete();
1082
- }
1083
- get isAccountMode() {
1084
- return this.mode$.value === ConfigurationContextMode.ACCOUNT;
1085
- }
1086
- get isQuoteMode() {
1087
- return this.mode$.value === ConfigurationContextMode.QUOTE;
1088
- }
1089
- get isAccountMode$() {
1090
- return this.mode$.pipe(map(mode => mode === ConfigurationContextMode.ACCOUNT));
1091
- }
1092
- get isQuoteMode$() {
1093
- return this.mode$.pipe(map(mode => mode === ConfigurationContextMode.QUOTE));
1094
- }
1095
- getSplitButtonActions(isCartRoute) {
1096
- return [
1097
- {
1098
- label: 'Save to Quote',
1099
- command: () => {
1100
- this.saveButtonClickHandler(isCartRoute);
1101
- },
1102
- },
1103
- {
1104
- label: 'Quick Save',
1105
- command: () => {
1106
- this.saveButtonClickHandler(isCartRoute, true);
1107
- },
1108
- },
1109
- {
1110
- label: 'Generate Document',
1111
- command: () => {
1112
- this.docGenButtonClickHandler(isCartRoute);
1113
- },
1114
- },
1115
- {
1116
- label: 'Submit For Approval',
1117
- command: () => {
1118
- this.submitButtonClickHandler(isCartRoute);
1119
- },
1120
- },
1121
- ];
1122
- }
1123
- back(objectId) {
1124
- const targetId = objectId !== null && objectId !== void 0 ? objectId : this.contextService.resolve().properties.Id;
1125
- if (targetId) {
1126
- window.VELO_BACK_FN.apply(null, [targetId]);
1127
- }
1128
- }
1129
- getSalesforceObjectLink(objectId) {
1130
- if (!objectId) {
1131
- return '';
1132
- }
1133
- return `${window.location.origin}/${objectId}`;
1134
- }
1135
- navigateToShoppingCart() {
1136
- if (!this.isReadonlyMode()) {
1137
- this.routerService.navigateToShoppingCart();
1138
- }
1139
- }
1140
- navigateToCatalog() {
1141
- if (!this.isReadonlyMode()) {
1142
- this.routerService.navigateToCatalog();
1143
- }
1144
- }
1145
- navigateToAssets() {
1146
- if (!this.isReadonlyMode()) {
1147
- this.routerService.navigateToAssets();
1148
- }
1149
- }
1150
- docGenButtonClickHandler(isCartRoute) {
1151
- if (this.isAccountMode) {
1152
- if (!this.quoteDraftService.hasUnsavedChanges) {
1153
- this.dialogService.showAccountNoChangesDialog().subscribe();
1154
- }
1155
- else {
1156
- this.dialogService.showDocgenAccountUnsavedChangesDialog().subscribe();
1157
- }
1158
- return;
1159
- }
1160
- if (!this.quoteDraftService.isEditMode()) {
1161
- this.dialogService.showDocgenReadonlyDialog().subscribe();
1162
- return;
1163
- }
1164
- if (!isCartRoute) {
1165
- this.dialogService.showDocgenOutsideShoppingCartDialog().subscribe();
1166
- return;
1167
- }
1168
- let shouldOpen$ = of(true);
1169
- if (this.quoteDraftService.hasUnsavedChanges) {
1170
- shouldOpen$ = this.dialogService.showDocgenUnsavedChangesDialog().pipe(switchMap(confirmed => {
1171
- if (!confirmed) {
1172
- return of(false);
1173
- }
1174
- return this.saveQuote$(true).pipe(map(() => true));
1175
- }));
1176
- }
1177
- shouldOpen$
1178
- .pipe(first(), tap(shouldOpen => shouldOpen && this.integrationState.dispatch(FlowAction.OpenDocGenAction())))
1179
- .subscribe();
1180
- }
1181
- saveButtonClickHandler(isCartRoute, stayOnPage = false) {
1182
- if (!this.quoteDraftService.isEditMode()) {
1183
- if (this.isQuoteMode) {
1184
- this.dialogService.showQuoteReadonlyModeDialog().subscribe();
1185
- }
1186
- else {
1187
- this.dialogService.showReadonlyModeDialog().subscribe();
1188
- }
1189
- return;
1190
- }
1191
- if (this.isUpsellQuoteWithoutChanges()) {
1192
- this.dialogService.showAccountNoChangesDialog().subscribe();
1193
- return;
1194
- }
1195
- if (this.isAccountMode && !this.quoteDraftService.hasUnsavedChanges) {
1196
- this.dialogService.showAccountNoChangesDialog().subscribe();
1197
- return;
1198
- }
1199
- if (!isCartRoute) {
1200
- this.dialogService.showQuoteOutsideShoppingCartDialog().subscribe();
1201
- return;
1202
- }
1203
- const lineItems = this.flowConfiguration.getSnapshot();
1204
- if (!lineItems.length) {
1205
- this.dialogService.showEmptyCartDialog().subscribe();
1206
- return;
1207
- }
1208
- this.saveQuote$(stayOnPage).subscribe();
1209
- }
1210
- submitButtonClickHandler(isCartRoute) {
1211
- if (this.isQuoteMode && !this.quoteDraftService.isEditMode()) {
1212
- this.dialogService.showReadonlyQuoteSubmitFailureDialog();
1213
- return;
1214
- }
1215
- if (this.isUpsellQuoteWithoutChanges()) {
1216
- this.dialogService.showAccountNoChangesDialog().subscribe();
1217
- return;
1218
- }
1219
- if (this.isAccountMode) {
1220
- this.dialogService.showAccountSubmitFailureDialog();
1221
- return;
1222
- }
1223
- if (!isCartRoute) {
1224
- this.dialogService.showOutsideShoppingCartQuoteSubmitFailureDialog().subscribe();
1225
- return;
1226
- }
1227
- const quoteDraft = this.quoteDraftService.quoteDraft;
1228
- if (!quoteDraft) {
1229
- return;
1230
- }
1231
- this.isSubmitInProgress$.next(true);
1232
- this.quoteApiService
1233
- .submitQuote(quoteDraft)
1234
- .pipe(tap(({ quoteId }) => {
1235
- this.quoteDraftService.hasUnsavedChanges = false;
1236
- this.back(quoteId);
1237
- }), finalize(() => this.isSubmitInProgress$.next(false)), takeUntil(this.destroyed$))
1238
- .subscribe();
1239
- }
1240
- selectPriceList(priceListId) {
1241
- this.quoteDraftService.updateActivePriceList(priceListId);
1242
- }
1243
- toggleCartOverlay(cart, event) {
1244
- event.stopPropagation();
1245
- if (!this.isReadonlyMode()) {
1246
- if (!cart.overlayPanel.overlayVisible) {
1247
- document.dispatchEvent(new Event('click'));
1248
- }
1249
- cart === null || cart === void 0 ? void 0 : cart.overlayPanel.toggle(event);
1250
- }
1251
- }
1252
- saveQuote$(stayOnPage = false) {
1253
- const quoteDraft = this.quoteDraftService.quoteDraftForActivePriceList;
1254
- if (!quoteDraft) {
1255
- return of(undefined);
1256
- }
1257
- this.isSaveInProgress$.next(true);
1258
- return this.quoteApiService.upsertQuote(quoteDraft).pipe(tap(({ quoteId }) => {
1259
- this.quoteDraftService.hasUnsavedChanges = false;
1260
- if (!stayOnPage) {
1261
- this.back(quoteId);
1262
- }
1263
- }), finalize(() => this.isSaveInProgress$.next(false)), map(noop), takeUntil(this.destroyed$));
1264
- }
1265
- queryName$(objectName, id) {
1266
- if (!id) {
1267
- return of('');
1268
- }
1269
- const searchRequest = {
1270
- count: 1,
1271
- rawCondition: `Id = '${id}'`,
1272
- fields: ['Name'],
1273
- };
1274
- 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$));
1275
- }
1276
- getObjectDetails$() {
1277
- return this.contextService.resolve$().pipe(distinctUntilChanged((prevCtx, currCtx) => prevCtx.properties.Id === currCtx.properties.Id), map(ctx => {
1278
- const isAccountMode = ctx.mode === ConfigurationContextMode.ACCOUNT;
1279
- const isQuoteMode = ctx.mode === ConfigurationContextMode.QUOTE;
1280
- return {
1281
- accountId: isAccountMode ? ctx.properties.Id : ctx.properties.AccountId,
1282
- opportunityId: ctx.properties.OpportunityId,
1283
- quoteId: isQuoteMode ? ctx.properties.Id : undefined,
1284
- quoteName: isQuoteMode ? ctx.properties.Name : undefined,
1285
- quoteNumber: isQuoteMode ? ctx.properties.QuoteNumber : undefined,
1286
- };
1287
- }), switchMap(details => combineLatest([
1288
- of(details),
1289
- this.queryName$('Account', details.accountId),
1290
- this.queryName$('Opportunity', details.opportunityId),
1291
- ])), map(([details, accountName, opportunityName]) => (Object.assign(Object.assign({}, details), { accountName, opportunityName }))));
1292
- }
1293
- formatMetric(value) {
1294
- return (value ? Number(value) : 0).toFixed(2);
1295
- }
1296
- getDraftItems$() {
1297
- return combineLatest([
1298
- this.flowConfiguration.get(),
1299
- this.integrationState.state$.pipe(map(state => state.modifiedAssets), distinctUntilChanged()),
1300
- ]).pipe(map(([lineItems, modifiedAssets]) => {
1301
- const currentTerms = lineItems.reduce((acc, li) => {
1302
- var _a;
1303
- const assetId = li.assetId || li.openOrderLineItemId;
1304
- const isModified = isLineItemModified(li);
1305
- const currentTerm = (_a = getOriginParent(lineItems, li)) !== null && _a !== void 0 ? _a : li;
1306
- if (isModified || (assetId && (modifiedAssets === null || modifiedAssets === void 0 ? void 0 : modifiedAssets[assetId]))) {
1307
- acc.push(currentTerm);
1308
- }
1309
- return acc;
1310
- }, []);
1311
- const uniqCurrentTerms = currentTerms.filter((value, index, array) => array.indexOf(value) === index);
1312
- return uniqCurrentTerms;
1313
- }));
1314
- }
1315
- getAssets$() {
1316
- return this.flowConfiguration
1317
- .get()
1318
- .pipe(map(lineItems => lineItems.filter(li => (!!li.assetId || !!li.openOrderLineItemId) && !li.rampInstanceId)));
1319
- }
1320
- generateProducts(lineItems) {
1321
- const date = new Date();
1322
- date.setHours(0, 0, 0, 0);
1323
- const now = date.getTime();
1324
- const termParentIds = lineItems.map(li => li.rampInstanceId).filter(Boolean);
1325
- const lineItemsRampInstanceIdMap = lineItems.reduce((acc, li) => {
1326
- var _a;
1327
- acc[(_a = li.rampInstanceId) !== null && _a !== void 0 ? _a : ''] = li;
1328
- return acc;
1329
- }, {});
1330
- return lineItems.reduce((result, li) => {
1331
- // find main term line item
1332
- if (li.rampInstanceId) {
1333
- return result;
1334
- }
1335
- // find current term line item
1336
- let target = li;
1337
- while (target && target.endDate && new Date(target.endDate).getTime() <= now) {
1338
- target = lineItemsRampInstanceIdMap[li.id];
1339
- }
1340
- if (target && target.productId) {
1341
- result.push({
1342
- id: target.id,
1343
- productId: target.productId,
1344
- name: target.name,
1345
- configurable: target.properties['#configurable'] === 'true',
1346
- deleted: target.actionCode === 'DELETE',
1347
- hasTerm: termParentIds.includes(target.id),
1348
- qty: target.qty,
1349
- mrr: this.formatMetric(target.properties.VDM_Total_MRR),
1350
- nrr: this.formatMetric(target.properties.VDM_Total_NRR),
1351
- });
1352
- }
1353
- return result;
1354
- }, []);
1355
- }
1356
- isReadonlyMode() {
1357
- var _a;
1358
- return (((_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.context.properties.mode) === ConfigurationContextMode.ACCOUNT &&
1359
- !this.quoteDraftService.hasProducts);
1360
- }
1361
- isUpsellQuoteWithoutChanges() {
1362
- const noUpdates = this.quoteDraftService.activeCurrentState.every(lineItem => lineItem.actionCode === 'EXIST');
1363
- const sameNumberOfProducts = this.quoteDraftService.getInitialCurrentState().length === this.quoteDraftService.activeCurrentState.length;
1364
- return noUpdates && sameNumberOfProducts;
1365
- }
1366
- }
1367
- FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
1368
- FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
1369
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderComponent, decorators: [{
1370
- type: Component,
1371
- 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"] }]
1372
- }], 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 }]; } });
1373
-
1374
- class MetricsModule {
1375
- }
1376
- MetricsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1377
- MetricsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, declarations: [MetricsComponent], imports: [CommonModule,
1378
- FormsModule,
1379
- ReactiveFormsModule,
1380
- DragDropModule,
1381
- ButtonModule,
1382
- OverlayPanelModule,
1383
- SidebarModule,
1384
- InputTextModule,
1385
- CheckboxModule,
1386
- LetDirectiveModule,
1387
- VirtualScrollerModule,
1388
- ErrorTooltipModule,
1389
- HiddenTextTooltipModule,
1390
- SdkPipesModule], exports: [MetricsComponent] });
1391
- MetricsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, imports: [CommonModule,
1392
- FormsModule,
1393
- ReactiveFormsModule,
1394
- DragDropModule,
1395
- ButtonModule,
1396
- OverlayPanelModule,
1397
- SidebarModule,
1398
- InputTextModule,
1399
- CheckboxModule,
1400
- LetDirectiveModule,
1401
- VirtualScrollerModule,
1402
- ErrorTooltipModule,
1403
- HiddenTextTooltipModule,
1404
- SdkPipesModule] });
1405
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, decorators: [{
1406
- type: NgModule,
1407
- args: [{
1408
- declarations: [MetricsComponent],
1409
- imports: [
1410
- CommonModule,
1411
- FormsModule,
1412
- ReactiveFormsModule,
1413
- DragDropModule,
1414
- ButtonModule,
1415
- OverlayPanelModule,
1416
- SidebarModule,
1417
- InputTextModule,
1418
- CheckboxModule,
1419
- LetDirectiveModule,
1420
- VirtualScrollerModule,
1421
- ErrorTooltipModule,
1422
- HiddenTextTooltipModule,
1423
- SdkPipesModule,
1424
- ],
1425
- exports: [MetricsComponent],
1426
- }]
1427
- }] });
1428
-
1429
- class FlowHeaderModule {
1430
- }
1431
- FlowHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1432
- FlowHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule,
1433
- OverlayPanelModule,
1434
- LetDirectiveModule,
1435
- TooltipModule,
1436
- ButtonModule,
1437
- CartPreviewModule,
1438
- SplitButtonModule,
1439
- MetricsModule,
1440
- SdkPipesModule], exports: [FlowHeaderComponent] });
1441
- FlowHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, imports: [CommonModule,
1442
- OverlayPanelModule,
1443
- LetDirectiveModule,
1444
- TooltipModule,
1445
- ButtonModule,
1446
- CartPreviewModule,
1447
- SplitButtonModule,
1448
- MetricsModule,
1449
- SdkPipesModule] });
1450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, decorators: [{
1451
- type: NgModule,
1452
- args: [{
1453
- declarations: [FlowHeaderComponent],
1454
- imports: [
1455
- CommonModule,
1456
- OverlayPanelModule,
1457
- LetDirectiveModule,
1458
- TooltipModule,
1459
- ButtonModule,
1460
- CartPreviewModule,
1461
- SplitButtonModule,
1462
- MetricsModule,
1463
- SdkPipesModule,
1464
- ],
1465
- exports: [FlowHeaderComponent],
1466
- }]
1467
- }] });
722
+ 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 });
723
+ FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
725
+ type: Injectable
726
+ }], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
1468
727
 
1469
728
  class FlowService {
1470
- constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService) {
729
+ constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService, flowDialogService) {
1471
730
  this.integrationState = integrationState;
1472
731
  this.flowRouterService = flowRouterService;
1473
732
  this.quoteDraftService = quoteDraftService;
1474
733
  this.configurationService = configurationService;
1475
734
  this.flowConfigurationService = flowConfigurationService;
735
+ this.flowDialogService = flowDialogService;
1476
736
  this.cleanup$ = new Subject();
1477
737
  }
738
+ cleanup() {
739
+ this.cleanup$.next();
740
+ }
1478
741
  initSubscriptions() {
1479
742
  this.integrationState
1480
743
  .listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
@@ -1499,10 +762,24 @@ class FlowService {
1499
762
  .listen$(FlowAction.FLOW_NAVIGATE_BACK)
1500
763
  .pipe(tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
1501
764
  .subscribe();
765
+ this.integrationState
766
+ .listen$(FlowAction.FLOW_NAVIGATE_TO)
767
+ .pipe(tap(payload => this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId)), takeUntil(this.cleanup$))
768
+ .subscribe();
769
+ this.integrationState
770
+ .listen$(FlowAction.OPEN_DIALOG)
771
+ .pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
772
+ .subscribe(dialogResult => {
773
+ this.integrationState.patchState({ dialogResult });
774
+ });
1502
775
  this.integrationState
1503
776
  .listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
1504
777
  .pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
1505
778
  .subscribe();
779
+ this.integrationState
780
+ .listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
781
+ .pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
782
+ .subscribe();
1506
783
  this.integrationState
1507
784
  .listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
1508
785
  .pipe(switchMap(() => {
@@ -1512,6 +789,7 @@ class FlowService {
1512
789
  return of(undefined);
1513
790
  }
1514
791
  const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
792
+ const assetId = lineItem.assetId || lineItem.openOrderLineItemId;
1515
793
  let updatedState;
1516
794
  if (isNewLineItem) {
1517
795
  updatedState = [...quoteDraft.currentState, lineItem];
@@ -1519,7 +797,15 @@ class FlowService {
1519
797
  else {
1520
798
  updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
1521
799
  }
1522
- return this.flowConfigurationService.calculate$(Object.assign(Object.assign({}, quoteDraft), { currentState: updatedState }));
800
+ return this.flowConfigurationService.calculate$(Object.assign(Object.assign({}, quoteDraft), { currentState: updatedState })).pipe(tap(() => {
801
+ var _a;
802
+ if (assetId) {
803
+ const modifiedAssets = (_a = this.integrationState.state.modifiedAssets) !== null && _a !== void 0 ? _a : {};
804
+ this.integrationState.patchState({
805
+ modifiedAssets: Object.assign(Object.assign({}, modifiedAssets), { [assetId]: true }),
806
+ });
807
+ }
808
+ }));
1523
809
  }), tap(() => {
1524
810
  this.configurationService.hasUnsavedChanges = false;
1525
811
  this.flowRouterService.navigateToShoppingCart();
@@ -1527,9 +813,6 @@ class FlowService {
1527
813
  .subscribe();
1528
814
  this.updateFlowPath();
1529
815
  }
1530
- cleanup() {
1531
- this.cleanup$.next();
1532
- }
1533
816
  updateFlowPath() {
1534
817
  this.flowRouterService
1535
818
  .getFlowSubpath$()
@@ -1537,38 +820,60 @@ class FlowService {
1537
820
  .subscribe(flowPath => this.integrationState.patchState({ flowPath }));
1538
821
  }
1539
822
  }
1540
- FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
1541
- FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowService });
1542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowService, decorators: [{
823
+ 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.FlowConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
824
+ FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
826
+ type: Injectable
827
+ }], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: i2.FlowConfigurationService }, { type: FlowDialogService }]; } });
828
+
829
+ class FlowGuidedSellingService {
830
+ constructor(integrationState) {
831
+ this.integrationState = integrationState;
832
+ this.cleanup$ = new Subject();
833
+ this.isVisibleSubj$ = new BehaviorSubject(false);
834
+ this.isVisible$ = this.isVisibleSubj$.asObservable();
835
+ this.initSubscriptions();
836
+ }
837
+ cleanup() {
838
+ this.cleanup$.next();
839
+ }
840
+ initSubscriptions() {
841
+ this.integrationState
842
+ .listen$(FlowAction.OPEN_GUIDED_SELLING)
843
+ .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
844
+ .subscribe();
845
+ this.integrationState
846
+ .listen$(FlowAction.CLOSE_GUIDED_SELLING)
847
+ .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
848
+ .subscribe();
849
+ }
850
+ }
851
+ FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
852
+ FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
1543
854
  type: Injectable
1544
- }], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationService }, { type: i1$1.FlowConfigurationService }]; } });
855
+ }], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
1545
856
 
1546
857
  class FlowComponent {
1547
- constructor(routerService, quoteDraftService, flowService, docGenService, integrationState) {
858
+ constructor(routerService, quoteDraftService, flowService, flowInfo, guidedSellingService) {
1548
859
  this.routerService = routerService;
1549
860
  this.quoteDraftService = quoteDraftService;
1550
861
  this.flowService = flowService;
1551
- this.docGenService = docGenService;
1552
- this.integrationState = integrationState;
862
+ this.flowInfo = flowInfo;
863
+ this.guidedSellingService = guidedSellingService;
1553
864
  this.isLoading$ = this.routerService.loading$;
1554
- this.showHeader$ = this.routerService.route$.pipe(map(route => route.data['showHeader'] && !this.quoteDraftService.isStandalone));
865
+ 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)));
1555
866
  this.isStandalone$ = this.quoteDraftService.isStandalone$;
867
+ this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
1556
868
  this.flowService.initSubscriptions();
1557
869
  }
1558
- ngOnInit() {
1559
- this.integrationState.clear();
1560
- }
1561
- ngOnDestroy() {
1562
- this.flowService.cleanup();
1563
- this.docGenService.cleanup();
1564
- }
1565
870
  }
1566
- FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i1$1.QuoteDraftService }, { token: FlowService }, { token: FlowDocGenService }, { token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
1567
- FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
1568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowComponent, decorators: [{
871
+ FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i2.QuoteDraftService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
872
+ 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 });
873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
1569
874
  type: Component,
1570
- 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"] }]
1571
- }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i1$1.QuoteDraftService }, { type: FlowService }, { type: FlowDocGenService }, { type: i5.IntegrationState }]; } });
875
+ 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"] }]
876
+ }], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
1572
877
 
1573
878
  const getFlowObjectIdPropertyName = (id) => {
1574
879
  const objectName = SalesforceIdUtils.getSfObjectNameById(id);
@@ -1583,10 +888,14 @@ const getFlowObjectIdPropertyName = (id) => {
1583
888
  }
1584
889
  };
1585
890
  const getDefaultProperties = (params) => {
1586
- var _a, _b, _c, _d;
891
+ var _a, _b;
1587
892
  const properties = {};
1588
- if (((_a = params.flowParams) === null || _a === void 0 ? void 0 : _a.entryPath.includes('/product')) || params.mode === ConfigurationContextMode.REMOTE) {
1589
- 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';
893
+ let standalone = (_a = params.flowParams) === null || _a === void 0 ? void 0 : _a.standalone;
894
+ if (((_b = params.flowParams) === null || _b === void 0 ? void 0 : _b.entryPath.includes('/product')) || params.mode === ConfigurationContextMode.REMOTE) {
895
+ standalone = standalone !== null && standalone !== void 0 ? standalone : true;
896
+ }
897
+ if (standalone != null) {
898
+ properties.standalone = standalone ? 'true' : 'false';
1590
899
  }
1591
900
  return properties;
1592
901
  };
@@ -1605,7 +914,7 @@ class ContextGuard {
1605
914
  const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
1606
915
  // Restrict if mode is not defined
1607
916
  if (mode == null) {
1608
- return this.handleError(route, 'Mode is undefined');
917
+ return this.routerService.showErrorPage$('Mode is undefined');
1609
918
  }
1610
919
  const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
1611
920
  // Allow if context is already initialized with the same headerId
@@ -1623,7 +932,7 @@ class ContextGuard {
1623
932
  this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
1624
933
  }), map(() => true), catchError(e => {
1625
934
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
1626
- return this.handleError(route, message);
935
+ return this.routerService.showErrorPage$(message);
1627
936
  }));
1628
937
  }
1629
938
  canActivate(route) {
@@ -1657,17 +966,39 @@ class ContextGuard {
1657
966
  }
1658
967
  return;
1659
968
  }
1660
- handleError(route, message) {
1661
- this.contextService.delete();
1662
- const parentUrl = this.routerService.getFlowRootPath(route);
1663
- return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
1664
- }
1665
969
  }
1666
- ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i1$1.ContextService }, { token: i1$1.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
1667
- ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextGuard });
1668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextGuard, decorators: [{
970
+ 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 });
971
+ ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard });
972
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, decorators: [{
1669
973
  type: Injectable
1670
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i1$1.ContextService }, { type: i1$1.RuntimeSettingsService }]; } });
974
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
975
+
976
+ const keepFlowInitialized = (route) => {
977
+ const contextService = inject(ContextService);
978
+ const flowState = inject(FlowStateService);
979
+ const flowInfoService = inject(FlowInfoService);
980
+ const routerService = inject(FlowRouterService);
981
+ const quoteDraft = inject(QuoteDraftService);
982
+ const configurationService = inject(ConfigurationService);
983
+ const integrationState = inject(IntegrationState);
984
+ const { flowId } = route.queryParams;
985
+ const flow = flowInfoService.flow;
986
+ if (flow && (flow === null || flow === void 0 ? void 0 : flow.id) === flowId) {
987
+ return true;
988
+ }
989
+ // Cleanup
990
+ flowState.cleanup();
991
+ quoteDraft.reset();
992
+ configurationService.reset();
993
+ integrationState.clear();
994
+ flowInfoService.cleanup();
995
+ contextService.delete();
996
+ if (!flowId) {
997
+ return true;
998
+ }
999
+ const params = Object.assign(Object.assign({}, route.queryParams), flow === null || flow === void 0 ? void 0 : flow.properties.queryParams);
1000
+ return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => routerService.showErrorPage$(e)));
1001
+ };
1671
1002
 
1672
1003
  class ProductUnloadGuard {
1673
1004
  constructor(router, contextService, quoteDraftService, configurationService, flowDialogService) {
@@ -1691,6 +1022,9 @@ class ProductUnloadGuard {
1691
1022
  }
1692
1023
  // clear obsolete queryParams
1693
1024
  const urlTree = this.router.parseUrl(nextState.url);
1025
+ if (!urlTree.queryParams['productId']) {
1026
+ return true;
1027
+ }
1694
1028
  delete urlTree.queryParams['productId'];
1695
1029
  // replace url after deactivation has finished
1696
1030
  setTimeout(() => this.router.navigateByUrl(urlTree.toString(), { replaceUrl: true }));
@@ -1700,33 +1034,36 @@ class ProductUnloadGuard {
1700
1034
  }));
1701
1035
  }
1702
1036
  }
1703
- ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
1704
- ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductUnloadGuard });
1705
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductUnloadGuard, decorators: [{
1037
+ 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 });
1038
+ ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
1039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
1706
1040
  type: Injectable
1707
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationService }, { type: FlowDialogService }]; } });
1041
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: FlowDialogService }]; } });
1708
1042
 
1709
1043
  class RootGuard {
1710
1044
  constructor(router, routerService) {
1711
1045
  this.router = router;
1712
1046
  this.routerService = routerService;
1713
1047
  this.initialized = false;
1714
- this.navToRestore = null;
1715
1048
  }
1716
1049
  canActivate(route) {
1717
- var _a;
1718
1050
  // We always need to initialize root component first, and only then start checking guards/resolvers
1719
1051
  if (!this.initialized) {
1720
1052
  this.initialized = true;
1721
- this.navToRestore = this.router.getCurrentNavigation();
1053
+ const navToRestore = this.router.getCurrentNavigation();
1722
1054
  const rootUrl = this.routerService.getFlowRootPath(route);
1723
- this.router.navigate([rootUrl], { replaceUrl: !((_a = this.navToRestore) === null || _a === void 0 ? void 0 : _a.previousNavigation) });
1724
- }
1725
- else if (this.navToRestore) {
1726
- const nav = this.navToRestore;
1727
- setTimeout(() => {
1728
- this.router.navigateByUrl(nav.extractedUrl, nav.extras);
1729
- this.navToRestore = null;
1055
+ this.router
1056
+ .navigate([rootUrl], {
1057
+ replaceUrl: !(navToRestore === null || navToRestore === void 0 ? void 0 : navToRestore.previousNavigation),
1058
+ skipLocationChange: true,
1059
+ })
1060
+ .then(success => {
1061
+ if (!success || !navToRestore) {
1062
+ return;
1063
+ }
1064
+ setTimeout(() => {
1065
+ this.router.navigateByUrl(navToRestore.extractedUrl, navToRestore.extras);
1066
+ });
1730
1067
  });
1731
1068
  }
1732
1069
  return true;
@@ -1736,26 +1073,26 @@ class RootGuard {
1736
1073
  return true;
1737
1074
  }
1738
1075
  }
1739
- RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RootGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
1740
- RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RootGuard, providedIn: 'root' });
1741
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RootGuard, decorators: [{
1076
+ RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
1077
+ RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, providedIn: 'root' });
1078
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, decorators: [{
1742
1079
  type: Injectable,
1743
1080
  args: [{ providedIn: 'root' }]
1744
1081
  }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
1745
1082
 
1746
1083
  class AssetsComponent {
1747
- constructor(templatesApi, contextService, cdr, toastService, customizationService) {
1748
- var _a;
1084
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1085
+ var _a, _b;
1749
1086
  this.templatesApi = templatesApi;
1750
- this.contextService = contextService;
1751
1087
  this.cdr = cdr;
1752
1088
  this.toastService = toastService;
1089
+ this.flowInfo = flowInfo;
1753
1090
  this.customizationService = customizationService;
1754
1091
  this.uiDefinition = undefined;
1755
1092
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1756
1093
  this.templateApiName = '';
1757
1094
  this.destroyed$ = new Subject();
1758
- this.templateApiName = (_a = this.contextService.resolve().properties['assetsTemplateApiName']) !== null && _a !== void 0 ? _a : '';
1095
+ this.templateApiName = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.assets) !== null && _b !== void 0 ? _b : '';
1759
1096
  }
1760
1097
  ngOnInit() {
1761
1098
  this.generateUIDefinition$()
@@ -1779,38 +1116,37 @@ class AssetsComponent {
1779
1116
  this.destroyed$.next();
1780
1117
  this.destroyed$.complete();
1781
1118
  }
1782
- getTemplateRootComponent$(template) {
1783
- return this.templatesApi
1784
- .fetchComponents$(template.id)
1785
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
1786
- }
1787
- getLocalAssetsComponentMeta$() {
1119
+ getLocalMeta$() {
1788
1120
  var _a, _b;
1789
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getAssetsComponent)) {
1121
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
1790
1122
  return of(undefined);
1791
1123
  }
1792
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getAssetsComponent(this.templateApiName).pipe(map(component => {
1793
- if (!component) {
1124
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
1125
+ if (!components) {
1794
1126
  return;
1795
1127
  }
1796
- return {
1128
+ return components.map(component => ({
1797
1129
  html: component.html,
1798
1130
  css: component.css,
1799
1131
  js: component.js,
1800
1132
  json: component.json,
1801
- };
1133
+ }));
1802
1134
  }));
1803
1135
  }
1804
- getAssetsComponentMeta$() {
1805
- 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)));
1136
+ getOrgMeta$() {
1137
+ const template = this.flowInfo.templates.SHOPPING_CART;
1138
+ if (!template) {
1139
+ return of(undefined);
1140
+ }
1141
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
1806
1142
  }
1807
1143
  generateUIDefinition$() {
1808
1144
  return of(undefined).pipe(tap(() => {
1809
1145
  if (!this.templateApiName) {
1810
- throw new Error("Flow Query parameter 'assetsTemplateApiName' is missing.");
1146
+ throw new Error("Flow 'assets' template is not defined.");
1811
1147
  }
1812
- }), switchMap(() => this.getLocalAssetsComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getAssetsComponentMeta$())), map(meta => {
1813
- if (!meta) {
1148
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1149
+ if (!metaList) {
1814
1150
  return;
1815
1151
  }
1816
1152
  const uiDef = {
@@ -1819,26 +1155,24 @@ class AssetsComponent {
1819
1155
  primary: true,
1820
1156
  type: 'DEFAULT',
1821
1157
  version: 2,
1822
- children: [
1823
- {
1824
- children: [],
1825
- template: meta.html && btoa(meta.html),
1826
- script: meta.js && btoa(meta.js),
1827
- styles: meta.css && btoa(meta.css),
1828
- },
1829
- ],
1158
+ children: metaList.map(meta => ({
1159
+ children: [],
1160
+ template: meta.html && btoaSafe(meta.html),
1161
+ script: meta.js && btoaSafe(meta.js),
1162
+ styles: meta.css && btoaSafe(meta.css),
1163
+ })),
1830
1164
  };
1831
1165
  return uiDef;
1832
1166
  }));
1833
1167
  }
1834
1168
  }
1835
- AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
1836
- AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
1837
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AssetsComponent, decorators: [{
1169
+ 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 });
1170
+ 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 });
1171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
1838
1172
  type: Component,
1839
1173
  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" }]
1840
1174
  }], ctorParameters: function () {
1841
- return [{ type: i2.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
1175
+ return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1842
1176
  type: Optional
1843
1177
  }, {
1844
1178
  type: Inject,
@@ -1848,10 +1182,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
1848
1182
 
1849
1183
  class AssetsModule {
1850
1184
  }
1851
- AssetsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AssetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1852
- AssetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: AssetsModule, declarations: [AssetsComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [AssetsComponent] });
1853
- AssetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AssetsModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1854
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AssetsModule, decorators: [{
1185
+ AssetsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1186
+ AssetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, declarations: [AssetsComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [AssetsComponent] });
1187
+ AssetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, decorators: [{
1855
1189
  type: NgModule,
1856
1190
  args: [{
1857
1191
  declarations: [AssetsComponent],
@@ -1861,18 +1195,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
1861
1195
  }] });
1862
1196
 
1863
1197
  class CatalogComponent {
1864
- constructor(templatesApi, contextService, cdr, toastService, customizationService) {
1865
- var _a;
1198
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1199
+ var _a, _b;
1866
1200
  this.templatesApi = templatesApi;
1867
- this.contextService = contextService;
1868
1201
  this.cdr = cdr;
1869
1202
  this.toastService = toastService;
1203
+ this.flowInfo = flowInfo;
1870
1204
  this.customizationService = customizationService;
1871
1205
  this.uiDefinition = undefined;
1872
1206
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
1873
1207
  this.templateApiName = '';
1874
1208
  this.destroyed$ = new Subject();
1875
- this.templateApiName = (_a = this.contextService.resolve().properties.catalogTemplateApiName) !== null && _a !== void 0 ? _a : '';
1209
+ this.templateApiName = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.catalog) !== null && _b !== void 0 ? _b : '';
1876
1210
  }
1877
1211
  ngOnInit() {
1878
1212
  this.generateUIDefinition$()
@@ -1896,38 +1230,37 @@ class CatalogComponent {
1896
1230
  this.destroyed$.next();
1897
1231
  this.destroyed$.complete();
1898
1232
  }
1899
- getTemplateRootComponent$(template) {
1900
- return this.templatesApi
1901
- .fetchComponents$(template.id)
1902
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
1903
- }
1904
- getLocalCatalogComponentMeta$() {
1233
+ getLocalMeta$() {
1905
1234
  var _a, _b;
1906
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getCatalogComponent)) {
1235
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
1907
1236
  return of(undefined);
1908
1237
  }
1909
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getCatalogComponent(this.templateApiName).pipe(map(component => {
1910
- if (!component) {
1238
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
1239
+ if (!components) {
1911
1240
  return;
1912
1241
  }
1913
- return {
1242
+ return components.map(component => ({
1914
1243
  html: component.html,
1915
1244
  css: component.css,
1916
1245
  js: component.js,
1917
1246
  json: component.json,
1918
- };
1247
+ }));
1919
1248
  }));
1920
1249
  }
1921
- getCatalogComponentMeta$() {
1922
- 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)));
1250
+ getOrgMeta$() {
1251
+ const template = this.flowInfo.templates.CATALOG;
1252
+ if (!template) {
1253
+ return of(undefined);
1254
+ }
1255
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
1923
1256
  }
1924
1257
  generateUIDefinition$() {
1925
1258
  return of(undefined).pipe(tap(() => {
1926
1259
  if (!this.templateApiName) {
1927
- throw new Error("Flow Query parameter 'catalogTemplateApiName' is missing.");
1260
+ throw new Error("Flow 'catalog' template is not defined.");
1928
1261
  }
1929
- }), switchMap(() => this.getLocalCatalogComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getCatalogComponentMeta$())), map(meta => {
1930
- if (!meta) {
1262
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1263
+ if (!metaList) {
1931
1264
  return;
1932
1265
  }
1933
1266
  const uiDef = {
@@ -1936,26 +1269,24 @@ class CatalogComponent {
1936
1269
  primary: true,
1937
1270
  type: 'DEFAULT',
1938
1271
  version: 2,
1939
- children: [
1940
- {
1941
- children: [],
1942
- template: meta.html && btoa(meta.html),
1943
- script: meta.js && btoa(meta.js),
1944
- styles: meta.css && btoa(meta.css),
1945
- },
1946
- ],
1272
+ children: metaList.map(meta => ({
1273
+ children: [],
1274
+ template: meta.html && btoaSafe(meta.html),
1275
+ script: meta.js && btoaSafe(meta.js),
1276
+ styles: meta.css && btoaSafe(meta.css),
1277
+ })),
1947
1278
  };
1948
1279
  return uiDef;
1949
1280
  }));
1950
1281
  }
1951
1282
  }
1952
- CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
1953
- CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
1954
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogComponent, decorators: [{
1283
+ 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 });
1284
+ 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 });
1285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
1955
1286
  type: Component,
1956
1287
  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" }]
1957
1288
  }], ctorParameters: function () {
1958
- return [{ type: i2.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
1289
+ return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
1959
1290
  type: Optional
1960
1291
  }, {
1961
1292
  type: Inject,
@@ -1965,10 +1296,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
1965
1296
 
1966
1297
  class CatalogModule {
1967
1298
  }
1968
- CatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1969
- CatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: CatalogModule, declarations: [CatalogComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [CatalogComponent] });
1970
- CatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1971
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogModule, decorators: [{
1299
+ CatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1300
+ CatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, declarations: [CatalogComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [CatalogComponent] });
1301
+ CatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, decorators: [{
1972
1303
  type: NgModule,
1973
1304
  args: [{
1974
1305
  declarations: [CatalogComponent],
@@ -1987,16 +1318,7 @@ class DebugComponent {
1987
1318
  this.form = new FormGroup({
1988
1319
  id: new FormControl(''),
1989
1320
  });
1990
- this.flows$ = this.flowsApiService.fetchFlows().pipe(map(flows => flows.map(flow => {
1991
- var _a, _b, _c;
1992
- 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 : {};
1993
- return {
1994
- id: flow.id,
1995
- entryPath: (_c = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _c === void 0 ? void 0 : _c.entryPath,
1996
- queryParams,
1997
- queryParamsStr: JSON.stringify(queryParams),
1998
- };
1999
- })), shareReplay());
1321
+ this.flows$ = this.flowsApiService.fetchFlows().pipe(shareReplay());
2000
1322
  }
2001
1323
  runFlow() {
2002
1324
  const { id } = this.form.value;
@@ -2008,29 +1330,32 @@ class DebugComponent {
2008
1330
  this.context.delete();
2009
1331
  this.quoteDraftService.reset();
2010
1332
  this.router.navigate(['..', 'flows'], {
2011
- queryParams: Object.assign({ flowId: this.selectedFlow.id, [objectPropertyName]: id }, this.selectedFlow.queryParams),
1333
+ queryParams: Object.assign({ flowId: this.selectedFlow.id, [objectPropertyName]: id }, this.selectedFlow.properties.queryParams),
2012
1334
  relativeTo: this.activatedRoute,
2013
1335
  });
2014
1336
  }
1337
+ getQueryParamsString(params) {
1338
+ return new HttpParams({ fromObject: params }).toString();
1339
+ }
2015
1340
  }
2016
- DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
2017
- DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
2018
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DebugComponent, decorators: [{
1341
+ 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 });
1342
+ 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 });
1343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
2019
1344
  type: Component,
2020
- 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"] }]
2021
- }], ctorParameters: function () { return [{ type: i2.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }]; } });
1345
+ 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"] }]
1346
+ }], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
2022
1347
 
2023
1348
  const routes$1 = [{ path: '', component: DebugComponent }];
2024
1349
  class DebugModule {
2025
1350
  }
2026
- DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2027
- DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
1351
+ DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1352
+ DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
2028
1353
  FormsModule,
2029
1354
  ReactiveFormsModule, i1$2.RouterModule, RadioButtonModule,
2030
1355
  ButtonModule,
2031
1356
  InputTextModule,
2032
1357
  DropdownModule] });
2033
- DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DebugModule, imports: [CommonModule,
1358
+ DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, imports: [CommonModule,
2034
1359
  FormsModule,
2035
1360
  ReactiveFormsModule,
2036
1361
  RouterModule.forChild(routes$1),
@@ -2038,7 +1363,7 @@ DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "1
2038
1363
  ButtonModule,
2039
1364
  InputTextModule,
2040
1365
  DropdownModule] });
2041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DebugModule, decorators: [{
1366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, decorators: [{
2042
1367
  type: NgModule,
2043
1368
  args: [{
2044
1369
  declarations: [DebugComponent],
@@ -2057,19 +1382,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2057
1382
 
2058
1383
  class EmptyAccountComponent {
2059
1384
  }
2060
- EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmptyAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2061
- EmptyAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
2062
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmptyAccountComponent, decorators: [{
1385
+ EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1386
+ 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 });
1387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, decorators: [{
2063
1388
  type: Component,
2064
1389
  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"] }]
2065
1390
  }] });
2066
1391
 
2067
1392
  class EmptyAccountModule {
2068
1393
  }
2069
- EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmptyAccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2070
- EmptyAccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: EmptyAccountModule, declarations: [EmptyAccountComponent], imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule], exports: [EmptyAccountComponent] });
2071
- EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmptyAccountModule, imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule] });
2072
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmptyAccountModule, decorators: [{
1394
+ EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1395
+ EmptyAccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, declarations: [EmptyAccountComponent], imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule], exports: [EmptyAccountComponent] });
1396
+ EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule] });
1397
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, decorators: [{
2073
1398
  type: NgModule,
2074
1399
  args: [{
2075
1400
  declarations: [EmptyAccountComponent],
@@ -2078,140 +1403,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2078
1403
  }]
2079
1404
  }] });
2080
1405
 
2081
- class LegacyProductComponent {
2082
- constructor(route, quoteDraftService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
2083
- this.route = route;
2084
- this.quoteDraftService = quoteDraftService;
2085
- this.quoteApiService = quoteApiService;
2086
- this.contextService = contextService;
2087
- this.runtimeContextService = runtimeContextService;
2088
- this.runtimeService = runtimeService;
2089
- this.currentStateService = currentStateService;
2090
- this.customizationService = customizationService;
2091
- this.destroyed$ = new Subject();
2092
- }
2093
- ngOnInit() {
2094
- this.quoteDraftService.quoteDraft$
2095
- .pipe(first$1(), takeUntil$1(this.destroyed$))
2096
- .subscribe(quote => this.init(quote, this.route.snapshot.queryParams));
2097
- this.runtimeService.onSolutionStopEvent.pipe(take(1)).subscribe(lineItem => this.onSolutionStop(lineItem));
2098
- this.runtimeService.onSolutionReadyEvent.pipe(take(1)).subscribe(event => this.onSolutionReady(event));
2099
- this.runtimeService.onSolutionCancelEvent.pipe(take(1)).subscribe(() => this.onSolutionCancel());
2100
- }
2101
- ngOnDestroy() {
2102
- this.destroyed$.next();
2103
- this.destroyed$.complete();
2104
- }
2105
- onSolutionReady(lineItem) {
2106
- var _a;
2107
- lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
2108
- }
2109
- onSolutionCancel() {
2110
- this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
2111
- window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
2112
- });
2113
- }
2114
- onSolutionUpdated(lineItem) {
2115
- const states = {
2116
- configurableRamp: lineItem,
2117
- currentState: this.currentStateService.currentState,
2118
- asset: this.getAsset(lineItem),
2119
- };
2120
- this.runtimeService.updateRuntime(states);
2121
- }
2122
- onSolutionStop(lineItem) {
2123
- this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
2124
- const quoteToUpsert = Object.assign(Object.assign({}, quote), { context: this.contextService.resolve(), currentState: [...(this.currentStateService.currentState || []).filter(li => li.id !== lineItem.id), lineItem] });
2125
- this.quoteApiService
2126
- .upsertQuote(quoteToUpsert)
2127
- .pipe(take(1))
2128
- .subscribe(quote => {
2129
- window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
2130
- });
2131
- });
2132
- }
2133
- init(quote, queryParams) {
2134
- const productId = queryParams['productId'];
2135
- const lineItemId = this.getLineItemId(quote, queryParams);
2136
- this.assets = quote.initialState;
2137
- lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
2138
- }
2139
- getLineItemId(quote, queryParams) {
2140
- if (EntityUtil.isPresent(queryParams['lineItemId'])) {
2141
- return queryParams['lineItemId'];
2142
- }
2143
- return quote.currentState
2144
- .filter(lineItem => lineItem.productId === queryParams['productId'])
2145
- .map(lineItem => lineItem.id)
2146
- .find(id => id);
2147
- }
2148
- configure(productId) {
2149
- const runtimeContext = this.getRuntimeContext(productId, '', RuntimeOperation.INIT);
2150
- this.startRuntime({}, runtimeContext);
2151
- }
2152
- reConfigure(lineItemId, currentState) {
2153
- const currentStateItem = EntityUtil.findById(lineItemId, currentState);
2154
- const runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, RuntimeOperation.UPDATE);
2155
- const states = {
2156
- configurableRamp: currentStateItem,
2157
- currentState,
2158
- asset: this.getAsset(currentStateItem),
2159
- };
2160
- this.currentStateService.update(currentState);
2161
- this.startRuntime(states, runtimeContext);
2162
- }
2163
- getAsset(lineItem) {
2164
- return this.assets && this.assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
2165
- }
2166
- startRuntime(states, runtimeContext$) {
2167
- runtimeContext$
2168
- .pipe(take(1), map$1(runtimeContext => {
2169
- this.runtimeService.startRuntime(runtimeContext, states);
2170
- }))
2171
- .subscribe();
2172
- }
2173
- customizeContext(productId, context) {
2174
- var _a;
2175
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getLegacyUiDefinition)) {
2176
- return of(context);
2177
- }
2178
- return this.customizationService.getLegacyUiDefinition(productId).pipe(map$1(uiDefinitionContainer => (Object.assign(Object.assign({}, context), { uiDefinitionContainer: uiDefinitionContainer !== null && uiDefinitionContainer !== void 0 ? uiDefinitionContainer : undefined }))));
2179
- }
2180
- getRuntimeContext(productId, offeringId, runtimeOperation) {
2181
- return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(map$1(runtimeContext => {
2182
- runtimeContext.invocationContext = { runtimeOperation: RuntimeOperation[runtimeOperation] };
2183
- return runtimeContext;
2184
- }), switchMap$1(runtimeContext => this.customizeContext(productId, runtimeContext)));
2185
- }
2186
- }
2187
- LegacyProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
2188
- LegacyProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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"] }] });
2189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductComponent, decorators: [{
2190
- type: Component,
2191
- args: [{ template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"] }]
2192
- }], ctorParameters: function () {
2193
- 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: [{
2194
- type: Optional
2195
- }, {
2196
- type: Inject,
2197
- args: [FLOW_CUSTOMIZATION]
2198
- }] }];
2199
- } });
2200
-
2201
- class LegacyProductModule {
2202
- }
2203
- LegacyProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2204
- LegacyProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [CommonModule, RuntimeModule], exports: [LegacyProductComponent] });
2205
- LegacyProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, imports: [CommonModule, RuntimeModule] });
2206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, decorators: [{
2207
- type: NgModule,
2208
- args: [{
2209
- declarations: [LegacyProductComponent],
2210
- imports: [CommonModule, RuntimeModule],
2211
- exports: [LegacyProductComponent],
2212
- }]
2213
- }] });
2214
-
2215
1406
  class ProductComponent {
2216
1407
  constructor(contextService, configurationRuntimeService, configurationService, configurationState, quoteDraftService, integrationState, customizationService) {
2217
1408
  this.contextService = contextService;
@@ -2255,7 +1446,7 @@ class ProductComponent {
2255
1446
  }), switchMap(() => this.customizeUI$()), tap(() => {
2256
1447
  var _a, _b;
2257
1448
  const uiDefinition = (_b = (_a = this.configurationRuntimeService.runtimeContext) === null || _a === void 0 ? void 0 : _a.uiDefinitionContainer) === null || _b === void 0 ? void 0 : _b.source;
2258
- if (uiDefinition && !isLegacyUIDefinition(uiDefinition)) {
1449
+ if (uiDefinition) {
2259
1450
  this.uiDefinition$.next(uiDefinition);
2260
1451
  }
2261
1452
  else {
@@ -2278,13 +1469,13 @@ class ProductComponent {
2278
1469
  return id;
2279
1470
  }
2280
1471
  }
2281
- ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
2282
- ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
2283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductComponent, decorators: [{
1472
+ 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.ConfigurationState }, { token: i2.QuoteDraftService }, { token: i2.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1473
+ 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 });
1474
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
2284
1475
  type: Component,
2285
1476
  args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n" }]
2286
1477
  }], ctorParameters: function () {
2287
- 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: [{
1478
+ return [{ type: i2.ContextService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationState }, { type: i2.QuoteDraftService }, { type: i2.IntegrationState }, { type: undefined, decorators: [{
2288
1479
  type: Optional
2289
1480
  }, {
2290
1481
  type: Inject,
@@ -2294,10 +1485,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2294
1485
 
2295
1486
  class ProductModule {
2296
1487
  }
2297
- ProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2298
- ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ProductModule, declarations: [ProductComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ProductComponent] });
2299
- ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModule, imports: [CommonModule, PreviewModule, LoaderModule] });
2300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModule, decorators: [{
1488
+ ProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1489
+ ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, declarations: [ProductComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ProductComponent] });
1490
+ ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, decorators: [{
2301
1492
  type: NgModule,
2302
1493
  args: [{
2303
1494
  declarations: [ProductComponent],
@@ -2319,9 +1510,9 @@ class RecordNotFoundComponent {
2319
1510
  }
2320
1511
  }
2321
1512
  }
2322
- RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
2323
- RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
2324
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
1513
+ 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 });
1514
+ 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 });
1515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
2325
1516
  type: Component,
2326
1517
  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"] }]
2327
1518
  }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
@@ -2329,10 +1520,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2329
1520
  const routes = [{ path: '', component: RecordNotFoundComponent }];
2330
1521
  class RecordNotFoundModule {
2331
1522
  }
2332
- RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2333
- RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
2334
- RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RecordNotFoundModule, imports: [CommonModule, RouterModule.forChild(routes)] });
2335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RecordNotFoundModule, decorators: [{
1523
+ RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1524
+ RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
1525
+ RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, imports: [CommonModule, RouterModule.forChild(routes)] });
1526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, decorators: [{
2336
1527
  type: NgModule,
2337
1528
  args: [{
2338
1529
  declarations: [RecordNotFoundComponent],
@@ -2385,13 +1576,12 @@ class RemoteComponent {
2385
1576
  this.runtimeService
2386
1577
  .init({ productId })
2387
1578
  .pipe(first(), tap(context => {
2388
- var _a, _b;
2389
- const uiDefinitionProperties = getUIDefinitionProperties(context.uiDefinitionContainer);
2390
- const uiDefinition = (_a = context.uiDefinitionContainer) === null || _a === void 0 ? void 0 : _a.source;
2391
- this.uiDefinition = uiDefinition && !isLegacyUIDefinition(uiDefinition) ? uiDefinition : undefined;
1579
+ var _a, _b, _c, _d;
1580
+ const uiDefinitionProperties = (_b = (_a = context.uiDefinitionContainer) === null || _a === void 0 ? void 0 : _a.source.properties) !== null && _b !== void 0 ? _b : {};
1581
+ this.uiDefinition = (_c = context.uiDefinitionContainer) === null || _c === void 0 ? void 0 : _c.source;
2392
1582
  const pricingEnabled = uiDefinitionProperties.pricingEnabled ? 'true' : 'false';
2393
1583
  const priceListId = uiDefinitionProperties.priceList;
2394
- const runtimeContextProperties = (_b = this.runtimeService.runtimeContext) === null || _b === void 0 ? void 0 : _b.properties;
1584
+ const runtimeContextProperties = (_d = this.runtimeService.runtimeContext) === null || _d === void 0 ? void 0 : _d.properties;
2395
1585
  if (runtimeContextProperties) {
2396
1586
  runtimeContextProperties.PriceListId = priceListId;
2397
1587
  runtimeContextProperties.PricingEnabled = pricingEnabled;
@@ -2669,19 +1859,19 @@ class RemoteComponent {
2669
1859
  return optionConfigurations;
2670
1860
  }
2671
1861
  }
2672
- RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
2673
- RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
2674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RemoteComponent, decorators: [{
1862
+ 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.ConfigurationState }, { token: i2$2.MessageService }, { token: i2.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
1863
+ 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 });
1864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, decorators: [{
2675
1865
  type: Component,
2676
1866
  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" }]
2677
- }], 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 }]; } });
1867
+ }], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationState }, { type: i2$2.MessageService }, { type: i2.IntegrationState }, { type: i4.Location }]; } });
2678
1868
 
2679
1869
  class RemoteModule {
2680
1870
  }
2681
- RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RemoteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2682
- RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: RemoteModule, declarations: [RemoteComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [RemoteComponent] });
2683
- RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RemoteModule, imports: [CommonModule, PreviewModule, LoaderModule] });
2684
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RemoteModule, decorators: [{
1871
+ RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1872
+ RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, declarations: [RemoteComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [RemoteComponent] });
1873
+ RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, decorators: [{
2685
1875
  type: NgModule,
2686
1876
  args: [{
2687
1877
  declarations: [RemoteComponent],
@@ -2691,18 +1881,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2691
1881
  }] });
2692
1882
 
2693
1883
  class ShoppingCartComponent {
2694
- constructor(templatesApi, contextService, cdr, toastService, customizationService) {
2695
- var _a;
1884
+ constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
1885
+ var _a, _b;
2696
1886
  this.templatesApi = templatesApi;
2697
- this.contextService = contextService;
2698
1887
  this.cdr = cdr;
2699
1888
  this.toastService = toastService;
1889
+ this.flowInfo = flowInfo;
2700
1890
  this.customizationService = customizationService;
2701
1891
  this.uiDefinition = undefined;
2702
1892
  this.state$ = new BehaviorSubject({ loading: true, failure: false });
2703
1893
  this.templateApiName = '';
2704
1894
  this.destroyed$ = new Subject();
2705
- this.templateApiName = (_a = this.contextService.resolve().properties.cartTemplateApiName) !== null && _a !== void 0 ? _a : '';
1895
+ this.templateApiName = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.shoppingCart) !== null && _b !== void 0 ? _b : '';
2706
1896
  }
2707
1897
  ngOnInit() {
2708
1898
  this.generateUIDefinition$()
@@ -2714,7 +1904,7 @@ class ShoppingCartComponent {
2714
1904
  this.state$.next({ loading: false, failure: false });
2715
1905
  }), catchError(err => {
2716
1906
  var _a;
2717
- const message = 'Failed to resolve Shopping cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
1907
+ const message = 'Failed to resolve Shopping Cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
2718
1908
  this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
2719
1909
  this.uiDefinition = undefined;
2720
1910
  this.state$.next({ loading: false, failure: true });
@@ -2726,38 +1916,37 @@ class ShoppingCartComponent {
2726
1916
  this.destroyed$.next();
2727
1917
  this.destroyed$.complete();
2728
1918
  }
2729
- getTemplateRootComponent$(template) {
2730
- return this.templatesApi
2731
- .fetchComponents$(template.id)
2732
- .pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
2733
- }
2734
- getLocalShoppingCartComponentMeta$() {
1919
+ getLocalMeta$() {
2735
1920
  var _a, _b;
2736
- if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getShoppingCartComponent)) {
1921
+ if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
2737
1922
  return of(undefined);
2738
1923
  }
2739
- return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getShoppingCartComponent(this.templateApiName).pipe(map(component => {
2740
- if (!component) {
1924
+ return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
1925
+ if (!components) {
2741
1926
  return;
2742
1927
  }
2743
- return {
1928
+ return components.map(component => ({
2744
1929
  html: component.html,
2745
1930
  css: component.css,
2746
1931
  js: component.js,
2747
1932
  json: component.json,
2748
- };
1933
+ }));
2749
1934
  }));
2750
1935
  }
2751
- getShoppingCartComponentMeta$() {
2752
- 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)));
1936
+ getOrgMeta$() {
1937
+ const template = this.flowInfo.templates.SHOPPING_CART;
1938
+ if (!template) {
1939
+ return of(undefined);
1940
+ }
1941
+ return this.templatesApi.fetchComponentsAttachments$(template.id);
2753
1942
  }
2754
1943
  generateUIDefinition$() {
2755
1944
  return of(undefined).pipe(tap(() => {
2756
1945
  if (!this.templateApiName) {
2757
- throw new Error("Flow Query parameter 'cartTemplateApiName' is missing.");
1946
+ throw new Error("Flow 'shoppingCart' template is not defined.");
2758
1947
  }
2759
- }), switchMap(() => this.getLocalShoppingCartComponentMeta$()), switchMap(meta => (meta ? of(meta) : this.getShoppingCartComponentMeta$())), map(meta => {
2760
- if (!meta) {
1948
+ }), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
1949
+ if (!metaList) {
2761
1950
  return;
2762
1951
  }
2763
1952
  const uiDef = {
@@ -2766,26 +1955,24 @@ class ShoppingCartComponent {
2766
1955
  primary: true,
2767
1956
  type: 'DEFAULT',
2768
1957
  version: 2,
2769
- children: [
2770
- {
2771
- children: [],
2772
- template: meta.html && btoa(meta.html),
2773
- script: meta.js && btoa(meta.js),
2774
- styles: meta.css && btoa(meta.css),
2775
- },
2776
- ],
1958
+ children: metaList.map(meta => ({
1959
+ children: [],
1960
+ template: meta.html && btoaSafe(meta.html),
1961
+ script: meta.js && btoaSafe(meta.js),
1962
+ styles: meta.css && btoaSafe(meta.css),
1963
+ })),
2777
1964
  };
2778
1965
  return uiDef;
2779
1966
  }));
2780
1967
  }
2781
1968
  }
2782
- ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
2783
- ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
2784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartComponent, decorators: [{
1969
+ 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 });
1970
+ 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 });
1971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
2785
1972
  type: Component,
2786
1973
  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" }]
2787
1974
  }], ctorParameters: function () {
2788
- return [{ type: i2.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
1975
+ return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
2789
1976
  type: Optional
2790
1977
  }, {
2791
1978
  type: Inject,
@@ -2795,10 +1982,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2795
1982
 
2796
1983
  class ShoppingCartModule {
2797
1984
  }
2798
- ShoppingCartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2799
- ShoppingCartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ShoppingCartComponent] });
2800
- ShoppingCartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartModule, imports: [CommonModule, PreviewModule, LoaderModule] });
2801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartModule, decorators: [{
1985
+ ShoppingCartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1986
+ ShoppingCartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ShoppingCartComponent] });
1987
+ ShoppingCartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, imports: [CommonModule, PreviewModule, LoaderModule] });
1988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, decorators: [{
2802
1989
  type: NgModule,
2803
1990
  args: [{
2804
1991
  declarations: [ShoppingCartComponent],
@@ -2808,135 +1995,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2808
1995
  }] });
2809
1996
 
2810
1997
  class FlowResolver {
2811
- constructor(router, flowsApiService, routerService, contextService) {
1998
+ constructor(router, routerService, contextService, flowInfo) {
2812
1999
  this.router = router;
2813
- this.flowsApiService = flowsApiService;
2814
2000
  this.routerService = routerService;
2815
2001
  this.contextService = contextService;
2816
- }
2817
- handleError(route, message, queryParams) {
2818
- const parentUrl = this.routerService.getFlowRootPath(route);
2819
- return this.router.navigate([parentUrl, '404'], {
2820
- queryParams,
2821
- state: {
2822
- message: message,
2823
- },
2824
- });
2002
+ this.flowInfo = flowInfo;
2825
2003
  }
2826
2004
  resolve(route) {
2827
2005
  const { queryParams } = route;
2828
- const { flowId } = queryParams;
2829
- if (!flowId) {
2830
- return this.handleError(route);
2831
- }
2832
- return this.flowsApiService.getFlow(flowId).pipe(map$1(flow => {
2833
- if (!flow) {
2834
- return this.handleError(route, `Flow with flowId=${flowId} is not defined`);
2835
- }
2836
- const { properties } = flow;
2837
- const { queryParams: flowQueryParams, entryPath } = properties;
2838
- const mergedParams = Object.assign(Object.assign(Object.assign({}, queryParams), flowQueryParams), getDefaultProperties({ flowParams: properties }));
2839
- const contextProperties = Object.entries(mergedParams).reduce((trunk, [key, value]) => (Object.assign(Object.assign({}, trunk), { [key]: String(value) })), {});
2840
- this.contextService.update({ properties: contextProperties });
2841
- const parentUrl = this.routerService.getFlowRootPath(route);
2842
- const entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
2843
- .split('/')
2844
- .filter(Boolean);
2845
- return this.router
2846
- .navigate([parentUrl, ...entryUrl], {
2847
- queryParams: mergedParams,
2848
- replaceUrl: true,
2849
- })
2850
- .catch(e => {
2851
- const message = e instanceof HttpErrorResponse ? e.error.message : e;
2852
- return this.handleError(route, message, mergedParams);
2853
- });
2006
+ const flow = this.flowInfo.flow;
2007
+ if (!flow) {
2008
+ return of(false);
2009
+ }
2010
+ const { properties } = flow;
2011
+ const { queryParams: flowQueryParams, entryPath } = properties;
2012
+ const mergedQueryParams = Object.assign(Object.assign({}, queryParams), flowQueryParams);
2013
+ const contextProperties = Object.entries(Object.assign(Object.assign({}, mergedQueryParams), getDefaultProperties({ flowParams: properties }))).reduce((trunk, [key, value]) => (Object.assign(Object.assign({}, trunk), { [key]: String(value) })), {});
2014
+ this.contextService.update({ properties: contextProperties });
2015
+ this.flowInfo.flow = flow;
2016
+ const parentUrl = this.routerService.getFlowRootPath(route);
2017
+ const entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
2018
+ .split('/')
2019
+ .filter(Boolean);
2020
+ return from(this.router.navigate([parentUrl, ...entryUrl], {
2021
+ queryParams: mergedQueryParams,
2022
+ replaceUrl: true,
2023
+ })).pipe(catchError$1(e => {
2024
+ const message = e instanceof HttpErrorResponse ? e.error.message : e;
2025
+ return this.routerService.showErrorPage$(message);
2854
2026
  }));
2855
2027
  }
2856
2028
  }
2857
- FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: i2.FlowsApiService }, { token: FlowRouterService }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
2858
- FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowResolver });
2859
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowResolver, decorators: [{
2029
+ 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 });
2030
+ FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
2031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
2860
2032
  type: Injectable
2861
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.FlowsApiService }, { type: FlowRouterService }, { type: i1$1.ContextService }]; } });
2033
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }]; } });
2862
2034
 
2863
2035
  class QuoteResolver {
2864
- constructor(router, quoteDraftService, routerService, contextService, flowConfiguration, integrationState) {
2036
+ constructor(router, quoteDraftService, routerService, contextService, flowInfo, flowStateService) {
2865
2037
  this.router = router;
2866
2038
  this.quoteDraftService = quoteDraftService;
2867
2039
  this.routerService = routerService;
2868
2040
  this.contextService = contextService;
2869
- this.flowConfiguration = flowConfiguration;
2870
- this.integrationState = integrationState;
2871
- }
2872
- handleError(route, message) {
2873
- const parentUrl = this.routerService.getFlowRootPath(route);
2874
- return from(this.router.navigate([parentUrl, '404'], { state: { message } }));
2875
- }
2876
- calculate$() {
2877
- const quoteDraft = this.quoteDraftService.quoteDraft;
2878
- if (!this.quoteDraftService.isStandalone && quoteDraft && !this.accountHasNotAssets()) {
2879
- return this.flowConfiguration.calculate$(quoteDraft);
2880
- }
2881
- return of(undefined);
2041
+ this.flowInfo = flowInfo;
2042
+ this.flowStateService = flowStateService;
2882
2043
  }
2883
2044
  resolve(route) {
2884
- const { headerId } = this.contextService.resolve();
2885
- const quote = this.quoteDraftService.quoteDraft;
2886
- if (quote && quote.quoteId === headerId) {
2045
+ const flow = this.flowInfo.flow;
2046
+ if (!flow) {
2047
+ return of(false);
2048
+ }
2049
+ if (this.flowStateService.isInitialized()) {
2887
2050
  return of(true);
2888
2051
  }
2889
- const queryParams = route.queryParams;
2890
- return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.calculate$()), tap(() => {
2891
- if (!this.quoteDraftService.isStandalone && queryParams.suppressInitialNavigation !== 'true') {
2892
- if (this.shouldNavigateToAssets()) {
2893
- this.changeNavigation('/assets', route);
2894
- }
2895
- else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.hasProducts) {
2896
- this.changeNavigation('/cart', route);
2897
- }
2898
- }
2899
- this.initializeModifiedAssetsMap();
2900
- this.quoteDraftService.isInitialized = true;
2901
- this.quoteDraftService.hasUnsavedChanges = false;
2902
- }), catchError(e => {
2052
+ return this.flowStateService.init$().pipe(switchMap(() => this.checkDynamicNavigation$(route)), catchError(e => {
2903
2053
  const message = e instanceof HttpErrorResponse ? e.error.message : e;
2904
- return this.handleError(route, message);
2054
+ return this.routerService.showErrorPage$(message);
2905
2055
  }));
2906
2056
  }
2907
- changeNavigation(path, route) {
2908
- const parentUrl = this.routerService.getFlowRootPath(route);
2909
- this.router
2910
- .navigate([parentUrl + path], {
2911
- queryParams: route.queryParams,
2912
- replaceUrl: true,
2913
- })
2914
- .catch(e => {
2915
- const message = e instanceof HttpErrorResponse ? e.error.message : e;
2916
- return this.handleError(route, message);
2917
- });
2918
- }
2919
- shouldNavigateToAssets() {
2920
- var _a, _b;
2921
- if (this.contextService.mode === ConfigurationContextMode.ACCOUNT) {
2922
- return true;
2057
+ checkDynamicNavigation$(route) {
2058
+ const flow = this.flowInfo.flow;
2059
+ if (!flow) {
2060
+ return of(true);
2923
2061
  }
2924
- return (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState.some(li => !!li.assetId)) !== null && _b !== void 0 ? _b : false;
2925
- }
2926
- accountHasNotAssets() {
2927
- return this.contextService.mode === ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasProducts;
2928
- }
2929
- initializeModifiedAssetsMap() {
2930
- this.integrationState.patchState({
2931
- modifiedAssets: generateModifiedAssetsMap(this.quoteDraftService.currentState),
2932
- });
2062
+ if (flow.properties.suppressInitialNavigation || flow.properties.standalone) {
2063
+ return of(true);
2064
+ }
2065
+ let navigateTo;
2066
+ const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
2067
+ if (isAccountMode && this.quoteDraftService.hasAssets) {
2068
+ navigateTo = '/assets';
2069
+ }
2070
+ else if (this.quoteDraftService.hasProducts) {
2071
+ navigateTo = '/cart';
2072
+ }
2073
+ if (navigateTo) {
2074
+ const parentUrl = this.routerService.getFlowRootPath(route);
2075
+ return from(this.router.navigate([parentUrl + navigateTo], {
2076
+ queryParams: route.queryParams,
2077
+ replaceUrl: true,
2078
+ }));
2079
+ }
2080
+ return of(true);
2933
2081
  }
2934
2082
  }
2935
- QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", 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 });
2936
- QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteResolver });
2937
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteResolver, decorators: [{
2083
+ 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 });
2084
+ QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver });
2085
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, decorators: [{
2938
2086
  type: Injectable
2939
- }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$1.QuoteDraftService }, { type: FlowRouterService }, { type: i1$1.ContextService }, { type: i1$1.FlowConfigurationService }, { type: i5.IntegrationState }]; } });
2087
+ }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.QuoteDraftService }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
2940
2088
 
2941
2089
  const rootRoute = {
2942
2090
  id: VELOCE_FLOW_ROOT_ROUTE,
@@ -2946,107 +2094,99 @@ const rootRoute = {
2946
2094
  canDeactivate: [RootGuard],
2947
2095
  children: [
2948
2096
  {
2949
- path: 'flows',
2950
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2951
- resolve: { quote: FlowResolver },
2952
- canActivate: [ContextGuard],
2953
- children: [],
2954
- },
2955
- {
2956
- path: 'legacy',
2097
+ path: '',
2098
+ canActivate: [keepFlowInitialized],
2099
+ runGuardsAndResolvers: 'always',
2957
2100
  children: [
2101
+ {
2102
+ path: 'flows',
2103
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2104
+ resolve: { flow: FlowResolver },
2105
+ canActivate: [ContextGuard],
2106
+ children: [],
2107
+ },
2958
2108
  {
2959
2109
  path: 'product',
2960
- component: LegacyProductComponent,
2110
+ component: ProductComponent,
2111
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2112
+ resolve: { quote: QuoteResolver },
2113
+ canActivate: [ContextGuard],
2114
+ canDeactivate: [ProductUnloadGuard],
2115
+ data: { showHeader: true },
2116
+ },
2117
+ {
2118
+ path: 'cart',
2119
+ component: ShoppingCartComponent,
2120
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2121
+ resolve: { quote: QuoteResolver },
2122
+ canActivate: [ContextGuard],
2123
+ data: { showHeader: true },
2124
+ },
2125
+ {
2126
+ path: 'catalog',
2127
+ component: CatalogComponent,
2128
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2129
+ resolve: { quote: QuoteResolver },
2130
+ canActivate: [ContextGuard],
2131
+ data: { showHeader: true },
2132
+ },
2133
+ {
2134
+ path: 'assets',
2135
+ component: AssetsComponent,
2136
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2137
+ resolve: { quote: QuoteResolver },
2138
+ canActivate: [ContextGuard],
2139
+ data: { showHeader: true },
2140
+ },
2141
+ {
2142
+ path: 'empty',
2143
+ component: EmptyAccountComponent,
2144
+ runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2145
+ resolve: { quote: QuoteResolver },
2146
+ canActivate: [ContextGuard],
2147
+ data: { showHeader: true },
2148
+ },
2149
+ {
2150
+ path: 'remote',
2151
+ component: RemoteComponent,
2961
2152
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2962
2153
  resolve: { quote: QuoteResolver },
2963
2154
  canActivate: [ContextGuard],
2964
2155
  },
2156
+ {
2157
+ path: 'debug',
2158
+ loadChildren: () => DebugModule,
2159
+ },
2160
+ {
2161
+ path: '404',
2162
+ loadChildren: () => RecordNotFoundModule,
2163
+ },
2965
2164
  ],
2966
2165
  },
2967
- {
2968
- path: 'product',
2969
- component: ProductComponent,
2970
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2971
- resolve: { quote: QuoteResolver },
2972
- canActivate: [ContextGuard],
2973
- canDeactivate: [ProductUnloadGuard],
2974
- data: { showHeader: true },
2975
- },
2976
- {
2977
- path: 'cart',
2978
- component: ShoppingCartComponent,
2979
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2980
- resolve: { quote: QuoteResolver },
2981
- canActivate: [ContextGuard],
2982
- data: { showHeader: true },
2983
- },
2984
- {
2985
- path: 'catalog',
2986
- component: CatalogComponent,
2987
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2988
- resolve: { quote: QuoteResolver },
2989
- canActivate: [ContextGuard],
2990
- data: { showHeader: true },
2991
- },
2992
- {
2993
- path: 'assets',
2994
- component: AssetsComponent,
2995
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
2996
- resolve: { quote: QuoteResolver },
2997
- canActivate: [ContextGuard],
2998
- data: { showHeader: true },
2999
- },
3000
- {
3001
- path: 'empty',
3002
- component: EmptyAccountComponent,
3003
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
3004
- resolve: { quote: QuoteResolver },
3005
- canActivate: [ContextGuard],
3006
- data: { showHeader: true },
3007
- },
3008
- {
3009
- path: 'remote',
3010
- component: RemoteComponent,
3011
- runGuardsAndResolvers: 'paramsOrQueryParamsChange',
3012
- resolve: { quote: QuoteResolver },
3013
- canActivate: [ContextGuard],
3014
- },
3015
- {
3016
- path: 'debug',
3017
- loadChildren: () => DebugModule,
3018
- },
3019
- {
3020
- path: '404',
3021
- loadChildren: () => RecordNotFoundModule,
3022
- },
3023
2166
  ],
3024
2167
  };
3025
2168
  class FlowRoutingModule {
3026
2169
  }
3027
- FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3028
- FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
3029
- LegacyProductModule,
2170
+ FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2171
+ FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
3030
2172
  ShoppingCartModule,
3031
2173
  CatalogModule,
3032
2174
  AssetsModule,
3033
2175
  RemoteModule,
3034
2176
  EmptyAccountModule], exports: [RouterModule] });
3035
- FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [RouterModule.forChild([rootRoute]),
2177
+ 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]),
3036
2178
  ProductModule,
3037
- LegacyProductModule,
3038
2179
  ShoppingCartModule,
3039
2180
  CatalogModule,
3040
2181
  AssetsModule,
3041
2182
  RemoteModule,
3042
2183
  EmptyAccountModule, RouterModule] });
3043
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRoutingModule, decorators: [{
2184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, decorators: [{
3044
2185
  type: NgModule,
3045
2186
  args: [{
3046
2187
  imports: [
3047
2188
  RouterModule.forChild([rootRoute]),
3048
2189
  ProductModule,
3049
- LegacyProductModule,
3050
2190
  ShoppingCartModule,
3051
2191
  CatalogModule,
3052
2192
  AssetsModule,
@@ -3058,32 +2198,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
3058
2198
  }]
3059
2199
  }] });
3060
2200
 
2201
+ class FlowDocGenService {
2202
+ constructor(integrationState) {
2203
+ this.integrationState = integrationState;
2204
+ this.cleanup$ = new Subject();
2205
+ this.isVisibleSubj$ = new BehaviorSubject(false);
2206
+ this.isVisible$ = this.isVisibleSubj$.asObservable();
2207
+ this.initSubscriptions();
2208
+ }
2209
+ cleanup() {
2210
+ this.cleanup$.next();
2211
+ }
2212
+ initSubscriptions() {
2213
+ this.integrationState
2214
+ .listen$(FlowAction.FLOW_OPEN_DOC_GEN)
2215
+ .pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
2216
+ .subscribe();
2217
+ this.integrationState
2218
+ .listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
2219
+ .pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
2220
+ .subscribe();
2221
+ }
2222
+ }
2223
+ FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
2224
+ FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
2225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
2226
+ type: Injectable
2227
+ }], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
2228
+
2229
+ const configurePrimengShadowDOM = () => {
2230
+ DomHandler.getScrollableParents = (element) => {
2231
+ const scrollableParents = [];
2232
+ if (element) {
2233
+ const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
2234
+ const overflowRegex = /(auto|scroll)/;
2235
+ const overflowCheck = (node) => {
2236
+ const styleDeclaration = window['getComputedStyle'](node, null);
2237
+ return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
2238
+ overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
2239
+ overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
2240
+ };
2241
+ for (const parent of parents) {
2242
+ const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
2243
+ if (scrollSelectors) {
2244
+ const selectors = scrollSelectors.split(',');
2245
+ for (const selector of selectors) {
2246
+ const el = DomHandler.findSingle(parent, selector);
2247
+ if (el && overflowCheck(el)) {
2248
+ scrollableParents.push(el);
2249
+ }
2250
+ }
2251
+ }
2252
+ if (parent.nodeType !== 9 && overflowCheck(parent)) {
2253
+ scrollableParents.push(parent);
2254
+ }
2255
+ }
2256
+ }
2257
+ return scrollableParents;
2258
+ };
2259
+ };
2260
+
2261
+ configurePrimengShadowDOM();
3061
2262
  class FlowModule {
3062
2263
  }
3063
- FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3064
- FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowModule, declarations: [FlowComponent], imports: [CommonModule,
2264
+ FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2265
+ FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, declarations: [FlowComponent], imports: [CommonModule,
3065
2266
  LetDirectiveModule,
3066
2267
  FlowRoutingModule,
3067
2268
  ApiModule,
3068
2269
  LauncherModule,
3069
2270
  LoaderModule,
3070
- FlowHeaderModule,
2271
+ FlowNewHeaderModule,
3071
2272
  FlowDialogModule,
3072
2273
  SdkCoreModule,
3073
2274
  DocGenModule,
3074
2275
  GuidedSellingModule] });
3075
- FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowDocGenService, FlowGuidedSellingService], imports: [CommonModule,
2276
+ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowDocGenService, FlowGuidedSellingService], imports: [CommonModule,
3076
2277
  LetDirectiveModule,
3077
2278
  FlowRoutingModule,
3078
2279
  ApiModule,
3079
2280
  LauncherModule,
3080
2281
  LoaderModule,
3081
- FlowHeaderModule,
2282
+ FlowNewHeaderModule,
3082
2283
  FlowDialogModule,
3083
2284
  SdkCoreModule,
3084
2285
  DocGenModule,
3085
2286
  GuidedSellingModule] });
3086
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowModule, decorators: [{
2287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, decorators: [{
3087
2288
  type: NgModule,
3088
2289
  args: [{
3089
2290
  declarations: [FlowComponent],
@@ -3094,7 +2295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
3094
2295
  ApiModule,
3095
2296
  LauncherModule,
3096
2297
  LoaderModule,
3097
- FlowHeaderModule,
2298
+ FlowNewHeaderModule,
3098
2299
  FlowDialogModule,
3099
2300
  SdkCoreModule,
3100
2301
  DocGenModule,
@@ -3108,5 +2309,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
3108
2309
  * Generated bundle index. Do not edit.
3109
2310
  */
3110
2311
 
3111
- export { ContextGuard, FLOW_CUSTOMIZATION, FlowModule, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
2312
+ export { ContextGuard, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
3112
2313
  //# sourceMappingURL=veloceapps-sdk.mjs.map