@veloceapps/sdk 7.0.0-9 → 7.0.1-0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (436) hide show
  1. package/cms/README.md +45 -0
  2. package/cms/cms.actions.d.ts +10 -0
  3. package/cms/components/element-children/element-children.component.d.ts +1 -1
  4. package/cms/components/element-drop-handle/element-drop-handle.component.d.ts +1 -1
  5. package/cms/components/element-renderer/element-renderer.component.d.ts +1 -1
  6. package/cms/components/plugin.component.d.ts +2 -2
  7. package/cms/components/preview/preview.component.d.ts +4 -3
  8. package/cms/directives/custom-template.directive.d.ts +1 -1
  9. package/cms/modules/federated/federated-host.directive.d.ts +8 -0
  10. package/cms/modules/federated/federated.component.d.ts +5 -7
  11. package/cms/modules/federated/federated.module.d.ts +4 -3
  12. package/cms/modules/federated/federated.types.d.ts +1 -5
  13. package/cms/modules/migrations/types/migrations.types.d.ts +1 -1
  14. package/cms/plugins/configuration.plugin.d.ts +1 -1
  15. package/cms/plugins/io.plugin.d.ts +1 -1
  16. package/cms/plugins/region.plugin.d.ts +1 -1
  17. package/cms/plugins/script.plugin.d.ts +1 -1
  18. package/cms/services/templates.service.d.ts +1 -1
  19. package/cms/types/common.types.d.ts +2 -2
  20. package/cms/types/elements.types.d.ts +1 -1
  21. package/cms/types/integration.types.d.ts +1 -1
  22. package/cms/types/layouts.types.d.ts +1 -1
  23. package/cms/utils/element.utils.d.ts +2 -2
  24. package/cms/vendor-map.d.ts +2 -1
  25. package/core/README.md +5 -0
  26. package/core/modules/flow-configuration/types/update.types.d.ts +2 -2
  27. package/core/services/metric-calculation/metric-calculation.types.d.ts +1 -1
  28. package/core/types/ui-definition.types.d.ts +2 -2
  29. package/esm2020/cms/cms.actions.mjs +56 -0
  30. package/esm2020/cms/components/element-children/element-children.component.mjs +35 -0
  31. package/esm2020/cms/components/element-children/element-children.module.mjs +20 -0
  32. package/esm2020/cms/components/element-drop-handle/element-drop-handle.component.mjs +28 -0
  33. package/esm2020/cms/components/element-drop-handle/element-drop-handle.module.mjs +19 -0
  34. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +160 -0
  35. package/{esm2015/cms/components/element-renderer/element-renderer.module.js → esm2020/cms/components/element-renderer/element-renderer.module.mjs} +5 -5
  36. package/esm2020/cms/components/element.component.mjs +45 -0
  37. package/esm2020/cms/components/plugin.component.mjs +17 -0
  38. package/esm2020/cms/components/preview/preview.component.mjs +103 -0
  39. package/esm2020/cms/components/preview/preview.module.mjs +24 -0
  40. package/esm2020/cms/directives/custom-template.directive.mjs +26 -0
  41. package/esm2020/cms/engine/models/entity.mjs +17 -0
  42. package/esm2020/cms/launcher.module.mjs +24 -0
  43. package/esm2020/cms/modules/federated/federated-host.directive.mjs +16 -0
  44. package/esm2020/cms/modules/federated/federated.component.mjs +64 -0
  45. package/esm2020/cms/modules/federated/federated.module.mjs +20 -0
  46. package/esm2020/cms/modules/federated/federated.types.mjs +2 -0
  47. package/esm2020/cms/modules/migrations/migrations.mjs +15 -0
  48. package/{esm2015/cms/modules/migrations/migrations.module.js → esm2020/cms/modules/migrations/migrations.module.mjs} +5 -5
  49. package/esm2020/cms/modules/migrations/services/migrations.service.mjs +43 -0
  50. package/{esm2015/cms/modules/runtime/runtime.module.js → esm2020/cms/modules/runtime/runtime.module.mjs} +6 -6
  51. package/esm2020/cms/modules/runtime/services/compilation.service.mjs +83 -0
  52. package/esm2020/cms/modules/runtime/services/runtime-editor.service.mjs +28 -0
  53. package/esm2020/cms/modules/runtime/services/runtime.service.mjs +74 -0
  54. package/esm2020/cms/plugins/configuration.plugin.mjs +105 -0
  55. package/esm2020/cms/plugins/io.plugin.mjs +36 -0
  56. package/esm2020/cms/plugins/region.plugin.mjs +58 -0
  57. package/esm2020/cms/plugins/script.plugin.mjs +65 -0
  58. package/{esm2015/cms/services/element-context.service.js → esm2020/cms/services/element-context.service.mjs} +4 -4
  59. package/esm2020/cms/services/integration.state.mjs +40 -0
  60. package/esm2020/cms/services/io-provider.service.mjs +50 -0
  61. package/esm2020/cms/services/resources.service.mjs +49 -0
  62. package/{esm2015/cms/services/templates.service.js → esm2020/cms/services/templates.service.mjs} +4 -4
  63. package/esm2020/cms/utils/element.utils.mjs +160 -0
  64. package/esm2020/cms/utils/elements-resolver.mjs +189 -0
  65. package/esm2020/cms/utils/path.utils.mjs +53 -0
  66. package/esm2020/cms/utils/ui-definition.utils.mjs +87 -0
  67. package/esm2020/cms/vendor-map.mjs +67 -0
  68. package/esm2020/core/core.module.mjs +18 -0
  69. package/{esm2015/core/modules/configuration/configuration.module.js → esm2020/core/modules/configuration/configuration.module.mjs} +6 -6
  70. package/esm2020/core/modules/configuration/helpers.mjs +18 -0
  71. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +106 -0
  72. package/esm2020/core/modules/configuration/services/configuration.service.mjs +183 -0
  73. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +50 -0
  74. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +18 -0
  75. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +150 -0
  76. package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +129 -0
  77. package/esm2020/core/services/context.service.mjs +64 -0
  78. package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +85 -0
  79. package/esm2020/core/services/product-images.service.mjs +31 -0
  80. package/esm2020/core/services/quote-draft.service.mjs +232 -0
  81. package/esm2020/core/utils/line-item.utils.mjs +161 -0
  82. package/esm2020/core/utils/line-item.worker.mjs +19 -0
  83. package/esm2020/runtime/components/component-preview/component-preview.component.mjs +125 -0
  84. package/esm2020/runtime/components/section-renderer/section-renderer.component.mjs +67 -0
  85. package/esm2020/runtime/components/ui-runtime/runtime.component.mjs +440 -0
  86. package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +108 -0
  87. package/esm2020/runtime/execution/components/children-placeholder/children-placeholder.component.mjs +60 -0
  88. package/esm2020/runtime/execution/components/context-provider/context-provider.component.mjs +39 -0
  89. package/esm2020/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.mjs +67 -0
  90. package/esm2020/runtime/execution/components/federated/federated.component.mjs +74 -0
  91. package/esm2020/runtime/execution/components/velo-attribute/velo-attribute.component.mjs +60 -0
  92. package/esm2020/runtime/execution/components/velo-multiselect/velo-multiselect.component.mjs +130 -0
  93. package/esm2020/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.mjs +72 -0
  94. package/esm2020/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.mjs +97 -0
  95. package/esm2020/runtime/execution/components/velo-port-radio/velo-port-radio.component.mjs +142 -0
  96. package/esm2020/runtime/execution/components/velo-type/velo-type.component.mjs +119 -0
  97. package/esm2020/runtime/execution/directives/section-script.directive.mjs +247 -0
  98. package/esm2020/runtime/execution/directives/sf-query.directive.mjs +35 -0
  99. package/esm2020/runtime/execution/directives/velo-attribute.directive.mjs +88 -0
  100. package/esm2020/runtime/execution/directives/velo-port.directive.mjs +376 -0
  101. package/esm2020/runtime/execution/directives/vl-approval.directive.mjs +23 -0
  102. package/esm2020/runtime/execution/directives/vl-document-attachments.directive.mjs +36 -0
  103. package/esm2020/runtime/execution/directives/vl-document-templates.directive.mjs +60 -0
  104. package/esm2020/runtime/execution/directives/vl-quote.directive.mjs +42 -0
  105. package/esm2020/runtime/execution/directives/vl-ramp.directive.mjs +55 -0
  106. package/esm2020/runtime/execution/runtime-execution.module.mjs +133 -0
  107. package/esm2020/runtime/execution/utils/federated.util.mjs +32 -0
  108. package/esm2020/runtime/runtime.module.mjs +74 -0
  109. package/esm2020/runtime/services/cart.service.mjs +29 -0
  110. package/{esm2015/runtime/services/collapsible-state.service.js → esm2020/runtime/services/collapsible-state.service.mjs} +4 -4
  111. package/esm2020/runtime/services/configuration.service.mjs +119 -0
  112. package/{esm2015/runtime/services/current-state.service.js → esm2020/runtime/services/current-state.service.mjs} +4 -4
  113. package/{esm2015/runtime/services/form-scope.service.js → esm2020/runtime/services/form-scope.service.mjs} +4 -4
  114. package/esm2020/runtime/services/product-model-cache.service.mjs +31 -0
  115. package/esm2020/runtime/services/runtime-context.service.mjs +57 -0
  116. package/esm2020/runtime/services/runtime-form.service.mjs +219 -0
  117. package/esm2020/runtime/services/runtime.service.mjs +115 -0
  118. package/{esm2015/runtime/services/section-helper.service.js → esm2020/runtime/services/section-helper.service.mjs} +4 -4
  119. package/{esm2015/runtime/services/section-scope.service.js → esm2020/runtime/services/section-scope.service.mjs} +4 -4
  120. package/{esm2015/runtime/services/section-store.service.js → esm2020/runtime/services/section-store.service.mjs} +4 -4
  121. package/esm2020/runtime/services/section.service.mjs +117 -0
  122. package/esm2020/runtime/types/script-registry.types.mjs +51 -0
  123. package/esm2020/runtime/utils/line-item.util.mjs +270 -0
  124. package/esm2020/src/components/dialog/dialog.component.mjs +36 -0
  125. package/esm2020/src/components/dialog/dialog.module.mjs +19 -0
  126. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +107 -0
  127. package/esm2020/src/components/doc-gen/doc-gen.module.mjs +19 -0
  128. package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +120 -0
  129. package/{esm2015/src/components/header/cart-overlay/cart-preview.module.js → esm2020/src/components/header/cart-overlay/cart-preview.module.mjs} +11 -13
  130. package/esm2020/src/components/header/header.component.mjs +333 -0
  131. package/{esm2015/src/components/header/header.module.js → esm2020/src/components/header/header.module.mjs} +12 -14
  132. package/esm2020/src/components/header/metrics/metrics.component.mjs +227 -0
  133. package/{esm2015/src/components/header/metrics/metrics.module.js → esm2020/src/components/header/metrics/metrics.module.mjs} +17 -19
  134. package/{esm2015/src/flow-routing.module.js → esm2020/src/flow-routing.module.mjs} +12 -14
  135. package/esm2020/src/flow.component.mjs +45 -0
  136. package/esm2020/src/flow.module.mjs +58 -0
  137. package/esm2020/src/guards/context.guard.mjs +93 -0
  138. package/esm2020/src/guards/product-unload.guard.mjs +46 -0
  139. package/esm2020/src/guards/root.guard.mjs +42 -0
  140. package/esm2020/src/pages/assets/assets.component.mjs +111 -0
  141. package/esm2020/src/pages/assets/assets.module.mjs +20 -0
  142. package/esm2020/src/pages/catalog/catalog.component.mjs +111 -0
  143. package/esm2020/src/pages/catalog/catalog.module.mjs +20 -0
  144. package/esm2020/src/pages/debug/debug.component.mjs +62 -0
  145. package/{esm2015/src/pages/debug/debug.module.js → esm2020/src/pages/debug/debug.module.mjs} +12 -14
  146. package/esm2020/src/pages/empty-account/empty-account.component.mjs +12 -0
  147. package/esm2020/src/pages/empty-account/empty-account.module.mjs +20 -0
  148. package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +137 -0
  149. package/esm2020/src/pages/legacy-product/legacy-product.module.mjs +19 -0
  150. package/esm2020/src/pages/product/product.component.mjs +94 -0
  151. package/esm2020/src/pages/product/product.module.mjs +20 -0
  152. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +25 -0
  153. package/esm2020/src/pages/record-not-found/record-not-found.module.mjs +20 -0
  154. package/esm2020/src/pages/remote/remote.component.mjs +342 -0
  155. package/esm2020/src/pages/remote/remote.module.mjs +20 -0
  156. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +111 -0
  157. package/esm2020/src/pages/shopping-cart/shopping-cart.module.mjs +20 -0
  158. package/esm2020/src/resolvers/flow.resolver.mjs +70 -0
  159. package/esm2020/src/resolvers/quote.resolver.mjs +90 -0
  160. package/esm2020/src/services/doc-gen.service.mjs +33 -0
  161. package/esm2020/src/services/flow-dialog.service.mjs +126 -0
  162. package/esm2020/src/services/flow-router.service.mjs +144 -0
  163. package/esm2020/src/services/flow.service.mjs +86 -0
  164. package/esm2020/src/utils/flow.utils.mjs +21 -0
  165. package/fesm2015/{veloceapps-sdk-cms.js → veloceapps-sdk-cms.mjs} +178 -207
  166. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -0
  167. package/fesm2015/{veloceapps-sdk-core.js → veloceapps-sdk-core.mjs} +76 -76
  168. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -0
  169. package/fesm2015/{veloceapps-sdk-runtime.js → veloceapps-sdk-runtime.mjs} +242 -370
  170. package/fesm2015/veloceapps-sdk-runtime.mjs.map +1 -0
  171. package/fesm2015/veloceapps-sdk.mjs +2877 -0
  172. package/fesm2015/veloceapps-sdk.mjs.map +1 -0
  173. package/fesm2020/veloceapps-sdk-cms.mjs +2036 -0
  174. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -0
  175. package/fesm2020/veloceapps-sdk-core.mjs +1289 -0
  176. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -0
  177. package/fesm2020/veloceapps-sdk-runtime.mjs +3764 -0
  178. package/fesm2020/veloceapps-sdk-runtime.mjs.map +1 -0
  179. package/fesm2020/veloceapps-sdk.mjs +2857 -0
  180. package/fesm2020/veloceapps-sdk.mjs.map +1 -0
  181. package/package.json +59 -33
  182. package/runtime/README.md +5 -0
  183. package/runtime/components/component-preview/component-preview.component.d.ts +2 -2
  184. package/runtime/components/section-renderer/section-renderer.component.d.ts +1 -1
  185. package/runtime/components/ui-runtime/runtime.component.d.ts +1 -1
  186. package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +1 -1
  187. package/runtime/execution/components/children-placeholder/children-placeholder.component.d.ts +2 -2
  188. package/runtime/execution/components/context-provider/context-provider.component.d.ts +1 -1
  189. package/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.d.ts +1 -1
  190. package/runtime/execution/components/federated/federated.component.d.ts +1 -1
  191. package/runtime/execution/components/velo-attribute/velo-attribute.component.d.ts +1 -1
  192. package/runtime/execution/components/velo-multiselect/velo-multiselect.component.d.ts +1 -1
  193. package/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.d.ts +1 -1
  194. package/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.d.ts +1 -1
  195. package/runtime/execution/components/velo-port-radio/velo-port-radio.component.d.ts +1 -1
  196. package/runtime/execution/components/velo-type/velo-type.component.d.ts +1 -1
  197. package/runtime/execution/directives/section-script.directive.d.ts +1 -1
  198. package/runtime/execution/directives/sf-query.directive.d.ts +1 -1
  199. package/runtime/execution/directives/velo-attribute.directive.d.ts +1 -1
  200. package/runtime/execution/directives/velo-port.directive.d.ts +6 -6
  201. package/runtime/execution/directives/vl-approval.directive.d.ts +1 -1
  202. package/runtime/execution/directives/vl-document-attachments.directive.d.ts +1 -1
  203. package/runtime/execution/directives/vl-document-templates.directive.d.ts +1 -1
  204. package/runtime/execution/directives/vl-quote.directive.d.ts +1 -1
  205. package/runtime/execution/directives/vl-ramp.directive.d.ts +1 -1
  206. package/runtime/execution/runtime-execution.module.d.ts +3 -5
  207. package/runtime/execution/utils/federated.util.d.ts +1 -1
  208. package/runtime/runtime.module.d.ts +3 -5
  209. package/runtime/services/section.service.d.ts +1 -1
  210. package/src/components/dialog/dialog.component.d.ts +1 -1
  211. package/src/components/doc-gen/doc-gen.component.d.ts +1 -1
  212. package/src/components/header/cart-overlay/cart-preview.component.d.ts +2 -2
  213. package/src/components/header/header.component.d.ts +1 -1
  214. package/src/components/header/metrics/metrics.component.d.ts +1 -1
  215. package/src/flow.component.d.ts +1 -1
  216. package/src/pages/assets/assets.component.d.ts +1 -1
  217. package/src/pages/catalog/catalog.component.d.ts +1 -1
  218. package/src/pages/debug/debug.component.d.ts +5 -3
  219. package/src/pages/empty-account/empty-account.component.d.ts +1 -1
  220. package/src/pages/legacy-product/legacy-product.component.d.ts +1 -1
  221. package/src/pages/legacy-product/legacy-product.module.d.ts +1 -2
  222. package/src/pages/product/product.component.d.ts +1 -1
  223. package/src/pages/record-not-found/record-not-found.component.d.ts +1 -1
  224. package/src/pages/remote/remote.component.d.ts +1 -1
  225. package/src/pages/shopping-cart/shopping-cart.component.d.ts +1 -1
  226. package/bundles/veloceapps-sdk-cms.umd.js +0 -2531
  227. package/bundles/veloceapps-sdk-cms.umd.js.map +0 -1
  228. package/bundles/veloceapps-sdk-core.umd.js +0 -1916
  229. package/bundles/veloceapps-sdk-core.umd.js.map +0 -1
  230. package/bundles/veloceapps-sdk-runtime.umd.js +0 -4415
  231. package/bundles/veloceapps-sdk-runtime.umd.js.map +0 -1
  232. package/bundles/veloceapps-sdk.umd.js +0 -3583
  233. package/bundles/veloceapps-sdk.umd.js.map +0 -1
  234. package/cms/modules/federated/federated.utils.d.ts +0 -1
  235. package/cms/package.json +0 -10
  236. package/cms/veloceapps-sdk-cms.d.ts +0 -5
  237. package/core/package.json +0 -10
  238. package/core/veloceapps-sdk-core.d.ts +0 -5
  239. package/esm2015/cms/cms.actions.js +0 -42
  240. package/esm2015/cms/components/element-children/element-children.component.js +0 -39
  241. package/esm2015/cms/components/element-children/element-children.module.js +0 -20
  242. package/esm2015/cms/components/element-drop-handle/element-drop-handle.component.js +0 -32
  243. package/esm2015/cms/components/element-drop-handle/element-drop-handle.module.js +0 -19
  244. package/esm2015/cms/components/element-renderer/element-renderer.component.js +0 -169
  245. package/esm2015/cms/components/element.component.js +0 -44
  246. package/esm2015/cms/components/plugin.component.js +0 -16
  247. package/esm2015/cms/components/preview/preview.component.js +0 -93
  248. package/esm2015/cms/components/preview/preview.module.js +0 -24
  249. package/esm2015/cms/directives/custom-template.directive.js +0 -25
  250. package/esm2015/cms/engine/models/entity.js +0 -18
  251. package/esm2015/cms/launcher.module.js +0 -24
  252. package/esm2015/cms/modules/federated/federated.component.js +0 -82
  253. package/esm2015/cms/modules/federated/federated.module.js +0 -19
  254. package/esm2015/cms/modules/federated/federated.types.js +0 -2
  255. package/esm2015/cms/modules/federated/federated.utils.js +0 -37
  256. package/esm2015/cms/modules/migrations/migrations.js +0 -11
  257. package/esm2015/cms/modules/migrations/services/migrations.service.js +0 -43
  258. package/esm2015/cms/modules/runtime/services/compilation.service.js +0 -84
  259. package/esm2015/cms/modules/runtime/services/runtime-editor.service.js +0 -27
  260. package/esm2015/cms/modules/runtime/services/runtime.service.js +0 -74
  261. package/esm2015/cms/plugins/configuration.plugin.js +0 -106
  262. package/esm2015/cms/plugins/io.plugin.js +0 -37
  263. package/esm2015/cms/plugins/region.plugin.js +0 -58
  264. package/esm2015/cms/plugins/script.plugin.js +0 -66
  265. package/esm2015/cms/services/integration.state.js +0 -40
  266. package/esm2015/cms/services/io-provider.service.js +0 -51
  267. package/esm2015/cms/services/resources.service.js +0 -50
  268. package/esm2015/cms/utils/element.utils.js +0 -157
  269. package/esm2015/cms/utils/elements-resolver.js +0 -163
  270. package/esm2015/cms/utils/path.utils.js +0 -56
  271. package/esm2015/cms/utils/ui-definition.utils.js +0 -82
  272. package/esm2015/cms/vendor-map.js +0 -51
  273. package/esm2015/core/core.module.js +0 -18
  274. package/esm2015/core/modules/configuration/helpers.js +0 -10
  275. package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +0 -87
  276. package/esm2015/core/modules/configuration/services/configuration.service.js +0 -177
  277. package/esm2015/core/modules/configuration/services/runtime-context.service.js +0 -51
  278. package/esm2015/core/modules/flow-configuration/flow-configuration.module.js +0 -18
  279. package/esm2015/core/modules/flow-configuration/services/flow-configuration.service.js +0 -150
  280. package/esm2015/core/modules/flow-configuration/services/flow-update.service.js +0 -129
  281. package/esm2015/core/services/context.service.js +0 -53
  282. package/esm2015/core/services/metric-calculation/metric-calculation.service.js +0 -83
  283. package/esm2015/core/services/product-images.service.js +0 -30
  284. package/esm2015/core/services/quote-draft.service.js +0 -217
  285. package/esm2015/core/utils/line-item.utils.js +0 -143
  286. package/esm2015/core/utils/line-item.worker.js +0 -19
  287. package/esm2015/runtime/components/component-preview/component-preview.component.js +0 -125
  288. package/esm2015/runtime/components/section-renderer/section-renderer.component.js +0 -71
  289. package/esm2015/runtime/components/ui-runtime/runtime.component.js +0 -429
  290. package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +0 -109
  291. package/esm2015/runtime/execution/components/children-placeholder/children-placeholder.component.js +0 -68
  292. package/esm2015/runtime/execution/components/context-provider/context-provider.component.js +0 -36
  293. package/esm2015/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.js +0 -72
  294. package/esm2015/runtime/execution/components/federated/federated.component.js +0 -81
  295. package/esm2015/runtime/execution/components/velo-attribute/velo-attribute.component.js +0 -65
  296. package/esm2015/runtime/execution/components/velo-multiselect/velo-multiselect.component.js +0 -136
  297. package/esm2015/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.js +0 -80
  298. package/esm2015/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.js +0 -101
  299. package/esm2015/runtime/execution/components/velo-port-radio/velo-port-radio.component.js +0 -150
  300. package/esm2015/runtime/execution/components/velo-type/velo-type.component.js +0 -121
  301. package/esm2015/runtime/execution/directives/section-script.directive.js +0 -242
  302. package/esm2015/runtime/execution/directives/sf-query.directive.js +0 -34
  303. package/esm2015/runtime/execution/directives/velo-attribute.directive.js +0 -86
  304. package/esm2015/runtime/execution/directives/velo-port.directive.js +0 -373
  305. package/esm2015/runtime/execution/directives/vl-approval.directive.js +0 -22
  306. package/esm2015/runtime/execution/directives/vl-document-attachments.directive.js +0 -35
  307. package/esm2015/runtime/execution/directives/vl-document-templates.directive.js +0 -59
  308. package/esm2015/runtime/execution/directives/vl-quote.directive.js +0 -41
  309. package/esm2015/runtime/execution/directives/vl-ramp.directive.js +0 -51
  310. package/esm2015/runtime/execution/runtime-execution.module.js +0 -163
  311. package/esm2015/runtime/execution/utils/federated.util.js +0 -37
  312. package/esm2015/runtime/runtime.module.js +0 -104
  313. package/esm2015/runtime/services/cart.service.js +0 -27
  314. package/esm2015/runtime/services/configuration.service.js +0 -101
  315. package/esm2015/runtime/services/product-model-cache.service.js +0 -30
  316. package/esm2015/runtime/services/runtime-context.service.js +0 -56
  317. package/esm2015/runtime/services/runtime-form.service.js +0 -224
  318. package/esm2015/runtime/services/runtime.service.js +0 -108
  319. package/esm2015/runtime/services/section.service.js +0 -124
  320. package/esm2015/runtime/types/script-registry.types.js +0 -51
  321. package/esm2015/runtime/utils/line-item.util.js +0 -273
  322. package/esm2015/src/components/dialog/dialog.component.js +0 -40
  323. package/esm2015/src/components/dialog/dialog.module.js +0 -19
  324. package/esm2015/src/components/doc-gen/doc-gen.component.js +0 -109
  325. package/esm2015/src/components/doc-gen/doc-gen.module.js +0 -19
  326. package/esm2015/src/components/header/cart-overlay/cart-preview.component.js +0 -122
  327. package/esm2015/src/components/header/header.component.js +0 -336
  328. package/esm2015/src/components/header/metrics/metrics.component.js +0 -232
  329. package/esm2015/src/flow.component.js +0 -45
  330. package/esm2015/src/flow.module.js +0 -60
  331. package/esm2015/src/guards/context.guard.js +0 -84
  332. package/esm2015/src/guards/product-unload.guard.js +0 -43
  333. package/esm2015/src/guards/root.guard.js +0 -41
  334. package/esm2015/src/pages/assets/assets.component.js +0 -117
  335. package/esm2015/src/pages/assets/assets.module.js +0 -20
  336. package/esm2015/src/pages/catalog/catalog.component.js +0 -117
  337. package/esm2015/src/pages/catalog/catalog.module.js +0 -20
  338. package/esm2015/src/pages/debug/debug.component.js +0 -61
  339. package/esm2015/src/pages/empty-account/empty-account.component.js +0 -17
  340. package/esm2015/src/pages/empty-account/empty-account.module.js +0 -20
  341. package/esm2015/src/pages/legacy-product/legacy-product.component.js +0 -132
  342. package/esm2015/src/pages/legacy-product/legacy-product.module.js +0 -21
  343. package/esm2015/src/pages/product/product.component.js +0 -101
  344. package/esm2015/src/pages/product/product.module.js +0 -20
  345. package/esm2015/src/pages/record-not-found/record-not-found.component.js +0 -29
  346. package/esm2015/src/pages/record-not-found/record-not-found.module.js +0 -20
  347. package/esm2015/src/pages/remote/remote.component.js +0 -350
  348. package/esm2015/src/pages/remote/remote.module.js +0 -20
  349. package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +0 -117
  350. package/esm2015/src/pages/shopping-cart/shopping-cart.module.js +0 -20
  351. package/esm2015/src/resolvers/flow.resolver.js +0 -62
  352. package/esm2015/src/resolvers/quote.resolver.js +0 -88
  353. package/esm2015/src/services/doc-gen.service.js +0 -33
  354. package/esm2015/src/services/flow-dialog.service.js +0 -124
  355. package/esm2015/src/services/flow-router.service.js +0 -144
  356. package/esm2015/src/services/flow.service.js +0 -84
  357. package/esm2015/src/utils/flow.utils.js +0 -22
  358. package/fesm2015/veloceapps-sdk-cms.js.map +0 -1
  359. package/fesm2015/veloceapps-sdk-core.js.map +0 -1
  360. package/fesm2015/veloceapps-sdk-runtime.js.map +0 -1
  361. package/fesm2015/veloceapps-sdk.js +0 -2953
  362. package/fesm2015/veloceapps-sdk.js.map +0 -1
  363. package/runtime/package.json +0 -10
  364. package/runtime/veloceapps-sdk-runtime.d.ts +0 -5
  365. package/veloceapps-sdk.d.ts +0 -5
  366. /package/{esm2015/cms/cms.default.js → esm2020/cms/cms.default.mjs} +0 -0
  367. /package/{esm2015/cms/cms.elements.js → esm2020/cms/cms.elements.mjs} +0 -0
  368. /package/{esm2015/cms/cms.layouts.js → esm2020/cms/cms.layouts.mjs} +0 -0
  369. /package/{esm2015/cms/components/index.js → esm2020/cms/components/index.mjs} +0 -0
  370. /package/{esm2015/cms/components/preview/index.js → esm2020/cms/components/preview/index.mjs} +0 -0
  371. /package/{esm2015/cms/components/preview/preview.types.js → esm2020/cms/components/preview/preview.types.mjs} +0 -0
  372. /package/{esm2015/cms/decorators/element.decorator.js → esm2020/cms/decorators/element.decorator.mjs} +0 -0
  373. /package/{esm2015/cms/decorators/index.js → esm2020/cms/decorators/index.mjs} +0 -0
  374. /package/{esm2015/cms/engine/models/plugin.js → esm2020/cms/engine/models/plugin.mjs} +0 -0
  375. /package/{esm2015/cms/index.js → esm2020/cms/index.mjs} +0 -0
  376. /package/{esm2015/cms/injection-tokens.js → esm2020/cms/injection-tokens.mjs} +0 -0
  377. /package/{esm2015/cms/modules/federated/default-options.js → esm2020/cms/modules/federated/default-options.mjs} +0 -0
  378. /package/{esm2015/cms/modules/federated/export.js → esm2020/cms/modules/federated/export.mjs} +0 -0
  379. /package/{esm2015/cms/modules/migrations/index.js → esm2020/cms/modules/migrations/index.mjs} +0 -0
  380. /package/{esm2015/cms/modules/migrations/types/migrations.types.js → esm2020/cms/modules/migrations/types/migrations.types.mjs} +0 -0
  381. /package/{esm2015/cms/modules/runtime/index.js → esm2020/cms/modules/runtime/index.mjs} +0 -0
  382. /package/{esm2015/cms/modules/runtime/tokens.js → esm2020/cms/modules/runtime/tokens.mjs} +0 -0
  383. /package/{esm2015/cms/modules/runtime/types/compilation.types.js → esm2020/cms/modules/runtime/types/compilation.types.mjs} +0 -0
  384. /package/{esm2015/cms/modules/runtime/types/runtime.actions.js → esm2020/cms/modules/runtime/types/runtime.actions.mjs} +0 -0
  385. /package/{esm2015/cms/services/index.js → esm2020/cms/services/index.mjs} +0 -0
  386. /package/{esm2015/cms/types/common.types.js → esm2020/cms/types/common.types.mjs} +0 -0
  387. /package/{esm2015/cms/types/configuration.types.js → esm2020/cms/types/configuration.types.mjs} +0 -0
  388. /package/{esm2015/cms/types/elements.types.js → esm2020/cms/types/elements.types.mjs} +0 -0
  389. /package/{esm2015/cms/types/index.js → esm2020/cms/types/index.mjs} +0 -0
  390. /package/{esm2015/cms/types/integration.types.js → esm2020/cms/types/integration.types.mjs} +0 -0
  391. /package/{esm2015/cms/types/layouts.types.js → esm2020/cms/types/layouts.types.mjs} +0 -0
  392. /package/{esm2015/cms/types/path.types.js → esm2020/cms/types/path.types.mjs} +0 -0
  393. /package/{esm2015/cms/utils/index.js → esm2020/cms/utils/index.mjs} +0 -0
  394. /package/{esm2015/cms/veloceapps-sdk-cms.js → esm2020/cms/veloceapps-sdk-cms.mjs} +0 -0
  395. /package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
  396. /package/{esm2015/core/modules/configuration/index.js → esm2020/core/modules/configuration/index.mjs} +0 -0
  397. /package/{esm2015/core/modules/configuration/types/configuration-runtime.types.js → esm2020/core/modules/configuration/types/configuration-runtime.types.mjs} +0 -0
  398. /package/{esm2015/core/modules/flow-configuration/index.js → esm2020/core/modules/flow-configuration/index.mjs} +0 -0
  399. /package/{esm2015/core/modules/flow-configuration/types/update.types.js → esm2020/core/modules/flow-configuration/types/update.types.mjs} +0 -0
  400. /package/{esm2015/core/modules/index.js → esm2020/core/modules/index.mjs} +0 -0
  401. /package/{esm2015/core/services/index.js → esm2020/core/services/index.mjs} +0 -0
  402. /package/{esm2015/core/services/metric-calculation/metric-calculation.types.js → esm2020/core/services/metric-calculation/metric-calculation.types.mjs} +0 -0
  403. /package/{esm2015/core/services/metric-calculation/metric-calculation.utils.js → esm2020/core/services/metric-calculation/metric-calculation.utils.mjs} +0 -0
  404. /package/{esm2015/core/types/index.js → esm2020/core/types/index.mjs} +0 -0
  405. /package/{esm2015/core/types/runtime.types.js → esm2020/core/types/runtime.types.mjs} +0 -0
  406. /package/{esm2015/core/types/ui-definition.types.js → esm2020/core/types/ui-definition.types.mjs} +0 -0
  407. /package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
  408. /package/{esm2015/core/utils/ui-definition.utils.js → esm2020/core/utils/ui-definition.utils.mjs} +0 -0
  409. /package/{esm2015/core/veloceapps-sdk-core.js → esm2020/core/veloceapps-sdk-core.mjs} +0 -0
  410. /package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  411. /package/{esm2015/runtime/components/index.js → esm2020/runtime/components/index.mjs} +0 -0
  412. /package/{esm2015/runtime/index.js → esm2020/runtime/index.mjs} +0 -0
  413. /package/{esm2015/runtime/services/index.js → esm2020/runtime/services/index.mjs} +0 -0
  414. /package/{esm2015/runtime/types/bound-data.types.js → esm2020/runtime/types/bound-data.types.mjs} +0 -0
  415. /package/{esm2015/runtime/types/index.js → esm2020/runtime/types/index.mjs} +0 -0
  416. /package/{esm2015/runtime/types/quote-states.types.js → esm2020/runtime/types/quote-states.types.mjs} +0 -0
  417. /package/{esm2015/runtime/types/runtime.types.js → esm2020/runtime/types/runtime.types.mjs} +0 -0
  418. /package/{esm2015/runtime/utils/section.utils.js → esm2020/runtime/utils/section.utils.mjs} +0 -0
  419. /package/{esm2015/runtime/utils/sections-binder.helper.js → esm2020/runtime/utils/sections-binder.helper.mjs} +0 -0
  420. /package/{esm2015/runtime/veloceapps-sdk-runtime.js → esm2020/runtime/veloceapps-sdk-runtime.mjs} +0 -0
  421. /package/{esm2015/src/components/dialog/dialog.types.js → esm2020/src/components/dialog/dialog.types.mjs} +0 -0
  422. /package/{esm2015/src/components/header/header.types.js → esm2020/src/components/header/header.types.mjs} +0 -0
  423. /package/{esm2015/src/components/header/metrics/index.js → esm2020/src/components/header/metrics/index.mjs} +0 -0
  424. /package/{esm2015/src/components/header/metrics/metrics.definitions.js → esm2020/src/components/header/metrics/metrics.definitions.mjs} +0 -0
  425. /package/{esm2015/src/constants.js → esm2020/src/constants.mjs} +0 -0
  426. /package/{esm2015/src/guards/index.js → esm2020/src/guards/index.mjs} +0 -0
  427. /package/{esm2015/src/index.js → esm2020/src/index.mjs} +0 -0
  428. /package/{esm2015/src/pages/remote/remote.types.js → esm2020/src/pages/remote/remote.types.mjs} +0 -0
  429. /package/{esm2015/src/services/index.js → esm2020/src/services/index.mjs} +0 -0
  430. /package/{esm2015/src/types/context-route.types.js → esm2020/src/types/context-route.types.mjs} +0 -0
  431. /package/{esm2015/src/types/flow-customization.types.js → esm2020/src/types/flow-customization.types.mjs} +0 -0
  432. /package/{esm2015/src/types/index.js → esm2020/src/types/index.mjs} +0 -0
  433. /package/{esm2015/src/types/metrics.types.js → esm2020/src/types/metrics.types.mjs} +0 -0
  434. /package/{esm2015/src/types/route.types.js → esm2020/src/types/route.types.mjs} +0 -0
  435. /package/{esm2015/src/utils/index.js → esm2020/src/utils/index.mjs} +0 -0
  436. /package/{esm2015/veloceapps-sdk.js → esm2020/veloceapps-sdk.mjs} +0 -0
@@ -0,0 +1,3764 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, ViewContainerRef, Component, Input, ViewChild, Inject, EventEmitter, TemplateRef, ChangeDetectionStrategy, Output, Directive, HostBinding, NgModule, ViewChildren, ViewEncapsulation } from '@angular/core';
3
+ import * as i4 from '@angular/forms';
4
+ import { FormGroup, FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i7 from '@veloceapps/core';
6
+ import { EntityUtil, UUID, SectionPathUtil, TypeValidators, ConfigurationMode, RuntimeModel, OrderByPipe, PricingUtils, PagedEntity, CoreModule, SalesforceIdUtils, SearchFilterPipe, ConfigurationContextMode } from '@veloceapps/core';
7
+ import * as i2 from '@veloceapps/sdk/core';
8
+ import { RuntimeMode, RuntimeStep, SdkCoreModule } from '@veloceapps/sdk/core';
9
+ import * as rxjs from 'rxjs';
10
+ import { Subject, BehaviorSubject, of, merge, combineLatest } from 'rxjs';
11
+ import * as _ from 'lodash';
12
+ import { keys, isUndefined, isNull, isString, isDate, set, values } from 'lodash';
13
+ import * as i3$1 from 'primeng/api';
14
+ import { MessageService } from 'primeng/api';
15
+ import * as rxjsOperators from 'rxjs/operators';
16
+ import { map, take, tap, shareReplay, takeUntil } from 'rxjs/operators';
17
+ import * as i1 from '@veloceapps/api';
18
+ import { ApiModule } from '@veloceapps/api';
19
+ import * as i10 from '@veloceapps/components';
20
+ import { ConfirmationComponent, LoaderModule } from '@veloceapps/components';
21
+ import * as i3 from 'primeng/dynamicdialog';
22
+ import { DialogService } from 'primeng/dynamicdialog';
23
+ import { __decorate } from 'tslib';
24
+ import { ScrollingModule as ScrollingModule$1 } from '@angular/cdk-experimental/scrolling';
25
+ import { ScrollingModule } from '@angular/cdk/scrolling';
26
+ import * as i3$2 from '@angular/common';
27
+ import { CurrencyPipe, DOCUMENT, CommonModule, DatePipe } from '@angular/common';
28
+ import '@angular/compiler';
29
+ import * as i1$1 from '@angular/cdk/overlay';
30
+ import { TemplatePortal } from '@angular/cdk/portal';
31
+ import * as moment from 'moment';
32
+ import { HttpErrorResponse } from '@angular/common/http';
33
+
34
+ class CollapsibleStateService {
35
+ constructor() {
36
+ this._collapsedSections = {}; // By Line Item Id
37
+ this.collapseSectionSubject = new Subject();
38
+ this.collapseSectionEvent = this.collapseSectionSubject.asObservable();
39
+ }
40
+ toggleCollapse(sectionId, silently) {
41
+ this._collapsedSections[sectionId] = !this.isCollapsedSection(sectionId);
42
+ if (!silently) {
43
+ this.collapseSectionSubject.next([sectionId, this._collapsedSections[sectionId]]);
44
+ }
45
+ }
46
+ collapse(sectionId) {
47
+ this._collapsedSections[sectionId] = true;
48
+ }
49
+ expand(sectionId) {
50
+ this._collapsedSections[sectionId] = false;
51
+ }
52
+ clearState(sectionId) {
53
+ delete this._collapsedSections[sectionId];
54
+ }
55
+ isCollapsedSection(sectionId) {
56
+ return this._collapsedSections[sectionId];
57
+ }
58
+ }
59
+ CollapsibleStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CollapsibleStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
60
+ CollapsibleStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CollapsibleStateService });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CollapsibleStateService, decorators: [{
62
+ type: Injectable
63
+ }], ctorParameters: function () { return []; } });
64
+
65
+ class ScriptRegistry {
66
+ constructor() {
67
+ this.store = new Map();
68
+ this.scope = new Map();
69
+ }
70
+ exists(scriptId) {
71
+ const sectionIds = this.store.get(scriptId);
72
+ return !EntityUtil.isEmpty(sectionIds);
73
+ }
74
+ isRegistered(scriptId, sectionId) {
75
+ const sectionIds = this.store.get(scriptId);
76
+ return !EntityUtil.isEmpty(sectionIds) && sectionIds?.findIndex(entryId => entryId === sectionId) !== -1;
77
+ }
78
+ doRegister(scriptId, sectionId) {
79
+ const sectionIds = this.store.get(scriptId);
80
+ if (!EntityUtil.isPresent(sectionIds)) {
81
+ this.store.set(scriptId, [sectionId]);
82
+ }
83
+ else if (sectionIds?.findIndex(entryId => entryId === sectionId) === -1) {
84
+ sectionIds.push(sectionId);
85
+ }
86
+ }
87
+ unRegister(scriptId, sectionId) {
88
+ const sectionIds = this.store.get(scriptId);
89
+ if (!sectionIds) {
90
+ return;
91
+ }
92
+ const index = sectionIds?.findIndex(entryId => entryId === sectionId);
93
+ if (index !== -1) {
94
+ sectionIds.splice(index, 1);
95
+ // Remove orphan
96
+ if (sectionIds.length < 1) {
97
+ this.store.delete(scriptId);
98
+ }
99
+ }
100
+ }
101
+ hasGlobalForScript(globalId) {
102
+ return this.scope.has(globalId);
103
+ }
104
+ getGlobalForScript(globalId) {
105
+ return this.scope.get(globalId);
106
+ }
107
+ setGlobalForScript(globalId, globalVariable) {
108
+ this.scope.set(globalId, globalVariable);
109
+ }
110
+ removeGlobalForScript(globalId) {
111
+ this.scope.delete(globalId);
112
+ }
113
+ }
114
+
115
+ // TODO ALE RENAME TO SESSION SCOPE
116
+ class FormScopeService {
117
+ constructor() {
118
+ this.scriptRegistry = new ScriptRegistry();
119
+ this.scriptSessionScope = {};
120
+ this.formSubmitSubject = new Subject();
121
+ this._form = new FormGroup({});
122
+ this.formSubmitEvent = this.formSubmitSubject.asObservable();
123
+ }
124
+ get form() {
125
+ return this._form;
126
+ }
127
+ set form(value) {
128
+ this._form = value;
129
+ }
130
+ publishFormUpdate(value) {
131
+ this.formSubmitSubject.next(value);
132
+ }
133
+ }
134
+ FormScopeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FormScopeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
135
+ FormScopeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FormScopeService });
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FormScopeService, decorators: [{
137
+ type: Injectable
138
+ }], ctorParameters: function () { return []; } });
139
+
140
+ var BoundDataType;
141
+ (function (BoundDataType) {
142
+ BoundDataType[BoundDataType["TYPE"] = 0] = "TYPE";
143
+ BoundDataType[BoundDataType["ATTRIBUTE"] = 1] = "ATTRIBUTE";
144
+ BoundDataType[BoundDataType["PORT"] = 2] = "PORT";
145
+ })(BoundDataType || (BoundDataType = {}));
146
+
147
+ class LineItemPath {
148
+ set relativePath(relativePath) {
149
+ this._relativePath = relativePath.toLowerCase();
150
+ }
151
+ get relativePath() {
152
+ return this._relativePath;
153
+ }
154
+ set abstractPath(abstractPath) {
155
+ this._abstractPath = abstractPath.toLowerCase();
156
+ }
157
+ get abstractPath() {
158
+ return this._abstractPath || this.path;
159
+ }
160
+ set relativeAbstractPath(relativeAbstractPath) {
161
+ this._relativeAbstractPath = relativeAbstractPath.toLowerCase();
162
+ }
163
+ constructor(path) {
164
+ this._relativePath = '';
165
+ this._relativeAbstractPath = '';
166
+ this._abstractPath = '';
167
+ this.path = path.toLowerCase();
168
+ }
169
+ isEqualTo(sectionPath) {
170
+ if (!sectionPath || !this.path || !sectionPath.path) {
171
+ return false;
172
+ }
173
+ const otherPath = sectionPath.path.toLowerCase();
174
+ const isEqual = this.path === otherPath || this._relativePath === otherPath || this._relativeAbstractPath === otherPath;
175
+ //TODO ALE SORT OUT SEARCH
176
+ if (!isEqual) {
177
+ const abstractPathMatch = this._abstractPath === sectionPath.abstractPath.toLowerCase();
178
+ const relativePathMatch = this._relativePath
179
+ ? this._relativePath === sectionPath.relativePath.toLowerCase()
180
+ : false;
181
+ const relativeAbstractPathMatch = this._relativeAbstractPath && sectionPath.relativeAbstractPath
182
+ ? sectionPath.relativeAbstractPath.toLowerCase() === sectionPath.relativePath.toLowerCase() &&
183
+ this._relativeAbstractPath === sectionPath.relativePath.toLowerCase()
184
+ : false;
185
+ return abstractPathMatch && (relativePathMatch || relativeAbstractPathMatch);
186
+ }
187
+ return isEqual;
188
+ }
189
+ }
190
+ class LineItemUtil {
191
+ static removeDeletedItems(original) {
192
+ const root = EntityUtil.clone(original);
193
+ if (root) {
194
+ let items = [root];
195
+ for (let i = 0; i < items.length; i++) {
196
+ const item = items[i];
197
+ item.lineItems = (item.lineItems ?? []).filter(l => l.actionCode !== 'DELETE');
198
+ items = items.concat(item.lineItems);
199
+ }
200
+ }
201
+ return root;
202
+ }
203
+ static replaceLineItemKeys(rootLineItem) {
204
+ const replaceFn = (item) => {
205
+ item.id = item.id ? 'DUMMY-' + item.id : item.id;
206
+ item.rootId = item.rootId ? 'DUMMY-' + item.rootId : item.rootId;
207
+ item.parentId = item.parentId ? 'DUMMY-' + item.parentId : item.parentId;
208
+ item.offeringInstanceId = item.offeringInstanceId ? 'DUMMY-' + item.offeringInstanceId : void 0;
209
+ item.offeringItemId = item.offeringItemId ? 'DUMMY-' + item.offeringItemId : void 0;
210
+ item.rampInstanceId = item.rampInstanceId ? 'DUMMY-' + item.rampInstanceId : void 0;
211
+ };
212
+ const traverseFn = (lineItem, callbackFn) => {
213
+ if (lineItem.lineItems && lineItem.lineItems.length > 0) {
214
+ lineItem.lineItems.forEach(childLineItem => {
215
+ callbackFn.apply(null, [childLineItem]);
216
+ traverseFn.apply(null, [childLineItem, callbackFn]);
217
+ });
218
+ }
219
+ };
220
+ replaceFn.apply(null, [rootLineItem]);
221
+ // rootLineItem.rootId = rootLineItem.id;
222
+ traverseFn.apply(null, [rootLineItem, replaceFn]);
223
+ }
224
+ static enrichPricingInfo(source, pricingDto) {
225
+ const result = {
226
+ ...source,
227
+ };
228
+ if (pricingDto) {
229
+ result.productName = pricingDto.properties?.['displayName'] || pricingDto.productName;
230
+ result.type = pricingDto.type;
231
+ result.rootId = pricingDto.rootId;
232
+ result.assetId = pricingDto.assetId;
233
+ result.openOrderLineItemId = pricingDto.openOrderLineItemId;
234
+ result.activated = pricingDto.activated;
235
+ result.actionCode = pricingDto.actionCode;
236
+ result.serviceStartDate = pricingDto.serviceStartDate;
237
+ result.effectiveDate = pricingDto.effectiveDate;
238
+ result.startDate = pricingDto.startDate;
239
+ result.endDate = pricingDto.endDate;
240
+ result.offeringId = pricingDto.offeringId;
241
+ result.offeringItemId = pricingDto.offeringItemId;
242
+ result.offeringInstanceId = pricingDto.offeringInstanceId;
243
+ result.rampInstanceId = pricingDto.rampInstanceId;
244
+ result.planId = pricingDto.planId;
245
+ if (!result.chargeItems) {
246
+ result.chargeItems = pricingDto.chargeItems;
247
+ }
248
+ result.chargeGroupItems = [];
249
+ }
250
+ if (source.lineItems && source.lineItems.length > 0) {
251
+ result.lineItems = [];
252
+ source.lineItems.forEach((childSource) => {
253
+ const childDto = pricingDto && pricingDto.lineItems && pricingDto.lineItems.find(c => childSource.id === c.id);
254
+ const childItem = LineItemUtil.enrichPricingInfo(childSource, childDto);
255
+ result.lineItems.push(childItem);
256
+ });
257
+ }
258
+ return result;
259
+ }
260
+ static getLineItemPath(lineItem, rootLineItem) {
261
+ let path;
262
+ if (!lineItem.parentId) {
263
+ path = new LineItemPath('/' + lineItem.type);
264
+ path.abstractPath = path.path;
265
+ path.relativePath = path.path;
266
+ path.relativeAbstractPath = path.path;
267
+ }
268
+ else {
269
+ //TOODO ALE SORT OUT PATENT ITEM
270
+ const parentItem = EntityUtil.findByFieldHierarchically('id', lineItem.parentId, [rootLineItem], 'lineItems');
271
+ const portType = lineItem.port && parentItem?.portDomains[lineItem.port].type;
272
+ const parentPath = parentItem && LineItemUtil.getLineItemPath(parentItem, rootLineItem);
273
+ if (parentPath) {
274
+ path = new LineItemPath(parentPath.path + '/ports/' + lineItem.port + '/' + lineItem.type);
275
+ path.abstractPath = parentPath.abstractPath + '/ports/' + (lineItem.port + '/' + portType);
276
+ path.relativePath = '/' + lineItem.type;
277
+ path.relativeAbstractPath = '/' + portType;
278
+ }
279
+ else {
280
+ throw 'Could not construct line item path';
281
+ }
282
+ }
283
+ return path;
284
+ }
285
+ static findById(parentId, lineItems) {
286
+ return EntityUtil.findByFieldHierarchically('id', parentId, lineItems, 'lineItems');
287
+ }
288
+ static countAttributeValues(scale, attributeDomain) {
289
+ const precision = LineItemUtil.precision(scale);
290
+ let count = 0;
291
+ attributeDomain.forEach(d => (count += d.max - d.min + precision));
292
+ return count;
293
+ }
294
+ static precision(scale) {
295
+ if (!scale) {
296
+ return 1;
297
+ }
298
+ let s = '1';
299
+ while (s.length < scale) {
300
+ s = '0' + s;
301
+ }
302
+ return Number('0.' + s);
303
+ }
304
+ static splitDomainToValues(scale, attributeDomain) {
305
+ const precision = this.precision(scale);
306
+ let values = [];
307
+ attributeDomain.forEach(interval => (values = values.concat(LineItemUtil.splitIntervalToValues(precision, interval))));
308
+ return values;
309
+ }
310
+ static splitIntervalToValues(precision, interval) {
311
+ const values = [];
312
+ for (let i = interval.min; i <= interval.max; i += precision) {
313
+ values.push(i);
314
+ }
315
+ return values;
316
+ }
317
+ static findLineItemsByPath(runtimeModel, lineItem, path) {
318
+ if (!runtimeModel.isEquals(lineItem.type, path.types[0])) {
319
+ return [];
320
+ }
321
+ let lineItems = [lineItem];
322
+ for (let i = 1; i < path.types.length; i++) {
323
+ const portName = path.ports[i - 1];
324
+ const typeName = path.types[i];
325
+ lineItems = LineItemUtil.findLineItemChildren(runtimeModel, lineItems, portName, typeName);
326
+ }
327
+ return lineItems;
328
+ }
329
+ static findLineItemChildren(runtimeModel, lineItems, portName, typeName) {
330
+ const result = [];
331
+ for (const lineItem of lineItems) {
332
+ for (const childItem of lineItem.lineItems) {
333
+ if (childItem.port?.toLowerCase() === portName.toLowerCase() &&
334
+ runtimeModel.isEquals(childItem.type, typeName)) {
335
+ result.push(childItem);
336
+ }
337
+ }
338
+ }
339
+ return result;
340
+ }
341
+ static findLineItemsByType(runtimeModel, lineItem, typeName) {
342
+ const result = [];
343
+ let lineItems = [lineItem];
344
+ for (let i = 0; i < lineItems.length; i++) {
345
+ const lineItem = lineItems[i];
346
+ if (runtimeModel.isEquals(lineItem.type, typeName)) {
347
+ result.push(lineItem);
348
+ }
349
+ lineItems = lineItems.concat(lineItem.lineItems);
350
+ }
351
+ return result;
352
+ }
353
+ static findLineItemForValue(model, valueOption) {
354
+ if (!EntityUtil.isPresent(model) || !EntityUtil.isPresent(model.lineItems)) {
355
+ return;
356
+ }
357
+ return model.lineItems.find(li => li.type && li.type.toLowerCase() === valueOption.toLowerCase());
358
+ }
359
+ // TODO: add Product typings
360
+ static create(product, qty) {
361
+ return {
362
+ id: UUID.UUID(),
363
+ type: product.typeName,
364
+ name: product.properties?.displayName || product.name,
365
+ productName: product.name,
366
+ productId: product.id,
367
+ cfgStatus: 'User',
368
+ actionCode: 'ADD',
369
+ qty: qty || 1,
370
+ };
371
+ }
372
+ static upsert(value, collection) {
373
+ const index = collection.findIndex(item => item.id === value.id);
374
+ if (index > -1) {
375
+ collection[index] = value;
376
+ }
377
+ else {
378
+ collection.push(value);
379
+ }
380
+ }
381
+ static compareSortOrder(a, b) {
382
+ const orderA = Number(a.properties['SortOrder']);
383
+ const orderB = Number(b.properties['SortOrder']);
384
+ if (!orderA && !orderB) {
385
+ return LineItemUtil.compareProductName(a, b);
386
+ }
387
+ if (!orderA) {
388
+ return 1;
389
+ }
390
+ else if (!orderB) {
391
+ return -1;
392
+ }
393
+ const result = orderA - orderB;
394
+ if (result === 0) {
395
+ return LineItemUtil.compareProductName(a, b);
396
+ }
397
+ return result;
398
+ }
399
+ static sort(lineItems) {
400
+ if (lineItems) {
401
+ lineItems.sort((a, b) => LineItemUtil.compareSortOrder(a, b));
402
+ lineItems.forEach(i => LineItemUtil.sort(i.lineItems));
403
+ }
404
+ }
405
+ static compareProductName(a, b) {
406
+ if (a.productName) {
407
+ return (a.productName ?? '').localeCompare(b.productName ?? '');
408
+ }
409
+ else if (b.productName) {
410
+ return 1;
411
+ }
412
+ return 0;
413
+ }
414
+ }
415
+
416
+ class SectionsBinderHelper {
417
+ static setLineItemsPath(runtimeModel, rootLineItem, sections, sourceSections, filterFn, pricingEnabled) {
418
+ const filtered = sections.filter(filterFn);
419
+ filtered.forEach(section => {
420
+ const path = section.boundData.path;
421
+ let foundLineItems;
422
+ if (path.relative) {
423
+ foundLineItems = LineItemUtil.findLineItemsByType(runtimeModel, rootLineItem, path.types[0]);
424
+ }
425
+ else {
426
+ const remainder = rootLineItem.path ? SectionPathUtil.cut(runtimeModel, path, rootLineItem.path) : undefined;
427
+ if (!remainder) {
428
+ return [];
429
+ }
430
+ foundLineItems = LineItemUtil.findLineItemsByPath(runtimeModel, rootLineItem, remainder);
431
+ }
432
+ if (section.boundData.entityType === BoundDataType[BoundDataType.TYPE]) {
433
+ SectionsBinderHelper.bindMatchingLineItems(runtimeModel, foundLineItems, section, sections, sourceSections, pricingEnabled);
434
+ }
435
+ else if (section.boundData.entityType === BoundDataType[BoundDataType.ATTRIBUTE]) {
436
+ foundLineItems = foundLineItems.filter(item => item.attributes &&
437
+ item.attributes.findIndex(a => a.name.toLowerCase() === section.boundData.name.toLowerCase()) !== -1);
438
+ foundLineItems.forEach(lineItem => {
439
+ SectionsBinderHelper.bindLineItem(section, sections, sourceSections, lineItem, pricingEnabled);
440
+ });
441
+ }
442
+ else if (section.boundData.entityType === BoundDataType[BoundDataType.PORT]) {
443
+ foundLineItems = foundLineItems.filter(item => item.portDomains && item.portDomains[section.boundData.name]);
444
+ SectionsBinderHelper.bindMatchingLineItems(runtimeModel, foundLineItems, section, sections, sourceSections, pricingEnabled);
445
+ }
446
+ return;
447
+ });
448
+ return sections;
449
+ }
450
+ static isAddAllowed(model, portName, quantityToAdd = 1) {
451
+ const quantity = this.getQuantity(model, portName);
452
+ return quantity + quantityToAdd <= +this.getPortMax(model, portName);
453
+ }
454
+ static isRemoveAllowed(model, portName, quantityToRemove = 1) {
455
+ const quantity = this.getQuantity(model, portName);
456
+ return quantity - quantityToRemove >= +this.getPortMin(model, portName);
457
+ }
458
+ static getMaxAllowed(lineItem, portName) {
459
+ return +this.getPortMax(lineItem, portName) - this.getQuantity(lineItem, portName);
460
+ }
461
+ static getQuantityGroupByValue(model, portName) {
462
+ const quantities = {};
463
+ if (model && portName) {
464
+ model.lineItems
465
+ .filter(li => li.port === portName)
466
+ .forEach(li => {
467
+ let quantity = (EntityUtil.isPresent(li.qty) && li.qty) || 1;
468
+ if (EntityUtil.isPresent(quantities[li.type])) {
469
+ quantity += quantities[li.type];
470
+ }
471
+ quantities[li.type] = quantity;
472
+ });
473
+ }
474
+ return quantities;
475
+ }
476
+ static bindMatchingLineItems(runtimeModel, foundLineItems, section, sections, sourceSections, pricingEnabled) {
477
+ foundLineItems.forEach(lineItem => {
478
+ const boundSection = SectionsBinderHelper.bindLineItem(section, sections, sourceSections, lineItem, pricingEnabled);
479
+ SectionsBinderHelper.setLineItemsPath(runtimeModel, lineItem, sections, sourceSections, (sec) => {
480
+ return sec.boundData && sec.parentId === boundSection.id;
481
+ }, pricingEnabled);
482
+ });
483
+ }
484
+ static bindLineItem(section, sections, sourceSections, lineItem, pricingEnabled) {
485
+ const boundSection = section.model ? SectionsBinderHelper.doClone(section, sections, sourceSections) : section;
486
+ boundSection.model = lineItem;
487
+ boundSection.pricingEnabled = pricingEnabled;
488
+ return boundSection;
489
+ }
490
+ static doClone(source, sections, sourceSections, parent) {
491
+ const sourceClass = sourceSections.find(s => s.classId === source.classId);
492
+ const clone = EntityUtil.clone(sourceClass);
493
+ clone.id = UUID.UUID();
494
+ clone.parentId = parent ? parent.id : source.parentId;
495
+ sections.splice(sections.findIndex(s => s.id === source.id) + 1, 0, clone);
496
+ sourceSections
497
+ .filter(s => s.parentId === sourceClass.id)
498
+ .forEach(s => SectionsBinderHelper.doClone(s, sections, sourceSections, clone));
499
+ return clone;
500
+ }
501
+ static getQuantity(model, portName) {
502
+ let quantity = 0;
503
+ model.lineItems
504
+ .filter(li => li.port === portName)
505
+ .forEach(li => {
506
+ quantity += li.qty;
507
+ });
508
+ return quantity;
509
+ }
510
+ static getPortMax(model, portName) {
511
+ return model.portDomains[portName].maxCard;
512
+ }
513
+ static getPortMin(model, portName) {
514
+ return model.portDomains[portName].minCard;
515
+ }
516
+ }
517
+
518
+ class RuntimeFormService {
519
+ constructor() {
520
+ this.sections = [];
521
+ }
522
+ initForm(sections, solutionLineItem) {
523
+ this.sections = sections;
524
+ this.solutionLineItem = solutionLineItem;
525
+ const form = new FormGroup({});
526
+ sections
527
+ .filter(section => section.model && section.template && section.boundData)
528
+ .forEach(section => {
529
+ this.populateSectionValue(section);
530
+ this.populateSectionPrice(section);
531
+ this.populateFormControls(section, form);
532
+ });
533
+ return form;
534
+ }
535
+ populateSectionValue(section) {
536
+ let value;
537
+ let valueOptions = [];
538
+ let displayValues = {};
539
+ let properties = {};
540
+ if (FormServiceUtils.isPortSection(section)) {
541
+ const portDomain = section.model?.portDomains[section.boundData.name];
542
+ valueOptions = portDomain?.domainTypes.map(dt => dt.name) ?? [];
543
+ properties =
544
+ portDomain?.domainTypes.reduce(function (map, dt) {
545
+ map[dt.name] = dt.properties;
546
+ return map;
547
+ }, {}) ?? {};
548
+ displayValues =
549
+ portDomain?.domainTypes.reduce(function (map, dt) {
550
+ map[dt.name] = dt.displayName;
551
+ return map;
552
+ }, {}) ?? {};
553
+ value = section.model?.lineItems.map(li => li.type);
554
+ }
555
+ if (FormServiceUtils.isAttributeSection(section)) {
556
+ const attribute = section.model?.attributes.find(attr => attr.name.toLowerCase() === section.boundData.name.toLowerCase());
557
+ if (attribute) {
558
+ value = attribute.value;
559
+ }
560
+ const attributeDomain = section.model?.attributeDomains[section.boundData.name];
561
+ if (!attribute?.type.match('GENERIC|BOOLEAN') && attributeDomain) {
562
+ const count = attribute && attribute.scale != null
563
+ ? LineItemUtil.countAttributeValues(attribute.scale, attributeDomain)
564
+ : undefined;
565
+ if (attribute && attribute.scale != null && count && count <= 100) {
566
+ valueOptions = LineItemUtil.splitDomainToValues(attribute.scale, attributeDomain);
567
+ }
568
+ else {
569
+ valueOptions = attributeDomain;
570
+ }
571
+ }
572
+ else if (attributeDomain) {
573
+ valueOptions = attributeDomain;
574
+ }
575
+ }
576
+ if (!EntityUtil.isPresent(value)) {
577
+ value = '';
578
+ }
579
+ section.sectionValue = {
580
+ value,
581
+ valueOptions,
582
+ displayValues,
583
+ properties,
584
+ };
585
+ }
586
+ populateSectionPrice(section) {
587
+ const priceValue = { priceOptions: {} };
588
+ if (FormServiceUtils.isPortSection(section)) {
589
+ const portDomain = section.model?.portDomains[section.boundData.name];
590
+ if (portDomain) {
591
+ portDomain.domainTypes.forEach(dt => {
592
+ if (dt.recommendedPrices && dt.recommendedPrices.length > 0) {
593
+ priceValue.priceOptions[dt.name] = dt.recommendedPrices;
594
+ }
595
+ else {
596
+ delete priceValue.priceOptions[dt.name];
597
+ }
598
+ });
599
+ }
600
+ }
601
+ section.priceValue = priceValue;
602
+ }
603
+ populateFormControls(section, form) {
604
+ form.controls[section.id] = this.createFormControl(section);
605
+ if (FormServiceUtils.isPortSection(section) || FormServiceUtils.isTypeSection(section)) {
606
+ form.controls[section.id.concat('qty')] = this.createQtyControl(section);
607
+ }
608
+ }
609
+ createFormControl(section) {
610
+ const value = FormServiceUtils.isPortSection(section) ? void 0 : section.sectionValue?.value;
611
+ return new FormControl(value, this.getFormControlValidators(section));
612
+ }
613
+ createQtyControl(section) {
614
+ const isTypeSection = FormServiceUtils.isTypeSection(section);
615
+ const validators = [];
616
+ const maxAllowed = this.getMaxAllowed(section);
617
+ //TODO TEMPORARY SOLUTION (WILL BE DISABLED ONCE RADIO CONTROLS IMPLEMENTED)
618
+ if (maxAllowed > 0) {
619
+ validators.push(this.getQuantityValidator(maxAllowed, isTypeSection ? section.model?.qty ?? 0 : 0));
620
+ }
621
+ const qtyValue = isTypeSection ? section.model?.qty : 1;
622
+ return new FormControl(qtyValue, validators);
623
+ }
624
+ getMaxAllowed(section) {
625
+ let lineItem = section.model;
626
+ let portName = section.boundData.name;
627
+ if (FormServiceUtils.isTypeSection(section)) {
628
+ if (section.model && EntityUtil.isPresent(section.model.parentId) && this.solutionLineItem) {
629
+ if (section.model.parentId) {
630
+ lineItem = LineItemUtil.findById(section.model.parentId, [this.solutionLineItem]);
631
+ }
632
+ portName = section.model.port;
633
+ }
634
+ else {
635
+ return 0;
636
+ }
637
+ }
638
+ if (!lineItem) {
639
+ return 0;
640
+ }
641
+ return SectionsBinderHelper.getMaxAllowed(lineItem, portName);
642
+ }
643
+ //TODO ALE TO SUPPORT EMPTY VALUES FOR INTERVAL ATTRIBUTES OUT OF DOMAIN
644
+ getFormControlValidators(section) {
645
+ if (!FormServiceUtils.isAttributeSection(section)) {
646
+ return null;
647
+ }
648
+ const validators = [];
649
+ const parentLineItem = section.model && this.solutionLineItem && FormServiceUtils.findParent(section.model.id, [this.solutionLineItem]);
650
+ const attribute = parentLineItem &&
651
+ parentLineItem.attributes.find(attr => attr.name.toLowerCase() === section.boundData.name.toLowerCase());
652
+ if (!attribute || !attribute.type) {
653
+ return null;
654
+ }
655
+ const primitiveTypesValidators = {
656
+ INT: TypeValidators.integerValidator(),
657
+ 'DOUBLE|DECIMAL': TypeValidators.decimalValidator(10),
658
+ };
659
+ keys(primitiveTypesValidators).forEach(types => {
660
+ if (types.match(attribute.type)) {
661
+ const validator = primitiveTypesValidators[types];
662
+ validators.push(validator);
663
+ }
664
+ });
665
+ if (!attribute.type.match('GENERIC|BOOLEAN|MULTIPLE')) {
666
+ const sectionLabel = section.label;
667
+ const intervalValidator = function (control) {
668
+ if (isUndefined(control.value) || isNull(control.value) || isNaN(+control.value)) {
669
+ return { interval: { message: sectionLabel + ' is not in domain' } };
670
+ }
671
+ if (!isUndefined(control.value) && isString(control.value) && control.value.length === 0) {
672
+ return null;
673
+ }
674
+ const attributeDomain = section.model?.attributeDomains[section.boundData.name];
675
+ const valid = attributeDomain?.some(valueOption => {
676
+ const min = +valueOption.min;
677
+ const max = +valueOption.max;
678
+ return +control.value <= max && +control.value >= min;
679
+ });
680
+ if (!valid) {
681
+ return { interval: { message: sectionLabel + ' is not in domain' } };
682
+ }
683
+ return null;
684
+ };
685
+ validators.push(intervalValidator);
686
+ }
687
+ if (section.required) {
688
+ validators.push(TypeValidators.requiredValidator(section.label + ' is required '));
689
+ }
690
+ return validators.length !== 0 ? validators : null;
691
+ }
692
+ getQuantityValidator(max, originalQty) {
693
+ return (control) => {
694
+ if (!control.value) {
695
+ return { quantity: { message: 'Required' } };
696
+ }
697
+ else if (isNaN(+control.value) || +control.value < 1) {
698
+ return { quantity: { message: 'Invalid value' } };
699
+ }
700
+ else if (+control.value > max + originalQty) {
701
+ return { quantity: { message: 'Max quantity ' + (max + originalQty) } };
702
+ }
703
+ else {
704
+ return null;
705
+ }
706
+ };
707
+ }
708
+ }
709
+ RuntimeFormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
710
+ RuntimeFormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeFormService });
711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeFormService, decorators: [{
712
+ type: Injectable
713
+ }] });
714
+ class FormServiceUtils {
715
+ static isPortSection(section) {
716
+ return section && section.boundData && section.boundData.entityType === BoundDataType[BoundDataType.PORT];
717
+ }
718
+ static isTypeSection(section) {
719
+ return section && section.boundData && section.boundData.entityType === BoundDataType[BoundDataType.TYPE];
720
+ }
721
+ static isAttributeSection(section) {
722
+ return section && section.boundData && section.boundData.entityType === BoundDataType[BoundDataType.ATTRIBUTE];
723
+ }
724
+ static findParent(parentId, lineItems) {
725
+ return EntityUtil.findByFieldHierarchically('id', parentId, lineItems, 'lineItems');
726
+ }
727
+ }
728
+
729
+ class ConfigurationService {
730
+ constructor(configurationApiService, contextService, dialogService) {
731
+ this.configurationApiService = configurationApiService;
732
+ this.contextService = contextService;
733
+ this.dialogService = dialogService;
734
+ }
735
+ configure(runtimeContext, states, resolve) {
736
+ const lineItem = (states && states.configurableRamp) || this.getDefaultLineItem(runtimeContext);
737
+ const configurationMode = resolve ? ConfigurationMode.RESOLVE : ConfigurationMode.SEARCH;
738
+ const configurationRequest = this.createRequest(lineItem, runtimeContext, configurationMode);
739
+ configurationRequest.lineItems = states.currentState || [];
740
+ configurationRequest.asset = states.asset;
741
+ const runtimeModel = runtimeContext.runtimeModel;
742
+ const pricingEnabled = runtimeContext.uiDefinition?.pricingEnabled;
743
+ return this.configurationApiService
744
+ .configureLineItem({
745
+ configurationRequest,
746
+ runtimeModel,
747
+ pricingEnabled,
748
+ })
749
+ .pipe(map(({ lineItem, context, deletedLineItems }) => {
750
+ if (context) {
751
+ this.contextService.update({ properties: context.properties });
752
+ }
753
+ if (deletedLineItems?.length) {
754
+ this.showInactiveProductsConfirmation();
755
+ }
756
+ return lineItem;
757
+ }));
758
+ }
759
+ createRequest(lineItem, runtimeContext, configurationMode) {
760
+ if (runtimeContext.runtimeMode === RuntimeMode.TEST) {
761
+ const properties = {
762
+ ...runtimeContext.properties,
763
+ ModelId: runtimeContext.modelId,
764
+ RuntimeMode: 'TEST',
765
+ PricingEnabled: String(runtimeContext.uiDefinition?.pricingEnabled),
766
+ StartDate: runtimeContext.properties?.StartDate ?? new Date().toISOString().substring(0, 10),
767
+ PriceListId: runtimeContext.uiDefinition?.priceList,
768
+ };
769
+ this.contextService.update({ properties });
770
+ }
771
+ else {
772
+ const context = this.contextService.resolve();
773
+ if (context.properties && runtimeContext.properties?.StartDate) {
774
+ this.contextService.update({
775
+ properties: {
776
+ ...context.properties,
777
+ ...runtimeContext.properties,
778
+ },
779
+ });
780
+ }
781
+ }
782
+ return {
783
+ lineItem,
784
+ mode: configurationMode,
785
+ step: runtimeContext.invocationContext && runtimeContext.invocationContext.runtimeStep,
786
+ attributeDomainMode: 'ALL',
787
+ context: this.contextService.resolve(),
788
+ };
789
+ }
790
+ getDefaultLineItem(context) {
791
+ const id = UUID.UUID();
792
+ const lineItem = {
793
+ id,
794
+ type: context.uiDefinition?.rootType ?? '',
795
+ cfgStatus: 'Default',
796
+ qty: 1,
797
+ productName: context.properties?.['displayName'] || context.productName,
798
+ productId: context.productId ?? '',
799
+ offeringId: context.offeringId,
800
+ ...(context.offeringId
801
+ ? { offeringId: context.offeringId, offeringInstanceId: context.offeringInstanceId || id }
802
+ : {}),
803
+ };
804
+ return lineItem;
805
+ }
806
+ showInactiveProductsConfirmation() {
807
+ const confirmationConfig = {
808
+ title: ' ',
809
+ description: 'This quote contains inactive products. Do you want to remove them?',
810
+ primaryButtonLabel: 'Remove products',
811
+ secondaryButtonLabel: 'Back to Quote',
812
+ };
813
+ this.dialogService
814
+ .open(ConfirmationComponent, {
815
+ dismissableMask: false,
816
+ closeOnEscape: false,
817
+ closable: false,
818
+ showHeader: true,
819
+ header: `Inactive Products in Quote`,
820
+ width: '440px',
821
+ data: { confirmationConfig },
822
+ })
823
+ .onClose.subscribe(result => {
824
+ if (!result) {
825
+ const context = this.contextService.resolve();
826
+ window['VELO_BACK_FN'].apply(null, [context.headerId]);
827
+ }
828
+ });
829
+ }
830
+ }
831
+ ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationService, deps: [{ token: i1.ConfigurationApiService }, { token: i2.ContextService }, { token: i3.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
832
+ ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationService });
833
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationService, decorators: [{
834
+ type: Injectable
835
+ }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }, { type: i2.ContextService }, { type: i3.DialogService }]; } });
836
+
837
+ class RuntimeService {
838
+ constructor(configurationService, contextService, messageService) {
839
+ this.configurationService = configurationService;
840
+ this.contextService = contextService;
841
+ this.messageService = messageService;
842
+ this.solutionReadySubject = new Subject();
843
+ this.onSolutionReadyEvent = this.solutionReadySubject.asObservable();
844
+ this.solutionUpdateStartedSubject = new Subject();
845
+ this.onSolutionUpdateStartedEvent = this.solutionUpdateStartedSubject.asObservable();
846
+ this.solutionUpdatedSubject = new Subject();
847
+ this.onSolutionUpdatedEvent = this.solutionUpdatedSubject.asObservable();
848
+ this.solutionProcessedSubject = new Subject();
849
+ this.onSolutionProcessed = this.solutionProcessedSubject.asObservable();
850
+ this.solutionStopSubject = new Subject();
851
+ this.onSolutionStopEvent = this.solutionStopSubject.asObservable();
852
+ this.solutionCancelSubject = new Subject();
853
+ this.onSolutionCancelEvent = this.solutionCancelSubject.asObservable();
854
+ this.uiRefreshSubject = new Subject();
855
+ this.onUIRefreshEvent = this.uiRefreshSubject.asObservable();
856
+ }
857
+ displayErrorMessage(error) {
858
+ this.messageService.add({
859
+ severity: 'error',
860
+ summary: error.error?.message || error.message || JSON.stringify(error),
861
+ });
862
+ }
863
+ startRuntime(context, states, resolve) {
864
+ this.setRuntimeContext(context);
865
+ this.setRuntimeStep(RuntimeStep.START);
866
+ this.configurationService
867
+ .configure(context, states, resolve)
868
+ .pipe(take(1))
869
+ .subscribe(lineItem => {
870
+ this.solutionReadySubject.next(lineItem);
871
+ }, error => {
872
+ this.displayErrorMessage(error);
873
+ this.solutionUpdatedSubject.next(error);
874
+ });
875
+ }
876
+ updateRuntime(states, configurationContextProperties) {
877
+ if (!this.runtimeContext) {
878
+ return;
879
+ }
880
+ this.solutionUpdateStartedSubject.next();
881
+ this.setRuntimeStep(RuntimeStep.UPDATE);
882
+ this.updateRuntimeContext(configurationContextProperties);
883
+ this.configurationService
884
+ .configure(this.runtimeContext, states)
885
+ .pipe(take(1))
886
+ .subscribe(lineItem => {
887
+ const context = this.contextService.resolve();
888
+ this.updateRuntimeContext(context.properties);
889
+ this.solutionUpdatedSubject.next(lineItem);
890
+ }, error => {
891
+ this.displayErrorMessage(error);
892
+ this.solutionUpdatedSubject.next(error);
893
+ });
894
+ }
895
+ stopRuntime(solutionLineItem) {
896
+ this.solutionStopSubject.next(solutionLineItem);
897
+ }
898
+ cancelRuntime() {
899
+ this.solutionCancelSubject.next();
900
+ }
901
+ setRuntimeContext(runtimeContext) {
902
+ this.runtimeContext = runtimeContext;
903
+ }
904
+ getRuntimeContext() {
905
+ return this.runtimeContext;
906
+ }
907
+ solutionProcessed(lineItem) {
908
+ this.solutionProcessedSubject.next(lineItem);
909
+ }
910
+ refreshUI(uiDefinition) {
911
+ if (!this.runtimeContext) {
912
+ return;
913
+ }
914
+ this.runtimeContext = {
915
+ ...this.runtimeContext,
916
+ uiDefinition,
917
+ };
918
+ this.uiRefreshSubject.next();
919
+ }
920
+ updateRuntimeContext(configurationContextProperties) {
921
+ if (!this.runtimeContext || !configurationContextProperties) {
922
+ return;
923
+ }
924
+ this.runtimeContext = { ...this.runtimeContext, properties: configurationContextProperties };
925
+ }
926
+ setRuntimeStep(runtimeStep) {
927
+ if (!this.runtimeContext) {
928
+ return;
929
+ }
930
+ this.runtimeContext.invocationContext = {
931
+ ...this.runtimeContext.invocationContext,
932
+ runtimeStep,
933
+ };
934
+ }
935
+ }
936
+ RuntimeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeService, deps: [{ token: ConfigurationService }, { token: i2.ContextService }, { token: i3$1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
937
+ RuntimeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeService });
938
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeService, decorators: [{
939
+ type: Injectable
940
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: i2.ContextService }, { type: i3$1.MessageService }]; } });
941
+
942
+ class ShoppingCartService {
943
+ constructor(priceApiService, contextService, quoteService) {
944
+ this.priceApiService = priceApiService;
945
+ this.contextService = contextService;
946
+ this.quoteService = quoteService;
947
+ }
948
+ setCartExternally(currentState) {
949
+ const context = this.contextService.resolve();
950
+ return this.priceApiService.calculate({ context, currentState }).pipe(take(1), tap(({ lineItems }) => {
951
+ this.quoteService.setCurrentLineItemState(lineItems);
952
+ }));
953
+ }
954
+ getCurrentState() {
955
+ return this.quoteService.currentState;
956
+ }
957
+ }
958
+ ShoppingCartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartService, deps: [{ token: i1.PriceApiService }, { token: i2.ContextService }, { token: i2.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Injectable });
959
+ ShoppingCartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartService });
960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartService, decorators: [{
961
+ type: Injectable
962
+ }], ctorParameters: function () { return [{ type: i1.PriceApiService }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
963
+
964
+ class CurrentStateService {
965
+ constructor() {
966
+ this.currentState = [];
967
+ }
968
+ update(state) {
969
+ this.currentState = state;
970
+ }
971
+ }
972
+ CurrentStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CurrentStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
973
+ CurrentStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CurrentStateService, providedIn: 'root' });
974
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CurrentStateService, decorators: [{
975
+ type: Injectable,
976
+ args: [{ providedIn: 'root' }]
977
+ }] });
978
+
979
+ class ProductModelCacheService {
980
+ constructor(productModelApiService) {
981
+ this.productModelApiService = productModelApiService;
982
+ this.cachedModel = new Map();
983
+ }
984
+ getProductModel(currentModelId, version) {
985
+ if (!this.cachedModel.has(currentModelId) || version) {
986
+ this.clearCache();
987
+ this.cachedModel.set(currentModelId, this.productModelApiService.load(currentModelId, version).pipe(shareReplay(1)));
988
+ }
989
+ return this.cachedModel.get(currentModelId);
990
+ }
991
+ getCachedModel() {
992
+ const ids = Array.from(this.cachedModel.keys());
993
+ return this.cachedModel.get(ids[0]);
994
+ }
995
+ clearCache() {
996
+ this.cachedModel.clear();
997
+ }
998
+ }
999
+ ProductModelCacheService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelCacheService, deps: [{ token: i1.ProductModelApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1000
+ ProductModelCacheService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelCacheService });
1001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelCacheService, decorators: [{
1002
+ type: Injectable
1003
+ }], ctorParameters: function () { return [{ type: i1.ProductModelApiService }]; } });
1004
+
1005
+ class RuntimeContextService {
1006
+ constructor(configurationApiService, messageService, contextService) {
1007
+ this.configurationApiService = configurationApiService;
1008
+ this.messageService = messageService;
1009
+ this.contextService = contextService;
1010
+ }
1011
+ getRuntimeContext(productId, offeringId) {
1012
+ return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(map(runtimeData => {
1013
+ const uiDefinition = this.getUIDefinition(runtimeData.uiDefinitions);
1014
+ const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
1015
+ const { productName, properties } = Array.from(runtimeModel.components.values()).find(c => c.productId === productId) ?? {};
1016
+ return {
1017
+ modelId: runtimeData.modelId,
1018
+ uiDefinition: uiDefinition,
1019
+ runtimeModel: runtimeModel,
1020
+ runtimeMode: RuntimeMode.PROD,
1021
+ productId: productId,
1022
+ productType: properties?.['displayName'] || productName,
1023
+ offeringId: offeringId,
1024
+ properties: {
1025
+ PricingEnabled: uiDefinition.pricingEnabled ? 'true' : 'false',
1026
+ },
1027
+ };
1028
+ }));
1029
+ }
1030
+ getUIDefinition(uiDefinitions = []) {
1031
+ const { uiDefinitionId } = this.contextService.resolve();
1032
+ const findByFn = (uiDef) => (uiDefinitionId ? uiDefinitionId === uiDef.id : uiDef.primary);
1033
+ const uiDefinition = uiDefinitions.find(findByFn) || (uiDefinitions.length === 1 && { ...uiDefinitions[0] });
1034
+ if (!uiDefinition) {
1035
+ const errMsg = `Unable to find ${uiDefinitionId ? uiDefinitionId : 'Default'} UI`;
1036
+ this.messageService.add({
1037
+ severity: 'error',
1038
+ summary: 'ERROR',
1039
+ });
1040
+ throw new Error(errMsg);
1041
+ }
1042
+ SectionPathUtil.updateSectionsPath(uiDefinition.sections);
1043
+ return uiDefinition;
1044
+ }
1045
+ }
1046
+ RuntimeContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeContextService, deps: [{ token: i1.ConfigurationApiService }, { token: i3$1.MessageService }, { token: i2.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
1047
+ RuntimeContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeContextService });
1048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeContextService, decorators: [{
1049
+ type: Injectable
1050
+ }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }, { type: i3$1.MessageService }, { type: i2.ContextService }]; } });
1051
+
1052
+ class SectionStoreService {
1053
+ constructor() {
1054
+ this._componentFactories = [];
1055
+ }
1056
+ set componentFactories(data) {
1057
+ this._componentFactories = data;
1058
+ }
1059
+ get componentFactories() {
1060
+ return this._componentFactories;
1061
+ }
1062
+ getComponentFactory(section) {
1063
+ return this.componentFactories.find(f => f.selector === section.dynamicSelector);
1064
+ }
1065
+ }
1066
+ SectionStoreService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1067
+ SectionStoreService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionStoreService });
1068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionStoreService, decorators: [{
1069
+ type: Injectable
1070
+ }] });
1071
+
1072
+ class SectionScopeService {
1073
+ constructor() {
1074
+ this.indent = 1;
1075
+ this.templates = new BehaviorSubject([]);
1076
+ }
1077
+ get section() {
1078
+ return this._section;
1079
+ }
1080
+ set section(value) {
1081
+ this._section = value;
1082
+ this.indent = this.getIndent(value);
1083
+ }
1084
+ getIndent(section) {
1085
+ if (!section || !section.parentId) {
1086
+ return 1;
1087
+ }
1088
+ else {
1089
+ let current = section;
1090
+ let indent = 1;
1091
+ while (current && current.parent) {
1092
+ current = current.parent;
1093
+ indent++;
1094
+ }
1095
+ return indent;
1096
+ }
1097
+ }
1098
+ }
1099
+ SectionScopeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionScopeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1100
+ SectionScopeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionScopeService });
1101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionScopeService, decorators: [{
1102
+ type: Injectable
1103
+ }] });
1104
+
1105
+ class ExecutionSectionRendererComponent {
1106
+ set section(value) {
1107
+ this._section = value;
1108
+ this.sectionScope.section = value;
1109
+ }
1110
+ get section() {
1111
+ return this._section;
1112
+ }
1113
+ constructor(_injector, _m, sectionScope, sectionStore) {
1114
+ this._injector = _injector;
1115
+ this._m = _m;
1116
+ this.sectionScope = sectionScope;
1117
+ this.sectionStore = sectionStore;
1118
+ this.componentRef = null;
1119
+ }
1120
+ ngOnInit() {
1121
+ this.renderSection();
1122
+ }
1123
+ ngAfterViewInit() {
1124
+ if (this.componentRef) {
1125
+ this.sectionScope.templates.next(this.componentRef.instance['templates']?.toArray() ?? []);
1126
+ }
1127
+ }
1128
+ ngOnDestroy() {
1129
+ if (this.componentRef) {
1130
+ this.componentRef.destroy();
1131
+ this.componentRef = null;
1132
+ }
1133
+ }
1134
+ renderSection() {
1135
+ if (this.componentRef) {
1136
+ this.componentRef.destroy();
1137
+ this.componentRef = null;
1138
+ }
1139
+ const componentFactory = this.sectionStore.getComponentFactory(this._section);
1140
+ if (!componentFactory) {
1141
+ return;
1142
+ }
1143
+ this.componentRef = componentFactory.create(this._injector, [], null, this._m);
1144
+ this.componentRef.location.nativeElement.setAttribute('sectionId', `${this._section.model?.id}${this._section.label}`);
1145
+ this.componentRef.instance['form'] = this.form;
1146
+ this.componentRef.instance['section'] = this.section;
1147
+ this.container.insert(this.componentRef.hostView);
1148
+ }
1149
+ }
1150
+ ExecutionSectionRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ExecutionSectionRendererComponent, deps: [{ token: i0.Injector }, { token: i0.NgModuleRef }, { token: SectionScopeService }, { token: SectionStoreService }], target: i0.ɵɵFactoryTarget.Component });
1151
+ ExecutionSectionRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ExecutionSectionRendererComponent, selector: "section-renderer", inputs: { section: "section", form: "form" }, providers: [SectionScopeService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-template #container></ng-template>", styles: [":host{display:contents}\n"] });
1152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ExecutionSectionRendererComponent, decorators: [{
1153
+ type: Component,
1154
+ args: [{ selector: 'section-renderer', providers: [SectionScopeService], template: "<ng-template #container></ng-template>", styles: [":host{display:contents}\n"] }]
1155
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.NgModuleRef }, { type: SectionScopeService }, { type: SectionStoreService }]; }, propDecorators: { section: [{
1156
+ type: Input
1157
+ }], form: [{
1158
+ type: Input
1159
+ }], container: [{
1160
+ type: ViewChild,
1161
+ args: ['container', { read: ViewContainerRef, static: true }]
1162
+ }] } });
1163
+
1164
+ class ChildrenPlaceholderComponent {
1165
+ constructor(sectionScope, formScope, collapsibleState) {
1166
+ this.sectionScope = sectionScope;
1167
+ this.formScope = formScope;
1168
+ this.collapsibleState = collapsibleState;
1169
+ this._children = [];
1170
+ this.collapsed = false;
1171
+ }
1172
+ ngOnInit() {
1173
+ this.section = this.sectionScope.section;
1174
+ this.form = this.formScope.form;
1175
+ this.collapsed = this.section.model ? this.collapsibleState.isCollapsedSection(this.section.model.id) : true;
1176
+ this.sub = this.collapsibleState.collapseSectionEvent.subscribe(e => {
1177
+ const lineItemId = e[0];
1178
+ if (this.section.model?.id === lineItemId) {
1179
+ this.collapsed = e[1];
1180
+ }
1181
+ });
1182
+ this.setChildren();
1183
+ }
1184
+ ngOnChanges(changes) {
1185
+ if (!this.children || changes['children']?.currentValue !== changes['children']?.previousValue) {
1186
+ this.setChildren();
1187
+ }
1188
+ }
1189
+ setChildren() {
1190
+ this._children = this.children ? this.children : this.section.children;
1191
+ }
1192
+ ngOnDestroy() {
1193
+ this.sub.unsubscribe();
1194
+ }
1195
+ }
1196
+ ChildrenPlaceholderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ChildrenPlaceholderComponent, deps: [{ token: SectionScopeService }, { token: FormScopeService }, { token: CollapsibleStateService }], target: i0.ɵɵFactoryTarget.Component });
1197
+ ChildrenPlaceholderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ChildrenPlaceholderComponent, selector: "children-placeholder", inputs: { children: "children" }, providers: [OrderByPipe], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!collapsed\">\n <ng-container *ngFor=\"let child of _children\">\n <section-renderer [section]=\"child\" [form]=\"form\" *ngIf=\"!child.hidden\"></section-renderer>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ExecutionSectionRendererComponent, selector: "section-renderer", inputs: ["section", "form"] }] });
1198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ChildrenPlaceholderComponent, decorators: [{
1199
+ type: Component,
1200
+ args: [{ selector: 'children-placeholder', providers: [OrderByPipe], template: "<ng-container *ngIf=\"!collapsed\">\n <ng-container *ngFor=\"let child of _children\">\n <section-renderer [section]=\"child\" [form]=\"form\" *ngIf=\"!child.hidden\"></section-renderer>\n </ng-container>\n</ng-container>\n" }]
1201
+ }], ctorParameters: function () { return [{ type: SectionScopeService }, { type: FormScopeService }, { type: CollapsibleStateService }]; }, propDecorators: { children: [{
1202
+ type: Input
1203
+ }] } });
1204
+ class TemplateComponent extends ChildrenPlaceholderComponent {
1205
+ }
1206
+ TemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TemplateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1207
+ TemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: TemplateComponent, selector: "template-component", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!collapsed\">\n <ng-container *ngFor=\"let child of _children\">\n <section-renderer [section]=\"child\" [form]=\"form\" *ngIf=\"!child.hidden\"></section-renderer>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ExecutionSectionRendererComponent, selector: "section-renderer", inputs: ["section", "form"] }] });
1208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TemplateComponent, decorators: [{
1209
+ type: Component,
1210
+ args: [{ selector: 'template-component', template: "<ng-container *ngIf=\"!collapsed\">\n <ng-container *ngFor=\"let child of _children\">\n <section-renderer [section]=\"child\" [form]=\"form\" *ngIf=\"!child.hidden\"></section-renderer>\n </ng-container>\n</ng-container>\n" }]
1211
+ }] });
1212
+
1213
+ class ContextProviderComponent {
1214
+ constructor(runtimeService) {
1215
+ this.runtimeService = runtimeService;
1216
+ this.types = [];
1217
+ this.products = {};
1218
+ }
1219
+ ngOnInit() {
1220
+ const context = this.runtimeService.getRuntimeContext();
1221
+ if (!context) {
1222
+ return;
1223
+ }
1224
+ this.runtimeService.setRuntimeContext({
1225
+ ...context,
1226
+ runtimeModel: RuntimeModel.create(this.types, this.products),
1227
+ });
1228
+ }
1229
+ }
1230
+ ContextProviderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextProviderComponent, deps: [{ token: RuntimeService }], target: i0.ɵɵFactoryTarget.Component });
1231
+ ContextProviderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ContextProviderComponent, selector: "vl-context-provider", inputs: { types: "types", products: "products" }, ngImport: i0, template: '', isInline: true });
1232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextProviderComponent, decorators: [{
1233
+ type: Component,
1234
+ args: [{
1235
+ selector: 'vl-context-provider',
1236
+ template: '',
1237
+ }]
1238
+ }], ctorParameters: function () { return [{ type: RuntimeService, decorators: [{
1239
+ type: Inject,
1240
+ args: [RuntimeService]
1241
+ }] }]; }, propDecorators: { types: [{
1242
+ type: Input
1243
+ }], products: [{
1244
+ type: Input
1245
+ }] } });
1246
+
1247
+ const moduleMap = {};
1248
+ function loadRemoteEntry(remoteEntry) {
1249
+ return new Promise((resolve, reject) => {
1250
+ if (moduleMap[remoteEntry]) {
1251
+ resolve();
1252
+ return;
1253
+ }
1254
+ const script = document.createElement('script');
1255
+ script.src = remoteEntry;
1256
+ script.onerror = reject;
1257
+ script.onload = () => {
1258
+ moduleMap[remoteEntry] = true;
1259
+ resolve(); // window is the global namespace
1260
+ };
1261
+ document.body.append(script);
1262
+ });
1263
+ }
1264
+ async function lookupExposedModule(remoteName, exposedModule) {
1265
+ // Initializes the share scope. This fills it with known provided modules from this build and all remotes
1266
+ await __webpack_init_sharing__('default');
1267
+ const container = window[remoteName]; // or get the container somewhere else
1268
+ // Initialize the container, it may provide shared modules
1269
+ await container.init(__webpack_share_scopes__.default);
1270
+ const factory = await container.get(exposedModule);
1271
+ const Module = factory();
1272
+ return Module;
1273
+ }
1274
+ async function loadRemoteModule(options) {
1275
+ await loadRemoteEntry(options.remoteEntry);
1276
+ return await lookupExposedModule(options.remoteName, options.exposedModule);
1277
+ }
1278
+
1279
+ var IntegrationEvent;
1280
+ (function (IntegrationEvent) {
1281
+ IntegrationEvent["Init"] = "Init";
1282
+ })(IntegrationEvent || (IntegrationEvent = {}));
1283
+ class FederatedComponent {
1284
+ constructor(injector, compiler, appRef, renderer) {
1285
+ this.injector = injector;
1286
+ this.compiler = compiler;
1287
+ this.appRef = appRef;
1288
+ this.renderer = renderer;
1289
+ this.integrationEvent = new EventEmitter();
1290
+ this.moduleReady = false;
1291
+ }
1292
+ ngAfterViewInit() {
1293
+ if (!this.remoteEntry || !this.remoteName || !this.exposedModule) {
1294
+ return;
1295
+ }
1296
+ loadRemoteModule({
1297
+ remoteEntry: this.remoteEntry,
1298
+ remoteName: this.remoteName,
1299
+ exposedModule: this.exposedModule,
1300
+ }).then(federated => {
1301
+ this.compiler.compileModuleAsync(federated[this.exposedModule]).then(moduleFactory => {
1302
+ const rootModuleRef = moduleFactory.create(this.injector);
1303
+ const rootComponentFactory = rootModuleRef.componentFactoryResolver.resolveComponentFactory(federated[this.exposedModule].rootComponent);
1304
+ const node = document.createElement('div');
1305
+ const { instance, hostView } = rootComponentFactory.create(this.injector, [], node);
1306
+ this.instance = instance;
1307
+ this.instance.data = this.data;
1308
+ this.instance.eventData = this.eventData;
1309
+ this.instance.integrationEvent = this.integrationEvent;
1310
+ this.renderer.appendChild(this.moduleHostRef?.nativeElement, node);
1311
+ this.appRef.attachView(hostView);
1312
+ });
1313
+ });
1314
+ }
1315
+ ngOnChanges(changes) {
1316
+ if (!this.instance) {
1317
+ return;
1318
+ }
1319
+ this.instance.ngOnChanges(changes);
1320
+ }
1321
+ }
1322
+ FederatedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FederatedComponent, deps: [{ token: i0.Injector }, { token: i0.Compiler }, { token: i0.ApplicationRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1323
+ FederatedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: FederatedComponent, selector: "veloce-host-federated", inputs: { remoteEntry: "remoteEntry", remoteName: "remoteName", exposedModule: "exposedModule", data: "data", eventData: "eventData" }, outputs: { integrationEvent: "integrationEvent" }, viewQueries: [{ propertyName: "federatedComponent", first: true, predicate: ["federatedComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "foo", first: true, predicate: ["foo"], descendants: true, read: TemplateRef }, { propertyName: "moduleHostRef", first: true, predicate: ["moduleHost"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #moduleHost></div>\n", styles: [":host{display:block}div{height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FederatedComponent, decorators: [{
1325
+ type: Component,
1326
+ args: [{ selector: 'veloce-host-federated', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #moduleHost></div>\n", styles: [":host{display:block}div{height:100%}\n"] }]
1327
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }, { type: i0.ApplicationRef }, { type: i0.Renderer2 }]; }, propDecorators: { federatedComponent: [{
1328
+ type: ViewChild,
1329
+ args: ['federatedComponent', { read: ViewContainerRef }]
1330
+ }], foo: [{
1331
+ type: ViewChild,
1332
+ args: ['foo', { read: TemplateRef }]
1333
+ }], moduleHostRef: [{
1334
+ type: ViewChild,
1335
+ args: ['moduleHost', { static: false }]
1336
+ }], remoteEntry: [{
1337
+ type: Input
1338
+ }], remoteName: [{
1339
+ type: Input
1340
+ }], exposedModule: [{
1341
+ type: Input
1342
+ }], data: [{
1343
+ type: Input
1344
+ }], eventData: [{
1345
+ type: Input
1346
+ }], integrationEvent: [{
1347
+ type: Output
1348
+ }] } });
1349
+
1350
+ //TODO ALE WE ARE EXTENDING COMPONENT HERE IN PORTS WE ARE EXTENDING DEDICATED CLASS!! TYPES HANDLER IS NO IMPLEMENTED YET
1351
+ class VeloAttributeDirective {
1352
+ constructor(formScope, sectionScope) {
1353
+ this.formScope = formScope;
1354
+ this.sectionScope = sectionScope;
1355
+ this.valueQuantities = {};
1356
+ this.form = this.formScope.form;
1357
+ this.section = this.sectionScope.section;
1358
+ }
1359
+ ngOnInit() {
1360
+ this.initQuantity();
1361
+ }
1362
+ handleChange(valueOption) {
1363
+ const updateData = {
1364
+ id: this.section.id,
1365
+ action: 'update',
1366
+ valueOption,
1367
+ };
1368
+ this.formScope.publishFormUpdate(updateData);
1369
+ }
1370
+ handleChangDate(valueOption) {
1371
+ const oldValue = this.form.controls[this.section.id].value || '';
1372
+ const newValue = isDate(valueOption) ? valueOption.toLocaleDateString('en-us') : '';
1373
+ if (oldValue !== newValue) {
1374
+ this.handleChange(newValue);
1375
+ }
1376
+ }
1377
+ handleRemove() {
1378
+ const updateData = {
1379
+ id: this.section.id,
1380
+ action: 'remove',
1381
+ };
1382
+ this.formScope.publishFormUpdate(updateData);
1383
+ }
1384
+ // TODO ALE THIS IS SPECIFIC STEPPER FUNCTIONS
1385
+ nextVal() {
1386
+ const currentIndex = this.getCurrentValueIndex();
1387
+ const nextValIndex = currentIndex + 1;
1388
+ if (currentIndex != -1 &&
1389
+ this.section.sectionValue &&
1390
+ this.section.sectionValue.valueOptions.length >= nextValIndex) {
1391
+ this.handleChange(this.section.sectionValue.valueOptions[nextValIndex]);
1392
+ }
1393
+ }
1394
+ prevVal() {
1395
+ const currentIndex = this.getCurrentValueIndex();
1396
+ const prevValIndex = currentIndex - 1;
1397
+ if (currentIndex != -1 &&
1398
+ this.section.sectionValue &&
1399
+ this.section.sectionValue.valueOptions.length >= prevValIndex) {
1400
+ this.handleChange(this.section.sectionValue.valueOptions[prevValIndex]);
1401
+ }
1402
+ }
1403
+ initQuantity() {
1404
+ this.valueQuantities = this.section.model
1405
+ ? SectionsBinderHelper.getQuantityGroupByValue(this.section.model, this.section.boundData.name)
1406
+ : {};
1407
+ }
1408
+ getCurrentValueIndex() {
1409
+ const index = -1;
1410
+ const valueOptions = this.section.sectionValue && this.section.sectionValue.valueOptions;
1411
+ const currentValue = this.form.controls[this.section.id].value;
1412
+ if (valueOptions && EntityUtil.isPresent(currentValue)) {
1413
+ return valueOptions.findIndex(valueOption => currentValue === valueOption);
1414
+ }
1415
+ return index;
1416
+ }
1417
+ }
1418
+ VeloAttributeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloAttributeDirective, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Directive });
1419
+ VeloAttributeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: VeloAttributeDirective, selector: "velo-attribute-directive", exportAs: ["attributeApi"], ngImport: i0 });
1420
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloAttributeDirective, decorators: [{
1421
+ type: Directive,
1422
+ args: [{
1423
+ // eslint-disable-next-line @angular-eslint/directive-selector
1424
+ selector: 'velo-attribute-directive',
1425
+ exportAs: 'attributeApi',
1426
+ }]
1427
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
1428
+
1429
+ class MultiselectComponent {
1430
+ constructor(elRef, viewContainerRef, overlay) {
1431
+ this.elRef = elRef;
1432
+ this.viewContainerRef = viewContainerRef;
1433
+ this.overlay = overlay;
1434
+ this.selectionChange = new EventEmitter();
1435
+ this.selected = [];
1436
+ this.displayValue = '';
1437
+ this.touched = false;
1438
+ this.disabled = false;
1439
+ this.opened = false;
1440
+ this.onChange = () => {
1441
+ return;
1442
+ };
1443
+ this.onTouched = () => {
1444
+ return;
1445
+ };
1446
+ }
1447
+ ngOnDestroy() {
1448
+ this.destroyDropdown();
1449
+ }
1450
+ writeValue(selected) {
1451
+ this.selected = selected;
1452
+ this.getDisplayValue();
1453
+ }
1454
+ registerOnChange(onChange) {
1455
+ this.onChange = onChange;
1456
+ }
1457
+ registerOnTouched(onTouched) {
1458
+ this.onTouched = onTouched;
1459
+ }
1460
+ setDisabledState(disabled) {
1461
+ this.disabled = disabled;
1462
+ }
1463
+ handleSelection(value) {
1464
+ const selectedItem = this.selected.find(item => item === value);
1465
+ if (selectedItem) {
1466
+ this.selected = this.selected.filter(item => item !== value);
1467
+ }
1468
+ else {
1469
+ this.selected = [...this.selected, value];
1470
+ }
1471
+ this.getDisplayValue();
1472
+ this.selectionChange.emit(this.selected);
1473
+ this.onChange(this.selected);
1474
+ }
1475
+ toggleOpened() {
1476
+ this.opened ? this.destroyDropdown() : this.openDropdown();
1477
+ }
1478
+ getDisplayValue() {
1479
+ const joinedValue = this.selected.join(', ');
1480
+ this.displayValue = joinedValue.length > 24 ? `${this.selected.length} options selected` : joinedValue;
1481
+ }
1482
+ openDropdown() {
1483
+ this.opened = true;
1484
+ this.overlayRef = this.overlay.create({
1485
+ hasBackdrop: true,
1486
+ backdropClass: 'cdk-overlay-transparent-backdrop',
1487
+ scrollStrategy: this.overlay.scrollStrategies.close(),
1488
+ positionStrategy: this.overlay
1489
+ .position()
1490
+ .flexibleConnectedTo(this.elRef)
1491
+ .withPositions([
1492
+ {
1493
+ originX: 'end',
1494
+ originY: 'bottom',
1495
+ overlayX: 'end',
1496
+ overlayY: 'top',
1497
+ offsetY: 8,
1498
+ },
1499
+ ]),
1500
+ });
1501
+ const templatePortal = new TemplatePortal(this.overlayTemplate, this.viewContainerRef);
1502
+ this.overlayRef.attach(templatePortal);
1503
+ this.dropdownClosingActionsSub = this.dropdownClosingActions().subscribe(() => this.destroyDropdown());
1504
+ }
1505
+ dropdownClosingActions() {
1506
+ if (!this.overlayRef) {
1507
+ return of();
1508
+ }
1509
+ const backdropClick$ = this.overlayRef.backdropClick();
1510
+ const detachment$ = this.overlayRef.detachments();
1511
+ return merge(backdropClick$, detachment$);
1512
+ }
1513
+ destroyDropdown() {
1514
+ if (!this.overlayRef || !this.opened) {
1515
+ return;
1516
+ }
1517
+ this.dropdownClosingActionsSub?.unsubscribe();
1518
+ this.opened = false;
1519
+ this.overlayRef.detach();
1520
+ }
1521
+ }
1522
+ MultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MultiselectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
1523
+ MultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: MultiselectComponent, selector: "velo-multiselect", inputs: { options: "options" }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class.opened": "this.opened" } }, providers: [
1524
+ {
1525
+ provide: NG_VALUE_ACCESSOR,
1526
+ multi: true,
1527
+ useExisting: MultiselectComponent,
1528
+ },
1529
+ ], viewQueries: [{ propertyName: "overlayTemplate", first: true, predicate: ["overlayTemplate"], descendants: true }], ngImport: i0, template: "<div class=\"value-wrapper\" (click)=\"toggleOpened()\">\n <span class=\"value\">{{ displayValue }}</span>\n <i class=\"fa fa-chevron-down\"></i>\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"dropdown\">\n <div class=\"checkbox-select\" *ngFor=\"let option of options\">\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"selected.includes(option)\"\n (change)=\"handleSelection(option)\"\n [value]=\"option\"\n />\n\n <i class=\"input-helper\"></i>\n {{ option }}\n </label>\n </div>\n </div>\n</ng-template>\n", styles: [":host{display:block;width:172px}:host[disabled] .value-wrapper{pointer-events:none;background:rgba(0,0,0,.06);border-color:#0003}:host.opened .value-wrapper{border-color:#0e8fff}:host.opened i{transform:rotate(180deg)}:host .value-wrapper{cursor:pointer;display:flex;align-items:center;justify-content:space-between;height:34px;padding:0 10px;border:1px solid #ddd;border-radius:3px;background:#fff}:host .value-wrapper .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dropdown{width:172px;max-height:200px;background:#fff;border:1px solid #ddd;border-radius:3px;overflow:auto}.dropdown .checkbox-select{padding:0 10px;width:100%}.dropdown .checkbox-select label{width:100%;height:36px;line-height:36px}.dropdown .checkbox-select .input-helper:before{top:10px}.dropdown .checkbox-select .input-helper:after{top:12px}.dropdown .checkbox-select:hover{background:#d5dddf}\n"], dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MultiselectComponent, decorators: [{
1531
+ type: Component,
1532
+ args: [{ selector: 'velo-multiselect', providers: [
1533
+ {
1534
+ provide: NG_VALUE_ACCESSOR,
1535
+ multi: true,
1536
+ useExisting: MultiselectComponent,
1537
+ },
1538
+ ], template: "<div class=\"value-wrapper\" (click)=\"toggleOpened()\">\n <span class=\"value\">{{ displayValue }}</span>\n <i class=\"fa fa-chevron-down\"></i>\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"dropdown\">\n <div class=\"checkbox-select\" *ngFor=\"let option of options\">\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"selected.includes(option)\"\n (change)=\"handleSelection(option)\"\n [value]=\"option\"\n />\n\n <i class=\"input-helper\"></i>\n {{ option }}\n </label>\n </div>\n </div>\n</ng-template>\n", styles: [":host{display:block;width:172px}:host[disabled] .value-wrapper{pointer-events:none;background:rgba(0,0,0,.06);border-color:#0003}:host.opened .value-wrapper{border-color:#0e8fff}:host.opened i{transform:rotate(180deg)}:host .value-wrapper{cursor:pointer;display:flex;align-items:center;justify-content:space-between;height:34px;padding:0 10px;border:1px solid #ddd;border-radius:3px;background:#fff}:host .value-wrapper .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dropdown{width:172px;max-height:200px;background:#fff;border:1px solid #ddd;border-radius:3px;overflow:auto}.dropdown .checkbox-select{padding:0 10px;width:100%}.dropdown .checkbox-select label{width:100%;height:36px;line-height:36px}.dropdown .checkbox-select .input-helper:before{top:10px}.dropdown .checkbox-select .input-helper:after{top:12px}.dropdown .checkbox-select:hover{background:#d5dddf}\n"] }]
1539
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1$1.Overlay }]; }, propDecorators: { options: [{
1540
+ type: Input
1541
+ }], selectionChange: [{
1542
+ type: Output
1543
+ }], overlayTemplate: [{
1544
+ type: ViewChild,
1545
+ args: ['overlayTemplate']
1546
+ }], opened: [{
1547
+ type: HostBinding,
1548
+ args: ['class.opened']
1549
+ }] } });
1550
+
1551
+ class VeloAttributeComponent extends VeloAttributeDirective {
1552
+ constructor(formScope, sectionScope) {
1553
+ super(formScope, sectionScope);
1554
+ this.controlName = this.section.id;
1555
+ this.displayName = this.getDisplayName();
1556
+ this.isMultiselect =
1557
+ this.section.model?.attributes.find(attr => attr.name === this.section.boundData.entity.name)?.type ===
1558
+ 'MULTIPLE';
1559
+ }
1560
+ getValueOptions(valueOptions) {
1561
+ return this.isBooleanType(valueOptions) ? [0, 1] : valueOptions;
1562
+ }
1563
+ getValueText(valueOptions, value) {
1564
+ if (this.isBooleanType(valueOptions)) {
1565
+ return value === 0 ? 'False' : 'True';
1566
+ }
1567
+ return value;
1568
+ }
1569
+ handleMultiselectChange(value) {
1570
+ const formControl = this.form.get(this.controlName);
1571
+ if (!formControl) {
1572
+ return;
1573
+ }
1574
+ const currentValue = formControl.value ?? [];
1575
+ const newValue = currentValue.includes(value) ? currentValue.filter(v => v !== value) : [...currentValue, value];
1576
+ formControl.setValue(newValue);
1577
+ super.handleChange();
1578
+ }
1579
+ handleMultipleDropdownChange(event) {
1580
+ const formControl = this.form.get(this.controlName);
1581
+ if (!formControl) {
1582
+ return;
1583
+ }
1584
+ formControl.setValue(event);
1585
+ super.handleChange();
1586
+ }
1587
+ isBooleanType(value) {
1588
+ return Array.isArray(value) && value.length === 1 && value[0].min === 0 && value[0].max === 1;
1589
+ }
1590
+ getDisplayName() {
1591
+ return ((this.section.model?.properties && this.section.model.properties['displayName']) || this.section.model?.type || '');
1592
+ }
1593
+ }
1594
+ VeloAttributeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloAttributeComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Component });
1595
+ VeloAttributeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloAttributeComponent, selector: "velo-attribute", usesInheritance: true, ngImport: i0, template: "<div class=\"form-group div-inline\" [formGroup]=\"form\">\n <div class=\"input-form-input div-inline\" [class.input-form-input--required]=\"section.required\">\n <label>\n <ng-container *ngIf=\"section.required\"> * </ng-container>\n\n {{ section.label }}\n </label>\n <div [ngSwitch]=\"section.controlType\" class=\"form-control-wrapper\">\n <div *ngSwitchCase=\"'DROPDOWN'\">\n <select\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n class=\"form-control\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <option\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions) || []\"\n [ngValue]=\"valueOption\"\n >\n {{ getValueText(section.sectionValue?.valueOptions, valueOption) }}\n </option>\n </select>\n </div>\n\n <div *ngSwitchCase=\"'MULTISELECT'\">\n <velo-multiselect\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [options]=\"getValueOptions(section.sectionValue?.valueOptions)\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n (selectionChange)=\"handleMultipleDropdownChange($event)\"\n ></velo-multiselect>\n </div>\n\n <div *ngSwitchCase=\"'RADIO'\">\n <div\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions)\"\n class=\"radio-button\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <label>\n <input\n type=\"radio\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [value]=\"valueOption\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n <i class=\"input-helper\"></i>\n {{ getValueText(section.sectionValue?.valueOptions, valueOption) }}\n </label>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'CHECKBOX'\">\n <ng-container *ngIf=\"!isMultiselect; else multiselect\">\n <div class=\"checkbox-select\" [attr.disabled]=\"section.readOnly ? true : null\">\n <label>\n <input\n type=\"checkbox\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [checked]=\"section.sectionValue?.value === 1\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n\n <i class=\"input-helper\"></i>\n &nbsp;\n </label>\n </div>\n </ng-container>\n\n <ng-template #multiselect>\n <div\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions)\"\n class=\"checkbox-select\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <label>\n <input\n type=\"checkbox\"\n [id]=\"controlName\"\n [checked]=\"section.sectionValue?.value.includes(valueOption)\"\n (change)=\"handleMultiselectChange(valueOption)\"\n [value]=\"valueOption\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n\n <i class=\"input-helper\"></i>\n {{ valueOption }}\n </label>\n </div>\n </ng-template>\n </div>\n\n <div *ngSwitchCase=\"'DATE'\">\n <input\n type=\"text\"\n class=\"form-control\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n (bsValueChange)=\"handleChangDate($event)\"\n bsDatepicker\n />\n </div>\n\n <div *ngSwitchDefault>\n <input\n type=\"text\"\n class=\"form-control\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n (blur)=\"form.controls[controlName].dirty && handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n </div>\n\n <!-- Add validation messages -->\n <!-- <div validation-messages [form]=\"form\" [controlId]=\"controlName\" [showForPristine]=\"true\"></div> -->\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i4.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MultiselectComponent, selector: "velo-multiselect", inputs: ["options"], outputs: ["selectionChange"] }] });
1596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloAttributeComponent, decorators: [{
1597
+ type: Component,
1598
+ args: [{ selector: 'velo-attribute', template: "<div class=\"form-group div-inline\" [formGroup]=\"form\">\n <div class=\"input-form-input div-inline\" [class.input-form-input--required]=\"section.required\">\n <label>\n <ng-container *ngIf=\"section.required\"> * </ng-container>\n\n {{ section.label }}\n </label>\n <div [ngSwitch]=\"section.controlType\" class=\"form-control-wrapper\">\n <div *ngSwitchCase=\"'DROPDOWN'\">\n <select\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n class=\"form-control\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <option\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions) || []\"\n [ngValue]=\"valueOption\"\n >\n {{ getValueText(section.sectionValue?.valueOptions, valueOption) }}\n </option>\n </select>\n </div>\n\n <div *ngSwitchCase=\"'MULTISELECT'\">\n <velo-multiselect\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [options]=\"getValueOptions(section.sectionValue?.valueOptions)\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n (selectionChange)=\"handleMultipleDropdownChange($event)\"\n ></velo-multiselect>\n </div>\n\n <div *ngSwitchCase=\"'RADIO'\">\n <div\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions)\"\n class=\"radio-button\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <label>\n <input\n type=\"radio\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [value]=\"valueOption\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n <i class=\"input-helper\"></i>\n {{ getValueText(section.sectionValue?.valueOptions, valueOption) }}\n </label>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'CHECKBOX'\">\n <ng-container *ngIf=\"!isMultiselect; else multiselect\">\n <div class=\"checkbox-select\" [attr.disabled]=\"section.readOnly ? true : null\">\n <label>\n <input\n type=\"checkbox\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [checked]=\"section.sectionValue?.value === 1\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n\n <i class=\"input-helper\"></i>\n &nbsp;\n </label>\n </div>\n </ng-container>\n\n <ng-template #multiselect>\n <div\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions)\"\n class=\"checkbox-select\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <label>\n <input\n type=\"checkbox\"\n [id]=\"controlName\"\n [checked]=\"section.sectionValue?.value.includes(valueOption)\"\n (change)=\"handleMultiselectChange(valueOption)\"\n [value]=\"valueOption\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n\n <i class=\"input-helper\"></i>\n {{ valueOption }}\n </label>\n </div>\n </ng-template>\n </div>\n\n <div *ngSwitchCase=\"'DATE'\">\n <input\n type=\"text\"\n class=\"form-control\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n (bsValueChange)=\"handleChangDate($event)\"\n bsDatepicker\n />\n </div>\n\n <div *ngSwitchDefault>\n <input\n type=\"text\"\n class=\"form-control\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n (blur)=\"form.controls[controlName].dirty && handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n </div>\n\n <!-- Add validation messages -->\n <!-- <div validation-messages [form]=\"form\" [controlId]=\"controlName\" [showForPristine]=\"true\"></div> -->\n </div>\n </div>\n</div>\n" }]
1599
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
1600
+
1601
+ class VeloPortCheckBoxComponent {
1602
+ constructor(formScope, sectionScope) {
1603
+ this.formScope = formScope;
1604
+ this.sectionScope = sectionScope;
1605
+ this.showSelectAll = false;
1606
+ this.form = this.formScope.form;
1607
+ this.section = this.sectionScope.section;
1608
+ this.controlName = this.section.id;
1609
+ this.section.sectionValue?.valueOptions.forEach(item => {
1610
+ if (this.hasValueFor(item)) {
1611
+ this.form.controls[this.controlName].setValue(item);
1612
+ }
1613
+ });
1614
+ }
1615
+ handleChange(valueOption) {
1616
+ const updateData = {
1617
+ id: this.section.id,
1618
+ action: this.hasValueFor(valueOption)
1619
+ ? 'remove'
1620
+ : this.section.model && SectionsBinderHelper.isAddAllowed(this.section.model, this.section.boundData.name)
1621
+ ? 'create'
1622
+ : 'update',
1623
+ valueOption,
1624
+ };
1625
+ this.formScope.publishFormUpdate(updateData);
1626
+ }
1627
+ hasValueFor(valueOption) {
1628
+ return !!this.findLineItemForValue(valueOption);
1629
+ }
1630
+ selectAllChange() {
1631
+ const portDomain = this.section.model?.portDomains[this.section.boundData.name];
1632
+ const updateData = {
1633
+ id: this.section.id,
1634
+ action: 'upsert',
1635
+ selectedValueOptions: this.isAllSelected() ? [] : portDomain ? portDomain.domainTypes.map(t => t.name) : [],
1636
+ };
1637
+ this.formScope.publishFormUpdate(updateData);
1638
+ }
1639
+ isAllSelected() {
1640
+ const selected = this.section.model?.lineItems.filter(li => li.port && li.port === this.section.boundData.name);
1641
+ const portDomain = this.section.model?.portDomains[this.section.boundData.name];
1642
+ return portDomain ? portDomain.domainTypes.length === selected?.length : false;
1643
+ }
1644
+ getMessages(valueOption) {
1645
+ if (this.section.model?.lineItems) {
1646
+ return this.findLineItemForValue(valueOption)?.messages ?? [];
1647
+ }
1648
+ return [];
1649
+ }
1650
+ findLineItemForValue(valueOption) {
1651
+ return (this.section.model?.lineItems &&
1652
+ this.section.model.lineItems.find(li => li.type && li.type.toLowerCase() === valueOption.toLowerCase()));
1653
+ }
1654
+ }
1655
+ VeloPortCheckBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortCheckBoxComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Component });
1656
+ VeloPortCheckBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloPortCheckBoxComponent, selector: "velo-port-checkbox", inputs: { showSelectAll: "showSelectAll" }, ngImport: i0, template: "<div [formGroup]=\"form\">\n <!--TODO ALE replace divs with ng-templates-->\n <div *ngIf=\"showSelectAll\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-checkbox collapsed\">\n <div class=\"box-title\">\n <div class=\"header clearfix\">\n <div class=\"checkbox-select\">\n <label>\n <input type=\"checkbox\" (change)=\"selectAllChange()\" [checked]=\"isAllSelected()\" />\n\n <i class=\"input-helper\"></i>\n Select All\n </label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngFor=\"let valueOption of section.sectionValue?.valueOptions\">\n <div class=\"unchecked\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-checkbox collapsed\">\n <div class=\"box-title\" (click)=\"handleChange(valueOption)\">\n <div class=\"header clearfix\">\n <div class=\"checkbox-select\">\n <label>\n <input\n type=\"checkbox\"\n [class.checkbox--checked]=\"valueOption === form.controls[controlName].value\"\n />\n\n <i class=\"input-helper\"></i>\n {{section.sectionValue?.displayValues?.[valueOption] || valueOption}}\n </label>\n </div>\n </div>\n\n <div class=\"box-actions\" *ngIf=\"hasValueFor(valueOption)\">\n <ng-template #msgTemplate>\n <div class=\"runtime-info-message\">\n <ul class=\"message-text\">\n <li *ngFor=\"let message of getMessages(valueOption)\">{{ message }}</li>\n </ul>\n </div>\n </ng-template>\n <!-- removed dependency: ngx-bootstrap -->\n <!-- <div\n class=\"box-action-button\"\n *ngIf=\"getMessages(valueOption).length > 0\"\n [popover]=\"msgTemplate\"\n placement=\"left\"\n container=\"body\"\n [isOpen]=\"true\"\n >\n <a href=\"javascript:void(0);\">\n <i class=\"fa fa-info check-icon\"></i>\n </a>\n </div> -->\n </div>\n </div>\n <div class=\"box-content-wrapper\">\n <div class=\"box-content\">&nbsp;</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<ng-content></ng-content>\n", dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
1657
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortCheckBoxComponent, decorators: [{
1658
+ type: Component,
1659
+ args: [{ selector: 'velo-port-checkbox', template: "<div [formGroup]=\"form\">\n <!--TODO ALE replace divs with ng-templates-->\n <div *ngIf=\"showSelectAll\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-checkbox collapsed\">\n <div class=\"box-title\">\n <div class=\"header clearfix\">\n <div class=\"checkbox-select\">\n <label>\n <input type=\"checkbox\" (change)=\"selectAllChange()\" [checked]=\"isAllSelected()\" />\n\n <i class=\"input-helper\"></i>\n Select All\n </label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngFor=\"let valueOption of section.sectionValue?.valueOptions\">\n <div class=\"unchecked\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-checkbox collapsed\">\n <div class=\"box-title\" (click)=\"handleChange(valueOption)\">\n <div class=\"header clearfix\">\n <div class=\"checkbox-select\">\n <label>\n <input\n type=\"checkbox\"\n [class.checkbox--checked]=\"valueOption === form.controls[controlName].value\"\n />\n\n <i class=\"input-helper\"></i>\n {{section.sectionValue?.displayValues?.[valueOption] || valueOption}}\n </label>\n </div>\n </div>\n\n <div class=\"box-actions\" *ngIf=\"hasValueFor(valueOption)\">\n <ng-template #msgTemplate>\n <div class=\"runtime-info-message\">\n <ul class=\"message-text\">\n <li *ngFor=\"let message of getMessages(valueOption)\">{{ message }}</li>\n </ul>\n </div>\n </ng-template>\n <!-- removed dependency: ngx-bootstrap -->\n <!-- <div\n class=\"box-action-button\"\n *ngIf=\"getMessages(valueOption).length > 0\"\n [popover]=\"msgTemplate\"\n placement=\"left\"\n container=\"body\"\n [isOpen]=\"true\"\n >\n <a href=\"javascript:void(0);\">\n <i class=\"fa fa-info check-icon\"></i>\n </a>\n </div> -->\n </div>\n </div>\n <div class=\"box-content-wrapper\">\n <div class=\"box-content\">&nbsp;</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<ng-content></ng-content>\n" }]
1660
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; }, propDecorators: { showSelectAll: [{
1661
+ type: Input
1662
+ }] } });
1663
+
1664
+ class VeloPortDropdownComponent {
1665
+ constructor(formScope, sectionScope) {
1666
+ this.formScope = formScope;
1667
+ this.sectionScope = sectionScope;
1668
+ this.prices = {};
1669
+ this.form = this.formScope.form;
1670
+ this.section = this.sectionScope.section;
1671
+ this.controlName = this.section.id;
1672
+ this.qtyControlName = this.section.id + 'qty';
1673
+ if (this.section.pricingEnabled) {
1674
+ this.section.sectionValue?.valueOptions.forEach(valueOption => {
1675
+ this.prices[valueOption] = this.findPriceItemsForValue(valueOption);
1676
+ });
1677
+ }
1678
+ }
1679
+ isAddAllowed() {
1680
+ if (!EntityUtil.isPresent(this.form.controls[this.controlName].value)) {
1681
+ return false;
1682
+ }
1683
+ return this.section.model
1684
+ ? SectionsBinderHelper.isAddAllowed(this.section.model, this.section.boundData.name)
1685
+ : false;
1686
+ }
1687
+ handleCreate() {
1688
+ if (this.form.invalid || !this.isAddAllowed()) {
1689
+ return;
1690
+ }
1691
+ const updateData = {
1692
+ id: this.section.id,
1693
+ action: 'create',
1694
+ };
1695
+ this.formScope.publishFormUpdate(updateData);
1696
+ }
1697
+ findPriceItemsForValue(valueOption) {
1698
+ let prices = [];
1699
+ if (valueOption) {
1700
+ const portDomain = this.section.model?.portDomains[this.section.boundData.name];
1701
+ const domainType = portDomain?.domainTypes.find(d => d.name.toLowerCase() === valueOption.toLowerCase());
1702
+ if (domainType && domainType.recommendedPrices) {
1703
+ prices = domainType.recommendedPrices;
1704
+ }
1705
+ }
1706
+ const oneTime = {
1707
+ chargeMethod: 'ONE_TIME',
1708
+ netPrice: 0,
1709
+ listPrice: 0,
1710
+ chargeType: '',
1711
+ };
1712
+ const recurring = {
1713
+ chargeMethod: 'RECURRING',
1714
+ netPrice: 0,
1715
+ listPrice: 0,
1716
+ chargeType: '',
1717
+ };
1718
+ prices.forEach(p => {
1719
+ if (p.chargeMethod === oneTime.chargeMethod) {
1720
+ this.add(oneTime, p);
1721
+ }
1722
+ if (p.chargeMethod === recurring.chargeMethod) {
1723
+ this.add(recurring, p);
1724
+ }
1725
+ });
1726
+ const result = [];
1727
+ if (oneTime.listPrice > 0) {
1728
+ result.push(oneTime);
1729
+ }
1730
+ if (recurring.listPrice > 0) {
1731
+ result.push(recurring);
1732
+ }
1733
+ return result;
1734
+ }
1735
+ add(target, src) {
1736
+ target.netPrice = target.netPrice + src.netPrice;
1737
+ target.listPrice = target.listPrice + src.listPrice;
1738
+ if (src.explanation) {
1739
+ target.explanation = src.explanation;
1740
+ }
1741
+ }
1742
+ }
1743
+ VeloPortDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortDropdownComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Component });
1744
+ VeloPortDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloPortDropdownComponent, selector: "velo-port-dropdown", ngImport: i0, template: "<div class=\"form-group col-md-12\" [formGroup]=\"form\">\n <div class=\"input-form-input div-inline\">\n <label [for]=\"controlName\">{{ section.label }}</label>\n <div class=\"form-control-wrapper\">\n <select [id]=\"controlName\" [formControlName]=\"controlName\" class=\"form-control\">\n <option *ngFor=\"let valueOption of section.sectionValue?.valueOptions\" [ngValue]=\"valueOption\">\n {{section.sectionValue?.displayValues?.[valueOption] || valueOption}}\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <span>${{ prices[valueOption][0].netPrice }}</span>\n <span *ngIf=\"prices[valueOption].length > 1\">\n <span>, </span>\n <span>${{ prices[valueOption][1].netPrice }}</span>\n </span>\n </span>\n </option>\n </select>\n </div>\n </div>\n <div class=\"input-form-input div-inline quantity-form-input\">\n <label [for]=\"qtyControlName\"> Quantity </label>\n <div class=\"form-control-wrapper\">\n <input [id]=\"qtyControlName\" [formControlName]=\"qtyControlName\" type=\"text\" class=\"form-control\" size=\"3\" />\n\n <div\n class=\"validation-message\"\n [hidden]=\"form.controls[qtyControlName].valid || form.controls[qtyControlName].pristine\"\n >\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span> {{form.controls[qtyControlName]?.errors?.[key].message}}</span>\n </div>\n </div>\n\n <a href=\"javascript:void(0);\" (click)=\"handleCreate()\">\n <div class=\"add-config-control\" [attr.disabled]=\"form.valid && isAddAllowed() ? null : true\">\n <i class=\"fa fa-plus plus-icon\"></i>\n </div>\n </a>\n </div>\n </div>\n</div>\n<ng-content></ng-content>\n", dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i7.ValuesPipe, name: "values" }] });
1745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortDropdownComponent, decorators: [{
1746
+ type: Component,
1747
+ args: [{ selector: 'velo-port-dropdown', template: "<div class=\"form-group col-md-12\" [formGroup]=\"form\">\n <div class=\"input-form-input div-inline\">\n <label [for]=\"controlName\">{{ section.label }}</label>\n <div class=\"form-control-wrapper\">\n <select [id]=\"controlName\" [formControlName]=\"controlName\" class=\"form-control\">\n <option *ngFor=\"let valueOption of section.sectionValue?.valueOptions\" [ngValue]=\"valueOption\">\n {{section.sectionValue?.displayValues?.[valueOption] || valueOption}}\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <span>${{ prices[valueOption][0].netPrice }}</span>\n <span *ngIf=\"prices[valueOption].length > 1\">\n <span>, </span>\n <span>${{ prices[valueOption][1].netPrice }}</span>\n </span>\n </span>\n </option>\n </select>\n </div>\n </div>\n <div class=\"input-form-input div-inline quantity-form-input\">\n <label [for]=\"qtyControlName\"> Quantity </label>\n <div class=\"form-control-wrapper\">\n <input [id]=\"qtyControlName\" [formControlName]=\"qtyControlName\" type=\"text\" class=\"form-control\" size=\"3\" />\n\n <div\n class=\"validation-message\"\n [hidden]=\"form.controls[qtyControlName].valid || form.controls[qtyControlName].pristine\"\n >\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span> {{form.controls[qtyControlName]?.errors?.[key].message}}</span>\n </div>\n </div>\n\n <a href=\"javascript:void(0);\" (click)=\"handleCreate()\">\n <div class=\"add-config-control\" [attr.disabled]=\"form.valid && isAddAllowed() ? null : true\">\n <i class=\"fa fa-plus plus-icon\"></i>\n </div>\n </a>\n </div>\n </div>\n</div>\n<ng-content></ng-content>\n" }]
1748
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
1749
+
1750
+ class VeloPortRadioComponent {
1751
+ constructor(formScope, sectionScope) {
1752
+ this.formScope = formScope;
1753
+ this.sectionScope = sectionScope;
1754
+ this.prices = {};
1755
+ this.form = this.formScope.form;
1756
+ this.section = this.sectionScope.section;
1757
+ this.controlName = this.section.id;
1758
+ }
1759
+ ngOnInit() {
1760
+ this.initPriceItems();
1761
+ this.section.sectionValue?.valueOptions.forEach(item => {
1762
+ if (this.hasValueFor(item)) {
1763
+ this.form.controls[this.controlName].setValue(item);
1764
+ }
1765
+ });
1766
+ }
1767
+ handleChange(event, valueOption) {
1768
+ event.preventDefault();
1769
+ event.stopPropagation();
1770
+ const updateData = {
1771
+ id: this.section.id,
1772
+ action: this.hasPreviousValue() ? 'update' : 'create',
1773
+ valueOption,
1774
+ };
1775
+ this.form.controls[this.controlName].setValue(valueOption);
1776
+ this.form.controls[this.controlName].markAsDirty();
1777
+ this.formScope.publishFormUpdate(updateData);
1778
+ }
1779
+ hasValueFor(valueOption) {
1780
+ return !!this.findLineItemForValue(valueOption);
1781
+ }
1782
+ getMessages(valueOption) {
1783
+ const lineItem = this.findLineItemForValue(valueOption);
1784
+ if (this.section.model?.lineItems && lineItem) {
1785
+ return lineItem.messages;
1786
+ }
1787
+ return [];
1788
+ }
1789
+ toString(price) {
1790
+ let result = '';
1791
+ if (price.listPrice > price.netPrice) {
1792
+ result += '<strike>' + price.listPrice + '</strike>';
1793
+ }
1794
+ result += price.netPrice;
1795
+ if (price.explanation) {
1796
+ result += '(' + price.explanation + ')';
1797
+ }
1798
+ return result;
1799
+ }
1800
+ hasPreviousValue() {
1801
+ const previous = this.section.model?.lineItems.filter(li => li.port && li.port === this.section.boundData.name);
1802
+ return previous ? previous.length > 0 : false;
1803
+ }
1804
+ findLineItemForValue(valueOption) {
1805
+ return this.section.model ? LineItemUtil.findLineItemForValue(this.section.model, valueOption) : undefined;
1806
+ }
1807
+ initPriceItems() {
1808
+ this.prices = {};
1809
+ if (this.section.pricingEnabled) {
1810
+ this.section.sectionValue?.valueOptions.forEach(valueOption => {
1811
+ this.prices[valueOption] = this.findPriceItemsForValue(valueOption);
1812
+ });
1813
+ }
1814
+ }
1815
+ findPriceItemsForValue(valueOption) {
1816
+ let prices = [];
1817
+ if (valueOption) {
1818
+ const lineItem = this.section.model?.lineItems &&
1819
+ this.section.model.lineItems.find(li => li.type && li.type.toLowerCase() === valueOption.toLowerCase());
1820
+ if (lineItem && lineItem.chargeItems) {
1821
+ prices = lineItem.chargeItems.map(pi => {
1822
+ const price = {
1823
+ listPrice: pi.listPrice,
1824
+ netPrice: pi.netPrice,
1825
+ chargeMethod: pi.chargeMethod,
1826
+ chargeType: pi.chargeType,
1827
+ };
1828
+ return price;
1829
+ });
1830
+ }
1831
+ else {
1832
+ const portDomain = this.section.model?.portDomains[this.section.boundData.name];
1833
+ const domainType = portDomain?.domainTypes.find(d => d.name.toLowerCase() === valueOption.toLowerCase());
1834
+ if (domainType && domainType.recommendedPrices) {
1835
+ prices = domainType.recommendedPrices;
1836
+ }
1837
+ }
1838
+ }
1839
+ const oneTime = {
1840
+ chargeMethod: 'ONE_TIME',
1841
+ netPrice: 0,
1842
+ listPrice: 0,
1843
+ chargeType: '',
1844
+ };
1845
+ const recurring = {
1846
+ chargeMethod: 'RECURRING',
1847
+ netPrice: 0,
1848
+ listPrice: 0,
1849
+ chargeType: '',
1850
+ };
1851
+ prices.forEach(p => {
1852
+ if (p.chargeMethod === oneTime.chargeMethod) {
1853
+ this.add(oneTime, p);
1854
+ }
1855
+ if (p.chargeMethod === recurring.chargeMethod) {
1856
+ this.add(recurring, p);
1857
+ }
1858
+ });
1859
+ const result = [];
1860
+ if (oneTime.listPrice > 0) {
1861
+ result.push(oneTime);
1862
+ }
1863
+ if (recurring.listPrice > 0) {
1864
+ result.push(recurring);
1865
+ }
1866
+ return result;
1867
+ }
1868
+ add(target, src) {
1869
+ target.netPrice = target.netPrice + src.netPrice;
1870
+ target.listPrice = target.listPrice + src.listPrice;
1871
+ if (src.explanation) {
1872
+ target.explanation = src.explanation;
1873
+ }
1874
+ }
1875
+ }
1876
+ VeloPortRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortRadioComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Component });
1877
+ VeloPortRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloPortRadioComponent, selector: "velo-port-radio", ngImport: i0, template: "<div [formGroup]=\"form\">\n <!--TODO ALE replace divs with ng-templates-->\n <ng-container *ngFor=\"let valueOption of section.sectionValue?.valueOptions\">\n <div class=\"unchecked\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-radio\">\n <div class=\"box-title\" (click)=\"handleChange($event, valueOption)\">\n <div class=\"header clearfix\">\n <div class=\"radio-button\">\n <label>\n <input type=\"radio\" [id]=\"controlName\" [value]=\"valueOption\" [formControlName]=\"controlName\" />\n\n <i class=\"input-helper\"></i>\n\n {{ section.sectionValue?.displayValues?.[valueOption] || valueOption }}\n\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <span>${{ prices[valueOption][0].netPrice }}</span>\n\n <span *ngIf=\"prices[valueOption].length > 1\">\n <span>, </span>\n\n <span>${{ prices[valueOption][1].netPrice }}</span>\n </span>\n </span>\n </label>\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <div>{{ prices[valueOption][0].explanation }}</div>\n\n <span *ngIf=\"prices[valueOption].length > 1 && prices[valueOption][1].explanation\">\n <div>{{ prices[valueOption][1].explanation }}</div>\n </span>\n </span>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n<ng-content></ng-content>\n", dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
1878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortRadioComponent, decorators: [{
1879
+ type: Component,
1880
+ args: [{ selector: 'velo-port-radio', template: "<div [formGroup]=\"form\">\n <!--TODO ALE replace divs with ng-templates-->\n <ng-container *ngFor=\"let valueOption of section.sectionValue?.valueOptions\">\n <div class=\"unchecked\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-radio\">\n <div class=\"box-title\" (click)=\"handleChange($event, valueOption)\">\n <div class=\"header clearfix\">\n <div class=\"radio-button\">\n <label>\n <input type=\"radio\" [id]=\"controlName\" [value]=\"valueOption\" [formControlName]=\"controlName\" />\n\n <i class=\"input-helper\"></i>\n\n {{ section.sectionValue?.displayValues?.[valueOption] || valueOption }}\n\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <span>${{ prices[valueOption][0].netPrice }}</span>\n\n <span *ngIf=\"prices[valueOption].length > 1\">\n <span>, </span>\n\n <span>${{ prices[valueOption][1].netPrice }}</span>\n </span>\n </span>\n </label>\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <div>{{ prices[valueOption][0].explanation }}</div>\n\n <span *ngIf=\"prices[valueOption].length > 1 && prices[valueOption][1].explanation\">\n <div>{{ prices[valueOption][1].explanation }}</div>\n </span>\n </span>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n<ng-content></ng-content>\n" }]
1881
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
1882
+
1883
+ class VeloTypeComponent {
1884
+ constructor(formScope, collapsibleState, sectionScope, messageService) {
1885
+ this.formScope = formScope;
1886
+ this.collapsibleState = collapsibleState;
1887
+ this.sectionScope = sectionScope;
1888
+ this.messageService = messageService;
1889
+ this.messageBucketId = 'ui-runtime';
1890
+ this.indent = 1;
1891
+ this.prices = [];
1892
+ this.form = this.formScope.form;
1893
+ this.section = this.sectionScope.section;
1894
+ this.indent = this.sectionScope.indent;
1895
+ this.controlName = this.section.id;
1896
+ this.qtyControlName = this.section.id + 'qty';
1897
+ this.displayName =
1898
+ (this.section.model?.properties && this.section.model.properties['displayName']) ||
1899
+ this.section.model?.type ||
1900
+ '';
1901
+ }
1902
+ ngOnInit() {
1903
+ if (this.section.pricingEnabled) {
1904
+ this.prices = this.getPrices();
1905
+ }
1906
+ if (this.section.controlType === 'MESSAGE') {
1907
+ this.messageService.clear(this.messageBucketId);
1908
+ this.section.model?.messages?.forEach(message => {
1909
+ this.messageService.add({ key: this.messageBucketId, summary: message });
1910
+ });
1911
+ }
1912
+ }
1913
+ handleRemove() {
1914
+ const updateData = {
1915
+ id: this.section.id,
1916
+ action: 'remove',
1917
+ };
1918
+ this.formScope.publishFormUpdate(updateData);
1919
+ }
1920
+ handleQuantityUpdate() {
1921
+ const updateData = {
1922
+ id: this.section.id,
1923
+ action: 'qtyUpdate',
1924
+ };
1925
+ this.formScope.publishFormUpdate(updateData);
1926
+ }
1927
+ toggleCollapse() {
1928
+ if (this.section.model) {
1929
+ this.collapsibleState.toggleCollapse(this.section.model.id);
1930
+ }
1931
+ }
1932
+ getPrices() {
1933
+ let prices = [];
1934
+ if (this.section.model?.chargeItems) {
1935
+ prices = this.section.model.chargeItems.map(pi => {
1936
+ const price = {
1937
+ listPrice: pi.listPrice,
1938
+ netPrice: pi.netPrice,
1939
+ chargeMethod: pi.chargeMethod,
1940
+ chargeType: pi.chargeType,
1941
+ };
1942
+ return price;
1943
+ });
1944
+ }
1945
+ const oneTime = {
1946
+ chargeMethod: 'ONE_TIME',
1947
+ netPrice: 0,
1948
+ listPrice: 0,
1949
+ chargeType: '',
1950
+ };
1951
+ const recurring = {
1952
+ chargeMethod: 'RECURRING',
1953
+ netPrice: 0,
1954
+ listPrice: 0,
1955
+ chargeType: '',
1956
+ };
1957
+ prices.forEach(p => {
1958
+ if (p.chargeMethod === oneTime.chargeMethod) {
1959
+ this.add(oneTime, p);
1960
+ }
1961
+ if (p.chargeMethod === recurring.chargeMethod) {
1962
+ this.add(recurring, p);
1963
+ }
1964
+ });
1965
+ const result = [];
1966
+ if (oneTime.listPrice > 0) {
1967
+ result.push(oneTime);
1968
+ }
1969
+ if (recurring.listPrice > 0) {
1970
+ result.push(recurring);
1971
+ }
1972
+ return result;
1973
+ }
1974
+ add(target, src) {
1975
+ target.netPrice = target.netPrice + src.netPrice;
1976
+ target.listPrice = target.listPrice + src.listPrice;
1977
+ if (src.explanation) {
1978
+ target.explanation = src.explanation;
1979
+ }
1980
+ }
1981
+ }
1982
+ VeloTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloTypeComponent, deps: [{ token: FormScopeService }, { token: CollapsibleStateService }, { token: SectionScopeService }, { token: i3$1.MessageService }], target: i0.ɵɵFactoryTarget.Component });
1983
+ VeloTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloTypeComponent, selector: "velo-type", ngImport: i0, template: "<div class=\"container-box div-block collapsed container-box-bordered\" [formGroup]=\"form\">\n <div class=\"box-title\">\n <div class=\"header clearfix\">\n <div>\n <div class=\"header-label div-inline\">\n {{ displayName }}\n <span *ngIf=\"prices.length > 0\">\n <span>${{ prices[0].netPrice }}</span>\n <span *ngIf=\"prices.length > 1\">\n <span>, </span>\n <span>${{ prices[1].netPrice }}</span>\n </span>\n </span>\n </div>\n\n <div class=\"header-qty-container input-form-input\">\n <input\n [id]=\"qtyControlName\"\n [formControlName]=\"qtyControlName\"\n (blur)=\"form.controls[qtyControlName].valid && handleQuantityUpdate()\"\n type=\"text\"\n class=\"form-control\"\n size=\"3\"\n />\n <div class=\"validation-message\">\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span>\n {{ form.controls[qtyControlName]?.errors?.[key].message }}\n </span>\n </div>\n <span *ngIf=\"form.controls[qtyControlName].valid\"> &nbsp; </span>\n </div>\n <span *ngIf=\"prices.length > 0\">\n <div>{{ prices[0].explanation }}</div>\n <span *ngIf=\"prices.length > 1 && prices[1].explanation\">\n <div>{{ prices[1].explanation }}</div>\n </span>\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"box-actions\">\n <ng-container *ngIf=\"section.controlType !== 'MESSAGE'\">\n <ng-template #msgTemplate>\n <div class=\"runtime-info-message\">\n <ul class=\"message-text\">\n <li *ngFor=\"let message of section.model?.messages\">{{ message }}</li>\n </ul>\n </div>\n </ng-template>\n\n <!-- removed dependency: ngx-bootstrap -->\n <!-- <div\n class=\"box-action-button\"\n *ngIf=\"(section.model?.messages?.length ?? 0) > 0\"\n [popover]=\"msgTemplate\"\n placement=\"left\"\n container=\"body\"\n [isOpen]=\"true\"\n >\n <a href=\"javascript:void(0);\">\n <i class=\"fa fa-info check-icon\"></i>\n </a>\n </div> -->\n </ng-container>\n\n <div\n class=\"box-action-button\"\n (click)=\"toggleCollapse()\"\n [hidden]=\"!section.children || section.children.length < 1\"\n >\n <a><i class=\"fa fa-chevron-down check-icon\"></i></a>\n </div>\n\n <div class=\"box-action-button\" (click)=\"handleRemove()\">\n <a><i class=\"fa fa-trash-o check-icon\"></i></a>\n </div>\n </div>\n </div>\n\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i7.ValuesPipe, name: "values" }] });
1984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloTypeComponent, decorators: [{
1985
+ type: Component,
1986
+ args: [{ selector: 'velo-type', template: "<div class=\"container-box div-block collapsed container-box-bordered\" [formGroup]=\"form\">\n <div class=\"box-title\">\n <div class=\"header clearfix\">\n <div>\n <div class=\"header-label div-inline\">\n {{ displayName }}\n <span *ngIf=\"prices.length > 0\">\n <span>${{ prices[0].netPrice }}</span>\n <span *ngIf=\"prices.length > 1\">\n <span>, </span>\n <span>${{ prices[1].netPrice }}</span>\n </span>\n </span>\n </div>\n\n <div class=\"header-qty-container input-form-input\">\n <input\n [id]=\"qtyControlName\"\n [formControlName]=\"qtyControlName\"\n (blur)=\"form.controls[qtyControlName].valid && handleQuantityUpdate()\"\n type=\"text\"\n class=\"form-control\"\n size=\"3\"\n />\n <div class=\"validation-message\">\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span>\n {{ form.controls[qtyControlName]?.errors?.[key].message }}\n </span>\n </div>\n <span *ngIf=\"form.controls[qtyControlName].valid\"> &nbsp; </span>\n </div>\n <span *ngIf=\"prices.length > 0\">\n <div>{{ prices[0].explanation }}</div>\n <span *ngIf=\"prices.length > 1 && prices[1].explanation\">\n <div>{{ prices[1].explanation }}</div>\n </span>\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"box-actions\">\n <ng-container *ngIf=\"section.controlType !== 'MESSAGE'\">\n <ng-template #msgTemplate>\n <div class=\"runtime-info-message\">\n <ul class=\"message-text\">\n <li *ngFor=\"let message of section.model?.messages\">{{ message }}</li>\n </ul>\n </div>\n </ng-template>\n\n <!-- removed dependency: ngx-bootstrap -->\n <!-- <div\n class=\"box-action-button\"\n *ngIf=\"(section.model?.messages?.length ?? 0) > 0\"\n [popover]=\"msgTemplate\"\n placement=\"left\"\n container=\"body\"\n [isOpen]=\"true\"\n >\n <a href=\"javascript:void(0);\">\n <i class=\"fa fa-info check-icon\"></i>\n </a>\n </div> -->\n </ng-container>\n\n <div\n class=\"box-action-button\"\n (click)=\"toggleCollapse()\"\n [hidden]=\"!section.children || section.children.length < 1\"\n >\n <a><i class=\"fa fa-chevron-down check-icon\"></i></a>\n </div>\n\n <div class=\"box-action-button\" (click)=\"handleRemove()\">\n <a><i class=\"fa fa-trash-o check-icon\"></i></a>\n </div>\n </div>\n </div>\n\n <ng-content></ng-content>\n</div>\n" }]
1987
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: CollapsibleStateService }, { type: SectionScopeService }, { type: i3$1.MessageService }]; } });
1988
+
1989
+ class SfQueryDirective {
1990
+ constructor(apiService) {
1991
+ this.apiService = apiService;
1992
+ }
1993
+ query(searchRequest, objectName) {
1994
+ return this.apiService.query(searchRequest, objectName).toPromise();
1995
+ }
1996
+ describe(objectName, fieldName) {
1997
+ return this.apiService.describe(objectName, fieldName).toPromise();
1998
+ }
1999
+ describe2(objectName, fieldsNames) {
2000
+ return this.apiService.describe2(objectName, fieldsNames).toPromise();
2001
+ }
2002
+ apexGetRequest(path, params) {
2003
+ return this.apiService.apexGetRequest(path, params).toPromise();
2004
+ }
2005
+ apexPostRequest(path, body) {
2006
+ return this.apiService.apexPostRequest(path, body).toPromise();
2007
+ }
2008
+ }
2009
+ SfQueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SfQueryDirective, deps: [{ token: i1.SalesforceApiService }], target: i0.ɵɵFactoryTarget.Directive });
2010
+ SfQueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: SfQueryDirective, selector: "sf-query", exportAs: ["sfApi"], ngImport: i0 });
2011
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SfQueryDirective, decorators: [{
2012
+ type: Directive,
2013
+ args: [{
2014
+ // eslint-disable-next-line @angular-eslint/directive-selector
2015
+ selector: 'sf-query',
2016
+ exportAs: 'sfApi',
2017
+ }]
2018
+ }], ctorParameters: function () { return [{ type: i1.SalesforceApiService }]; } });
2019
+
2020
+ class SectionHelperService {
2021
+ static findSectionForValue(section, valueOption) {
2022
+ if (!EntityUtil.isPresent(section) || !EntityUtil.isPresent(section.children) || EntityUtil.isBlank(valueOption)) {
2023
+ return;
2024
+ }
2025
+ const found = EntityUtil.filterHierarchically(section.children, 'children', ({ model }) => model && model.type.toLowerCase() === valueOption.toLowerCase());
2026
+ return found && found.pop();
2027
+ }
2028
+ getTotalPrices(section) {
2029
+ if (!section || !section.model || !section.model.chargeGroupItems) {
2030
+ return new Map();
2031
+ }
2032
+ return PricingUtils.sumPriceByProperty(section.model.chargeGroupItems, 'netPrice', [
2033
+ 'chargeMethod',
2034
+ 'sellingFrequency',
2035
+ ]);
2036
+ }
2037
+ }
2038
+ SectionHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2039
+ SectionHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionHelperService });
2040
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionHelperService, decorators: [{
2041
+ type: Injectable
2042
+ }] });
2043
+
2044
+ class SectionContextAware {
2045
+ constructor(formScope, sectionScope) {
2046
+ this.formScope = formScope;
2047
+ this.sectionScope = sectionScope;
2048
+ }
2049
+ ngOnInit() {
2050
+ this.form = this.formScope.form;
2051
+ this.section = this.sectionScope.section;
2052
+ this.initControlNames();
2053
+ }
2054
+ initControlNames() {
2055
+ this.controlName = this.section.id;
2056
+ this.qtyControlName = this.section.id + 'qty';
2057
+ }
2058
+ //TODO ALE CONSIDER STORE INSTEAD OF CALCULATE EVERY TIME
2059
+ isAddAllowed(quantityToAdd = 1) {
2060
+ return this.section.model
2061
+ ? SectionsBinderHelper.isAddAllowed(this.section.model, this.section.boundData.name, quantityToAdd)
2062
+ : false;
2063
+ }
2064
+ isRemoveAllowed(quantityToRemove = 1) {
2065
+ return this.section.model
2066
+ ? SectionsBinderHelper.isRemoveAllowed(this.section.model, this.section.boundData.name, quantityToRemove)
2067
+ : false;
2068
+ }
2069
+ handleCreate(valueOption) {
2070
+ if (!this.isAddAllowed()) {
2071
+ return;
2072
+ }
2073
+ const updateData = {
2074
+ id: this.section.id,
2075
+ action: 'create',
2076
+ valueOption: EntityUtil.isPresent(valueOption) ? valueOption : void 0,
2077
+ };
2078
+ this.formScope.publishFormUpdate(updateData);
2079
+ }
2080
+ handleChange(valueOption) {
2081
+ const updateData = {
2082
+ id: this.section.id,
2083
+ action: 'update',
2084
+ valueOption: EntityUtil.isPresent(valueOption) ? valueOption : void 0,
2085
+ };
2086
+ this.formScope.publishFormUpdate(updateData);
2087
+ }
2088
+ handleQtyChange(valueOption) {
2089
+ const updateData = {
2090
+ id: this.section.id,
2091
+ action: 'qtyUpdate',
2092
+ valueOption: valueOption,
2093
+ };
2094
+ this.formScope.publishFormUpdate(updateData);
2095
+ }
2096
+ handleRemove(valueOption) {
2097
+ const updateData = {
2098
+ id: this.section.id,
2099
+ action: 'remove',
2100
+ valueOption: valueOption,
2101
+ };
2102
+ this.formScope.publishFormUpdate(updateData);
2103
+ }
2104
+ handleCopy(valueOption) {
2105
+ const updateData = {
2106
+ id: this.section.id,
2107
+ action: 'copy',
2108
+ valueOption: valueOption,
2109
+ };
2110
+ this.formScope.publishFormUpdate(updateData);
2111
+ }
2112
+ }
2113
+ SectionContextAware.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionContextAware, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Directive });
2114
+ SectionContextAware.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: SectionContextAware, ngImport: i0 });
2115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionContextAware, decorators: [{
2116
+ type: Directive
2117
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
2118
+ class LineItemDirective {
2119
+ constructor(formScope, sectionScope, configurationService) {
2120
+ this.formScope = formScope;
2121
+ this.sectionScope = sectionScope;
2122
+ this.configurationService = configurationService;
2123
+ }
2124
+ ngOnInit() {
2125
+ this.section = this.sectionScope.section;
2126
+ this.lineItem = this.section.model;
2127
+ }
2128
+ handlePatch(rootLineItem) {
2129
+ const updateData = {
2130
+ id: this.sectionScope.section.id,
2131
+ action: 'patch',
2132
+ valueOption: rootLineItem,
2133
+ };
2134
+ this.formScope.publishFormUpdate(updateData);
2135
+ }
2136
+ configure(runtimeContext, configurableRamp) {
2137
+ return this.configurationService
2138
+ .configure(runtimeContext, { configurableRamp })
2139
+ .pipe(take(1))
2140
+ .toPromise();
2141
+ }
2142
+ }
2143
+ LineItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LineItemDirective, deps: [{ token: FormScopeService }, { token: SectionScopeService }, { token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Directive });
2144
+ LineItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: LineItemDirective, selector: "line-item", exportAs: ["liApi"], ngImport: i0 });
2145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LineItemDirective, decorators: [{
2146
+ type: Directive,
2147
+ args: [{
2148
+ // eslint-disable-next-line @angular-eslint/directive-selector
2149
+ selector: 'line-item',
2150
+ exportAs: 'liApi',
2151
+ }]
2152
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }, { type: ConfigurationService }]; } });
2153
+ class VeloPortDirective extends SectionContextAware {
2154
+ constructor(formScope, sectionScope) {
2155
+ super(formScope, sectionScope);
2156
+ this.valueQuantities = {};
2157
+ }
2158
+ handlePriceAdjustment(action, valueOption, amount) {
2159
+ const updateData = {
2160
+ id: this.section.id,
2161
+ action,
2162
+ valueOption,
2163
+ options: { amount },
2164
+ };
2165
+ this.formScope.publishFormUpdate(updateData);
2166
+ }
2167
+ ngOnInit() {
2168
+ super.ngOnInit();
2169
+ this.initQuantity();
2170
+ }
2171
+ handleUpsert(valueOption, event) {
2172
+ if (EntityUtil.isPresent(this.valueQuantities[valueOption]) && EntityUtil.isPresent(event)) {
2173
+ event?.preventDefault();
2174
+ return;
2175
+ }
2176
+ else if (Object.keys(this.valueQuantities).length > 0) {
2177
+ this.handleChange(valueOption);
2178
+ }
2179
+ else {
2180
+ this.handleCreate(valueOption);
2181
+ }
2182
+ }
2183
+ isActive(valueOption) {
2184
+ return EntityUtil.isPresent(this.valueQuantities[valueOption]);
2185
+ }
2186
+ initQuantity() {
2187
+ this.valueQuantities = this.section.model
2188
+ ? SectionsBinderHelper.getQuantityGroupByValue(this.section.model, this.section.boundData.name)
2189
+ : {};
2190
+ }
2191
+ //Quantity Stepper Functions
2192
+ handleNextVal(valueOption) {
2193
+ let initQty = this.valueQuantities[valueOption] || 0;
2194
+ if (this.isAddAllowed()) {
2195
+ if (initQty > 0) {
2196
+ const typeSection = SectionHelperService.findSectionForValue(this.section, valueOption);
2197
+ if (typeSection) {
2198
+ this.form.controls[typeSection.id + 'qty'].setValue(++initQty);
2199
+ this.handleQtyChange(valueOption);
2200
+ }
2201
+ }
2202
+ else {
2203
+ this.handleCreate(valueOption);
2204
+ }
2205
+ }
2206
+ }
2207
+ handlePrevVal(valueOption) {
2208
+ let initQty = this.valueQuantities[valueOption] || 0;
2209
+ if (this.isRemoveAllowed()) {
2210
+ if (initQty < 2) {
2211
+ this.handleRemove(valueOption);
2212
+ }
2213
+ else {
2214
+ const typeSection = SectionHelperService.findSectionForValue(this.section, valueOption);
2215
+ if (typeSection) {
2216
+ this.form.controls[typeSection.id + 'qty'].setValue(--initQty);
2217
+ this.handleQtyChange(valueOption);
2218
+ }
2219
+ }
2220
+ }
2221
+ }
2222
+ handleManualQtyChange(valueOption, qtyVal) {
2223
+ const initQty = this.valueQuantities[valueOption] || 0;
2224
+ if (isNaN(+qtyVal) || +qtyVal < 0 || initQty === +qtyVal) {
2225
+ return;
2226
+ }
2227
+ const newQty = +qtyVal;
2228
+ if (initQty === 0) {
2229
+ if (this.isAddAllowed(newQty)) {
2230
+ this.form.controls[this.qtyControlName].setValue(newQty);
2231
+ this.handleCreate(valueOption);
2232
+ }
2233
+ }
2234
+ else if (newQty === 0) {
2235
+ if (this.isRemoveAllowed()) {
2236
+ this.handleRemove(valueOption);
2237
+ }
2238
+ }
2239
+ else {
2240
+ const typeSection = SectionHelperService.findSectionForValue(this.section, valueOption);
2241
+ if (typeSection) {
2242
+ const dif = newQty - initQty;
2243
+ const isAllowed = dif > 0 ? this.isAddAllowed(dif) : this.isRemoveAllowed(dif * -1);
2244
+ if (isAllowed) {
2245
+ this.form.controls[typeSection.id + 'qty'].setValue(newQty);
2246
+ this.handleQtyChange(valueOption);
2247
+ }
2248
+ }
2249
+ }
2250
+ }
2251
+ handleNetPriceAdjustment(valueOption, amount) {
2252
+ this.handlePriceAdjustment('adjustNetPrice', valueOption, amount);
2253
+ }
2254
+ handleListPriceAdjustment(valueOption, amount) {
2255
+ this.handlePriceAdjustment('adjustListPrice', valueOption, amount);
2256
+ }
2257
+ }
2258
+ VeloPortDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortDirective, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Directive });
2259
+ VeloPortDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: VeloPortDirective, selector: "velo-port", exportAs: ["portApi"], usesInheritance: true, ngImport: i0 });
2260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloPortDirective, decorators: [{
2261
+ type: Directive,
2262
+ args: [{
2263
+ // eslint-disable-next-line @angular-eslint/directive-selector
2264
+ selector: 'velo-port',
2265
+ exportAs: 'portApi',
2266
+ }]
2267
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
2268
+ class VeloDropdownComponent extends SectionContextAware {
2269
+ constructor(formScope, sectionScope) {
2270
+ super(formScope, sectionScope);
2271
+ }
2272
+ }
2273
+ VeloDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloDropdownComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Component });
2274
+ VeloDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloDropdownComponent, selector: "velo-dropdown", usesInheritance: true, ngImport: i0, template: `
2275
+ <div class="input-form-input div-inline" [formGroup]="form">
2276
+ <label [for]="controlName">{{ section.label }}</label>
2277
+ <div class="form-control-wrapper">
2278
+ <select [id]="controlName" [formControlName]="controlName" class="form-control">
2279
+ <option *ngFor="let valueOption of section.sectionValue?.valueOptions" [ngValue]="valueOption">
2280
+ {{ section.sectionValue?.displayValues?.[valueOption] || valueOption }}
2281
+ </option>
2282
+ </select>
2283
+ </div>
2284
+ </div>
2285
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
2286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloDropdownComponent, decorators: [{
2287
+ type: Component,
2288
+ args: [{
2289
+ // moduleId: module.id,
2290
+ // eslint-disable-next-line @angular-eslint/component-selector
2291
+ selector: 'velo-dropdown',
2292
+ template: `
2293
+ <div class="input-form-input div-inline" [formGroup]="form">
2294
+ <label [for]="controlName">{{ section.label }}</label>
2295
+ <div class="form-control-wrapper">
2296
+ <select [id]="controlName" [formControlName]="controlName" class="form-control">
2297
+ <option *ngFor="let valueOption of section.sectionValue?.valueOptions" [ngValue]="valueOption">
2298
+ {{ section.sectionValue?.displayValues?.[valueOption] || valueOption }}
2299
+ </option>
2300
+ </select>
2301
+ </div>
2302
+ </div>
2303
+ `,
2304
+ }]
2305
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
2306
+ class VeloQuantityComponent extends SectionContextAware {
2307
+ constructor(formScope, sectionScope) {
2308
+ super(formScope, sectionScope);
2309
+ }
2310
+ }
2311
+ VeloQuantityComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloQuantityComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Component });
2312
+ VeloQuantityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloQuantityComponent, selector: "velo-quantity", usesInheritance: true, ngImport: i0, template: `
2313
+ <div class="input-form-input div-inline quantity-form-input" [formGroup]="form">
2314
+ <label [for]="qtyControlName"> Quantity </label>
2315
+ <div class="form-control-wrapper">
2316
+ <input
2317
+ [id]="controlName"
2318
+ [formControlName]="qtyControlName"
2319
+ [attr.disabled]="isAddAllowed() === true ? null : true"
2320
+ type="text"
2321
+ class="form-control"
2322
+ size="3"
2323
+ />
2324
+
2325
+ <div
2326
+ class="validation-message"
2327
+ [hidden]="form.controls[qtyControlName].valid || form.controls[qtyControlName].pristine"
2328
+ >
2329
+ <div *ngFor="let key of form.controls[qtyControlName].errors | values">
2330
+ <span> {{ form.controls[qtyControlName].errors?.[key].message }}</span>
2331
+ </div>
2332
+ </div>
2333
+ </div>
2334
+ </div>
2335
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i7.ValuesPipe, name: "values" }] });
2336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloQuantityComponent, decorators: [{
2337
+ type: Component,
2338
+ args: [{
2339
+ // moduleId: module.id,
2340
+ // eslint-disable-next-line @angular-eslint/component-selector
2341
+ selector: 'velo-quantity',
2342
+ template: `
2343
+ <div class="input-form-input div-inline quantity-form-input" [formGroup]="form">
2344
+ <label [for]="qtyControlName"> Quantity </label>
2345
+ <div class="form-control-wrapper">
2346
+ <input
2347
+ [id]="controlName"
2348
+ [formControlName]="qtyControlName"
2349
+ [attr.disabled]="isAddAllowed() === true ? null : true"
2350
+ type="text"
2351
+ class="form-control"
2352
+ size="3"
2353
+ />
2354
+
2355
+ <div
2356
+ class="validation-message"
2357
+ [hidden]="form.controls[qtyControlName].valid || form.controls[qtyControlName].pristine"
2358
+ >
2359
+ <div *ngFor="let key of form.controls[qtyControlName].errors | values">
2360
+ <span> {{ form.controls[qtyControlName].errors?.[key].message }}</span>
2361
+ </div>
2362
+ </div>
2363
+ </div>
2364
+ </div>
2365
+ `,
2366
+ }]
2367
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
2368
+ class VeloQuantityButtonComponent extends SectionContextAware {
2369
+ constructor(formScope, sectionScope) {
2370
+ super(formScope, sectionScope);
2371
+ }
2372
+ }
2373
+ VeloQuantityButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloQuantityButtonComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0.ɵɵFactoryTarget.Component });
2374
+ VeloQuantityButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: VeloQuantityButtonComponent, selector: "velo-quantity-button", usesInheritance: true, ngImport: i0, template: `
2375
+ <div class="input-form-input div-inline quantity-form-input">
2376
+ <div class="form-control-wrapper">
2377
+ <a href="javascript:void(0);" (click)="handleCreate()">
2378
+ <div class="add-config-control" [attr.disabled]="isAddAllowed() === true ? null : true">
2379
+ <i class="fa fa-plus plus-icon"></i>
2380
+ </div>
2381
+ </a>
2382
+ </div>
2383
+ </div>
2384
+ `, isInline: true });
2385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloQuantityButtonComponent, decorators: [{
2386
+ type: Component,
2387
+ args: [{
2388
+ // moduleId: module.id,
2389
+ // eslint-disable-next-line @angular-eslint/component-selector
2390
+ selector: 'velo-quantity-button',
2391
+ template: `
2392
+ <div class="input-form-input div-inline quantity-form-input">
2393
+ <div class="form-control-wrapper">
2394
+ <a href="javascript:void(0);" (click)="handleCreate()">
2395
+ <div class="add-config-control" [attr.disabled]="isAddAllowed() === true ? null : true">
2396
+ <i class="fa fa-plus plus-icon"></i>
2397
+ </div>
2398
+ </a>
2399
+ </div>
2400
+ </div>
2401
+ `,
2402
+ }]
2403
+ }], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
2404
+
2405
+ class VlApprovalDirective {
2406
+ constructor(repo) {
2407
+ this.repo = repo;
2408
+ }
2409
+ submitQuote(quoteDraft) {
2410
+ return this.repo.submitQuote(quoteDraft).toPromise();
2411
+ }
2412
+ }
2413
+ VlApprovalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlApprovalDirective, deps: [{ token: i1.QuoteApiService }], target: i0.ɵɵFactoryTarget.Directive });
2414
+ VlApprovalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: VlApprovalDirective, selector: "vl-approval", exportAs: ["approvalApi"], ngImport: i0 });
2415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlApprovalDirective, decorators: [{
2416
+ type: Directive,
2417
+ args: [{
2418
+ // eslint-disable-next-line @angular-eslint/directive-selector
2419
+ selector: 'vl-approval',
2420
+ exportAs: 'approvalApi',
2421
+ }]
2422
+ }], ctorParameters: function () { return [{ type: i1.QuoteApiService }]; } });
2423
+
2424
+ class VlDocumentAttachmentsDirective {
2425
+ constructor(service) {
2426
+ this.service = service;
2427
+ }
2428
+ getAttachments(searchRequest) {
2429
+ return this.service.getAttachments(searchRequest).toPromise();
2430
+ }
2431
+ createAttachment(attachment, file, reportProgress) {
2432
+ const observable = this.service.createAttachment(attachment, file, reportProgress);
2433
+ return reportProgress ? observable : observable.toPromise();
2434
+ }
2435
+ updateAttachment(id, attachment) {
2436
+ return this.service.updateAttachment(id, attachment).toPromise();
2437
+ }
2438
+ getAttachmentFile(id, isPreventDownload) {
2439
+ return this.service.getAttachmentFile(id, isPreventDownload).toPromise();
2440
+ }
2441
+ removeAttachment(id) {
2442
+ return this.service.removeAttachment(id).toPromise();
2443
+ }
2444
+ }
2445
+ VlDocumentAttachmentsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlDocumentAttachmentsDirective, deps: [{ token: i1.DocumentAttachmentApiService }], target: i0.ɵɵFactoryTarget.Directive });
2446
+ VlDocumentAttachmentsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: VlDocumentAttachmentsDirective, selector: "vl-document-attachments", exportAs: ["documentAttachmentsApi"], ngImport: i0 });
2447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlDocumentAttachmentsDirective, decorators: [{
2448
+ type: Directive,
2449
+ args: [{
2450
+ // eslint-disable-next-line @angular-eslint/directive-selector
2451
+ selector: 'vl-document-attachments',
2452
+ exportAs: 'documentAttachmentsApi',
2453
+ }]
2454
+ }], ctorParameters: function () { return [{ type: i1.DocumentAttachmentApiService }]; } });
2455
+
2456
+ class VlDocumentTemplatesDirective {
2457
+ constructor(documentTemplatesApiService) {
2458
+ this.documentTemplatesApiService = documentTemplatesApiService;
2459
+ /**
2460
+ * @deprecated Use `generateDocument` instead
2461
+ */
2462
+ // eslint-disable-next-line @typescript-eslint/member-ordering
2463
+ this.generateDocumentNew = this.generateDocument;
2464
+ }
2465
+ getTemplates(tag) {
2466
+ return this.documentTemplatesApiService.getTemplates(tag).toPromise();
2467
+ }
2468
+ upsertTemplate(template, templateFile) {
2469
+ return this.documentTemplatesApiService
2470
+ .upsertTemplate(template, templateFile)
2471
+ .toPromise();
2472
+ }
2473
+ removeTemplate(id) {
2474
+ return this.documentTemplatesApiService.removeTemplate(id).toPromise();
2475
+ }
2476
+ cloneTemplate(id) {
2477
+ return this.documentTemplatesApiService.cloneTemplate(id).toPromise();
2478
+ }
2479
+ downloadTemplate(id) {
2480
+ return this.documentTemplatesApiService.downloadTemplateFile(id).toPromise();
2481
+ }
2482
+ generateDocument(template, quoteDraft, params) {
2483
+ return this.documentTemplatesApiService.generateDocument(template, quoteDraft, params).pipe(take(1));
2484
+ }
2485
+ generateDocumentData(template, quoteDraft, params) {
2486
+ return this.documentTemplatesApiService.generateDocumentData(template, quoteDraft, params).pipe(take(1));
2487
+ }
2488
+ getAttachments(searchRequest) {
2489
+ return this.documentTemplatesApiService.getAttachments(searchRequest).toPromise();
2490
+ }
2491
+ getAttachmentFile(id) {
2492
+ return this.documentTemplatesApiService.getAttachmentFile(id).toPromise();
2493
+ }
2494
+ createAttachment(attachment, file) {
2495
+ return this.documentTemplatesApiService.createAttachment(attachment, file).toPromise();
2496
+ }
2497
+ removeAttachment(id) {
2498
+ return this.documentTemplatesApiService.removeAttachment(id).toPromise();
2499
+ }
2500
+ }
2501
+ VlDocumentTemplatesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlDocumentTemplatesDirective, deps: [{ token: i1.DocumentTemplatesApiService }], target: i0.ɵɵFactoryTarget.Directive });
2502
+ VlDocumentTemplatesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: VlDocumentTemplatesDirective, selector: "[vlQuoteTemplates]", exportAs: ["quoteTemplateApi"], ngImport: i0 });
2503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlDocumentTemplatesDirective, decorators: [{
2504
+ type: Directive,
2505
+ args: [{
2506
+ selector: '[vlQuoteTemplates]',
2507
+ exportAs: 'quoteTemplateApi',
2508
+ }]
2509
+ }], ctorParameters: function () { return [{ type: i1.DocumentTemplatesApiService }]; } });
2510
+
2511
+ class VlQuoteDirective {
2512
+ constructor(quoteApiService, runtimeService) {
2513
+ this.quoteApiService = quoteApiService;
2514
+ this.runtimeService = runtimeService;
2515
+ }
2516
+ getQuote(quoteId) {
2517
+ return this.quoteApiService.getQuoteDraft(quoteId).toPromise();
2518
+ }
2519
+ upsertQuote(quoteDraft) {
2520
+ return this.quoteApiService.upsertQuote(quoteDraft).toPromise();
2521
+ }
2522
+ configureQuote(quoteDraft, rootLineItemId) {
2523
+ const rootLineItem = EntityUtil.findById(rootLineItemId, quoteDraft.currentState);
2524
+ const asset = quoteDraft.initialState?.find(a => a.id === rootLineItem.assetId);
2525
+ const { context } = quoteDraft;
2526
+ const states = {
2527
+ configurableRamp: LineItemUtil.removeDeletedItems(rootLineItem),
2528
+ currentState: quoteDraft.currentState,
2529
+ asset,
2530
+ };
2531
+ this.runtimeService.updateRuntime(states, context.properties);
2532
+ }
2533
+ }
2534
+ VlQuoteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlQuoteDirective, deps: [{ token: i1.QuoteApiService }, { token: RuntimeService }], target: i0.ɵɵFactoryTarget.Directive });
2535
+ VlQuoteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: VlQuoteDirective, selector: "vl-quote", exportAs: ["quoteApi"], ngImport: i0 });
2536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlQuoteDirective, decorators: [{
2537
+ type: Directive,
2538
+ args: [{
2539
+ // eslint-disable-next-line @angular-eslint/directive-selector
2540
+ selector: 'vl-quote',
2541
+ exportAs: 'quoteApi',
2542
+ }]
2543
+ }], ctorParameters: function () { return [{ type: i1.QuoteApiService }, { type: RuntimeService }]; } });
2544
+
2545
+ class VlRampDirective {
2546
+ constructor(contextService, rampApiService, priceApiService) {
2547
+ this.contextService = contextService;
2548
+ this.rampApiService = rampApiService;
2549
+ this.priceApiService = priceApiService;
2550
+ }
2551
+ createRamp(sourceItems, currentRamps, term) {
2552
+ const context = this.contextService.resolve();
2553
+ return this.rampApiService
2554
+ .next({
2555
+ context,
2556
+ sourceItems,
2557
+ currentItems: currentRamps || [],
2558
+ term,
2559
+ })
2560
+ .pipe(tap(data => {
2561
+ if (data.context) {
2562
+ this.contextService.update({
2563
+ properties: {
2564
+ ...data.context.properties,
2565
+ },
2566
+ });
2567
+ }
2568
+ }))
2569
+ .toPromise();
2570
+ }
2571
+ calculateRampTermByEndDate(lineItem, endDate) {
2572
+ return this.priceApiService
2573
+ .getSellingTermByEndDate(lineItem.planId, lineItem.offeringId, lineItem.startDate, endDate, lineItem.sellingFrequencyUnit, lineItem.sellingFrequencyDuration)
2574
+ .toPromise();
2575
+ }
2576
+ calculateRampTermByTerm(lineItem, term) {
2577
+ return this.priceApiService
2578
+ .getSellingTermByTerm(lineItem.planId, lineItem.offeringId, lineItem.startDate, term, lineItem.sellingFrequencyUnit, lineItem.sellingFrequencyDuration)
2579
+ .toPromise();
2580
+ }
2581
+ }
2582
+ VlRampDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlRampDirective, deps: [{ token: i2.ContextService }, { token: i1.RampApiService }, { token: i1.PriceApiService }], target: i0.ɵɵFactoryTarget.Directive });
2583
+ VlRampDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: VlRampDirective, selector: "vl-ramp", exportAs: ["rampApi"], ngImport: i0 });
2584
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VlRampDirective, decorators: [{
2585
+ type: Directive,
2586
+ args: [{
2587
+ // eslint-disable-next-line @angular-eslint/directive-selector
2588
+ selector: 'vl-ramp',
2589
+ exportAs: 'rampApi',
2590
+ }]
2591
+ }], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i1.RampApiService }, { type: i1.PriceApiService }]; } });
2592
+
2593
+ const SHA1$1 = UUID.SHA1();
2594
+ const SCRIPT_GLOBAL_NAME = `$velo`;
2595
+ class SectionScriptDirective {
2596
+ constructor(_document, sfQueryDirective, lineItemDirective, quoteDirective, documentTemplatesDirective, rampDirective, approvalDirective, documentAttachmentsDirective, formScope, sectionScope, renderer, formBuilder, runtimeService, cdr, cartService, contextService, currentStateService, quoteService) {
2597
+ this._document = _document;
2598
+ this.sfQueryDirective = sfQueryDirective;
2599
+ this.lineItemDirective = lineItemDirective;
2600
+ this.quoteDirective = quoteDirective;
2601
+ this.documentTemplatesDirective = documentTemplatesDirective;
2602
+ this.rampDirective = rampDirective;
2603
+ this.approvalDirective = approvalDirective;
2604
+ this.documentAttachmentsDirective = documentAttachmentsDirective;
2605
+ this.formScope = formScope;
2606
+ this.sectionScope = sectionScope;
2607
+ this.renderer = renderer;
2608
+ this.formBuilder = formBuilder;
2609
+ this.runtimeService = runtimeService;
2610
+ this.cdr = cdr;
2611
+ this.cartService = cartService;
2612
+ this.contextService = contextService;
2613
+ this.currentStateService = currentStateService;
2614
+ this.quoteService = quoteService;
2615
+ this.scriptId = '';
2616
+ this.sessionScope = {};
2617
+ }
2618
+ ngOnInit() {
2619
+ if (!this.scriptExists()) {
2620
+ return;
2621
+ }
2622
+ this.scriptId = this.generateScriptId();
2623
+ this.registry = this.getScriptRegistry();
2624
+ this.sessionScope = this.getSessionScope();
2625
+ if (!this.registry.exists(this.scriptId)) {
2626
+ this.appendScriptElementToDom();
2627
+ }
2628
+ this.initScript();
2629
+ this.registry.doRegister(this.scriptId, this.sectionScope.section.id);
2630
+ }
2631
+ ngAfterViewInit() {
2632
+ const sharedScriptGlobal = this.registry?.getGlobalForScript(this.sectionScope.section.id);
2633
+ if (sharedScriptGlobal) {
2634
+ this.methodApply('afterViewInit', sharedScriptGlobal);
2635
+ }
2636
+ }
2637
+ ngOnDestroy() {
2638
+ if (!this.scriptId) {
2639
+ return;
2640
+ }
2641
+ this.registry.unRegister(this.scriptId, this.sectionScope.section.id);
2642
+ if (!this.registry.exists(this.scriptId)) {
2643
+ this.removeScript();
2644
+ this.registry.removeGlobalForScript(this.scriptId);
2645
+ }
2646
+ }
2647
+ get scope() {
2648
+ if (!this.scriptId || !this.sectionScope.section) {
2649
+ return {};
2650
+ }
2651
+ return Object.assign({}, this.registry.getGlobalForScript(this.sectionScope.section.id) || {}, this.sessionScope);
2652
+ }
2653
+ scriptExists() {
2654
+ return (this.sectionScope?.section?.script?.length ?? 0) > 0;
2655
+ }
2656
+ encodeScriptBody() {
2657
+ return this.sectionScope.section.script ? atob(this.sectionScope.section.script) : '';
2658
+ }
2659
+ generateScriptId() {
2660
+ return '_' + SHA1$1.hex(this.encodeScriptBody());
2661
+ }
2662
+ getScriptRegistry() {
2663
+ return this.formScope.scriptRegistry;
2664
+ }
2665
+ getSessionScope() {
2666
+ return this.formScope.scriptSessionScope;
2667
+ }
2668
+ initScript() {
2669
+ let sharedScriptGlobal = this.registry.getGlobalForScript(this.sectionScope.section.id);
2670
+ if (!EntityUtil.isPresent(sharedScriptGlobal)) {
2671
+ sharedScriptGlobal = {};
2672
+ this.registry.setGlobalForScript(this.sectionScope.section.id, sharedScriptGlobal);
2673
+ }
2674
+ this.methodApply('init', sharedScriptGlobal);
2675
+ }
2676
+ removeScript() {
2677
+ const sharedScriptGlobal = this.registry.getGlobalForScript(this.sectionScope.section.id);
2678
+ this.methodApply('destroy', sharedScriptGlobal);
2679
+ this.removeScriptElementFromDom();
2680
+ }
2681
+ appendScriptElementToDom() {
2682
+ const script = this.scriptFromTemplate(this.encodeScriptBody(), this.scriptId, this.sectionScope.section);
2683
+ this.scriptElement = this.renderer.createElement('script');
2684
+ this.scriptElement.type = `text/javascript`;
2685
+ this.scriptElement.text = script;
2686
+ this.scriptElement.setAttribute('id', this.scriptId);
2687
+ this.renderer.appendChild(this._document.body, this.scriptElement);
2688
+ }
2689
+ removeScriptElementFromDom() {
2690
+ if (!this.scriptElement) {
2691
+ this.scriptElement = this._document.getElementById(this.scriptId);
2692
+ }
2693
+ this.scriptElement.remove();
2694
+ }
2695
+ scriptFromTemplate(scriptBody, scriptId, section) {
2696
+ return `var ${scriptId} = (function (${SCRIPT_GLOBAL_NAME}, form, { section, templates }, sessionScope, formBuilder, runtimeContext, cdr, apis) {
2697
+ ${SCRIPT_GLOBAL_NAME}["form"] = form;
2698
+ ${SCRIPT_GLOBAL_NAME}["section"] = section;
2699
+ ${SCRIPT_GLOBAL_NAME}["templates"] = templates;
2700
+ ${SCRIPT_GLOBAL_NAME}["sessionScope"] = sessionScope;
2701
+ ${SCRIPT_GLOBAL_NAME}["formBuilder"] = formBuilder;
2702
+ ${SCRIPT_GLOBAL_NAME}["runtimeContext"] = runtimeContext;
2703
+ ${SCRIPT_GLOBAL_NAME}["cdr"] = cdr;
2704
+ ${SCRIPT_GLOBAL_NAME}["apis"] = apis;
2705
+
2706
+ ${scriptBody}
2707
+ return ${SCRIPT_GLOBAL_NAME};
2708
+ });
2709
+
2710
+ //# sourceURL=${_.kebabCase(section.label)}.js`;
2711
+ }
2712
+ methodApply(methodName, sharedScriptGlobal) {
2713
+ const args = [
2714
+ sharedScriptGlobal,
2715
+ this.formScope.form,
2716
+ this.sectionScope,
2717
+ this.sessionScope,
2718
+ this.formBuilder,
2719
+ this.runtimeService.getRuntimeContext(),
2720
+ this.cdr,
2721
+ this.getExposedApis(),
2722
+ ];
2723
+ const fnInit = window[`${this.scriptId}`](...args);
2724
+ fnInit && fnInit[methodName] && fnInit[methodName].apply();
2725
+ }
2726
+ getExposedApis() {
2727
+ return {
2728
+ 'sf-query': this.sfQueryDirective,
2729
+ 'line-item': this.lineItemDirective,
2730
+ 'quote-directive': this.quoteDirective,
2731
+ 'templates-directive': this.documentTemplatesDirective,
2732
+ 'attachments-directive': this.documentAttachmentsDirective,
2733
+ 'ramp-directive': this.rampDirective,
2734
+ 'approval-directive': this.approvalDirective,
2735
+ entityUtil: EntityUtil,
2736
+ moment,
2737
+ lodash: _,
2738
+ rxjs: { ...rxjsOperators, ...rxjs },
2739
+ PagedEntity,
2740
+ pipes: {
2741
+ currency: CurrencyPipe,
2742
+ },
2743
+ solutionUpdateStarted: this.runtimeService.onSolutionUpdateStartedEvent,
2744
+ solutionUpdated: this.runtimeService.onSolutionProcessed,
2745
+ cartService: this.cartService,
2746
+ configurationContextService: this.contextService,
2747
+ quoteDraft: this.quoteService.quoteDraft,
2748
+ currentStateService: this.currentStateService,
2749
+ };
2750
+ }
2751
+ }
2752
+ SectionScriptDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionScriptDirective, deps: [{ token: DOCUMENT }, { token: SfQueryDirective }, { token: LineItemDirective }, { token: VlQuoteDirective }, { token: VlDocumentTemplatesDirective }, { token: VlRampDirective }, { token: VlApprovalDirective }, { token: VlDocumentAttachmentsDirective }, { token: FormScopeService }, { token: SectionScopeService }, { token: i0.Renderer2 }, { token: i4.FormBuilder }, { token: RuntimeService }, { token: i0.ChangeDetectorRef }, { token: ShoppingCartService }, { token: i2.ContextService }, { token: CurrentStateService }, { token: i2.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Directive });
2753
+ SectionScriptDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: SectionScriptDirective, selector: "section-script", providers: [
2754
+ SfQueryDirective,
2755
+ LineItemDirective,
2756
+ VlQuoteDirective,
2757
+ VlDocumentTemplatesDirective,
2758
+ VlRampDirective,
2759
+ VlApprovalDirective,
2760
+ VlDocumentAttachmentsDirective,
2761
+ ], exportAs: ["scriptApi"], ngImport: i0 });
2762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionScriptDirective, decorators: [{
2763
+ type: Directive,
2764
+ args: [{
2765
+ // eslint-disable-next-line @angular-eslint/directive-selector
2766
+ selector: 'section-script',
2767
+ exportAs: 'scriptApi',
2768
+ providers: [
2769
+ SfQueryDirective,
2770
+ LineItemDirective,
2771
+ VlQuoteDirective,
2772
+ VlDocumentTemplatesDirective,
2773
+ VlRampDirective,
2774
+ VlApprovalDirective,
2775
+ VlDocumentAttachmentsDirective,
2776
+ ],
2777
+ }]
2778
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
2779
+ type: Inject,
2780
+ args: [DOCUMENT]
2781
+ }] }, { type: SfQueryDirective, decorators: [{
2782
+ type: Inject,
2783
+ args: [SfQueryDirective]
2784
+ }] }, { type: LineItemDirective, decorators: [{
2785
+ type: Inject,
2786
+ args: [LineItemDirective]
2787
+ }] }, { type: VlQuoteDirective, decorators: [{
2788
+ type: Inject,
2789
+ args: [VlQuoteDirective]
2790
+ }] }, { type: VlDocumentTemplatesDirective, decorators: [{
2791
+ type: Inject,
2792
+ args: [VlDocumentTemplatesDirective]
2793
+ }] }, { type: VlRampDirective, decorators: [{
2794
+ type: Inject,
2795
+ args: [VlRampDirective]
2796
+ }] }, { type: VlApprovalDirective, decorators: [{
2797
+ type: Inject,
2798
+ args: [VlApprovalDirective]
2799
+ }] }, { type: VlDocumentAttachmentsDirective, decorators: [{
2800
+ type: Inject,
2801
+ args: [VlDocumentAttachmentsDirective]
2802
+ }] }, { type: FormScopeService }, { type: SectionScopeService }, { type: i0.Renderer2 }, { type: i4.FormBuilder }, { type: RuntimeService }, { type: i0.ChangeDetectorRef }, { type: ShoppingCartService }, { type: i2.ContextService }, { type: CurrentStateService }, { type: i2.QuoteDraftService }]; } });
2803
+
2804
+ class RuntimeExecutionModule {
2805
+ }
2806
+ RuntimeExecutionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeExecutionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2807
+ RuntimeExecutionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: RuntimeExecutionModule, declarations: [ExecutionSectionRendererComponent,
2808
+ ChildrenPlaceholderComponent,
2809
+ SectionScriptDirective,
2810
+ VeloPortDirective,
2811
+ LineItemDirective,
2812
+ VeloDropdownComponent,
2813
+ VeloQuantityButtonComponent,
2814
+ VeloQuantityComponent,
2815
+ VeloAttributeDirective,
2816
+ MultiselectComponent,
2817
+ VeloAttributeComponent,
2818
+ VeloPortRadioComponent,
2819
+ VeloTypeComponent,
2820
+ VeloPortDropdownComponent,
2821
+ VeloPortCheckBoxComponent,
2822
+ FederatedComponent,
2823
+ TemplateComponent,
2824
+ ContextProviderComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule, CoreModule, ApiModule, LoaderModule, SdkCoreModule], exports: [FormsModule,
2825
+ ReactiveFormsModule,
2826
+ ChildrenPlaceholderComponent,
2827
+ SectionScriptDirective,
2828
+ LineItemDirective,
2829
+ VeloPortDirective,
2830
+ VeloAttributeDirective,
2831
+ MultiselectComponent,
2832
+ VeloAttributeComponent,
2833
+ VeloPortRadioComponent,
2834
+ VeloTypeComponent,
2835
+ VeloPortDropdownComponent,
2836
+ VeloPortCheckBoxComponent,
2837
+ FederatedComponent,
2838
+ TemplateComponent,
2839
+ ContextProviderComponent] });
2840
+ RuntimeExecutionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeExecutionModule, providers: [
2841
+ ShoppingCartService,
2842
+ RuntimeService,
2843
+ ConfigurationService,
2844
+ RuntimeContextService,
2845
+ RuntimeFormService,
2846
+ CurrentStateService,
2847
+ ProductModelCacheService,
2848
+ DatePipe,
2849
+ SectionStoreService,
2850
+ ], imports: [CommonModule, FormsModule, ReactiveFormsModule, CoreModule, ApiModule, LoaderModule, SdkCoreModule, FormsModule,
2851
+ ReactiveFormsModule] });
2852
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeExecutionModule, decorators: [{
2853
+ type: NgModule,
2854
+ args: [{
2855
+ declarations: [
2856
+ ExecutionSectionRendererComponent,
2857
+ ChildrenPlaceholderComponent,
2858
+ SectionScriptDirective,
2859
+ VeloPortDirective,
2860
+ LineItemDirective,
2861
+ VeloDropdownComponent,
2862
+ VeloQuantityButtonComponent,
2863
+ VeloQuantityComponent,
2864
+ VeloAttributeDirective,
2865
+ MultiselectComponent,
2866
+ VeloAttributeComponent,
2867
+ VeloPortRadioComponent,
2868
+ VeloTypeComponent,
2869
+ VeloPortDropdownComponent,
2870
+ VeloPortCheckBoxComponent,
2871
+ FederatedComponent,
2872
+ TemplateComponent,
2873
+ ContextProviderComponent,
2874
+ ],
2875
+ providers: [
2876
+ ShoppingCartService,
2877
+ RuntimeService,
2878
+ ConfigurationService,
2879
+ RuntimeContextService,
2880
+ RuntimeFormService,
2881
+ CurrentStateService,
2882
+ ProductModelCacheService,
2883
+ DatePipe,
2884
+ SectionStoreService,
2885
+ ],
2886
+ imports: [CommonModule, FormsModule, ReactiveFormsModule, CoreModule, ApiModule, LoaderModule, SdkCoreModule],
2887
+ exports: [
2888
+ FormsModule,
2889
+ ReactiveFormsModule,
2890
+ ChildrenPlaceholderComponent,
2891
+ SectionScriptDirective,
2892
+ LineItemDirective,
2893
+ VeloPortDirective,
2894
+ VeloAttributeDirective,
2895
+ MultiselectComponent,
2896
+ VeloAttributeComponent,
2897
+ VeloPortRadioComponent,
2898
+ VeloTypeComponent,
2899
+ VeloPortDropdownComponent,
2900
+ VeloPortCheckBoxComponent,
2901
+ FederatedComponent,
2902
+ TemplateComponent,
2903
+ ContextProviderComponent,
2904
+ ],
2905
+ }]
2906
+ }] });
2907
+
2908
+ const SHA1 = UUID.SHA1();
2909
+ class BaseSectionComponent {
2910
+ }
2911
+ BaseSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2912
+ BaseSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: BaseSectionComponent, selector: "ng-component", inputs: { form: "form", section: "section" }, viewQueries: [{ propertyName: "templates", predicate: ["customTemplate"], descendants: true }], ngImport: i0, template: '', isInline: true });
2913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseSectionComponent, decorators: [{
2914
+ type: Component,
2915
+ args: [{ template: '' }]
2916
+ }], propDecorators: { form: [{
2917
+ type: Input
2918
+ }], section: [{
2919
+ type: Input
2920
+ }], templates: [{
2921
+ type: ViewChildren,
2922
+ args: ['customTemplate']
2923
+ }] } });
2924
+ class SectionsService {
2925
+ constructor(compiler, m, sectionStore) {
2926
+ this.compiler = compiler;
2927
+ this.m = m;
2928
+ this.sectionStore = sectionStore;
2929
+ this.moduleType = null;
2930
+ this.moduleInstance = null;
2931
+ }
2932
+ compileModule(sections, isViewEncapsulated) {
2933
+ const uniqueSections = this.getUniqueSections(sections);
2934
+ this.moduleType = this.getModuleType(uniqueSections, isViewEncapsulated);
2935
+ this.moduleInstance = this.compiler.compileModuleAndAllComponentsSync(this.moduleType);
2936
+ this.sectionStore.componentFactories = this.moduleInstance.componentFactories;
2937
+ }
2938
+ destroy() {
2939
+ if (this.moduleInstance) {
2940
+ this.sectionStore.componentFactories = [];
2941
+ this.moduleInstance = null;
2942
+ }
2943
+ if (this.moduleType) {
2944
+ this.compiler.clearCacheFor(this.moduleType);
2945
+ this.moduleType = null;
2946
+ }
2947
+ }
2948
+ getDecoratedComponents(sections, isViewEncapsulated = false) {
2949
+ const result = [];
2950
+ sections.forEach(section => {
2951
+ const transpiledTemplate = this.getTranspiledTemplate(section);
2952
+ const DynamicComponent = Component({
2953
+ selector: section.dynamicSelector,
2954
+ template: transpiledTemplate,
2955
+ styles: [atob(section.styles || '')],
2956
+ providers: [SectionHelperService],
2957
+ encapsulation: isViewEncapsulated ? ViewEncapsulation.ShadowDom : ViewEncapsulation.Emulated,
2958
+ jit: true,
2959
+ })(class C extends BaseSectionComponent {
2960
+ });
2961
+ this.applySelectorField(DynamicComponent, section.dynamicSelector ?? '');
2962
+ result.push(DynamicComponent);
2963
+ });
2964
+ return result;
2965
+ }
2966
+ getModuleType(sections, isViewEncapsulated) {
2967
+ const decoratedComponents = this.getDecoratedComponents(sections, isViewEncapsulated);
2968
+ let DynamicModule = class DynamicModule {
2969
+ };
2970
+ DynamicModule = __decorate([
2971
+ NgModule({
2972
+ imports: [CommonModule, RuntimeExecutionModule, CoreModule, ScrollingModule, ScrollingModule$1],
2973
+ declarations: [decoratedComponents],
2974
+ jit: true,
2975
+ })
2976
+ ], DynamicModule);
2977
+ return DynamicModule;
2978
+ }
2979
+ applySelectorField(target, dynamicSelector) {
2980
+ set(target, '$$dynamicSelector', dynamicSelector);
2981
+ }
2982
+ getUniqueSections(sections) {
2983
+ const uniqueSections = {};
2984
+ sections.forEach(section => {
2985
+ section.hash = SHA1.hex(section.template);
2986
+ const existingSection = section.hash ? uniqueSections[section.hash] : undefined;
2987
+ if (existingSection && existingSection.template === section.template) {
2988
+ section.dynamicSelector = existingSection.dynamicSelector;
2989
+ }
2990
+ else if (section.hash) {
2991
+ section.dynamicSelector = `section-${section.id}`;
2992
+ uniqueSections[section.hash] = section;
2993
+ }
2994
+ });
2995
+ return values(uniqueSections);
2996
+ }
2997
+ getTranspiledTemplate(section) {
2998
+ let template = section.template ? atob(section.template) : '';
2999
+ if (!EntityUtil.isEmpty(section.script) && template.indexOf('<section-script') === -1) {
3000
+ template = `<section-script></section-script>`.concat(template);
3001
+ }
3002
+ return template;
3003
+ }
3004
+ }
3005
+ SectionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionsService, deps: [{ token: i0.Compiler }, { token: i0.NgModuleRef }, { token: SectionStoreService }], target: i0.ɵɵFactoryTarget.Injectable });
3006
+ SectionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionsService });
3007
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionsService, decorators: [{
3008
+ type: Injectable
3009
+ }], ctorParameters: function () { return [{ type: i0.Compiler }, { type: i0.NgModuleRef }, { type: SectionStoreService }]; } });
3010
+
3011
+ class SectionRendererComponent {
3012
+ set section(value) {
3013
+ this._section = value;
3014
+ this.sectionScope.section = value;
3015
+ }
3016
+ get section() {
3017
+ return this._section;
3018
+ }
3019
+ constructor(_injector, _m, sectionScope, sectionStore) {
3020
+ this._injector = _injector;
3021
+ this._m = _m;
3022
+ this.sectionScope = sectionScope;
3023
+ this.sectionStore = sectionStore;
3024
+ this.componentRef = null;
3025
+ }
3026
+ ngOnInit() {
3027
+ this.renderSection();
3028
+ }
3029
+ ngAfterViewInit() {
3030
+ if (this.componentRef) {
3031
+ this.sectionScope.templates.next(this.componentRef.instance['templates']?.toArray() ?? []);
3032
+ }
3033
+ }
3034
+ ngOnDestroy() {
3035
+ if (this.componentRef) {
3036
+ this.componentRef.destroy();
3037
+ this.componentRef = null;
3038
+ }
3039
+ }
3040
+ renderSection() {
3041
+ if (this.componentRef) {
3042
+ this.componentRef.destroy();
3043
+ this.componentRef = null;
3044
+ }
3045
+ const componentFactory = this.sectionStore.getComponentFactory(this._section);
3046
+ if (!componentFactory) {
3047
+ return;
3048
+ }
3049
+ this.componentRef = componentFactory.create(this._injector, [], null, this._m);
3050
+ this.componentRef.location.nativeElement.setAttribute('sectionId', `${this._section.model?.id}${this._section.label}`);
3051
+ this.componentRef.instance['form'] = this.form;
3052
+ this.componentRef.instance['section'] = this.section;
3053
+ this.container.insert(this.componentRef.hostView);
3054
+ }
3055
+ }
3056
+ SectionRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionRendererComponent, deps: [{ token: i0.Injector }, { token: i0.NgModuleRef }, { token: SectionScopeService }, { token: SectionStoreService }], target: i0.ɵɵFactoryTarget.Component });
3057
+ SectionRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: SectionRendererComponent, selector: "vl-section-renderer", inputs: { section: "section", form: "form" }, providers: [SectionScopeService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-template #container></ng-template>", styles: [":host{display:contents}\n"] });
3058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SectionRendererComponent, decorators: [{
3059
+ type: Component,
3060
+ args: [{ selector: 'vl-section-renderer', providers: [SectionScopeService], template: "<ng-template #container></ng-template>", styles: [":host{display:contents}\n"] }]
3061
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.NgModuleRef }, { type: SectionScopeService }, { type: SectionStoreService }]; }, propDecorators: { section: [{
3062
+ type: Input
3063
+ }], form: [{
3064
+ type: Input
3065
+ }], container: [{
3066
+ type: ViewChild,
3067
+ args: ['container', { read: ViewContainerRef, static: true }]
3068
+ }] } });
3069
+
3070
+ const defaultTemplate = btoa('<template-component></template-component>');
3071
+ class ComponentPreviewComponent {
3072
+ constructor(sectionsService, runtimeFormService, formScope, runtimeService, cdr) {
3073
+ this.sectionsService = sectionsService;
3074
+ this.runtimeFormService = runtimeFormService;
3075
+ this.formScope = formScope;
3076
+ this.runtimeService = runtimeService;
3077
+ this.cdr = cdr;
3078
+ this.form = new FormGroup({});
3079
+ this.showPreview = false;
3080
+ this.isNoPreviewAvailable = false;
3081
+ this.isPreviewFailed = false;
3082
+ }
3083
+ ngOnChanges(changes) {
3084
+ if (changes['data']) {
3085
+ this.sectionsService.destroy();
3086
+ this.showPreview = false;
3087
+ this.isNoPreviewAvailable = false;
3088
+ this.isPreviewFailed = false;
3089
+ setTimeout(() => {
3090
+ try {
3091
+ this.runPreview(this.data);
3092
+ this.cdr.detectChanges();
3093
+ }
3094
+ catch (e) {
3095
+ console.error(e?.stack ?? e?.error ?? 'Error occured');
3096
+ this.showPreview = false;
3097
+ this.isPreviewFailed = true;
3098
+ this.cdr.detectChanges();
3099
+ }
3100
+ });
3101
+ }
3102
+ }
3103
+ runPreview(data) {
3104
+ const section = data.section && JSON.parse(data.section);
3105
+ if (!section) {
3106
+ this.isNoPreviewAvailable = true;
3107
+ return;
3108
+ }
3109
+ const model = {
3110
+ ...(section?.model ?? {
3111
+ attributes: [],
3112
+ lineItems: [],
3113
+ }),
3114
+ id: UUID.UUID(),
3115
+ };
3116
+ const componentSection = {
3117
+ ...section,
3118
+ script: data.componentScript ? btoa(data.componentScript) : '',
3119
+ styles: data.componentStyles ? btoa(data.componentStyles) : '',
3120
+ template: data.componentTemplate ? btoa(data.componentTemplate) : '',
3121
+ properties: data.componentProperties ? JSON.stringify(data.componentProperties) : {},
3122
+ id: UUID.UUID(),
3123
+ model,
3124
+ };
3125
+ const storySection = {
3126
+ id: UUID.UUID(),
3127
+ template: data.template ? btoa(data.template) : defaultTemplate,
3128
+ styles: data.styles ? btoa(data.styles) : '',
3129
+ script: data.script ? btoa(data.script) : '',
3130
+ children: [componentSection],
3131
+ model,
3132
+ };
3133
+ const sections = [storySection, componentSection];
3134
+ this.form = this.formScope.form = this.runtimeFormService.initForm(sections, model);
3135
+ this.createRuntimeContext(componentSection);
3136
+ this.sectionsService.compileModule(sections);
3137
+ this.section = storySection;
3138
+ this.showPreview = true;
3139
+ }
3140
+ createRuntimeContext(section) {
3141
+ const runtimeModel = RuntimeModel.create([], {});
3142
+ const rootType = Array.from(runtimeModel.components.values()).find(c => section.model?.type &&
3143
+ runtimeModel.isEquals(c.typeName, section.model.type) &&
3144
+ EntityUtil.isPresent(c.productId));
3145
+ const contextProductId = rootType ? rootType.productId : undefined;
3146
+ const context = {
3147
+ modelId: '',
3148
+ runtimeModel,
3149
+ runtimeMode: RuntimeMode.TEST,
3150
+ productId: contextProductId,
3151
+ properties: {},
3152
+ };
3153
+ this.runtimeService.setRuntimeContext(context);
3154
+ }
3155
+ }
3156
+ ComponentPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ComponentPreviewComponent, deps: [{ token: SectionsService }, { token: RuntimeFormService }, { token: FormScopeService }, { token: RuntimeService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3157
+ ComponentPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ComponentPreviewComponent, selector: "vl-component-preview", inputs: { data: "data" }, providers: [
3158
+ SectionsService,
3159
+ FormScopeService,
3160
+ CollapsibleStateService,
3161
+ RuntimeFormService,
3162
+ FormScopeService,
3163
+ RuntimeService,
3164
+ ], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"showPreview\">\n <vl-section-renderer [section]=\"section!\" [form]=\"form\"></vl-section-renderer>\n</ng-container>\n\n<span class=\"info\" *ngIf=\"isNoPreviewAvailable\">No preview available</span>\n<span class=\"info error\" *ngIf=\"isPreviewFailed\">Preview has failed</span>\n", styles: ["body.veloce-apex-index,body.veloce-index,body.sfdcBody{overflow:hidden;margin:0;padding:0}:host ::ng-deep .velo-app .modal.in .modal-dialog.runtime-modal{margin-left:5%;margin-right:5%;padding:0;position:relative;width:auto}:host ::ng-deep .modal-body.runtime-modal.main-container{height:100%;margin:0;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .content-wrapper{display:flex;flex-direction:column;height:100%}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper{display:flex;flex-direction:column;flex-grow:1;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid{height:100%;margin:0;padding:0;overflow:auto}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal .form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid section-script>:first-child{height:100%}:host ::ng-deep .runtime-modal .modal-content,:host ::ng-deep .gu-mirror .modal-content{background-color:--vl-input-background}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a{color:#333333b3;font-weight:600;text-transform:uppercase;letter-spacing:.85px;font-size:10px}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active{color:#333}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.disabled,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.disabled{color:#33333380}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active:after,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active:after{background-color:#f36;bottom:-1px;content:\"\";height:1px;left:0;position:absolute;width:100%}:host ::ng-deep .runtime-modal .modal-content .modal-header,:host ::ng-deep .gu-mirror .modal-content .modal-header{background:transparent;color:#fff}:host ::ng-deep .runtime-modal .runtime-group-divider,:host ::ng-deep .gu-mirror .runtime-group-divider{border-bottom:1px solid #e5e5e5}:host ::ng-deep .runtime-modal .input-form-input,:host ::ng-deep .gu-mirror .input-form-input{position:relative;padding-left:0;padding-top:0}:host ::ng-deep .runtime-modal .input-form-input--required>label,:host ::ng-deep .gu-mirror .input-form-input--required>label{color:#ff4233;font-weight:700}:host ::ng-deep .form-control-wrapper{position:relative}:host ::ng-deep .add-config-control:hover{background-color:#e96099;color:#fff;border:1px solid transparent}:host ::ng-deep .remove-config-control:hover{background-color:#828c9e;color:#fff}:host ::ng-deep .add-config-control[disabled],:host ::ng-deep .remove-config-control[disabled]{background-color:transparent;color:#ccc;border:1px dashed #ccc}:host ::ng-deep .add-config-control[disabled]:hover,:host ::ng-deep .remove-config-control[disabled]:hover{cursor:default}:host ::ng-deep .add-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;border-radius:50%;float:left;position:absolute;top:0;right:-57px;z-index:500;background-color:#e3337c;color:#fff;border:1px solid #e3337c;transition:all .5s ease 0s}:host ::ng-deep .add-config-control .plus-icon{line-height:36px}:host ::ng-deep .remove-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;margin-right:25px;border-radius:50%;float:left;position:absolute;top:33px;right:51px;z-index:500;background-color:transparent;color:#687285;border:1px solid transparent;transition:all .5s ease 0s}:host ::ng-deep .remove-config-control .plus-icon{line-height:36px}:host ::ng-deep .sidebar .new-wrapper{min-height:96px;margin-bottom:25px}:host ::ng-deep .sidebar .new-wrapper .add-container .add-card{left:0;margin-left:15px}:host ::ng-deep .ui-settings{height:100%;display:flex;flex-direction:column}:host ::ng-deep .runtime-modal .form-horizontal form,:host ::ng-deep .gu-mirror form{margin:0}:host ::ng-deep .runtime-modal .form-horizontal .form-group,:host ::ng-deep .gu-mirror .form-group{margin:0;padding:0}:host ::ng-deep .runtime-modal .form-horizontal .control.form-group,:host ::ng-deep .gu-mirror .control.form-group{margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .form-control-wrapper,:host ::ng-deep .gu-mirror .form-control-wrapper{min-width:172px;margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper{min-width:50px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper .form-control,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper .form-control{width:50px}:host ::ng-deep .runtime-left-side{height:calc(100% - 97px);background:#fff;padding:48px 56px 0}:host ::ng-deep .ui-controls-group{margin-left:-8px;margin-right:-8px}:host ::ng-deep .ui-controls-group .ui-control-type:hover{border-color:#3384ff}:host ::ng-deep .ui-controls-group .ui-control-type{position:relative;min-width:140px;float:left;border-radius:3px;border:1px solid #c4c4c4;background-color:#fff;width:calc(50% - 16px);padding:12px 13px;margin-bottom:16px;margin-right:8px;margin-left:8px;cursor:pointer}:host ::ng-deep .ui-controls-group .ui-control-type span{padding-left:3px}:host ::ng-deep .sidebar-header{letter-spacing:-.5px;padding-bottom:24px;padding-top:0;line-height:32px;font-size:24px;font-weight:700;color:#333}:host ::ng-deep .sidebar-header small{display:block;color:#333;font-size:11px;font-weight:300;line-height:20px;margin:0}:host ::ng-deep .sidebar-menu-list{color:#333333b3;margin:0;width:100%;list-style:none;font-size:12px}:host ::ng-deep .sidebar-menu-list li.active a,:host ::ng-deep .sidebar-menu-list li.active i{color:#005ee3}:host ::ng-deep .sidebar-menu-list li:hover{cursor:pointer}:host ::ng-deep .sidebar-menu-list li{text-align:right;padding-left:16px}:host ::ng-deep .sidebar-menu-list li a{padding:0 8px;margin-left:-8px;cursor:pointer;white-space:nowrap;color:inherit;font-weight:700;display:inline-block;line-height:32px}:host ::ng-deep .sidebar-menu-list li i{display:none;padding-right:5px}:host ::ng-deep .runtime-builder-content{min-height:100%}:host ::ng-deep .runtime-builder-content .input-form{margin:0;padding:18px 11px 0}:host ::ng-deep .runtime-builder-content .input-form .form-group{border:3px dashed transparent}:host ::ng-deep .runtime-builder-content .input-form .form-group:hover{border:3px dashed #dedede}:host ::ng-deep .runtime-right-side{background:#fff}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background:#fff;position:relative;display:inline-block;padding-right:16px;text-transform:uppercase;font-size:10px;letter-spacing:.2px}:host ::ng-deep .sidebar-section:before{content:\" \";position:absolute;top:50%;left:0;right:0;border-top:1px solid #e6e6e6}:host ::ng-deep .sidebar-section{position:relative;margin-top:16px;margin-bottom:16px}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background-color:var(--vl-input-background);position:relative;display:inline-block;padding-right:16px;padding-left:8px;text-transform:uppercase;font-size:6px;letter-spacing:.2px}:host ::ng-deep .section-wrapper{top:-21px;position:absolute;right:0;left:12px}:host ::ng-deep .container-box.container-box-bordered{border:1px solid rgba(0,0,0,.2);margin-bottom:25px;padding-left:25px}:host ::ng-deep .container-box.container-box-radio{margin-left:0}:host ::ng-deep .container-box.container-box-radio:hover,:host ::ng-deep .container-box.container-box-checkbox:hover{cursor:pointer}:host ::ng-deep .container-box{position:relative;overflow:auto;border:1px solid transparent;background:var(--vl-input-background)}:host ::ng-deep .container-box .container-box{border:1px solid rgba(0,0,0,.2);margin-left:25px;margin-right:25px;margin-bottom:25px}:host ::ng-deep .container-box .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box .box-title .header .header-label{color:#333;margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-label small{padding-left:21px;color:#757575;font-weight:400;font-size:10px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-qty-container,:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{display:table-cell;vertical-align:middle;height:75px;padding-left:21px}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control,:host ::ng-deep .container-box .box-title .header .radio-button .form-control,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control{height:auto;color:#333;width:50px;border:1px solid #dddddd}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control:focus,:host ::ng-deep .container-box .box-title .header .radio-button .form-control:focus,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control:focus{border:1px solid #c4c4c4}:host ::ng-deep .container-box .box-title .header .header-qty-container .validation-message,:host ::ng-deep .container-box .box-title .header .radio-button .validation-message,:host ::ng-deep .container-box .box-title .header .checkbox-select .validation-message{position:absolute;margin-top:3px}:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{padding-left:0;vertical-align:middle}:host ::ng-deep .container-box .box-content{padding:25px 0 25px 33px}:host ::ng-deep .container-box .timeline-item{clear:both;display:block;width:100%;position:relative}:host ::ng-deep .container-box .timeline-item:before{display:block!important;content:\"\";position:absolute;left:25px;top:-25px;bottom:25px;width:1px;border-left:1px dashed rgba(0,0,0,.2)}:host ::ng-deep .container-box .timeline-item .icon{background:#90c7ec;width:35px;height:35px;border-radius:50%;position:absolute;left:24px;top:4px}:host ::ng-deep .container-box .timeline-item .icon .fa.fa-upload{left:11px;top:10px}:host ::ng-deep .container-box .timeline-item .icon .fa{color:#fff;position:absolute}:host ::ng-deep .container-box .timeline-item .message .content{float:left;width:80%}:host ::ng-deep .container-box .container-group-control{background:transparent;text-transform:uppercase}:host ::ng-deep .container-box-custom{margin-bottom:25px}:host ::ng-deep .unchecked .container-box{border-color:#0003}:host ::ng-deep .unchecked .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .unchecked.timeline-item .icon-circle{background-color:#6e6e6e}:host ::ng-deep .collapsed .box-content-wrapper{opacity:0;display:none;transition:max-height .3s .1s}:host ::ng-deep .box-content-wrapper{transition:opacity .5s .1s;display:block;opacity:1}:host ::ng-deep .box-actions{position:absolute;right:25px;z-index:2;top:21px;opacity:1;transition:height .3s ease-out,opacity .5s .1s}:host ::ng-deep .box-action-button{height:32px;width:32px;line-height:32px;font-size:12px;text-align:center;float:left;margin-left:5px;border-radius:50%;transition:all .25s ease 0s}:host ::ng-deep .box-action-button a{color:#0000008a}:host ::ng-deep .box-action-button .check-icon{line-height:32px}:host ::ng-deep .box-actions-group{top:18px;right:45px}:host ::ng-deep .box-action-button:hover,:host ::ng-deep .box-action-button:focus{background-color:#0000001a;cursor:pointer;outline:none}:host ::ng-deep .box-action-button:active{background-color:#0003;cursor:pointer}:host ::ng-deep .box-action-button.active{background-color:#0000001a}:host ::ng-deep .div-block{clear:both;display:block}:host ::ng-deep .div-inline{float:left}:host ::ng-deep .checkbox-select{position:relative;display:block}:host ::ng-deep .checkbox-select label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .checkbox-select input[type=checkbox]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .checkbox-select .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:2px;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .checkbox-select .input-helper:after{font-weight:100;line-height:12px;font-size:10px;color:#fff;font-family:FontAwesome;position:absolute;content:\"\\f00c\";width:12px;height:12px;background:#0065ff;border-radius:0;top:1px;left:2px;transform:scale(0);transition:all;transition-duration:.15s}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:before,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:after,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button{position:relative;display:block}:host ::ng-deep .radio-button label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .radio-button input[type=radio]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .radio-button .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:50%;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button .input-helper:after{position:absolute;content:\"\";width:6px;height:6px;background:var(--vl-primary-color);border-radius:50%;top:4px;left:5px;transform:scale(0);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .form-control-wrapper .checkbox-select,:host ::ng-deep .form-control-wrapper .radio-button{padding-top:10px}:host ::ng-deep .shopping-bag-sidebar.open{transform:translate3d(-100%,0,0)}:host ::ng-deep .shopping-bag-sidebar{position:fixed;top:0;bottom:0;z-index:1051;width:420px;right:-420px;background-color:#2a2b30;transition:.3s transform}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart{color:#abacae;position:absolute;top:20%;width:50px;height:50px;line-height:50px;text-align:center;right:100%;left:auto;background:#2a2b30;border-radius:3px 0 0 3px;display:block}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:before{font-family:FontAwesome;content:\"\\f291\"}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:hover{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:active,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:focus,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:visited{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .cart-count{font-size:9px;font-weight:700;line-height:15px;position:absolute;top:50%;right:8px;width:15px;height:15px;margin:-16px 0 0;text-align:center;color:#fff;border-radius:50%;background:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-container{overflow:auto;display:block;height:100%;padding:0 25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item{color:#abacae;background-color:#000;position:relative;overflow:auto;margin-bottom:10px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title{position:relative;padding-right:25px;padding-left:25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .header{float:left;color:#abacae;margin:0;line-height:48px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-actions{height:48px;float:right;top:0}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-action-button{height:32px;width:32px;line-height:32px;font-size:10px;font-weight:700;margin-top:8px;text-align:center;transition:all .25s ease 0s;color:#fff;background-color:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-title{color:#cecece;font-size:11px;text-transform:uppercase;line-height:64px;font-weight:600;padding-top:0;margin-top:25px;margin-bottom:25px;text-align:right}:host ::ng-deep .container-box.hovered:before,:host ::ng-deep .box-title.hovered:before,:host ::ng-deep .container-box.selected:before,:host ::ng-deep .box-title.selected:before{inset:0}:host ::ng-deep .selectable{position:relative;cursor:pointer}:host ::ng-deep .container-box.hovered:before{border-color:transparent}:host ::ng-deep .container-box.hovered{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box.selected:before{border-color:transparent}:host ::ng-deep .container-box.selected{border-color:var(--vl-primary-color)}:host ::ng-deep .hovered:before{display:block!important;position:absolute;content:\" \";inset:-15px 15px 15px -15px;border:1px solid var(--vl-primary-color)}:host ::ng-deep .hovered .box-action-button{opacity:1!important}:host ::ng-deep .opacity-1{opacity:1!important}:host ::ng-deep .overflow-y--auto{overflow-y:auto}:host ::ng-deep .gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}:host ::ng-deep .gu-hide{display:none!important}:host ::ng-deep .gu-unselectable{-webkit-user-select:none!important;user-select:none!important}:host ::ng-deep .gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}:host ::ng-deep .top-nav-msg{margin-top:-30px}:host ::ng-deep .runtime-info-message ul{margin-bottom:0;list-style:none}:host ::ng-deep .runtime-info-message ul li{margin-bottom:10px}:host ::ng-deep .runtime-info-message ul li:last-child{margin-bottom:0}:host ::ng-deep .runtime-info-message .message-text{font-family:Open Sans,Tahoma,sans-serif!important;overflow:hidden;padding:0;font-size:11px}:host ::ng-deep .runtime-attributes-popover .popover-arrow{display:none}:host ::ng-deep .runtime-attributes-popover .popover-content{padding:0}:host ::ng-deep .runtime-attributes-popover .runtime-content-wrapper{padding:0}:host ::ng-deep .runtime-attributes-popover .container-box-custom{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form{margin:0;padding:0}:host ::ng-deep .runtime-attributes-popover .input-form form{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form form .div-inline{display:block;float:none}:host ::ng-deep .runtime-attributes-popover .input-form form .form-group{padding:0;margin:0}:host ::ng-deep .runtime-attributes-popover .container-box .box-content{padding:0}:host ::ng-deep .v-custom-title,:host ::ng-deep .v-custom-description,:host ::ng-deep .v-custom-image{display:none}:host ::ng-deep .dropdown{position:relative}:host ::ng-deep .dropdown-toggle:focus{outline:0}:host ::ng-deep .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d}:host ::ng-deep .dropdown-menu.pull-right{right:0;left:auto}:host ::ng-deep .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}:host ::ng-deep .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}:host ::ng-deep .dropdown-menu>li>a:hover,:host ::ng-deep .dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}:host ::ng-deep .dropdown-menu>.active>a,:host ::ng-deep .dropdown-menu>.active>a:hover,:host ::ng-deep .dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}:host ::ng-deep .dropdown-menu>.disabled>a,:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{color:#777}:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}:host ::ng-deep .open>.dropdown-menu{display:block}:host ::ng-deep .open>a{outline:0}:host ::ng-deep .dropdown-menu-right{right:0;left:auto}:host ::ng-deep .dropdown-menu-left{right:auto;left:0}:host ::ng-deep .dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}:host ::ng-deep .dropdown-backdrop{position:fixed;inset:0;z-index:990}\n", ".info{color:var(--vl-text-color-secondary);font-weight:300;font-size:13px;line-height:20px}.info.error{color:var(--vl-error-color)}\n"], dependencies: [{ kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SectionRendererComponent, selector: "vl-section-renderer", inputs: ["section", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ComponentPreviewComponent, decorators: [{
3166
+ type: Component,
3167
+ args: [{ selector: 'vl-component-preview', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3168
+ SectionsService,
3169
+ FormScopeService,
3170
+ CollapsibleStateService,
3171
+ RuntimeFormService,
3172
+ FormScopeService,
3173
+ RuntimeService,
3174
+ ], template: "<ng-container *ngIf=\"showPreview\">\n <vl-section-renderer [section]=\"section!\" [form]=\"form\"></vl-section-renderer>\n</ng-container>\n\n<span class=\"info\" *ngIf=\"isNoPreviewAvailable\">No preview available</span>\n<span class=\"info error\" *ngIf=\"isPreviewFailed\">Preview has failed</span>\n", styles: ["body.veloce-apex-index,body.veloce-index,body.sfdcBody{overflow:hidden;margin:0;padding:0}:host ::ng-deep .velo-app .modal.in .modal-dialog.runtime-modal{margin-left:5%;margin-right:5%;padding:0;position:relative;width:auto}:host ::ng-deep .modal-body.runtime-modal.main-container{height:100%;margin:0;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .content-wrapper{display:flex;flex-direction:column;height:100%}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper{display:flex;flex-direction:column;flex-grow:1;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid{height:100%;margin:0;padding:0;overflow:auto}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal .form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid section-script>:first-child{height:100%}:host ::ng-deep .runtime-modal .modal-content,:host ::ng-deep .gu-mirror .modal-content{background-color:--vl-input-background}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a{color:#333333b3;font-weight:600;text-transform:uppercase;letter-spacing:.85px;font-size:10px}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active{color:#333}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.disabled,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.disabled{color:#33333380}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active:after,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active:after{background-color:#f36;bottom:-1px;content:\"\";height:1px;left:0;position:absolute;width:100%}:host ::ng-deep .runtime-modal .modal-content .modal-header,:host ::ng-deep .gu-mirror .modal-content .modal-header{background:transparent;color:#fff}:host ::ng-deep .runtime-modal .runtime-group-divider,:host ::ng-deep .gu-mirror .runtime-group-divider{border-bottom:1px solid #e5e5e5}:host ::ng-deep .runtime-modal .input-form-input,:host ::ng-deep .gu-mirror .input-form-input{position:relative;padding-left:0;padding-top:0}:host ::ng-deep .runtime-modal .input-form-input--required>label,:host ::ng-deep .gu-mirror .input-form-input--required>label{color:#ff4233;font-weight:700}:host ::ng-deep .form-control-wrapper{position:relative}:host ::ng-deep .add-config-control:hover{background-color:#e96099;color:#fff;border:1px solid transparent}:host ::ng-deep .remove-config-control:hover{background-color:#828c9e;color:#fff}:host ::ng-deep .add-config-control[disabled],:host ::ng-deep .remove-config-control[disabled]{background-color:transparent;color:#ccc;border:1px dashed #ccc}:host ::ng-deep .add-config-control[disabled]:hover,:host ::ng-deep .remove-config-control[disabled]:hover{cursor:default}:host ::ng-deep .add-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;border-radius:50%;float:left;position:absolute;top:0;right:-57px;z-index:500;background-color:#e3337c;color:#fff;border:1px solid #e3337c;transition:all .5s ease 0s}:host ::ng-deep .add-config-control .plus-icon{line-height:36px}:host ::ng-deep .remove-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;margin-right:25px;border-radius:50%;float:left;position:absolute;top:33px;right:51px;z-index:500;background-color:transparent;color:#687285;border:1px solid transparent;transition:all .5s ease 0s}:host ::ng-deep .remove-config-control .plus-icon{line-height:36px}:host ::ng-deep .sidebar .new-wrapper{min-height:96px;margin-bottom:25px}:host ::ng-deep .sidebar .new-wrapper .add-container .add-card{left:0;margin-left:15px}:host ::ng-deep .ui-settings{height:100%;display:flex;flex-direction:column}:host ::ng-deep .runtime-modal .form-horizontal form,:host ::ng-deep .gu-mirror form{margin:0}:host ::ng-deep .runtime-modal .form-horizontal .form-group,:host ::ng-deep .gu-mirror .form-group{margin:0;padding:0}:host ::ng-deep .runtime-modal .form-horizontal .control.form-group,:host ::ng-deep .gu-mirror .control.form-group{margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .form-control-wrapper,:host ::ng-deep .gu-mirror .form-control-wrapper{min-width:172px;margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper{min-width:50px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper .form-control,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper .form-control{width:50px}:host ::ng-deep .runtime-left-side{height:calc(100% - 97px);background:#fff;padding:48px 56px 0}:host ::ng-deep .ui-controls-group{margin-left:-8px;margin-right:-8px}:host ::ng-deep .ui-controls-group .ui-control-type:hover{border-color:#3384ff}:host ::ng-deep .ui-controls-group .ui-control-type{position:relative;min-width:140px;float:left;border-radius:3px;border:1px solid #c4c4c4;background-color:#fff;width:calc(50% - 16px);padding:12px 13px;margin-bottom:16px;margin-right:8px;margin-left:8px;cursor:pointer}:host ::ng-deep .ui-controls-group .ui-control-type span{padding-left:3px}:host ::ng-deep .sidebar-header{letter-spacing:-.5px;padding-bottom:24px;padding-top:0;line-height:32px;font-size:24px;font-weight:700;color:#333}:host ::ng-deep .sidebar-header small{display:block;color:#333;font-size:11px;font-weight:300;line-height:20px;margin:0}:host ::ng-deep .sidebar-menu-list{color:#333333b3;margin:0;width:100%;list-style:none;font-size:12px}:host ::ng-deep .sidebar-menu-list li.active a,:host ::ng-deep .sidebar-menu-list li.active i{color:#005ee3}:host ::ng-deep .sidebar-menu-list li:hover{cursor:pointer}:host ::ng-deep .sidebar-menu-list li{text-align:right;padding-left:16px}:host ::ng-deep .sidebar-menu-list li a{padding:0 8px;margin-left:-8px;cursor:pointer;white-space:nowrap;color:inherit;font-weight:700;display:inline-block;line-height:32px}:host ::ng-deep .sidebar-menu-list li i{display:none;padding-right:5px}:host ::ng-deep .runtime-builder-content{min-height:100%}:host ::ng-deep .runtime-builder-content .input-form{margin:0;padding:18px 11px 0}:host ::ng-deep .runtime-builder-content .input-form .form-group{border:3px dashed transparent}:host ::ng-deep .runtime-builder-content .input-form .form-group:hover{border:3px dashed #dedede}:host ::ng-deep .runtime-right-side{background:#fff}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background:#fff;position:relative;display:inline-block;padding-right:16px;text-transform:uppercase;font-size:10px;letter-spacing:.2px}:host ::ng-deep .sidebar-section:before{content:\" \";position:absolute;top:50%;left:0;right:0;border-top:1px solid #e6e6e6}:host ::ng-deep .sidebar-section{position:relative;margin-top:16px;margin-bottom:16px}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background-color:var(--vl-input-background);position:relative;display:inline-block;padding-right:16px;padding-left:8px;text-transform:uppercase;font-size:6px;letter-spacing:.2px}:host ::ng-deep .section-wrapper{top:-21px;position:absolute;right:0;left:12px}:host ::ng-deep .container-box.container-box-bordered{border:1px solid rgba(0,0,0,.2);margin-bottom:25px;padding-left:25px}:host ::ng-deep .container-box.container-box-radio{margin-left:0}:host ::ng-deep .container-box.container-box-radio:hover,:host ::ng-deep .container-box.container-box-checkbox:hover{cursor:pointer}:host ::ng-deep .container-box{position:relative;overflow:auto;border:1px solid transparent;background:var(--vl-input-background)}:host ::ng-deep .container-box .container-box{border:1px solid rgba(0,0,0,.2);margin-left:25px;margin-right:25px;margin-bottom:25px}:host ::ng-deep .container-box .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box .box-title .header .header-label{color:#333;margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-label small{padding-left:21px;color:#757575;font-weight:400;font-size:10px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-qty-container,:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{display:table-cell;vertical-align:middle;height:75px;padding-left:21px}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control,:host ::ng-deep .container-box .box-title .header .radio-button .form-control,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control{height:auto;color:#333;width:50px;border:1px solid #dddddd}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control:focus,:host ::ng-deep .container-box .box-title .header .radio-button .form-control:focus,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control:focus{border:1px solid #c4c4c4}:host ::ng-deep .container-box .box-title .header .header-qty-container .validation-message,:host ::ng-deep .container-box .box-title .header .radio-button .validation-message,:host ::ng-deep .container-box .box-title .header .checkbox-select .validation-message{position:absolute;margin-top:3px}:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{padding-left:0;vertical-align:middle}:host ::ng-deep .container-box .box-content{padding:25px 0 25px 33px}:host ::ng-deep .container-box .timeline-item{clear:both;display:block;width:100%;position:relative}:host ::ng-deep .container-box .timeline-item:before{display:block!important;content:\"\";position:absolute;left:25px;top:-25px;bottom:25px;width:1px;border-left:1px dashed rgba(0,0,0,.2)}:host ::ng-deep .container-box .timeline-item .icon{background:#90c7ec;width:35px;height:35px;border-radius:50%;position:absolute;left:24px;top:4px}:host ::ng-deep .container-box .timeline-item .icon .fa.fa-upload{left:11px;top:10px}:host ::ng-deep .container-box .timeline-item .icon .fa{color:#fff;position:absolute}:host ::ng-deep .container-box .timeline-item .message .content{float:left;width:80%}:host ::ng-deep .container-box .container-group-control{background:transparent;text-transform:uppercase}:host ::ng-deep .container-box-custom{margin-bottom:25px}:host ::ng-deep .unchecked .container-box{border-color:#0003}:host ::ng-deep .unchecked .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .unchecked.timeline-item .icon-circle{background-color:#6e6e6e}:host ::ng-deep .collapsed .box-content-wrapper{opacity:0;display:none;transition:max-height .3s .1s}:host ::ng-deep .box-content-wrapper{transition:opacity .5s .1s;display:block;opacity:1}:host ::ng-deep .box-actions{position:absolute;right:25px;z-index:2;top:21px;opacity:1;transition:height .3s ease-out,opacity .5s .1s}:host ::ng-deep .box-action-button{height:32px;width:32px;line-height:32px;font-size:12px;text-align:center;float:left;margin-left:5px;border-radius:50%;transition:all .25s ease 0s}:host ::ng-deep .box-action-button a{color:#0000008a}:host ::ng-deep .box-action-button .check-icon{line-height:32px}:host ::ng-deep .box-actions-group{top:18px;right:45px}:host ::ng-deep .box-action-button:hover,:host ::ng-deep .box-action-button:focus{background-color:#0000001a;cursor:pointer;outline:none}:host ::ng-deep .box-action-button:active{background-color:#0003;cursor:pointer}:host ::ng-deep .box-action-button.active{background-color:#0000001a}:host ::ng-deep .div-block{clear:both;display:block}:host ::ng-deep .div-inline{float:left}:host ::ng-deep .checkbox-select{position:relative;display:block}:host ::ng-deep .checkbox-select label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .checkbox-select input[type=checkbox]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .checkbox-select .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:2px;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .checkbox-select .input-helper:after{font-weight:100;line-height:12px;font-size:10px;color:#fff;font-family:FontAwesome;position:absolute;content:\"\\f00c\";width:12px;height:12px;background:#0065ff;border-radius:0;top:1px;left:2px;transform:scale(0);transition:all;transition-duration:.15s}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:before,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:after,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button{position:relative;display:block}:host ::ng-deep .radio-button label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .radio-button input[type=radio]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .radio-button .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:50%;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button .input-helper:after{position:absolute;content:\"\";width:6px;height:6px;background:var(--vl-primary-color);border-radius:50%;top:4px;left:5px;transform:scale(0);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .form-control-wrapper .checkbox-select,:host ::ng-deep .form-control-wrapper .radio-button{padding-top:10px}:host ::ng-deep .shopping-bag-sidebar.open{transform:translate3d(-100%,0,0)}:host ::ng-deep .shopping-bag-sidebar{position:fixed;top:0;bottom:0;z-index:1051;width:420px;right:-420px;background-color:#2a2b30;transition:.3s transform}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart{color:#abacae;position:absolute;top:20%;width:50px;height:50px;line-height:50px;text-align:center;right:100%;left:auto;background:#2a2b30;border-radius:3px 0 0 3px;display:block}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:before{font-family:FontAwesome;content:\"\\f291\"}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:hover{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:active,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:focus,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:visited{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .cart-count{font-size:9px;font-weight:700;line-height:15px;position:absolute;top:50%;right:8px;width:15px;height:15px;margin:-16px 0 0;text-align:center;color:#fff;border-radius:50%;background:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-container{overflow:auto;display:block;height:100%;padding:0 25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item{color:#abacae;background-color:#000;position:relative;overflow:auto;margin-bottom:10px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title{position:relative;padding-right:25px;padding-left:25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .header{float:left;color:#abacae;margin:0;line-height:48px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-actions{height:48px;float:right;top:0}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-action-button{height:32px;width:32px;line-height:32px;font-size:10px;font-weight:700;margin-top:8px;text-align:center;transition:all .25s ease 0s;color:#fff;background-color:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-title{color:#cecece;font-size:11px;text-transform:uppercase;line-height:64px;font-weight:600;padding-top:0;margin-top:25px;margin-bottom:25px;text-align:right}:host ::ng-deep .container-box.hovered:before,:host ::ng-deep .box-title.hovered:before,:host ::ng-deep .container-box.selected:before,:host ::ng-deep .box-title.selected:before{inset:0}:host ::ng-deep .selectable{position:relative;cursor:pointer}:host ::ng-deep .container-box.hovered:before{border-color:transparent}:host ::ng-deep .container-box.hovered{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box.selected:before{border-color:transparent}:host ::ng-deep .container-box.selected{border-color:var(--vl-primary-color)}:host ::ng-deep .hovered:before{display:block!important;position:absolute;content:\" \";inset:-15px 15px 15px -15px;border:1px solid var(--vl-primary-color)}:host ::ng-deep .hovered .box-action-button{opacity:1!important}:host ::ng-deep .opacity-1{opacity:1!important}:host ::ng-deep .overflow-y--auto{overflow-y:auto}:host ::ng-deep .gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}:host ::ng-deep .gu-hide{display:none!important}:host ::ng-deep .gu-unselectable{-webkit-user-select:none!important;user-select:none!important}:host ::ng-deep .gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}:host ::ng-deep .top-nav-msg{margin-top:-30px}:host ::ng-deep .runtime-info-message ul{margin-bottom:0;list-style:none}:host ::ng-deep .runtime-info-message ul li{margin-bottom:10px}:host ::ng-deep .runtime-info-message ul li:last-child{margin-bottom:0}:host ::ng-deep .runtime-info-message .message-text{font-family:Open Sans,Tahoma,sans-serif!important;overflow:hidden;padding:0;font-size:11px}:host ::ng-deep .runtime-attributes-popover .popover-arrow{display:none}:host ::ng-deep .runtime-attributes-popover .popover-content{padding:0}:host ::ng-deep .runtime-attributes-popover .runtime-content-wrapper{padding:0}:host ::ng-deep .runtime-attributes-popover .container-box-custom{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form{margin:0;padding:0}:host ::ng-deep .runtime-attributes-popover .input-form form{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form form .div-inline{display:block;float:none}:host ::ng-deep .runtime-attributes-popover .input-form form .form-group{padding:0;margin:0}:host ::ng-deep .runtime-attributes-popover .container-box .box-content{padding:0}:host ::ng-deep .v-custom-title,:host ::ng-deep .v-custom-description,:host ::ng-deep .v-custom-image{display:none}:host ::ng-deep .dropdown{position:relative}:host ::ng-deep .dropdown-toggle:focus{outline:0}:host ::ng-deep .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d}:host ::ng-deep .dropdown-menu.pull-right{right:0;left:auto}:host ::ng-deep .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}:host ::ng-deep .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}:host ::ng-deep .dropdown-menu>li>a:hover,:host ::ng-deep .dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}:host ::ng-deep .dropdown-menu>.active>a,:host ::ng-deep .dropdown-menu>.active>a:hover,:host ::ng-deep .dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}:host ::ng-deep .dropdown-menu>.disabled>a,:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{color:#777}:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}:host ::ng-deep .open>.dropdown-menu{display:block}:host ::ng-deep .open>a{outline:0}:host ::ng-deep .dropdown-menu-right{right:0;left:auto}:host ::ng-deep .dropdown-menu-left{right:auto;left:0}:host ::ng-deep .dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}:host ::ng-deep .dropdown-backdrop{position:fixed;inset:0;z-index:990}\n", ".info{color:var(--vl-text-color-secondary);font-weight:300;font-size:13px;line-height:20px}.info.error{color:var(--vl-error-color)}\n"] }]
3175
+ }], ctorParameters: function () { return [{ type: SectionsService }, { type: RuntimeFormService }, { type: FormScopeService }, { type: RuntimeService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
3176
+ type: Input
3177
+ }] } });
3178
+
3179
+ const getSectionTree = (src) => {
3180
+ const sections = EntityUtil.clone(src);
3181
+ const sectionIdMap = new Map();
3182
+ sections.forEach(section => sectionIdMap.set(section.id, section));
3183
+ const sectionTree = [];
3184
+ sections.forEach(section => {
3185
+ if (section.parentId) {
3186
+ const parentSection = sectionIdMap.get(section.parentId);
3187
+ if (parentSection) {
3188
+ const sectionFromMap = sectionIdMap.get(section.id);
3189
+ if (sectionFromMap) {
3190
+ parentSection.addChild(sectionFromMap);
3191
+ }
3192
+ }
3193
+ }
3194
+ else {
3195
+ const s = sectionIdMap.get(section.id);
3196
+ if (s) {
3197
+ sectionTree.push(s);
3198
+ }
3199
+ }
3200
+ });
3201
+ return sectionTree;
3202
+ };
3203
+
3204
+ class RuntimeComponent {
3205
+ constructor(sectionsService, formScope, collapsibleState, formService, runtimeService, messageService, contextService, orderByPipe, searchFilterPipe, cdr) {
3206
+ this.sectionsService = sectionsService;
3207
+ this.formScope = formScope;
3208
+ this.collapsibleState = collapsibleState;
3209
+ this.formService = formService;
3210
+ this.runtimeService = runtimeService;
3211
+ this.messageService = messageService;
3212
+ this.contextService = contextService;
3213
+ this.orderByPipe = orderByPipe;
3214
+ this.searchFilterPipe = searchFilterPipe;
3215
+ this.cdr = cdr;
3216
+ this.messageBucketId = 'ui.runtime';
3217
+ this.sortedSections = [];
3218
+ this.staticSections = [];
3219
+ this.form = new FormGroup({});
3220
+ this.solutionIsReady = false;
3221
+ this.unsubscribe = new Subject();
3222
+ this.solutionUpdated = new EventEmitter();
3223
+ }
3224
+ adjustPrice(valueOption, section, solutionLineItem, patch) {
3225
+ const parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3226
+ if (!parentLineItem) {
3227
+ return;
3228
+ }
3229
+ parentLineItem.lineItems = parentLineItem.lineItems.map(lineItem => {
3230
+ const { productId, chargeItems } = lineItem;
3231
+ if (productId !== valueOption) {
3232
+ return lineItem;
3233
+ }
3234
+ const chargeItem = chargeItems.shift();
3235
+ const updatedChargeItem = {
3236
+ ...chargeItem,
3237
+ ...patch,
3238
+ };
3239
+ return {
3240
+ ...lineItem,
3241
+ chargeItems: [updatedChargeItem, ...chargeItems],
3242
+ };
3243
+ });
3244
+ this.updateRuntime(solutionLineItem);
3245
+ }
3246
+ ngOnInit() {
3247
+ this.formScope.formSubmitEvent.pipe(takeUntil(this.unsubscribe)).subscribe((e) => {
3248
+ try {
3249
+ this.form.updateValueAndValidity();
3250
+ const solutionLineItem = EntityUtil.clone(this.solutionLineItem);
3251
+ const section = this.findSection(e.id);
3252
+ if (!section) {
3253
+ throw 'Section not found';
3254
+ }
3255
+ const entityType = section.boundData.entityType;
3256
+ if (entityType === BoundDataType[BoundDataType.PORT] || entityType === BoundDataType[BoundDataType.TYPE]) {
3257
+ if (e.action === 'patch' && EntityUtil.isPresent(e.valueOption)) {
3258
+ const valueOption = e['valueOption'];
3259
+ if (!section.model?.parentId) {
3260
+ this.collapsibleState.clearState(section.id);
3261
+ this.updateRuntime(valueOption);
3262
+ }
3263
+ else {
3264
+ const parentLineItem = LineItemUtil.findById(section.model.parentId, [solutionLineItem]);
3265
+ if (parentLineItem) {
3266
+ const indx = parentLineItem.lineItems.findIndex(item => item.id === section.model?.id);
3267
+ parentLineItem.lineItems.splice(indx, 1, valueOption);
3268
+ this.collapsibleState.clearState(section.id);
3269
+ this.updateRuntime(solutionLineItem);
3270
+ }
3271
+ }
3272
+ }
3273
+ }
3274
+ if (entityType === BoundDataType[BoundDataType.PORT]) {
3275
+ if (e.action === 'upsert') {
3276
+ const parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3277
+ if (parentLineItem) {
3278
+ parentLineItem.lineItems.forEach(i => {
3279
+ if (e.selectedValueOptions &&
3280
+ e.selectedValueOptions.findIndex(v => v.toLowerCase() === i.type.toLowerCase()) < 0) {
3281
+ this.updateCardinalityVariable(parentLineItem, i, 0);
3282
+ }
3283
+ });
3284
+ const lineItems = parentLineItem?.lineItems.filter(i => e.selectedValueOptions &&
3285
+ e.selectedValueOptions.findIndex(v => v.toLowerCase() === i.type.toLowerCase()) > -1);
3286
+ e.selectedValueOptions?.forEach(v => {
3287
+ if (lineItems?.findIndex(item => item.type.toLowerCase() === v.toLowerCase()) === -1) {
3288
+ const lineItem = this.createLineItem(section, v, parentLineItem);
3289
+ this.updateCardinalityVariable(parentLineItem, lineItem);
3290
+ lineItems.push(lineItem);
3291
+ }
3292
+ });
3293
+ this.updateRuntime(solutionLineItem);
3294
+ }
3295
+ }
3296
+ if (e.action === 'create') {
3297
+ const parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3298
+ if (parentLineItem) {
3299
+ const valueOption = e.valueOption;
3300
+ const lineItem = this.createLineItem(section, valueOption, parentLineItem);
3301
+ parentLineItem.lineItems.push(lineItem);
3302
+ this.updateCardinalityVariable(parentLineItem, lineItem);
3303
+ this.updateRuntime(solutionLineItem);
3304
+ }
3305
+ }
3306
+ if (e.action === 'copy') {
3307
+ const parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3308
+ if (parentLineItem) {
3309
+ const valueOption = e.valueOption;
3310
+ const lineItemToCopy = parentLineItem.lineItems.find(li => li.id === valueOption);
3311
+ if (lineItemToCopy) {
3312
+ const lineItem = { ...lineItemToCopy, id: '' };
3313
+ parentLineItem.lineItems.push(lineItem);
3314
+ this.updateCardinalityVariable(parentLineItem, lineItem);
3315
+ this.updateRuntime(solutionLineItem);
3316
+ }
3317
+ }
3318
+ }
3319
+ if (e.action === 'update') {
3320
+ const parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3321
+ if (parentLineItem) {
3322
+ //Assuming that radio control is the only control, that 'updates' values
3323
+ const previous = section.model?.lineItems.filter(li => li.port && li.port === section.boundData.name)[0];
3324
+ if (previous) {
3325
+ this.updateCardinalityVariable(parentLineItem, previous, 0);
3326
+ }
3327
+ const index = parentLineItem.lineItems.findIndex(li => li.id === previous?.id);
3328
+ const lineItem = {
3329
+ id: UUID.UUID(),
3330
+ qty: previous?.qty,
3331
+ port: previous?.port,
3332
+ type: EntityUtil.isPresent(e.valueOption) ? e.valueOption : this.form.controls[e.id].value,
3333
+ cfgStatus: 'New',
3334
+ parentId: previous?.parentId,
3335
+ };
3336
+ this.updateCardinalityVariable(parentLineItem, lineItem);
3337
+ parentLineItem.lineItems[index] = lineItem;
3338
+ this.updateRuntime(solutionLineItem);
3339
+ }
3340
+ }
3341
+ if (e.action === 'remove') {
3342
+ const parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3343
+ if (parentLineItem &&
3344
+ SectionsBinderHelper.isRemoveAllowed(parentLineItem, section.boundData.name, section.model?.qty)) {
3345
+ const index = parentLineItem.lineItems.findIndex(item => item.type.toLowerCase() === e.valueOption?.toLowerCase());
3346
+ if (index > -1) {
3347
+ const removed = parentLineItem.lineItems.splice(index, 1)[0];
3348
+ this.updateCardinalityVariable(parentLineItem, removed, 0);
3349
+ this.updateRuntime(solutionLineItem);
3350
+ }
3351
+ }
3352
+ }
3353
+ if (e.action === 'qtyUpdate') {
3354
+ const typeSection = e.valueOption
3355
+ ? SectionHelperService.findSectionForValue(section, e.valueOption)
3356
+ : undefined;
3357
+ const typeLineItem = typeSection?.model && LineItemUtil.findById(typeSection.model.id, [solutionLineItem]);
3358
+ if (typeSection && typeLineItem) {
3359
+ typeLineItem.qty = +this.form.controls[typeSection.id + 'qty'].value;
3360
+ typeLineItem.cfgStatus = 'User';
3361
+ this.updateRuntime(solutionLineItem);
3362
+ }
3363
+ }
3364
+ if (e.action === 'adjustNetPrice') {
3365
+ const { valueOption, options } = e;
3366
+ const { amount } = options ?? {};
3367
+ const priceAdjustment = {
3368
+ type: 'OVERRIDE_AMOUNT',
3369
+ explanation: 'Manual net price adjustment',
3370
+ formula: '',
3371
+ amount,
3372
+ };
3373
+ this.adjustPrice(valueOption, section, solutionLineItem, { priceAdjustment });
3374
+ }
3375
+ if (e.action === 'adjustListPrice') {
3376
+ const { valueOption, options } = e;
3377
+ const { amount } = options ?? {};
3378
+ const listPriceAdjustment = {
3379
+ type: 'OVERRIDE_AMOUNT',
3380
+ explanation: 'Manual list price adjustment',
3381
+ formula: '',
3382
+ amount,
3383
+ };
3384
+ this.adjustPrice(valueOption, section, solutionLineItem, { listPriceAdjustment });
3385
+ }
3386
+ }
3387
+ if (entityType === BoundDataType[BoundDataType.TYPE]) {
3388
+ if (e.action === 'remove') {
3389
+ const parentLineItem = section.model?.parentId && LineItemUtil.findById(section.model.parentId, [solutionLineItem]);
3390
+ if (parentLineItem &&
3391
+ section.model &&
3392
+ section.model.port &&
3393
+ SectionsBinderHelper.isRemoveAllowed(parentLineItem, section.model.port, section.model?.qty)) {
3394
+ const index = parentLineItem.lineItems.findIndex(item => item.id === section.model?.id);
3395
+ if (index > -1) {
3396
+ const removed = parentLineItem.lineItems.splice(index, 1)[0];
3397
+ this.updateCardinalityVariable(parentLineItem, removed, 0);
3398
+ this.collapsibleState.clearState(section.id);
3399
+ this.updateRuntime(solutionLineItem);
3400
+ }
3401
+ }
3402
+ }
3403
+ if (e.action === 'qtyUpdate') {
3404
+ const typeLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3405
+ if (typeLineItem) {
3406
+ const qty = +this.form.controls[e.id + 'qty'].value;
3407
+ if (typeLineItem.parentId) {
3408
+ const parentLineItem = LineItemUtil.findById(typeLineItem.parentId, [solutionLineItem]);
3409
+ if (parentLineItem) {
3410
+ this.updateCardinalityVariable(parentLineItem, typeLineItem, qty);
3411
+ }
3412
+ }
3413
+ typeLineItem.qty = qty;
3414
+ typeLineItem.cfgStatus = 'User';
3415
+ this.updateRuntime(solutionLineItem);
3416
+ }
3417
+ }
3418
+ }
3419
+ if (entityType === BoundDataType[BoundDataType.ATTRIBUTE]) {
3420
+ if (e.action === 'update') {
3421
+ const parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
3422
+ const attribute = parentLineItem?.attributes.find(attr => attr.name.toLowerCase() === section.boundData.name.toLowerCase());
3423
+ if (attribute) {
3424
+ //Explicitly set value always win
3425
+ let value = typeof e.valueOption !== 'undefined' ? e.valueOption : this.form.controls[e.id].value;
3426
+ if (attribute.type === 'BOOLEAN') {
3427
+ value = value ? 1 : 0;
3428
+ }
3429
+ attribute.value = value;
3430
+ attribute.cfgStatus = 'User';
3431
+ this.updateRuntime(solutionLineItem);
3432
+ }
3433
+ }
3434
+ }
3435
+ }
3436
+ catch (e) {
3437
+ console.log(e);
3438
+ this.messageService.add({ key: this.messageBucketId, summary: `Configuration failed ${e?.message}` });
3439
+ }
3440
+ });
3441
+ this.runtimeService.onSolutionReadyEvent
3442
+ .pipe(takeUntil(this.unsubscribe))
3443
+ .subscribe(lineItem => this.onSolutionReady(lineItem));
3444
+ this.runtimeService.onSolutionUpdatedEvent
3445
+ .pipe(takeUntil(this.unsubscribe))
3446
+ .subscribe((data) => {
3447
+ if (!(data instanceof HttpErrorResponse)) {
3448
+ return this.handleSolutionUpdate(data);
3449
+ }
3450
+ this.handleSolutionFailedUpdate(data);
3451
+ });
3452
+ this.runtimeService.onUIRefreshEvent.pipe(takeUntil(this.unsubscribe)).subscribe(() => {
3453
+ const { uiDefinition } = this.runtimeService.getRuntimeContext() ?? {};
3454
+ this.runtimeContext.uiDefinition = uiDefinition;
3455
+ this.formScope.scriptSessionScope = {};
3456
+ this.startRuntime();
3457
+ });
3458
+ }
3459
+ onSolutionReady(lineItem) {
3460
+ const context = this.runtimeService.getRuntimeContext();
3461
+ const configurationContext = this.contextService.resolve();
3462
+ const mergeContext = {
3463
+ ...context,
3464
+ properties: {
3465
+ ...context.properties,
3466
+ ...configurationContext.properties,
3467
+ },
3468
+ };
3469
+ const accountId = mergeContext.properties?.AccountId;
3470
+ if (accountId && accountId.length === 15) {
3471
+ this.runtimeContext = {
3472
+ ...mergeContext,
3473
+ properties: {
3474
+ ...mergeContext.properties,
3475
+ AccountId: SalesforceIdUtils.generateId18FromId15(accountId),
3476
+ },
3477
+ };
3478
+ }
3479
+ else {
3480
+ this.runtimeContext = mergeContext;
3481
+ }
3482
+ this.solutionLineItem = lineItem;
3483
+ this.runtimeService.setRuntimeContext(this.runtimeContext);
3484
+ this.startRuntime();
3485
+ }
3486
+ handleSolutionUpdate(updatedLineItem) {
3487
+ this.solutionLineItem = updatedLineItem;
3488
+ this.processSolution(true);
3489
+ this.runtimeService.solutionProcessed(this.solutionLineItem);
3490
+ this.cdr.detectChanges();
3491
+ }
3492
+ handleSolutionFailedUpdate(error) {
3493
+ const hasErrorMessage = EntityUtil.isPresent(error.error) && EntityUtil.isPresent(error.error.message);
3494
+ const message = hasErrorMessage ? error.error.message : 'Configuration failed';
3495
+ const { isHandlingConfigurationErrors } = this.runtimeContext.uiDefinition ?? {};
3496
+ if (isHandlingConfigurationErrors) {
3497
+ this.messageService.add({ key: this.messageBucketId, summary: message });
3498
+ }
3499
+ this.solutionLineItem = {
3500
+ ...this.solutionLineItem,
3501
+ messages: [...this.solutionLineItem.messages, `E:${message}`],
3502
+ };
3503
+ this.processSolution(true, true);
3504
+ this.runtimeService.solutionProcessed(this.solutionLineItem);
3505
+ this.cdr.detectChanges();
3506
+ }
3507
+ updateCardinalityVariable(parent, updated, newQuantity) {
3508
+ const portDomain = updated.port ? parent.portDomains[updated.port] : undefined;
3509
+ const domainType = portDomain?.domainTypes.find(t => t.name === updated.type);
3510
+ const cardinality = domainType?.cardinality ?? 0;
3511
+ let qty;
3512
+ if (!Number.isFinite(domainType?.cardinality)) {
3513
+ qty = Number.isFinite(newQuantity) ? newQuantity : updated.qty;
3514
+ }
3515
+ else {
3516
+ qty = EntityUtil.isPresent(newQuantity)
3517
+ ? cardinality - updated.qty + newQuantity
3518
+ : cardinality + updated.qty;
3519
+ }
3520
+ const cardinalityName = '#CV-' + updated.type + '@' + updated.port;
3521
+ let cardinalityVariable = parent.attributes.find(a => a.name === cardinalityName);
3522
+ if (!cardinalityVariable) {
3523
+ cardinalityVariable = {
3524
+ id: UUID.UUID(),
3525
+ name: cardinalityName,
3526
+ };
3527
+ parent.attributes.push(cardinalityVariable);
3528
+ }
3529
+ cardinalityVariable.value = qty;
3530
+ cardinalityVariable.cfgStatus = 'User';
3531
+ }
3532
+ createLineItem(section, valueOption, parentLineItem) {
3533
+ return {
3534
+ qty: +this.form.controls[section.id + 'qty'].value,
3535
+ port: section.boundData.name,
3536
+ type: EntityUtil.isPresent(valueOption) ? valueOption : this.form.controls[section.id].value,
3537
+ cfgStatus: 'New',
3538
+ parentId: parentLineItem?.id,
3539
+ };
3540
+ }
3541
+ ngOnDestroy() {
3542
+ this.unsubscribe.next();
3543
+ this.sectionsService.destroy();
3544
+ }
3545
+ startRuntime() {
3546
+ const uiDefinition = this.runtimeContext.uiDefinition;
3547
+ const defaultTab = uiDefinition?.tabs?.find(tab => tab.isDefault);
3548
+ this.activeUITab = EntityUtil.isPresent(defaultTab) ? defaultTab : uiDefinition?.tabs?.[0];
3549
+ this.sectionsService.compileModule(uiDefinition?.sections ?? [], uiDefinition?.isViewEncapsulated);
3550
+ this.processSolution();
3551
+ this.solutionIsReady = true;
3552
+ this.cdr.detectChanges();
3553
+ }
3554
+ updateRuntime(lineItem) {
3555
+ this.solutionUpdated.emit(lineItem);
3556
+ }
3557
+ addToCart() {
3558
+ const lineItem = EntityUtil.clone(this.solutionLineItem);
3559
+ this.runtimeService.stopRuntime(lineItem);
3560
+ }
3561
+ processSolution(isUpdate, isError) {
3562
+ //1. Bind sections to solution
3563
+ let sections = EntityUtil.clone(this.runtimeContext.uiDefinition?.sections) ?? [];
3564
+ const sourceSections = EntityUtil.clone(this.runtimeContext.uiDefinition?.sections) ?? [];
3565
+ this.updateLineItemsSectionPath(this.solutionLineItem);
3566
+ SectionsBinderHelper.setLineItemsPath(this.runtimeContext.runtimeModel, this.solutionLineItem, sections, sourceSections, (sec) => !sec.parentId && sec.boundData, this.runtimeContext.uiDefinition?.pricingEnabled ?? false);
3567
+ sections = sections.filter(s => s.model && s.template);
3568
+ //2. Init form
3569
+ this.form = this.formService.initForm(sections, this.solutionLineItem);
3570
+ this.formScope.form = this.form;
3571
+ this.sortedSections = this.filterAndSort(getSectionTree(sections.filter(s => !s.isStatic)));
3572
+ if (!isUpdate) {
3573
+ this.staticSections = this.filterAndSort(getSectionTree(sections.filter(s => s.isStatic)));
3574
+ }
3575
+ if (!isError) {
3576
+ this.messageService.clear(this.messageBucketId);
3577
+ }
3578
+ }
3579
+ hideModal() {
3580
+ this.runtimeService.cancelRuntime();
3581
+ }
3582
+ updateLineItemsSectionPath(lineItem, parent) {
3583
+ const path = {
3584
+ types: parent ? parent.types.concat([lineItem.type]) : [lineItem.type],
3585
+ ports: parent ? parent.ports.concat(lineItem.port ? [lineItem.port] : []) : [],
3586
+ };
3587
+ lineItem.path = path;
3588
+ for (const child of lineItem.lineItems) {
3589
+ this.updateLineItemsSectionPath(child, lineItem.path);
3590
+ }
3591
+ }
3592
+ filterAndSort(sections) {
3593
+ const filtered = this.searchFilterPipe.transform(sections, this.activeUITab?.id, 'page');
3594
+ const ordered = this.orderByPipe.transform(filtered, 'order', 'asc');
3595
+ return ordered;
3596
+ }
3597
+ findSection(id) {
3598
+ return EntityUtil.findByFieldHierarchically('id', id, [...this.sortedSections, ...this.staticSections], 'children');
3599
+ }
3600
+ }
3601
+ RuntimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeComponent, deps: [{ token: SectionsService }, { token: FormScopeService }, { token: CollapsibleStateService }, { token: RuntimeFormService }, { token: RuntimeService }, { token: MessageService }, { token: i2.ContextService }, { token: i7.OrderByPipe }, { token: i7.SearchFilterPipe }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3602
+ RuntimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: RuntimeComponent, selector: "vl-runtime", outputs: { solutionUpdated: "solutionUpdated" }, providers: [FormScopeService, CollapsibleStateService, OrderByPipe, SearchFilterPipe], ngImport: i0, template: "<vl-loader label=\"Loading UI\" *ngIf=\"!solutionIsReady; else content\"></vl-loader>\n\n<ng-template #content>\n <div\n class=\"sidebar-tabs\"\n [ngClass]=\"{ hidden: !runtimeContext?.uiDefinition?.defaultPanels }\"\n #uiTabs=\"sidebarTabs\"\n sidebarTabs=\"{{ activeUITab?.id }}\"\n id=\"vl-default-sidebar-tabs\"\n >\n <ul>\n <li\n *ngFor=\"let tab of runtimeContext?.uiDefinition?.tabs | orderBy: 'order':'asc'\"\n [ngClass]=\"{ active: uiTabs.activeTab === tab.id }\"\n (click)=\"uiTabs.switchTab(tab.id)\"\n >\n <a href=\"javascript:void(0);\">{{ tab.name }}</a>\n </li>\n </ul>\n </div>\n\n <div class=\"sections-wrapper\">\n <form role=\"form\" name=\"form\" class=\"form-horizontal\" [formGroup]=\"form\" novalidate autocomplete=\"off\">\n <ng-container *ngFor=\"let section of staticSections; let i = index\">\n <ng-container *ngIf=\"section.model && section.template && !section.hidden\">\n <vl-section-renderer [section]=\"section\" [form]=\"form\"></vl-section-renderer>\n </ng-container>\n </ng-container>\n\n <ng-container *ngFor=\"let section of sortedSections; let i = index\">\n <ng-container *ngIf=\"section.model && section.template && !section.hidden\">\n <vl-section-renderer [section]=\"section\" [form]=\"form\"></vl-section-renderer>\n </ng-container>\n </ng-container>\n </form>\n\n <div\n class=\"modal-footer\"\n *ngIf=\"runtimeContext?.runtimeMode === 1\"\n id=\"vl-runtime-default-footer\"\n [ngClass]=\"{ hidden: !runtimeContext?.uiDefinition?.defaultPanels }\"\n >\n <div class=\"col-md-12 input-form-input\">\n <a href=\"javascript:void(0);\" class=\"btn btn-default\" (click)=\"form.valid && addToCart()\" id=\"add-to-cart-btn\"\n >Add to cart</a\n >\n <a href=\"javascript:void(0);\" class=\"btn btn-link\" (click)=\"hideModal()\" id=\"cancel-btn\">Cancel</a>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["body.veloce-apex-index,body.veloce-index,body.sfdcBody{overflow:hidden;margin:0;padding:0}:host ::ng-deep .velo-app .modal.in .modal-dialog.runtime-modal{margin-left:5%;margin-right:5%;padding:0;position:relative;width:auto}:host ::ng-deep .modal-body.runtime-modal.main-container{height:100%;margin:0;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .content-wrapper{display:flex;flex-direction:column;height:100%}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper{display:flex;flex-direction:column;flex-grow:1;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid{height:100%;margin:0;padding:0;overflow:auto}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal .form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid section-script>:first-child{height:100%}:host ::ng-deep .runtime-modal .modal-content,:host ::ng-deep .gu-mirror .modal-content{background-color:--vl-input-background}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a{color:#333333b3;font-weight:600;text-transform:uppercase;letter-spacing:.85px;font-size:10px}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active{color:#333}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.disabled,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.disabled{color:#33333380}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active:after,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active:after{background-color:#f36;bottom:-1px;content:\"\";height:1px;left:0;position:absolute;width:100%}:host ::ng-deep .runtime-modal .modal-content .modal-header,:host ::ng-deep .gu-mirror .modal-content .modal-header{background:transparent;color:#fff}:host ::ng-deep .runtime-modal .runtime-group-divider,:host ::ng-deep .gu-mirror .runtime-group-divider{border-bottom:1px solid #e5e5e5}:host ::ng-deep .runtime-modal .input-form-input,:host ::ng-deep .gu-mirror .input-form-input{position:relative;padding-left:0;padding-top:0}:host ::ng-deep .runtime-modal .input-form-input--required>label,:host ::ng-deep .gu-mirror .input-form-input--required>label{color:#ff4233;font-weight:700}:host ::ng-deep .form-control-wrapper{position:relative}:host ::ng-deep .add-config-control:hover{background-color:#e96099;color:#fff;border:1px solid transparent}:host ::ng-deep .remove-config-control:hover{background-color:#828c9e;color:#fff}:host ::ng-deep .add-config-control[disabled],:host ::ng-deep .remove-config-control[disabled]{background-color:transparent;color:#ccc;border:1px dashed #ccc}:host ::ng-deep .add-config-control[disabled]:hover,:host ::ng-deep .remove-config-control[disabled]:hover{cursor:default}:host ::ng-deep .add-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;border-radius:50%;float:left;position:absolute;top:0;right:-57px;z-index:500;background-color:#e3337c;color:#fff;border:1px solid #e3337c;transition:all .5s ease 0s}:host ::ng-deep .add-config-control .plus-icon{line-height:36px}:host ::ng-deep .remove-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;margin-right:25px;border-radius:50%;float:left;position:absolute;top:33px;right:51px;z-index:500;background-color:transparent;color:#687285;border:1px solid transparent;transition:all .5s ease 0s}:host ::ng-deep .remove-config-control .plus-icon{line-height:36px}:host ::ng-deep .sidebar .new-wrapper{min-height:96px;margin-bottom:25px}:host ::ng-deep .sidebar .new-wrapper .add-container .add-card{left:0;margin-left:15px}:host ::ng-deep .ui-settings{height:100%;display:flex;flex-direction:column}:host ::ng-deep .runtime-modal .form-horizontal form,:host ::ng-deep .gu-mirror form{margin:0}:host ::ng-deep .runtime-modal .form-horizontal .form-group,:host ::ng-deep .gu-mirror .form-group{margin:0;padding:0}:host ::ng-deep .runtime-modal .form-horizontal .control.form-group,:host ::ng-deep .gu-mirror .control.form-group{margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .form-control-wrapper,:host ::ng-deep .gu-mirror .form-control-wrapper{min-width:172px;margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper{min-width:50px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper .form-control,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper .form-control{width:50px}:host ::ng-deep .runtime-left-side{height:calc(100% - 97px);background:#fff;padding:48px 56px 0}:host ::ng-deep .ui-controls-group{margin-left:-8px;margin-right:-8px}:host ::ng-deep .ui-controls-group .ui-control-type:hover{border-color:#3384ff}:host ::ng-deep .ui-controls-group .ui-control-type{position:relative;min-width:140px;float:left;border-radius:3px;border:1px solid #c4c4c4;background-color:#fff;width:calc(50% - 16px);padding:12px 13px;margin-bottom:16px;margin-right:8px;margin-left:8px;cursor:pointer}:host ::ng-deep .ui-controls-group .ui-control-type span{padding-left:3px}:host ::ng-deep .sidebar-header{letter-spacing:-.5px;padding-bottom:24px;padding-top:0;line-height:32px;font-size:24px;font-weight:700;color:#333}:host ::ng-deep .sidebar-header small{display:block;color:#333;font-size:11px;font-weight:300;line-height:20px;margin:0}:host ::ng-deep .sidebar-menu-list{color:#333333b3;margin:0;width:100%;list-style:none;font-size:12px}:host ::ng-deep .sidebar-menu-list li.active a,:host ::ng-deep .sidebar-menu-list li.active i{color:#005ee3}:host ::ng-deep .sidebar-menu-list li:hover{cursor:pointer}:host ::ng-deep .sidebar-menu-list li{text-align:right;padding-left:16px}:host ::ng-deep .sidebar-menu-list li a{padding:0 8px;margin-left:-8px;cursor:pointer;white-space:nowrap;color:inherit;font-weight:700;display:inline-block;line-height:32px}:host ::ng-deep .sidebar-menu-list li i{display:none;padding-right:5px}:host ::ng-deep .runtime-builder-content{min-height:100%}:host ::ng-deep .runtime-builder-content .input-form{margin:0;padding:18px 11px 0}:host ::ng-deep .runtime-builder-content .input-form .form-group{border:3px dashed transparent}:host ::ng-deep .runtime-builder-content .input-form .form-group:hover{border:3px dashed #dedede}:host ::ng-deep .runtime-right-side{background:#fff}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background:#fff;position:relative;display:inline-block;padding-right:16px;text-transform:uppercase;font-size:10px;letter-spacing:.2px}:host ::ng-deep .sidebar-section:before{content:\" \";position:absolute;top:50%;left:0;right:0;border-top:1px solid #e6e6e6}:host ::ng-deep .sidebar-section{position:relative;margin-top:16px;margin-bottom:16px}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background-color:var(--vl-input-background);position:relative;display:inline-block;padding-right:16px;padding-left:8px;text-transform:uppercase;font-size:6px;letter-spacing:.2px}:host ::ng-deep .section-wrapper{top:-21px;position:absolute;right:0;left:12px}:host ::ng-deep .container-box.container-box-bordered{border:1px solid rgba(0,0,0,.2);margin-bottom:25px;padding-left:25px}:host ::ng-deep .container-box.container-box-radio{margin-left:0}:host ::ng-deep .container-box.container-box-radio:hover,:host ::ng-deep .container-box.container-box-checkbox:hover{cursor:pointer}:host ::ng-deep .container-box{position:relative;overflow:auto;border:1px solid transparent;background:var(--vl-input-background)}:host ::ng-deep .container-box .container-box{border:1px solid rgba(0,0,0,.2);margin-left:25px;margin-right:25px;margin-bottom:25px}:host ::ng-deep .container-box .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box .box-title .header .header-label{color:#333;margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-label small{padding-left:21px;color:#757575;font-weight:400;font-size:10px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-qty-container,:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{display:table-cell;vertical-align:middle;height:75px;padding-left:21px}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control,:host ::ng-deep .container-box .box-title .header .radio-button .form-control,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control{height:auto;color:#333;width:50px;border:1px solid #dddddd}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control:focus,:host ::ng-deep .container-box .box-title .header .radio-button .form-control:focus,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control:focus{border:1px solid #c4c4c4}:host ::ng-deep .container-box .box-title .header .header-qty-container .validation-message,:host ::ng-deep .container-box .box-title .header .radio-button .validation-message,:host ::ng-deep .container-box .box-title .header .checkbox-select .validation-message{position:absolute;margin-top:3px}:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{padding-left:0;vertical-align:middle}:host ::ng-deep .container-box .box-content{padding:25px 0 25px 33px}:host ::ng-deep .container-box .timeline-item{clear:both;display:block;width:100%;position:relative}:host ::ng-deep .container-box .timeline-item:before{display:block!important;content:\"\";position:absolute;left:25px;top:-25px;bottom:25px;width:1px;border-left:1px dashed rgba(0,0,0,.2)}:host ::ng-deep .container-box .timeline-item .icon{background:#90c7ec;width:35px;height:35px;border-radius:50%;position:absolute;left:24px;top:4px}:host ::ng-deep .container-box .timeline-item .icon .fa.fa-upload{left:11px;top:10px}:host ::ng-deep .container-box .timeline-item .icon .fa{color:#fff;position:absolute}:host ::ng-deep .container-box .timeline-item .message .content{float:left;width:80%}:host ::ng-deep .container-box .container-group-control{background:transparent;text-transform:uppercase}:host ::ng-deep .container-box-custom{margin-bottom:25px}:host ::ng-deep .unchecked .container-box{border-color:#0003}:host ::ng-deep .unchecked .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .unchecked.timeline-item .icon-circle{background-color:#6e6e6e}:host ::ng-deep .collapsed .box-content-wrapper{opacity:0;display:none;transition:max-height .3s .1s}:host ::ng-deep .box-content-wrapper{transition:opacity .5s .1s;display:block;opacity:1}:host ::ng-deep .box-actions{position:absolute;right:25px;z-index:2;top:21px;opacity:1;transition:height .3s ease-out,opacity .5s .1s}:host ::ng-deep .box-action-button{height:32px;width:32px;line-height:32px;font-size:12px;text-align:center;float:left;margin-left:5px;border-radius:50%;transition:all .25s ease 0s}:host ::ng-deep .box-action-button a{color:#0000008a}:host ::ng-deep .box-action-button .check-icon{line-height:32px}:host ::ng-deep .box-actions-group{top:18px;right:45px}:host ::ng-deep .box-action-button:hover,:host ::ng-deep .box-action-button:focus{background-color:#0000001a;cursor:pointer;outline:none}:host ::ng-deep .box-action-button:active{background-color:#0003;cursor:pointer}:host ::ng-deep .box-action-button.active{background-color:#0000001a}:host ::ng-deep .div-block{clear:both;display:block}:host ::ng-deep .div-inline{float:left}:host ::ng-deep .checkbox-select{position:relative;display:block}:host ::ng-deep .checkbox-select label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .checkbox-select input[type=checkbox]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .checkbox-select .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:2px;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .checkbox-select .input-helper:after{font-weight:100;line-height:12px;font-size:10px;color:#fff;font-family:FontAwesome;position:absolute;content:\"\\f00c\";width:12px;height:12px;background:#0065ff;border-radius:0;top:1px;left:2px;transform:scale(0);transition:all;transition-duration:.15s}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:before,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:after,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button{position:relative;display:block}:host ::ng-deep .radio-button label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .radio-button input[type=radio]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .radio-button .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:50%;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button .input-helper:after{position:absolute;content:\"\";width:6px;height:6px;background:var(--vl-primary-color);border-radius:50%;top:4px;left:5px;transform:scale(0);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .form-control-wrapper .checkbox-select,:host ::ng-deep .form-control-wrapper .radio-button{padding-top:10px}:host ::ng-deep .shopping-bag-sidebar.open{transform:translate3d(-100%,0,0)}:host ::ng-deep .shopping-bag-sidebar{position:fixed;top:0;bottom:0;z-index:1051;width:420px;right:-420px;background-color:#2a2b30;transition:.3s transform}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart{color:#abacae;position:absolute;top:20%;width:50px;height:50px;line-height:50px;text-align:center;right:100%;left:auto;background:#2a2b30;border-radius:3px 0 0 3px;display:block}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:before{font-family:FontAwesome;content:\"\\f291\"}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:hover{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:active,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:focus,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:visited{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .cart-count{font-size:9px;font-weight:700;line-height:15px;position:absolute;top:50%;right:8px;width:15px;height:15px;margin:-16px 0 0;text-align:center;color:#fff;border-radius:50%;background:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-container{overflow:auto;display:block;height:100%;padding:0 25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item{color:#abacae;background-color:#000;position:relative;overflow:auto;margin-bottom:10px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title{position:relative;padding-right:25px;padding-left:25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .header{float:left;color:#abacae;margin:0;line-height:48px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-actions{height:48px;float:right;top:0}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-action-button{height:32px;width:32px;line-height:32px;font-size:10px;font-weight:700;margin-top:8px;text-align:center;transition:all .25s ease 0s;color:#fff;background-color:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-title{color:#cecece;font-size:11px;text-transform:uppercase;line-height:64px;font-weight:600;padding-top:0;margin-top:25px;margin-bottom:25px;text-align:right}:host ::ng-deep .container-box.hovered:before,:host ::ng-deep .box-title.hovered:before,:host ::ng-deep .container-box.selected:before,:host ::ng-deep .box-title.selected:before{inset:0}:host ::ng-deep .selectable{position:relative;cursor:pointer}:host ::ng-deep .container-box.hovered:before{border-color:transparent}:host ::ng-deep .container-box.hovered{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box.selected:before{border-color:transparent}:host ::ng-deep .container-box.selected{border-color:var(--vl-primary-color)}:host ::ng-deep .hovered:before{display:block!important;position:absolute;content:\" \";inset:-15px 15px 15px -15px;border:1px solid var(--vl-primary-color)}:host ::ng-deep .hovered .box-action-button{opacity:1!important}:host ::ng-deep .opacity-1{opacity:1!important}:host ::ng-deep .overflow-y--auto{overflow-y:auto}:host ::ng-deep .gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}:host ::ng-deep .gu-hide{display:none!important}:host ::ng-deep .gu-unselectable{-webkit-user-select:none!important;user-select:none!important}:host ::ng-deep .gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}:host ::ng-deep .top-nav-msg{margin-top:-30px}:host ::ng-deep .runtime-info-message ul{margin-bottom:0;list-style:none}:host ::ng-deep .runtime-info-message ul li{margin-bottom:10px}:host ::ng-deep .runtime-info-message ul li:last-child{margin-bottom:0}:host ::ng-deep .runtime-info-message .message-text{font-family:Open Sans,Tahoma,sans-serif!important;overflow:hidden;padding:0;font-size:11px}:host ::ng-deep .runtime-attributes-popover .popover-arrow{display:none}:host ::ng-deep .runtime-attributes-popover .popover-content{padding:0}:host ::ng-deep .runtime-attributes-popover .runtime-content-wrapper{padding:0}:host ::ng-deep .runtime-attributes-popover .container-box-custom{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form{margin:0;padding:0}:host ::ng-deep .runtime-attributes-popover .input-form form{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form form .div-inline{display:block;float:none}:host ::ng-deep .runtime-attributes-popover .input-form form .form-group{padding:0;margin:0}:host ::ng-deep .runtime-attributes-popover .container-box .box-content{padding:0}:host ::ng-deep .v-custom-title,:host ::ng-deep .v-custom-description,:host ::ng-deep .v-custom-image{display:none}:host ::ng-deep .dropdown{position:relative}:host ::ng-deep .dropdown-toggle:focus{outline:0}:host ::ng-deep .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d}:host ::ng-deep .dropdown-menu.pull-right{right:0;left:auto}:host ::ng-deep .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}:host ::ng-deep .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}:host ::ng-deep .dropdown-menu>li>a:hover,:host ::ng-deep .dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}:host ::ng-deep .dropdown-menu>.active>a,:host ::ng-deep .dropdown-menu>.active>a:hover,:host ::ng-deep .dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}:host ::ng-deep .dropdown-menu>.disabled>a,:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{color:#777}:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}:host ::ng-deep .open>.dropdown-menu{display:block}:host ::ng-deep .open>a{outline:0}:host ::ng-deep .dropdown-menu-right{right:0;left:auto}:host ::ng-deep .dropdown-menu-left{right:auto;left:0}:host ::ng-deep .dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}:host ::ng-deep .dropdown-backdrop{position:fixed;inset:0;z-index:990}\n", ":host{height:100%;display:flex;flex-direction:column}.sections-wrapper,form{flex-grow:1;display:flex;flex-direction:column}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i3$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.SidebarTabsDirective, selector: "[sidebarTabs]", inputs: ["sidebarTabs"], exportAs: ["sidebarTabs"] }, { kind: "component", type: i10.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: SectionRendererComponent, selector: "vl-section-renderer", inputs: ["section", "form"] }, { kind: "pipe", type: i7.OrderByPipe, name: "orderBy" }] });
3603
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeComponent, decorators: [{
3604
+ type: Component,
3605
+ args: [{ selector: 'vl-runtime', providers: [FormScopeService, CollapsibleStateService, OrderByPipe, SearchFilterPipe], template: "<vl-loader label=\"Loading UI\" *ngIf=\"!solutionIsReady; else content\"></vl-loader>\n\n<ng-template #content>\n <div\n class=\"sidebar-tabs\"\n [ngClass]=\"{ hidden: !runtimeContext?.uiDefinition?.defaultPanels }\"\n #uiTabs=\"sidebarTabs\"\n sidebarTabs=\"{{ activeUITab?.id }}\"\n id=\"vl-default-sidebar-tabs\"\n >\n <ul>\n <li\n *ngFor=\"let tab of runtimeContext?.uiDefinition?.tabs | orderBy: 'order':'asc'\"\n [ngClass]=\"{ active: uiTabs.activeTab === tab.id }\"\n (click)=\"uiTabs.switchTab(tab.id)\"\n >\n <a href=\"javascript:void(0);\">{{ tab.name }}</a>\n </li>\n </ul>\n </div>\n\n <div class=\"sections-wrapper\">\n <form role=\"form\" name=\"form\" class=\"form-horizontal\" [formGroup]=\"form\" novalidate autocomplete=\"off\">\n <ng-container *ngFor=\"let section of staticSections; let i = index\">\n <ng-container *ngIf=\"section.model && section.template && !section.hidden\">\n <vl-section-renderer [section]=\"section\" [form]=\"form\"></vl-section-renderer>\n </ng-container>\n </ng-container>\n\n <ng-container *ngFor=\"let section of sortedSections; let i = index\">\n <ng-container *ngIf=\"section.model && section.template && !section.hidden\">\n <vl-section-renderer [section]=\"section\" [form]=\"form\"></vl-section-renderer>\n </ng-container>\n </ng-container>\n </form>\n\n <div\n class=\"modal-footer\"\n *ngIf=\"runtimeContext?.runtimeMode === 1\"\n id=\"vl-runtime-default-footer\"\n [ngClass]=\"{ hidden: !runtimeContext?.uiDefinition?.defaultPanels }\"\n >\n <div class=\"col-md-12 input-form-input\">\n <a href=\"javascript:void(0);\" class=\"btn btn-default\" (click)=\"form.valid && addToCart()\" id=\"add-to-cart-btn\"\n >Add to cart</a\n >\n <a href=\"javascript:void(0);\" class=\"btn btn-link\" (click)=\"hideModal()\" id=\"cancel-btn\">Cancel</a>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["body.veloce-apex-index,body.veloce-index,body.sfdcBody{overflow:hidden;margin:0;padding:0}:host ::ng-deep .velo-app .modal.in .modal-dialog.runtime-modal{margin-left:5%;margin-right:5%;padding:0;position:relative;width:auto}:host ::ng-deep .modal-body.runtime-modal.main-container{height:100%;margin:0;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .content-wrapper{display:flex;flex-direction:column;height:100%}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper{display:flex;flex-direction:column;flex-grow:1;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid{height:100%;margin:0;padding:0;overflow:auto}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal .form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid section-script>:first-child{height:100%}:host ::ng-deep .runtime-modal .modal-content,:host ::ng-deep .gu-mirror .modal-content{background-color:--vl-input-background}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a{color:#333333b3;font-weight:600;text-transform:uppercase;letter-spacing:.85px;font-size:10px}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active{color:#333}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.disabled,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.disabled{color:#33333380}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active:after,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active:after{background-color:#f36;bottom:-1px;content:\"\";height:1px;left:0;position:absolute;width:100%}:host ::ng-deep .runtime-modal .modal-content .modal-header,:host ::ng-deep .gu-mirror .modal-content .modal-header{background:transparent;color:#fff}:host ::ng-deep .runtime-modal .runtime-group-divider,:host ::ng-deep .gu-mirror .runtime-group-divider{border-bottom:1px solid #e5e5e5}:host ::ng-deep .runtime-modal .input-form-input,:host ::ng-deep .gu-mirror .input-form-input{position:relative;padding-left:0;padding-top:0}:host ::ng-deep .runtime-modal .input-form-input--required>label,:host ::ng-deep .gu-mirror .input-form-input--required>label{color:#ff4233;font-weight:700}:host ::ng-deep .form-control-wrapper{position:relative}:host ::ng-deep .add-config-control:hover{background-color:#e96099;color:#fff;border:1px solid transparent}:host ::ng-deep .remove-config-control:hover{background-color:#828c9e;color:#fff}:host ::ng-deep .add-config-control[disabled],:host ::ng-deep .remove-config-control[disabled]{background-color:transparent;color:#ccc;border:1px dashed #ccc}:host ::ng-deep .add-config-control[disabled]:hover,:host ::ng-deep .remove-config-control[disabled]:hover{cursor:default}:host ::ng-deep .add-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;border-radius:50%;float:left;position:absolute;top:0;right:-57px;z-index:500;background-color:#e3337c;color:#fff;border:1px solid #e3337c;transition:all .5s ease 0s}:host ::ng-deep .add-config-control .plus-icon{line-height:36px}:host ::ng-deep .remove-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;margin-right:25px;border-radius:50%;float:left;position:absolute;top:33px;right:51px;z-index:500;background-color:transparent;color:#687285;border:1px solid transparent;transition:all .5s ease 0s}:host ::ng-deep .remove-config-control .plus-icon{line-height:36px}:host ::ng-deep .sidebar .new-wrapper{min-height:96px;margin-bottom:25px}:host ::ng-deep .sidebar .new-wrapper .add-container .add-card{left:0;margin-left:15px}:host ::ng-deep .ui-settings{height:100%;display:flex;flex-direction:column}:host ::ng-deep .runtime-modal .form-horizontal form,:host ::ng-deep .gu-mirror form{margin:0}:host ::ng-deep .runtime-modal .form-horizontal .form-group,:host ::ng-deep .gu-mirror .form-group{margin:0;padding:0}:host ::ng-deep .runtime-modal .form-horizontal .control.form-group,:host ::ng-deep .gu-mirror .control.form-group{margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .form-control-wrapper,:host ::ng-deep .gu-mirror .form-control-wrapper{min-width:172px;margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper{min-width:50px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper .form-control,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper .form-control{width:50px}:host ::ng-deep .runtime-left-side{height:calc(100% - 97px);background:#fff;padding:48px 56px 0}:host ::ng-deep .ui-controls-group{margin-left:-8px;margin-right:-8px}:host ::ng-deep .ui-controls-group .ui-control-type:hover{border-color:#3384ff}:host ::ng-deep .ui-controls-group .ui-control-type{position:relative;min-width:140px;float:left;border-radius:3px;border:1px solid #c4c4c4;background-color:#fff;width:calc(50% - 16px);padding:12px 13px;margin-bottom:16px;margin-right:8px;margin-left:8px;cursor:pointer}:host ::ng-deep .ui-controls-group .ui-control-type span{padding-left:3px}:host ::ng-deep .sidebar-header{letter-spacing:-.5px;padding-bottom:24px;padding-top:0;line-height:32px;font-size:24px;font-weight:700;color:#333}:host ::ng-deep .sidebar-header small{display:block;color:#333;font-size:11px;font-weight:300;line-height:20px;margin:0}:host ::ng-deep .sidebar-menu-list{color:#333333b3;margin:0;width:100%;list-style:none;font-size:12px}:host ::ng-deep .sidebar-menu-list li.active a,:host ::ng-deep .sidebar-menu-list li.active i{color:#005ee3}:host ::ng-deep .sidebar-menu-list li:hover{cursor:pointer}:host ::ng-deep .sidebar-menu-list li{text-align:right;padding-left:16px}:host ::ng-deep .sidebar-menu-list li a{padding:0 8px;margin-left:-8px;cursor:pointer;white-space:nowrap;color:inherit;font-weight:700;display:inline-block;line-height:32px}:host ::ng-deep .sidebar-menu-list li i{display:none;padding-right:5px}:host ::ng-deep .runtime-builder-content{min-height:100%}:host ::ng-deep .runtime-builder-content .input-form{margin:0;padding:18px 11px 0}:host ::ng-deep .runtime-builder-content .input-form .form-group{border:3px dashed transparent}:host ::ng-deep .runtime-builder-content .input-form .form-group:hover{border:3px dashed #dedede}:host ::ng-deep .runtime-right-side{background:#fff}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background:#fff;position:relative;display:inline-block;padding-right:16px;text-transform:uppercase;font-size:10px;letter-spacing:.2px}:host ::ng-deep .sidebar-section:before{content:\" \";position:absolute;top:50%;left:0;right:0;border-top:1px solid #e6e6e6}:host ::ng-deep .sidebar-section{position:relative;margin-top:16px;margin-bottom:16px}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background-color:var(--vl-input-background);position:relative;display:inline-block;padding-right:16px;padding-left:8px;text-transform:uppercase;font-size:6px;letter-spacing:.2px}:host ::ng-deep .section-wrapper{top:-21px;position:absolute;right:0;left:12px}:host ::ng-deep .container-box.container-box-bordered{border:1px solid rgba(0,0,0,.2);margin-bottom:25px;padding-left:25px}:host ::ng-deep .container-box.container-box-radio{margin-left:0}:host ::ng-deep .container-box.container-box-radio:hover,:host ::ng-deep .container-box.container-box-checkbox:hover{cursor:pointer}:host ::ng-deep .container-box{position:relative;overflow:auto;border:1px solid transparent;background:var(--vl-input-background)}:host ::ng-deep .container-box .container-box{border:1px solid rgba(0,0,0,.2);margin-left:25px;margin-right:25px;margin-bottom:25px}:host ::ng-deep .container-box .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box .box-title .header .header-label{color:#333;margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-label small{padding-left:21px;color:#757575;font-weight:400;font-size:10px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-qty-container,:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{display:table-cell;vertical-align:middle;height:75px;padding-left:21px}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control,:host ::ng-deep .container-box .box-title .header .radio-button .form-control,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control{height:auto;color:#333;width:50px;border:1px solid #dddddd}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control:focus,:host ::ng-deep .container-box .box-title .header .radio-button .form-control:focus,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control:focus{border:1px solid #c4c4c4}:host ::ng-deep .container-box .box-title .header .header-qty-container .validation-message,:host ::ng-deep .container-box .box-title .header .radio-button .validation-message,:host ::ng-deep .container-box .box-title .header .checkbox-select .validation-message{position:absolute;margin-top:3px}:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{padding-left:0;vertical-align:middle}:host ::ng-deep .container-box .box-content{padding:25px 0 25px 33px}:host ::ng-deep .container-box .timeline-item{clear:both;display:block;width:100%;position:relative}:host ::ng-deep .container-box .timeline-item:before{display:block!important;content:\"\";position:absolute;left:25px;top:-25px;bottom:25px;width:1px;border-left:1px dashed rgba(0,0,0,.2)}:host ::ng-deep .container-box .timeline-item .icon{background:#90c7ec;width:35px;height:35px;border-radius:50%;position:absolute;left:24px;top:4px}:host ::ng-deep .container-box .timeline-item .icon .fa.fa-upload{left:11px;top:10px}:host ::ng-deep .container-box .timeline-item .icon .fa{color:#fff;position:absolute}:host ::ng-deep .container-box .timeline-item .message .content{float:left;width:80%}:host ::ng-deep .container-box .container-group-control{background:transparent;text-transform:uppercase}:host ::ng-deep .container-box-custom{margin-bottom:25px}:host ::ng-deep .unchecked .container-box{border-color:#0003}:host ::ng-deep .unchecked .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .unchecked.timeline-item .icon-circle{background-color:#6e6e6e}:host ::ng-deep .collapsed .box-content-wrapper{opacity:0;display:none;transition:max-height .3s .1s}:host ::ng-deep .box-content-wrapper{transition:opacity .5s .1s;display:block;opacity:1}:host ::ng-deep .box-actions{position:absolute;right:25px;z-index:2;top:21px;opacity:1;transition:height .3s ease-out,opacity .5s .1s}:host ::ng-deep .box-action-button{height:32px;width:32px;line-height:32px;font-size:12px;text-align:center;float:left;margin-left:5px;border-radius:50%;transition:all .25s ease 0s}:host ::ng-deep .box-action-button a{color:#0000008a}:host ::ng-deep .box-action-button .check-icon{line-height:32px}:host ::ng-deep .box-actions-group{top:18px;right:45px}:host ::ng-deep .box-action-button:hover,:host ::ng-deep .box-action-button:focus{background-color:#0000001a;cursor:pointer;outline:none}:host ::ng-deep .box-action-button:active{background-color:#0003;cursor:pointer}:host ::ng-deep .box-action-button.active{background-color:#0000001a}:host ::ng-deep .div-block{clear:both;display:block}:host ::ng-deep .div-inline{float:left}:host ::ng-deep .checkbox-select{position:relative;display:block}:host ::ng-deep .checkbox-select label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .checkbox-select input[type=checkbox]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .checkbox-select .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:2px;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .checkbox-select .input-helper:after{font-weight:100;line-height:12px;font-size:10px;color:#fff;font-family:FontAwesome;position:absolute;content:\"\\f00c\";width:12px;height:12px;background:#0065ff;border-radius:0;top:1px;left:2px;transform:scale(0);transition:all;transition-duration:.15s}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:before,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:after,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button{position:relative;display:block}:host ::ng-deep .radio-button label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .radio-button input[type=radio]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .radio-button .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:50%;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button .input-helper:after{position:absolute;content:\"\";width:6px;height:6px;background:var(--vl-primary-color);border-radius:50%;top:4px;left:5px;transform:scale(0);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .form-control-wrapper .checkbox-select,:host ::ng-deep .form-control-wrapper .radio-button{padding-top:10px}:host ::ng-deep .shopping-bag-sidebar.open{transform:translate3d(-100%,0,0)}:host ::ng-deep .shopping-bag-sidebar{position:fixed;top:0;bottom:0;z-index:1051;width:420px;right:-420px;background-color:#2a2b30;transition:.3s transform}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart{color:#abacae;position:absolute;top:20%;width:50px;height:50px;line-height:50px;text-align:center;right:100%;left:auto;background:#2a2b30;border-radius:3px 0 0 3px;display:block}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:before{font-family:FontAwesome;content:\"\\f291\"}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:hover{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:active,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:focus,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:visited{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .cart-count{font-size:9px;font-weight:700;line-height:15px;position:absolute;top:50%;right:8px;width:15px;height:15px;margin:-16px 0 0;text-align:center;color:#fff;border-radius:50%;background:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-container{overflow:auto;display:block;height:100%;padding:0 25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item{color:#abacae;background-color:#000;position:relative;overflow:auto;margin-bottom:10px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title{position:relative;padding-right:25px;padding-left:25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .header{float:left;color:#abacae;margin:0;line-height:48px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-actions{height:48px;float:right;top:0}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-action-button{height:32px;width:32px;line-height:32px;font-size:10px;font-weight:700;margin-top:8px;text-align:center;transition:all .25s ease 0s;color:#fff;background-color:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-title{color:#cecece;font-size:11px;text-transform:uppercase;line-height:64px;font-weight:600;padding-top:0;margin-top:25px;margin-bottom:25px;text-align:right}:host ::ng-deep .container-box.hovered:before,:host ::ng-deep .box-title.hovered:before,:host ::ng-deep .container-box.selected:before,:host ::ng-deep .box-title.selected:before{inset:0}:host ::ng-deep .selectable{position:relative;cursor:pointer}:host ::ng-deep .container-box.hovered:before{border-color:transparent}:host ::ng-deep .container-box.hovered{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box.selected:before{border-color:transparent}:host ::ng-deep .container-box.selected{border-color:var(--vl-primary-color)}:host ::ng-deep .hovered:before{display:block!important;position:absolute;content:\" \";inset:-15px 15px 15px -15px;border:1px solid var(--vl-primary-color)}:host ::ng-deep .hovered .box-action-button{opacity:1!important}:host ::ng-deep .opacity-1{opacity:1!important}:host ::ng-deep .overflow-y--auto{overflow-y:auto}:host ::ng-deep .gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}:host ::ng-deep .gu-hide{display:none!important}:host ::ng-deep .gu-unselectable{-webkit-user-select:none!important;user-select:none!important}:host ::ng-deep .gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}:host ::ng-deep .top-nav-msg{margin-top:-30px}:host ::ng-deep .runtime-info-message ul{margin-bottom:0;list-style:none}:host ::ng-deep .runtime-info-message ul li{margin-bottom:10px}:host ::ng-deep .runtime-info-message ul li:last-child{margin-bottom:0}:host ::ng-deep .runtime-info-message .message-text{font-family:Open Sans,Tahoma,sans-serif!important;overflow:hidden;padding:0;font-size:11px}:host ::ng-deep .runtime-attributes-popover .popover-arrow{display:none}:host ::ng-deep .runtime-attributes-popover .popover-content{padding:0}:host ::ng-deep .runtime-attributes-popover .runtime-content-wrapper{padding:0}:host ::ng-deep .runtime-attributes-popover .container-box-custom{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form{margin:0;padding:0}:host ::ng-deep .runtime-attributes-popover .input-form form{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form form .div-inline{display:block;float:none}:host ::ng-deep .runtime-attributes-popover .input-form form .form-group{padding:0;margin:0}:host ::ng-deep .runtime-attributes-popover .container-box .box-content{padding:0}:host ::ng-deep .v-custom-title,:host ::ng-deep .v-custom-description,:host ::ng-deep .v-custom-image{display:none}:host ::ng-deep .dropdown{position:relative}:host ::ng-deep .dropdown-toggle:focus{outline:0}:host ::ng-deep .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d}:host ::ng-deep .dropdown-menu.pull-right{right:0;left:auto}:host ::ng-deep .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}:host ::ng-deep .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}:host ::ng-deep .dropdown-menu>li>a:hover,:host ::ng-deep .dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}:host ::ng-deep .dropdown-menu>.active>a,:host ::ng-deep .dropdown-menu>.active>a:hover,:host ::ng-deep .dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}:host ::ng-deep .dropdown-menu>.disabled>a,:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{color:#777}:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}:host ::ng-deep .open>.dropdown-menu{display:block}:host ::ng-deep .open>a{outline:0}:host ::ng-deep .dropdown-menu-right{right:0;left:auto}:host ::ng-deep .dropdown-menu-left{right:auto;left:0}:host ::ng-deep .dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}:host ::ng-deep .dropdown-backdrop{position:fixed;inset:0;z-index:990}\n", ":host{height:100%;display:flex;flex-direction:column}.sections-wrapper,form{flex-grow:1;display:flex;flex-direction:column}.hidden{display:none}\n"] }]
3606
+ }], ctorParameters: function () { return [{ type: SectionsService }, { type: FormScopeService }, { type: CollapsibleStateService }, { type: RuntimeFormService }, { type: RuntimeService }, { type: i3$1.MessageService, decorators: [{
3607
+ type: Inject,
3608
+ args: [MessageService]
3609
+ }] }, { type: i2.ContextService }, { type: i7.OrderByPipe }, { type: i7.SearchFilterPipe }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { solutionUpdated: [{
3610
+ type: Output
3611
+ }] } });
3612
+
3613
+ class RuntimePreviewComponent {
3614
+ set uiDefinition(value) {
3615
+ this._uiDefinition = value;
3616
+ this.initDefinition(value);
3617
+ }
3618
+ constructor(runtimeService, modelCacheService, configurationApiService, contextService) {
3619
+ this.runtimeService = runtimeService;
3620
+ this.modelCacheService = modelCacheService;
3621
+ this.configurationApiService = configurationApiService;
3622
+ this.contextService = contextService;
3623
+ this.destroy$ = new Subject();
3624
+ }
3625
+ ngOnInit() {
3626
+ if (!this.modelId) {
3627
+ return;
3628
+ }
3629
+ this.modelCacheService
3630
+ .getProductModel(this.modelId)
3631
+ .pipe(takeUntil(this.destroy$))
3632
+ .subscribe(container => {
3633
+ this.productModelContainer = container;
3634
+ if (this._uiDefinition) {
3635
+ this.initDefinition(this._uiDefinition);
3636
+ }
3637
+ });
3638
+ }
3639
+ ngOnDestroy() {
3640
+ this.destroy$.next();
3641
+ this.destroy$.complete();
3642
+ }
3643
+ initDefinition(uiDefinition) {
3644
+ if (!this.productModelContainer) {
3645
+ return;
3646
+ }
3647
+ const initialisedUiDefinition = EntityUtil.clone(uiDefinition);
3648
+ const externals = this.productModelContainer.main.externals;
3649
+ if (externals) {
3650
+ initialisedUiDefinition.externals = externals.reduce((trunk, variable) => {
3651
+ return {
3652
+ ...trunk,
3653
+ [variable.name]: initialisedUiDefinition.externals?.[variable.name] ?? '',
3654
+ };
3655
+ }, {});
3656
+ }
3657
+ else {
3658
+ delete initialisedUiDefinition.externals;
3659
+ }
3660
+ this.initialisedUiDefinition = initialisedUiDefinition;
3661
+ this.launchRuntime();
3662
+ }
3663
+ onSolutionUpdated(lineItem) {
3664
+ this.runtimeService.updateRuntime({ configurableRamp: lineItem });
3665
+ }
3666
+ launchRuntime() {
3667
+ if (!this.modelId || !this.initialisedUiDefinition) {
3668
+ return;
3669
+ }
3670
+ SectionPathUtil.updateSectionsPath(this.initialisedUiDefinition.sections);
3671
+ const uiDefinition = EntityUtil.clone(this.initialisedUiDefinition);
3672
+ combineLatest([
3673
+ this.configurationApiService.getRuntimeDataByModelId(this.modelId),
3674
+ this.contextService.create('TestId', ConfigurationContextMode.TEST),
3675
+ ]).subscribe(([runtimeData]) => {
3676
+ const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
3677
+ const rootType = Array.from(runtimeModel.components.values()).find(c => uiDefinition.rootType &&
3678
+ runtimeModel.isEquals(c.typeName, uiDefinition.rootType) &&
3679
+ EntityUtil.isPresent(c.productId));
3680
+ if (rootType?.typeName) {
3681
+ uiDefinition.rootType = rootType.typeName;
3682
+ }
3683
+ const contextProductId = rootType ? rootType.productId : undefined;
3684
+ const context = {
3685
+ modelId: this.modelId ?? '',
3686
+ uiDefinition: uiDefinition,
3687
+ runtimeModel,
3688
+ runtimeMode: RuntimeMode.TEST,
3689
+ productId: contextProductId,
3690
+ properties: uiDefinition.externals,
3691
+ };
3692
+ this.runtimeService.startRuntime(context, {});
3693
+ });
3694
+ }
3695
+ }
3696
+ RuntimePreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimePreviewComponent, deps: [{ token: RuntimeService }, { token: ProductModelCacheService }, { token: i1.ConfigurationApiService }, { token: i2.ContextService }], target: i0.ɵɵFactoryTarget.Component });
3697
+ RuntimePreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: RuntimePreviewComponent, selector: "vl-runtime-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition" }, ngImport: i0, template: "<vl-runtime (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{flex-grow:1}\n"], dependencies: [{ kind: "component", type: RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimePreviewComponent, decorators: [{
3699
+ type: Component,
3700
+ args: [{ selector: 'vl-runtime-preview', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-runtime (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{flex-grow:1}\n"] }]
3701
+ }], ctorParameters: function () { return [{ type: RuntimeService }, { type: ProductModelCacheService }, { type: i1.ConfigurationApiService }, { type: i2.ContextService }]; }, propDecorators: { modelId: [{
3702
+ type: Input
3703
+ }], uiDefinition: [{
3704
+ type: Input
3705
+ }] } });
3706
+
3707
+ class RuntimeModule {
3708
+ }
3709
+ RuntimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3710
+ RuntimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: RuntimeModule, declarations: [RuntimeComponent, RuntimePreviewComponent, SectionRendererComponent, ComponentPreviewComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule, CoreModule, ApiModule, LoaderModule, SdkCoreModule], exports: [FormsModule,
3711
+ ReactiveFormsModule,
3712
+ RuntimeComponent,
3713
+ RuntimePreviewComponent,
3714
+ SectionRendererComponent,
3715
+ ComponentPreviewComponent] });
3716
+ RuntimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeModule, providers: [
3717
+ ShoppingCartService,
3718
+ RuntimeService,
3719
+ ConfigurationService,
3720
+ RuntimeContextService,
3721
+ RuntimeFormService,
3722
+ CurrentStateService,
3723
+ ProductModelCacheService,
3724
+ DatePipe,
3725
+ SectionsService,
3726
+ SectionStoreService,
3727
+ DialogService,
3728
+ ], imports: [CommonModule, FormsModule, ReactiveFormsModule, CoreModule, ApiModule, LoaderModule, SdkCoreModule, FormsModule,
3729
+ ReactiveFormsModule] });
3730
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeModule, decorators: [{
3731
+ type: NgModule,
3732
+ args: [{
3733
+ declarations: [RuntimeComponent, RuntimePreviewComponent, SectionRendererComponent, ComponentPreviewComponent],
3734
+ providers: [
3735
+ ShoppingCartService,
3736
+ RuntimeService,
3737
+ ConfigurationService,
3738
+ RuntimeContextService,
3739
+ RuntimeFormService,
3740
+ CurrentStateService,
3741
+ ProductModelCacheService,
3742
+ DatePipe,
3743
+ SectionsService,
3744
+ SectionStoreService,
3745
+ DialogService,
3746
+ ],
3747
+ imports: [CommonModule, FormsModule, ReactiveFormsModule, CoreModule, ApiModule, LoaderModule, SdkCoreModule],
3748
+ exports: [
3749
+ FormsModule,
3750
+ ReactiveFormsModule,
3751
+ RuntimeComponent,
3752
+ RuntimePreviewComponent,
3753
+ SectionRendererComponent,
3754
+ ComponentPreviewComponent,
3755
+ ],
3756
+ }]
3757
+ }] });
3758
+
3759
+ /**
3760
+ * Generated bundle index. Do not edit.
3761
+ */
3762
+
3763
+ export { ComponentPreviewComponent, CurrentStateService, RuntimeComponent, RuntimeContextService, RuntimeModule, RuntimePreviewComponent, RuntimeService, SectionRendererComponent };
3764
+ //# sourceMappingURL=veloceapps-sdk-runtime.mjs.map